HO3_315aSP09_filter_approx

HO3_315aSP09_filter_approx - Filter Approximations Boris...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Filter Approximations Boris Murmann Stanford University murmann@stanford.edu Copyright © 2009 by Boris Murmann B. Murmann EE315A ― HO #3 1 Filter Approximation Problem • Approximate ideal response by one that implements a reasonable compromise between filter complexity (number of poles and zeros) and approximation error B. Murmann EE315A ― HO #3 2 Second Order Lowpass Filter Qp=0.5 0 Q =1/sqrt(2) p -10 1 H( s ) = 1+ -20 s s2 + 2 ωPQP ωP -30 -40 4 10 • 5 10 f [Hz] 10 6 Magnitude response is “maximally flat” (no peaking) for QP = 1/sqrt(2) EE315A ― HO #3 B. Murmann 3 Pole Positions x 10 5 x 10 5 x 10 4 4 4 2 2 5 6 QP = 0.5 0 -2 1 QP = 2 0 -2 -4 -6 -6 -4 -2 0 5 Real x 10 ⎛ 1 α = cos −1 ⎜ ⎝ 2QP B. Murmann ⎞ ⎟=0 ⎠ 2 QP = 1 0 -2 -4 -6 Imagin nary 6 Imagin nary 6 Imagin nary Magnitude [dB] e p Q =1 -4 4 -6 -6 -4 -2 0 5 Real x 10 ⎛ 1 α = cos −1 ⎜ ⎝ 2QP ⎞ ⎟ = 45 ⎠ EE315A ― HO #3 -6 -4 -2 0 5 Real x 10 ⎛ 1 α = cos −1 ⎜ ⎝ 2QP ⎞ ⎟ = 60 ⎠ 4 Improvements • A maximally flat response is g y p great, but how can we make the , roll-off steeper? • Let’s look at – I Imaginary zeros i – Increasing the filter order – High-Q poles – High-Q poles and imaginary zeros B. Murmann EE315A ― HO #3 5 Adding Zeros on the Imaginary Axis “pegs” B. Murmann EE315A ― HO #3 6 Bode Plot no zeros zeros on imaginary axis 0 2 ⎛ s ⎞ 1+ ⎜ ⎟ ⎜ω ⎟ ⎝ Z⎠ H (s ) = 2 ⎛ s ⎞ s 1+ +⎜ ⎟ ωPQP ⎜ ωP ⎟ ⎝ ⎠ Magnitude [dB] -5 -10 -15 -20 -25 -30 H ( jω ) ω → ∞ -35 -40 4 10 10 5 10 6 10 ⎛ω ⎞ =⎜ P⎟ ⎜ω ⎟ ⎝ Z⎠ 2 7 f [Hz] • Steeper roll-off at the expense of reduced stopband rejection EE315A ― HO #3 B. Murmann 7 Adding Another Pole 0 H (s ) = H1(s ) ⋅ H2 (s ) Magnitude [dB] e -5 H1(s ) = -10 -15 15 -20 -25 -30 30 H2( ) ω P*=ω P (s), -35 H 2 (s ) = H1(s), QP=1/sqrt(2) H1(s) ⋅H2(s) -40 4 10 5 10 f [Hz] 10 1 ⎛ s ⎞ s 1+ +⎜ ⎟ ωPQP ⎜ ωP ⎟ ⎝ ⎠ 1 ⎛ s ⎞ 1+ ⎜ ⎜ω ⎟ ⎟ ⎝ P* ⎠ 6 • As expected, steeper roll-off, but transition is not all that sharp • Can fix this issue by increasing Q of H1(s)! B. Murmann EE315A ― HO #3 8 2 Utilizing Peaking in H1(s) 0 H (s ) = H1(s ) ⋅ H2 (s ) Magnitude [dB] e -5 H1(s ) = -10 -15 15 -20 -25 -30 30 H2( ) ω P*=ω P (s), -35 H1(s) ⋅H2(s) -40 4 10 • H 2 (s ) = H1(s), QP=1 5 10 f [Hz] 10 1 ⎛ s ⎞ s 1+ +⎜ ⎟ ωPQP ⎜ ωP ⎟ ⎝ ⎠ 1 ⎛ s ⎞ 1+ ⎜ ⎜ω ⎟ ⎟ ⎝ P* ⎠ 6 Win-win improvement – Passband more flat roll-off steeper flat, EE315A ― HO #3 B. Murmann 9 nth Order Generalization • Stephen Butterworth showed in 1930 that the magnitude response of an nth order maximally flat lowpass filter is given by 1 H(jω) = ⎛ ω ⎞ 1+ ⎜ ⎟ ⎝ ωP ⎠ • This magnitude response is monotonically decreasing and satisfies k d H(jω) =0 dω k • 2n for 1 ≤ k ≤ 2n − 1 ω =0 The corresponding pole locations can be determined using 2 H(s) = H(s) ⋅ H( −s) = B. Murmann 1 ⎛ −s 1+ ⎜ 2 ⎜ ω ⎝ P 2 n ⎞ ⎟ ⎟ ⎠ −s2 2 ωP = −11/n = e EE315A ― HO #3 j(2k +1) π n k = 1,2,3...,n 10 2 Pole Locations • The poles lie equally spaced (in angle) on a circle in the s-plane centered at the origin with radius ωP • The LHP roots are taken to be the poles of H(s), while those in the RHP are regarded as the poles of H(–s) ωP = 1 1 1 1 1 0.5 05 0.5 05 0.5 05 0.5 05 Imaginary n =1 n=3 n=2 n=4 0 0 0 0 -0.5 -0.5 -0.5 -0.5 -1 -1 -1 -0.5 Real 0 -1 -1 -1 -0.5 Real B. Murmann 0 -1 -0.5 Real EE315A ― HO #3 0 -1 1 -0.5 05 Real 0 11 Magnitude Response and Coefficients http://en.wikipedia.org/wiki/Butterworth_filter ωP = 1 n Numerator Polynomial 1 (s + 1) 2 s2 + 1.4142s + 1 3 (s + 1)(s2 + s + 1) 4 (s2 + 0.7654s + 1)(s2 + 1.8478s + 1) 5 (s + 1)(s2 + 0.6180s + 1)(s2 + 1.6180s + 1) 6 (s2 + 0.5176s + 1)(s2 + 1.4142s + 1)(s2 + 1.9319s + 1) 7 (s + 1)(s2 + 0.4450s + 1)(s2 + 1.2470s + 1)(s2 + 1.8019s + 1) 8 (s2 + 0.3902s + 1)(s2 + 1.1111s + 1)(s2 + 1.6629s + 1)(s2 + 1.9616s + 1) B. Murmann EE315A ― HO #3 12 A Closer Look at n=4 4 H (s ) = H1(s ) ⋅ H2 (s ) Magnitud [dB] de 2 0 H1(s ) = -2 -4 -6 -8 H1(s), QP1=0.541, ω P1=1 H 2 (s ) = H2(s), QP2=1.307, ω P2=1 H1(s) ⋅H2(s) -10 -4 10 -2 10 [rad/sec] ω [ d/ ⎛ 1 ⎞ α = cos −1 ⎜ ⎟ ⎝ 2QP ⎠ QP1 = 10 1 ( 2 cos 22.5 ) 1 ⎛ s ⎞ s 1+ +⎜ ωP 1QP 1 ⎝ ωP 1 ⎟ ⎠ 1 ⎛ s ⎞ s 1+ +⎜ ωP 2QP 2 ⎝ ωP 2 ⎟ ⎠ 0 = 0.541 QP 2 = 1 ( 2 cos 67.5 EE315A ― HO #3 B. Murmann ) = 1.307 13 Increasing QP2 10 Magnitu [dB] ude 5 0 -5 H1(s), QP1=0.541, ω P1=1 H2(s), QP2=3, ω P2=1 H1(s) ⋅H2(s) -10 -4 10 -2 10 ω [rad/sec] 10 0 • Helps make the roll-off steeper, but introduces peaking • We can try to alleviate this problem this by reducing ωP1 B. Murmann 2 EE315A ― HO #3 14 2 Increased QP2, Reduced ωP1 10 Magnitude [dB] e 5 0 H1(s), QP1=0.541, ω P1=0.7 -5 5 H2(s), QP2=3, ω P2=1 H1(s) ⋅H2(s) -10 -4 10 • -2 10 ω [rad/sec] 10 0 This may not a bad choice of we can tolerate some peaking or ripple EE315A ― HO #3 B. Murmann 15 Comparison with Original Butterworth 2 Magnitud [dB] de 0 -2 -4 -6 -8 -10 -2 10 • Butterworth QP2=3, ω P1=0.7 10 -1 ω [rad/sec] 10 0 10 1 How can we optimize this situation, i.e. minimize the transition band for a given tolerable peaking (or “ripple”) in the passband? B. Murmann EE315A ― HO #3 16 Chebyshev1 Filter Approximation • Fortunately someone has already figure this out • The “Chebyshev1” filter approximation minimizes the error y pp between the idealized response and the actual filter, with the passband ripple as a parameter (1dB for examples below) 1 1 1 0.5 Imaginary 1 0.5 0.5 0.5 n=2 0 0 n=3 0 n=4 0 -0.5 -0.5 -0.5 -0.5 05 -1 -1 -1 n=5 -1 -1 1 -0.5 05 Real 0 -1 1 -0.5 05 Real -1 1 0 -0.5 05 Real 0 -1 1 -0.5 0.5 Real EE315A ― HO #3 B. Murmann 0 17 Matlab Code wp = 1; % Edge of passband R = 1; % Passband ripple in dB 4 [z, p, k] = cheby1(4, R, wp, 's'); p y p sys = zpk(z, p, k); 2 w = logspace(-2, 1, 1000); figure(1) semilogx(w, db, 'linewidth', 2); hold on; M Magnitude [dB B] db = 20*log10(reshape(mag, 1 l 20*l 10( h ( 1, length(w))); th( ))) -2 -4 -6 plot([w(1) w(end)], [0 0], '--'); plot([w(1) w(end)], [-1 -1], '--'); -8 set(gca, 'fontsize', 14); xlabel('\omega [rad/sec]') ylabel('Magnitude [dB]'); 1 dB 0 [mag, phase] = bode(sys, w); -10 -2 10 10 axis([min(w) max(w) -10 4]) 10 -1 10 ω [rad/sec] 0 10 grid; B. Murmann EE315A ― HO #3 18 1 Elliptic (Cauer) Filter Approximation • The Elliptic filter approximation combines our previous ideas and adds imaginary zeros to sharpen the transition band • This approximation has the passband ripple and stopband attenuation as a parameter (1dB and 20dB, respectively, for example below) 3 3 3 2 Imaginary y 3 2 2 2 1 1 1 1 0 0 0 0 -1 -1 -1 -1 -2 -3 -2 n=2 -1 -0.5 -0 5 Real -2 n=3 -3 0 -1 -0.5 -0 5 Real -3 0 -2 n=4 -1 -0.5 -0 5 Real n=5 -3 0 -1 -0.5 -0 5 Real 0 EE315A ― HO #3 B. Murmann 19 Matlab Code wp = 1; % Edge of passband Rp = 1; % Passband ripple in dB Rs = 20; % Stopband attenuation [z, p, k] = ellip(4, Rp, Rs, wp, 's'); s ); Ma agnitude [dB] 0 -5 5 -10 -15 15 -20 -25 -2 25 10 B. Murmann EE315A ― HO #3 10 -1 ω [rad/sec] 10 0 10 20 1 Chebyshev2 Filter Approximation • No ripple in the passband, but finite stopband attenuation and ripple due to imaginary zeros • This approximation takes the stopband attenuation as a parameter (20dB in the example below) 3 3 3 2 Imaginary 3 2 2 2 1 1 1 1 0 0 0 0 -1 -1 -1 -1 -2 -2 n=2 -3 -2 n=3 -3 -1 1 -0.5 0 Real 0 -2 n=4 -3 1 -1 -0.5 0 Real 0 n=5 -3 1 -1 -0.5 0 Real 0 1 -1 -0.5 0 Real 0 EE315A ― HO #3 B. Murmann 21 Design Example wp=2*pi*1e6; % Passband edge ws=2*pi*2e6; % Stopband edge p p g Rp=1; 0 % Passband ripple Rs=40; % Stopband attenuation % D t Determine required order and synthesize i i d d d th i [N, Wp] = ellipord(wp, ws, Rp, Rs, 's'); [z, p, k] = ellip(N, Rp, Rs, wp, 's'); sys = zpk(z, p, k); Ma agnitude [dB] -10 -20 -30 30 f = logspace(4, 7, 1000); -40 [mag, phase] = bode(sys, 2*pi*f); db = 20*log10(reshape(mag, 1 length(f))); 20*log10(reshape(mag 1, figure(1) semilogx(f, db, 'linewidth', 2); B. Murmann -50 4 10 EE315A ― HO #3 5 10 10 Frequency [Hz] 6 10 22 7 Filter Order for Rp=1dB, Rs=40dB 12 Butterworth Elliptic Chebyshev 1 & 2 R Required Or rder 10 8 6 4 2 0 2 3 4 5 6 7 8 9 10 ω s/ω p • Why not always use an Elliptic filter? EE315A ― HO #3 B. Murmann 23 Step Response of Design Example 1.2 Output 1 0.8 0.6 0.4 04 0.2 0 0 1 2 3 Time [μsec] 4 5 6 • Overshoot and other forms of pulse deformation can be problematic in some systems – Consider e.g. oscilloscopes, pulse based data links, etc e g oscilloscopes pulse-based links etc. • The pulse deformation is mostly due to the fact that different frequency components pass the filter with different time delays – This is called phase distortion B. Murmann EE315A ― HO #3 24 Phase Distortion (1) • Consider a filter with transfer function H( jω) = H( jω) e jφ( ω) • Apply two sine waves at different frequencies v in (t) = A1 sin ( ω1t ) + A 2 sin ( ω2t ) v out (t) = A1 H( jω1) sin ( ω1t + φ(ω1) ) + A 2 H( jω2 ) sin ( ω2t + φ(ω2 ) ) ⎛ ⎡ φ(ω1) ⎤ ⎞ ⎛ ⎡ φ(ω2 ) ⎤ ⎞ = A1 H( jω1) sin ⎜ ω1 ⎢ t + i i ⎜ ⎟ ⎥ ⎟ + A 2 H( jω2 ) sin ⎜ ω2 ⎢ t + ⎥⎟ ⎜ ω1 ⎦ ⎠ ω2 ⎦ ⎟ ⎝ ⎣ ⎝ ⎣ ⎠ Phase delay τd1 Phase delay τd2 EE315A ― HO #3 B. Murmann 25 Phase Distortion (2) • Assuming that the difference between |H(jω1)| and |H(jω2)| is small, the “shape” of the time-domain output signal will be preserved as l d long as φ(ω1) φ(ω2 ) − =0 ω1 ω2 • This condition is satisfied for φ(ω) = T ⋅ ω • T = constant A filter with this characteristic is called “linear phase” linear phase B. Murmann EE315A ― HO #3 26 Delay with Linear Phase t (e.g. φ1 = π/2 & ω2= 2ω1) t Linear Phase Filter ω1 0 (φ1 = π/2) ω2 φ1 t ω1 − φ2 (φ2 = 2φ1 =π) ∂φ φ ∂ω ω1 ∂φ ∂ω ∂ t ω2= 2ω1 ω2 T (Fixed delay) B. Murmann 27 Delay with Nonlinear Phase ω1 0 (φ1 = π/2) ω2 − φ1 φ2 ∂φ ∂ω (φ2 < 2φ1 = π) t ω2= 2ω1 ω1 φ(ω1) φ(ω2 ) ≠ ω1 ω2 t ω1 ω2 unmatched • Phase distortion occurs whenever the phase is nonlinear, i.e. the derivative of the phase is not constant • The (negative) derivative of the phase is also called “group delay” or τg • Note that for a linear phase filter we have τg = τd = const. filter, const B. Murmann 28 Group Delay • The name group delay (or envelope delay) refers to the fact that it specifies the delay experienced by a narrow-band “group‘” of sinusoidal components within some Δ around a carrier wc i id l t ithi Δω d i • The width of Δω is limited to a range over which dφ/dω is approximately constant • For example, for an AM modulated signal, the carrier experiences a delay of τp (phase delay) and the envelope sees a delay of τg (group delay) • For a proof, see e.g. – • http://ccrma-www.stanford.edu/~jos/fp2/Derivation_Group_Delay_Modulation.html In this course, we are using the term group delay merely to refer -dφ/dω (and not to argue about group delay per se) B. Murmann EE315A ― HO #3 29 Bessel Filter Approximation B. Murmann EE315A ― HO #3 30 Group Delay Comparison B. Murmann EE315A ― HO #3 31 Specialized Filters • Linear phase approximation (equiripple) (e.g. 0.05° equiripple) – U d i h d di k d i applications Used in hard disk drive li ti • Gaussian “smooth” time-domain – Used for pulse shaping in GMSK/GSM p p p g phones • … B. Murmann EE315A ― HO #3 32 Comparison: Bessel vs. Chebyshev1 • Lowpass filters with 100 kHz passband • Both filters are 4th order B th filt d with the same -3 dB frequency • Passband ripple of 1dB for Chebyshev I [Khorramabadi] B. Murmann EE315A ― HO #3 33 Phase and Group Delay B. Murmann EE315A ― HO #3 34 Step Response B. Murmann EE315A ― HO #3 35 Pulse Response B. Murmann EE315A ― HO #3 36 Intersymbol Interference B. Murmann EE315A ― HO #3 37 Beyond Lowpass Filtering B. Murmann EE315A ― HO #3 38 Lowpass to Highpass Transformation s = HP jω L.P. 1 sLP H.P. unit circle x o o o x σ x 3-zeros at ∞ o o o x x x 3-zeros at origin (e.g. Butterworth n=3) L.P. H.P. x x x o o o o 2-zeros at ∞ (e.g. Arbitrary n=2) x x 2-zeros at origin x The s-domain poles and zeros simply become inverted. Shown by the examples, zeros at infinity move to origin, and finite-valued poles become |1/poleLP| in magnitude and become conjugates (flips between quadrant II & III). The mapping boundary is the unit circle. ) pp g y B. Murmann 39 Lowpass to Bandpass Transformation s = BP ⎛ sLP ⎞ ≈ sLP ± j 2a 2a ⎝ 2a ⎠ 2a 2 sLP ± j 1− 2a 2a L.P. x o where a = fm = “Q” ; f m = Δf Δf unit circle B.P. f 1 f 2 ; Δf = f 2 − f 1 o x x x o 1 circle 2a x (e.g. “Narrowband” n=3) x o o x x x o For “narrowband” approximation, the S-domain poles and zeros simply become replicated at ±jω with a smaller unit circle of radius 1/2a. To realize a wideband filter, use a cascade of highpass and lowpass filters. , g p p B. Murmann 40 ...
View Full Document

This note was uploaded on 08/13/2009 for the course EE 315 taught by Professor Borismurmann during the Spring '09 term at Stanford.

Ask a homework question - tutors are online