Chapter 4 Recursive Filter Design
Transcript of Chapter 4 Recursive Filter Design
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 1/46
Chapter 4 Recursive Filter Design
Recursive Filter ( IIR Filter ) should be stable .
※ Filter Design Procedure
① Stability Check
② Review for Satisfying Filter Design Specification?
1 0
n m
k i k i i k i
i i
y A y B x
0
1
( )( )
( )1
mi
i
i
ni
i
i
B zY z
H zX z
A z
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 2/46
The transformations for converting from analog filter H(s) to digital filterH(z). We have to consider the following terms:
① What transformation should we use?
=> It should be “useful” to convert from a continuous filter
function to a discrete filter function.
② If the continuous filter is stable, will the transformation ensure that
the digital filter is stable? All its poles should be within a unit circle.
③ Does the continuous filter’s meeting the specifications mean that the
digital filter will also meet them?
If not, how do we modify the procedure do ensure that it does?
=> We use bilinear transform
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 3/46
4.2 Digital Filter Design by Means of the z-Transform
( Impulse Invariant Method )
1. Impulse Invariant Method: If H(s) is in factored form, we obtain H(z),
the transfer function for the digital filter, by using expression(3.38) .
2. Impulse Invariant
Definition
A continuous filter G(s) and digital filter H(z) are said to be impulse-
invariant if the pulse response of H(z) is the same as the sampled impulse
response of G(s).
※ If H(z) is the z-transform of the samples g(kT) of a continuous g(t), then
H(z) and G(s) are impulse-invariant.
*
( )
1
1 1( ( ) ( ) ( ) ( ) )
2 11
( ) ( ) ( )1
Impulse Invariant Digital Filter with the continuous filter
c j
T T s pc j
Tp
H s h t t H p dpj e
H z residues of H p at poles of H pe z
L
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 4/46
The values of the samples of the impulse response are obtained by
setting t equal to kT
(4.4)
The z-transform of g(kT) is
The unit-pulse response is obtained as
which is the same as (4.4).⇒ Impulse invariant
Proof of Impulse Invariant Definition
proof) Expand G(s) in partial fractions
1 1
( ) 1, , ( )
i
n ns ti
i
i ii
RG s where i n g t R e
s s
1
( ) i
ns kT
i
i
g kT R e
11 1
( )1 i i
n ni i
Ts Tsi i
R R zH z
e z z e
1
1
1 1
( ) ( ) ( )
( )i i
iTsi
k
n nTs s kTki
iTsi iz e
h k residues of H z z at poles of some inside ROC for H z
R zz e z R e
z e
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 5/46
3. The frequency variable 𝝎 for the digital filter bears a linear relationship
to that for the continuous filter, within the operating range (0 to 𝝎
𝒔
𝟐) of the
digital filter.
⇒∴ Critical frequencies such as cutoff and band width frequencies for the
digital filter can be used directly in section of the continuous filter.
4. Taking the z-transform of a continuous filter function is a satisfactory
procedure when applied to all pole filters such as Butterworth, Chebyshev, ,
and Bessel, provided that the designing filters are bandlimited. In a
bandlimited filter, the magnitude response of the continuous filter is
negligibly small at frequencies exceeding half the sampling frequency, in
order to reduce the aliasing effect.
Thus we must have
( ) 02
sH j for
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 6/46
※With the highpass filter, because the passband of 𝑯(𝒔 ) is unlimited,
the periodic extension indicates that the periodic lobes of the passband
tend to “fill up” the stopband as a result of aliasing in the operating
range −𝝎𝒔/𝟐 𝒕𝒐 𝝎𝒔/𝟐 . Consequently, the digital filter is useless as a
highpass filter.
⇒ There is a way to get around this difficulty by modifying the
procedure.
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 7/46
※ Filter Design Procedure
① Select a suitable continuous, lowpass prototype to satisfy the sharpness
of-cutoff specification.
② Make a lowpass-to-bandpass frequency transformation for the
specified passband.
③ Apply transformation to the resulting continuous filter function and
obtain H(z)
④ Use the transfer function obtained to express the digital filter in
difference equation form for implementation as a computer algorithm.
1 0
n m
k i k i i k i
i i
y A y B x
( )n nH s
( )H s
( )H z
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 8/46
Ex 4.1) Use the impulse-invariant method to design a bandpass digital filter
that is monotonic in passband and stopband , has a passband from 500 to
550Hz, and is as low in order as practical. Sampling rates of 2kHz and
10kHz should be examined.
Solve)
Because of the simplicity requirement for band pass filter, a second order
filter will suffice. Because a 2nd -order bandpass filter is required, the
design procedure may begin with a first-order, continuous, lowpass
prototype of the Butterworth type.
Applying the bandpass transformation to 𝑯𝒏(𝒔𝒏) gives
where,
2 2
0 0 0
0
( )
n
s ss
Bs B s
1( )
1n n
n
H ss
22 20 2 20
0 00
1( )
( ) / 1 ( )2 4
Bs BsH s
s B Bs BsB s
s
2
0,u l u lB
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 9/46
12
1 12 2
2
2 2
2 2 2 2 2 2 2 2 2
( ) (where, , ( ) ),( ) 2 4
Magnitude response is
( )( ) (2 ) ( ) ( )
Bs B BLet H s a b
s a b
B BM
a b a b a b a
1
1
1
1 2 2 2 2
1( ) ( )
1 ( ) ( )
1( )
1 ( ) ( )
1 ( sin cos )( )
1 2 cos 2 (cos )
( sin cos
,
Tp
p a jb
Tp
p a jb
aT
aT aT
aT
BpH z p a jb
e z p a jb p a jb
Bpp a jb
e z p a jb p a jb
aB bT bT e z
Bz z qb
e bTz e z z r bT z r
awhere r e q bT b
b) aTT e
1
1( ) ( )
1
Tp
H z residues of H p at poles p a jbe z
To obtain a digital filter that is impulse-invariant with 𝑯(𝒔), apply transformation
to 𝑯(𝒔)
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 10/46
2
2 2
( )
1 2 cos
1 2 cos( ) 1 2 cos( )
M T
q q TB
r r b T r r b T
If let T = 0.0005 ( 2KHz ) or T = 0.0001 ( 10KHz ) ,
Magnitude diagram of M(w) is shown as
From the geometry of Fig. 4.2, the
magnitude response is
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 11/46
From 𝑯(𝒛) we can get the following difference equation
The block diagram for the canonic implementation of this filter is
shown in the following figure.
1 1 2 2 0 1 1
2
1 2
0 1
2 cos ,
, ( sin cos )
k k k k k
aT aT
aT
y A y A y B x B x
A e bT A e
aB B B B bT bT e
b
2 2
( )( )
2 (cos )
Bz z qH z
z r bT z r
( sin cos )aT aTar e q bT bT e
b
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 12/46
Higher-order lowpass and bandpass filters may be designed in a similar
manner. They should be implemented as a series or parallel arrangement
of first - and second - order filters. For example, take the z-transform of
the third-order Butterworth filter.
ex) After first expanding 𝑯 𝒔 in partial fractions as follows:
Taking z-transform of 𝑯(𝒔) function, the z-transfer function is derived as
This gives a digital filter consisting of a first-order and a second-order
filter in parallel.
3
2 31
2 2 2 2( )
( )( )
c
c c c c c c
R s RRH s
s s s s s s
1
1 1 2
2 2
1 1( )
1 1
3 3 3where, 2 cos , cos sin / 3
2 2 2
c c
c c
c T T
T T
c c c
zH z
e z z e z
T T Te e
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 13/46
Because of aliasing, we cannot design a bandstop or highpass digital
filter by taking the z-transform without first bandlimiting the function
𝑯(𝒔)to be transformed. This involves multiplying 𝑯(𝒔) by a so-called
guardband filter 𝑮 𝒔 , which is a lowpass filter arranged such that
( ) ( ) 02
sG j H j for
Ex) A bandstop filter is required with stop band cutoff frequencies 𝒇𝒍 and
𝒇𝒖, and with 𝒇𝒉 being the highest frequency in the signal to be processed.
First design a suitable continuous-filter 𝑯(𝒔) of order 𝒏𝟏 that has the
required stopband with the specified sharpness of cutoff.
Then design a lowpass filter G(s) with cutoff frequency 𝒇𝒉 and with
attenuation 𝒂 dB, at frequency 𝒇𝒓, where
, :r s u sf f f f sampling frequency
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 14/46
The order of guardband filter is given by
( ※ Refer to Butterworth filter design)
The attenuation 𝒂 must be sufficient to ensure negligible aliasing into the
periodic response at 𝒇𝒓. The magnitude of 𝑮(𝒔)𝑯(𝒔) after multiplying the
guardband filter is shown in
The product 𝑮(𝒔)𝑯(𝒔) yields a digital filter of order 𝒏 = 𝒏𝟏 + 𝒏𝟐.
Note that the if the sampling frequency is increased, the cutoff requirement
–and hence the order of the guardband filter –may be reduced.
(∵ Large 𝒇𝒓 ⇒ Large 𝒇𝒔 )
2
20log r
h
an
f
f
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 15/46
4.3 Designing Digital Filters By Numerical Approximation to an Integration
4.3.1 Introduction
We have seen that in designing a digital filter by means of the z-transform,
we use the mapping 𝒛 = 𝒆𝒔𝑻 to go from points in the 𝒔-plane to points in the
𝒛-plane. ⇒We have to be cautious for keeping sampling time to avoid
aliasing problem.
As mentioned earlier, there are several different ways of going from the 𝒔-
plane to the 𝒛-plane.
★Numerical Approximation
Let the continuous system be
where,
( )( ) ,
( )
Y s aH s y ay ax
X s s a
0
( ) ( ) ( )t
dyay ax
dt
y t a y x d
t kT
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 16/46
( 1)
0( 1) ( ) ( )
k T
y k a y x d
0
( 1)
0 ( 1)
( ) ( ) ( )
( ) ( ) ( ) ( )
( 1)
kT
k T kT
k T
y k a y x d
a y x d a y x d
y k y
⇒ This is obtained as a recursive form if Δy is calculated.
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 17/46
※We will consider three different ways to approximate Δy:
1. Forward rectangular approximation
2. Backward rectangular approximation
3. Trapezoidal approximation
We shall see that each of these numerical approximations indicates how to
convert a continuous filter to a digital filter by means of an appropriate
replacement for 𝒔.
Note that there is no actual sampling involved in going from a continuous
filter function 𝑯(𝒔) to a digital filter function 𝑯(𝒛) via any of the following
transformations.
However, the notation T is retained to denote the time step of the digital filter
𝑯(𝒛).The sampling frequency 𝝎𝒔 is the frequency that corresponds to time step 𝑻.
It is defined as 2s
T
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 18/46
When we compare this with
, we can get a digital filter from continuous filter by replacing in the
. That means that s is replaced as .
( )
aH s
s a
1 1
1
1
( ) 1 ( )
( )( )
1( ) 1 1
Y z aT z Y z aTz X z
Y z aTz aH z
zX z aT za
T
4.3.2 Forward Rectangular Approximation
1 1y ay k ax k T
1zs
T
( ) 1 ( ) ( 1) 1 1
1 1 1
y k y k y k y k aTy k aTx k
aT y k aTx k
1
zs
T
( )a
H ss a
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 19/46
Let us check this transformation to see whether it gives a stable digital
filter from stable continuous filter. The mapping is implies as follows: 1
1
1 ( (1 )
1 ,
0 1 , 0 1 , 0 1
zs z Ts
Tz u jv T j T jT
u T v T
u u u
However it also contains a much larger area of unstable points. It follows
that a stable continuous filter could produce an unstable digital filter by the
forward rectangular approximation.
ex) 𝑯(𝒛) has a pole 𝒛 = 𝟏 − 𝒂𝑻. Hence if 𝒂𝑻 > 𝟐, or 𝑻 > 𝟐/𝒂, the pole lies
outside the unit circle, and H(z) is unstable.
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 20/46
4.3.3 Backward Approximation
( ) ( )
( ) ( 1)
y au k ax k T
y k y k ay k ax k T
1
1 1
1 ( ) ( )
aT y k y k aTx k
aT z Y z aTX z
1
1
( )( )
( ) 1 1 /
1 Comparing ( )
1Replacing ( ) ( )
,
zs
Tz
Y z aT aH z
X z aT z z Tz a
a zH s s
s a Tz
zs H z H s
Tz
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 21/46
1 1 1 1 1 1 1
1 2 1 2 2 2 1
Tswhere z
Ts Ts Ts
2 2 2 2
2 2 2
1 1 1 1 1
2 2 1 2 1
1 11
2 1 1
1 1 2
2 1
Ts T j Tz
Ts T j T
T j T T j T
T j T T j T
T T j T
T T
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 22/46
2 2
2 2
2 2 2 2 2 2 2 2 2
2 2 2 2 2 2
0 ( )
1 1 1 2
2 2 1
1 1 (1 ) 4 1 (1 ) 1
2 4 (1 ) 4 (1 ) 4
1 1
2 2
,if s j
T j Tz
T
T T Tz
T T
z
It shows that a large part of interior of the unit circle can be mapped only
from unstable continuous filters.
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 23/46
4.3.4 Trapezoidal Approximation ( Bilinear Transform )
1 1 ( ( ) )2
1 12
Ty a y k x k a y k x k
Ta y k y k a x k x k
∴ The transfer function is
1 1
11 11
1
(1 ) (1 )
2 2( )2 12 1
1 11 12 12 2 1
2 1
1
z zaT aT
a aH z
aT zaT aT zz z az a
T zT z
zs Bilinear Transform
T z
( ) 1
1 ( 1) ( )1
2 2
y k y k y
y k y k x k x ky k aT aT
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 24/46
If we let ,
then equating the real and imaginary parts gives ,
2c
T
( 1)
( 1)
u jvs j c
u jv
2 2
2 2 2 2
2 2
2 2 2 2
2 2 2
2 2 2
( 1) ( 1) ( 1) 2
( 1) ( 1)
1 2
( 1) ( 1)
1 0
1 0
u jv u jv u v jvc c
u v u v
u v vc c
u v u v
r u v
r u v
1, ,
1
jzs c s j z re u jv
z
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 25/46
Because , maps onto the unit circle
in the z-plane.
2 2 2r u v 2 20 ( 1) u v
0 2 2
2 2
1
( 1)
u vc
u v
2 2 1 u v 2 1That is r
0 2 2 1, 1 u v r
Therefore, a stable continuous filter gives a stable digital filter with this
bilinear transformation
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 26/46
※ The relation between the frequency 𝝎 on s-plane and the frequency 𝝎𝑫 on z-
plane :
Because ,
From the bilinear transform, If we let ,
using
Thus the relationship between frequencies with respect
to the continuous time domain and the discrete time domain
is given by
⇒ It is evident that frequency distortion,
or warping is the price paid for having
no aliasing.
sTz e Dj T j T
De e
, exp( )Ds j z j T
/ 2 / 2
/ 2 / 2
exp( ) 1tan
exp( ) 1 2
D D
D D
j T j T
D D
j T j T
D
j T e e Tj c c jc
j T e e
tan2
DTc
1
1
zs c
z
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 27/46
Alternatively, the transformation could be carried out in two steps from s-
plane to p-plane via,
And from p-plane to s-plane via
tan2
pTs c
pTz e
,2
,2
s
s
j p
j p
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 28/46
※
The magnitude response 𝑯(𝒋𝝎) of a suitable continuous lowpass filter
function is transformed into the magnitude response 𝑯(𝒋𝝎𝑫𝑻) of a digital
filter by the bilinear transform.
( ) ( )DH j H j T
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 29/46
At near around 𝝎𝒔/𝟐, the digital filter would be in error because of the
frequency warping. ⇒ Therefore, we have to pre-warp the critical
frequencies, 𝝎𝑫 , of the continuous filter.
Note that the magnitude response of the digital filter terminates at 𝝎𝒔/𝟐 .
Furthermore, the passband and stopband do not undergo much distortion,
because the response is reasonably flat in those ranges.
Thus, although this method of designing digital filters is suitable for filters
that have piecewise-constant magnitude responses (such as LPF, BPF, HPF,
and BSF), it would not be suitable for designing, say, a differentiator, whrein
the magnitude response is continuously changing.
However, where the response is rapidly changing, as in the transition region,
there is considerable distortion of the response, compared with that of the
continuous filter.
Because of the frequency distortion, the phase response of a digital filter that
results from the bilinear transform of, say, a continuous filter with
approximately linear phase (such as Bessel filter) is decidedly nonlinear.
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 30/46
※ The bilinear transform of a continuous filter function
Substitute
When the critical frequency 𝝎𝑫 of digital filter is given, the filter
specification should be transformed to the specification of a continuous
filter. And then design H(s). ⇒ Design H(z).
1
1
zs c
z
1 11
1
1 1
1( ) ( )
1( ) ( ) ( )
1( ) ( )
1
m m
i i
i iz
n ns cz
i i
i i
zs c
zH s H z H s
zs c
z
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 31/46
※ The procedure for using the bilinear transform to design a digital
filter to meet certain specifications is as follows:
1. Convert the critical frequencies 𝝎𝑫𝒊 specified for the digital filter to
the corresponding frequencies in the s-domain by relationship as
follows:
2. Design a continuous filter 𝑯(𝒔) that has the desired properties of the
digital filter at the frequencies 𝝎𝒊. The continuous filter does not
have to be implemented.
3. Replace s by in 𝑯(𝒔) to obtain 𝑯(𝒛), which is the
required digital filter.
tan2
Dii
Tc
1
1
zs c
z
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 32/46
Ex 4.2)
Using the bilinear transform, design a highpass filter, monotonic in
passband and stopband, with cutoff frequency of 1000 Hz and down 10
dB at 350 Hz. The sampling frequency is 5000 Hz . The gain should
be unity in the passband.
Solve)
We must pre-warp the critical frequencies as follows:
11 1 1
22 2 2
22 700 ( / ) tan 2235 /
22
2 2000 ( / ) tan 7265 /2
DD
DD
Tf rad s rad s
TT
f rad s rad sT
41/ 2 10 sec sT f
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 33/46
The frequency 𝝎𝒓 for the normalized approximation to be continuous
lowpass prototype is
∴ n=1⇒ The first-order Butterworth approximation
2
1
1 2
1 2
10 10
72653.2504
2235
( 3.2504 , 1 3.2504)
100.9767
20log 20log 3.2504
r
l l l
n n n r
r
ss
an
1( )
1n n
n
H ss
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 34/46
① Continuous highpass filter with cutoff frequency highpass filter 𝝎𝒍 via
the transformation
Now we transform 𝑯(𝒔) into a digital filter by replacing 𝒔 with
1Substitute ( )
1
ln
l l
ss H s
s s
s
4
24
1
1
2 1( 1) ( 1)1( )
2 1 ( 1) ( 1) ( ) ( )
11
2 2where 10 , 7265
2 101 1
( ) 0.5792 0.57920.1584 1 0.1584
l l ll
ll
l
l
zc z c zT zH z
z c z z c z c
T zc z
ccz
c
cT
z zH z
z z
2 1
1
zs
T z
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 35/46
∴ The corresponding difference equation is
A pole-zero plot and a rough magnitude response obtained graphically
from the pole-zero plot are shown as the following figure. The maximum
gain at the operating range of the filter ends,
is attained as
( ) 0.1584 ( 1) 0.5792 ( ) ( 1)y k y k x k x k
12
sT z
1
1 1( ) 0.5792 1
1 0.1584zH z
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 36/46
② In case of passband
③ In case of stop band
2
0 0 00
0
, , n n l n l
s ss B
Bs B s
00
0
n
Bs
s
s
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 37/46
0.1584
0.3249
0.7265
1.3764
, 1, ,4( / )Di i rad s tan2
Dii
T 1, , 4i
2
1
0.32492.0511
0.1584
4
3
1.37641.8946
0.7265
200
800
1200
400
Ex 4.3) Using the bilinear transform, design a bandstop digital filter, with
stopband 100 to 600Hz. The magnitude response should be monotonic in the
stopband and should have a ripple of about 1.1 dB in the passband. The
response should be down at least 20dB at 200 Hz and 400 Hz. Use a 2000 Hz
sampling rate.
Solution)
The critical frequencies for the digital filter and the corresponding
Frequencies for the continuous filter are given as following table.
41/ 5 10 secsT f
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 38/46
The normalized lowpass filter frequencies 𝝎𝒏, and the continuous
bandstop filter frequencies 𝝎𝒊 are related by
4 1
2 2 2
0 0 1 4
1.218,
0.218
i
ni
i
BB
2 2
3 4
1.218 0.32493.54
0.3249 0.218
2.85 , 1 /
n
n n rad s
For the normalized filter, .
We must design Chebyshev type I filter because a ripple in the passband is
specified
2 3
1 4
min , 2.85n nr
n n
12
102
120log ( 1.1 )
1R dB
1.11 1
10 102 2(10 1) (10 1) 0.5369R
1 2
1.218 0.15841
0.1584 0.218n
2 2
0
n
Bss
s
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 39/46
And also
∴ n=3
For a third-order Chebyshev type I filter
10 10( 20) 20log 6( 1) 20 log rL n n
10
10
( 6 20log )2.1
(6 20log )r
Ln
2 1 2 1sinh cos cosh sin , , , 1, , 1
2 2 2 2 2
1, , 0, 1,sinh co 2, ,
2
0
s co
.4766 , 0
sh sin
.2383 0.9593
kk k
jn
k k n n nj n even k
n ns
nn odd k
s j
n
1
2
1 1 1 1 1sinh ln( 1) 0.46013
sinh 0.4766, cosh 1.10772 2
n n
e e e e
10 10 10
1
10 10
20log ( ) 20log 20log ( )
20log 20log 2
r n r
n n
r
L H j C
L
1( )
( )r
n r
H jC
2.85r
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 40/46
Use the frequency transformation
To obtain the sixth-order continuous bandstop filter
2 2
0
n
Bss
s
1
2 2 2
0
( )2
n
n n n
KH s
s s s as a b
2 2
0
2 2 3
2 0
2 2 4 3 2
0 3 2 1 0
0
212 4 1 0 1 42 2
0
22
3 2 02 2 2 2
240
1 0 02 2
( )( ) ( )
, ,( )
2, , 2
( ) ( )
2,
( )
n
Bsn ss
K sH s H s
Bss s c s c s c s c
s
KK B
s a b
aB Bc c
a b a b
aBc c
a b
단
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 41/46
Applying the bilinear transform (c=1 )
1
1
zs
z
2
2 0
2
01
2 4 3 21 1 0 3 2 1 0
2 3
0 2
2
0 3 2 1 0
0
2
02
0 0 3 1 0
1 0 32 2 3 20 0
0 0
2(1 )1
(1 )( ) ( )
( 2 )( )
(1 ),
(1 )(1 )
(1 )(1 ) (2 2 )
, , 2(1
(1 ) (1 )
zs
z
zK z
H z H sz d z d z e z e z e z e
KK
Bc c c c
s
B
s c c cd d e
B B c c
s s
단
1 0
2 0 3 1 0 3 2 1 0
2 1 2
3 2 1 0 3 2 1 0 3 2 1 0
2 3
2 2
)
(3 3 ) (2 2 ) (1 )2 , 2 ,
(1 ) (1 ) (1 )
0.1285( 1.2841 1)( )
( 0.8376)( 0.4232)( 1.7950 0.8872)( 0.5229 0.6893)
c c
c c c c c c c c ce e e
c c c c c c c c c c c c
z zH z
z z z z z z
2 2 3
2 0
2 2 4 3 2
0 3 2 1 0
0
( )( )
K sH s
Bss s c s c s c s c
s
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 42/46
At
the filter has 6 zero.
Magnitude goes to zero
at 1747.40 rad/s = 278.11 Hz, and
should be stopband
exp( 1747.40 )z j T
0( )H j T
0( ) 0H j T
z transform using MatLab
Ex)
num=[b1 b2 b3 b4 b5 b6];
den=[a1 a2 a3 a4 a5 a6];
[numz1,denz1]=
c2dm(num,den,0.0005,'tustin')
2 2 3
2 0
2 2 4 3 2
0 3 2 1 0
0
( )( )
K sH s
Bss s c s c s c s c
s
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 43/46
Elliptic Filter>> numz=0.3182*[1 -2.4665 3.4253 -2.4665 1]
numz =
0.3182 -0.7848 1.0899 -0.7848 0.3182
>> denz=[1 -1.3166 0.6226 -0.4650 0.3368];
>> dsys=tf(numz,denz, 0.0005)
dsys =
0.3182 z^4 - 0.7848 z^3 + 1.09 z^2 - 0.7848 z + 0.3182
------------------------------------------------------
z^4 - 1.317 z^3 + 0.6226 z^2 - 0.465 z + 0.3368
Sample time: 0.0005 seconds
Discrete-time transfer function.
>> bode(dsys)
>> grid
>> hold on
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 44/46
4.4 Designing Digital Filters by Means of The Matched Z-transform.
The matched z-transform is based on heuristic reasoning derived partly from
experience gained with the standard z-transform.
Poles and zeros of H(s) are matched with poles and zeros of H(z)
(4.79)
H(s) is transformed according to the following rules to get the digital filter
function H(z)
1. Replace real poles and zeros 𝒑𝒊 and 𝒔𝒊 by 𝐞𝐱𝐩(𝑻𝒑𝒊) and 𝐞𝐱𝐩(𝑻𝒔𝒊)
2. Replace complex poles and zeros, say
where
1
1
( )
( ) ,
( )
m
i
i
n
i
i
K s s
H s n m
s p
, by exp( ) i ip or s a jb r j
exp( ) ,r aT bT
1
1
( )
( ) ,
( )
i
i
ms T
D
i
np T
i
K z e
H z n m
z e
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 45/46
3. All zeros of H(s) at 𝒔 = ∞ are mapped in H(z) the point 𝒛 = −𝟏.
𝑳 = 𝒏 −𝒎, If s →∞, z→ −1
4. Select the gain constant of H(z) to match the gain of H(s) at passband
center or at some other critical point.
Like the z-transform, the matched z-transform is restricted to bandlimited
functions(unless a guardfilter is used) because of the aliasing problem.
Rule 4 deals with the prescribed gain constant of the digital filter. It is often
required that the gain of a filter be unity (zero dB) in the passband.
, where L = n-m
1
0 1
1
( )
lim ( ) lim ( 1)
( )
i
i
ms T
L iD ns z
p T
i
z e
H s K z
z e
1
( )z
H z
1
1
(1 )
2 (1 )
i
i
mp T
iD n
s TL
i
e
K
e
1
1
( )
( 1)
( )
i
i
ms T
L i
D np T
i
z e
K z
z e
1
lim lim( 1)L L
s zs z
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 46/46
Ex 4.4) Use the matched z-transform to design a digital lowpass filter
from the continuous lowpass filter
The gain is unity at 𝝎 = 𝟎 and T=0.1 s
Solution)
1. pole :
2. zero :
3. By rule 3, s→∞ , there are two zeros at 𝒛 = −𝟏, Therefore
2
4( )
( 1)( 2 4)
sH s
s s s
0.11 , 1 3 0.9048
0.9048 , 3 0.1 0.1732
T
aT
s s j e e
r e bT
0.44 0.6703 KTs e e
2
2
( 1) ( 0.6703)( )
( 0.9048)( 1.78252 0.8187)
DK z zH z
z z z
2
1
2 (1 0.6703)( ) 1
(1 0.9048)(1 1.78252 0.8187)
0.0026
D
z
D
KH z
K
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 47/46
4.6 General Transform Techniques
Two methods for designing recursive digital filters from continuous filter
functions.
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 48/46
’18 Digital Signal Processing TERM PROJECT
1. First, measure a signal from a sensor(ex: thermocouple, potentiometer, strain
gauge, and etc.) in your LAB and then get the digital signal through AD
converter. Second, get the FFT spectrum using 1024 poins data and 4096 points
data and then compare the results and difference between 1024 points FFT and
4096 points FFT. Third, show that the IFFT signal is almost recovered comparing
with original signal. If you have a problem getting a signal from sensor, you can use
function generator. (Please make FFT and IFFT Program algorithm by yourself)
2. Design a digital LPF(IIR type, Chevyshev and Butterworth) for eliminating
undesirable signal from mixed signals with two more frequencies(ex: 60Hz,
300Hz). Show by simulation and experiment results that the designed filter can be
used to eliminate noise in real time.
3. Design FIR filter and IIR filter to eliminate noise which is over a desired frequency
band in your LAB experiment system. And then compare the effect of eliminating
noise. If you don't have an experiment system for getting a signal from sensor in
your LAB, you can set up arbitrary system.
Pusan National UniversityMeasurement & Control Lab.
Digital Signal Processing 49/46
‘18 Digital Signal Processing Term Project Evaluation List
Name
Complexity
of Setting
System
(50 points)
Filter Design
and Filter
Type (50
points)
Evaluation
by
Simulation
(50 points)
Analysis of
Experiment Result
and Completion
Rate (100 points)
A general Review
(100 points)
(Representation,
Term Report, etc.)