Presentation is loading. Please wait.

Presentation is loading. Please wait.

IIR based Digital Filters:

Similar presentations


Presentation on theme: "IIR based Digital Filters:"— Presentation transcript:

1 IIR based Digital Filters:
The design uses the analog prototype of given specifications. For the given specifications, IIR filters yield much smaller order of the filter. Hence requires much less number of elements. Appropriate mapping and spectral transformation is carried out to result in a desired digital filter.

2 The object is to: Investigate the relationship between
s- and z- domains. Workout the equivalence of analog and digital systems. To study the different mapping rules and response matching.

3 Equivalence of analog and digital systems:
The approximate continuous time domain impulse response h(t) at the sampling interval ts (=1/fs) is: h(t)  ha(t) = tsh(t) (t-kts) = ts  h(kts) (t-kts); k =[-, ]. For the normalized sampled time impulse response, the sampling period ts is 1s and replacing t by n : hs[n] =  hs[k] [n-k] for k =[-, ].

4 Equivalence of analog and digital systems:
For k  [-, ], the Laplace transform of ha(t)= ts  h(kts) (t-kts) is H(s)  Ha(s) = ts  h(kts) exp(-sts)k and z-transform H(z) of normalized hs[n] is: hs[n] =  hs[k] [n-k] is Hd(z) =  hs[k]z-k

5 Equivalence ….. Thus for zk = exp(skts), Ha(s) = ts Hd(z)
the conditions can be rewritten as z exp(sts) and s  ln(z)/ts. These relationships describe a mapping between variables s and z: z = exp(j)ts = exp(ts) exp(jts) = exp(ts) exp(j) Here  = ts = 2f/fs = 2F, where F is the digital frequency in cycles/sample ts is the sampling rate per second  is the analog frequency in radians per second..

6 …..and mapping The DTFT of hs[n] has a periodic spectrum.
Therefore ensure that the analog signal h(t) is strictly band-limited and moreover, to obliterate aliasing, is sampled much above the Nyquist rate The normalized band of frequency should lie well within the principal period of Hp(f) –0.5 F  0.5.

7 aliasing revisited: The relationships z exp(sts)  s  ln(z)/ts
does not describe a unique mapping between the s-plane and the z-plane. Since exp(j) has a period of 2; frequencies beyond , such as   kfs are also mapped on the same circle after k . Thus a one to one mapping is possible only if the signal is restricted in the range f/fs= F = 0.5. Im z Re z z-plane -1 1 j s-plane 3/T /T -/T -3/T

8 Notes … The logarithmic nature of the transformation
s  ln(z)/ts, being a infinite series,,does not convert a rational TF H(s) into a rational TF H(z). The unique representation is true only for band limited signals, those lie well within the principal range. The spectra of such band limited signal repeats at every sampling frequency. If the signal is not band-limited, it will cause inherent aliasing (introduction of corrupted signal in the principal region).

9 Notes…. We need to study the practical mappings. The methods are:
Use of standard z-transform: Equivalent finite element integrators. Other methods (not discussed) w-v transform z-forms etc.

10 Use of standard z-transform
Impulse invariant filters and Matched z-transform filters These filters use standard z-transform. Therefore the intelligence has to be band limited. The Impulse invariant filter preserves time response. The Matched z-transform filters preserves frequency response. Aliasing is severe. Use high sampling rate.

11 Equivalent Integrator: The basic philosophy:
The simulation element in signal processing is Integrator. It is (1/s) in Laplace Transform. Different numerical methods of integration are used to create equivalence. They are grouped as : Backward difference, Forward difference, Trapezoidal integration, Simpson’s integration. [not used,increases the order of filter] “ Philips CL,+ Nagle HT, “ Digital Control System Analysis and Design” 3/e, PH Ch.11

