Upload
clemence-chase
View
232
Download
0
Embed Size (px)
Citation preview
Contents- 9Contents- 9 장 추가장 추가
Introduction
Preliminaries
Analog-to-Digital Filter Transformations
LowPass Filter Design Using Matlab
Frequency-Band Transformations
Comparison of FIR vs. IIR Filters
Contents
Introduction( 서론 )
Preliminaries( 예비 사항 )
- Absolute Specifications( 절대 사양 )
- Relative Specifications( 상대 사양 )
Properties of Linear-Phase FIR Filters( 선형 위상 필터의 특성 )
- Impulse Response( 임펄스 응답 )
- Frequency Response( 주파수 응답 )
- Zero Locations( 영점 위치 )
Introduction
디지털 신호 처리의 두 가지 시스템 형태
- Digital Filter( 디지털 필터 ): 시간 영역에서 신호 여과를 하는 시스템
- Spectrum Analyzer( 스펙트럼 분석기 ): 주파수 영역에서 신호를 표현
하는 시스템
Frequency Selective Type( 주파수 선택적 형태 )
- FIR 필터와 IIR 필터는 대부분 주파수 선택적 형태를 갖음 .
- 주로 다대역 (multi band), 저역통과 (low pass), 고역통과 (high pass)
대역통과 (band pass) 필터들을 설계
Introduction( 서론 ) - 1
Preliminaries - Absolute Specifications( 절대 사양 )
- Relative Specifications( 상대 사양 )
Preliminaries( 예비 사항 - 1)
디지털 필터의 설계 단계
- Specification( 사양 ): 필터를 설계하기 전에 몇 가지 사양을 가져야 함 .
ex) 정지대역의 끝 : 50dB, 통과대역의 끝 : 1dB
- Approximation( 근사 ): 사양 결정 후 , 사양을 근사시키는 작업 , 즉 , 주어
진 사양을 필터 표현으로 구현 .( 차분방정식 , 시스템 함수 , 또는 임펄스
응답의 형태를 갖는 필터 표현 )
- Implementation( 구현 ): 위 단계의 결과를 하드웨어나 컴퓨터 소프트웨 어로 구현
Preliminaries( 예비 사항 - 3)
Absolute Specifications( 절대 사양 ) 과 Relative Specifications( 상대 사양 )
- 은 이상적인 통과대역 응답에서 감수할 수 있는 허용오차 ( 또는 리플 )- 은 이상적인 정지대역 응답에서 감수할 수 있는 허용오차 ( 또는 리플 )
1
2
- 는 dB 로 나타낸
통과대역 리플
- 는 dB 로 나타낸 정지대역 감쇠
pR
sA
(a) 절대 사양
(b) 상대 사양
Preliminaries( 예비 사항 - 4)
예제 7.1
- 어떤 필터의 사양에서 통과대역 리플은 0.25dB 이고 , 정지대역 감쇠는 50dB 일때
, 을 구하라 .
Sol) 즉 , 절대 사양을 알 때 , 상대 사양에서의 허용오차를 구하라 . 이므로 ,
통과대역 리플 , 정지대역 리플 pR sA
)0(01
1log20
1
110
pR )1(01
log201
210
sA
1 2
25.01
1log20
1
110
pR
0144.0
9716.0101
1
0125.020
25.0
1
1log
1
0125.0
1
1
1
110
예제 7.2
- 통과대역 허용오차 =0.01, 정지대역 허용오차는 =0.001 이 주어질 때 , 통과
대역 리플 와 저지대역 감쇠 를 구하라 .
Sol) 즉 , 절대 사양을 알 때 , 상대 사양에서의 허용오차를 구하라 .
1
또한 , 이므로
0032.0
5.20144.01
log
500144.01
log20
501
log20
2
210
210
1
210
sA
2
pR sA
dBRp 1737.001.01
01.01log20 10
dBAs 09.4001.01
001.0log20 10
Preliminaries( 예비 사항 - 5)
Analog-to-Digital Filter Transformations
OverviewOverview
Complex-Valued Mapping
Impulse Invariance Transformation
Finite Difference Approximation Transformation
Step Invariance Transformation
Bilinear Transformation
We sample at some sampling interval to obtain
Impulse Invariance TransformationImpulse Invariance Transformation
Sampling Operation : the analog and digital frequencies are related
by
Since on the unit circle and (analog frequency) on the
imaginary axis, we have the following transformation from the s-plane to
the z-plane:
The system function and are related through the
frequency-domain aliasing formula
)(tha T )(nh
)()( nThnh a
T or Tjj ee
sTez
jez js
)(zH )(sH a
k
a kTjsH
TzH )
2(
1)(
1. Given digital frequency, choose and determine the analog
frequencies
Design ProcedureDesign Procedure
2. Design an analog filter using the specifications
and
3. Using partial fraction expansion, expand into
T
Tand
Ts
sp
p
N
kTpk
ze
RzH
k1
11)(
)(sH a,p
sA
,s pR
)(sH a
4. Transform analog poles into digital poles to obtain the
digital filter
}{ kp }{ Tpke
N
k k
ka ps
RsH
1
)(
Example 1Example 1
Transform
Into a digital filter using the impulse invariance technique
in which =0.1
65
1)(
2
ss
ssH a
)(zH
T
We first expand using partial fraction expansion :
(Solution)
)(sH a
2
1
3
2
65
1)(
2
ssss
ssH a
31 p 22 p
T
21
1
1213 6065.05595.11
8966.01
1
1
1
2)(
zz
z
zezezH
TT
The poles are at and . Then from (8.25) and using
=0.1, we obtain
Example 2Example 2
Demonstrate the use of the imp_invr function on the system
function from Example 1
(Solution)
b = 1.0000 -0.8966
a = 1.0000 -1.5595 0.6065
Example 3Example 3
Design a lowpass digital filter using a Butterworth prototype to
satisfy,2.0 p
(Solution)
dBRp 1
,3.0 s dBAs 15
The desired filter is a 6th-order butterworth filter whose system
function is given in the parallel form
21
1
21
1
3699.00691.11
1454.11428.2
257.09973.01
6304.08587.1)(
zz
z
zz
zzH
)(zH
21
1
6949.02972.11
4463.02871.0
zz
z
Example 4Example 4
Design a lowpass digital filter using a Chebyshev-I prototype to
satisfy,2.0 p
(Solution)
dBRp 1
,3.0 s dBAs 15
The desired filter is a 4th-order Chebyshev-I filter whose system
function is
21
1
21
1
6549.05658.11
0239.00833.0
8392.04934.11
0246.00833.0)(
zz
z
zz
zzH
)(zH
Example 5Example 5
Design a lowpass digital filter using a Chebyshev-II prototype to
satisfy,2.0 p
(Solution)
dBRp 1
,3.0 s dBAs 15
Example 6Example 6
Design a lowpass digital filter using an elliptic prototype to
satisfy,2.0 p
(Solution)
dBRp 1
,3.0 s dBAs 15
Bilinear TransformationBilinear Transformation
This mapping is the best transformation method; it involves a
well-known function given by
2/1
2/1
1
121
1
sT
sTz
z
z
Ts
Another name for this transformation is the linear fractional
transformation because when cleared of fractions, we obtain
0122
zsT
szT
Which is linear in each variable if the other is fixed, or bilinear in s
and z.
Substituting in (8.27), we obtain 0
jeT
j
Tj
z
21
21
since the magnitude is 1. Solving for digital frequency as a function of analog frequency , we obtain
2tan
2
2tan2 1
Tor
T
This shows that is nonlinearly related to (or warped into) but that there is no aliasing. Hence in (8.28) we will say that is prewarped into
Example 6Example 6
Transform into a digital filter using the bilinear
transformation. Choose =165
1)(
2
ss
ssH a
T
Using (8.26), we obtain
(Solution)
1
1
1
1
1
1
12
1
12)(
z
zH
z
z
THzH a
T
a
61125
112
1112
1
12
1
1
1
1
zz
zz
zz
Simplifying,
2
21
1
21
2.01
05.01.015.0
420
23)(
z
zz
z
zzzH
Example 7Example 7
Transform the system function in Example 1 using the
bilinear function
)(sH a
(Solution)
2
21
2.01
05.01.015.0)(
z
zzzH
1. Choose a value for . This is arbitrary, and we may set
Design ProcedureDesign Procedure
2. Prewarp the cutoff frequencies and ; that is, calculate
and using (8.28) :
T
1
1
1
12)(
z
z
THzH a
p p
s
4. Finally, set
and simplify to obtain as a rational function in
1T
s
2tan
2,
2tan
2 ss
pp TT
3. Design an analog filter to meet the specification and . We
have already described how to do this in the previous section.
)(sH a,p
sA
,s pR
1z)(zH
Example 8Example 8
Design the digital Butterworth filter of Example 3. The
specifications are,2.0 p
(Solution)
dBRp 1
,3.0 s dBAs 15
)7149.03143.11)(3753.00541.11)(2342.09459.01(
)1(00057969.0)(
212121
61
zzzzzz
zzH
Example 9Example 9
Design the digital Chebyshev-I filter of Example 4. The
specifications are ,2.0 p
(Solution)
dBRp 1
,3.0 s dBAs 15
)6493.05548.11)(8482.04996.11(
)1(0018.0)(
2121
41
zzzz
zzH
Example 10Example 10
Design the digital Chebyshev-II filter of Example 5. The
specifications are ,2.0 p
(Solution)
dBRp 1
,3.0 s dBAs 15
)7183.01325.11)(1503.04183.01(
)0671.11)(5574.01(1797.0)(
2121
2121
zzzz
zzzzzH
Example 11Example 11
Design the digital elliptic filter of Example 6. The specifications are
,2.0 p
(Solution)
dBRp 1
,3.0 s dBAs 15
)6183.01)(8612.04928.11(
)1)(4211.11(1214.0)(
121
121
zzz
zzzzH
Lowpass Filter Design Using Matlab
1. [b, a] = butter(N, wn)
2tan
2 1 Tcn
2. [b, a] = cheby1(N, Rp, wn)
/pn
3. [b, a] = cheby2(N, As, wn)
/sn
4. [b, a] = ellip(N, Rp, As, wn)
/pn
,2.0 p dBRp 1
,3.0 s dBAs 15
Example 12Example 12
Digital Butterworth lowpass filter design :
(Solution)
)7149.03143.11)(3753.00541.11)(2342.09459.01(
)1(00057969.0)(
212121
61
zzzzzz
zzH
Example 13Example 13
Digital Chebyshev-I lowpass filter design :
(Solution)
)6493.05548.11)(8482.04996.11(
)1(0018.0)(
2121
41
zzzz
zzH
Example14Example14
Digital Chebyshev-II lowpass filter design :
(Solution)
)7183.01325.11)(1503.04183.01(
)0671.11)(5574.01(1797.0)(
2121
2121
zzzz
zzzzzH
Example 15Example 15
Digital elliptic lowpass filter design :
(Solution)
)6183.01)(8612.04928.11(
)1)(4211.11(1214.0)(
121
121
zzz
zzzzH
Comparison of Three FiltersComparison of Three Filters
,2.0 p dBRp 1
,3.0 s dBAs 15
This comparison in terms of order N and the minimum stopband
attenuations is shown in Table 8.1.
Prototype Order N Stopband Att.
Butterworth 6 15
Chebyshev-I 4 25
Elliptic 3 27
Frequency-Band Transformations
1
21
1
A
1
p s
)( jeH
0
1
21
1
A
1
ps
)( jeH
0
1
21
1
A
1
1s
1p
)( jeH
02p
2s
1
21
1
A
1
1p
1s
)( jeH
02s 2p
Lowpass Highpass
Bandpass Bandstop
Figure 8.20 Specifications of frequency-selective filters
Typical specifications for most commonly used types of frequency-selective digital
filters are shown below
Let be the given prototype lowpass digital filter
Let be the desired frequency-selective digital filter
using two different frequency variables, and , with
and , respectively.
Define a mapping of the form
Such that
)(ZH LP
)(zH
Z z LPH H
)( 11 zGZ
)( 11)()(
zGzLP ZHzH
1. G( ) must be a rational function in so that is implementable 1z )(zH
2. The unit circle of the Z-plane must map onto the unit circle of the z-plane
3. For stable filters, the inside of the unit circle of the Z-plane must also map onto the inside of the unit circle of the z-
plane
Let and be the frequency variables of Z and z
and on their respective unit circles
Then requirement 2 above implies that
''jeZ
1)()( 11 jeGzGZ
jez
and)(' )(
jeGjjj eeGe
or
)(' jeG The general form of the function G( ) that satisfies the above
requirements is a rational function of the all-pass type given by
n
k k
k
z
zzGZ
11
111
1)(
Where for stability and to satisfy requirement 31k
1
11
1
z
zZ
1
11
1
z
zZ
111
22
21
12
1
zz
zzZ
111
22
21
12
1
zz
zzZ
c'
]2/)'sin[(]2/)'sin[(
cc
cc
c'
]2/)'cos[(]2/)'cos[(
cc
cc
)1/(21 KKu
)1/()1(2 KK
]2/)cos[(
]2/)cos[(
u
u
2tan
2cot cuK
cutoff frequency of new filter
cutoff frequency of new filter
lower cutoff frequency
upper cutoff frequency
)1/(21 KKu
)1/()1(2 KK
]2/)cos[(
]2/)cos[(
u
u
2tan
2cot cuK
lower cutoff frequency
upper cutoff frequency
Type of Transformation Transformation Parameters
Lowpass
Highpass
Bandpass
Bandstop
Example 16Example 16
In Example 13 we designed a Chebyshev-I lowpass filter with
specifications
and determined its system function
Design a highpass filter with the above tolerances but with
passband beginning at
,2.0' p dBRp 1
,3.0' s dBAs 15
)6493.05548.11)(8482.04996.11(
)1(0018.0)(
2121
41
zzzz
zzH LP
,6.0 p
(Solution)
From Table 8.2
38197.0]2/)'cos[(]2/)'cos[(
cc
cc
Hence
1
1
38197.01
38197.0)()(
z
zzLP ZHzH
)4019.00416.11)(7657.05661.01(
)1(02426.02121
41
zzzz
z
which is the desired filter
Example 17Example 17
Use the zmapping function to perform the lowpass-to-highpass
transformation in Example 16
(Solution)
)4019.00416.11)(7647.05661.01(
)1(0243.0)(
2121
41
zzzz
zzH
The system function of the highpass filter is
Which is essentially identical to that in Example 8.25
Design ProcedureDesign Procedure
Use the highpass filter of Example 17 as an example
The passband-edge frequencies were transformed using the parameter
Let and determine from using the formula from Table 8.2.
38197.0]2/)3.0cos[(
]2/)3.0cos[(
s
s
38197.0?s
4586.0s 2.0' p p
Now can be determined from and
Where
and , or
Continuing our highpass filter example, let and be the band-edge frequencies. Let us choose . Then
from (8.30), and from (8.31)
as expected.
11 z
e sj
s
sjeZ '
38197.0
6.0p
s'
1
1
1
z
zZ
sjeZ 4586.0s
2.0' p
3.038197.01
38197.038197.0
4586.0
j
j
s e
e
Example 18Example 18
Design a highpass digital filter to satisfy
Use the Chebyshev-I prototype.
,6.0 p
(Solution)
dBRp 1,4586.0 s dBAs 15
)4019.00416.11)(7647.05661.01(
)1(0243.0)(
2121
41
zzzz
zzH
The system function is
Which is identical to that in Example 8.26
Matlab ImplementationMatlab Implementation
[b, a] = BUTTER(N, wn, ‘high’) designs an Nth-order highpass filter with
digital 3-dB cutoff frequency wn in units of
[b, a] = BUTTER(N, wn,) designs an order 2N bandpass filter if wn is a two-
element vector, wn=[w1 w2], with 3-dB passband w1 < w < w2 in units of
[b, a] = BUTTER(N, wn, ‘stop’) is an order 2N bandstop filter if wn=[w1, w2]
with 3-dB stopband w1 < w < w2 in units of
[N, wn]=buttord(wp, ws, Rp, As)
The parameters wp and ws have some restrictions, depending on the type of filter:
For lowpass filter wp < ws
For highpass filter wp < ws
For bandpass filter wp and ws are two-element vectors, wp=[wp1, wp2] and ws=[ws1,
ws2], such that ws1 < wp1 < wp2 < ws2
For bandstop filters wp1 < ws1 < ws2 < wp2
Now using the buttord function in conjunction with the butter function, we can
design any Butterworth IIR filter
Example 19Example 19
In this example we will design a Chebyshev-I highpass filter
whose specifications were given in Example 18.
(Solution)
)4019.00416.11)(7647.05661.01(
)1(0243.0)(
2121
41
zzzz
zzH
The cascade form system function
Is identical to the filter designed in example 8.27
Example 20Example 20
In this example we will design an elliptic bandpass filter whose
specifications are given in the following Matlab script :
(Solution)
The designed filter is an 8th-order filter
)9399.05963.01)(7929.02774.01)(7929.02774.01)(9399.05963.01(
)1(0197.0)(
21212121
81
zzzzzzzz
zzH
Example 21Example 21
Finally we will design a Chebyshev-II bandstop filter whose
specifications are given in following Matlab script.
(Solution)
The cascade form system function
)7602.089361)(3916.047131)(2145.02132.01)(4614.08901.01)(8031.03041.11(
)1(1558.0)(
2121212121
101
zzzzzzzzzz
zzH