ImageVerifierCode 换一换
格式:DOC , 页数:16 ,大小:437KB ,
资源ID:4594934      下载积分:5 金币
快捷注册下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/4594934.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

注意事项

本文(学习笔记_CIC_filter及其matlab实现.doc)为本站上传会员【二***】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

学习笔记_CIC_filter及其matlab实现.doc

1、学习笔记: CIC filter及其matlab实现 2010-04-19 14:55 8063人阅读 评论(0) 收藏 举报 filtermatlabdelaybufferoutputinput References: [1] Understanding cascaded integrator-comb filters – By Richard Lyons, Courtesy of Embedded Systems Programming URL: http://www.us.design- [2] Example of Cascaded Integrator Comb fi

2、lter in Matlab [3] Digital Signal Processing – Principles, Algorithms and Applications , John G. Proakis, Dimitris G. Manolakis CIC数字滤波器是窄带低通滤波器的高计算效率的实现形式,常常被嵌入到现代通信系统的抽取和插值模块的硬件实现中。 CIC filter 应用 CIC滤波器非常适合用作抽取之前的抗混迭滤波和插值之后的抗镜像滤波。这两种应用都跟very high-data-rate滤波有关,例如现代无线系统中硬件正交调制和解调,以及delta-sig

3、ma A/D 和 D/A 转换器。 Figure 1: CIC filter applications 因为CIC滤波器的幅频响应包络象sin(x)/x,通常在CIC滤波器之前或者之后都有一个high-performance linear-phase lowpass tapped-delay-line FIR filters, 用于补偿CIC滤波器不够平坦的通带。 CIC滤波器不需要乘法运算,易于硬件实现。 抽取CIC滤波器只不过是滑动平均滤波器的一个非常高效的迭代实现,有NR taps, 其输出再进行 R 抽取 . 同样,插值CIC滤波器在每两个输入采样之间插入R -1个0,然

4、后通过一个NR -tap的工作在输出采样率ƒs ,out 的滑动平均滤波器。对于高采样率转换率的抽取和插值来说,Figure 1所示的级联形式的计算量大大低于单一FIR滤波器的计算量。 Recursive running-sum filter Figure 2: D-point averaging filters Figure 2a是标准的D-point moving-average 处理,需要D-1次加法运算和1次乘法运算。时域表达式: Equation 1 z域表达式: Equation 2 z域传递函数: Equation 3 Figure 2

5、b: 迭代running-sum filter,等价于figure 2a. y(n) = 1/D * [x(n) + x(n-1) + … + x(n-D+1)] y(n-1) = 1/D * [x(n-1) + x(n-2) + x(n-D+1) + x(n-D)] y(n) – y(n-1) = 1/D * [x(n) – x(n-D)] Equation 4 z域传递函数: Equation 5 Equation 3 和 Equation 5 本质是一样的。Equation 3 是非递归表达式,equation 5是递归表达式。不考虑delay length D

6、的话,递归形式只需要一个加法和一个减法运算。 例子:figure 1a的matlab实现,滑动平均滤波器,忽略scale factor % Moving Average filter N = 10; %延时 xn = sin(2*pi*[0:.1:10]); %n=[0:1:100]; sin(2*pi*f*t)=sin(2*pi*f*T*n)=>f=1Hz, fs=10Hz. hn = ones(1,N); %脉冲响应 y1n = conv(xn,hn); % transfer function of Moving Average filter hF = fft(

7、hn,1024); plot([-512:511]/1024, abs(fftshift(hF))); xlabel(’Normalized frequency’) ylabel(’Amplitude’) title(’frequency response of Moving average filter’) Figure 1c的matlab实现 % Implementing Cascaded Integrator Comb filter with the % comb section following the integrator stage N = 10

8、 delayBuffer = zeros(1,N); intOut = 0; xn = sin(2*pi*[0:.1:10]); for ii = 1:length(xn) % comb section combOut = xn(ii) – delayBuffer(end); delayBuffer(2:end) = delayBuffer(1:end-1); delayBuffer(1) = xn(ii); % integrator intOut = intOut + combOut; y2n(ii) = intOut; end err1

