Скачать презентацию

Идет загрузка презентации. Пожалуйста, подождите

Презентация была опубликована 3 года назад пользователемАнна Шидловская

1 Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Infinite Impulse Response (IIR) Filter Implementation

2 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 2 IIR Filters Rational Z transfer function Rational Z transfer function Linear difference equation Linear difference equation

3 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 3 IIR Filters – Poles and Zeros Roots of the numerator Roots of the numerator Roots of the denominator Roots of the denominator r i are the roots of the z polynomial with b i coefficients. H(z) is null when z is equal to one of the values. They are called the zeroes of the filter and often noted by z i. r i are the roots of the z polynomial with a i coefficients. H(z) tends to infinity when z is close to one of these values. They are called the poles of the filters and often noted by p i.

4 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 4 Z Transfer Function Define frequency behaviour of the filter Define frequency behaviour of the filter Consider a first order z rational filter: Consider a first order z rational filter: H(z) can be evaluated for each value n from 0 to 1 with 1 corres- ponding to sampling frequency magnitudephase

5 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 5 Z Transfer Function We obtain the transfer function by evaluation of the z transform on the unit circle We obtain the transfer function by evaluation of the z transform on the unit circle We can see that it is a minimum phase filter (the phase comes back at 0 at F e /2) because the zero of the filter is inside the unit circle. We can see that it is a minimum phase filter (the phase comes back at 0 at F e /2) because the zero of the filter is inside the unit circle.

6 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 6 IIR Filter Synthesis Starting from frequency specifications (here low pass filter): Starting from frequency specifications (here low pass filter): F pass : passband end frequency, F pass : passband end frequency, F stop : stopband start frequency, F stop : stopband start frequency, A pass : maximum passband ripple, A pass : maximum passband ripple, A stop : minimum stopband attenuation. A stop : minimum stopband attenuation.

7 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 7 IIR Filters Synthesis Analog prototype with analog to digital transformation (bilinear transform) : Analog prototype with analog to digital transformation (bilinear transform) : Digital to analog frequency specification transformation using prewarping Digital to analog frequency specification transformation using prewarping Analog filter prototype Analog filter prototype Analog transfer function to digital transfer function transformation using bilinear transform. Analog transfer function to digital transfer function transformation using bilinear transform. Direct digital method : Yule Walker Direct digital method : Yule Walker Try to find the recursive filter of order N which is as close as possible to the frequency specifi- cations using the least square optimization method. Try to find the recursive filter of order N which is as close as possible to the frequency specifi- cations using the least square optimization method.

8 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 8 IIR Filters Synthesis Bilinear transform : Bilinear transform : One to one map of analog frquencies to digital frequencies. One to one map of analog frquencies to digital frequencies. Based on the approximation of the continuous integral operator by the trapezoïdal method. Based on the approximation of the continuous integral operator by the trapezoïdal method. Laplacetransform Ztransform Equating integral operators, we get the bilinear transform.

9 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 9 IIR Filters Synthesis Characteristics frequencies (F p, F a ) of the target specifications have to be warped. Characteristics frequencies (F p, F a ) of the target specifications have to be warped. This warped specifications is used to compute an analog prototype using approximation functions : This warped specifications is used to compute an analog prototype using approximation functions : Butterworth Butterworth Chebyshev I Chebyshev I Chebyshev II Chebyshev II Elliptic Elliptic Then the analog prototype is tranformed into a digital filter that matches target frequency specification thanks to Bilinear Transform (BT) (this cancels the warping introduce at the first step). Then the analog prototype is tranformed into a digital filter that matches target frequency specification thanks to Bilinear Transform (BT) (this cancels the warping introduce at the first step).

10 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 10 IIR Characteristics Butterworth filters : Butterworth filters : Defined by its order N and its cut-off frequency f p. Defined by its order N and its cut-off frequency f p. Monotonic magnitude transfer function. Monotonic magnitude transfer function. Matlab commands: buttord : estimate the needed order buttord : estimate the needed order butter : compute the digital filter from butter : compute the digital filter from analog prototype using warping and BT, given the order and cut-off frequency. Sample Matlab code Sample Matlab code

11 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 11 IIR Characteristics Chebyshev I filters : Chebyshev I filters : Defined by its order N, its passband corner Defined by its order N, its passband corner frequency f p and its passband ripple. Ripple in passband and monotonic in stopband. Ripple in passband and monotonic in stopband. Matlab commands: cheb1ord : estimate the needed order cheb1ord : estimate the needed order cheby1 : compute the digital filter from cheby1 : compute the digital filter from analog prototype using warping and BT, Given the order and passband ripple and Corner frequency. Sample Matlab code Sample Matlab code T N ( ) is a Chebyshev polynomial of order N

12 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 12 IIR Characteristics Chebyshev II filters : Chebyshev II filters : Defined by its order N, its stopband edge Defined by its order N, its stopband edge frequency f s and its stopband attenuation. Monotonic in passband and ripple in stopband. Monotonic in passband and ripple in stopband. Matlab commands: cheb2ord : estimate the needed order cheb2ord : estimate the needed order cheby2 : compute the digital filter from cheby2 : compute the digital filter from analog prototype using warping and BT, Given the order and stopband attenuation and edge frequency. Sample Matlab code Sample Matlab code T N ( ) is a Chebyshev polynomial of order N

