Você está na página 1de 7

T-61.3010 Digital Signal Processing and 11.1.

2007
Filtering

Digital Filter Design Steps


1) Derivation of a realizable transfer function
G(z)

9 IIR Digital Filter


Design
2) Realization of G(z) using a suitable filter
structure
A choice between IIR and FIR digital filter
has to be made

© 2007 Olli Simula T-61.3010 Digital Signal Processing; 2


Mitra 3rd Edition: Chapter 9

Digital Filter Specifications Normalized Specifications


• Maximum value of the magnitude (gain) is assumed
to be unity or the minimum value of the loss function
is 0 dB

α max = 20 log10 1 + ε 2( )
• Passband: 1 − δ p ≤ G (e jω ) ≤ 1 + δ p ω ≤ωp α max ≅ −20 log10 (1 − 2δ p )

• Stopband: G (e ) ≤ δ s ω p ≤ ω ≤ π ≅ 2α p , δ p << 1
• Peak passband ripple: α p = −20 log10 (1 − δ p ) dB
• Minimum stopband attenuation: α s = −20 log10 (δ s ) dB
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 3 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 4
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Normalized Frequency Specifications Selection of the Filter Type


• Frequency specifications are normalized using the IIR filters:
sampling rate: • The transfer function is a real rational function of z-1
Ωp 2πFp
ωp = = = 2πFpT H ( z) =
P( z ) p0 + p1 z −1 + ... + pM −1 z M −1 + pM z − M
=
FT FT D( z ) d 0 + d1 z −1 + ... + d N −1 z N −1 + d N z − N
Ω s 2πFs
ωs = = = 2πFsT
FT FT • H(z) must be a stable transfer function
• For reduced computational complexity, it must be of
• ω=π corresponds to the half of the sampling rate, FT/2 lowest order

© 2007 Olli Simula T-61.3010 Digital Signal Processing; 5 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 6
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Mitra 3rd Edition: Chapter 9;


© 2007 Olli Simula 1
T-61.3010 Digital Signal Processing and 11.1.2007
Filtering

Selection of the Filter Type Selection of the Filter Type


FIR filters: FIR filters:
• The transfer function is a polynomial in z-1 + Linear phase response
N + Stability with quantized coefficients
H ( z) = ∑h[n]z −n - Higher order required than using IIR filters
n=0
IIR filters:
• For reduced computational complexity, the degree N + Better attenuation properties
of H(z) must be as small as possible + Closed form approximation formulas
• In addition, if linear phase is desired, then the FIR - Nonlinear phase response
filter coefficients must satisfy the symmetry constraint - Instability (limit cycle oscillations) with finite
wordlength computation
h[n] = ±h[N −n]
NFIR/NIIR is typically of the order of tens (or more)
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 7 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 8
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

IIR Filter Design Requirements of the Mapping


An analog filter transfer function Ha(s) is transformed The basic idea behind the conversion of an analog
into the desired digital filter transfer function G(z) prototype transfer function Ha(s) to a digital filter transfer
• Analog approximation techniques are highly function G(z) is to apply a mapping from the s-domain to
advanced the z-domain so that the essential properties of the
• They usually yield closed-form solutions analog frequency response are preserved
• Extensive tables are available for analog filter Requirements for the mapping are:
design or the methods are easy to program • The imaginary axis (jΩ) of the the s-plane is mapped
• Digital filters often replace (or simulate) analog onto the unit circle in the z-plane
filters • Stable Ha(s) must be transformed into a stable G(z)
Pa ( s) P( z )
H a (s) = ⇒ G( z) = Most widely used transformation: Bilinear Transformation
Da ( s ) D( z )
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 9 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 10
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Impulse Invariance Method Impulse Invariance Method


A straight-forward approach for obtaining the digital filter: • The digital filter transfer function G(z) is:
• The impulse response of the digital filter is made G ( z ) = Z {g[n]} = Z {ha [ nT ]}
identical to the impulse response of an analog 1 ∞ 2πk ⎞

prototype filter at sampling instants = ∑ H a ⎜ s + j T ⎟⎠ 1
T k = −∞ ⎝ s = ln z
T
• Analog transfer function: Ha(s)
• The frequency responses are obtained by substituting
ha (t ) =L −1{H a ( s )} z=ejω and s=jΩ :
1 ∞ ⎛ 2πk ⎞
• The impulse response of the digital filter is obtained by ∑ H a ⎜ jΩ + j T ⎟⎠
G ( e jω ) =
T k = −∞ ⎝
sampling:
g[n] = ha ( nT ), n = 0,1,2,... • According to the sampling theorem G(ejω) is a periodic
version of Ha(jΩ)
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 11 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 12
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Mitra 3rd Edition: Chapter 9;