9、2 = y1n(1:length(xn)) – y2n; err12dB = 10*log10(err12*err12′/length(err12)) % identical outputs close all 先integrator后comb的实现 % Implementing Cascaded Integrator Comb filter with the % integrator section following the comb stage N = 10; delayBuffer = zeros(1,N); intOut = 0; xn = si

10、n(2*pi*[0:.1:10]); for ii = 1:length(xn) % integrator intOut = intOut + xn(ii); % comb section combOut = intOut – delayBuffer(end); delayBuffer(2:end) = delayBuffer(1:end-1); delayBuffer(1) = intOut; y3n(ii) = combOut; end err13 = y1n(1:length(xn)) – y3n; err13dB = 10*log10(err

11、13*err13′/length(err13)) % identical outputs CIC filter structures Figure 2c: the classic form of 1st-order CIC filter, 忽略figure 2b中的1/D因子。 其中前馈部分称为comb section, 其differential delay 是D;反馈部分称为积分器。 差分方程: Equation 6 Equation 7 Figure 3: Single-stage CIC filter time-domain responses when

12、 D = 5 Figure 2c这个1阶CIC滤波器看做是2部分的级联。Figure 3a是comb stage的脉冲响应,figure 3b是积分器的脉冲响应,figure 3c是整个系统的脉冲响应。系统的脉冲响应是一个矩形序列,等价于moving-average filter和recursive running-sum filter的单位脉冲响应,仅仅相差一个常数的scale factor。 Figure 4: Characteristics of a single-stage CIC filter when D = 5 1阶CIC滤波器的频率响应,Equation 7在单位

13、圆上的z变换: Equation 8 Equation 9 If we ignore the phase factor in Equation 9, that ratio of sin() terms can be approximated by a sin(x )/x function. This means the CIC filter's frequency magnitude response is approximately equal to a sin(x )/x function centered at 0Hz as we see in Figure 4a. (

14、This is why CIC filters are sometimes called sinc filters.) 虽然在单位圆上有极点,但是CIC滤波器的系数都是1,滤波器系数没有量化误差,因此CIC滤波器并不存在通常滤波器因在单位圆上有极点而导致的风 险。虽然有递归,但是CIC滤波器是稳定的,线性相位的,有有限长度的脉冲响应。在0Hz处(DC),CIC滤波器增益等于comb滤波器delay D. CIC 滤波器在抽取和插值中的应用 Figure 5: Single-stage CIC filters used in decimation and interpolation

15、 大多数的CIC滤波器的rate change R等于comb的差分延时D. Figure 6: Magnitude response of a 1st-order, D = 8, decimating CIC filter: before decimation; aliasiing after R = 8 decimation ƒs ,out = ƒs ,in /R The spectral band, of width B , centered at 0Hz is the desired passband of the filter. A key aspect of CI

16、C filters is the spectral folding that takes place due to decimation. 假设CIC的输入信号的频谱是在[-ƒs ,in /2, ƒs ,in /2 ]上的方波,那么经过CIC滤波器以后的输出信号的频谱如figure 6a绿色的包络所示。 我们知道,在8分之一下采用的情况下,ƒs ,out /2 是下采用后信号的频域边界,即ƒs ,in /16 。下采样后信号频域范围是[-ƒs ,out /2, ƒs ,out /2 ],即是[-ƒs ,in /16, ƒs ,in /16 ],带宽为ƒs ,in /8 。采样前信号在ƒs

17、in /8 的整数倍为中心频率,宽度为 ƒs ,in /8 的频谱都会混迭到 下采样后的信号频带内。虽然下采样后信号的ƒs ,in /8 频带都被混迭了,由于我们真正关心的是以0hz为中心,带宽为B的一段频带,在这个频带外的频谱不需要考虑。 Figure 6a 中用阴影表示了将要被混迭且影响目标频带的频谱。 Figure 6b 是对混迭后(下采样后)目标频带的频谱混迭情况。 Figure 7: 1st-order, D = R = 8, interpolating CIC filter spectra: input spectrum; output spectral images