12 Backward Difference: (right side rectangular rule)
Difference of present and the past sample. y[t] = y(t) – y(t-T) It’s Laplace transform: sY(s) = [Y(s) – e-sTY(s)]/T + Y(0+) letting Y(0+)=0, we get: s = (1- e-sT)/T = (1-z-1)/T Or, z = 1/(1-Ts) = ½ [(1-sT)+(1+sT)]/(1-sT) = ½ [(1- (1+sT)/(1-sT)]; It is not the z transform of 1/s 1/s = T/(1-z-1)

13 Backward Difference: (right side rectangular rule)
z = ½ [(1- (1+sT)/(1-sT)]; replacing s = j returns: = ½ [1+ e j2arctan(T)] = ½ [1+ej]. Mapping left half of j axis of s-plane into a circle of radius ½ centered at (½ ,0) in z plane. The region enclosed is very small. If our frequency extends little beyond s=0 or, z=1, there will be severe distortion. Sampling Frequency should be increased to improve the performance.

14 Forward Difference: left side rectangular rule
It is the difference between present pulse and forth coming pulse. y[t] =[y(t+T)- y(t)]/T It’s Laplace transform: s = (z-1)/T z = 1+Ts = 1+ jT This mapping only shifts j axis to right by 1. It can make a stable filter into unstable one.

15 forward difference integration and Left side rectangular integration.
In literature: Same mapping rule for Impulse Invariance Integrator, backward difference Integration and right side rectangular integration. Step invariance Integrator, forward difference integration and Left side rectangular integration.

16 Bilinear z-transform Mapping
It does not require band limitation. Pre warping of analog frequency is essential before bilinear z-transformation for suitable matching of frequency response. Most suitable for polynomial based flat response filters. Uses Trapezoidal Integration rule.

17 Algorithms for Bilinear Transformation
This transformation follows the trapezoidal interpolation rule, or, Tustin’s rule, and is represented by the numerical integration algorithm: y[n] = y[n-1] + (ts /2){x[n] + x[n-1]}. So that: H(z) = 0.5 ts [z+1]/[z-1] And equating with integration rule in s-domain. H(s)  1/s. Thus s = (2/ts){(z–1) / (z+1)}

18 The time-response matching
The idea behind response matching is to match the time-domain analog and digital response at the sampling instants t = ts for a given input. One way to achieve the response is as under. t-domain input  s-domain input  analog filter in s-domain input ts Input X[z] hence: H[z] = Y[z]/X[z]. output in s-domain output in t-domain output ts output Y[z] The example below will illustrate that the H[z] is excitation specific.

19 Time response matching…

20 the sampled version is y(nT) = e-nTU[n] .
Example 10.01 Convert analog filter of transfer function H(s) = 1/(s+1) into a digital filter H[z] for (a) impulse input (b) unit step input. Soln: (a) Impulse input : x(t) = (t)  X(s) = 1; H(s) = 1/(s+1), output Y(s) = 1/(s+1) or, y(t) = e-t U(t). the sampled version is y(nT) = e-nTU[n] . And at n=0, y(nT) = 1.

21 Example 7.01 Letting sampling time ts = 1, for impulse input, we get
H[z] =Z e-nTU[n] =1/[1-e-1z-1] =1/[ z-1]. We thus note: The DC gain H[z=1] = while it at H(s=0) =1. This increase is solely due to aliasing. Even if the DC gain is normalized, the frequency characteristics does not match. It is shown in Magnitude plot of Fig (a) and (b). This can be remedied by higher rate of sampling. But it makes it unsuitable for HP and BP filters.

22 Normalized amplitude response:

23 Phase response

24 Time response of Impulse Invariance digital filters and equivalent analog filter:
 note similarity in time response.

25 Response with step input:
Step response of the filter H[z] = z / [z ] is Y[z] = z2 / [z-1][z – ] Inverse Z-transform is y[n] = U[n]–0.214 (0.3679)-n U[n] =1.5820[ (0.3679)-n]U[n].

26 Magnitude-frequency response for step input

27 Remarks on impulse invariant method:
Comparison of response in analog domain filters and impulse invariant method in digital domain while the frequency and phase plots are not alike, the time response at the sampling intervals is same in analog and impulse invariant digital filters the time response is remarkably different from its analog counterpart for step input. This clearly illustrates that this scheme is excitation specific.

28 Why Bilinear Transformation
Due to high rate of sampling, Impulse invariant filters (IIF) are not suitable for high pass/band reject/all-pass modes while matched-z filters can not realize LPF. Frequency response does not match with those of analog filters in IIF while there is a distortion in matched-z. Aliasing problem in both cases.

29 Bilinear Transformation
Alternatively a transformation is attempted which converts 0 to 2 change in   [0 to ]. Thus the circle of z-domain is converted onto entire j-axis with one to one mapping. This eliminates the aliasing problem. It is BILINEAR TRANSFORMATION

30 s- and z- planes mapping- we want

31 The relationship between analog and digital frequency :
s = (2/ts)[(z-1)/(z+1)] Putting s = j , and z = ej j= (2/ts)[(ej -1) / (ej +1)] =(2/ts)[{ej/2 (ej/2 – e-j/2)} / {ej/2(ej/2+ e-j/2)}] =(2/ts)[(ej/2 – e-j/2)/ (ej/2+ e-j/2)] =j (2/ts)sin(/2)/cos(/2) Or,  = (2/ts)tan(/2)   = 2 tan-1(ts/2)

32 Frequency Warpage in BLT:
The graph between  and  for ts=1, red color, is non-linear implying that the warpage has been introduced in the frequency translation. Blue color graph for  is drawn for understanding.

33 Working out frequency in BLT:
 = (2/ts)tan(/2) and  = 2 tan-1(ts/2) The above is a non linear or warped characteristic. It has one to one mapping between s and z domains. For ; /2. To undo this frequency warping, we pre-warp the analog frequency   p in s-plan so that: pts/2 = tan(ts/2).

34 Linearization of relationship
After frequency prewarping pts/2 = tan(ts/2) The Digital frequency becomes: = 2 tan-1(p ts/2) = 2 tan-1 tan(ts/2) = (2/ts)(ts/2); we get a linear relation:  = .

35 Therefore we can individually use: s = (z-1)/(z+1)
More over due to carrying out the prewarping, the term 2/ts turns out to be redundant as it cancels out in calculations. Therefore we can individually use: s = (z-1)/(z+1) p = (2/ts)tan(ts/2). Or, combining the two: s = cot (ts/2) (z-1)/(z+1) . [Ifeacher et al,”Digital signal Processing’ 2/e, Prentice Hall, pp

36 1. Bilinear Transformation Method:
Example: Using un-prewarped bilinear transformation and impulse invariance technique synthesize: H(s) = c /(s+c ), c = 105. 1. Bilinear Transformation Method: Putting the transformation s =(2/ts)[(z-1) / (z+1)]; we get; H[z} = c/[(2/ts)[(z-1) / (z+1)] )+ c] = cT(z+1)/(2+cT)z – (2 -cT). Selecting the value of T such that T << /c say = 0.1/c, H[z] = (z +1)/[z ] Lathi B.P.,”Signal Processing and Linear Systems” 1998, Oxford

37 Ex. 9.02 contd. Thus |H(ejT)| =
0.024(1+cos (10-6)/( cos(10-6) and  H(e jT) = tan-1[sin(10-6)/ [1+ cos(10-6)] - tan-1[sin(10-6)/[cos(10-6) ].

38 Ex. 9.03: Bilinear transformation method without pre-warping
H(s) = (s+0.1)/{(s+0.1)2 +9} replace s by (2/T) {(z-1)/(z+1)}, H(z) = 0.1077{(z z – 0.82) / (z z )}

39 Ex.9.03: Magnitude plots

40 Ex.9.03: Phase Plots

41 The sampling time, given that b = c= 3;
Ex : Design an IIR digital filter for the TF of analog filter given as: H(s) = (s+a)/{(s+a)2 + b2}. where [a,b] =[0.1,3] and the resonant frequency r=/4. with pre-warping. The sampling time, given that b = c= 3; Using the relation:  =2 tan-1(ts/2) and replacing  c and c; ts = (2/c) tan(c/2) = (2/3)tan(/8)=0.276. H(z) = N(z)/D(z) = H(s) for s = (2/T)(z-1)/(z+1) N(z) = (2/0.276){(z-1)/(z+1)} D(z) = N2(z) + 9. H(z) = [ z z-2]/[8.572 –11.84z z-2] [Salivahanan, “DSP” Mcgraw Hills, p ]

42 BZT Bilinear transformation method are useful when the gains are constant over certain frequency bands. This condition exists in low-pass, band-pass, high-pass and band-stop filters. This method requires lower sampling rate compared to Impulse Invariance Method because of absence of aliasing. This absence of aliasing is the result of one-one mapping from a s-plane to z-plane.

43 Warping The digital frequency is limited in the range of  F  0.5, and sampling time period is decided by the highest frequency of the signal Fh is to be preserved. Warping of Digital Frequency scale is inherent in Bilinear Transformation. This can be reduced by pre warping the frequencies in analog domain.

44 Steps to Design IIR BZT filters
From specifications, workout the desired discrete-time filter requirements and attributes. Pre-warp the critical discrete time frequencies into corresponding analog frequencies and estimate the order of filter and -3dB critical frequency. Design the analog prototype filter from the continuous-time parameters obtained from above. Convert the analog prototype into an analog filter using frequency-frequency transform. Design a digital filter using a BZTof H(s) that warps the frequency axis which was previously pre-warped. [1.Taylor,”Hands-on digital signal processing”, McGraw Hills, pp ISBN: x 2.Chen,”Digital Signal Processing” Oxford, PP : ISBN ]

45 Example 10.04: Using the bilinear transformation and a low pass analog Butterworth prototype, design a low pass filter operating at a rate of 20 kHz and having a pass band extending to 4kHz with maximum attenuation of 0.5 dB and stop band starting at 5 kHz with a minimum stop band attenuation of 10 dB. Soln : Given that sampling rate is fs=20 kS/s, Pass band =fpass= 4kHz.Fpass= 4/20 Hz/s at -0.5 dB. Stop band =fstop = 5kHz. Fstop= 5/20 Hz/s at +10 dB. [Orfanidis: Introduction to signal Processing pp ]

46 Soln..: Prewarped Digital frequencies are:
pass= tan (2Fpass/2) = rad/sample stop= tan (2Fstop/2) = rad/sample. ln()= ln (stop/ pass) = ln(1.0/0.7265)

47 Determination of order n of the filter:
Given that H(s)H(-s) = [1+(s/j)2n]-1, Gx = 20 log |H(jx)| = -10log[1 + (x/c)2n] Where s =x, c = cut-off frequency, n is order of filter. Letting Pass band gain Gp dB occur at p rad/sec and stop band gain Gs dB occur at s rad/sec. We get expressions as: Gp = -10log[1 + (p/c)2n]  (p/c)2n = 10-Gp/10 -1 Gs = -10log[1 + (s/c)2n]  (s/c)2n = 10-Gs/10 –1 Hence: (s/p)2n = (10-Gs/10 –1)/ (10-Gp/10 –1)

48 Conclusion n, the order of the filter = c, the cut off frequency
From here we conclude: n, the order of the filter = log {(10-Gs/10 –1)/ (10-Gp/10 –1)} / 2log(s/p). c, the cut off frequency = p/{10-Gp/10 –1}1/2n ALTERNATIVELLY AS = s/{10-Gs/10 –1}1/2n

49 Hence: c, = p/{10-Gp/10 –1}1/2n = 0.8443
(s/p)2n = (10-Gs/10 –1)/ (10-Gp/10 –1)  2nlog((s/p)=log[(10-Gs/10 –1)/ (10-Gp/10 –1)] Or, n = 0.5 log[(10-Gs/10 –1)/ (10-Gp/10-1)]/log(s/p) In this case, n = 0.5 log[(10-Gs/10 –1)/ (10-Gp/10-1)]/log(s/p) = say 7. The -3dB cutoff frequency calculated as c, = p/{10-Gp/10 –1}1/2n =  fo= (fs/) tan-1(c)= kHz.

50 The filter is a 7th order filter
One real pole and three complex poles. The composite TF is: = (1+z-1)/ z-1 (1+z-1)2/[ z z-2] (1+z-1)2/[ z z-2] (1+z-1)2/[ z z-2]

51 Example_10.05 [ extention of example 9.4]
A band stop filter to satisfy Butterworth and Tchebyshev Criteria. is required to meet following specifications. to meet the following specifications. Stop band 100 to 600 Hz (assumed at -3dB) At and between 200 and 400 Hz, the magnitude should be at least -20 dB. Maximum Gain (at the zero) =1. Pass band ripple  1.1 dB. Sampling frequency 2000 Hz.

52 Conversion to normalized LPF specs.
Calculation of prewarp frequencies: pr_x= tan (xT/2) = tan (f/fs) since fsT=1 fx Hz fx/fs rad/s pr_x rad/s fx fx fx fx Normalized Bandwidth = B = fx4-fx1 = = 1.218 Normalized center frequency =02= fx4fx1 =

53 Calculation of equivalent LPF
Basic equation is: n  Bx /(02 - x2) Calculating n for various values of x in the equation =1.218 x / ( x2) x soln n x /[0.218 – (0.1584)2] = 1 x /[0.218 – (0.3249)2] = 3.519 x /[0.218 – (0.7265)2] = x /[0.218 – ( )2] = -1 s/p=min(2/ 1 3/ 4) =  3. and 1/cosh-1(2.856) =

54 Calculation of number of Tchebyshev poles
The control equations is where Given:Gs =-20 dB, R=-1.1 dB and Calculated s/p= 2.856 1/cosh-1(2.856) =0.5846 cosh-1( )=cosh-1(18.53) = 3.612 n= 2.11  3 for better transit characteristic

55 Chebyshev polynomial for n=3 and R = 1.1 dB
In the polynomial calculated in 9.4 Hlp(s) =0.4656/(s )(s s+0.977) To convert this normalized LP to desired BS, substitute s s / (s ). Use BZT in the so obtained polynomial in s.

56 1. Butterworth filter. Number of poles of LP filter 
= log10 {(10-Gs/10 –1)/ (10-Gp/10 –1)} / 2log10 (s/p) = log10{(102-1)/( )/2 log10(2.856) =  3 (for better transition characteristic). The normalized TF = 1/ (s+1)(s2+s+1) = 1/ 1+2s+2s2 +s3 Transform normalized LP to required BS by s s / (s ) USE BZT on the HBS(s).


Download ppt "IIR based Digital Filters:"

Similar presentations


Ads by Google