© 2007 Olli Simula 2
T-61.3010 Digital Signal Processing and 11.1.2007
Filtering

Impulse Invariance Method Impulse Invariance Method


• Transformation from s-plane to z-plane: z = e sT
• For s=σ0+jΩ0 : z = re jω = eσ 0T e jΩ0T
| z |= r = eσ 0T
• A point on the jΩ-axis in the s-plane is characterized
by σ0=0
• A point on the frequency axis is mapped to a point on
the unit circle in the z-plane Thus, the impulse invariance mapping has the
• A point on the left-half s-plane with σ0<0 is mapped to desired properties:
z-plane with |z|<1, i.e., the left-half s-plane is mapped 1) Frequency axis jΩ corresponds to unit circle
inside the unit circle 2) Stability is preserved
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 13 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 14
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Impulse Invariance Method Impulse Invariance Method


• Due to sampling the mapping is many-to-one • Derivation of G(z) using impulse invariance method:
A −α t
H a ( s) = ↔ ha (t ) = Ae μ (t )
• The strips of s +α
length 2π/T • By sampling ha(t)
are all
mapped onto g[n] = ha ( nT ) = Ae −αnT μ[ n]
the unit circle ∞
A
G ( z ) = A∑ e −αnT z − n =
n =0 1 − e −αT z −1
Aliasing!
• G(z) converges if |e-αT|<1 or α>0, indicating that Ha(s) is
stable
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 15 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 16
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Example: First Order Butterworth Filter Designed


Impulse Invariance Method Using the Impulse Invariant Method
• Generalizing to higher order (N) analog transfer 1 1/ s
H a ( s) = = ↔ ha (t ) = e −t μ (t )
functions s + 1 1 + (1 / s )

N
Ak 1
H a ( s) = ∑ g[n] = ha (nT ) = e − nT μ[n] ↔ G ( z ) = ∑ e − nT z − n =
k =1 s + α k n=0 1 − e −T z −1
N 1
ha (t ) = ∑ Ak e −α k t μ (t ) Let T=1: G( z) =
1 − e −1 z −1
k =1

zero at z=0
N
Ak pole at z=1/e
G( z) = ∑
k =1 1 − e −α k T z −1

© 2007 Olli Simula T-61.3010 Digital Signal Processing; 17 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 18
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Mitra 3rd Edition: Chapter 9;


© 2007 Olli Simula 3
T-61.3010 Digital Signal Processing and 11.1.2007
Filtering

Example: First Order Butterworth Filter Designed Bilinear Transform Method


Using the Impulse Invariant Method To avoid aliasing, the mapping from s-plane to z-plane
should be one-to-one, i.e., a single point in the s-plane
should be mapped to a unique point in the z-plane and
vice versa
1) The entire jΩ-axis should be mapped onto the unit circle
2) The entire left-half s-plane should be mapped inside the unit
circle

© 2007 Olli Simula T-61.3010 Digital Signal Processing; 19 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 20
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Bilinear Transform Method Bilinear Transform Method


Derivation of the bilinear transform: 2 ⎛ sT ⎞
• The mapping: s' = tanh −1 ⎜ ⎟
1) One-to-one mapping from s to s’ which compresses the T ⎝ 2 ⎠
entire s-plane into the strip
-π/T < Im(s’) < π/T 2 ⎛ ΩT ⎞
• Substituting: s=jΩ and s’=jΩ’ Ω' = tan −1 ⎜ ⎟
2) Employ impulse invariance method to s’-plane with z=es’T T ⎝ 2 ⎠
jΩ jω

− jπ

s-plane s’-plane
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 21 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 22
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Bilinear Transform Method Bilinear Transform Method


• The normalized frequency ω now corresponds to Ω’T • The desired transformation from s to z (via s’)
2 ⎛ s'T ⎞
⎛ ΩT ⎞ s = tanh ⎜ ⎟
ω = 2 tan −1 ⎜ ⎟ T ⎝ 2 ⎠
⎝ 2 ⎠ 1
• Setting z = e s 'T or s ' = ln z
• Thus, the entire jΩ-axis is compressed to the interval T
(-ω, ω) for ω in a one-to-one manner 2 ⎛ ln z ⎞
yields s = tanh⎜ ⎟
• The mapping is highly nonlinear T ⎝ 2 ⎠
−x
e −e
x
1 − e −2 x
• However, for small ω=ΩT it is approximately linear • Writing tanh x = x − x =
e +e 1 + e −2 x
ln z
• Now x=
2
or 2 x = ln z e2 x =z
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 23 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 24
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Mitra 3rd Edition: Chapter 9;


