cic滤波器学习笔记

上传人:第*** 文档编号:99355704 上传时间:2019-09-18 格式:DOCX 页数:16 大小:389.97KB
返回 下载 相关 举报
cic滤波器学习笔记_第1页
第1页 / 共16页
cic滤波器学习笔记_第2页
第2页 / 共16页
cic滤波器学习笔记_第3页
第3页 / 共16页
cic滤波器学习笔记_第4页
第4页 / 共16页
cic滤波器学习笔记_第5页
第5页 / 共16页
点击查看更多>>
资源描述

《cic滤波器学习笔记》由会员分享,可在线阅读,更多相关《cic滤波器学习笔记(16页珍藏版)》请在金锄头文库上搜索。

1、学习笔记: CIC filter及其matlab实现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 filter in Matlab http:/ 3 Digital Signal Processing Principles, Algorithms and Applications

2、 , John G. Proakis, Dimitris G. ManolakisCIC数字滤波器是窄带低通滤波器的高计算效率的实现形式,常常被嵌入到现代通信系统的抽取和插值模块的硬件实现中。CIC filter 应用 CIC滤波器非常适合用作抽取之前的抗混迭滤波和插值之后的抗镜像滤波。这两种应用都跟very high-data-rate滤波有关,例如现代无线系统中硬件正交调制和解调,以及delta-sigma A/D 和 D/A 转换器。Figure 1: CIC filter applications 因为CIC滤波器的幅频响应包络象sin(x)/x,通常在CIC滤波器之前或者之后都有一个

3、high-performance linear-phase lowpass tapped-delay-line FIR filters, 用于补偿CIC滤波器不够平坦的通带。CIC滤波器不需要乘法运算,易于硬件实现。抽取CIC滤波器只不过是滑动平均滤波器的一个非常高效的迭代实现,有NR taps, 其输出再进行 R 抽取 . 同样,插值CIC滤波器在每两个输入采样之间插入R -1个0,然后通过一个NR -tap的工作在输出采样率s ,out 的滑动平均滤波器。对于高采样率转换率的抽取和插值来说,Figure 1所示的级联形式的计算量大大低于单一FIR滤波器的计算量。Recursive runn

4、ing-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 2b: 迭代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

5、(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的话,递归形式只需要一个加法和一个减法运算。例子: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

6、*T*n)=f=1Hz, fs=10Hz. hn = ones(1,N); %脉冲响应 y1n = conv(xn,hn); % transfer function of Moving Average filter hF = fft(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 Casc

7、aded Integrator Comb filter with the % comb section following the integrator stage N = 10; 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); % integ

8、rator intOut = intOut + combOut; y2n(ii) = intOut; end err12 = 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

9、 = zeros(1,N); intOut = 0; xn = sin(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*log1

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

11、阶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 = 51阶CIC滤波器的频率响应,Equation 7在单位圆上的z变换:Equation 8Equation 9

12、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 filters frequency magnitude response is approximately equal to a sin(x )/x function centered at 0Hz as we see in Figure 4a. (This is why CIC filters are sometimes ca

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

14、gnitude 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 CIC filters is the spectral folding that takes place due to decim

15、ation.假设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 ,in /8 的整数倍为中心频率,宽度为 s ,in /8 的频谱都会混迭到 下采样后的信号频带内。虽然下采样后信号的s ,in /8 频带都被混迭了,由于我们真正关心的是以0hz为中心,带宽为B的一段频带,在这个频带外的频谱不需要考

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号