13 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 13 IIR Characteristics Elliptic filters : Elliptic filters : R N ( ) is a Chebyshev rationnal polynomial of order N Defined by its order N, its passband and stopband Defined by its order N, its passband and stopband edge frequencies, f p and f s, its passband ripple and its stopband attenuation. Ripple in passband and in stopband. Ripple in passband and in stopband. Matlab commands: ellipord : estimate the needed order ellipord : estimate the needed order ellip : compute the digital filter from ellip : compute the digital filter from analog prototype using warping and BT, given the order, passband ripple, stopband attenuation and center frequency. Sample Matlab code Sample Matlab code

14 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 14 IIR Characteristics Group delay Group delay Characterize the phase distorsion (waveform distorsion) introduced by the filter. Characterize the phase distorsion (waveform distorsion) introduced by the filter.

15 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 15 IIR structure Derived from difference equation Derived from difference equation z -1 b1b1b1b1 b0b0b0b0 b2b2b2b2 b3b3b3b3 b Q-1 -a 1 -a 2 -a 3 -a Q-1 xnxnxnxn ynynynyn non canonical form non canonical form Direct form I

16 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 16 IIR structure z -1 b1b1b1b1 b0b0b0b0 b2b2b2b2 b3b3b3b3 b Q-1 -a 1 -a 2 -a 3 -a Q-1 ynynynyn Direct form II Canonical form Canonical form xnxnxnxn

17 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 17 IIR structure Transposed direct form II b2b2b2b2 b3b3b3b3 b Q-1 -a 1 -a 2 -a 3 -a Q-1 xnxnxnxn Canonical form Canonical form z -1 b1b1b1b1 b2b2b2b2 ynynynyn

18 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 18 IIR – Coefficients quantization Finite precision of DSP involves coefficients quantization: Finite precision of DSP involves coefficients quantization: Let consider the denominator of the transfer function with, the k th quantized coefficients and a k the quantification error. Quantized denominator is then: The resulting quantified poles will disrupt the transfer function. The higher order the polynomial is, the greater will be pertubation on its roots due to quantization. Following slides illustrate this fact: Next slide shows the transfer function of a 6 th order direct form filter for different quantification. Next slide shows the transfer function of a 6 th order direct form filter for different quantification. Following one shows the transfer function obtained for the same filter and same quantificaiton, but with a cascade structure of second order section, this last structure is much less sensitive to quantization than the previous one. Following one shows the transfer function obtained for the same filter and same quantificaiton, but with a cascade structure of second order section, this last structure is much less sensitive to quantization than the previous one.

19 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 19 Direct structure

20 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 20 Cascade structure of second order section

21 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 21 IIR structure This sensitivity to coefficients quantization leads to second order cascade or parallel form. This sensitivity to coefficients quantization leads to second order cascade or parallel form. Second order section is chosen to get the least order together with complex conjugated roots. Second order section is chosen to get the least order together with complex conjugated roots. 4 th order example: Parallel form xnxnxnxn ynynynyn Cascade form Partial fraction expansion c0c0 xnxnxnxn ynynynyn Spectral factorisation

22 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 22 IIR – Cascade structure Cascade structure involves addressing two problems : Cascade structure involves addressing two problems : Pairing: which zeros with which poles to form a second order rational transfer function. Pairing: which zeros with which poles to form a second order rational transfer function. The goal will be minimize the overshoot caused by the poles. Ordering: which second order section will be ahead and which one will be the last. Ordering: which second order section will be ahead and which one will be the last. To answer to this question we will have consider quantification noise and the way to minimize it.

23 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 23 IIR – case study 1 Consider the following specification: Consider the following specification: Using inverse Chebyshev approximation, we get a 6 th order filter (matlab commands) Using inverse Chebyshev approximation, we get a 6 th order filter (matlab commands) [N,Wn]=CHEB2ORD(1800/8000,4000/8000,0.01,50);[B,A]=CHEBY2(N,50,Wn)

24 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 24 IIR – case study 2 Actual transfer function is obtained with: freqz(B,A) Plot of poles and zeros with: zplane(A,B) Pairing: complex conjugate poles closest to the unit circle (responsible for the greatest overshoot) are paired with complex conjugate zeros closest in frequency (angle on unit circle). Then the process iterate with the next complex conjugate closest to the unit circle. This done with the following routine routine 123

25 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 25 IIR – data quantization z -1 b1b1b1b1 b0b0b0b0 b2b2b2b2 -a 1 -a 2 ynynynyn xnxnxnxn Direct form II one noise source b2b2b2b2 -a 1 -a 2 xnxnxnxn b1b1b1b1 z -1 b2b2b2b2 ynynynyn Transposed direct form II two noise sources For DSP, quantification noise appear when we truncate the accumulator to store its high part. (e n equivalent noise source) enenenen enenenen Output noise power is reduced by the ENB of the complete filter Output noise power is only reduced by the ENB of the denominator

26 Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 26 IIR - computation Evaluation of an order 2 direct form II is as follows : Evaluation of an order 2 direct form II is as follows : ACC=x(n) ACC=x(n) ACC=ACC - a 1 w(n-1) ACC=ACC - a 2 w(n-2) ACC<<2 w(n)=ACCH ACC=w(n) b 0 ACC=ACC + b 2 w(n-2) ACC=ACC + b 1 w(n-1) ACC<<2 y(n)=ACCH w(n-2)=w(n-1) w(n-1)=w(n) Q29=Q15 Q14 Q29=Q29 - (Q15 Q14) Q31=Q Q15 Q29=Q15 Q14 Q29=Q29 + (Q15 Q14) Q31=Q Q15

Еще похожие презентации в нашем архиве:

Подбираем похожую презентацию...

Готово:

Convolutional Codes Mohammad Hanaysheh Mahdi Barhoush.

Convolutional Codes Mohammad Hanaysheh Mahdi Barhoush.

© 2019 MyShared Inc.

All rights reserved.