Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 1A/DDSP
Filter Synthesis
• Analog filter synthesis– IIR filters– LP, HP, BP, BS– Magnitude response templates– Filter prototypes– Synthesis with biquads
• Phase response– Group delay– Step response– All-pass filters
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 2A/DDSP
Filter Approximation• Objective: Magnitude specification à H(s)• Classic IIR Filters
– Chebychev 2Uses zeros for good attenuation but has no passband ripples. A good all-round combination.
– ButterworthPoles only and no passband ripple. Less ringing in step response than Chebychev 2.
– EllipticPassband and stopband ripples. Use this when only magnitude response counts. Large overshoot in step response. High Q poles result in high sensitivity.
– BesselGreat step response at the cost of poor attenuation.
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 3A/DDSP
Design Example
104
105
106
107
-120
-100
-80
-60
-40
-20
0Rp = 3 dB
Rs = 80 dB
fp = 100kHz fs = 1MHzFrequency [Hz]
Mag
nitu
de
[dB
]
Butterworth (N = 5)Chebychev 2 (N = 4)Elliptic (N = 3)
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 4A/DDSP
Matlab Codefp = 1.0e5; wp = 2*pi*fp;fs = 1.0e6; ws = 2*pi*fs;rp = 3;rs = 80;
% filter prototype[Nb, Wb] = buttord(wp, ws, rp, rs, 's');[b, a] = butter(Nb, Wb, 's');Hb = tf(b, a);
[Nc, Wc] = cheb2ord(wp, ws, rp, rs, 's');[b, a] = cheby2(Nc, rs, Wc, 's');Hc = tf(b, a);
[Ne, We] = ellipord(wp, ws, rp, rs, 's');[b, a] = ellip(Ne, rp, rs, We, 's');He = tf(b, a);
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 5A/DDSP
Step response
• Slow rise time• Overshoot
Acceptable in some applications, problematic in others.
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
x 10-5
0
0.2
0.4
0.6
0.8
1
1.2
1.4
ButterworthChebychev 2Elliptic
Step Response
Time (sec)
Am
plitu
de
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 6A/DDSP
2
out
1
in
Random Data
H
FilterBinary
Data Transmission
0 0.5 1 1.5
x 10-3
-1.5
-1
-0.5
0
0.5
1
1.5inputoutput
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 7A/DDSP
Eye Diagram
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
x 10-4
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 8A/DDSP
Increased Data Rate
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
x 10-4
-1.5
-1
-0.5
0
0.5
1
1.5inputoutput
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
x 10-5
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 9A/DDSP
Group Delay
• Nonuniform group delay is one source of eye closure
• Group delay?
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 10A/DDSP
• Consider a continuous time filter with s-domain transfer function G(s):
• The filter input is the sum of two sinewaves at slightly different frequencies (∆ω<<ω):
Amplitude and Phase Distortion
vIN(t) = A1sin(ωt) + A2sin[(ω+∆ω) t]
G(jω) ≡ G(jω)ejθ(ω)
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 11A/DDSP
Amplitude and Phase Distortion
• The filter output is:
vOUT(t) = A1 G(jω) sin[ωt+θ(ω)] + A2 G[ j(ω+∆ω)] sin[(ω+∆ω)t+ θ(ω+∆ω)]
{ ]}[= A1 G(jω) sin ω t + θ(ω)
ω +
{ ]}[+ A2 G[ j(ω+∆ω)] sin (ω+∆ω) t + θ(ω+∆ω)
ω+∆ω
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 12A/DDSP
Amplitude and Phase Distortion
{ ]}[vOUT(t) = A1 G(jω) sin ω t + θ(ω)
ω +
{ ]}[+ A2 G[ j(ω+∆ω)] sin (ω+∆ω) t + θ(ω+∆ω)
ω+∆ω
θ(ω+∆ω)ω+∆ω
≅ θ(ω)+ dθ(ω)dω
∆ω[ ][ 1ω )( ]1 - ∆ω
ω
dθ(ω)dω
θ(ω)ω +
θ(ω)ω-( )∆ω
ω≅
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 13A/DDSP
Amplitude and Phase Distortion
• If the second term in this equation is non-zero, then the filter’s output at frequency ω+∆ω is time-shifted differently than the filter’s output at frequency ωà “Phase distortion”
θ(ω+∆ω)ω+∆ω
dθ(ω)dω
θ(ω)ω +
θ(ω)ω- ∆ω
ω≅ ( )
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 14A/DDSP
Amplitude and Phase Distortion
• If the second term in this equation is zero, then the filter’s output at frequency ω+∆ω and the output at frequency ω are each delayed in time by -θ(ω)/ω
• τPD ≡ -θ(ω)/ω is called the “phase delay” and has units of time
θ(ω+∆ω)ω+∆ω
dθ(ω)dω
θ(ω)ω +
θ(ω)ω- ∆ω
ω≅ ( )
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 15A/DDSP
• Since ∆ω≠0, phase distortion is avoided only if:
• Clearly, if θ(ω)=kω, k a constant, we avoid phase distortion
• This type of filter phase response is called “linear phase”– Phase shift varies linearly with frequency
Amplitude and Phase Distortion
dθ(ω)dω
θ(ω)ω- = 0
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 16A/DDSP
Amplitude and Phase Distortion
• τGR ≡ -dθ(ω)/dω=k is called the “group delay”and also has units of time
• τGR= τPD implies linear phase
• Note: Filters with θ(ω)=kω+c are also called linear phase filters, but they’re not free of phase distortion
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 17A/DDSP
Amplitude and Phase Distortion
• If τGR= τPD,
[ )](vOUT(t) = A1 G(jω) sin ω t - τGR +
[+ A2 G[ j(ω+∆ω)] sin (ω+∆ω) )](t - τGR
• If G( jω)=G[ j(ω+∆ω)] for all inputs within the signal-band, vOUT is a scaled, time-shifted replica of the input, with no “amplitude distortion”
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 18A/DDSP
Amplitude and Phase Distortion
• No amplitude distortion:G( jω)=G[ j(ω+∆ω)]
• No phase distortion:τGR= τPD
• Neither of these conditions are realizable exactly in continuous time filters– Real passbands can’t have flat amplitude responses– Derivatives of sums of arctangents aren’t constant
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 19A/DDSP
Group Delay Comparison
• 100kHz corner frequency• Chebychev II versus Bessel
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 20A/DDSP
Magnitude ResponseBode Magnitude Diagram
Frequency [Hz]
Mag
nitu
de (
dB)
104
105
106
107
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
4th Order Chebychev 24th Order Bessel
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 21A/DDSP
Phase Response
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
x 105
-300
-250
-200
-150
-100
-50
0
Frequency [Hz]
Pha
se [d
egre
es]
4th Order Chebychev 24th Order Bessel
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 22A/DDSP
Group Delay
104
105
106
107
0
1
2
3
4
5
6
7
Frequency [Hz]
Gro
up D
elay
[ µ s
]
4th Order Chebychev 24th Order Bessel
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 23A/DDSP
Normalized Group Delay
104
105
106
107
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
Frequency [Hz]
Gro
up D
elay
[nor
mal
ized
]
4th Order Chebychev 24th Order Bessel
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 24A/DDSP
Step ResponseStep Response
Time (sec)
Am
plitu
de
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
x 10 -5
0
0.2
0.4
0.6
0.8
1
1.2
1.4 4th Order Chebychev 24th Order Bessel
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 25A/DDSP
Eye Diagrams
Note: the “Chebychev” output should be scaled to the same peak amplitude as the output from the Bessel. The Bessel has a clear advantage.
-1 0 1 2 3 4 5 6
x 10-5
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time
4th Order Bessel
-1 0 1 2 3 4 5 6
x 10-5
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time
4th Order Chebychev
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 26A/DDSP
Allpass Filters
• Delay equalization– Unity magnitude response– “arbitrary” delay
• Can compensate arbitrary phase distortion (e.g. from a “given” channel)
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 27A/DDSP
Second-Order All Pass Filter
σ
jω
radius = ωP
ωP
2QP
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 28A/DDSP
Second-Order All Pass Filter
• From graphical considerations alone, the second-order all pass filter has unity magnitude response at all frequencies– Its phase shift is twice that of its pole
• All pass sections can’t cancel out the delay of other filter sections,– But they can add strategic delay to improve the
phase response of a companion filter
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 29A/DDSP
All Pass Filters
• An all pass filter used to make a companion filter’s group delay more constant in the filter passband is called a “phase equalizer” or “delay equalizer”
• Group-delay-critical applications frequently devote as many poles to phase response “reshaping” as they devote to magnitude response shaping
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 30A/DDSP
All Pass Filters
• Phase equalizers are commonly used in digital data receivers
• If you’re not sure whether or not you need a phase equalizer, build one– Start with just as many poles as your magnitude
shaper– CAD tools like MATLAB’s iirgrpdelay help
synthesize optimal phase equalizers– Unfortunately iirgrpdelay is for sampled data filters
only à use the bilinear transform (see later)
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 31A/DDSP
Magnitude ResponseBode Magnitude Diagram
Frequency [Hz]
Mag
nitu
de (
dB)
104
105
106
107
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
4th Order Chebychev 2AllpassCheby+Allpass8th Order Bessel
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 32A/DDSP
Phase Response
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
x 105
-900
-800
-700
-600
-500
-400
-300
-200
-100
0
Frequency [Hz]
Pha
se [d
egre
es]
4th Order Chebychev 2AllpassCheby+Allpass8th Order Bessel
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 33A/DDSP
Normalized Group Delay
104
105
106
107
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
Frequency [Hz]
Gro
up D
elay
[nor
mal
ized
]
4th Order Chebychev 2Cheby+Allpass8th Order Bessel
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 34A/DDSP
Step ResponseStep Response
Time (sec)
Am
plit
ud
e
0 0.5 1 1.5 2 2.5 3
x 10-5
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
4th Order Chebychev 2AllpassCheby+Allpass8th Order Bessel
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 35A/DDSP
Eye Diagrams
-1 0 1 2 3 4 5 6
x 10-5
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time
8th Order Bessel
-1 0 1 2 3 4 5 6
x 10-5
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time
4th Order Chebychev with 4th Order Allpass
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 36A/DDSP
FIR Filter Phase Response
• A significant advantage of FIR over IIR filters is that FIR filters can be realized with linear phase response
• But (with few exceptions) FIR filters are only practical in the digital domain
EECS 247 Lecture 5: Filter Syntesis & Group Delay © 2002 B. Boser 37A/DDSP
Summary
Filter design:– Magnitude response
• Template• Approximation (matlab) à H(s)• Realization with
– Cascades of biquadsSensitivity limits practical designs to <3 sections
– Ladder filters à next lecture
– Phase / group delay• Phase equalization (allpass)