18、 Figure 7a 是一个任意的基带频谱和它的由于8倍插值而产生的在ƒs ,in 整数倍上的频谱复制。 Figure 7b是滤波器的输出频谱,反映了不完美的滤波引入的不需要的频谱镜像。 在CIC滤波器后连接一个传统的lowpass tapped-delay-line FIR滤波器,如果这个滤波器的阻带包含第一个频谱镜像,那么可以很好的滤除这些频谱镜像。 Improving CIC attenuation Figure 8: 3rd-order CIC decimation filter structure, and magnitude response before deci

19、mation when D = R = 8 Equation 10 提高抗混迭衰减的代价是增加了硬件加法器的使用,同时还增加了通带的弯曲下垂。 另外,增加滤波器阶数会影响到滤波器增益,滤波器增益跟阶数成指数关系。因为为保持稳定,CIC分不清通常需要全精度,加法器的bit数为M log2 (D ),这意味着高滤波器阶数需要大的数据位宽。即使如此,多级实现形式在商用集成电路中是很常用的,M阶的CIC滤波器常称为sincM 滤波器。 Building a CIC filter Figure 9: Single-stage CIC filter implementations:

20、 for decimation; for interpolation 通常将CIC滤波器的comb部分放在低采样率区域来减少用于存储delay的存储器的size. Figure 10: CIC decimation filter responses: for various values of differential delay N , when R = 8; for two decimation factors when N =2 那些采样率比高的采样率转换,其comb部分的差分延时的设计参数N的典型值是1或2。N有效的决定了抽取滤波器频率响应中零点的个数。如Figure 1

21、0a所示。 CIC抽取滤波器的一个重要特征是:在N一定的情况下,对于不同的抽取率R,滤波器响应的形状变化很小,如图figure 10b所示。当R大于16时,变化可以忽略不计。因此不同抽取率的系统可以用同样的补偿FIR滤波器。 CIC滤波器在每个积分部分有unity feedback,因此它遭受寄存器溢出之扰。不过只有满足下面2个条件,溢出没有影响。 · the range of the number system is greater than or equal to the maximum value expected at the output, and · the filter

22、 is implemented with two's complement (nonsaturating) arithmetic. 因为一阶CIC滤波器在0Hz(DC)的增益D = NR , M cascaded CIC decimation filters have a net gain of (NR )M .每一级积分器必须增加NR bits width. 插值CIC滤波器在每2个采样值之间插入零,这降低了增益,因子为1/R , 因此插值CIC滤波器的整体增益为(NR )M /R . 因为必须用整数运算,每一级字宽必须要能够容纳这一级的最大信号(full-scale输入乘以增益)。

23、虽然 Mth-order CIC decimation filter 得增益是(NR )M ,individual integrators can experience overflow. (Their gain is infinite at DC.) As such, the use of two's complement arithmetic resolves this overflow situation just so long as the integrator word width accommodates the maximum difference between any tw

24、o successive samples (in other words, the difference causes no more than a single overflow). Using the two's complement binary format, with its modular wrap-around property, the follow-on comb filter will properly compute the correct difference between two successive integrator output samples. 对于插

25、值器,字宽在每一级comb滤波器会增加一个bit,因为积分器具有的累积特性,必须避免溢出。因此,必须在每一级comb滤波器增加一个bit的字宽给插值用。也可以不增加字宽而是丢弃每一级comb滤波器的LSB,这样会增加滤波器输出的noise. Compensation filters 在典型的抽取/插值滤波器应用中,我们需要滤波器具有合理的平坦的通带和窄的过渡带。CIC滤波器自身不能够满足这样的需求,因为它的弯曲的通带增 益和宽的过渡带。例如在抽取器中,在CIC滤波器之后级联一个补偿非递归FIR滤波器可以缓解这个问题,如figure 1a所示。 Figure 11: Compensa