© 2007 Olli Simula 4
T-61.3010 Digital Signal Processing and 11.1.2007
Filtering

Bilinear Transform Method Bilinear Transform Method


• Solving z and substituting s=σ0+jΩ0 gives:
• The bilinear transform is:
2 2 ⎛ 2 ⎞ 2
2 ⎛ 1 − z −1 ⎞ 2 ⎛ z − 1 ⎞ 1+ s 1+ (σ 0 + jΩ 0 ) ⎜1 + σ 0 ⎟ + j Ω0
s= ⎜ ⎟= ⎜ ⎟ z= T = T =⎝
T ⎠ T
T ⎜⎝ 1 + z −1 ⎟⎠ T ⎝ z + 1 ⎠ 2
1− s
2
1 − (σ 0 + jΩ 0 ) ⎜1 − σ 0 ⎞⎟ −
⎛ 2 2
j Ω0
T T ⎝ T ⎠ T

• The s-plane transfer function Ha(s) gives a z-plane 1) jΩ-axis, Re(s)=0; this gives |z|=1
transfer function The frequency axis from s-plane is mapped onto
the unit circle
G ( z ) = H a (s) 2 ⎛ 1− z −1 ⎞⎟ 2) Left-half s-plane, Re(s)<0; |1+(T/2)s| < |1-(T/2)s| or |z|<1
s = ⎜⎜
T ⎝ 1+ z −1 ⎟⎠
Left-half s-plane is mapped inside the unit circle
3) Right-half s-plane, Re(s)>0; |1+(T/2)s| > |1-(T/2)s| or |z|>1
The right-half s-plane is mapped outside the unit circle
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 25 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 26
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Frequency Warping Frequency Warping


• Distortion due to nonlinearity of the mapping: • To design a digital filter meeting the desired (digital)
specifications we have to
1) Prewarp the critical band-edge frequencies
(ωp and ωs) to analog frequencies (Ωp and Ωs)
1 − e − jω ⎛ω ⎞
jΩ = =) j tanh ⎜ ⎟ 2) Design an analog prototype filter Ha(s) using the
1 + e − jω ⎝2⎠ prewarped critical frequencies
⎛ω ⎞ 3) Transform Ha(s) to G(z) using the bilinear
Ω = tan ⎜ ⎟
⎝2⎠ transformation

© 2007 Olli Simula T-61.3010 Digital Signal Processing; 27 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 28
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Example: First Order Butterworth Filter Designed Example: First Order Butterworth Filter Designed
by the Bilinear Transformation by the Bilinear Transformation
1 1 1
H a (s) = → H ( z) = 2 ⎛ 1− z −1 ⎞⎟
=
s +1 s +1 s = ⎜⎜ 2 ⎛ 1 − z −1 ⎞
T ⎝ 1+ z −1 ⎟⎠ ⎜ ⎟ +1
T ⎜⎝ 1 + z −1 ⎟⎠

1 + z −1 1 + z −1 1 + z −1
⇒ H ( z) = = =
2
( )
1 − z −1 + 1 + z −1 ⎛⎜1 − ⎞⎟ z −1 + 1 +
2 2 3 − z −1
T ⎝ T⎠ T T =1
• The entire frequency axis from the s-plane is mapped
zero at z=-1 onto the unit circle in the z-plane one-to-one
pole at z=1/3
=> NO ALIASING !
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 29 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 30
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Mitra 3rd Edition: Chapter 9;


© 2007 Olli Simula 5
T-61.3010 Digital Signal Processing and 11.1.2007
Filtering

Spectral Transformations of IIR Filters Spectral Transformations of IIR Filters


