AGC DSP IIR Digital Filter Design Standard approach (1) Convert the digital filter specifications into an analogue prototype lowpass filter specifications (2) Determine the analogue lowpass filter transfer function H a (s) (3) Transform H a (s) by replacing the complex variable to the digital transfer function G (z ) Professor A G Constantinides 1 AGC DSP IIR Digital Filter Design This approach has been widely used for the following reasons: (1) Analogue approximation techniques are highly advanced (2) They usually yield closed-form solutions (3) Extensive tables are available for analogue filter design (4) Very often applications require digital simulation of analogue systems Professor A G Constantinides 2 AGC DSP IIR Digital Filter Design Let an analogue transfer function be Pa ( s ) H a (s) Da ( s ) where the subscript “a” indicates the analogue domain A digital transfer function derived from this is denoted as P( z ) G( z) D( z ) Professor A G Constantinides 3 AGC DSP IIR Digital Filter Design Basic idea behind the conversion of H a (s) into G (z ) is to apply a mapping from the s-domain to the z-domain so that essential properties of the analogue frequency response are preserved Thus mapping function should be such that Imaginary ( j ) axis in the s-plane be mapped onto the unit circle of the z-plane A stable analogue transfer function be mapped into a stable digital transfer function Professor A G Constantinides 4 AGC DSP IIR Digital Filter: The bilinear transformation To obtain G(z) replace s by f(z) in H(s) Start with requirements on G(z) G(z) Available H(s) Stable Stable Real and Rational in z Real and Rational in s Order n Order n L.P. (lowpass) cutoff L.P. cutoff c cT Professor A G Constantinides 5 AGC DSP IIR Digital Filter Hence f (z ) is real and rational in z of order one az b i.e. f ( z) cz d For LP to LP transformation we require s 0 z 1 f (1) 0 a b 0 s j z 1 f (1) j c d 0 Thus a z 1 f ( z ) . c z 1 Professor A G Constantinides 6 AGC DSP IIR Digital Filter The quantity a c ie on Or and C : z 1 cT c is fixed from a T f ( z ) c . j tan 2 c a cT jc . j tan 2 c 1 c 1 z s . tan cT 1 z 1 Professor A G Constantinides 2 7 AGC DSP Bilinear Transformation Transformation is unaffected by scaling. Consider inverse transformation with scale factor equal to unity For z 1 s 1 s s o jo 2 2 (1 o ) jo ( 1 ) 2 o o z z (1 o ) jo (1 o ) 2 o2 and so o 0 z 1 o 0 z 1 o 0 z 1 Professor A G Constantinides 8 AGC DSP Bilinear Transformation Mapping of s-plane into the z-plane Professor A G Constantinides 9 AGC DSP Bilinear Transformation j with unity scalar we have j 1 e j j tan( / 2) j 1 e For z e or tan( / 2) Professor A G Constantinides 10 AGC DSP Bilinear Transformation Mapping is highly nonlinear Complete negative imaginary axis in the s-plane from to 0 is mapped into the lower half of the unit circle in the z-plane from z 1 to z 1 Complete positive imaginary axis in the s-plane from 0 to is mapped into the upper half of the unit circle in the z-plane from z 1 to z 1 Professor A G Constantinides 11 AGC DSP Bilinear Transformation Nonlinear mapping introduces a distortion in the frequency axis called frequency warping Effect of warping shown below Professor A G Constantinides 12 AGC DSP Spectral Transformations To transform GL (z ) a given lowpass transfer function to another transfer function GD (zˆ ) that may be a lowpass, highpass, bandpass or bandstop filter (solutions given by Constantinides) 1 has been used to denote the unit z delay in the prototype lowpass filter GL (z ) and zˆ 1 to denote the unit delay in the transformed filter GD (zˆ ) to avoid confusion Professor A G Constantinides 13 AGC DSP Spectral Transformations Unit circles in z- and ẑ -planes defined by z e j zˆ e ĵ , Transformation from z-domain to ẑ -domain given by z F (zˆ ) Then GD ( zˆ ) GL {F ( zˆ )} Professor A G Constantinides 14 AGC DSP Spectral Transformations From z F (zˆ ) , hence 1, F ( zˆ ) 1, 1, thus z F (zˆ ) if z 1 if z 1 if z 1 , Therefore 1 / F ( zˆ ) must be a stable allpass function 1 L 1 * zˆ , 1 F ( zˆ ) 1 zˆ Professor A G Constantinides 15 AGC DSP Lowpass-to-Lowpass Spectral Transformation To transform a lowpass filter GL (z ) with a cutoff frequency c to another lowpass filter GD (zˆ ) with a cutoff frequency ̂ c , the transformation is 1 1 zˆ F ( zˆ ) zˆ On the unit circle we have jˆ j e e jˆ 1 e which yields z 1 1 tan( / 2) tan(ˆ / 2) 1 Professor A G Constantinides 16 AGC DSP Lowpass-to-Lowpass Spectral Transformation sin ( c ˆ c ) / 2 sin ( c ˆ c ) / 2 Example - Consider the lowpass digital filter 0.0662(1 z 1 )3 GL ( z ) 1 1 2 (1 0.2593 z )(1 0.6763 z 0.3917z ) 0.25 which has a passband from dc to with a 0.5 dB ripple Redesign the above filter to move the Professor A G Constantinides 0 . 35 17 passband edge to Solving we get DSP Lowpass-to-Lowpass Spectral Transformation Here sin(0.05 ) 0.1934 sin(0.3 ) Hence, the desired lowpass transfer function is GD ( zˆ ) GL ( z ) zˆ 0.1934 z 1 1 1 0.1934 zˆ 1 0 Gain, dB AGC -10 G (z) G (z) L D -20 -30 -40 0 0.2 0.4 0.6 / 0.8 1 Professor A G Constantinides 18 AGC Lowpass-to-Lowpass Spectral Transformation DSP The lowpass-to-lowpass transformation 1 1 zˆ 1 z F ( zˆ ) zˆ can also be used as highpass-tohighpass, bandpass-to-bandpass and bandstop-to-bandstop transformations Professor A G Constantinides 19 AGC DSP Lowpass-to-Highpass Spectral Transformation Desired transformation 1 zˆ z 1 zˆ 1 1 The transformation parameter cos ( c ˆ c ) / 2 cos ( c ˆ c ) / 2 is given by where c is the cutoff frequency of the lowpass filter and ̂c is the cutoff frequency of the desired highpass filter Professor A G Constantinides 20 AGC DSP Lowpass-to-Highpass Spectral Transformation Example - Transform the lowpass filter 1 3 0.0662(1 z ) GL ( z ) (1 0.2593 z 1 )(1 0.6763 z 1 0.3917z 2 ) with a passband edge at 0.25 to a 0.55edge at highpass filter with a passband Here cos( 0.4 ) / cos( 0.15 ) 0.3468 The desired transformation is 1 z ˆ 0.3468 1 z 1 1 0.3468zˆ Professor A G Constantinides 21 DSP Lowpass-to-Highpass Spectral Transformation The desired highpass filter is GD ( zˆ ) G ( z ) z 1 zˆ 1 0.3468 10.3468 zˆ 1 0 20 Gain, dB AGC 40 60 80 0 0.2 0.4 0.6 0.8 Normalized frequency Professor A G Constantinides 22 AGC Lowpass-to-Highpass Spectral Transformation DSP The lowpass-to-highpass transformation can also be used to transform a highpass filter with a cutoff at c to a lowpass filter with a cutoff at ̂c and transform a bandpass filter with a center frequency at o to a bandstop filter with a center frequency at ̂ o Professor A G Constantinides 23 AGC DSP Lowpass-to-Bandpass Spectral Transformation Desired transformation 2 1 1 zˆ zˆ 1 1 1 z 1 2 2 1 zˆ zˆ 1 1 1 2 Professor A G Constantinides 24 AGC Lowpass-to-Bandpass Spectral Transformation DSP and are given by cos (ˆ c 2 ˆ c1 ) / 2 cos (ˆ c 2 ˆ c1 ) / 2 The parameters cot (ˆ c 2 ˆ c1 ) / 2 tan(c / 2) where c is the cutoff frequency of the lowpass filter, and ˆ c1 and ˆ c 2 are the desired upper and lower cutoff frequencies of the bandpass filter Professor A G Constantinides 25 AGC Lowpass-to-Bandpass Spectral Transformation DSP Special Case - The transformation can be simplified if c ˆ c 2 ˆ c1 Then the transformation reduces to 1 z 1 1 ˆ z zˆ 1 1 zˆ where cos ˆ o with ̂ o denoting the desired center frequency of the bandpass filter Professor A G Constantinides 26 AGC Lowpass-to-Bandstop Spectral Transformation DSP Desired transformation 2 1 1 zˆ zˆ 1 1 1 z 1 2 2 1 zˆ zˆ 1 1 1 2 Professor A G Constantinides 27 AGC Lowpass-to-Bandstop Spectral Transformation DSP The parameters and are given by cos (ˆ c 2 ˆ c1 ) / 2 cos (ˆ c 2 ˆ c1 ) / 2 tan(ˆ c 2 ˆ c1 ) / 2 tan(c / 2) where c is the cutoff frequency of the lowpass filter, and ˆ c1 and ˆ c 2 are the desired upper and lower cutoff frequencies of the bandstop filter Professor A G Constantinides 28