This action might not be possible to undo. Are you sure you want to continue?
doc 1
Introduction to DSP:
Text Books : (P) = Proakis , (M) = Mitra (I) = Iffeachor.
(previous reference continues to apply unless change is indicated)
Signals: (p)
speech, biomedical, music, video, radar,
DSP concerned with digital representation of signals, and use of digital processors to
analyse, modify, and extract information.
Signal converted to digital and then processed then reconverted.
Advantages:
• Guaranteed accuracy: no. of bits
• Perfect reproducibility: no equipment dependence, tolerances etc.
• No drift in performance with age, temp,
• With CMOS, reliability, small size, low cost, low power and high speed
• Flexibility: a given system can be reprogrammed, with same hardware
• Superior, near ideal performance: i.e. linearity, adaptive filtering etc
• Storage: digital storage media can be used
Applications:
• Image processing: pattern recognition, enhancement,
• Control and Instrumentation: spectral analysis, noise reduction, and data
compression
• Speech: recognition and synthesis, text to speech, equalisation
• Military: secure communication, radar and sonar, guidance systems.
• Communications: echo suppression, adaptive equalisation, spread spectrum,
• Biomedical: EEGECG analysis, scanners, Xray storage, and enhancement
Classification of Signals: (P,M)
Multichannel and Multidimensional
Signal is a function of one or more variables. It can be real valued, complex valued or
a vector
• A sin 3π t is real valued
• Ae
j3π t
is complex valued
Vector signals are generated by multiple sources. E.g. 3 lead ECG, RGB, and are
multichannel signals.
The variable may be 1dimensional e.g. t
DSP2008.doc 2
A picture signal (B&W) is 2dimensional as it is a function of x and y
Colour TV is 3 channel 3 dimensional e.g. (x,y,t),
Continuous Time and Discrete Time Signals: (P,M)
• Continuous time signals are defined for all value of time i.e. speech
• Discrete time signals defined at specific instances of time x[n]
Continuous time signals may be
• analog if all values are allowed, or
• Quantized Boxcar signals if specific values are allowed.
Discrete time signals may be
• digital (specific values) or
• sampled (any value)
Deterministic and Random Signals: (P,M)
• If an expression or a table can define a signal model then it is deterministic.
The past present and future values can be known without uncertainty.
• If the signal cannot be described to any reasonable degree of accuracy by an
expression, then it is random.
Concept of Frequency in Continuous and Discrete Time Signals: (P)
Periodic Analog signal:
A periodic analog signal satisfies ) ( ) ( T t x t x
a a
+ = where T is the repetition period
e.g. F t A t x
a
π θ 2 ), 2 cos( ) ( = Ω + Ω = uses Ω as frequency in radians /sec, F is
frequency in Hz.
Here F can be increased without limit, and can also be 0, and all resulting signals are
distinct. Increasing F results in increase in the rate of oscillation.
Periodic Discrete Time signal:
The corresponding Discrete Time sinusoid would be ) cos( ) ( θ ω + = n A n x where n is an
integer called sample number. ω is the freq. in radians /sample, f π ω 2 = and f has
dimensions of cycles/sample.
It is periodic with a period N if and only if ) ( ) ( n x N n x = + for all n .
Smallest value of N is the Fundamental period.
For a periodic discrete time sinusoid )) ( 2 cos( ) 2 cos(
0 0
N n f n f + = π π
Thus
DSP2008.doc 3
π π k N f 2 2
0
= , where k is an integer, or
N
k
f =
0
and must be a rational number.
Aliasing of Discrete Time Signals:
Discrete time sinusoids whose frequencies are separated by integer multiples of π 2
are identical. For example,
If π ω ω 2
0
+ =
k
then ) cos(
0
n w and ) cos( n
k
ω are indistinguishable.
However sinusoids in range π ω π ≤ ≤ − or
2
1
2
1
≤ ≤ − f are always distinct.
Signals with π ω > are called aliases of some corresponding sinusoid with π ω <
Fundamental Frequency Range:
The highest rate of oscillation is when π ω = or π − or
2
1
= f or
2
1
−
The frequency range π ω 2 0 ≤ ≤ or 
.

\

≤ ≤ − ≤ ≤ ≤ ≤ −
2
1
2
1
, 1 0 f f w π π is the called
the fundamental range.
Representation as Complex Exponentials:
Continuous time exponential components can be used to represent a given periodic
signal, i.e. Fourier series.
The discrete time complex exponential is periodic if its relative frequency is a
rational number. We may choose
N
f
1
0
= and define
n f j
k
e n s
0
2
) (
π
= , with 2 , 1 , 0 ± ± = k etc.
In this case however ) ( ) ( ) (
2 ) ( 2
n s n s e e n s
k k
N j N k n j
N k
= = =
+
+
π π
and there are only N
distinct complex exponentials in the set.
Hence
¯
−
=
=
1
0
/ 2
) (
N
k
N n k j
k
e c n x
π
is a periodic signal with fundamental period N
Sampling: (P)
Consider uniform sampling of an analogue signal ) ( ) ( nT x n x
a
= where T is sampling
period, and
T
F
s
1
= the sampling frequency.
Since
s
F
n
nT t = = the analogue sinusoid can be written as
) 2 cos( ) ( θ π + = Ft A t x
a
thus


.

\

+ = + = = θ π θ π
s
a
F
F
n A FnT A n x nT x 2 cos ) 2 cos( ) ( ) (
Comparing with the discrete time sinusoid expression
¯
+∞
−∞ =
Ω
=
k
t jk
k a
e c t x
0
) (
DSP2008.doc 4
) 2 cos( ) ( θ π + = fn A n x
we find
s
F
F
f = or T Ω = ω .
Since
2
1
2
1
≤ ≤ − f and π ω π ≤ ≤ − , the frequency of the continuous time sinusoid
when sampled at
T
F
s
1
= must fall in range
T
F
F
F
T
s s
2
1
2 2 2
1
≤ ≤ ≤ − = −
,
T
F F
T
s s
π
π π
π
= ≤ Ω ≤ − = −
Thus a fundamental difference is in the range of values. Periodic sampling of a
continuous time signal involves a mapping of the infinite frequency range for F or
Ω into a finite range for f or ω .
The highest freq. in a discrete time signal is π ω = or
2
1
= f ,
the corresponding highest values of F and Ω are
T
F
s
2
1
2
= , and
T
F
s
π
π = respectively.
Thus sampling produces an ambiguity with the highest frequency that can be
uniquely distinguished being
2
s
F
.
This can be seen from the following:
If ) 2 cos( ) (
0
n f A n x π = is the sampled signal derived from an analog signal
) 2 cos( ) (
0
t F A t x
a
π = with frequency
0
F ,
Then for
s k
kF F F + =
0
, the sinusoid ) 2 cos( ) ( t F A t x
k a
π = gives a sampled signal
which is the same as the first signal.
Thus the process of sampling introduces an ambiguity (Aliasing).
If the signal has a highest freq. B F =
max
then it follows that to avoid aliasing,
2
max
s
F
F < or
max
2F F
s
>
Recovery of Analog Signals :
The sampling theorem states that for B F
s
2 > , ) (t x
a
can be exactly recovered using
the interpolation function
Bt
Bt
t G
π
π
2
) 2 sin(
) ( =
Thus
¯
∞
−∞ =


.

\

−


.

\

=
n s s
a a
F
n
t g
F
n
x t x ) (


.

\

=


.

\
 +
= = n
F
F
A n
F
kF F
A nT x n x
s s
s
a
0 0
2 cos 2 cos ) ( ) ( π π
DSP2008.doc 5
At the minimum sampling rate B F
s
2 =
¯
∞
−∞ =

.

\

−

.

\

−

.

\

=
n
a a
B
n
t B
B
n
t B
B
n
x t x
2
2
2
2 sin
2
) (
π
π
DiscreteTime Signals:
Sequences of numbers (samples) represented by ] [n x where n is integer with range
∞ < < ∞ − n .
The signal is the set [ ] { } n x .
[ ] n x may be periodic samples of a continuous waveform ( ) t x
a
.
[ ] ( ) nT x n x
a
= where T = sampling period,
T
F
T
=
1
Hz.
[ ] n x may be complex and [ ] { } [ ] { } [ ] { } n x j n x n x
im re
+ = .
Types of Sequences: (M)
Finite:
A sequence is finite if N
1
≤ n ≤ N
2
, N
2
> N
1
, ∞ < N
1
, N
2
< ∞
Length is defined as N = N
1
+ N
2
1 (N point sequence)
Such a sequence can be made infinite by assigning zero values outside defined range.
h[n] = [3.5, 9.4, 0.05, 67.0, 205, 0.8]
↑
Above sequence is defined from –2 ≤ n ≤ 3.
It can be made infinite by defining h[n] = 0 for n < 2, n > 3
Infinite:
Right Sided.
Zero values for n < N
1
, N
1
negative or positive.
x[n] = 0 n <2, and
= n n ≥ 2
If N
1
≥ 0 then CAUSAL.
Left Sided:
zero for n > N
2
.
If N
2
≤ 0 then ANTI CAUSAL.
x[n] = (1/n) n ≤ 5
= 0 n > 5
Two Sided:
Has ∞ ≤ n ≤ + ∞.
x[n] = 1/n
2
DSP2008.doc 6
Even / Odd:
Conjugate symmetric x[n] = x
*
[n]
If all x[n] real then EVEN
Conjugate asymmetric x[n] = x * [n],
If all x[n] real then ODD
Periodic:
x[n] = x[n + kN] for all n, N is a positive integer, and is the PERIOD of sequence
N
f
= fundamental period is the period with smallest N
Bounded:
x[n] ≤ B
x
< ∞
x[n] = 0 n ≤ 0
= 1/n n > 0
Absolutely Summable:
¯ x[n] < ∞
Square Summable:
E = ¯ x[n]
2
< ∞, E is the energy
Basic Sequences: (M)
Unit Sample:
δ[n] = 1 n = 0
= 0 n ≠ 0
Unit Step:
µ[n] = 1 n ≥ 0
= 0 n < 0
µ[n] = ¯ δ [k], δ[n] = µ[n]  µ[n1]
Exponential:
[ ]
n
A n x α = , where A, α are complex in general and
0 0
ω σ
α
j
e
+
= ,
Φ
=
j
e A A .
[ ] ( ) Φ + = n e A n x
n
re 0
cos
0
ω
σ
[ ] ( ) Φ + = n e A n x
n
im 0
sin
0
ω
σ
For a real sinusoid ( ) Φ + = n A n x
0
cos ] [ ω ,
0
ω is angular frequency.
In Phase Sequence:
For a real sinusoid sequence ] [ ] [ ] [ n x n x n x
q i
+ = ,
DSP2008.doc 7
) cos( cos ] [
0
n A n x
i
ω φ = is the inphase sequence
Quadrature Sequence:
) sin( sin ] [
0
n A n x
q
ω φ − = is the quadrature sequence.
Complex exponential sequence with 0
0
= σ and real sinusoidal sequence
are periodic with period N as long as r n π ω 2
0
= where r is an integer.
Or
r
N
=
0
2
ω
π
.
Thus Periodic only if
0
2
ω
π
is rational.
Operations on Sequences: (M)
Product:
w[n] = x[n] . y[n] i.e. in modulation, windowing
Addition:
w
2
[n] = x[n] + y[n]
Scalar multiplication:
w
3
[n] = A . x[n]
Time Reversal:
w
4
[n] = x[n]
Delay:
w
5
[n] = x[n  N] N positive
Advance:
w
6
[n] = x[n + N]
Sampling rate alteration:
If x[n] sampled at F
T
then y[n] samples will be at F
T
’
where F
T
’
/F
T
= R
If R > 1 then Interpolation
If R < 1 then Decimation
Sampling Process: ( M)
samples at
T T
n
F
n
nT
Ω
= = π 2
where Ω
T
= sampling angular frequency = 2 π F
T
If analog signal sampled is
) cos( ) 2 cos( ) (
0 0
Φ + Ω = Φ + = t A t f A t x
a
π
We get discrete time signal
) cos( ) ) / 2 cos(( ) cos( ] [
0 0 0
Φ + = Φ + Ω Ω = Φ + Ω = n A n A nT A n x
T
ω π
DSP2008.doc 8
with T
T 0 0 0
/ ) 2 ( Ω = Ω Ω = π ω called the normalised digital angular frequency (in
radians/sample)
In the general case, a family of sinusoids
Φ + Ω + Ω = t k A t x
T k a
) cos(( ) (
0 ,
k = 0, ± 1, ± 2, ± 3,….
gives sampled signal
( )
] [
cos
2 cos
) 2 cos
) ) cos(( ) (
0
0
0
0 ,
n x
n A
n
A
n
k A
nT k A nT x
T
T
T
T k a
=
Φ + =

.

\

Φ +
Ω
Ω =

.

\

Φ +

.

\

Ω
Ω + Ω =
Φ + Ω + Ω =
ω
π
π
If
0
2Ω > Ω
T
, then π ω π < < −
0
implies no aliasing, otherwise aliasing is observed.
Example:
v(t) = 6 cos (60 π t) + 3 sin (300 π t) + 2 Cos (340 π t) + 4 cos (500 π t)
+ 10 sin (660 π t) is sampled at T =1/200 sec.
Giving
v[n] = 6 cos (0.3πn) + 3 sin (1.5πn) +2 cos (1.7πn) + 4 cos (2.5πn)
+ 10 sin (3.3πn)
= 6 cos (0.3πn) + 3 sin ((2π  0.5π)n) + 2 cos ((2π  0.3π)n)+4 cos((2π + 0.5π)n)
 10 sin ((4π  0.7π)n)
= 8 cos (0.3πn) + 5 cos (0.5πn + 0.6435)  10 sin (0.7πn)
Same results are obtained if
w(t) = 8 cos (60πt) + 5 cos (100πt + 0.6435) 10 sin (140πt) are sampled at the same
rate.
Linear Systems: (M, P)
Input x[n] = α x
1
[n] + β x
2
[n] gives an output y[n] = α y
1
[n] + β y
2
[n]
for all α, β, x
1
, and x
2
example:
y[n] = nx[n] is linear
y
1
[n[ = nx
1
[n], y
2
[n] = nx
2
[n] thus y
3
[n] = n([a
1
x
1
[n] + a
2
x
2
[n])
also a
1
y
1
[n] +a
2
y
2
[n] = a
1
nx
1
[n] + a
2
nx
2
[n] .
y[n] = x[n
2
] is linear
y
1
[n] = x
1
[n
2
] and y
2
[n] = x
2
[n
2
] hence y
3
[n] = a
1
x
1
[n
2
] + a
2
x
2
[n
2
]
linear combination of outputs is a
1
y
1
[n] +a
2
y
2
[n] = a
1
x
1
[n
2
] + a
2
x
2
[n
2
]
DSP2008.doc 9
y[n] = x
2
[n] is nonlinear
y
1
[n] = x
1
2
[n] and y
2
[n] = x
2
2
[n] hence y
3
[n] = (a
1
x
1
[n] + a
2
x
2
[n])
2
linear combination of outputs is a
1
y
1
[n] +a
2
y
2
[n] = a
1
x
1
2
[n] + a
2
x
2
2
[n]
y[n] = Ax[n] + B is linear only if B = 0
y
1
[n] = Ax
1
[n] + B and y
2
[n] = Ax
2
[n] + B hence y
3
[n] = A(a
1
x
1
[n] + a
2
x
2
[n]) + B
linear combination of outputs is a
1
y
1
[n] +a
2
y
2
[n] = Aa
1
x
1
[n] + a
1
B + Aa
2
x
2
[n] + a
2
B
Accumulator y[n] = ¯ x[n]
y[n] = ¯ (α x
1
[k] + β x
2
[k]) = α ¯ x
1
[k] + β ¯ x
2
[k] = α y
1
[n] + β y
2
[n] is linear
Accumulator with an initial condition (Causal accumulator) has
¯
=
+ − =
n
k
k x y n y
0
1 1 1
] [ ] 1 [ ] [ and
¯
=
+ − =
n
k
k x y n y
0
2 2 2
] [ ] 1 [ ] [
Hence for input α x
1
[n] + β x
2
[n]
¯
=
+ + − =
n
l
k x k x y n y
0
2 1 1 1
] [ ] [ ] 1 [ ] [ β α =
¯ ¯
= =
+ + −
n
k
n
k
k x k x y
0
2
0
1
] [ ] [ ] 1 [ β α
but
¯ ¯
= =
+ − + + − = +
n
k
n
k
k x y k x y n y n y
0
2 2
0
1 1 2 1
] [ ] 1 [ ] [ ] 1 [ ] [ ] [ β β α α β α
which can equal y[n] only if y[1] = α y
1
[1] + β y
2
[1] for all α, β, y[1], y
1
[1] and
y
2
[1]. This is possible if and only if system starts from rest with initial condition
zero. Otherwise it is Nonlinear
Shift Invariance: (Time Invariance) (M,P)
If x[n] → y[n] then x[nn
0
] → y[nn
0
]
Y[n] = x[n] – x[n1] is time invariant
If input is delayed and applied y(n,k) = x(nk) – x(nk1)
If output is delayed y(nk) = x(nk) – x(nk1)
Y[n] = nx[n] is time variant
Response to x(nk) is y(n,k) = nx(nk)
However if output is delayed, y(nk) = (nk)x(nk)
Y[n] = x[n] is time variant
Response to x(nk) is y(n,k) = x(nk)
However if output is delayed, y(nk) = (n+k)
Y[n] = x[n]cos(wn) is time variant
Linear Time Invariant (LTI):
A system having both Linear and Timeinvariance properties.
DSP2008.doc 10
Causality:
y[n
0
] depends only on x[n] where n ≤ n
0
Stability:
Bounded input gives bounded output (BIBO Stability)
if x[n] < B
x
then y[n] < B
y
Impulse Response And Step Response:
Impulse Response:
denoted by {h[n]} is the response to a unit sample sequence {δ[n]}
Step Response:
{S[n]} → response to {µ [n]}
Response To Signal x[n]: (M,P)
Expressing x[n] sequence as
¯
+∞ =
−∞ =
− =
k
k
k n k x n x ) ( ] [ ] [ δ the response of LTI system to
x[k]δ(nk) will be x[k]h[nk]
Thus
y[n] = ¯x[k]h[nk] or by a change of variables
y[n] = ¯x[nk]h[k]
which is a convolution ¯ y[n] = x[n] * h[n]
example:
a = [ 2 0 1 –1 3], b = [1 2 0 –1]
a*b = [2 –4 1 3 1 5 1 –3]
Because of the summation both x[n] and y[n] cannot be infinite.
Convolution of sequence of lengths M and N gives a sequence of length M+N1
Convolution is commutative, associative and distributive.
Stability Condition For LTI System: (P)
S = ¯h[n] < ∞
Causality Condition: (P)
h[n] = 0 for n < 0
For a Causal sequence input into a causal LTI system
i.e. y[n] = 0 for n < 0 and is thus also causal
¯ ¯
= =
− = − =
n
k
n
k
k n h k x k n x k h n y
0 0
] [ ] [ ] [ ] [ ] [
DSP2008.doc 11
Classes Of LTI Systems: (P)
FIR: Finite Impulse Response
if h[n] is of finite length
h[n] = 0 for n < N
1
and n > N
2
with N
1
< N
2
Impulse response is zero outside a finite time interval. Causal FIR system has
h[n] = 0 n < 0 and n ≥ M.
The convolution equation for causal FIR is
Output is the weighted linear combination of the past M input samples. Has a
memory of M samples. It can be realised by adders, multipliers and finite memory.
IIR: infinite impulse response
IIR if h[n] is of infinite length.
In a causal IIR summation in the convolution is from k = 0 to ∞ It involves all the
past input samples, and requires infinite memory. So realisation by convolution
¯ form is impractical. A more practical way is by the difference equation form.
Example: cumulative average of x[n] in 0 ≤ k ≤ n
Knowledge of all input samples required, and therefore an increasing memory
requirement with time.
However rewriting the above expression as:
The expression is recursive, and calculation requires 2 multiplication, 1 addition and
1 memory location (y[n1]).
Recursive System:
Systems whose output depends on past output values. In the previous example
y[n
0
] = (n
0
/ n
0
+1)y[n
0
1] + (1/ n
0
+1)x[n
0
],
y[n
0
1] is the initial condition at n = n
0
. Computation of the output of a recursive
system at a time say n
0
requires computation of the previous values of y[k] in correct
order.
NonRecursive System:
Such systems depend only on the present and past inputs.
¯
−
=
− =
1
0
] [ ] [ ] [
M
k
k n x k h n y
1 , 0 ] [
1
1
] [
0
=
+
=
¯
=
n k x
n
n y
n
k
] [
1
1
] 1 [
1
] [
] [ ] 1 [ ] [ ] [ ] [ ) 1 (
1
0
n x
n
n y
n
n
n y
n x n ny n x k x n y n
n
+
+ −
+
=
∴
+ − = + = +
¯
−
DSP2008.doc 12
Causal FIR systems are nonrecursive. Their computation can be in any order
Simple Recursive System:
Let y[n] = ay[n1]+x[n] & let initial condition be y[1]
y[0] = ay[1] +x[0]
y[1] = ay[0] +x[1] = a
2
y[1] +ax[0] +x[1]
y[2] = ay[1]+x[2] = a
3
y[1] + a
2
x[0]+ax[1]+x[2]
y[n] = a
n+1
y[1] + a
n
x[0] + a
n1
x[1] + …..+ax[n1]+x[n]
or
For an initially relaxed system y[1] = 0, and the output is the zerostate response or
the Forced response.
For a nonrelaxed system, with x[n] = 0 for all n output is called zero input response
or Natural or Free response.
Finite Dimensional LTI System: (M)
A subclass of LTI system characterised by a linear constant coefficient difference
equation:
] [ ] [
0 0
k n x p k n y d
M
k
k
N
k
k
− = −
¯ ¯
= =
where d
k
and p
k
are constants, N ≥ M and N is the order of the equation.
Linearity, Time Invariance and Stability: (P)
Constant coefficient linear difference equation implies a time invariant system.
BIBO:
Bounded Input Bounded Output Stable if and only if for every bounded input, and
every bounded initial condition the total system response is bounded.
Example:
y[n] = ay[n1] +x[n]
Assume x[n] is bounded i.e. x[n] ≤ M
x
≤ ∞ for all n ≥ 0. Then
y[n] ≤  a
n+1
y[1]  +
¯
=
−
n
k
k
k n x a
0
] [
≤ a
n+1
y[1] + M
x
¯
=
n
k
k
a
0
≤ a
n+1
y[1] + M
x
y
n
M
a
a
=
−
−
+
1
1
1
0 ] [ ] 1 [ ] [
0
1
≥ − + − =
¯
=
+
n k n x a y a n y
n
k
k n
DSP2008.doc 13
If n is finite M
y
is finite irrespective of a, but as n → ∞, M
y
is finite only if a < 1.
Thus system is stable only if a < 1.
ZTransform and Transfer Functions:
Direct ztransform: (P)
x[n] has a ztransform X(z) given by
where z is complex. The infinite series converges for a set of values of z (Region of
Convergence – ROC)
examples:
1. x[n] = [1,2,5,7,0,1]
x(z) = 1 + 2z
1
+ 5 z
2
+ 7z
3
+ z
5
; ROC entire zplane except z = 0
2. x[n] = [1,2,5,7,0,1]
x(z) = 1z
2
+ 2z + 5 + 7z
1
+ z
3
; ROC entire zplane except z = 0, ∞
3. x[n] = [0,0,1,2,5,7,0,1]
x(z) = z
2
+ 2z
3
+ 5z
4
+ 7z
5
+ z
7
; ROC entire zplane except z = 0
4. x[n] = δ [n]
X(z) = 1; ROC entire zplane
5. x[n] = δ [n  k], k > 0
X(z) = z – k ; ROC entire zplane except z = 0
6. x[n] = δ [n + k], k > 0
X(z) = z
k
; ROC entire zplane except z = ∞
x[n] having infinite duration can be described by a closed form expression in z
(infinite geometric series)
example:
x[n] = α
n
u[n] i.e. α n when n ≥ 0 and 0 when n < 0
has
in closed form this is expressed as 1/(1 α z
1
), ROC  z  >  α 
however if
¯
∞
−∞ =
−
=
n
n
z n x z X ] [ ) (
¯ ¯
∞
−
∞
−
= =
0
1
0
) ( ) (
n n n
z z z X α α
DSP2008.doc 14
x[n] = α
n
u[n1] i.e. = 0 when n ≥ 0 and α
n
when n ≤ 1
in closed form this is expressed as 1/(1α z
1
), ROC  z  <  α 
Thus the ztransform is the same for both series, only the region of convergence
differs. Therefore it needs to be stated to uniquely identify the sequence.
x[n] = α
n
u[n] + b
n
u[n1]
has
The first converges for  z  >  α , the second for  z  <  b 
If  b < α  ROCs do not overlap and hence X(z) does not exist
If  b  >  α  ROCs do overlap giving a ring in the zplane where both terms
converge. Hence X(z) exists, with ROC α < z < b. This is the general case with
twosided infinite duration signals
POLES and ZEROS of Ztransform: (P)
If X(z) is rational then
Which can be expressed as
where G = b
0
/a
0
, then there are M finite zeros, N finite poles and N  M zeros
(if N > M) or poles (if N < M) at the origin. Zeros and poles may also exist at ∞
The ROC of the ztransform does not contain poles, and is bounded by them.
single pole  real signal: pole also must be real. –ve pole causes signal to alternate in
sign.
double real poles in expression of type x[n] = na
n
u[n]. unbounded increase even on
unit circle.
¯ ¯
−
∞ −
−
∞
−
+ =
1
0
) (
n n n n
z b z z X α
N
N
M
M
z a z a a
z b z b b
z D
z N
z X
− −
− −
+ + +
+ + +
= =
....
....
) (
) (
) (
1
1 0
1
1 0
∏
∏
−
−
=
−
N
k
M
k
M N
p z
z z
Gz z X
1
1
) (
) (
) (
DSP2008.doc 15
¯ ¯
= =
−
M
k
M
M
k M
k
z b
z
z b z H
0 0
1
) (
complex conjugates → exponentially weighted sinusoid, envelope varies as r
n
,
frequency depends on angle.
double complex → even on unit circle increasing envelope
Poles inside unit circle give bounded output, faster decay as pole is nearer to origin.
poles outside unit circle give unbounded output and hence unstable
Transfer Function:
Let system have a linear coefficient difference equation
taking z transform with time shifting
hence in above equation if a
k
=0 then for 1 ≤ k ≤ n
The multiple M poles at 0 are trivial, and there are M nontrivial zeros. This is an All
Zero system, It has a finite duration Impulse response (FIR).
If b
k
= 0 for 1 ≤ k ≤ n the system is an AllPoles system. Its impulse response is
infinite duration (IIR).
In the general case both poles and zeros exist. Because of the poles the system will be
IIR.
Frequency response: (M)
The frequency response is the complex DTFT of the LTI system.
Its magnitude is the magnitude response and its angle is the phase response.
G(w) = 20 log
10
 H(e
jw
)  dB is the GAIN function and – G(w) is called Attenuation
or LOSS function.
For a real impulse response h[n] magnitude response is even and phase response is
odd.
The negative of derivative of the angle θ(w) w.r.t. w is called the GROUP DELAY.
¯ ¯
− + − − =
M
k
N
k
k n x b k n y a n y
0 1
] [ ] [ ] [
¯ ¯
− −
+ − =
N M
k
k
k
k
z z X b z z Y a z Y
1 0
) ( ) ( ) (
¯
+∞
∞ −
−
=
jwn jw
e n h e H ] [ ) (
DSP2008.doc 16
For the LTI system Y(e
jw
) = H(e
jw
).X(e
jw
)
If the system is characterised by a constant coefficient difference equation
then
The transfer function is a generalisation of the frequency response.
It is the ztransform of h[n], has real coefficients and is a rational polynomial in z
1
.
¯
−
=
2
1
] [ ) (
N
N
n
z n h z H
The frequency response is the transfer function evaluated at z = e
jw
.
For a FIR filter, we have.
Then for a causal FIR filter N
1
= 0 and N
2
> 0, all poles are at the origin, and ROC is
the entire zplane except z = 0.
For a finite dimensional IIR characterised by a difference equation the transfer
function is a rational expression
which can be written as
where ξ
1
, ξ
2
, are the finite zeros and λ
1
, λ
2
etc are the finite poles. There are
additional NM zeros or poles at origin.
• FIR transfer function is always stable, For IIR all poles must be within the unit
circle for stability.
• Poles and zeros determine the filter behaviour, and may be placed to obtain a
particular frequency response.
• Poles near the points (but inside unit circle) emphasise the frequency
corresponding to the point on the circle.
• Zeros may be placed near frequency to be deemphasised, and need not be
within the unit circle.
¯ ¯
= =
− = −
N
k
M
k
k k
k n x p k n y d
0 0
] [ ] [
¯
¯
=
−
=
−
=
N
k
jwk
k
M
k
jwk
k
jw
e d
e p
e H
0
0
) (
N
N
M
M
z d z d z d d
z p z p z p p
z H
− − −
− − −
+ + + +
+ + + +
=
2
2
1
1 0
2
2
1
1 0
) (
∏
∏
−
−
=
−
N
k
M
k
M N
z
z
z
d
p
z H
1
1
0
0
) (
) (
) (
λ
ξ
DSP2008.doc 17
• Complex zeros and poles must occur in conjugate pairs to make filter
coefficients real
Geometric evaluation of the Frequency Response: (P)
The ztransform of the LTI system may be expressed in terms of its poles and zeros
for N = M for simplicity
Frequency response is by substituting z =e
jwt
with w from 0 to w
s
/2.
Thus H(e
jwt
) = K (U
1
∠θ
1
U
2
∠θ
2
) / ( V
1
∠ϕ
1
V
2
∠ϕ
2
).
Where U’s are the distances from the zeros to the point z = e
jwt
, and V’s the distances
from poles.
Frequency response is obtained as one moves from z = 0 to z = 1.
When p moves closer to a pole V decreases and thus magnitude response increases.
Near zero opposite happens.
Examples of Frequency Response:
∏
∏
−
−
=
N
i
N
i
p z
z z K
z H
1
1
) (
) (
) (
DSP2008.doc 18
LTI systems as Filters: (P)
Ideal magnitude response characteristics of basic filter types are as under:
The gain in the pass band is unity and in stop band is 0
Ideal filters have linear phase response
If a signal x[n] with frequency components in range w
1
< w < w
2
is passed through a
filter with frequency response
DSP2008.doc 19
H(w) = Ce
−jwn
o
w
1
< w < w
2
= 0 otherwise
the output has spectrum Y(w) = C.X(w)e
−jwn
o,
and from the properties of Fourier
transform y(n) = C.x(n  n
0
) the output is a delayed and scaled input, without
distortion.
Ideal Filters have linear phase characteristic in the passband.
Θ(w) = −wn
0
Derivative of the phase with respect to frequency has units of delay called Group
Delay or Envelope delay.
Ideal filters are not physically realisable but are mathematical idealisations.
e.g. the ideal LPF has a impulse response
h
lp
(n) = sin w
c
π n / π n with –∞ < n < ∞ , and is neither causal, nor absolutely
summable.
LOW PASS: (P,M)
To be lowpass, we must have poles near the unit circle near w = 0 and zeros near or
on unit circle at w = π .
Single pole filter
1
1
1
) (
−
−
−
=
az
a
z H
Constant factor is (1a),to make the amplitude gain unity at w = 0 and the gain is
small at high frequency.
Addition of a zero at –1 attenuates response at high frequency further.
with a < 1 for stability
Here  H(e
jw
)
2
= H(z)H(z
1
)
z = e
jw
is given by
This is monotonically decreasing, it is maximum at w = 0 and is 0 at w = π
) cos 2 1 ( 2
) cos 1 ( ) 1 (
) (
2
2
2
w a a
w a
e H
jw
− +
+ −
=
1
1
1
1
2
1
) (
−
−
−
+ −
=
az
z a
z H
DSP2008.doc 20
The 3 dB cutoff frequency is obtained from
or
(1a )
2
(1+ cos w
c
) = 1+a
2
2a cos w
c
which gives cos w
c
= 2 a /(1+a
2
).
Solving for a and considering the requirement for stability we get
a = (1−sin w
c
)/cos w
c
Example:
the Mpoint moving average system
has
h[n] = (1/M) 0 ≤ n ≤ M1
= 0 otherwise
with M = 2 the transfer function is
H(z) = ½(1 + z
1
)
Its frequency response is
H(jw) = e
jw/2
cos(w/2)
Thus magnitude response  H(e
jw
)  = cos(w/2) is monotonically decreasing from
w = 0 to w = π and the –3 dB frequency is at cos
2
(w
c
/2) = ½ i.e. at π/2
a cascade of M such sections has w
c
= 2cos
1
(2
1/2M
)
for M =3 w
c
= 0.3 π and thus higher order has a sharper cutoff.
2
1
) cos 2 1 ( 2
) cos 1 ( 1 (
2
2
=
− +
+ −
c
c
w a a
w a
] [
1
] [
1
0
k n x
M
n y
M
k
− =
¯
−
=
DSP2008.doc 21
A higher order moving average filter will be an even better approximation to ideal LP
filter.
Example:
A two pole LP filter is H(z) = b
0
/(1−pz
1
)
2
Determine b
0
and p such that H(0) = 1 and H(π/4)
2
= ½
Here when w = 0
H(e
j0
) = b
0
/(1p)
2
= 1 at w = 0
so b
0
= (1p)
2
At w = π / 4
H(e
jπ/4
)= (1p)
2
/ (1pe
j π /4
)
2
= (1p)
2
/ (1p Cos(π /4) + j p sin(π /4))
2
= (1p)
2
/ (1p/√2 + jp/√2)
2
Then (1p)
4
/ [(1p/√2)
2
+ p
2
/2]
2
= ½
Or √2(1p)
2
= 1 + p
2
– √(2p)
Solution is p = 0.32 giving H(z) = 0.46 / (10.32z
1
)
2
High Pass: (P,M)
Translating H
lp
(w) by π radians (i.e. replacing w by w  π) converts it into a HP
filter.
i.e. H
hp
(w) = H
lp
(w  π)
The frequency translation of π is equivalent to multiplication of impulse reponse h
lp
by e
jn
Thus h
hp
(n) = (e
j
)
n
h
lp
(n) = (−1)
n
h
lp
(n)
This means changing signs of the odd samples in h
lp
(n)
Conversely, h
lp
(n) = (−1)
n
h
hp
(n)
Proof: Let the LPF be described by the difference equation
Its frequency response is
replacing w by w π gives
corresponding to the difference equation
¯ ¯
= =
− − + − − − =
M
k
k
k
N
k
k
k
k n x b k n y a n y
0 1
) ( ) 1 ( ) ( ) 1 ( ) (
¯
¯
=
−
=
−
− +
−
=
N
k
jwk
k
k
M
k
jwk
k
k
hp
e a
e b
w H
1
0
) 1 ( 1
) 1 (
) (
¯ ¯
= =
− + − − =
M
k
k
N
k
k
k n x b k n y a n y
0 1
) ( ) ( ) (
¯
¯
=
−
=
−
+
=
N
k
jwk
k
M
k
jwk
k
lp
e a
e b
w H
0
0
1
) (
DSP2008.doc 22
1
1
1
1
2
1
) (
−
−
+
− −
=
az
z a
z H
Example:
The LPF y(n) = 0.9y(n1) + 0.1x(n) give HPF y(n) = 0.9y(n1) + 0.1x(n)
with frequency response as H
hp
(w) = 0.1/(1− 0.9e
–jw
)
Thus high pass single pole amplifier
has the response
To get a HP FIR filter replace z in the moving average filter with –z
to get
H(z) = ½ (1z
1
). For M = 2,
This has
H(e
jw
) = e
jw/2
sin(w/2)
a higher order filter of the form
yields a sharper HP response.
Band Pass Filter and Band Stop Filter: (M,P)
A Band pass filter should contain one or more pairs of complex conjugate poles near
the unit circle, near the frequency band that is the passband.
Has centre frequency w
0
= cos
1
(β) and 3dB bandwidth = cos
1
(2a/(1+a
2
))
A band stop filter has zero on the unit circle at the frequency w
0
, and has a transfer
function of the form
Its notch frequency is w
0
= cos
1
(β) and 3dB bandwidth is cos
1
(2a/(1+a
2
)) like in
the BPF.
Example:
Design a two pole BPF with passband centred at w = π/2 zeros at w = 0 and π and
magnitude response is 1/√2 at w = 4 π / 9
Let the poles be p
1,2
= re
± j π /2
and zeros be at –1 and 1
¯
−
=
−
− =
1
0
) 1 (
1
) (
M
n
n n
z
M
z H
2 1
2
) 1 ( 1
1
2
1
) (
− −
−
+ + −
− −
=
az z a
z a
z H
β
2 1
2 1
) 1 ( 1
2 1
2
1
) (
− −
− −
+ + −
+ − +
=
az z a
z z a
z H
β
β
DSP2008.doc 23
Then
The frequency response at π/2 is
( )
1
1
2
2
2
=
−
= 
.

\

r
G H
π
or G = (1r
2
)/2
Evaluating H(4 π/9)2 at w = 4 π/9
which gives
1.94(1r
2
)
2
= 1 − 1.88 r
2
+ r
4
which is having solution
r
2
= 0.7,
so the system function is
H(z) = (0.15)(1−z
2
)/(1+ 0.7z
−2
)
Digital Resonator:
This is a twopole BPF with a pair of complex conjugate poles near the unit circle.
Angular position of the poles determines the resonant frequency. For resonance at
w = w
0
we select poles at
0
2 , 1
jw
re p
±
= 0 < r < 1
we may also select two zeros at the origin or at 1 and –1
choosing zeros at the origin, the system function is
at w = w
0
we select b
0
such that
2 2
2
1
) )( (
) 1 )( 1 (
) (
r z
z
G
jr z jr z
z z
G z H
+
−
=
+ −
+ −
=
2
1
2 4
2 2
2
) 9 / 8 cos( 2 1
) 9 / 8 cos( 2 2
4
) 1 (
9
4
=
+ +
− −
= 
.

\

π
π π
r r
r
H
2 2 1
0
0
1 1
0
) cos 2 ( 1 ) 1 )( 1 (
) (
0 0
− − − − −
+ −
=
− −
=
z r z w r
b
z re z re
b
z H
jw jw
) 1 )( 1 ( ) 1 )( 1 (
) (
0 0 0 0 0
2
0 0
0 w j jw jw jw jw
re r
b
e re e re
b
w H
− − − −
− −
=
− −
=
) 2 2 1 ( ) 1 (
0
2
0
w rCos r r b Thus − + − =
1
) 2 2 1 ( ) 1 (
) (
0
2
0
0
=
− + −
=
w rCos r r
b
w H
DSP2008.doc 24
) cos( 2 1 ) (
0
2
2
w w r r w U + − + =
The frequency response can be expressed as H(w) = b
0
/U
1
U
2
Where
And
For any r, U
1
takes its minimum value (1 r) at w = w
0
The product U
1
U
2
reaches minimum value at
when r ≅ 1 w
r
= w
0
. Also as r approaches 1 the resonance peaks get sharper and r ≅ 1
gives 3 dB bandwidth ∆w ≅ 2(1r).
If zeros are placed at +1 and –1, the system function becomes
Giving frequency response
The amplitude response is H(w) = b
0
N(w)/U
1
(w)U
2
(w) where N(w) is defined as
above.
Thus the resonant frequency and bandwidth are altered by the added zeros.
Digital Oscillator: (P)
A two pole resonator for which the poles lie on the circle.
has complex conjugate poles at
0
ω j
re
±
and unit sample response
h[n] = [b
o
r
n
/(sin w
o
)]×sin(n+1)w
o
u(n)
If r = 1, b
o
= A sinw
o
then h[n] =A sin(n+1)w
o
u(n) giving sinusoidal oscillations.
Notch filters: (P)
Used to eliminate specific frequencies. E.g. power line frequency and its harmonics.
To create a notch at w
0
introduce a pair of conjugate complex zeros at angle w
0
on the
unit circle.
) cos( 2 1 ) (
0
2
1
w w r r w U − − + =
0
2
1
cos
2
1
cos w
r
r
w
r


.

\
 +
=
−
2 2 1
0
2
1 1
1 1
) cos 2 ( 1
1
) 1 )( 1 (
) 1 )( 1 (
) (
0 0
− − − − −
− −
+ −
−
=
− −
+ −
=
z r z w r
z
G
z re z re
z z
G z H
jw jw
[ ][ ]
) ( ) (
2
0
0 0
1 1
1
) (
w w j w w j
w j
re re
e
b w H
+ −
−
− −
−
=
w w N 2 cos 1 ( 2 ) ( − =
2 2 1
0
0
) cos 2 ( 1
) (
− −
+ −
=
z r z w r
b
z H
DSP2008.doc 25
0
2 , 1
ω j
e z
±
=
Thus system function for a FIR notch filter would be
) cos 2 1 ( ) 1 )( 1 ( ) (
2 1
0
1 1
0
0 0
− − − − −
+ − = − − = z z z e z e b z H
j j
ω
ω ω
The notch will have a large bandwidth. This can be reduced by adding a pair of
complex poles at
0
2 , 1
ω j
re p
±
=
The poles introduce resonance and reduce bandwidth.
The system transfer function is then:
Introduction of a pole near the zero may result in a ripple in the passband, which
may be removed by adding more poles and zeros.
Comb Filters: (P)
A notch filter with a periodic set of notches is a comb filter.
A moving average FIR filter with
has
with zeros on unit circle at z = e
j2π k/(M+1)
with k = 1 to M, A pole at z = 1 is cancelled
by the zero at z = 1
giving frequency response
The plot of magnitude shows periodic zeros at w
k
= 2 π k/(M+1) for k = 1,2,3 …M
z z 2rcosw  1
z z 2cosw  1
) (
2  2 1 
0
2 1
0
0
r
b z H
+
+
=
¯
=
−
+
=
M
k
k n x
M
n y
0
) (
1
1
] [
1
) 1 (
0
1
] 1 [
1
1
1
1
) (
−
+ −
=
−
−
−
+
=
+
=
¯
z
z
M
z
M
z H
M M
k
k
( ) 2 / sin
2
1
sin
1
) (
2 /
w
M
w
M
e
w H
jwM

.

\
 +
+
=
−
DSP2008.doc 26
Any FIR filter with a system function
can be converted to a comb filter by replacing z with z
L
where L is an integer
If the frequency response of the original filter is H(w) then for the above equation it
is
It is an Lth order repetition of H(w) from 0 to 2 π.
Zero Phase and Linear Phase Functions: (M)
To avoid phase distortion phase should vary linearly with frequency.
In a digital filter this requirement is satisfied by making frequency response real and
nonnegative (zero phase) As this makes the filter noncausal, it can be implemented
only in nonreal time processing.
One way is to process finite data by passing it through a causal real coefficient filter,
reversing the output in time and reprocessing it by the same filter.
Else, we can use a filter having a response H(e
jw
) = e
jwD
, having a group delay D.
Thirdly an approximation may be developed by truncating the h[n]
e.g.
Response of an ideal LP with linear phase
0
jwn
e
−
in 0 < w  <w
c
is h[n] = sin w
c
(nn
0
)/π (nn
0
)  ∞ <n < ∞
choosing n
0
= N/2 and truncating to N+1 terms
h[n] = sin w
c
(nN/2)/π (nN/2) 0 ≤ n ≤ N gives a FIR filter
having a frequency response
where H(w) is the zerophase response, real function of w.
The resulting filter exhibits ripples around the cutoff frequency. Increasing N
increases sharpness of response but increases the no. of ripples. (GIBBS Phenomena)
Symmetry / antisymmetry of the impulse response is a necessary condition for a
linear phase FIR filter
Symmetric Impulse Response With Odd Length N+1: (M,P)
Frequency response is of form
¯
=
−
=
M
k
kL
L
z k h z H
0
) ( ) (
) ( ) ( ) (
0
Lw H e k h w H
M
k
jkLw
= =
¯
=
−
2 / 1 ], [ 2 ] [ ], 2 / [ ] 0 [
) cos( ] [ ) (
2
2 /
0
2 /
N n n h n a N h a where
wn n a e e H
N
N
n
jNw jw
≤ ≤ − = =
)
`
¹
¹
´
¦
=
¯
=
−
) ( ] [ ) (
2 /
0
w H e e n h e H
jwN
N
n
jwn jw −
=
−
= =
¯
¯
=
−
=
M
k
k
z k h z H
0
) ( ) (
DSP2008.doc 27
Group delay is N/2
for example
N =8, and (N+1) = 9 odd
using symmetry of coefficients
H(z) = h[0](1+z
8
) + h[1](z
1
+z
7
) + h[2](z
2
+z
6
) + h[3](z
3
+z
5
) + h[4]z
4
giving
H(z) = z
4
{ h[0](z
4
+z
4
) + h[1](z
3
+z
3
) + h[2](z
2
+z
2
) + h[3](z
1
+z
1
) + h[4]}
or
H(z) = e
j4w
{2h[0]cos(4w) + 2h[1]cos(3w) + 2h[2]cos(2w) + 2h[3]cos(w) + h[4]}
Zero Locations:
Using symmetry we can write
using m= Nn
Thus for a given zero of H(z) its reciprocal is also a zero. Further zeros must be
conjugates for a real coefficient response. Hence any complex zero not on unit circle
is associated with three other zeros
z = re
±j ϕ
and z = (1/r)e
±j ϕ
for the zeros on the unit circle, its reciprocal is also the conjugate, so these zeros are a
pair
z = e
±j ϕ
A real zero pairs with its reciprocal
z = σ and z = 1/σ
Any zero at +1 or –1 is its own reciprocal and can appear only once.
Symmetrical Impulse Response with Even Length: (M)
e.g.
N =7, (N+1) even
using symmetry of coefficients
H(z) = h[0](1+z
7
) + h[1](z
1
+z
6
) + h[2](z
2
+z
5
) + h[3](z
3
+z
4
)
2 / ) 1 ( 1 ], [ 2 ] [
)) ( cos( ] [ ) (
2
1
2 / 1
1
2
1
2 /
+ ≤ ≤ − =
)
`
¹
¹
´
¦
− =
+
+
=
−
¯
N n n h n b where
n w n b e e H
N
N
n
jNw jw
¯ ¯
=
−
=
−
− = =
N
o n
n
N
o n
n
z n N h z n h z h ] [ ] [ ) (
) ( ] [ ] [ ) (
1
0 0
− − −
=
+ −
= = =
¯ ¯
z H z z m h z z m h z H
N
N
m N
N
m
m N
DSP2008.doc 28
giving
H(z) = z
7/2
{ h[0](z
7/2
+z
7/2
) + h[1](z
5/2
+z
5/2
) + h[2](z
3/2
+z
3/2
) + h[3](z
1/2
+z
1/2
)}
or
H(z) = e
j7w/2
{2h[0] cos (7w/2) + 2h[1] cos(5w/2) + 2h[2] cos(3w/2) + 2h[3]cos(w/2)}
For this filter by using symmetry we have
H(1) = (1)
N
H(1) = H(1)
hence
H(1) = 0.
Therefore there is always a zero at –1
Thus this filter cannot be used as a highpass filter.
AntiSymmetric Response with Odd Length: (M)
Here h[n] = h[Nn], here N+1 is odd
group delay is N/2
expression of the frequency response is
For these functions antisymmetry gives
H(z) = z
N
H(z
1
)
Hence the poles are located as in the previous case and there is also a zero at z = 1 as
H(1) = H(1).
Similarly there is a zero at +1 as H(1) = H(1)
It cannot be used in highpass, Lowpass or Bandstop filters because of these zeros.
Anti Symmetric Response with Even Length: (M)
zero placements follow same rules as earlier cases but there is no zero at –1, and
there is a zero at 1
This means it cannot be used as a lowpass filter
group delay is N/2 and frequency response has form
As a general form describing all four cases.
2 / 1 ], [ 2 ] [
) sin( ] [ ) (
2
2 /
0
2 / 2 /
N n n h n c where
wn n c e e e H
N
N
n
j jNw jw
≤ ≤ − =
)
`
¹
¹
´
¦
=
¯
=
− π
2 / ) 1 ( 1 ], [ 2 ] [
)) ( cos( ] [ ) (
2
1
2 / 1
1
2
1
2 / 2 /
+ ≤ ≤ − =
)
`
¹
¹
´
¦
− =
+
+
=
−
¯
N n n h n d where
n w n d e e e H
N
N
n
j jNw jw π
DSP2008.doc 29
Zero locations for various cases of symmetric and antisymmetric impulse response
functions.
AllPass Filter: (P,M)
It is a filter with a constant magnitude response at all frequencies.
The simplest example is H(z) = z
k
, but that is a trivial case.
A system function of form
is an all pass filter with {a
k
} real.
If we define the denominator as A(z), with a
0
= 1 then
and H(z)H(z
1
) = 1= H(z)
2
, If z
0
is a pole, then 1/z
0
is a zero.
2 / 0 ) ( ) (
2 /
π β
β
or where w h e e e H
j jNw jw
= =
−
) 1 (
... 1
...
) (
0
0
0
1
1
1
1
2
2
1
1
= =
+ + +
+ + + + +
=
¯
¯
=
−
=
+ −
− −
− + − −
−
−
−
a
z a
z a
z a z a
z z a z a z a a
z H
N
k
k
k
N
k
k N
k
N
N
N N
N N N
) (
) (
) (
1
z A
z A
z z H
N
−
−
=
DSP2008.doc 30
Phase function shows discontinuities of 2π which can be removed by
UNWRAPPING.
Unwrapped phase function is nonpositive, and continuous in 0 to π range.
In factored form can thus be given in general as
With N
r
being the real poles and N
i
the complex poles
and a
k
 < 1, and b
k
 < 1 for stability.
Properties:
The Allpass function is a lossless bounded real transfer function.
The magnitude of A(z)< 1 for z >1, = 1 for z = 1, < 1 for z <1
Unwrapped phase is monotonically decreasing so that group delay is positive.
The change in the phase of the M
th
order allpass function as w goes from 0 to π
radians is M π
Application is as a delay equaliser. If G(z) is a filter designed to meet a given
amplitude specification, its phase response will inn general be nonlinear, It can then
be cascaded with an allpass filter A(z) such that the overall function has a linear
phase and constant group delay
Minimum Phase and Maximum Phase functions: (M,P)
Given the same poles in two functions, the zeros influence the phase of the functions.
H
1
(z) = (z+b)/(z+a) and H
2
(z) = (bz+1)/(z+a) with a <1, b <1 both have poles
within unit circle and are stable zeros are at –b and –1/b.
Magnitudes are identical as H
1
(z).H
1
(z
1
) = H
2
(z).H
2
(z
1
)
Phase of H
1
(z) varies from 0 at w = 0 to +ve values to 0 at w = π , of H
2
(z) phase
varies from 0 at w = 0 to – π at w = π
In general, a causal, stable transfer function with all zeros outside the unit circle has
an excess phase (maximum phase function) compared with a function having all
zeros inside (minimum phase function)
( )
( )
( )
( )
∏ ∏
=
−
−
−
−
=
−
−
−
−
−
−
−
−
=
i r
N
k k
k
k
k
N
k k
k
AP
z b
b z
z b
b z
z a
a z
z H
1
1 *
* 1
1
1
1
1
1
1 1 1
) (
DSP2008.doc 31
If the zeros have a mirror image symmetry, the magnitude responses are identical, but
phase responses differ.
H
1
(z) = 1 + ½ z
1
= z
1
(z + ½)
H
2
(z) = ½ + z
1
= z
1
( ½ z +1)
 H
1,2
(w) = (5/4 +cos w)
1/2
and
In the first case ∠H(π ) – ∠ H(0) = 0.
In the second this is π
A general FIR system of length M+1 has M zeros.
When all the zeros are inside the unit circle, net phase change between w = 0 and
w = π is 0. This is called a MINIMUM PHASE system. It has minimum group
delay.
When all zeros are outside the unit circle, the net change is M π
This is called a MAXIMUM PHASE system.
Any nonminimum phase function can be expressed as a product of a minimum phase
function and an allpass function.
Stability:
Stability Triangle: (M,P)
If denominator in the H(z) is D(z) = 1 + d
1
z
1
+ d
2
z
2
In terms of its poles
D(z) = (1λ
1
z
1
) (1λ
2
z
1
) = 1(λ
1
+λ
2
)z
1
+λ
1
λ
2
z
2
Thus d
1
= (λ
1
+λ
2
) and d
2
= λ
1
λ
2
As poles are within unit circle, + λ
1
< 1, λ
2
< 1 hence d
2
< 1
Also
Gives d
1
< 1 + d
2
The poles (roots) will be within unit circle if d
1
and d
2
lie in the stability triangle.
w
w
w w
w
w
w w
cos 2
sin
tan ) (
cos
sin
tan ) (
1
2
2
1
1
1
+
+ − =
+
+ − =
−
−
θ
θ
2
4
2
2
1 1
2 , 1
d d d − ±
− = λ
DSP2008.doc 32
Test for Stability of higher order functions:
SchurCohn Stability Test: (M, p253)
Let D
M
(z) be the denominator polynomial and let D
M
be its mirror image
polynomial.
Form M
th
order Allpass function
If
let k
M
= A
M
(∞ ) then k
M
= d
M
giving condition for stability of A
M
(z) as
k
2
M
<1
now form a new A
M1
(z) given by
Substituting A
M
(z) we get
the poles of A
M1
(z) are the roots of A
M
(λ
0
) = 1/k
M
hence  A
M
(λ
0
) > 1
As A
M
(z) is stable, it follows that  A
M
(z) > 1 for z < 1
hence λ
0
 < 1
thus A
M1
(z) is stable.
We carry out this process for k
M2
,….k
1
then A
M
(z) is stable if K
i
2
< 1 for all i.
example:using
1 ) (
0
0
= =
−
=
¯
d with z d z D
i
M
i
i M
) (
) (
) (
z D
z D
z A
M
M
M
=
−
−
=
−
−
=
−
) ( 1
) (
) ( 1
) (
) (
1
z A d
d z A
z
z A k
k z A
z z A
M M
M M
M M
M M
M
1 , 3 , 2 , 1
1
'
' ' ' 1
' ' '
) (
2
) 1 (
1
) 2 (
2
1
1
) 1 ( ) 2 (
1
1
2 1
1
− =
−
−
=
+ + + +
+ + + +
=
−
− −
−
− −
−
−
− − − − −
− −
−
M i
d
d d d
d with
z d z d z d
z z d z d d
z A
M
i M M i
i
M
M
M
M
M M
M M
M
1 ) 1 ( ) (
1
1
1
< = − =
∏ ∏
=
−
=
M
M
i
i M
M
i
i M
d hence d then z z D λ λ
DSP2008.doc 33
Hence system is stable.
Digital FIR Filter Design:
IIR and FIR selection:
• FIR can have linear phase response, are always stable if realised non
recursively, are affected less by quantisation and rounding errors
• IIR require less no. of coefficients. They are derivable using analog filter
design techniques, and are easier to synthesise
• Therefore use IIR when requirement is for a sharp cutoff and high throughput
• Use FIR if no . of coefficients is not too large, and if linear phase is required
Steps in Design of digital filters:
1. Give specifications and filter type
2. Select suitable method and calculate coefficients
of the filter transfer function.
3. Convert transfer function into a suitable structure such as cascade realisation or
parallel realisation.
4. Analyse for error from finite bit number effects.
5. Implement by building hardware or software for actual filtering operation.
FIR filter design:
FIR filter is characterised by a constant coefficient difference equation
DSP2008.doc 34
where N is the filter length. It is a nonrecursive all zero form and is always stable.
This is a straightforward way to calculate the response.
FIR filters can also be made to have an exactly linear phase response, with constant
group and phase delays. Thus the filter is nondistorting.
Finally FIR structures are easier to implement, and typical DSP processor
architectures are suited to FIR filtering, the implementation results in less finite
wordlength errors.
Window method: (I,M)
Let the ideal filter be H
D
(w), then its impulse response is h
D
(n) which is obtained by
inverse Fourier transform.
Ideal impulse responses of the different filters are given below;
LP:
n ≠ 0, with h
D
(0) = 2f
c
HP:
n ≠ 0, with h
D
(0) =1 2f
c
BP:
n ≠ 0, with h
D
(0) =2(f
2
f
1
)
BS:
n ≠ 0, with h
D
(0) =12(f
2
f
1
)
Ideal responses are infinite in duration, and decrease with increasing n.
They are also symmetric, thus requiring calculation of only half the total number of
coefficients.
However, infinite duration implies infinite number of coefficients.
Practical approach is to truncate the impulse response by setting h
D
(n) = 0 for n > say
M. This is equivalent to multiplying h
D
(n) by a rectangular WINDOW
w(n) = 1 , n = 0,1,…,M1
= 0 elsewhere.
¯
−
=
− =
1
0
) ( ) ( ] [
N
k
k n x k h n y
c
c
c D
n
n
f n h
ω
ω ) sin(
2 ) ( =
c
c
c D
n
n
f n h
ω
ω ) sin(
2 ) ( − =
1
1
1
2
2
2
) sin(
2
) sin(
2 ) (
ω
ω
ω
ω
n
n
f
n
n
f n h
D
− =
2
2
2
1
1
1
) sin(
2
) sin(
2 ) (
ω
ω
ω
ω
n
n
f
n
n
f n h
D
− =
DSP2008.doc 35
In the frequency domain, this gives convolution of H
D
(w) and W(w), the latter having
the (sin x)/x shape.
The resulting impulse response of the windowed filter has ripples and overshoots in
the pass and stop bands (Gibbs Phenomena).
The transition width of the filter is greater, and depends on the width of the main lobe
of the window function, and the ripples depend on the sidelobes.
Instead of a rectangular window, other window functions may be used, which
produce reduced ripples at the cost of greater transition width.
Gibbs phenomena: (M,P)
Truncating filter length causes oscillations in frequency response. As length
increases, ripples are closer, but height of largest ripples on either side of cutoff is
unchanged. These ripples arise because of convolution of the ideal response and the
transfer function of the window.
Rectangular window, N =11, cutoff = 0.3
N =51, cutoff = 0.3
DSP2008.doc 36
N = 101, cutoff = 0.3
Characteristics of some common window functions: (M)
Rectangular:
The frequency response of the rectangular window has a narrow main lobe and much
lower ripples or sidelobes. Main lobe width is 4 π /(2M+1), defined by zero crossings
of the main lobe. As M increases this width decreases., but the area under each lobe
remains constant. The mainlobe width is also the width measured between the
maxima and minima on either side of w
c
., at w
c
, H(jw) = 0.5, and passband and
stopband ripples are the same. The transition band is less than lobe width. The ripple
does not depend on the filter length and w
c
.
w(n) = 1 n ≤ (N1)/2 = M
Transition width: 0.92 π /M, main lobe width 4 π /(2M+1)
Passband ripple: 0.7416
Main lobe relative to side lobe: 13 dB
DSP2008.doc 37
Stopband attenuation: 21 dB
Hanning: (M,I)
w(n) = 0.5 + 0.5Cos(2πn/N) n ≤ (N1)/2
Transition width: 3.1 π /M, main lobe width 8π /(2M+1)
Passband ripple: 0.0546
Main lobe relative to side lobe: 31 dB
Stopband attenuation: 44 dB
Hamming: (M,I)
w(n) = 0.54 + 0.46Cos(2πn/N) n ≤ (N1)/2
Transition width: 3.3 π /M, main lobe width 8 π /(2M+1)
Passband ripple: 0.0194
Main lobe relative to side lobe: 41 dB
Stopband attenuation: 53 dB
Blackman: (M,I)
w(n) = 0.42 + 0.5Cos(2πn/N1) + 0.08 Cos(4πn/N1) n ≤ (N1)/2
Transition width: 5.5 π /M main lobe width 12π /(2M+1)
Passband ripple: 0.0017
Main lobe relative to side lobe: 57 dB
Stopband attenuation: 74 dB
These windows have fixed characteristics, and equal Passband and Stopband ripples.
This is their major disadvantage.
DSP2008.doc 38
Kaiser window: (M,I)
This window has a ripple control parameter β which allows adjustment of ripple
against transition width.
The window function is:
for (N1)/2 ≤ n ≤ (N1)/2, and = 0 elsewhere.
Here I
0
is the zeroorder modified Bessel’s function of the first kind., and β controls
the way the function tapers at the edges in the time domain.
With β = 0 Kaiser window corresponds to the rectangular window.
With β = 5.44 results are very similar to the Hamming window.
β is determined according to Stopband attenuation requirement as follows:
if A ≤ 21 dB, β = 0
21 < A < 50 dB β = 0.5842(A21)
0.4
+ 0.07886(A21)
A ≥ 50 dB β = 0.1102(A8.7)
where A = 20 log (δ ) and δ = min(δ
p
, δ
s
).
The number of coefficients N is given by
N ≥ (A7.95)/14.36 ∆f where ∆f is the normalised transition width.
Example:
FIR filter having specifications:
) (
1
2
1
) (
0
2 / 1
2
0
β
β
I
N
n
I
n w
¦
)
¦
`
¹
¦
¹
¦
´
¦

.

\

−
−
=
DSP2008.doc 39
Passband edge: 1.5 kHz
Transition width 0.5 kHz
Stopband attenuation > 50 dB
Sampling frequency 8 kHz
Here Stopband requirements satisfied by Kaiser, Blackman, Hamming.
Use Hamming
Hence δf = 0.5/8 = 0.0625
N = 3.3/δf = 52.8 = 53
For LP h
D
[n]= [2f
C
sin(nw
c
)] /nw
c
And w(n) = 0.54 + 0.46Cos(2 π n/53) 26≤ n ≤ 26
Use f
c
centred on the transition band = 1.5 + 0.25 = 1.75 kHz, normalised to 1.75/8 =
0.21875
Then filter coefficients = h
D
(n)*w(n), e.g. n = 26,
h
D
(26) = (2 × 0.21876)×sin(26 × 2 π × 0.21875) / (26 × 2 π × 0.21875) × 2 π
= 0.01131
w(26) = 0.54+0.46 cos(2 π × 26/53) = 0.08081 and thus
h(26) = h(26) = 0.01131× 0.08081 = 0.000913
to make the filter causal, add 26 to the indices.
Example:
Passband 150250 Hz, Transition width 50 Hz, Passband ripple 0.1dB Stopband
attenuation 60 dB, sampling frequency 1kHz.
Here 20 log(1+ δ
p
) = 0.1 giving δ
p
= 0.0115
20 log δ
s
= 60 giving δ
s
= 0.001
now δ = min(δ
p
, δ
s
) = 0.001
Attenuation requirements can only be met by Kaiser and Blackman.
For Kaiser number of coefficients
N ≥ (607.95) / 14.36(50/1000) = 72.49 i.e. 73
The ripple parameter is β = 0.1102(608.7) = 5.65
Ideal response cutoffs are at f
c1
– δf/2 and f
c2
+ δf/2, i.e. 125 and 275 Hz
For Blackman window N = 5.5/δf = 5.5/(50/1000) = 110.
DSP2008.doc 40
Kaiser is more efficient.
FIR Filters with Smooth Transition: (M)
Sharp discontinuities in ideal filters result in ripples in frequency response. Using
tapered windows is one solution, the other is to specify a smoother transition band. If
the edge frequency responses are connected by a straight line (first order spline) LPF
response requirement is now for a trapezoidal response
Higher order splines in the transition region may be used.
For Pth order spline, LP impulse response with ∆w = transition bandwidth
h(n) = w
c
/ π for n = 0, and [(sin (∆wn/2P))/ (∆wn/2P)]
P
.(sin w
c
n) / π n for n >0
The optimum P is 0.624(∆w)N
Frequency Sampling Method: (I)
This method is based on the sampling of the ideal frequency response desired, and
then taking the inverse DFT of the samples to get h(n)
If N samples are taken at intervals kF
s
/N, k ==0,1,…N1
Then
H(k) are the samples of the target frequency response.
where a = (N1)/2
as h(n) is real. For a linear phase filter h(n) is symmetric leading to:
for N odd upper limit is (N1)/2
Example:
¯
−
=
=
1
0
) / 2 (
) (
1
) (
N
k
nk N j
e k H
N
n h
π
¯
−
=
−
=
1
0
) / 2 ( / 2
) (
1
) (
N
k
nk N j N ak j
e e k H
N
n h
π π
[ ]
¯
−
=
− =
1
0
/ ) ( 2 cos ) (
1
) (
N
k
N a n k k H
N
n h π
[ ]
+ − =
¯
−
=
) 0 ( / ) ( 2 cos ) ( 2
1
) (
1 2 /
0
H N a n k k H
N
n h
N
k
π
DSP2008.doc 41
LP filter, length 9, sampling 18 kHz, passband 05kHz
Samples at 18/9 = 2kHz intervals
H(k) = 1 k= 0,1,2
=0 k = 3,4
h[0] = 7.2522e02 = h[8], h[1] = 1.1111e01 = h[7], h[2] = 5.91209e02 = h[6],
h[3] = 3.19931e01 = h[5], h[4] = 5.5555e01
The response is poor in the transition region, and stop band attenuation is insufficient.
Better response can be obtained by including samples in the transition region.
Alternatively larger number of samples (sampling at closer intervals) may be done
and h[n] calculated, Then windows functions may be applied to reduce filter length.
The frequency sampling method is useful in designing piecewise nonstandard filters
Optimal (CAD) Method or ParksMcCallen or Remez Method: (P,M)
The window and frequency sampling methods produce ripple that is maximum near
band edges, and decreases further away..
The Optimal method distributes ripples evenly (equiripple) over stop and pass bands,
giving a better approximation to the desired frequency response.
Let H
D
(w) be the ideal and H(w
0
the actual and W(w) be a weighting function that
allows the relative error of the approximation to be defined
Then the difference between ideal and practical is E(w) = W(w)[H
D
(w) –H(w)]
The method finds the h(n) which minimises the maximum weighted error in the pass
and stop bands
It can be shown that when max E(w) is minimised the filter will have an equi
ripple response, with the ripple alternating between two equal amplitude levels.
(Alteration Theorem) for linear phase filters there are
R+1 or R+2 such extremas, R = (N+1)/2.
The locations of the extremal frequencies are generally not known except at the band
edges f
p
and f
s
/2
If the extremal frequencies can be found, then the frequency response is known, and
the impulse coefficients can be obtained.
DSP2008.doc 42
To find the extremal frequency the REMEZ algorithm (ParksMcCallen Algorithm)
starts with an initial estimate of three R+1 extremas, and then uses a convergent
iterative process to arrive at the extremal frequency values.
The number of the extremal frequencies depends on the filter length, which can be
calculated from the desired attenuation, ripple and transition band
Example:
Linear phase equiripple filter , pb 0.3 –0.5 , sb 0 – 0.25, 0.551, desired pb magnitude
= 1 , sb magnitude 0, order 27
» n= 27;
» f = [0,0.25,0.3, 0.5,0.55,1];
» m= [0,0,1,1,0,0];
» b = remez(n,f,m);
» [h,w] = freqz(b,1,256);
» mag = 20*log10(abs(h));
» plot(w/pi, mag,'b'); grid;
»
BPF, passband 812kHz, Sbripple 60dB, peak pb ripple: 0.001, fs = 44.14 kHz,
transition width 3 kHz
f =[5,8,12,15];
» m=[0,1,0];
» dev = [0.001, 0.001,0.001];
» fs = 44.14;
» [n,fo,mo,w] = remezord(f,m,dev,fs);
» b= remez(n,fo,mo,w);
» [h,om] = freqz(b,1,256);
» mag = 20*log10(abs(h));
» plot(om/(2*pi),mag,'b'); grid;
DSP2008.doc 43
n = 48
fo = 0, 0.22655188038061, 0.36248300860897, 0.54372451291346,
0.67965564114182
1.00000000000000
mo =0 0 1 1 0 0
w =1 1 1
Comparison of methods: (I,M)
• Optimum method is the easiest and efficient, with total control over
specifications, but requires the necessary software.
• Window method gives equal pass and Stopband ripples, and is suitable for
direct application. It may result in overdesign in any one band, and does not
give full control over ripples and cutoff frequencies.
• Frequency sampling method can be applied directly or recursively, and integer
coefficients can be used. It is suitable for primitive ALUs and for designing
filters with arbitrary bands. It lacks control over edge frequencies and ripples.
Finite wordlength effects: (I)
ADC noise:
Quantization error, reduced by using ADC with larger bit length
Coefficient quantization error:
Coeficients represented by fixed no. of bits and equivant to adding E(w) to H(w)
Altering the structure, giving greater peak ripple, and inaccurate cutoff
Bounds on the error are given by different authors
E(w) = N2
B
under worst case, is overly pessimistic
E(w) = 2
B
(N/3)
1/2
and
E(w) = 2
B
[(Nlog
e
N)/3]
1/2
are based on statistical bounds and give a more realistic estimate.
Roundoff error:
x(nm) is 12 bit and h(n) is 16 bit. The 24 bit product is rounded off to 16 bits in
memeory, or 12 bit in DAC, may result in more severe effect than ADC quantisation.
Avoided partly by using double length registers and rounding in the final step.
DSP2008.doc 44
Overflow error:
When the sums exceed allowed wordlength. Avoided by scaling down h(n) and
inputs by constants = sum of terms and then rescaling.
IIR Filter Design: (I, P,M)
IIR selection:
• IIR require less no. of coefficients. They are derivable using analog filter
design techniques, and are easier to synthesise
• Therefore Use IIR when requirement is for a sharp cutoff and high throughput
Steps in Design of digital IIR filters:
1. Give specifications and filter type
2. Select suitable lowpass analog filter prototype to meet the specifications.
3. Design the analog filter using specifications to find required order and
find prototype analog coefficients of the filter transfer function.
4. Use frequency band transformation (with prewarping if necessary) to
convert the LP prototype to the required type of filter, and determine the
equation of H(s).
5. Choose suitable analog to digital filter transformation method, and apply
it to the analog filter to get the digital filter design.
6. Convert digital transfer function into a suitable structure such as cascade
realisation or parallel realisation.
7. Analyse for error from finite bit number effects. If specifications are not
met, repeat above steps choosing a higher order for the filter or different
prototype.
8. Implement by building hardware or software for actual filtering
operation.
Analog filter specifications: (M)
Ideal filters have brickwall characteristics, which do not give causal impulse
responses, and are therefore unrealisable.
A realisable filter, say a LPF is generally specified by giving a desired passband gain
of 1 with acceptable error (tolerance) ±δ
p
(Pass band deviation).
1δ
p
<  H
a
(j Ω )  <1+δ
p
for  Ω  ≤ Ω
p
A
p
= 20log(1+δ
p
) is called the Passband ripple in dB
Stopband Ω
s
≤ Ω ≤ ∞ response approximates 0 with error δ
s
(stopband deviation)
DSP2008.doc 45
 H
a
(j Ω )  ≤ δ
s
for Ω
s
≤ Ω ≤ ∞
A
s
= 20log(δ
S
) is the stopband attenuation in dB
Ω
p
and Ω
s
are the passband and stopband edge frequencies and δ
p
and δs are the
ripples
In the Normalised specification, maximum value of passband magnitude is made 1
and the passband ripple is the minimum value of magnitude in the passband, given by
1//√ (1+ε
2
),
The maximum stopband ripple is 1/A.
A
p
= 10log(1+ε
2
) = 20log(1δ
p
), and A
s
= 20log(1/A) = 20log(δ
s
)
normalised frequency is Ω /F where F is the sampling frequency
The Transition ratio or the selectivity parameter is
k = Ω
p
/Ω
s
and is <1 for LPF.
The discrimination parameter
k
1
= ε / (√ (A
2
1)). generally k
1
<<1.
Design by pole – zero placement: (I)
Placing a zero at given point in zplane makes frequency response 0 at that point and
a pole produces maximum response.
Poles close to unit circle give large peaks and zeros close to the circle produce
troughs.
For the coefficients to be real poles and zeros must be either real or in conjugate
pairs. Further, poles must be within unit circle for stability
For the pole with r > 0.9, bandwidth is approximately
transition band
passband
stopband
1
1/√1+ε
2
1/A
Ω
p Ωs
1+δ
p
1δ
p
passband
stopband
transition band
δ
s
Ω
p Ω
s
F/2
DSP2008.doc 46
r = 1(BW/F)π
Example:
Bandpass filter with complete rejection at 0 and 250 Hz, narrow passband centred at
125 Hz, and 3dB bandwidth 10 Hz. Sampling frequency 500 Hz.
zeros at 0 and 360 x 250/500 = 180 degrees. Pass band at 125 requires poles at
± 360 x 125/500 = ± 90 as conjugate pair.
with BW = 10, F = 500, r = 0.937 for poles
thus H(z) = (z1)(z+1)/(z  0.937e
j π /2
)(z  0.937e
j π /2
)
i.e. H(z) = (1z
2
)/(1+0.877969z
–2
)
The difference equation is y[n] = 0.877969y[n2] + x[n] – x[n2]
Example 2
Notch filter, notch frequency 50 Hz, 3 dB BW ± 5Hz, sampling
500 Hz.
To reject 50 Hz, a pair of complex zeros at ± 360 x 50/500
= ± 36 degrees
To get sharp rejection a pair of poles at r < 1, from BW 10 Hz
we get r = 0.938
The H(z) is
H(z) = [z e
 j36
][z e
j36
]/ [z0.937e
–39.6
] [z0.937e
+39.6
] giving
IIR Filter Design By Approximation Of Derivatives: (P)
(Refer to Proakis and Manolakis)
Bilinear Transform Method Of IIR Filter Design: (P)
(For derivation of the bilinear transformation equation refer to Proakis and
Manolakis)
Bilinear transformation maps Left half splane uniquely into the unit circle in zplane.
and an analog transfer function H(s) is mapped to the z plane as H(z) .


.

\

+
−
=
−
−
1
1
1
1 2
z
z
T
s
0.937


.

\

+
−
=
−
−
=
1
1
1
1 2
) ( ) (
z
z
T
s
s H z H
] 2 [ 8780 . 0 ] 1 [ 5161 . 1 ] 2 [ ] 1 [ 6180 . 1 ] [ ] [
8780 . 0 5161 . 1 1
6180 . 1 1
) (
2 1
2 1
− − − + − + − − =
+ −
+ −
=
− −
− −
n y n y n x n x n x n y
with
z z
z z
z H
DSP2008.doc 47
imaginary axis maps to unit circle, LHP to a point within the unit circle, and RHP to
a point outside.
Making substitution z = e
jwT
and s = jw’
splane w’ = k tan (wT/2), k = 1 or T/2
so +ve imaginary axis in splane is the upper half of unit circle. Similarly for the
negative imaginary axis the lower half of the unit circle. This is a nonlinear
mapping and introduces a distortion called frequency warping.
We therefore have to prewarp the critical bandedge frequency to find their analog
equivalents, design the analog prototype, using these prewarped frequency and the
transform with bilinear transform
In design the digital specifications are transformed to analogue by inverse bilinear
transform, to get specifications of the analogue prototype.
Then analogue filter is designed for the transformed specifications,
Finally the bilinear transform is applied again to get the digital filter
The process is summarised by:
jw’
σ
splane
zplane
Re z
Im z
1 1
Bilinear transformation mapping
w
W’
π
π
0
w’=k tan(wT/2)
DSP2008.doc 48
1. Use digital specifications to decide upon a suitable normalised analogue transfer
function H(s)
2. Let the critical frequency of the digital filter be w
p
(cutoff or passband edge)
3. Obtain analogue critical frequency w
p
’ by prewarping w
p
’ = k tan(w
p
T/2)
4. Denormalise the analogue filter replacing s with s/w
p
’
5. Apply bilinear transformation replacing s by (z1)/(z+1)
Example:
Normalised transfer function is H(s) = 1 / (s+1). Sampling frequency 150 Hz and cut
off 30 Hz
Critical frequency is w
p
= 2 π 30 rad.
analogue frequency after prewarping w
p
’ = tan (w
p
T/2) with T = 1/150 we get
w
p
’=0.7265
The denormalised transfer function is H’(s) = 1/[(s / 0.7265) + 1]
then H(z) = H’(s) with bilinear transform substitution
H(z) = 0.4208 (1 + z
–1
) / (10.1584 z
–1
)
The difference equation is y[n] = 0.1584y[n1] + 0.4208[x[n] +x[n1]]
Design using Analog filters:
Butterworth LPF: (I,P)
LP Butterworth has a magnitude squared response
w
p
’ is the 3dB cutoff frequency and N is the order.
Response is monotonic in passband and stopband, and is maximally flat.
Stopband attenuation is –20log(δ
s
) and filter order is given by
) / log( 2
] 1 ) 1 log[(
' '
p s
s
w w
N
−
=
δ
1
0
0 3 1
Butterworth LP
n=4
n=10
N
p
w w
w H
2
2
) ' / ' ( 1
1
) ' (
+
=
DSP2008.doc 49
The transfer function has zero at ∞ and uniformly spaced poles on a circle of radius
w
p
’ in the splane These poles occur in conjugate pairs and lie on LHS of splans
p
k
= w
p
’ e
j π (2k + N –1)/2N
k = 1,2, …,N
Chebychev: (I,P)
Two types
1. Type 1 with equiripple passband, monotonic stopband
2. Type II with monotonic passband, equiripple stopband
 H(w’) 
2
= K/1+ ε
2
C
2
N
(w’/w’
p
)
C
N
is a Chebychev polynomial of order N
Passband ripple in dB is ≤ 10log(1 + ε
2
) = 20 log(1 δ
p
)
Stopband attenuation ≥  20 log (δ
s
)
for these filters
N ≥ cosh
–1
(δ /ε) / cosh
1
(w
S
’/w’
p
) δ
S
=1/(1+δ
2
)
1/2
Poles of Chebychev filter lie on an ellipse in splane, and have coordinates
p
k
= w’
p
[sinh (α)cos(β
k
) + j cosh (α) sin (β
k
)]
where
α = (1/N)sinh
–1
(1/ε); β
k
= (2k+N1) π / 2N, k = 1,2,3,…,N
Elliptic filter (Cauer Filter): (I,P)
This is equiripple in both passband and stop band.
1
0
0 3 1
Cheby I LP
n=2
n=3
Cheby II LP
1
0
0 3 1
n=4
DSP2008.doc 50
 H(w’) 
2
= K/1+ ε
2
G
2
N
(w’
Elliptic filters provide the most efficient filters in terms of amplitude response.
Comparison of analog filters: (I)
For given specification, lowest order is required for Elliptic. next Chebychev and
highest order for Butterworth.
For a given order, sharpest transition region in the same order
In Butterworth and Chebychev Linear phase is approximated for up to ¾ passband
region
Elliptic has a linear phase response unto about half its passband.
Best phase performance is by Bessel filter of order N. This gives linear phase
response, but amplitude performance has a less sharp rolloff.
Band transformations: (I,P)
The design of a LPF can be converted to other types of filters by Band
transformations.
Steps in the design of these filters are
1. From specifications determine a suitable normalised LPF H(s)
2. Determine and prewarp the critical frequencies
3. Replace s in the H(s) using one of the following:
1
0
0 3 1
Elliptic LP
n=4
2
0
2
1 2 1 1
2
0
2
0
2
'
'
'
:
' ' ; ' ' ; :
:
:
w s
Ws
s BS to LP For
w w Ws w w w
Ws
w s
s BP to LP For
s
w
s HP to LP For
frequency critical the is w where
w
s
s LP to LP For
p
p
p
+
=
− = =
+
=
=
=
DSP2008.doc 51
4. Apply the BZT
example:
BP filter, Butterworth, Passband 200300 Hz. Sampling frequency 2000 Hz.
filter order 2
Prewarp the frequencies:
Using LP to BP transformation
Applying BZT
Substituting value for W and w
0
2
If the H(s) is of a high order, we express it in a factored form for cascade realisation
with first and second order factors and then transform each factor separately.
Finite wordlength effects: (I)
Errors in filter can be due to the following
1. ADC quantisation noise as sample is represented by a limited number of bits.
2. Coefficient quantisation error: same cause. If poles are very close to unit circle,
deviation in their position may create instability.
3. Overflow error when additions of partial results take place in a register of limited
wordlength. Overflow can change the sign making a large +ve number a large –
ve number. Feedback in IIR realisation increases this tendency to oscillate. These
are called LIMIT CYCLES. These can be solved by scaling the inputs to the
adders so that it is always low. The scale factor s
1
is obtained from the impulse
response from input to output of the first adder. f(k)
L
1
norm defines s
1
as s
1
= Σ  f(k)  ensuring a gain of at most 1
1
1
) (
2 / 1 log
1846 . 0 ' ' , 1655 . 0
5095 . 0 ) 2000 / 300 tan(
2
tan
3249 . 0 ) 2000 / 200 tan(
2
tan
1 2 0
2 '
2
1 '
1
+
= ∴
= − = = ∴
= = 
.

\

=
= = 
.

\

=
s
s H
BP of order has LP ana
w w W w
T w
w
T w
w
π
π
2
0
2 2
0
2 / ) (
1 / ) (
1
) ( ) ( '
2
0
2
w Ws s
Ws
W w s
s H s H
S
Ws w s s
+ +
=
+ +
= =
+ =
2
0
2 ) 1 /( ) 1 (
) 1 /( ) 1 ( )] 1 /( ) 1 [(
) 1 /( ) 1 (
) ( ' ) (
w z z W z z
z z W
s H z H
z z s
+ + − + + −
+ −
= =
+ − =
2 1
2
7265 . 0 2362 . 1 1
1
1367 . 0 ) (
− −
+ −
−
=
z z
z
z H
DSP2008.doc 52
L
2
norm defines it as √ Σ(f
2
(k)), limiting energy.
L
∞
norm defines it as Max  F(w) where f(w) is peak amplitude of frequency
response
L
2
< L
∞
< L
1
4. Productround off error when results of arithmetic operations are rounded off to
the allowed wordlength.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.