• Transformation of a given digital IIR lowpass transfer • In order to map a lowpass magnitude response to one of
function GL(z) to another digital transfer function GD(z) the four basic types of magnitude responses, points on
the unit circle in z-plane should be mapped onto the unit
• Prototype lowpass GL(z); variable z-1
circle in z’-plane
Transformed filter GD(z’); variable z’-1 ⎧> 1, if | z |> 1
• The requirements
• Transformation from z-domain to z’-domain: z=F(z’) ⎪
F ( z ' ) = ⎨= 1, if | z |= 1
• Now, GL(z) is transformed to GD(z’) through ⎪< 1, if | z |< 1

GD ( z ) = GL {F ( z ' )}
• F-1(z’) must be a stable allpass function
• To transform a rational GL(z) into a rational GD(z’), • The most general form of F-1(z’) with real coefficients is
F(z’) must be a rational function in z’ given by L
⎛ 1 − α * z' ⎞
• The inside of the z-plane should be mapped into the
−1
F ( z ' ) = ±∏ ⎜⎜ l

l =1 ⎝ z '−α l ⎟⎠
inside of z’-plane
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 31 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 32
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Lowpass-to-Lowpass Transformation Spectral Transformations of IIR Filters


• GL(z) with cutoff frequency ωc is transformed to another
lowpass filter GD(z’) with ω’c
1 − αz ' z '−1 −α
z −1 = F −1 ( z ' ) = =
z '−α 1 − αz '−1
− jω '
with α real e − αl
e − jω =
1 − α l e − jω '
⎛ ω ⎞ 1+α ⎛ ω' ⎞
tan⎜ ⎟ = tan⎜ ⎟
⎝ 2 ⎠ 1−α ⎝2⎠
⎛ ω − ωc ' ⎞
sin ⎜ c ⎟
2 ⎠
α= ⎝
⎛ ωc + ωc ' ⎞
sin ⎜ ⎟
⎝ 2 ⎠
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 33 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 34
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Computer-Aided Design of Computer-Aided Design of


IIR Digital Filters IIR Digital Filters
• Transformation of an analog prototype filter into a • Let H(ejω) denote the frequency response of the
digital filter is used in application with frequency- digital transfer function H(z) to be designed so that it
selective magnitude response, i.e., lowpass, approximates the desired frequency response D(ejω),
highpass, bandpass, and bandstop characteristics given by a piecewise linear function of ω
• In applications requiring IIR digital filters with other • Determine iteratively the coefficients of H(z) so that
types of frequency responses, filter design algorithms the difference between H(ejω) and D(ejω) for all values
rely on some type of iterative optimization techniques of ω over closed subintervals of 0≤ω≤π is minimized
that are used to minimize the error between the • This difference usually specified as a weighted error
desired frequency response and the computer- function
generated filter E (ω ) = W (e jω )[ H (e jω ) − D(e jω )]
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 35 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 36
Mitra 3rd Edition: Chapter 9 Mitra 3rd Edition: Chapter 9

Mitra 3rd Edition: Chapter 9;


© 2007 Olli Simula 6
T-61.3010 Digital Signal Processing and 11.1.2007
Filtering

Computer-Aided Design of Computer-Aided Design of


IIR Digital Filters Digital Filters
• Chebyshev or minimax criterion - Minimizes the • Least-p Criterion - Minimize
peak absolute value of the weighted error: p
ε = max E (ω ) ε= ∫ W (e jω )[ H (e jω ) − D(e jω )] dω
ω∈R ω∈ R
where R is the set of disjoint frequency bands in over the specified frequency range R with p a
the range 0≤ω≤π , on which the desired frequency positive integer
response, D(ejω), is defined
• p = 2 yields the least-squares criterion
• R is composed of the passbands and stopbands of
the filter to be designed • As p → ∞ , the least p-th solution approaches the
minimax solution

© 2007 Olli Simula T-61.3010 Digital Signal Processing; 37 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 38
Mitra 3rd Edition: Chapter 9 Copyright © 2001, S. K. Mitra
Mitra 3rd Edition: Chapter 9 Copyright © 2001, S. K. Mitra

Computer-Aided Design of
Digital Filters Summary
• IIR digital filter design is usually carried out by
• Least-p Criterion - In practice, the p-th power error
transforming a prototype analog transfer function from
measure is approximated as
K
the s-domain into the z-domain
ε = ∑{W (e jωi )[H (e jωi ) − D(e jωi )]} p • The widely used bilinear transform method is based on
i =1 this approach
where ωi, 1 ≤ i ≤ K, is a suitably chosen dense grid • The design programs, e.g., Matlab Signal Processing
of digital angular frequencies Toolbox, produce filters with Butterworth, Chebyshev,
• For linear-phase FIR filter design, H(ejω) and are and elliptic magnitude responses
zero-phase frequency responses • Computer-aided iterative techniques are capable of
• For IIR filter design, H(ejω) and D(ejω) are magnitude designing filters with more general magnitude
functions functions and responses
© 2007 Olli Simula T-61.3010 Digital Signal Processing; 39 © 2007 Olli Simula T-61.3010 Digital Signal Processing; 40
Mitra 3rd Edition: Chapter 9 Copyright © 2001, S. K. Mitra
Mitra 3rd Edition: Chapter 9

Mitra 3rd Edition: Chapter 9;


© 2007 Olli Simula 7

Você também pode gostar