26、tion FIR filter responses; with a 1st-order decimation CIC filter; with a 3rd-order decimation Figure 11a: 简单的3-tap FIR滤波器 [-1/16, 9/8, -1/16]. 来补偿1st-order R = 8 CIC filter。 Figure 11b:15-tap compensation FIR filter having the coefficients [-1, 4, -16, 32, -64, 136, -352, 1312, -352, 136, -64, 3

27、2, -16, 4, -1]来补偿 3rd-order R = 8 CIC filter. Those dashed curves in Figure 11 represent the frequency magnitude responses of compensating FIR filters within which no sample-rate change takes place. (The FIR filters' input and output sample rates are equal to the ƒs ,out output rate of the decimat

28、ing CIC filter.) If a compensating FIR filter were designed to provide an additional decimation by two, its frequency magnitude response would look similar to that in Figure 12, where > s ,in is the compensation filter's input sample rate. Figure 12: Frequency magnitude response of a decimate-by

29、2 compensation FIR filter Advanced techniques 抽取CIC滤波器只不过是滑动平均滤波器的一个非常高效的迭代实现,有NR taps, 其输出再进行 R 抽取 . 同样,插值CIC滤波器在每两个输入采样之间插入R -1个0,然后通过一个NR -tap的工作在输出采样率ƒs ,out 的滑动平均滤波器。对于高采样率转换率的抽取和插值来说,Figure 1所示的级联形式的计算量大大低于单一FIR滤波器的计算量。 下图与figure 9a相同,下面是下图中两种方式的matlab实现 % For decimation, having the C

30、IC filtering before taking every other sample D = 2; % decimation factor N = 10; % delay buffer depth delayBuffer = zeros(1,N); % init intOut = 0; xn = sin(2*pi*[0:.1:10]); y6n = []; for ii = 1:length(xn) % comb section combOut = xn(ii) – delayBuffer(end); delayBuffer(2:end) = de

31、layBuffer(1:end-1); delayBuffer(1) = xn(ii); % integrator intOut = intOut + combOut; y6n = [y6n intOut]; end y6n = y6n(1:D:end); % taking every other sample – decimation % For efficient hardware implementation of the CIC filter, having the % integrator section first, decimate, then t

32、he comb stage % Gain : Reduced the delay buffer depth of comb section from N to N/D D = 2; % decimation factor N = 10; % delay buffer depth delayBuffer = zeros(1,N/D); intOut = 0; xn = sin(2*pi*[0:.1:10]); % input y7n = []; % output for ii = 1:length(xn) % integrator intOut = int

33、Out + xn(ii); if mod(ii,2)==1 % comb section combOut = intOut – delayBuffer(end); delayBuffer(2:end) = delayBuffer(1:end-1); delayBuffer(1) = intOut; y7n = [ y7n combOut]; end end err67 = y6n – y7n; err67dB = 10*log10(err67*err67′/length(err67)) 下图跟figure 9b相同,下面是下图2中形式的matlab实现

34、 % For interpolation, insert the zeros followed by CIC filtering xn = sin(2*pi*[0:.1:10]); I = 2; % interpolation factor N = 10; % filter buffer depth xUn = [xn; zeros(1,length(xn))]; xUn = xUn(:).’; % zeros inserted delayBuffer = zeros(1,N); intOut = 0; for ii = 1:length(xUn) %

35、 comb section combOut = xUn(ii) – delayBuffer(end); delayBuffer(2:end) = delayBuffer(1:end-1); delayBuffer(1) = xUn(ii); % integrator intOut = intOut + combOut; y4n(ii) = intOut; end % For efficient hardware implementation of CIC filter for interpolation, having % the comb section,

36、 then zeros insertion, followed by integrator section % Gain : Reduced the delay buffer depth of comb section from N to N/I I = 2; % interpolation factor N = 10; % original delay buffer depth delayBuffer = zeros(1,N/I); % new delay buffer of N/I intOut = 0; xn = sin(2*pi*[0:.1:10]); y5

37、n = []; for ii = 1:length(xn) % comb section combOut = xn(ii) – delayBuffer(end); delayBuffer(2:end) = delayBuffer(1:end-1); delayBuffer(1) = xn(ii); % upsampling combOutU = [ combOut zeros(1,1)]; for jj =0:I-1 % integrator intOut = intOut + combOutU(jj+1); y5n = [y5n intOut]; end end err45 = y4n – y5n; err45dB = 10*log10(err45*err45′/length(err45)) % outputs matching

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服