Handouts F
Handouts F
Mike Brookes
Introduction: 1 1 / 16
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
1: Introduction
Introduction: 1 2 / 16
Organization
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
Introduction: 1 3 / 16
Signals
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
Introduction: 1 4 / 16
Processing
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
Modulation/demodulation
Coding and decoding
Interference rejection and noise suppression
Signal detection, feature extraction
Introduction: 1 5 / 16
Syllabus
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
Main topics:
Introduction/Revision
Transforms
Discrete Time Systems
Filter Design
FIR Filter Design
IIR Filter Design
Multirate systems
Multirate Fundamentals
Multirate Filters
Subband processing
Introduction: 1 6 / 16
Sequences
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
We denote the nth sample of a signal as x[n] where < n < + and
the entire sequence as {x[n]} although we will often omit the braces.
Special sequences:
1 n0
0 otherwise
(
1 n=0
Unit impulse: [n] =
0 otherwise
(
1 condition is true
Condition: condition [n] =
(e.g. u[n] = n0 )
0 otherwise
Right-sided: x[n] = 0 for n < Nmin
Left-sided: x[n] = 0 for n > Nmax
Finite length: x[n] = 0 for n
/ [Nmin , Nmax ]
Causal: x[n] = 0 for n < 0, Anticausal: x[n] = 0 for n > 0
P
2
Finite Energy: n=P
(e.g. x[n] = n1 u[n 1])
|x[n]| <
Introduction: 1 7 / 16
Time Scaling
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
n
fs
where fs =
1
T
Introduction: 1 8 / 16
z-Transform
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
Introduction: 1 9 / 16
Region of Convergence
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
The set of z for which X(z) converges is its Region of Convergence (ROC).
Complex analysis : the ROC of a power series (if it exists at all) is always
an annular region of the form 0 Rmin < |z| < Rmax .
X(z) will always converge absolutely inside the ROC and may converge on
some, all, or none of the boundary.
P+
converge absolutely n= |x[n]z n | <
finite Rmin = 0, Rmax =
ROC may included either, both or none of 0 and
absolutely summable X(z) converges for |z| = 1.
right-sided Rmax =
causal X() converges
left-sided Rmin = 0
anticausal X(0) converges
Introduction: 1 10 / 16
z-Transform examples
The sample at n = 0 is indicated by an open circle.
u[n]
1
1z 1
1 < |z|
x[n]
2z 2 + 2 + z 1
x[n 3]
2z + 2 + z
0 < |z|
n u[n]=0.8
1
1z 1
n u[n 1]
1
1z 1
0 |z| <
nu[n]
z 1
12z 1 +z 2
1 < |z|
sin(n)u[n]=0.5
z 1 sin()
12z 1 cos()+z 2
1 < |z|
cos(n)u[n]=0.5
1z 1 cos()
12z 1 cos()+z 2
1 < |z|
< |z|
Note: Examples 4 and 5 have the same z-transform but different ROCs.
Pr
Geometric Progression: n=q n z n =
q z q r+1 z r1
1z 1
Introduction: 1 11 / 16
Rational z-Transforms
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational
z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
Most z-transforms that we will meet are rational polynomials with real
coefficients, usually one polynomial in z 1 divided by another.
G(z) = g
QM
1
m=1 1zm z
QK
1 )
k=1 (1pk z
QM
(zzm )
gz KM Qm=1
K
k1 (zpk )
Introduction: 1 12 / 16
Rational example
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
G(z) =
82z 1
44z 1 3z 2
2z(z0.25))
Poles/Zeros: G(z) = (z+0.5)(z1.5)
Poles at z = {0.5, +1.5)},
Zeros at z = {0, +0.25}
ROC
0.75
1+0.5z 1
1.25
11.5z 1
0.75
1+0.5z 1
1.25
11.5z 1
G(z)
Introduction: 1 13 / 16
Inverse z-Transform
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse
z-Transform
MATLAB routines
Summary
1
2j
Proof:
H
1
n1
G(z)z
dz=
2j
1
2j
H P
n1
g[m]z
z
dz
m=
H nm1
(i) P
1
= m= g[m] 2j z
dz
(ii) P
= m= g[m][n m]= g[n]
m
(i) depends on the circle with radius R lying within the ROC
H k1
1
(ii) Cauchys theorem: 2j z
dz = [k] for z = Rej anti-clockwise.
H k1
R 2 k1 j(k1)
1
1
dz
j
e
jRej d
z
dz = 2j =0 R
d = jRe 2j
R
Rk 2 jk
= 2 =0 e d
= Rk (k)= (k)
[R0 = 1]
Introduction: 1 14 / 16
MATLAB routines
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
tf2zp,zp2tf
residuez
tf2sos,sos2tf
zp2sos,sos2zp
zp2ss,ss2zp
tf2ss,ss2tf
b(z 1)
a(z 1 ) {zm , pk , g}
P
b(z 1)
rk
1
k 1pk z 1
a(z )
Q b0,l +b1,l z1 +b2,l z2
b(z 1)
l 1+a1,l z 1 +a2,l z 2
a(z 1 )
Q b0,l +b1,l z1 +b2,l z2
{zm , pk , g} l 1+a1,l z1 +a2,l z2
(
x = Ax + Bu
{zm , pk , g}
y = Cx + Du
(
x = Ax + Bu
b(z 1)
a(z 1 )
y = Cx + Du
Introduction: 1 15 / 16
Summary
1: Introduction
Organization
Signals
Processing
Syllabus
Sequences
Time Scaling
z-Transform
Region of
Convergence
z-Transform examples
Rational z-Transforms
Rational example
Inverse z-Transform
MATLAB routines
Summary
Introduction: 1 16 / 16
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
Fourier Transforms: 2 1 / 13
Fourier Transforms
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
Forward Transform
R
X(j) = x(t)ejt dt
P
j
X(e ) = x[n]ejn
PN 1
kn
X[k] = 0
x[n]ej2 N
Inverse Transform
R
1
x(t) = 2 X(j)ejt d
R
1
x[n] = 2 X(ej )ejn d
PN 1
kn
1
X[k]ej2 N
x[n] = N 0
Fourier Transforms: 2 2 / 13
Convergence of DTFT
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
X(e
) converges uniformly
P
X(ej ) XK (ej ) 0
|x[n]|
<
sup
Weaker convergence:
x[n] finite energy X(ej ) converges in mean square
R
P
2
1
j
j 2
0
|x[n]| < 2 X(e ) XK (e ) d
K
Example: x[n] =
sin 0.5n
n
K=5
K=20
1
0.8
0.6
0.6
0.6
0.4
0.2
0.2
-0.2
0
0.1
0.2
0.3
0.4
/2 (rad/sample)
0.5
0.4
0.8
j
0.8
-0.2
0
K=50
0.4
0.2
0
0.1
0.2
0.3
0.4
/2 (rad/sample)
0.5
-0.2
0
0.1
0.2
0.3
0.4
/2 (rad/sample)
0.5
Gibbs phenomenon:
Converges at each as K but peak error does not get smaller.
DSP and Digital Filters (2014-5289)
Fourier Transforms: 2 3 / 13
>
0,
N
such
that
We are given that
|n|>N
P
For K N , sup X(ej ) XK (ej ) = sup |n|>K x[n]ejn
P
P
jn
=
sup
|n|>K |x[n]| <
|n|>K x[n]e
(2) Weak Convergence:
P
P
2
2
|x[n]|
<
>
0,
N
such
that
We are given that
|n|>N |x[n]| <
(
P
0
|n| K
[K] [n]ejn
Define y [K] [n] =
so that its DTFT is, Y [K] (ej ) =
y
x[n] |n| > K
P
PK
jn
jn
We see that X(ej ) XK (ej ) =
x[n]e
K x[n]e
P
P
[K] [n]ejn = Y [K] (ej )
= |n|>K x[n]ejn =
y
[K] 2
R
P
y [n] = 1 Y [K] (ej )2 d
From Parsevals theorem,
2
R
1
X(ej ) XK (ej )2 d
= 2
R
P [K] 2 P
1
j ) X (ej )2 d =
[n] = |n|>N |x[n]|2 <
X(e
Hence for K N , 2
K
y
DTFT Properties
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
X(z) = x[n]z n
DTFT converges iff the ROC includes |z| = 1.
DTFT is the same as the CTFT of a signal comprising impulses at
:
the sample times
P (dirac delta functions)P
x (t) = x[n](t nT )= x(t)
(t nT )
Equivalent to multiplying a continuous x(t) by an impulse train.
P
j
Proof: X(e ) = x[n]ejn
R
P
j Tt
dt
n= x[n] (t nT )e
(i) R P
t
= n= x[n](t nT )ej T dt
(ii) R
= x (t)ejt dt
P
(i) OK if
(ii) use = T .
|x[n]| < .
Fourier Transforms: 2 4 / 13
DFT Properties
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
DFT: X[k] =
j
PN 1
0
DTFT: X(e ) =
kn
x[n]ej2 N
x[n]ejn
2
N k.
Fourier Transforms: 2 5 / 13
Symmetries
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
If x[n] has a special property then X(ej )and X[k] will have corresponding
properties as shown in the table (and vice versa):
One domain
Discrete
Symmetric
Antisymmetric
Real
Imaginary
Real + Symmetric
Real + Antisymmetric
Other domain
Periodic
Symmetric
Antisymmetric
Conjugate Symmetric
Conjugate Antisymmetric
Real + Symmetric
Imaginary + Antisymmetric
Fourier Transforms: 2 6 / 13
Parsevals Theorem
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals
Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
x[n]y [n] =
1
N
PN 1
0
X[k]Y [k]
Fourier Transforms: 2 7 / 13
Convolution
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
h[n] :
g[n] h[n] :
g[n] 3 h[n]
Fourier Transforms: 2 8 / 13
Sampling Process
Time
Time
Frequency
CTFT
Analog
Low Pass
Filter
CTFT
Sample
DTFT
Window
DTFT
DFT
DFT
Fourier Transforms: 2 9 / 13
Zero-Padding
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
Zero padding means added extra zeros onto the end of x[n] before
performing the DFT.
Time x[n]
Frequency |X[k]|
Windowed
Signal
With zeropadding
Fourier Transforms: 2 10 / 13
Phase Unwrapping
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
-2
x[n]
0
(rad/sample)
|X[k]|
0
2
0
-20
-2
-2
0
(rad/sample)
X[k]
-40
-2
0
(rad/sample)
X[k] unwrapped
Fourier Transforms: 2 11 / 13
Summary
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
Fourier Transforms: 2 12 / 13
MATLAB routines
2: Three Different
Fourier Transforms
Fourier Transforms
Convergence of
DTFT
DTFT Properties
DFT Properties
Symmetries
Parsevals Theorem
Convolution
Sampling Process
Zero-Padding
Phase Unwrapping
Summary
MATLAB routines
fft, ifft
fftshift
conv
x[n]y[n]
unwrap
Fourier Transforms: 2 13 / 13
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy Compaction
Frame-based coding
Lapped Transform
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
Transforms: 3 1 / 15
DFT Problems
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy Compaction
Frame-based coding
Lapped Transform
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
N
2
1 conjugate pairs
N=20
f=0.08
Transforms: 3 2 / 15
DCT
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy Compaction
Frame-based coding
Lapped Transform
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
12
23
23
PN 1
n=0
PN 1
n=0
DCT: XC [k] =
n=0
f=
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
PN 1
x[n]
N=20
f=0.10
m
N
f 6=
m
N
N=20
f=0.08
|XF [k]|
|XC [k]|
DFT:
DCT:
Transforms: 3 4 / 15
DCT/DFT Equivalence
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy Compaction
Frame-based coding
Lapped Transform
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
y[r]
XC [k] =
PN 1
n=0
12
23
r even
0
Define y[r] = x r1
r = 1 : 2 : 2N 1
2
4N 1r
x
r = 2N + 1 : 2 : 4N 1
2
P4N 1
j2
kr
YF [k] = r=0 y[r]W4N
where WM = e M
(i) P2N 1
(2n+1)k
= n=0 y[2n + 1]W4N
(ii) PN 1
(2n+1)k
= n=0 y[2n + 1]W4N
P 1
(4N 2m1)k
+ N
y[4N
2m
1]W
4N
m=0
P 1
(iii) P
(2n+1)k
(2m+1)k
=
x[n]W4N
+ N
x[m]W
4N
m=0
P 1
2(2n+1)k
= 2XC [k]
=2 N
x[n]
cos
n=0
4N
4N k
4N
1
Transforms: 3 5 / 15
DCT Properties
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy Compaction
Frame-based coding
Lapped Transform
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
3:
0:
1:
4:
2:
5:
Transforms: 3 6 / 15
IDCT
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy Compaction
Frame-based coding
Lapped Transform
1
4N
P4N 1
y[r] =
x[n] = y[2n
P4N 1
rk
rk
1
k=0 Y [k]W4N = 2N
k=0 X[k]W4N
P4N 1
(2n+1)k
1
[Y [k]
+ 1] = 2N k=0 X[k]W4N
= 2X[k]]
Y[k]
(i)
P2N 1
(2n+1)k
1
= 2N
X[k]W
4N
k=0
P
(2n+1)(l+2N )
2N
1
1
X[l]W
2N
4N
l=0
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
x[n]
12
23
(ii) 1 P2N 1
2b
(2n+1)k
Wab = ej a
= N k=0 X[k]W4N
PN 1
(iii) 1
(2n+1)N
(2n+1)k
1
+ N1 X[N ]W4N
= N X[0] + N k=1 X[k]W4N
PN 1
(2n+1)(2N r)
1
+ N r=1 X[2N r]W4N
PN 1
(iv) 1
(2n+1)k
1
= N X[0] + N k=1 X[k]W4N
PN 1
(2n+1)r+2N
1
+ N r=1 X[r]W4N
P 1
2(2n+1)k
X[k]
cos
= N1 X[0] + N2 N
= Inverse DCT
k=1
4N
Transforms: 3 7 / 15
Energy Conservation
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy
Conservation
Energy Compaction
Frame-based coding
Lapped Transform
DCT: X[k] =
IDCT: x[n] =
Y[k]
y[r]
rep
DFT
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
2(2n+1)k
x[n]
cos
n=0
PN 14N
2(2n+1)k
1
2
X[0]
+
X[k]
cos
k=1
N
N
4N
PN 1
Energy: E =
E=
12
12
0
23
23
2
|x[n]|
: E 2E 8N E 0.5N E
n=0
PN 1
|X|2 [0] + N2 n=1
|X|2 [n]
PN 1
1
N
c[0]
=
,
c[k
=
6
0]
=
Define: c[k] =
N
N
N
PN 1
ODCT: X[k] = c[k] n=0 x[n] cos 2(2n+1)k
4N
PN 1
IODCT: x[n] = k=0 c[k]X[k] cos 2(2n+1)k
4N
Transforms: 3 8 / 15
Energy Compaction
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy
Compaction
Frame-based coding
Lapped Transform
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
H
Covariance of vector x is Si,j = xx i,j = |ij| .
Suppose ODCT of x is Cx
D and DFT Eis Fx.
Covariance of Cx is CxxH CH = CSCH (similarly FSFH )
Diagonal elements give mean coefficient energy.
Used in MPEG and JPEG (superseded by
JPEG2000 using wavelets)
Used in speech recognition to decorrelate
spectral coeficients: DCT of log spectrum
Cumulative energy (%)
100
DCT
90
80
70
DFT
60
=0.9
N=32
50
10
15
20
No of coefficients
25
30
Transforms: 3 9 / 15
Frame-based coding
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy Compaction
x[n]
X[k]
Encode DCT
y[n]
k=30/220
y[n]-x[n]
Frame-based
coding
Lapped Transform
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
8.3 kB (PNG)
DSP and Digital Filters (2014-5349)
1.6 kB (JPEG)
0.5 kB (JPEG)
Transforms: 3 10 / 15
Lapped Transform
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy Compaction
Frame-based coding
Lapped Transform
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
x[n]
X1 [N : 2N 1]
IMDCT
y1 [N : 3N 1]
x[2N : 4N 1]
MDCT
X2 [2N : 3N 1]
IMDCT
y2 [2N : 3N 1]
2N
3N
4N
2N
3N
4N
X0[k]
x[N : 3N 1]
MDCT
X1[k]
X2[k]
y0[n]
y1[n]
y2[n]
y[n]
y[n]-x[n] = error
0
Transforms: 3 11 / 15
MDCT: XM [k] =
P2N 1
n=0
1
N
)(2k+1)
x[n] cos 2(2n+1+N
8N
PN 1
k=0
)(2k+1)
XM [k] cos 2(2n+1+N
8N
u = d
c a b
where
c is in reverse order
Form v = u u
Take 2N DCT: v VC
Symmetry VC [2k] = 0
N
a
2N
-d -c<
1N
d
u1,2
-b<
v
VC
XM
0
1N
2N
Transforms: 3 12 / 15
Take IDCT VC v = u u
Set y0 = [ a b b
a c+ d d+
c ]
[2N long]
=
=
y0 + y1
a b
b
a
c+ d
c d
d+
c
d
c
e+ f
f +
e
2c
2d
Transforms: 3 13 / 15
Summary
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy Compaction
Frame-based coding
Lapped Transform
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
Transforms: 3 14 / 15
MATLAB routines
3: Discrete Cosine
Transform
DFT Problems
DCT
DCT of sine wave
DCT/DFT
Equivalence
DCT Properties
IDCT
Energy Conservation
Energy Compaction
Frame-based coding
Lapped Transform
dct, idct
MDCT (Modified
DCT)
IMDCT & TDAC
Summary
MATLAB routines
Transforms: 3 15 / 15
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
LTI Systems: 4 1 / 14
LTI Systems
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
LTI Systems: 4 2 / 14
Convolution Properties
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
r= x[r]v[n
r]
BIBO Stability
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
1
h[n] 0
Define x[n] =
1 h[n] < 0
P
P
then y[0] =P x[0 n]h[n] = |h[n]|.
But |x[n]| 1n so BIBO y[0] =
|h[n]| < .
LTI Systems: 4 4 / 14
Frequency Response
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency
Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
H(ej ) = 1 + ej + ej2
= ej (1 + 2 cos )
H(ej ) = |1 + 2 cos |
cos )
H(ej ) = + 1sgn(1+2
2
3
2
1
0
5
0
-5
-10
0
d
H(ej )
d
10
1
0
-1
-2
0
LTI Systems: 4 5 / 14
Causality
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
LTI Systems: 4 6 / 14
Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
A
system can
Ppassive
Pnever gain energy:
2
2
|y[n]|
|x[n]|
for any finite energy input x[n].
n=
n=
j
A passive LTI system must have H(e ) 1
Somewhat analogous to a circuit consisting of R, L and C only.
A
system always
preserves energy exactly:
Plossless
P
2
2
|y[n]|
=
|x[n]|
for any finite energy input x[n].
n=
n=
j
A lossless LTI system must have H(e ) = 1
called an allpass system.
Somewhat analogous to a circuit consisting of L and C only.
Passive and lossless building blocks can be used to design systems which
are insensitive to coefficient changes
LTI Systems: 4 7 / 14
H() converges
H(z) converges for |z| = 1
|H(z)| 1 for |z| = 1
|H(z)| = 1 for |z| = 1
Convolution Complexity
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
y[0]
y[9]
ConvolutionP
sum:
M 1
y[n] = r=0 h[r]x[n r]
Algebraically:
N = 8, M = 3
M + N 1 = 10
x[n r] 6= 0 0 n r N 1
n+1N r n
Pmin(M 1,n))
Hence: y[n] = r=max(0,n+1N ) h[r]x[n r]
We must multiply each h[n] by each x[n] and add them to a total
total arithmetic complexity ( or + operations) 2M N
DSP and Digital Filters (2014-5233)
LTI Systems: 4 8 / 14
Circular Convolution
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular
Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
y[0]
y[7]
Convolution sum:
yN [n] =
PM 1
r=0
h[r]x[(n r)mod N ]
LTI Systems: 4 9 / 14
Frequency-domain convolution
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
H[k])
LTI Systems: 4 10 / 14
Overlap Add
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
If N is very large:
N
(1) chop x[n] into K
chunks of length K
(2) convolve each chunk with h[n]
(3) add up the results
Each output chunk is of length K + M 1 and overlaps the next chunk
N
Operations: K
8 (M + K) log2 (M + K)
Computational saving if 100 < M K N
Example: M = 500, K = 104 , N = 107
Direct: 2M N = 1010
single DFT: 12 (M + N ) log2 (M + N ) = 2.8 109
N
overlap-add: K
8 (M + K) log2 (M + K) = 1.1 109 ,
Other advantages:
(a) Shorter DFT
(b) Can cope with N =
(c) Can calculate y[0] as soon as x[K 1] has been read:
algorithmic delay = K 1 samples
LTI Systems: 4 11 / 14
Overlap Save
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
Alternative method:
N
(1) chop x[n] into K
overlapping
chunks of length K + M 1
(2) K+M 1 each chunk with h[n]
(3) discard first M 1 from each chunk
(4) concatenate to make y[n]
The first M 1 points of each output chunk are invalid
Operations: slightly less than overlap-add because no addition needed to
create y[n]
Advantages: same as overlap add
Strangely, rather less popular than overlap-add
LTI Systems: 4 12 / 14
Summary
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
LTI Systems: 4 13 / 14
MATLAB routines
4: Linear Time
Invariant Systems
LTI Systems
Convolution
Properties
BIBO Stability
Frequency Response
Causality
Passive and Lossless
Convolution
Complexity
Circular Convolution
Frequency-domain
convolution
Overlap Add
Overlap Save
Summary
MATLAB routines
fftfilt
x[n]y[n]
LTI Systems: 4 14 / 14
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
IIR Impulse response
examples
IIR Impulse response
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
5: Filters
Filters: 5 1 / 19
Difference Equations
5: Filters
Difference
Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
r]
r=0
r=1 a[r]y[n r]
PN
PM
r=0 a[r]y[n r] = r=0 b[r]x[n r]
with a[0] = 1
a[n] y[n] = b[n] x[n]
Y (z) =
j
Y (e ) =
(1)
(2)
(3)
(4)
B(z)
A(z) X(z)
B(ej )
j
A(ej ) X(e )
Always causal.
Order of system is max(M, N ), the highest r with a[r] 6= 0 or b[r] 6= 0.
We assume that a[0] = 1; if not, divide A(z) and B(z) by a[0].
Filter is BIBO stable iff roots of A(z) all lie within the unit circle.
Filters: 5 2 / 19
FIR Filters
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
Symmetrical b[n]H(ej )e
jM
2
M=4
consists of
M
2
M=14
M=24
0.5
0.5
0.5
0
0
0
0
0
0
2
M
(marked line)
Filters: 5 3 / 19
FIR Symmetries
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
PM
0.5
0.5
0.5
-0.5
-0.5
-0.5
-1
-1
-1
-1
0
z
-1
0
z
-1
0
z
10
2
2
1
0
1
-2
0
(rad/sample)
-2
0
(rad/sample)
-2
0
2
(rad/sample)
Filters: 5 4 / 19
PM
r=0
b[r]z0r = 0
B(z0 ) =
PM
= 0 = 0
PM
r
r=0 b[r]z0
PM
M n
n=0 b[M n]z0
P
n
z0M M
n=0 b[M n]z0
P
n
z0M M
n=0 b[n]z0
z0M 0 = 0
substitute r = M n
take out z0M factor
since b[M n] = b[n]
since B(z0 ) = 0
Factorize H(z) =
Q
1
b[0] M
)
B(z)
i=1 (1qi z
QN
=
1
A(z)
)
i=1 (1pi z
Roots of A(z) and B(z) are the poles {pi } and zeros {qi } of H(z)
Also an additional N M zeros at the origin (affect phase only)
M QM
|b[0]|
z
|
| i=1 |zqi |
j
H(ej ) =
Q
for
z
=
e
N
N
|z
|
|zp |
i=1
Example:
H(z) =
2(1+1.2z 1 )
2+2.4z 1
10.96z 1 +0.64z 2 = (1(0.480.64j)z 1 )(1(0.48+0.64j)z 1 )
21.76
j
= 5.6
At = 1.3: H(e ) = 1.620.39
H(ej ) = (0.6 + 1.3) (1.7 + 2.2) = 1.97
1
10
0.5
0
0
0.39
1.76
1.62
-0.5
-0.5
-1
-1
-1
0
(z)
2.2
0.5
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
0.6
1.3
1.7
-1
0
(z)
Filters: 5 5 / 19
Negating z
2+2.4z 1
10.96z 1 +0.64z 2
1
10
0.5
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
0
5
-0.5
-1
-1
0
(z)
Negate z: HR (z) =
0
0
22.4z 1
1+0.96z 1 +0.64z 2
1
10
0.5
0
-0.5
-1
-1
0
(z)
0
0
Filters: 5 6 / 19
Cubing z
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
1
10
0.5
0
2+2.4z 1
10.96z 1 +0.64z 2
-0.5
-1
-1
0
(z)
Cube z: HC (z) =
-2
0
(rad/sample)
2+2.4z 3
10.96z 3 +0.64z 6
1
10
C
0.5
0
-0.5
-1
-1
0
z
-2
0
(rad/sample)
Filters: 5 7 / 19
Scaling z
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
10
0.5
0
2+2.4z 1
10.96z 1 +0.64z 2
-0.5
-1
-1
0
(z)
0
0
z
Scale z: HS (z) = H( 1.1
)=
1
2+2.64z 1
11.056z 1 +0.7744z 2
20
0.5
15
10
-0.5
-1
-1
0
z
0
0
(rad/s)
Filters: 5 8 / 19
response examples
IIR Impulse response
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
B(z)
A(z) ,
Example 1: M < N
1
B(z)
A(z)
3
13.4z
= 10.3z
1 0.4z 2 = 1+0.5z 1 +
n
n
h[n] = (3 (0.5) 2 (0.8) ) u[n]
2
10.8z 1
Example 2: M N
B(z)
A(z)
1.3z
= 1+0.3z35z
1 0.55z 2 0.2z 3
2
3
2
= 1+0.5z
2 + 10.8z 1
1 +
1
(1+0.5z )
n
n
n
h[n] = (2 (0.5) + 3(n + 1) (0.5) 2 (0.8) ) u[n]
Filters: 5 9 / 19
response
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
H(z) =
B(z)
A(z)
B(z)
A(z)
r
B(z)
(3) Then A(z) = i=1 k=1 (1p i,k
(Ki = multiplicity of pi )
1 )k
iz
kKi
K
k
B(z)
d i
i)
1 Ki
where ri,k = (p
(1
p
z
)
i
(Ki k)! d(z 1 )Ki k
A(z)
z=pi
N
B(z)
B(z)
p
ri
1
where
r
=
=
(1
p
z
)
i
i
i=1 1pi z 1
A(z)
A(z)
z=pi
n+k1
nk1
is a binomial coefficient Ck1
PNp
For the common case Ki = 1 i: h[n] = i=1 ri pni for n 0
where C =
!
!()!
Filters: 5 10 / 19
B(z)
A(z)
PNp PKj
rj,l
B(z)
1
1 pi z
= j=1 l=1
A(z)
(1pj z1 )l
now separate out the term with j = i:
Ki
Ki l P
PKi
PKj rj,l (1pi z1 )Ki
B(z)
1
1
1 pi z
= l=1 ri,l 1 pi z
+ j6=i l=1
A(z)
(1pj z1 )l
We assume that
j=1
l=1
dKi k
d(z 1 )Ki k
and evaluate at z = pi
p
z
i
(1pj z1 )l
numerator and will equal zero at z = pi .
K l
PKi
with l < k will also vanish.
ri,l 1 pi z 1 i
Similarly, terms in l=1
PKi
K l
with l > k will also differentiate to zero.
ri,l 1 pi z 1 i
Also, terms in l=1
The only term remaining is: (p)Ki k (Ki k)!ri,k from which the result follows.
[Similarly
DSP and Digital Filters (2014-5241)
dn
(xm )
dxn
x=0
1 k
(1) Suppose the formula is true for k and differentiate both sides with respect to z 1 :
o
n
k P
n+k1 n n
d
1
1 pz
= n=0 Ck1 p z
d(z 1 )
This gives:
(k+1) P
P
n+k1 n (n1)
n+k1 n (n1)
p z
p z
=
pk 1 pz 1
= n=0 nCk1
n=1 nCk1
Now substitute, m = n 1:
(k+1) P
m+k m+1 m
1
p
z
pk 1 pz
= m=0 (m + 1)Ck1
P
P
(k+1)
m+k m m
m+1 m+k m m
1 pz 1
=
p z
p
z
=
C
m=0 k
m=0 Ck
k1
which proves the result for k + 1.
This is true from the standard geometric progression formula. (Note that C0n = 1 n).
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
for n 0
P
BIBO stable since
|h[n]| = 2.077... <
Hence H(ej ) exists.
Example: h[n] =
Filters: 5 11 / 19
Stability Triangle
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
IIR Impulse response
examples
IIR Impulse response
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
K2
S
R
P
0
Q
-K2
-2K
0
a[1]
2K
Filters: 5 12 / 19
Low-pass filter
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
IIR Impulse response
examples
IIR Impulse response
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
1p
1pz 1
Impulse response:
n
h[n] = (1 p)pn = (1 p)e
1
where = ln
p is the time constant in samples.
j
Magnitude response: H(e ) = 1p
2
12p cos +p
1
Compare continuous time: HC (j) = 1+j
Indistinguishable for low but H(ej ) is periodic, HC (j) is not
0
p=0.80
H(j)
-10
0.5
-20
-0.5
-30
-1
-1
0
(z)
0.01
HC(j)
1/
0.1
(rad/sample)
Filters: 5 13 / 19
Allpass filters
H(e ) =
PM
b[r]ejr
r=0
PM
j(M r)
r=0 b[r]e
PM
jr
jM Pr=0 b[r]e
e
M
jr
r=0 b[r]e
p+z 1
1pz 1 =
1p1 z 1
p 1pz1
1
0.8
0.5
-1
0.6
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
-2
0.4
-0.5
0.2
0
0
-3
0
-1
1
-1
0
(z)
In an allpass filter, the zeros are the poles reflected in the unit circle.
DSP and Digital Filters (2014-5241)
Filters: 5 14 / 19
Group Delay
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
IIR Impulse response
examples
IIR Impulse response
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
dH(ej )
d
H =
d
H(ej )
d
H(z) dz
z=ej
P
j
H(e ) = n=0 h[n]ejn = F (h[n])
[F = DTFT]
P
dH(ej )
= n=0 jnh[n]ejn = jF (nh[n])
d
j
dH(e
)
jF
(nh[n])
F
(nh[n])
1
= F (h[n]) = F (h[n])
H = H(e
j )
d
pej
1
Example: H(z) = 1pz1 H = [1 p] = 1pej
Group delay: H (e ) =
p=0.80
-0.2
p=0.80
0.5
0
-0.4
-0.6
-0.5
-0.8
-1
-1
0
(z)
0
0
Average group delay (over ) = (# poles # zeros) within the unit circle
Zeros on the unit circle count
DSP and Digital Filters (2014-5241)
Filters: 5 15 / 19
dH(ej )
.
d
H (e
dH(ej )
d jk
d
)=
=
e
=
(k) = k
d
d
d
which tells us that this filter has a constant group delay of k samples that is independent of .
The average value of H equals the total change in H(ej ) as goes from to + divided by
2. If you imagine an elastic string connecting a pole or zero to the point z = ej , you can see that as
goes from to + the string will wind once around the pole or zero if it is inside the unit circle but
not if it is outside. Thus, the total change in H(ej ) is equal to 2 times the number of poles inside
the unit circle minus the number of zeros inside the unit circle. A zero that is exactly on the unit circle
counts 12 since there is a sudden discontinuity of in H(ej ) as passes through the zero position.
When you multiply or divide complex numbers, their phases add or subtract, so it follows that when
you multiply or divide transfer functions their group delays will add or subtract. Thus, for example,
B(z)
the group delay of an IIR filter, H(z) = A(z) , is given by H = B A . This means too that we
can determine the group delay of a factorized transfer function by summing the group delays of the
individual factors.
=
By going back to the definition of the DTFT, we find that H(ej ) = F (h[n]) and
d
jF (nh[n]) where F ( ) denotes the DTFT. Substituting these expressions into the above equation
gives us a formula for H in terms of the impulse response h[n].
F (nh[n])
H =
(2)
F (h[n])
In order to express H in terms of z, we first note that if z = ej then
z = ej into equation (1), we get
H =
1 dH(z)
H(z) d
1 dH(z) dz
H(z) dz d
jz dH(z)
H(z) dz
dz
d
= jz. By substituting
z dH(z)
.
H(z) dz
j
z=e
1
.
1pz 1
As noted above,
B(z)
,
A(z)
if H(z) =
Minimum Phase
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
4
3
Reflecting an interior
zero to the exterior
multiplies H(ej ) by a constant but
increases average group delay by 1 sample.
2
1
0
0
0.5
-5
Average group delay (over ) = (# poles # zeros) within the unit circle
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
-0.5
-10
-1
-1
0
(z)
30
1
20
H
0.5
0
-0.5
10
0
-1
-1
0
(z)
-10
0
A filter with all zeros inside the unit circle is a minimum phase filter:
Lowest possible group delay for a given magnitude response
Energy in h[n] is concentrated towards n = 0
DSP and Digital Filters (2014-5241)
Filters: 5 16 / 19
dH(ej )
d
M
2
h[n] anti-symmetric:
PM
M
j
j M
2
2H(e ) = 2je
0 h[n] sin n 2
PM
+ M
j (
M
)
2
2
h[n] sin n
= 2e
Filters: 5 17 / 19
Summary
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
IIR Impulse response
examples
IIR Impulse response
Other BIBO
responses
Stability Triangle
Low-pass filter
Allpass filters
Group Delay
Minimum Phase
Linear Phase Filters
Summary
MATLAB routines
Filters: 5 18 / 19
MATLAB routines
5: Filters
Difference Equations
FIR Filters
FIR Symmetries
IIR Frequency
Response
Negating z
Cubing z
Scaling z
filter
impz
residuez
grpdelay
freqz
filter a signal
Impulse response
partial fraction expansion
Group Delay
Calculate filter frequency response
Filters: 5 19 / 19
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
Windows: 6 1 / 12
Inverse DTFT
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
0 || > 0
h[n] =
2/0
20
0.5
sin 0 n
n
-2
Windows: 6 2 / 12
Rectangular window
6: Window Filter
Design
Inverse DTFT
Rectangular
window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
Truncate to M
2 to make finite; h1 [n] is now of length M + 1
MSE Optimality:
Define mean square error (MSE) in frequency domain
R
1
j
j 2
E = 2 H(e ) H1 (e ) d
2
M
R
P
1
jn
j
2
= 2
h
[n]e
H(e
)
d
1
M
2
M=14
M=28
M=14
0.5
Normal to delay by
DSP and Digital Filters (2014-5241)
0
0
M
2
M
2
Windows: 6 3 / 12
Dirichlet Kernel
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
W (e ) =
P M2
(i)
ejn = 1 + 2
M
2
j(n)
Proof: (i) e
P0.5M
1
cos (n) =
Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
1
0.5
0.5
0
-2
M=14
0.5
0
-2
1
4/(M+1)
0.5
0
-2
-2
2
Provided that M4
<
2
M
+
1
>
0
+1
0 :
2
Passband ripple: M4
,
stopband
+1
M +1
4
Transition pk-to-pk: M +1
d|H|
+1
M2
Transition Gradient: d
=0
Windows: 6 4 / 12
[Dirichlet Kernel]
Other properties of W (ej ):
sin 0.5(+1)
. For
The DTFT of a symmetric rectangular window of length M + 1 is W (ej ) =
sin 0.5
small x we can approximate sin x x; the error is < 1% for x < 0.25. So, for < 0.5,we have
W (ej ) 2 1 sin 0.5(M + 1).
The peak value is at = 0 and equals M + 1;this means that the peak gradient of HM +1 (ej ) will
+1
be M2
.
The minimum value of W (ej ) is approximately equal to the minimuum of 2 1 sin 0.5(M + 1)
1.5
= M3
. Hence min W (ej )
which is when sin 0.5(M + 1) = 1 i.e. = 0.5(M
+1)
+1
+1
min 2 1 sin 0.5(M + 1) = M
.
1.5
sin 0.5(+1)
sin 0.5
has a period of =
2
0.5(+1)
4
M +1
ripple with this period in both the passband and stopband of HM +1 (ej ).
However the stopband rippletakes the value
of HM +1 (ej ) alternately positive and negative. If you
plot the magnitude response,HM +1 (ej ) then this ripple will be full-wave rectified and will double in
frequency so its period will now be M2
.
+1
Window relationships
When you multiply an impulse response by a window M + 1 long
1
HM +1 (ej ) = 2
H(ej ) W (ej )
1
20 M=20
10
0.5
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window
relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
0.5
0
0
0
-2
-2
w[0]
2
-2
0.5
2
j
+
W
(e
)d
(a) passband gain w[0]; peak
mainlobe
rectangular window: passband gain = 1; peak gain = 1.09
Windows: 6 5 / 12
Common Windows
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
Rectangular: w[n] 1
dont use
-50
0
Kaiser:
q
2n 2
I0 1( M )
I0 ()
12.56/(M+1)
-31 dB
-50
0
0
12.56/(M+1)
-40 dB
-50
0
Blackman-Harris 3-term:
0.42 + 0.5c1 + 0.08c2
best peak sidelobe
-13 dB
6.27/(M+1)
18.87/(M+1)
-50
-70 dB
0
0
-50
13.25/(M+1)
-40 dB
= 5.3
-50
21.27/(M+1)
= 9.5
-70 dB
1
Windows: 6 6 / 12
Uncertainty principle
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty
principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
R
t |x(t)| dt
R
|x(t)|2 dt
12 R
|X(j)| d
R
|X(j)|2 d
21
1
2
Windows: 6 7 / 12
1
V
j
(j)
1 2
dx
d
=
x
x
, we can apply integration by parts to get
(2) Since dt
2
dt
R
R
R dt
1
1 2
1 2
1
1
dx
2
tx dt dt = t 2 x t= dt 2 x dt = 2 x dt = 2 1 = 2
R
2
2
dx
It follows that tx dt dt = 21 = 14 which we will use below.
2
this becomes u(t)v(t)dt u (t)dt v (t)dt. We apply this with u(t) = tx(t)
and v(t) =
1
4
dx(t)
dt
to get
R
2
2
R
R
R 2 2 R 2
dx
2 x2 dt
t
tx dx
dt
=
t
x
dt
v
(t)dt
=
dt
dt
dt
R
R
1
(4) From Parsevals theorem for the CTFT, v 2 (t)dt = 2
|V (j|2 d. From step (1), we can
R 2
R 2
1
substitute V (j) = jX(j) to obtain v (t)dt = 2 |X(j|2 d. Making this substitution
in (3) gives
R 2 2 R 2
R 2 2 1 R 2
2
1
t x dt
v (t)dt =
t x dt 2 |X(j| d
4
DSP and Digital Filters (2014-5241)
Order Estimation
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
5.64.3 log10 ()
2 1
820 log10
2.2
=
2
fs
fs = 1.047
Ripple: 20 log10 (1 + ) = 0.1 dB, 20 log10 = 35 dB
35
0.1
= 10 20 1 = 0.0116, = 10 20 = 0.0178
M
10.25
0.105
= 98
or
358
2.2
= 117
Windows: 6 8 / 12
Example Design
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02
20 log10 = 34 dB
20 log10 (1 + ) = 0.17 dB
Order:
M
0.5
0
0
5.64.3 log10 ()
2 1
= 92
M=92
= 2.5
0.5
0
0
M=92
= 2.5
-20
M=92
-40
0
-60
0
Windows: 6 9 / 12
Frequency sampling
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency
sampling
Summary
MATLAB routines
M+1=93
0.5
M+1=93
0.5
-2
0
0
Windows: 6 10 / 12
Summary
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
Windows: 6 11 / 12
MATLAB routines
6: Window Filter
Design
Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines
diric(x,n)
hanning
hamming
kaiser
kaiserord
0.5nx
Dirichlet kernel: sin
sin 0.5x
Window functions
(Note periodic option)
Windows: 6 12 / 12
7: Optimal FIR
filters
Optimal Filters
Alternation Theorem
Chebyshev
Polynomials
Maximal Error
Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Optimal FIR: 7 1 / 11
Optimal Filters
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev
Polynomials
Maximal Error
Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Optimal FIR: 7 2 / 11
Alternation Theorem
7: Optimal FIR filters
Optimal Filters
Alternation
Theorem
Chebyshev
Polynomials
Maximal Error
Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains the
maximal error three times with
alternate signs
8
6
4
2
2
Proof:
Assume the first maximal deviation from the line is negative as shown.
There must be an equally large positive deviation; or else just move the line
downwards to reduce the maximal deviation.
This must be followed by another maximal negative deviation; or else you
can rotate the line and reduce the deviations.
Alternation Theorem:
A polynomial fit of degree n to a bounded set of points is minimax if and
only if it attains its maximal error at n + 2 points with alternating signs.
There may be additional maximal error points.
Fitting to a continuous function is the same as to an infinite number of
points.
Optimal FIR: 7 3 / 11
Chebyshev Polynomials
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev
Polynomials
Maximal Error
Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
h[n] cos n
M
2
M=4
M=4
1.2
M=2
0
1
|g|
0.8
0.6
-5
g
|g| (dB)
0.5
-10
0.4
0
0.2
0
0
-15
0.5
1.5
2.5
3.5
0.5
1.5
2.5
-1
-0.5
0
cos()
0.5
Optimal FIR: 7 4 / 11
Maximal Error
Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
= P (cos ) sin
= 0 at = 0, and at most
M
2
M
2 .
1.2
M=18
1
0.8
|H|
0.6
0.4
0.2
0
0
0.5
1.5
2.5
1
zeros
of
P
(x).
(a) = 0 + two band edges + M
2
2
zeros
of
P
(x).
(c) = {0 and } + two band edges + M
2
Optimal FIR: 7 5 / 11
1.5
M=4
Iteration 2
M=4
Iteration 3
0.5
0
|g|
|g|
1
|g|
0.5
0.5
-0.5
0
0.5
1.5
2.5
0.5
1.5
2.5
0.5
1.5
2.5
Optimal FIR: 7 6 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev
Polynomials
Maximal Error
Locations
Remez Exchange
Algorithm
Determine
Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
(1)i
s(i )
2
Method 2: Dont calculate h[n]
explicitly
(Computation
time
M
)
Q
1
Multiply equations by ci = j6=i cos i cos
j and add:
PM
P M2 +2
P M2
(1)i
2 +2
=
h[n]
cos
n
+
c
h[0]
+
2
i
n=1
i=1
i=1 ci d(i )
s(i )
All terms involving h[n] sum to zero leaving
P M2 +2
P M2 +2 (1)i ci
i=1
i=1 ci d(i )
s(i ) =
Solve for then calculate the H(i ) then use Lagrange interpolation:
P M2 +2
Q
cos cos
H() = P (cos ) = i=1 H(i ) j6=i cos i cos jj
M
M
H(
)
[actually
order
+
1
-polynomial
going
through
all
the
i
2
2 ]
Optimal FIR: 7 7 / 11
Example Design
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev
Polynomials
Maximal Error
Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
M=36
|H| (dB)
0.6
0.4
1
0.5
-10
-15
-20
-0.5
-25
0.2
0
0
M=36
-5
0.8
|H|
Filter Specifications:
Bandpass = [0.5, 1], Transition widths: = 0.2
Stopband Attenuation: 25 dB and 15 dB
Passband Ripple: 0.3 dB
0.5
1.5
2.5
-30
0
-1
0.5
1.5
2.5
-1
Optimal FIR: 7 8 / 11
Can
Always stable ,
Low coefficient sensitivity ,
Optimal design method fast and robust ,
Normally needs higher order than an IIR filter /
atten
Filter order M dB
3.5 where is the most rapid transition
dBatten 2
atten
Filtering complexity M fs dB
f
=
s
3.5
3.5 fs
fs2 for a given specification in unscaled units.
Optimal FIR: 7 9 / 11
Summary
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev
Polynomials
Maximal Error
Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Optimal FIR: 7 10 / 11
MATLAB routines
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev
Polynomials
Maximal Error
Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
firpm
firpmord
cfirpm
remez
Optimal FIR: 7 11 / 11
8: IIR Filter
Transformations
Continuous Time
Filters
Bilinear Mapping
Continuous Time
Filters
Mapping Poles and
Zeros
Spectral
Transformations
Constantinides
Transformations
Impulse Invariance
Summary
MATLAB routines
IIR Transformations: 8 1 / 10
e2
Chebyshev: G () =
|H|
0.6
0.4
0.2
0
0.1
0.2
0.5
1
2
Frequency (rad/s)
10
0.2
0.5
1
2
Frequency (rad/s)
10
0.2
0.5
1
2
Frequency (rad/s)
10
0.2
0.5
1
2
Frequency (rad/s)
10
1
0.8
0.6
0.4
0.2
0
0.1
1
2 ()
2
1+ TN
1
0.8
N=5
0.8
|H|
Monotonic
e
G()
= 1 12 2N + 38 4N +
Maximally flat: 2N 1 derivatives are zero
0.6
|H|
0.4
0.2
0
0.1
1
2 (1 ) 1
1+(2 TN
)
1
0.8
0.6
|H|
8: IIR Filter
Transformations
Continuous Time
Filters
Bilinear Mapping
Continuous Time
Filters
Mapping Poles and
Zeros
Spectral
Transformations
Constantinides
Transformations
Impulse Invariance
Summary
MATLAB routines
0.4
0.2
0
0.1
IIR Transformations: 8 2 / 10
Bilinear Mapping
8: IIR Filter
Transformations
Continuous Time
Filters
Bilinear Mapping
Continuous Time
Filters
Mapping Poles and
Zeros
Spectral
Transformations
Constantinides
Transformations
Impulse Invariance
Summary
MATLAB routines
+s
s
s = z1
z+1 : a one-to-one invertible mapping
ej 2 ej 2
ej 1
j
Proof: z = e s = ej +1 = j 2 j 2 = j tan 2 = j
+e
2 +2x+x2 +y 2
2 2x+x2 +y 2
4x
(x)2 +y 2
=1+
s-plane
=1
2.5
2
z-plane
=1
2.5
1.5
1
1
0.5
-1
-0.5
Change variable: z =
-1
-2
-1.5
-3
-4
-4
1.5
0.5
-2
-2
-2.5
-2
-1
0
0
10
IIR Transformations: 8 3 / 10
Substitute: s = z1
z+1
H(z) =
2.5
2
[extra zeros at z = 1]
1.5
|H|
1
s2 +0.2s+4
1
0.5
1
2
z1
( z1
z+1 ) +0.2 z+1 +4
2.5
(z+1)
2
(z1) +0.2(z1)(z+1)+4(z+1)2
2
3
4
Frequency (rad/s)
=1
2
1.5
1
z +2z+1
5.2z 2 +6z+4.8
1+2z +z
= 0.19 1+1.15z
1 +0.92z 2
0.5
0
0
Frequency mapping: =
= 2 3 4 5
= 1.6 2.2 2.5 2.65 2.75
Choosing : Set =
0
tan 21 0
Set = 2fs =
DSP and Digital Filters (2014-5241)
0.5
1.5
2
(rad/sample)
2.5
3
2.5
2
e
Take H(s)
=
|H|
8: IIR Filter
Transformations
Continuous Time
Filters
Bilinear Mapping
Continuous Time
Filters
Mapping Poles and
Zeros
Spectral
Transformations
Constantinides
Transformations
Impulse Invariance
Summary
MATLAB routines
1.5
1
0.5
0
0
10
to map 0 0
2
T
1
s2 +0.2s+4
2.5
2
1.5
|H|
e
Alternative method: H(s)
=
1
0.5
0
0 = 2 tan1 0 = 0 z0 = ej0 = 1
4
|H(z0 )| = g 3.08
= 0.25 g = 0.19
2
1
0
-1
(1+z 1 )2
= g (1+(0.580.77j)z1 )(1+(0.58+0.77j)z1 )
1+2z 1 +z 2
= g 1+1.15z1 +0.92z2
2
3
4
Frequency (rad/s)
-2
-3
-2
-1
0
s
=1
0.5
0
-0.5
-1
-1
2.5
0
z
=1
2
1.5
|H|
8: IIR Filter
Transformations
Continuous Time
Filters
Bilinear Mapping
Continuous Time
Filters
Mapping Poles and
Zeros
Spectral
Transformations
Constantinides
Transformations
Impulse Invariance
Summary
MATLAB routines
1+2z +z
H(z) = 0.19 1+1.15z
1 +0.92z 2
DSP and Digital Filters (2014-5241)
0.5
0
0
0.5
1.5
2
(rad/sample)
2.5
IIR Transformations: 8 5 / 10
Spectral Transformations
2
z
1
-1
Frequency Mapping:
1+z 1
j
If z = e , then z = z 1+z has modulus 1
since the numerator and denominator are
complex conjugates.
Hence the unit circle is preserved.
ej +
ej = 1+e
j
1+
tan 2
Some algebra gives: tan 2 = 1
Equivalent to:
z s =
-2
-2
2
z^
= 0.6
1
-1
-2
-2
-1
1
0.8
0.6
0.4
0.2
z1
z+1
s =
1
1+ s
z =
1+
s
1
s
0
0
0.5
1.5
2
(rad/s)
2.5
= 0.6
^ = 0.49
0.8
0.6
0.4
0.2
0
0
-1
|H|
=
z
1+z
|H^|
8: IIR Filter
Transformations
Continuous Time
Filters
Bilinear Mapping
Continuous Time
Filters
Mapping Poles and
Zeros
Spectral
Transformations
Constantinides
Transformations
Impulse Invariance
Summary
MATLAB routines
0.5
1.5
2
^ (rad/s)
2.5
IIR Transformations: 8 6 / 10
Constantinides Transformations
Transform any lowpass filter with cutoff frequency 0 to:
Target
Substitute
Lowpass
<
1
z 1 =
Highpass
>
1
Bandpass
1 <
<
2
Bandstop
1
2
Parameters
sin( 0 2 1 )
=
+
sin( 0 2 1 )
z1
1
z 1
z1 +
1+z1
cos(
(1)2
z 1 +(+1)
z 2
(+1)2
z 1 +(1)
z 2
cos(
0 +
1
2
0
1
2
)
)
2 +
1
2
2
1
2
)
cos(
)
1
tan
= cot 2
2
cos( 2 2 1 )
=
cos( 2 2 1 )
2
1
tan
= tan
2
(1)2
z 1 +(+1)
z 2
(+1)2z1 +(1)z2
cos(
0
2
0
2
Bandpass and bandstop transformations are quadratic and so will double the order:
1
Lowpass
|H^|
|H|
1
0.5
0
-3
-2
-1
0
(rad/s)
Bandpass
0.5
0
-3
-2
-1
0
^ (rad/s)
IIR Transformations: 8 7 / 10
Impulse Invariance
8: IIR Filter
Transformations
Continuous Time
Filters
Bilinear Mapping
Continuous Time
Filters
Mapping Poles and
Zeros
Spectral
Transformations
Constantinides
Transformations
Impulse Invariance
Summary
MATLAB routines
1
fs
Properties:
, Impulse response correct.
,
/ Frequency response is aliased.
is sampling period)
0.5
0.5
Bilinear (f s = 8 kHz)
Matched at 3.4 kHz
Analog Filter
0
0
10
15
Frequency (krad/s)
20
25
0
0
|H|
|H|
0.8
|H|
Bilinear transform works well for a lowpass filter but the non-linear
compression of the frequency distorts any other response.
sample
L 1
Z
e
Alternative method: H(s) h(t) h[n] H(z)
PN
gi
e
e
Express H(s) as a sum of partial fractions H(s) = i=1 se
pi
P
N
= u(t)
Impulse response is h(t)
gi epi t
i=1
PN
Digital filter H(z) = i=1 1epgiiT z1 has identical impulse response
0.5
1.5
2
(rad/sample)
0.6
0.4
0.2
2.5
1.5
2
(rad/sample)
2.5
IIR Transformations: 8 8 / 10
Summary
8: IIR Filter
Transformations
Continuous Time
Filters
Bilinear Mapping
Continuous Time
Filters
Mapping Poles and
Zeros
Spectral
Transformations
Constantinides
Transformations
Impulse Invariance
Summary
MATLAB routines
IIR Transformations: 8 9 / 10
MATLAB routines
8: IIR Filter
Transformations
Continuous Time
Filters
Bilinear Mapping
Continuous Time
Filters
Mapping Poles and
Zeros
Spectral
Transformations
Constantinides
Transformations
Impulse Invariance
Summary
MATLAB routines
bilinear
impinvar
butter
butterord
cheby1
cheby1ord
cheby2
cheby2ord
ellip
ellipord
Bilinear mapping
Impulse invariance
Analog or digital
Butterworth filter
Analog or digital
Chebyshev filter
Analog or digital
Inverse Chebyshev filter
Analog or digital
Elliptic filter
IIR Transformations: 8 10 / 10
9: Optimal IIR
Design
Error choices
Linear Least Squares
Frequency Sampling
Iterative Solution
Newton-Raphson
Magnitude-only
Specification
Hilbert Relations
Magnitude Phase
Relation
Summary
MATLAB routines
Optimal IIR: 9 1 / 11
Error choices
9: Optimal IIR
Design
Error choices
Linear Least Squares
Frequency Sampling
Iterative Solution
Newton-Raphson
Magnitude-only
Specification
Hilbert Relations
Magnitude Phase
Relation
Summary
MATLAB routines
B(ej )
A(ej )
B(ej )
A(ej )
j
D()
WS ()
|A(ej )| ,
Magnitude-only
Specification
Hilbert Relations
Magnitude Phase
Relation
Summary
MATLAB routines
Differentiate:
T
T T
T T
T
d e e = dx A (Ax b) + x A b Adx
[since d (uv) = du v + u dv]
= 2dxT AT (Ax b)
[since uT v = vT u]
= 2dxT AT Ax AT b
This is zero for any dx iff AT Ax = AT b
1 T
2
T
Thus ||e|| is minimized if x = A A
A b
Optimal IIR: 9 3 / 11
Frequency Sampling
9: Optimal IIR
Design
Error choices
Linear Least Squares
Frequency
Sampling
Iterative Solution
Newton-Raphson
Magnitude-only
Specification
Hilbert Relations
Magnitude Phase
Relation
Summary
MATLAB routines
+1
]
Choose K valuesof , 1 K
[with K M +N
2
a
T
T
U
V
[K equations, M + N + 1 unkowns]
=d
b
where U = u(1 ) u(K ) ,
V = v(1 ) v(K ) ,
T
d = W (1 )D(1 ) W (K )D(K )
We want to force a and b to be real; find least squares solution to
T
T
U V
a
(d)
=
b
(d)
UT
VT
Optimal IIR: 9 4 / 11
Iterative Solution
9: Optimal IIR
Design
Error choices
Linear Least Squares
Frequency Sampling
Iterative Solution
Newton-Raphson
Magnitude-only
Specification
Hilbert Relations
Magnitude Phase
Relation
Summary
MATLAB routines
WS ()
A(ej ) .
WS (k )
A(ejk )
Optimal IIR: 9 5 / 11
Newton-Raphson
9: Optimal IIR
Design
Error choices
Linear Least Squares
Frequency Sampling
Iterative Solution
Newton-Raphson
Magnitude-only
Specification
Hilbert Relations
Magnitude Phase
Relation
Summary
MATLAB routines
and
e
arguments)
WS
WS B0
0
(A A0 )
D
+
(B
B
)
E S WS B
0
A0
A0
A20
B0
B0
S
=W
(A
1)
+
B
A
D
0
A0
A0
A0 + B0
Optimal IIR: 9 6 / 11
Magnitude-only Specification
9: Optimal IIR
Design
Error choices
Linear Least Squares
Frequency Sampling
Iterative Solution
Newton-Raphson
Magnitude-only
Specification
Hilbert Relations
Magnitude Phase
Relation
Summary
MATLAB routines
j
j
H(e
)
=
ln
H(e
)
cot
2
j
ln H(e ) = ln |H()| + H(ej ) cot 2
Optimal IIR: 9 7 / 11
Hilbert Relations
9: Optimal IIR
Design
Error choices
Linear Least Squares
Frequency Sampling
Iterative Solution
Newton-Raphson
Magnitude-only
Specification
Hilbert Relations
Magnitude Phase
Relation
Summary
MATLAB routines
=
1
1z
1z 1
j
T (e )
t[n]
ej 2 +ej 2
1+ej
= 1ej = j 2 j 2
e
e
2 cos
= 2j sin 2 = j cot 2
2
h[n]
h[-n]
he[n]
j
j
H(e ) = j H(e ) j cot 2
= H(ej ) cot 2
j
j
H(e ) = H() + j H(e ) j cot 2
= H() + H(ej ) cot 2
ho[n]
0
Optimal IIR: 9 8 / 11
0.5
Taylor Series:
a2 2
a3 3
1
1
ln 1 az
= az 2 z 3 z . . .
causal and stable provided |a| < 1
So, if H(z) is minimum phase (all pn and qm inside
unit circle) then ln H(z) is the z-transform of a
stable causal sequence and:
j
j
H(e
)
=
ln
H(e
)
cot
2
j
j
ln H(e ) = ln |g| + H(e ) cot 2
Example: H(z) =
107z
-0.5
-1
-1.5
-1
-0.5
0
z
0.5
0.4
0.3
ln|H|
0.2
0.1
-3
-2
-1
0
(rad/s)
-3
-2
-1
0
(rad/s)
-3
-2
-1
0
(rad/s)
20
cot( )
Magnitude-only
Specification
Hilbert Relations
Magnitude
Phase Relation
Summary
MATLAB routines
Given H(z) =
Q
(1qm z1 )
Q
g (1pn z1 )
10
0
-10
-20
1
H (rad)
9: Optimal IIR
Design
Error choices
Linear Least Squares
Frequency Sampling
Iterative Solution
Newton-Raphson
0.5
0
-0.5
-1
Optimal IIR: 9 9 / 11
Summary
9: Optimal IIR
Design
Error choices
Linear Least Squares
Frequency Sampling
Iterative Solution
Newton-Raphson
Magnitude-only
Specification
Hilbert Relations
Magnitude Phase
Relation
Summary
MATLAB routines
Optimal IIR: 9 10 / 11
MATLAB routines
9: Optimal IIR
Design
Error choices
Linear Least Squares
Frequency Sampling
Iterative Solution
Newton-Raphson
invfreqz
Magnitude-only
Specification
Hilbert Relations
Magnitude Phase
Relation
Summary
MATLAB routines
Optimal IIR: 9 11 / 11
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
Structures: 10 1 / 18
Direct Forms
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Direct Form 1:
Direct implementation of difference equation
1
Can view as B(z) followed by A(z)
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
Structures: 10 2 / 18
Transposition
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
Can
Example:
Direct form II Direct Form IIt
Would normally be drawn with input on the left
Note: A valid block diagram must never have any feedback loops that dont
go through a delay (z 1 block).
Structures: 10 3 / 18
State Space
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
B(z)
A(z)
det(zIP+qrT )
det(zIP)
T
+s1
q=
same H(z)
b[1] b[0]a[1]
b[2] b[0]a[2]
s = b[0]
b[0]z 2 +b[1]z+b[2]
z 2 +a[1]z+a[2]
Structures: 10 4 / 18
It is easy to verify this by multiplying out the matrices. We now take the determinant of both sides
making use of the result than a block triangular matrix is the product of the blocks along the diagonal
(assuming they are all square). This gives the result we want:
det (A) 1 + rT A1 q = det A + qrT
Now we take the z-transform of the state space equations
v[n + 1] = Pv[n] + qx[n]
y[n] = rT v[n] + sx[n]
ztransform
zV = PV + qX
Y = rT V + sX
The upper equation gives (zI P) V = qX from which V = (zI P)1 qX and by substituting this
det(zIP+qrT )
1
Y
T
+ s 1.
in the lower equation, we get X = r (zI P) q + s =
det(zIP)
DSP and Digital Filters (2014-5241)
Precision Issues
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
If all computations were exact, it would not make any difference which of
the equivalent structures was used. However ...
Coefficient precision
Coefficients are stored to finite precision and so are not exact.
The filter actually implemented is therefore incorrect.
Arithmetic precision
Arithmetic calculations are not exact.
Worst case for arithmetic errors is when calculating the
difference between two similar values:
1.23456789 1.23455678 = 0.00001111: 9 s.f. 4 s.f.
Arithmetic errors introduce noise that is then filtered by the transfer
function between the point of noise creation and the output.
Structures: 10 5 / 18
Coefficient Sensitivity
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient
Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
The roots of high order polynomials can be very sensitive to small changes
in coefficient values.
Wilkinsons polynomial: (famous example)
Q20
f (x) = n=1 (x n) = x20 210x19 + 20615x18 . . .
has roots well separated on the real axis.
-5
-5
10
15
20
25
10
15
20
25
Moral: Avoid using direct form for filters orders over about 10.
Structures: 10 6 / 18
Cascaded Biquads
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Q
(1+bk,1 z1 +bk,2 z2 )
Q
g (1+ak,1 z1 +ak,2 z2 ) =
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
The term
1+bk,1 z 1 +bk,2 z 2
k=1 1+ak,1 z 1 +ak,2 z 2
QK
M N
where K = max 2 , 2 .
1+bk,1 z 1 +bk,2 z 2
1+ak,1 z 1 +ak,2 z 2
We need to choose:
(a) which poles to pair with which zeros in each biquad
(b) how to order the biquads
Direct Form II
Transposed
Structures: 10 7 / 18
Pole-zero Pairing/Ordering
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
1
0.5
0
-0.5
-1
-1
0
z
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
Poles near the unit circle have the highest peaks and introduce most
noise so place them last in the chain
Nearest
0
-20
-40
0
0.5
1.5
2.5
Farthest
20
Gain (dB)
Gain (dB)
20
0
-20
-40
0
0.5
1.5
2.5
Structures: 10 8 / 18
Linear Phase
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
M = 6:
For M odd (no central coefficient), we only need
M
2
1
2
multiplies.
Structures: 10 9 / 18
Hardware Implementation
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
Software Implementation:
All that matters is the total number of multiplies and adds
Hardware Implementation:
Delay elements (z 1 ) represent storage registers
The maximum clock speed is limited by the number of sequential
operations between registers
Example: Symmetric Linear Phase Filter
Direct form: Maximum sequential delay = 4a + m
Transpose form: Maximum sequential delay = a + m ,
a and m are the delays of adder and multiplier respectively
Structures: 10 10 / 18
Allpass Filters
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
j
H(e ) 1
B(z) = z N A(z 1 )
a[1]+z 1
1+a[1]z 1
a[2]+a[1]z 1 +z 2
1+a[1]z 1 +a[2]z 2
Structures: 10 11 / 18
Lattice Stage
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
z N A(z 1 )
A(z)
1
1+kGz 1 X(z)
Y (z) = kV (z) + Gz
If |k| < 1 then
Y (z)
X(z)
Y (z)
X(z)
V (z) =
k+z 1 G
1+kGz 1 X(z)
j j
<1
is stable since kG(e )e
kA(z)+z N 1 A(z 1 )
A(z)+kz N 1 A(z 1 )
z (N +1) D(z 1 )
D(z)
Obtaining {d[n]}
from {a[n]}:
n=0
1
d[n] = a[n] + ka[N + 1 n] 1 n N
k
n=N +1
Obtaining {a[n]} from {d[n]}:
k = d[N + 1]
a[n] =
d[n]kd[N +1n]
1k2
Structures: 10 12 / 18
A(z) = 1 + 4z 1 6z 2 + 10z 3
k = 0.5, N = 3
A(z) D(z)
z0
1
A(z)
z 4 A(z 1 )
D(z) = A(z) + kz 4 A(z 1 )
z 1
4
10
9
z 2
6
6
9
z 3
10
4
12
z 4
1
0.5
D(z) A(z)
D(z)
k = d[N + 1]
z 4 D(z 1 )
D(z) kz 4 D(z 1 )
A(z) =
D(z)kz 4 D(z 1 )
1k2
z0
1
z 1
9
z 2
9
z 3
12
0.5
0.75
12
3
9
4.5
9
7.5
z 4
0.5
0.5
1
0
10
Structures: 10 13 / 18
Allpass Lattice
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
z M A(z 1 )
A(z)
as a lattice filter
am [n]k[m]am [mn]
1k2 [m]
for 0 n m 1
Am (z)k[m]z m Am (z 1 )
1k2 [m]
A(z) is stable iff |k[m]| < 1 for all m (good stability test)
Structures: 10 14 / 18
Lattice Filter
Vm (z)
Um (z)
z m Am (z 1 )
Am (z)
1
1+k[m]z 1 H
m1 (z)
Am1 (z)
Am1 (z)+k[m]z m Am1 (z 1 )
Am1 (z)
Am (z)
Hence:
Um (z)
X(z)
Am (z)
A(z)
and
Vm (z)
X(z)
Um (z)
X(z)
Vm (z)
Um (z)
z m Am (z 1 )
A(z)
m (z)
is of order m so you can create any numerator of order M by
The numerator of VX(z)
summing appropriate multiples of Vm (z):
PM
m
PM
Am (z 1 )
m=0 c[m]z
g[n] = m=0 c[m]vm [n] G(z) =
A(z)
Structures: 10 15 / 18
Lattice Example
k[2] = 0.281 a1 [ ] =
= [1, 0.357]
k[1] = 0.357 a0 [ ] = 1
V0 (z)
X(z)
1
1
1+0.2z 0.23z 2 +0.2z 3
V1 (z)
X(z)
0.357+z 1
1+0.2z 1 0.23z 2 +0.2z 3
V2 (z)
X(z)
0.281+0.256z 1 +z 2
1+0.2z 1 0.23z 2 +0.2z 3
V3 (z)
X(z)
0.20.23z 1 +0.2z 2 +z 3
1+0.2z 1 0.23z 2 +0.2z 3
B(z)
1+0.2z 1 0.23z 2 +0.2z 3
Structures: 10 16 / 18
Summary
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
Structures: 10 17 / 18
MATLAB routines
10: Digital Filter
Structures
Direct Forms
Transposition
State Space
Precision Issues
Coefficient Sensitivity
Cascaded Biquads
Pole-zero
Pairing/Ordering
Linear Phase
Hardware
Implementation
Allpass Filters
Lattice Stage
Example
A(z) D(z)
Allpass Lattice
Lattice Filter
Lattice Example
Summary
MATLAB routines
residuez
tf2sos,sos2tf
zp2sos,sos2zp
zp2ss,ss2zp
tf2ss,ss2tf
poly
b(z 1)
a(z 1 )
b(z 1)
a(z 1 )
k 1prkkz1
Q b0,l +b1,l z1 +b2,l z2
{zm , pk , g}
l 1+a1,l z 1 +a2,l z 2
Q b0,l +b1,l z1 +b2,l z2
(l 1+a1,l z1 +a2,l z2
{zm , pk , g}
(
x = Ax + Bu
y = Cx + Du
x = Ax + Bu
y = Cx + Du
poly(A) = det (zIA)
b(z 1)
a(z 1 )
Structures: 10 18 / 18
11: Multirate
Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
Multirate: 11 1 / 13
Multirate Systems
11: Multirate Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
Multirate: 11 2 / 13
Building blocks
11: Multirate Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
Downsample
y[m] = x[Km]
(
n
u K
K|n
v[n] =
0
else
Upsample
Example:
Downsample by 3 then upsample by 4
w[n]
x[m]
y[r]
Multirate: 11 3 / 13
Resampling Cascades
11: Multirate Systems
Multirate Systems
Building blocks
Resampling
Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
Successive downsamplers
samplers can be combined
or
up-
P
Qn
if Q | n else y[n] = 0.
h i
P
n if Q | P n.
Right side: y[n] = x Q
Multirate: 11 4 / 13
Noble Identities
11: Multirate Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
Multirate: 11 5 / 13
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
Qm]
=
h[m]x[Q(r m)]
Q
m=0
m=0
PM
= m=0 h[m]u[r m] = y[r] ,
Upsampled Noble Identity:
Multirate: 11 6 / 13
Upsampled z-transform
11: Multirate Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
V (z) =
v[n]z
n:K|n
n n
]z
u[ K
u[m]z Km = U (z K )
1
K
Example:
Asymmetric real spectrum ( complex signal)
K = 3: three images of the
original
spectrum in all.
R
R
2
1
1
j 2
Energy unchanged: 2 U (e ) d = 2 V (ej ) d
1
0.5
0.5
-2
-2
Multirate: 11 7 / 13
Downsampled z-transform
11: Multirate Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
1
K
PK1
1
K
PK1
j2kn
K
Define cK [n] = K|n [n] =
k=0 e
(
x[n] K | n
Now define xK [n] =
= cK [n]x[n]
0
Kn
P
P PK1 j2kn
1
K
XK (z) = n xK [n]z n = K
x[n]z n
n
k=0 e
j2k n
PK1 P
PK1
j2k
1
1
K
K
= K k=0
=
z
z)
x[n]
e
X(e
n
k=0
K
XK (z) = Y (z K )
1
Y (z) = XK (z K ) =
k=0
X(e
Frequency Spectrum:
PK1
j(2k)
1
j
Y (e ) = K k=0 X(e K )
j
K
j
2
K K
j2k
K
zK)
j
4
K K
1
X(e ) + X(e
=K
) + X(e
) +
Horizontally expanded by a factor of K, average of K aliased versions.
Downsampling is normally preceded by a LP filter to prevent aliasing.
Multirate: 11 8 / 13
Downsampled Spectrum
11: Multirate Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
Y (e ) =
1
K
Example 1:
PK1
k=0
X(e
j(2k)
K
0.5
0.5
K=3
-2
1
2K
Example 2:
K=3
Energy all in K
|| < 2 K
No aliasing: ,
-2
R
X(ej )2 d
1
0.5
0.5
-2
-2
Multirate: 11 9 / 13
Perfect Reconstruction
11: Multirate Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
x[n]
u[m]
p[n]
v[m]
q[n]
w[m]
y[n]
cdefghijklmn
c f i l
-c--f--i--l
b e h k
-bc-ef-hi-kl
a d g j
abcdefghijkl
Reconstruction
Commutators
Summary
MATLAB routines
1
3
Multirate: 11 10 / 13
Commutators
11: Multirate Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
x[n]
u[m]
v[m]
w[m]
v[m + 13 ]
w[m + 23 ]
y[n]
cdefghijklmn
c f i l
b e h k
a d g j
e h k l
d g j m
abcdefghijkl
Multirate: 11 11 / 13
Summary
11: Multirate Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
Multirate: 11 12 / 13
MATLAB routines
11: Multirate Systems
Multirate Systems
Building blocks
Resampling Cascades
Noble Identities
Noble Identities Proof
Upsampled
z-transform
Downsampled
z-transform
Downsampled
Spectrum
resample
Perfect
Reconstruction
Commutators
Summary
MATLAB routines
Multirate: 11 13 / 13
12: Polyphase
Filters
Heavy Lowpass
filtering
Maximum Decimation
Frequency
Polyphase
decomposition
Downsampled
Polyphase Filter
Polyphase Upsampler
Complete Filter
Upsampler
Implementation
Downsampler
Implementation
Summary
Polyphase Filters: 12 1 / 10
Polyphase
decomposition
Downsampled
Polyphase Filter
Polyphase Upsampler
Complete Filter
Upsampler
Implementation
Downsampler
Implementation
Summary
Filter Specification:
Sample Rate: 20 kHz
Passband edge: 100 Hz (1 = 0.03)
Stopband edge: 300 Hz (2 = 0.09)
Passband ripple: 0.05 dB ( = 0.006)
Stopband Gain: 80 dB ( = 0.0001)
This is an extreme filter because the cutoff frequency is only 1% of the
Nyquist frequency.
Symmetric FIR Filter:
Design with Remez-exchange algorithm
Order = 360
0
0
M=360
-20
-20
-40
-40
-60
-60
-80
-80
(rad/s)
0.05
(rad/s)
0.1
Polyphase Filters: 12 2 / 10
Upsampler
Implementation
Downsampler
Implementation
Summary
-20
-40
-60
0 1
Polyphase
decomposition
Downsampled
Polyphase Filter
Polyphase Upsampler
Complete Filter
2 1
2
1 +2
= 2 /4
K=4
-20
-40
-60
0
= 2 /7
K=7
-20
-40
-60
0
Polyphase Filters: 12 3 / 10
Polyphase decomposition
12: Polyphase Filters
Heavy Lowpass
filtering
Maximum Decimation
Frequency
Polyphase
decomposition
Downsampled
Polyphase Filter
Polyphase Upsampler
Complete Filter
Upsampler
Implementation
Downsampler
Implementation
Summary
For our filter: original Nyquist frequency = 10 kHz and transition band
centre is at 200 Hz so we can use K = 50.
Split H(z) into K filters each of order R 1. For convenience, assume
M + 1 is a multiple of K (else zero-pad h[n]).
Example:
M = 399 R = MK+1 = 8
PM
H(z) = m=0 h[m]z m
PK1
P2K1
m
= m=0 h[m]z
+ m=K h[m]z m +
PK1 PR1
= m=0 r=0 h[m + Kr]z mKr
P
PR1
m
Kr
= K1
z
m=0
r=0 hm [r]z
where hm [r] = h[m + Kr]
Example:
h0 [r] = h[0] h[50] h[350]
h1 [r] = h[1] h[51] h[351]
Polyphase Filters: 12 4 / 10
Polyphase Filter
Polyphase Upsampler
Complete Filter
Upsampler
Implementation
Downsampler
Implementation
Summary
Polyphase Filters: 12 5 / 10
Polyphase Upsampler
12: Polyphase Filters
Heavy Lowpass
filtering
Maximum Decimation
Frequency
Polyphase
decomposition
Downsampled
Polyphase Filter
Polyphase
Upsampler
Complete Filter
Upsampler
Implementation
Downsampler
Implementation
Summary
Polyphase Filters: 12 6 / 10
Complete Filter
12: Polyphase Filters
Heavy Lowpass
filtering
Maximum Decimation
Frequency
Polyphase
decomposition
Downsampled
Polyphase Filter
Polyphase Upsampler
Complete Filter
Upsampler
Implementation
.
Nyquist frequency of K
Downsampler
Implementation
Summary
0
-20
-40
-60
/50
-80
0
0.05
(rad/s)
0.1
0
-20
-40
-60
-80
0
1
2
(downsampled)
Polyphase Filters: 12 7 / 10
Upsampler Implementation
12: Polyphase Filters
Heavy Lowpass
filtering
Maximum Decimation
Frequency
Polyphase
decomposition
Downsampled
Polyphase Filter
Polyphase Upsampler
Complete Filter
Upsampler
Implementation
Downsampler
Implementation
Summary
Polyphase Filters: 12 8 / 10
Downsampler Implementation
12: Polyphase Filters
Heavy Lowpass
filtering
Maximum Decimation
Frequency
Polyphase
decomposition
Downsampled
Polyphase Filter
Polyphase Upsampler
Complete Filter
Upsampler
Implementation
Downsampler
Implementation
Summary
w[i] =
PK1
r=0
u[Ki r]
Polyphase Filters: 12 9 / 10
Summary
12: Polyphase Filters
Heavy Lowpass
filtering
Maximum Decimation
Frequency
Polyphase
decomposition
Downsampled
Polyphase Filter
Polyphase Upsampler
Complete Filter
Upsampler
Implementation
Downsampler
Implementation
Summary
Polyphase Filters: 12 10 / 10
13: Resampling
Filters
Resampling
Halfband Filters
Dyadic 1:8 Upsampler
Rational Resampling
Arbitrary Resampling
Polynomial
Approximation
Farrow Filter
Summary
MATLAB routines
Resampling: 13 1 / 10
Resampling
13: Resampling
Filters
Resampling
Halfband Filters
Dyadic 1:8 Upsampler
Rational Resampling
Arbitrary Resampling
Polynomial
Approximation
Farrow Filter
Summary
MATLAB routines
P
Rational ratio: fs Q
LPF to lower of old and new Nyquist
bandwidths: 0 = max(P,Q)
d
where d is stopband attenuation in dB and
Filter order M 3.5
is the transition bandwidth (Remez-exchange estimate).
, is typically fixed.
Fractional semi-Transition bandwidth, = 2
0
dK
e.g. = 0.05 M 7
= 0.9dK
DSP and Digital Filters (2014-5272)
Resampling: 13 2 / 10
Halfband Filters
13: Resampling
Filters
Resampling
Halfband Filters
Dyadic 1:8 Upsampler
Rational Resampling
Arbitrary Resampling
Polynomial
Approximation
Farrow Filter
Summary
MATLAB routines
0.5
0 n
by a Kaiser
We multiply ideal response sinn
window. All even numbered points are zero
except h[0] = 0.5.
0
0
(rad/s)
M=20
=2.5
M
4
Polynomial
Approximation
Farrow Filter
Summary
MATLAB routines
0.8
1
0.5
0
0
R
4
4fx = 22fx
0.4
0
0
3
0.8
0.1
3
0.9
R=8
0.5
1
0.15
0.5
M=110
0
0
Q=12
0
0
0
0
0.6
0.2
0.5
P=28
0.5
Resampling: 13 4 / 10
Rational Resampling
13: Resampling
Filters
Resampling
Halfband Filters
Dyadic 1:8 Upsampler
Rational
Resampling
Arbitrary Resampling
P
To resample by Q
do 1:P
then LPF, then Q:1.
x[n]
v[r]
y[i]
Polynomial
Approximation
Farrow Filter
Summary
MATLAB routines
Resample by
P
Q
0 =
, 20 =
max(P, Q)
2
max(P, Q)
P 1 p
Polyphase: H(z) = P
Hp (z P )
p=0 z
Commutate coefficients:
P samples of v[s] for each x[n]
Keep only every Qth output:
y[i] uses Hp (z) with p = Qi mod P
Multiplication Count:
[dB]
H(z): M + 1 60
3.5 =
Hp (z): R + 1 =
M +1
P
2.7 max(P, Q)
Q
2.7
max
1,
Multiplication rate: 2.7
max 1,
Q
P
fy =
M + 1 coeficients in all
2.7
max (fy , fx )
Resampling: 13 5 / 10
Arbitrary Resampling
13: Resampling
Filters
Resampling
Halfband Filters
Dyadic 1:8 Upsampler
Rational Resampling
Arbitrary
Resampling
Polynomial
Approximation
Farrow Filter
Summary
MATLAB routines
Q)
However # coefficients: 2.7 max(P,
1/P
1
0.5
sin 2P
2P
0
0
1
P
Q/P
1) Upsample @ P
2) LPC to 0
3) Zero-order hold
2P
(rad/s)
4P
Resampling: 13 6 / 10
[Alias Components]
Ignoring the polyphase implementation, the low pass filter operates at a sample rate of P and therefore
has a periodic spectrum that repeats at intervals of 2P . Therefore, considering positive frequencies
only, a signal component in the passband at 1 will have images at = 2nP 1 for all positive
integers n.
0.5P 1
These components are multiplied by the sin0.5P
function and therefore have amplitudes of
1
sin(n0.5P 1 1 )
sin(1n 0.5P 1 1 )
sin 0.5P 1 (2nP 1 )
=
=
.
0.5P 1 (2nP 1 )
(n0.5P 1 1 )
(n0.5P 1 1 )
P
, these images will be aliased to frequencies
When we do the downsampling to an output sample rate of Q
mod 2P . In general, these alias frequencies will be scattered throughout the range (0, ) and will
Q
result in broadband noise.
2
2
n=1 (n)
n=1 n
4P
2
2
.
6
2
is 12P1 2 .
Polynomial Approximation
13: Resampling
Filters
Resampling
Halfband Filters
Dyadic 1:8 Upsampler
Rational Resampling
Arbitrary Resampling
Polynomial
Approximation
Farrow Filter
Summary
MATLAB routines
-60
-80
0
1
0.5 h [0]
p
0
0
M=249, =6.5
hp[2] hp[3] hp[4]
hp[1]
50
100
150
200
m
-3
error
x 10
L=4
0
-1
0
0
-20 0
-40
-60
-80
0
50
100
150
200
Resampling: 13 7 / 10
Farrow Filter
13: Resampling
Filters
Resampling
Halfband Filters
Dyadic 1:8 Upsampler
Rational Resampling
Arbitrary Resampling
Polynomial
Approximation
Farrow Filter
Summary
MATLAB routines
Q
Filter coefficients depend on fractional
part
of
i
P:
j k
Q
n
where
n
=
i
[i] = i Q
P
P
R+1=
M +1
P
=5
PR
Horners Rule:
y[i] = v0 [n] + (v1 [n] + (v2 [n] + ( )))
Multiplication Rate:
Q
2.7
R + 1 max 1, P
Each Bk (z) needs R + 1 per input sample
Horner needs L per output sample
fx
2.7
Total rate: (L + 1) (R + 1) fx + Lfy = max 1, fy fx + Lfy
Resampling: 13 8 / 10
Summary
13: Resampling
Filters
Resampling
Halfband Filters
Dyadic 1:8 Upsampler
Rational Resampling
Arbitrary Resampling
Polynomial
Approximation
Farrow Filter
Summary
MATLAB routines
Resampling: 13 9 / 10
MATLAB routines
13: Resampling
Filters
Resampling
Halfband Filters
Dyadic 1:8 Upsampler
Rational Resampling
Arbitrary Resampling
Polynomial
Approximation
Farrow Filter
Summary
MATLAB routines
gcd(p,q)
polyfit
polyval
upfirdn
resample
Resampling: 13 10 / 10
14: FM Radio
Receiver
FM Radio Block
Diagram
Aliased ADC
Channel Selection
Channel Selection (1)
Channel Selection (2)
Channel Selection (3)
FM Demodulator
Differentiation Filter
Pilot tone extraction
Polyphase Pilot tone
Summary
FM Radio: 14 1 / 12
87.5
108
MHz
L-R
L+R
RDS
0
15 19 23
38
53 57 kHz
FM Modulation:
Freq deviation: 75 kHz
FM Radio: 14 2 / 12
-80
-40
72.5
87.5
40
ff s
f+2f s
However:
fs = 80 creates aliased
images at intervals of fs
f+f s
80 MHz
ve frequencies also
generate images
We want the image
between 7.5 and 28 MHz
Need an analogue bandpass
filter to extract the FM band
0
|H| (dB)
14: FM Radio
Receiver
FM Radio Block
Diagram
Aliased ADC
Channel Selection
Channel Selection (1)
Channel Selection (2)
Channel Selection (3)
FM Demodulator
Differentiation Filter
Pilot tone extraction
Polyphase Pilot tone
Summary
f2f s
Aliased ADC
-60
108
132 MHz
FM Radio: 14 3 / 12
Channel Selection
14: FM Radio
Receiver
FM Radio Block
Diagram
Aliased ADC
Channel Selection
Channel Selection (1)
Channel Selection (2)
Channel Selection (3)
FM Demodulator
Differentiation Filter
Pilot tone extraction
Polyphase Pilot tone
Summary
7.5
f c=c100kHz
28
MHz
0
40
-400 -300
-100
100
FM Radio: 14 4 / 12
fc
M =
60 dB
3.5
-400 -300
-100
100
= 1091
Multiplication Load:
2 80 MHz (freq shift) + 12 80 MHz (Hp (z)) = 14 80 MHz
DSP and Digital Filters (2014-5272)
FM Radio: 14 5 / 12
(2)
j2 800
j2 ln
4
]
= m=0 g[c] [m]u[200n m]e
[g[c] [m] = h[m]e
P
j2 ln
4 indep of m]
= (j)ln M
[e
g
[m]u[200n
m]
m=0 [c]
Multiplication Load for polyphase implementation:
G[c],p (z) has complex coefficients real input 2 mults per tap
(j)ln {+1, j, 1, +j} so no actual multiplies needed
Total: 12 80 MHz (G[c],p (z)) + 0 (j lr ) = 12 80 MHz
FM Radio: 14 6 / 12
Channel Selection
(3)
FM Demodulator
Differentiation Filter
Pilot tone extraction
Polyphase Pilot tone
Summary
cm
= h[200s + p]e
[polyphase]
[l = cmod 4 ]
ls
FM Radio: 14 7 / 12
FM Demodulator
14: FM Radio
Receiver
FM Radio Block
Diagram
Aliased ADC
Channel Selection
Channel Selection (1)
Channel Selection (2)
Channel Selection (3)
FM Demodulator
Differentiation Filter
Pilot tone extraction
Polyphase Pilot tone
Summary
0
-400 -300
-100
100
d
dt
d(log v)
dt
d
dt .
1 dv
v dt
1
|v|2
We need:
(1) Differentiation filter, D(z)
(2) Complex multiply, w[n] v [n] (only need part)
(3) Real Divide by |v|2
v dv
dt
L-R
L+R
RDS
15 19 23
38
53 57 kHz
FM Radio: 14 8 / 12
Differentiation Filter
14: FM Radio
Receiver
FM Radio Block
Diagram
Aliased ADC
Channel Selection
Channel Selection (1)
Channel Selection (2)
Channel Selection (3)
FM Demodulator
Differentiation
Filter
Pilot tone extraction
Polyphase Pilot tone
Summary
(
j || 0
d jt
jt
j
= je
D(e ) =
Differentiation: dt e
0
|| > 0
i
h jn
R
jn 0
0
j
1
Hence d[n] = 2
[IDTFT]
jejn d = 2 ejn ej 2 n2
0
=
1
0.5
0
0
n0 cos n0 sin n0
n2
0
|H| (dB)
1.5
|H|
-20
-40
0
-60
-80
0.5
1.5
2
(rad/sample)
2.5
0.5
1.5
2
(rad/sample)
2.5
2140 kHz
400 kHz :
FM Radio: 14 9 / 12
F(z)
G(z)
L-R
L+R
H(z)
RDS
0
15 19 23
38
53 57 kHz
Aim: extract 19 kHz pilot tone, double freq real 38 kHz tone.
20k
Transition bands:
F (z): 1 19 kHz,
H(z): 1 3 kHz,
G(z): 2 18 kHz
= 0.28 M = 60, = 0.63 27, = 0.25 68
DSP and Digital Filters (2014-5272)
FM Radio: 14 10 / 12
Multiplies:
F and G each: (3 + 2) 400 kHz, H + x2 : (2 30 + 4) 20 kHz
Total: 13.2 400 kHz [Full-rate bandpass H(z) needs 273 400 kHz]
FM Radio: 14 11 / 12
Summary
14: FM Radio
Receiver
FM Radio Block
Diagram
Aliased ADC
Channel Selection
Channel Selection (1)
Channel Selection (2)
Channel Selection (3)
FM Demodulator
Differentiation Filter
Pilot tone extraction
Polyphase Pilot tone
Summary
d
dt
FM Radio: 14 12 / 12
15: Subband
Processing
Subband processing
2-band Filterbank
Perfect
Reconstruction
Quadrature Mirror
Filterbank (QMF)
Polyphase QMF
QMF Options
Linear Phase QMF
IIR Allpass QMF
Tree-structured
filterbanks
Summary
Merry Xmas
Subband Processing: 15 1 / 12
Subband processing
15: Subband
Processing
Subband
processing
2-band Filterbank
Perfect
Reconstruction
Quadrature Mirror
Filterbank (QMF)
Polyphase QMF
QMF Options
Linear Phase QMF
IIR Allpass QMF
Tree-structured
filterbanks
Summary
Merry Xmas
The Hm (z) are bandpass analysis filters and divide x[n] into
frequency bands
Subband processing often processes frequency bands independently
The Gm (z) are synthesis filters and together reconstruct the output
The Hm (z) outputs are bandlimited and so can be subsampled
without loss of information
P 1
Sample rate multiplied overall by
Pi
P 1
= 1 critically sampled : good for coding
P P1i
Pi > 1 oversampled : more flexible
Goals:
(a) good frequency selectivity in Hm (z)
(b) perfect reconstruction: y[n] = x[n d] if no processing
Benefits: Lower computation, faster convergence if adaptive
Subband Processing: 15 2 / 12
2-band Filterbank
15: Subband
Processing
Subband processing
2-band Filterbank
Perfect
Reconstruction
Quadrature Mirror
Filterbank (QMF)
Polyphase QMF
QMF Options
Linear Phase QMF
IIR Allpass QMF
Tree-structured
filterbanks
Summary
Merry Xmas
Vm (z) = Hm (z)X(z)
PK1
j2k
1
1
K
K
z )=
Um (z) = K k=0 Vm (e
1 o
n
1
1
2
+ Vm z 2
2 Vm z
Subband Processing: 15 3 / 12
Perfect Reconstruction
15: Subband
Processing
Subband processing
2-band Filterbank
Perfect
Reconstruction
Quadrature Mirror
Filterbank (QMF)
Polyphase QMF
QMF Options
Linear Phase QMF
IIR Allpass QMF
Tree-structured
filterbanks
Summary
Merry Xmas
Subband Processing: 15 4 / 12
Tree-structured
filterbanks
Summary
Merry Xmas
QMF satisfies:
(a) H0 (z) is causal and real
j
(b) H1 (z) = H0 (z): i.e. H0 (e ) is reflected around =
(c) G0 (z) = 2H1 (z) = 2H0 (z)
(d) G1 (z) = 2H0 (z) = 2H1 (z)
QMF is alias-free:
A(z) = 12 {H0 (z)G0 (z) + H1 (z)G1 (z)}
=
1
2
Subband Processing: 15 5 / 12
Polyphase QMF
15: Subband
Processing
Subband processing
2-band Filterbank
Perfect
Reconstruction
Quadrature Mirror
Filterbank (QMF)
Polyphase QMF
QMF Options
Linear Phase QMF
IIR Allpass QMF
Tree-structured
filterbanks
Summary
Merry Xmas
Polyphase decomposition:
H0 (z) = P0 (z 2 ) + z 1 P1 (z 2 )
H1 (z) = H0 (z) = P0 (z 2 ) z 1 P1 (z 2 )
G0 (z) = 2H0 (z) = 2P0 (z 2 ) + 2z 1 P1 (z 2 )
G1 (z) = 2H0 (z) = 2P0 (z 2 ) + 2z 1 P1 (z 2 )
Transfer Function:
T (z) = H02 (z) H12 (z) = 4z 1 P0 (z 2 )P1 (z 2 )
T (z) = z d P0 (z) = a0 z k , P1 (z) = a1 z k+1d
H0 (z) has only two non-zero taps poor freq selectivity
Perfect reconstruction QMF filterbanks cannot have good freq selectivity
DSP and Digital Filters (2014-5273)
Subband Processing: 15 6 / 12
QMF Options
15: Subband
Processing
Subband processing
2-band Filterbank
Perfect
Reconstruction
Quadrature Mirror
Filterbank (QMF)
Polyphase QMF
QMF Options
Linear Phase QMF
IIR Allpass QMF
Polyphase decomposition:
Tree-structured
filterbanks
Summary
Merry Xmas
Subband Processing: 15 7 / 12
Tree-structured
filterbanks
Summary
Merry Xmas
M
2
T (z) 1
H0 (ej )
M even T (e
h0[n]
M=11
0.04
H1
0.02
-20
0
-40
-60
0
H0
-0.02
1
-0.04
0
Subband Processing: 15 8 / 12
Tree-structured
filterbanks
Summary
Merry Xmas
|T (z)| = 1
Choose P0 (z) and P1 (z) to be allpass
IIR filters:
H0,1 (z) = 12 P0 (z 2 ) z 1 P1 (z 2 ) ,
G0,1 (z) = 2H0,1 (z)
A(z) = 0 No aliasing
T (z) = H02 H12 = . . . = z 1 P0 (z 2 )P1 (z 2 ) is an allpass filter.
-2
-4
-6
M P=1
-8
0
P0(z2)
-20
z-1P1(z2)
-40
M H=5
H0
15
H1
H0(z)
10
5
-60
0
T(z)
1
(rad/s)
Subband Processing: 15 9 / 12
Tree-structured filterbanks
A half-band filterbank divides the full band into two equal halves.
1
X=Y
0.5
You can repeat the process on either or both of the signals u1 [p]
and v1 [p].
0
0
U1
0.5
0
0
V1
1
0.5
U2
0
0
V2
V1
1
0.5
0
0
U3
V3
V2
V1
Subband Processing: 15 10 / 12
Summary
15: Subband
Processing
Subband processing
2-band Filterbank
Perfect
Reconstruction
Quadrature Mirror
Filterbank (QMF)
Polyphase QMF
QMF Options
Linear Phase QMF
IIR Allpass QMF
Tree-structured
filterbanks
Summary
Merry Xmas
Half-band filterbank:
Reconstructed output is T (z)X(z) + A(z)X(z)
Unwanted alias term is A(z)X(z)
Perfect reconstruction: imposes strong constraints on analysis
filters Hi (z) and synthesis filters Gi (z).
Quadrature Mirror Filterbank (QMF) adds an additional symmetry
constraint H1 (z) = H0 (z).
Perfect reconstruction now impossible except for trivial case.
Neat polyphase implementation with A(z) = 0
Johnston filters: Linear phase with T (z) 1
Allpass filters: Elliptic or Butterworth with |T (z)| = 1
Can iterate to form a tree structure with equal or unequal
bandwidths.
See Mitra chapter 14 (which also includes some perfect reconstruction
designs).
Subband Processing: 15 11 / 12
Merry Xmas
Subband Processing: 15 12 / 12
Notation
All signals and filter coefficients are real-valued unless explicitly noted otherwise.
Unless otherwise specified, upper and lower case letters are used for sequences and their z-transforms
respectively. The signal at a block diagram node V is v[n] and its z-transform is V (z).
x[n] = [a, b, c, d, e, f ] means that x[0] = a, . . . x[5] = f and that x[n] = 0 outside this range.
(z), (z), z , |z| and z denote respectively the real part, imaginary part, complex conjugate,
magnitude and argument of a complex number z.
Abbreviations
BIBO
CTFT
DCT
DFT
DTFT
LTI
MDCT
SNR
Standard Sequences
[n] = 1 for n = 0 and 0 otherwise.
condition [n] = 1 whenever "condition" is true and 0 otherwise.
u[n] = 1 for n 0 and 0 otherwise.
Geometric Progression
rn=0 n zn =
1 r+1 zr1
1z1
q zq r+1 zr1
1z1
c
Imperial
College London
1/3
z:
x[n] =
jt dt
CTFT:
X( j ) =
DTFT:
jn
X(e j ) =
x[n]e
DFT:
x[n]e j2 N
X[k] = N1
0
DCT:
2(2n+1)k
X[k] = N1
n=0 x[n] cos
4N
x(t)e
x(t) =
1
2
x[n] =
1
2
kn
2(2n+1+N)(2k+1)
X[k] = 2N1
n=0 x[n] cos
8N
MDCT:
y[n] =
X(z)zn1 dz
X( j )e
X(e
1
N
jt d
j )e jn d
kn
0N1 X[k]e j2 N
N1
+ N2 n=1
X[k] cos 2(2n+1)k
4N
X[0]
N
X[k] cos
N1
0
1
N
x[n] =
x[n] =
1
2 j
2(2n+1+N)(2k+1)
8N
Convolution
v[n] = x[n] y[n] ,
r= x[r]y[n r]
DTFT:
v[n] = x[n]y[n]
V e j =
1
2 X
DFT:
v[n] = x[n]y[n]
V e j = X e j Y e j
e j ~Y e j =
1
2
e j Y e j( ) d
mod N ]
N1
X[r]Y [(k r)
r=0
mod N ]
Group Delay
The group delay of a filter, H(z), is H (e j ) = dH(e
d
j )
z dH(z)
H(z) dz
z=e j
F (nh[n])
F (h[n])
where
a
3.5
2. M
a8
2.2
3. M
a1.220 log10 b
4.6
where a =stop band attenuation in dB, b = peak-to-peak passband ripple in dB and = width of
smallest transition band in normalized rad/s.
c
Imperial
College London
2/3
z-plane Transformations
A lowpass filter, H(z), with cutoff frequency 0 may be transformed into the filter H(z) as follows:
Target H(z)
Substitute
z1
Lowpass
< 1
Bandstop
1 2
z1
1 z1
z +
z1 = 1+
z1
Highpass
> 1
Bandpass
1 < < 2
Parameters
z1
(1)2 z1 +(+1)z2
(+1)2
z1 +(1)z2
(1)2 z1 +(+1)z2
(+1)2 z1 +(1)z2
z1 =
+
cos 2 2 1
,
cos 2 2 1
+
cos 2 2 1
,
cos 2 2 1
c
Imperial
College London
sin 0 2 1
+
sin 0 2 1
+
cos 0 2 1
cos 0 2 1
= cot
2 1
2
tan
0
2
= tan
2 1
2
tan
0
2
3/3