Chapt6_第1页
Chapt6_第2页
Chapt6_第3页
Chapt6_第4页
Chapt6_第5页
已阅读5页,还剩35页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Chapter 6. Digital Filter Structures,Gao Xinbo School of E.E., Xidian Univ. /teach/matlabdsp/,Introduction,In earlier chapters we studied the theory of discrete systems in both the time and frequency domains. We will now use this theory for the processing of digital signals. To process signals, we have to design and implement systems called filters. The filter design issue is influenced by such factors as The type of the filter: IIR or FIR The form of its implementation: structures Different filter structures dictate different design strategies.,Introduction,IIR filters are characterized by infinite-duration impulse response. Some of these impulse responses can be modeled by Rational system functions Difference equations ARMA or recursive filters We will treat FIR filter separately from IIR filters for both design and implementation purposes.,Introduction,Since our filters are LTI systems, we need the following three elements to describe digital filter structures. Adder Multiplier (Gain) Delay element (shift or memory),IIR Filter Structures,The system function of an IIR filter is given by,The order of such an IIR filter is called N if aN=0. The difference equation representation of an IIR filter is expressed as,Three different structures can be used to implement an IIR filter:,Direct form In this form, there are two parts to this filter, the moving average part and the recursive part (or the numerator and denominator parts) Two version: direct form I and direct form II Cascade form The system function H(z) is factored into smaller second-order sections, called biquads. H(z) is then represented as a product of these biquads. Each biquad is implemented in a direct form, and the entire system function is implemented as a cascade of biquad sections. Parallel form H(z) is represented as a sum of smaller second-order sections. Each section is again implemented in a direct form. The entire system function is implemented as a parallel network of sections.,Direct Form I Structure,As the name suggests, the difference equation is implemented as given using delays, multipliers, and adders. For the purpose of illustration, Let M=N=2,Direct Form II Structure,Direct Form II structure,The commutative law of the convolution,Matlab Implementation,In Matlab the direct from structure is described by two row vectors: b containing the bn coefficients and a containing the an coefficients. The structure is implemented by the filter function, which is discussed in Chapter 2.,Cascade Form,In this form the system function H(z) is written as a product of second-order section with real coefficients. This is done by factoring the numerator and denominator polynomials into their respective roots and then combining either a complex conjugate root pair or any two real roots into second-order polynomials.,Cascade Form,We assume that N is an even integer. Then,Where, K is equal to N/2, and Bk,1, Bk,2, Ak,1, Ak,2 are real numbers representing the coefficients of second-order section.,Biquad Section,Is called the k-th biquad section. The input to the k-th biquad section is the output from the (k-1)-th section, while the output from the k-th biquad is the input to the (k+1)-th biquad. Each biquad section can be implemented in direct form II.,The entire filter is then implemented as a cascade of biquads,Cascade form structure for N=4,Matlab Implementation,Given the coefficients bn and an of the direct form filter The function b0,B,A = dir2cas(b,a) can be used to obtain the coefficients b0, Bk,i, and Ak,i. The cascade form is implemented using a casfiltr function Function y = casfiltr(b0,B,A,x) Function cas2dir converts a cascade form to a direct form. Function b,a = cas2dir(b0,B,A) Examples: 6.1,Parallel Form,In this form the system function H(z) is written as a sum of second-order section using partial fraction expansion.,K=N/2, and B,A are real numbers,The second-order section,Is the k-th proper rational biquad section. The filter input is available to all biquad section as well as to the polynomial section if M=N (which is an FIR part) The output from these sections is summed to form the filter output. Each biquad section can be implemented in direct form II.,Parallel form structure,Parallel form structure for N=4 (M=N=4),Matlab Implementation,The function dir2par converts the direct form coefficients bn and an into parallel form coefficients Bk,i and Ak,i Functions: C,B,A = dir2par(b,a) I = cplxcomp(p1,p2) y = parfiltr(C,B,A,x) b,a = par2dir(C,B,A) Examples,FIR Filter Structure,A finite-duration impulse response filter has a system function of the form:,Hence the impulse response h(n) is,And the difference equation representation is,Which is a linear convolution of finite support. The order of the filter is M-1, while the length of the filter is M.,FIR Filter Structure,Direct form: The difference equation is implemented as a tapped delay line since there are no feedback paths. Figure 6.10 Note that since the denominator is equal to unity, there is only one direct form structure. Matlab implementation Function: y = filter(b,1,x),FIR Filter Structure,Cascade form: Figure 6.11 Matlab Implementation Function: dir2cas, cas2dir,FIR Filter Structure,Linear-phase form For frequency-selective filters (e.g., lowpass filters) it is generally desirable to have a phase response that is a linear function of frequency. That is For a causal FIR filter with impulse over 0,M-1 interval, the linear-phase conditions,Symmetric impulse response vs. antisymmetric impulse response,Linear-phase form,Consider the difference equation with a symmetric impulse response. Figure 6.12: M=7(odd) and M=6(even) Matlab implementation The linear-phase structure is essentially a direct form draw differently to save on multiplications. Hence in a Matlab implementation the linear-phase structure is equivalent to the direct form.,Frequency Sampling Form,In this form we use the fact that the system function H(z) of an FIR filter can be reconstructed from it samples on the unit circle,It is also interesting to note that the FIR filter described by the above equation has a recursive form similar to an IIR filter because it contains both poles and zeros.,Frequency Sampling Form,The system function leads to a parallel structure as shown in Figure 6.15 for M=4. One problem with the structure in Fig.6.15 is that it requires a complex arithmetic implementation. Using the symmetry properties of the DFT and the (WMk) factor.,let p1=WM-k=exp(-j*2*pi*k/M) =cos(2*pi*k/M)+jsin(2*pi*k/M) Hk=magHk*exp(j*phaHk) =magHk*(cos(phaHk)+jsin(phaHk) Then:,Figure 6.16,MATLAB functions and Examples,Notify the structure type C,B,A=dir2fs(h) of textbook A practical problem: unstable, avoid this problem by sampling H(z) on a circle |z|=r. Ex6.6 find frequency sample form Ex6.7 In this example the frequency sample form has less computational complexity than direct form.,Lattice Filter Structure,The lattice filter is extensively used in digital speech processing and in implementation of adaptive filter. It is a preferred form of realization over other FIR or IIR filter structures because in speech analysis and in speech synthesis the small number of coefficients allows a large number of formants to be modeled in real-time. All-zeros lattice is the FIR filter representation of the lattice filter. The lattice ladder is the IIR filter representation.,All-zero Lattice Filters,An FIR filter of length M (or order M-1) has a lattice structure with M-1 stages.,Km: reflection coefficients,All-zero lattice filters,If the FIR filter is given by the direct form,And if we denote the polynomial,Then the lattice filter coefficients Km can be obtained by the following recursive algorithm,Note that the above algorithm will fail if |Km|=1 for any m. Clearly, this condition is satisfied by the linear-phase FIR filter. Therefore, linear-phase FIR filter cannot be implemented using lattice structure.,Matlab Implementation,Functions: K = dir2latc(b) y = latcfilt(K,x) b = latc2dir(K) Example 6.8,All-pole Lattice Filter,A lattice structure for an IIR filter is restricted to an all-pole system unction. It can be developed from an FIR lattice structure. This IIR filter of order N has a lattice structure with N stages as shown in Fig.6.20. Each stage of the filter has an input and output that are related by the order-recursive equations.,All-pole Lattice Filter,Matlab Implementation,Function K = dir2latc(a) Care must be taken to ignore the K0 coefficient in the K array. Function a = latc2dir(K) K0=1,Lattice ladder Filters,A general IIR filter containing both poles and zeros can be realized as a lattice-type structure by using an all-pole lattice as the basic building block. Consider an IIR filter with system function Where, without loss of generality, we assume that N=M,Lattice ladder Filters,A lattice type s

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论