0% found this document useful (0 votes)
11 views53 pages

Chapter 5 - (Section-03)

Chapter 5 introduces digital filters, detailing two main types: non-recursive (FIR) and recursive (IIR) filters. It covers their realizations, stability, and properties such as linear phase response and impulse response characteristics. The chapter also includes examples and discussions on filter design and analysis, emphasizing the importance of phase characteristics in signal processing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views53 pages

Chapter 5 - (Section-03)

Chapter 5 introduces digital filters, detailing two main types: non-recursive (FIR) and recursive (IIR) filters. It covers their realizations, stability, and properties such as linear phase response and impulse response characteristics. The chapter also includes examples and discussions on filter design and analysis, emphasizing the importance of phase characteristics in signal processing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Prepared by Professor Eliathamby Ambikairajah, Head of

School
Electrical Engineering and Telecommunications
University of New South Wales (UNSW), Australia

Modified and Delivered by Dr. T. Thiruvaran

Chapter 5
Chapter 5: Introduction to Digital Filters ....................................... 109
5.1 Introduction......................................................................... 109
5.1.1 Non recursive digital filters (FIR) ................................ 110
5.1.2 Recursive digital filter (IIR) ......................................... 117
5.2 Digital Filter Realisation .................................................... 120
5.2.1 Parallel realisation ........................................................ 122
5.2.2 Cascade realisation ....................................................... 122
5.3 Magnitude and Phase Response ......................................... 128
5.4 Minimum-phase, Maximum-phase and Mixed phase systems
138
5.5 All-Pass Filters.................................................................... 144
5.6 A second Order Resonant Filter ......................................... 146
5.7 Stability of a second-order filter ......................................... 147
5.8 Digital Oscillators ............................................................... 150
5.8.1 Sine and cosine oscillators ............................................ 153
5.9 Notch filters ........................................................................ 156
5.10 Summary .......................................................................... 159
Chapter 5: Problem Sheet 5

Chapter 5 108
Chapter 5: Introduction to Digital
Filters

5.1 Introduction
There are two types of digital filters:

1. Recursive (there is at least one feedback path in the filter)

2. Non-recursive (no feedback paths)

A linear time invariant (LTI) discrete system described by the


following equation is commonly called a digital filter:
M L
yn   ak xn  k   bk yn  k  (5.1)
k 0 k 1
Feed forward Feedback

where x[n] is the input signal, y[n] is the output signal. a0, a1,
a2, ...., aM; b1, b2, b3, ..., bL are constants (filter coefficients). These
coefficients determine the characteristics of the system.

when bk = 0 the filter is said to be non-recursive type


when bk  0 recursive type.

Chapter 5 109
5.1.1 Non recursive digital filters (FIR)

If bk = 0, then the calculation of y[n] does not require the use of


previously calculated samples of the output (see equation (5.1)).
M
yn   ak xn  k   a0 xn  a1 xn  1    aM xn  k 
k 0

This is recognised as a convolution sum.


M
yn   hk xn  k 
k 0
Therefore the impulse response is identical to the coefficients,
that is,
a 0nM
hn   n
0 otherwise

M
yn   ak xn  k   a0 xn  a1 xn  1    aM xn  k 
k 0

h(0) h(1) h(M)

Any filter that has an impulse response of finite duration is called


Finite Impulse Response (FIR) filter.

Example:

yn  a0 xn  a1 xn  1  a2 xn  2


Y ( z)
H ( z)   a0  a1 z 1  a2 z  2
X ( z)

This is a (non-recursive) second order FIR filter

Chapter 5 110
A property of the FIR filter is that it will always be stable.

(a) Stability requires that there should be no poles outside the


unit circle. This condition is automatically satisfied since
there are no poles at all outside the origin. (In fact, all poles
are located at the origin.)
(b) Another property of non-recursive filter is that we can make
filters with exactly linear phase characteristics

Note: The ability to have an exactly linear phase response is one


of the most important properties of a LTD system (filter). When a
signal passes through a filter, it is modified in amplitude and/or
phase. The nature and extent of the modification of the signal is
dependent on the amplitude and phase characteristics of the filter.

The phase delay or group delay of the filter provides a useful


measure of how the filter modified the phase characteristic of the
signal. If we consider a signal that consists of several frequency
components (eg. speech waveform) the phase delay of the filter is
the amount of time delay each frequency component of the signal
suffers in going through the filter.

 ( )
phase _ delay(T p )   (5.2)

Note: Tp = the negative of the phase angle divided by frequency

The group delay on the other hand is the average time delay the
composite signal suffers at each frequency as it passes from the
input to the output of the filter.

d ( )
group _ delay(T g )   (5.3)
d

Note: Tg = the negative of the derivative of the phase with respect


to frequency]

Chapter 5 111
( )

( ) = -

-  

Figure 5.1: Phase response of a linear phase filter

A constant group delay means that signal components at different


frequencies receive the same delay in the filter.

A linear phase filter gives same time delay to all frequency


components of the input signal. A filter with a nonlinear phase
characteristic will cause a phase distortion in the signal that passes
through it.

This is because the frequency components in the signal will each


be delayed by an amount not proportional to frequency, thereby
altering their harmonic relationship. Such a distortion is
undesirable in many applications, for example music, video etc.

A filter is said to have a linear phase response if its phase response


satisfies one of the following relationships:

    a
(5.4)
    b  a

where ‘a’ and ‘b’ are constants.

Chapter 5 112
Example:

Two filter structures are shown below. Show that both filters have
linear phase.

x[n] x[n]
-1
z -1
z z-1 z-1

+1 +1 +1 +1 -1

+ +

y[n] y[n]

yn  xn  xn  1  xn  2 yn  xn  xn  2


H z   1  z 2
H z   1  z 1
z 2

 j  j 2 H    1  e  j 2
H    1  e e
e  j
e j
e  j
1   2 je  j  e j  e  j

 2j



 e  j 1  2 cos   j 2
 2e e  j sin 
j   
 e 2 2 sin  
phase:
2𝜋
−𝜃 𝜃 < phase:
() = 2𝜋
3
𝜋
−𝜃 ± 𝜋 < 𝜃 <𝜋 −𝜃 𝜃>0
3
() = 2
𝜋
−𝜃 − 2 𝜃<0
linear phase
linear phase

Chapter 5 113
5.1.1.1 Pole-zero Patterns of Linear Phase Filters

 Linear phase filters provide constant delay with no


amplitude distortion.

 An FIR filter with its impulse response symmetric about the


midpoint is endowed with linear phase and constant delay.

 For a linear phase FIR filter, the poles must lie at the origin
(z=0) if the sequence h[n] is to be of finite length.

 Sequences that are symmetric about the origin (i.e. n=0)


1
require h[ n]   h[ n] and thus H ( z )   H  
z

 The zeros of a linear-phase sequence must occur in


reciprocal pairs and exhibit conjugate reciprocal symmetry
as shown below.

|z|=1
|z|=1
1/r
r r

0
0
r Complex conjugates
1/r
1/r
For a real zero For a complex zero
A zero on the real Each zero not on the real axis
axis is paired with is paired with its reciprocal and
just its reciprocal its conjugate.

 Zeros at z=1 or at z=-1 can occur singly, because they form


their own reciprocal and their own conjugate.

Chapter 5 114
 The frequency response of linear phase filter may be written
as H ( )  e j A( ) (for even symmetry) or
 
j    
j
H ( )  je A( )  e  2
A( ) (for odd symmetry).

Example:
Is this a linear phase filter? Sketch the pole-zero plot.

H ( z )  1  2 z 1  2 z 2  z 3
n=0 n=1 n=2 n=3
(-0.5, 0.866) |z|=1
 h(n)  1, 2, 2,1 3
z  2z  2z  1
3 2
-1 0
H ( z) 
z3 (-0.5, -0.866)

All of its poles are at z=0;

Its zeros are at z=-1 and z=-0.5±j0.866

The real zero at z=-1 Complex conjugate


can occur singly pair of zeros lie on the
unit circle

1
H ( z )   H   => The impulse response, h[n], cannot be
z
symmetric about the origin, (even though it is symmetric about
its midpoint n=1.5)

Linear phase sequence with even symmetry about its mid point.

Chapter 5 115
Example:

H ( z )  z 2  4.25  z 2
 h[n]  {1, 0, 4.25, 0,1}

n=-2 n=-1 n=0 n=1 n=2

Is H(z) linear phase? Sketch the pole-zero plot of H(z).

Since h[n] is even symmetric about n=0 with h[n]=h[-n], we have


H(z)=H(1/z)

H ( z )  z 2  4.25  z 2
z 4  4.25 z 2  1 2

z2
( z  j 0.5)( z  j 0.5)( z  j 2)( z  j 2)
 0.5 |z|=1
z2
2
-0.5

The four zeros at z = j0.5, z = j2, z = -j0.5 and z = -j2 are conjugate
receiprocal symmetry. All poles are at z = 0.

Chapter 5 116
5.1.2 Recursive digital filter (IIR)

Every recursive digital filter must contain at least one closed loop.
Each closed loop contains at least one delay element.
M L
yn   ak xn  k   bk yn  k 
k 0 k 1

For recursive digital filters bk  0. Let a0 = a0 , ak = 0 for k > 1


and b1 = b1 & bk = 0 for k > 1.

yn  a0 xn  b1 yn  1

H z  
a0
1  b1 z 1

IIR filter
A recursive filter is an infinite impulse response filter (IIR).

Example:

H ( z )  a0  a1 z 1  a 2 z  2 (2nd order FIR


filter) Im(z)

1
H ( z) 
1  b1 z 1  b2 z  2
2nd order IIR filter (all pole filter)

1  a1 z 1  a2 z  2
H ( z)  IIR filter
1 2
1  b1 z  b2 z Re(z )

Note: Poles and zeros can be real or imaginary

Chapter 5 117
Example:
1
H ( z)  0  a 1
1  az 1

The difference equation is: y[n] = x[n] + ay[n-1].

The DC gain of H(z) can be obtained by substituting  = 0.


1 1
H ( ) |  0  
1  ae  j (0) 1  a

If dc gain is undesirable, introduce a constant gain factor of (1-a),


so that H(z) becomes
1 a
H ( z)  dc gain = 1
1
1  az

 y[n] = (1-a)x[n] + ay[n-1]

Example: Consider a lowpass filter

y[n] = ay[n-1] + bx[n], 0 < a <1

(i) Determine ‘b’ so that |H(0)| = 1.


(ii) Determine the 3dB bandwidth (here) for the
normalised filter in part (i).

b
(i) Y(z) = aY(z) z-1 + b X(z)  H ( z ) 
1  az 1

b
H ( z)  we have |H(0)| =1
1  ae  j

b
H (0)   1 b = 1 - a
1 a

Chapter 5 118
1 a 1 a
H ( )   j

1  ae (1  a cos )  ja sin 

1 a 1 a
H ( )  
(1  a cos ) 2  (a sin  ) 2 1  a 2  2a cos
Second Method:
 1 a 1 a (1  a) 2 
| H ( ) |  H ( )  H ( )   
2 *
 j j 2
 1  ae 1  ae 1  2a cos  a 
1 a 0dB
 | H ( ) | 𝐻(𝜃) 3dB
1  2a cos  a 2 1
1
2
1
| H (0) |2  1| H (θ ) |2  | H (0) |2
θ  θc 2
(half-power point) 𝜃𝑐 𝜃
2
𝐻(𝜃)

1 (1  a) 2
 1
2 1  a 2  2a cos c
1
  a  4a  1 
2
2
 c  cos1  
 2a 

Example: Consider a filter described by 𝜃𝑐 𝜃

a  cz 2
H ( z)  where a & c are constants.
c  az 2

Show that the magnitude response |H()| is unity for all .

c  ae  j 2 c  ae j 2
| H ( ) |  H ( )  H ( ) 
2 *

a  ce j 2 a  ce j 2
c 2  a 2  ac[e j 2  e  j 2 ]
 2 1
a  c 2  ac[e j 2  e  j 2 ] 𝐻(𝜃)

This is an all-pass filter.

−𝜋 𝜋 𝜃
Chapter 5 119
Exercise: Determine the magnitude response of the following
filter and show that it has an all-pass characteristic.
1  (1 / a) z 1
H ( z)  a 1
((1 / a)  z 1 )

5.2 Digital Filter Realisation


M L
yn   ak xn  k    bk yn  k 
k 0 k 1
M L
Y ( z )   ak X ( z ) z k
 bk Y ( z ) z  k
k 0 k 1
M

Y ( z) a k z k M
1
 H ( z)   k 0
L
  ak z  k  L
1   bk z  k  1   bk z  k
X ( z) k 0
 
zeros
k 1 k 1
 
poles

structure1

M
1
 L
  ak z  k
1   bk z  k k 0
  
zeros
k 1
 
poles
structure 2
X(z) a0 Y(z)
+

z-1 -b1 z-1


a1

z-1 z-1
a2 -b2

z-1 z-1
aM -bL

Figure 5.2: Structure 1 or Direct Form 1


Chapter 5 120
X(z) a0 Y(z)
+ +

-b1 z-1 z-1


a1

z-1 z-1
-b2
a2

-bL z-1 z-1


aM

Figure 5.3: Structure 2 or Direct Form II

In the case when L = M, we have canonic form realisation.

X(z) a0 Y(z)
+ +

z-1
-b1 a1

z-1
-b2 a2

z-1
aM
-bL

Figure 5.4: Canonic form

A discrete-time filter is said to be canonic if it contains the


minimum numbers of delay elements necessary to realise the
associated frequency response.

Chapter 5 121
5.2.1 Parallel realisation

a0  a1z 1  a2 z  2    aM z  M
H ( z) 
1  b1z 1  b2 z  2    bL z  L
k
  H i ( z )  H1 ( z ) H 2 ( z )  H 3 ( z )  ...  H k ( z )
1
i
parallel _ structure

(use partial fraction to obtain Hi(z))

H1(z)

X(z) Y(z)
H2(z) +

Hk(z)

Figure 5.5: Parallel structure

5.2.2 Cascade realisation

a0  a1z 1  a2 z  2    aM z  M
H ( z) 
1  b1z 1  b2 z  2    bL z  L
k
H ( z )   Hˆ i ( z )  Hˆ 1 ( z )  Hˆ 2 ( z )  Hˆ 3 ( z )...Hˆ k ( z )
 
i 1 cascade _ structure

Chapter 5 122
(Product of lower order transfer function ie. 1st or 2nd order
sections)
The cascade structure is the most popular form

Figure 5.6: Cascade structure

Example: A parallel realisation of a third order system H(z) is


given by

23  40 z 1  36 z 2  19 z 3
H ( z) 
(2  z 1 )(5  2 z 1  3z  2 )
B C  Dz 1
 A 
2  z 1 5  2 z 1  3z  2

𝐻0 (𝑧) 𝐻1 (𝑧) 𝐻2 (𝑧)

19 5 1 (23  z 1 )
H ( z)   
3 2  z 1 3 5  2 z 1  3 z  2
19 5 1 1 (23  z 1 )
H ( z)   1

3 2 1  0.5 z 3 5(1  0.4 z 1  0.6 z  2 )
23 1
(  z 1 )
19 (2.5) 15 15
  1

3 1  0.5 z 1  0.4 z 1  0.6 z  2

Chapter 5 123
Example: A cascade realisation of a third-order system is given
by

23  40 z 1  36 z 2  19 z 3
H ( z) 
10  9 z 1  8 z 2  3z 3
(1  z 1 ) 23  17 z 1  19 z 2

(2  z 1 ) 5  2 z 1  3 z 2
(1  z 1 ) 23  17 z 1  19 z 2

2(1  0.5 z 1 ) 5(1  0.4 z 1  0.6 z 2 )
(0.5  0.5 z 1 ) 4.6  3.4 z 1  3.8 z 2

1  0.5 z 1 1  0.4 z 1  0.6 z 2
 (0.5  0.5 z 1 )  4.6  3.4 z 1  3.8 z 2 
  1
 1 2 

 1  0.5 z  1  0.4 z  0.6 z 

x[n] 0.5 4.6 y[n]


+ + + +

z-1 z-1
-0.5 0.5 -0.4 3.4

z-1
-0.6 3.8

Chapter 5 124
Example: Implement the following system in the cascade, direct
form II and parallel structures. All coefficients are real.

1
(a). H ( z ) 
(1  az 1 )(1  bz 1 )

1
H ( z) 
1  (a  b) z 1  abz 2

a b
 a  b1  a  b1
A B
H ( z)  1

1  az 1  bz 1 1  az 1  bz

Chapter 5 125
1
b). H ( z) 
(1  az 1 ) 3

No parallel structure exists because partial fraction expansion


cannot be performed.
1
H ( z) 
1  3az 1  3a 2 z  2  a 3 z 3

Chapter 5 126
(c).
1 1
H ( z)    parallel
(1  za 1 ) 2 (1  bz 1 ) 2
1  2(a  b) z 1  (a 2  b 2 ) z 1
  cascade
(1  2az 1  a 2 z 2 )(1  2bz 1  b 2 z 2 )

1 1
H (z)  
(1  za1 )(1  za1 ) (1  bz 1 )(1  bz 1 )

Chapter 5 127
Exercise:

A first-order digital filter has a transfer function given by:


1 1  z 1
H ( z) 
4 1  0.5z 1
Draw the following realisations of H(z):
(a) Cascade; (b) Parallel; (c) Canonic.

5.3 Magnitude and Phase Response


 We can show that the magnitude response is an even function
of frequency.
 The phase response is an odd function of frequency.

Example: Calculate the magnitude and phase response of the 3-


sample averager given by

1
 1  n  1
3
hn  


0 otherwise

 1
1 1 1
H ( z)   h( n) z n
  h(n) z  n  3 z 1  3 z 0  3 z1
n   n  1

H ( z) 
3

1 1
z  1  z1 
H ( )  H ( z ) z  e j 
3
e 
1  j
 
 1  e j  1  e j  e  j 
1
3

H ( ) 
1
1  2 cos 
3

Chapter 5 128
Precautions must be taken when determining the phase
response of a filter having a real-valued transfer function,
because negative real values produce an additional phase of 
radians.

For example, let us consider the following linear-phase form of


the transfer function
H() = e-jkB()

real-valued function of  that can take positive and negative


values.
H    B cos k   B  j sin  k 
H    B cosk   jB sin k 

Let phase angle be :


B( ) sin( k )
tan      tan(k )
B( ) cos(k )

tan = tan(-k) = -k or () = -k

phase angle

The phase function () includes linear phase term and also
accommodates for the sign changes in B(). Since -1 can be
expressed as e  j , phase jumps of  will occur at frequencies
where B() changes sign.

If B() > 0, then () = -k.


If B() < 0, then () = -k  ..

Chapter 5 129
Let us get back to our example

1 1
H ( )  [1  2 cos ] | H ( ) | [1  2 cos ]
3 3
  ( )  0 H ( )  0  23    2

3


 ( )  0   H ( )  0       23 and 2
3  

The appropriate sign of  must be chosen to make () an odd


function of frequency.

Example:
Find the magnitude and phase response of the following:
1 1
h(0)  , h(1)  1, h(2)  , h(n)  0 , otherwise.
2 2
1 0 1 1 1
H ( z)  z  1z 1  z 2   z 1  z 2
2 2 2 2
1 1
H ( )   e  j  e  j 2
2 2
1 1 
 e  j  e j  1  e  j 
2 2 
H ( )  e  j [
1cos
]
B ( )
The amplitude function is never negative (therefore
 ( )   there is no phase jumps of ±𝜋)

Chapter 5 130
Example:
 ( n)  1 n0 
 case1
 (n)  0 otherwise

Chapter 5 131
Let k = 2
𝜙(𝜃) = −2𝜃

B() = 1 () = -k

Note: When phase exceeds  range a jump of 2 is needed to


bring the phase back into  range.
Phase Jumps: From the previous examples, we note that there
are two occasions for which the phase function experiences
discontinuities or jumps.

1. A jump of 2 occurs to maintain the phase function within


the principal value range of [- and ]
2. A jump of   occurs when B() undergoes a change of sign

The sign of the phase jump is chosen such that the resulting phase
function is odd and, after the jump, lies in the range [- and ].

Example: Magnitude and phase response of causal 3-sample


average.

Chapter 5 132
 1 for 0n2
hn   3
0 otherwise
1 1 1 1  2 1 1 1
H ( z)   z  z  H ( )   e  j  e  j 2
3 3 3 3 3 3
1
 
 e  j  e j   1  e  j
3
1
 H ( )  e  j [1  2 cos ]
3 
  
B ( )

1
 ( )   ; | H ( ) || B( ) | [1  2 cos ]
3
2 2
 ( )   B( )  0   
3 3
2
    B( )  0      
3
2
 
3

Phase is undefined at points |H()| = 0.

Chapter 5 133
Example:

Determine and sketch the magnitude and phase response of 1 st


order recursive filter (IIR filter)

yn  xn  ayn  1

Y ( z) 1 1
 H ( z)  H ( ) 
X ( z) 1  az 1 1  ae  j
1 1  ae j 1  a cos ja sin 
H ( )   j
 j
 
1  ae 1  ae 1  2a cos  a 2
1  2a cos  a 2
a sin 

 a sin 
tan   1  2a cos  a 
2

1  a cos 1  a cos
1  2a cos  a 2

  a sin  
 ( )  tan 1  phase
1  a cos 
Magnitude:
|H()|2 = H()H*() [H*() is the complex conjugate]
1 1
  j

1  ae 1  ae j
Assuming 0 < a < 1

1
| H ( ) |
1  2a cos  a 2

Chapter 5 134
Example:

k0 1 a
(a) H 1 ( z )  1
 (Low pass filter)
1  az 1  az 1

The gain k0 can be selected as 1 – a, so that the filter has unity


gain at  = 0.
1  z 1
(b) H 2 ( z )  k 0
1  az 1
1 a
In this case, k0  (for unity gain at  = 0).
2

Chapter 5 135
The addition of a zero at z = -1 further attenuates the response of
the filter at high frequencies

(c) We can obtain simple highpass filters by reflecting (folding)


the pole-zero locations of the lowpass filters about the imaginary
axis in the z-plane.

1  a 1  z 1
H 3 ( z)  
2 1  az 1

(d)
H 4 z   1  z 1
yn  xn  xn  1 lowpass filter

(e)
H 5 z   1  z 1
yn  xn  xn  1

Chapter 5 136
(f) H 6 z   1  z 
12

(g) H 7  z   1  z 
3
1

Chapter 5 137
Exercise:

(a) Calculate and Sketch the Magnitude and Phase responses of


the following FIR filter

y[n]  14 x[n]  2 x[n  1]  x[n  2]

(b) Show that if x[n] is a real valued signal, the structure shown
below has a zero-phase response; where h[n] is the impulse
response of the filter H(z) given by,

H ( z )  (  z 1  z 2 )
1 1
2 2
x[n] y[n]
h[n] p[n]=h[-n]

5.4 Minimum-phase, Maximum-phase and Mixed


phase systems
Let us consider two FIR filters:

1 1
H1 ( z)  1  z
2
-0.5
1
H 2 ( z )   z 1
2
|z|=1

-2
|z|=1

Chapter 5 138
H2(z) is the reverse of the system H1(z). This is due to the
reciprocal relationship between the zeros of H1(z) and H2(z).

1 1
H 1 ( )  1  e  j & H 2 ( )   e  j
2 2
5
| H 1 ( ) || H 2 ( ) |  cos
4
The magnitude characteristics for the two filters are identical
because the roots of H1(z) and H2(z) are reciprocal.

Phase:
𝜙 (𝜃)
2 (1) 1𝜙(2 (𝜃)
)
−sin(𝜃 )  
tan−1
2 + cos(𝜃 ) -  
- -
−sin(𝜃 )
tan−1
1
+ cos(𝜃 )
2

Note: If we reflect a zero with magnitude |z| =  that is inside the


unit circle into a zero with magnitude z  1 outside the unit circle

the magnitude characteristic of the system is unaltered, but the
phase response changes.

We observe that the phase characters 1() begins at zero phase at


frequency  = 0 and terminates at zero phase at the frequency 
= . Hence the net phase change.
Minimum phase filter
1    1 0  0

Chapter 5 139
On the other hand, the phase characteristic for the filter with the
zero outside the unit circle undergoes a net phase change

2    2 0   radians

As a consequence of these different phase characteristics, we call


the first filter a minimum-phase system and the second system
is called a maximum-phase system.

If a filter with M zeros has some of its zeros inside the unit circle
and the remaining outside the unit circle, it is called a mixed-
phase system.
A minimum-phase property of FIR filter carries over to IIR filter.
Let us consider
B( z )
H ( z) 
A( z )

is called minimum phase if all its poles and zeros are inside the
unit circle.

|z|=1

Minimum phase

Re(z)

If all the zeros lie outside the unit circle, the system is called
maximum phase.
|z|=1

Maximum phase
Re(z)

Chapter 5 140
If zeros lie both inside and outside the unit circle, the system is
called mixed-phase.

Mixed phase
Re(z)

|z|=1

Note: For a given magnitude response, the minimum-phase


system is the causal system that has the smallest magnitude
phase at every frequency (). That is, in the set of causal and
stable filters having the same magnitude response, the
minimum-phase response exhibits the smallest deviation from
zero phase.

Example:
Consider a fourth-order all-zero filter containing a double

j
complex conjugate set of zeros located at z  0.7e 4 . The
minimum-phase, mixed phase and maximum phase system pole-
zero patterns having identical magnitude response are shown
below.
|z|=1 |z|=1
|z|=1 2
2

4
4 4
2
=0.7 1/ 2

Minimum-phase mixed-phase maximum-phase

Chapter 5 141
The magnitude response and the phase response of the three
systems are shown below: The minimum-phase system seems to
have the phase with the smallest deviation from zero at each
frequency.

|H()|

 

()
minimum phase


-

mixed-phase
-2
(In the case linear
-3 phase)

-4
maximum phase

Chapter 5 142
Example: A third order FIR filter has a transfer function G(z)
1 2 1
given by: G ( z )  (6  z  12 z )(2  5 z )
From G(z), determine the transfer function of an FIR filter whose
magnitude response is identical to that of G(z) and has a minimum
phase response.

G ( z )  (2  3 z 1 )(3  4 z 1 )(2  5 z 1 )

3 1 4 5
G ( z )  12(1  z )(1  z 1 )(1  z 1 )
2 3 2

>1
Im(z)

5 2 2 3
− −
2 5 3 2
4 3 Re(z)
− −
3 4

2 3 2
The minimum phase filter P( z )  k (1  z 1 )(1  z 1 )(1  z 1 )
3 4 5

Exercise:
The transfer function of a minimum-phase FIR filter is given by


Gz    3  2 z 1 4  3z 1 5  2 z 1  
From G(z) determine a transfer function of an FIR filter whose
magnitude response is identical to that of G(z).

Chapter 5 143
5.5 All-Pass Filters
An all-pass filter is one whose magnitude response is constant for
all frequencies, but whose phase response is not identically zero.

[The simplest example of an all-pass filter is a pure delay system


with system function H(z) = z-k]

A more interesting all-pass filter is one that is described by


a L  a L 1 z 1    a1 z  L 1  a0 z  L
H ( z)  ,
1  a1 z 1    a L z  L

where a0 = 1 and all coefficients are real. If we define the


polynomial A(z) as
L
A( z )   ak z  k a0  1
k 0

L A( z 1 )
 H ( z)  z | H ( ) |2  H ( z )  H ( z 1 ) | z  e j  1
A( z )

i.e. all pass filter.

Furthermore, if |z0| is the modulus of a pole of H(z), then 1/|z0| is


the modulus of a zero of H(z) {i.e. the modulus of poles and zeros
are reciprocals of one another}. The figure shown below
illustrates typical pole-zero patterns for a single-pole, single-zero
filter and a two-pole, two-zero filter.

|z|=1
|z|=1
(1/r, 0)
r
0
0
0 a
1 (r, -0)
a (1/r, -0)

All-pass All pass filter


filter

Chapter 5 144
1
1  z 1
H ( z)  a |a| < 1 for stability
1  az 1

We can easily show that the magnitude response is constant.

H ( ) |2  H ( )  H * ( )  H ( z )  H ( z 1 ) | z  e  j

1 1 2 1
1  e  j 1  e j 1  cos   2
a a a a  a2
  j
 j

1  ae 1  ae 1  2a cos   a 2

Phase response:

1  j
1 e
a 1  ae j 2  (a  a 1 ) cos  j (a  a 1 ) sin 
H ( )   
1  ae  j 1  ae j 1  2a cos  a 2
  (a  a 1 ) sin  
 ( )  tan 1  
 2  (a  a ) cos 
1

()


a = 0.5


a = -0.5 a= -0.8
-

When 0 < a < 1, the zero lies on the positive real axis. The phase
over 0     is positive, at  = 0 it is equal to  and decreases
until  = , where it is zero.

When -1< a < 0, the zero lies on the negative real axis. The phase
over 0     is negative, starting at 0 for  = 0 and decreases to
- at  = .

Chapter 5 145
5.6 A second Order Resonant Filter

x[n] y[n] r
+ 0

z-1
-b1

z-1

-b2

1 z2
H ( z)   (A)
1  b1 z 1  b2 z 2 z 2  b1 z  b2

All pole systems has poles only (without counting the zeros as the
origin)

z2 z2 z2
H ( z)   
z 2  b1 z 1  b2 ( z  p1 )( z  p2 ) ( z  re j0 )( z  re j0 )
z2 z2
H ( z)   (B)
z 2  r (e j0  e  j0 ) z  r 2 z 2  2r cos 0 z  r 2
Comparing (A) and (B), we obtain

𝑏1 = −2𝑟 cos 𝜃0 and 𝑏2 = 𝑟 2


𝑏1 2𝜋𝑓0
∴ 𝑐𝑜𝑠𝜃0 = − 𝜃0 =
2√𝑏2 𝑓𝑠
𝜃0 = resonant frequency

Chapter 5 146
5.7 Stability of a second-order filter
Consider a two-pole resonant filter given by

z2 1
H ( z)  
z 2  b1z  b2 1  b1z 1  b2 z  2

b1 & b2 are coefficients

This system has two zeros at the origin and poles at

b1  4b2
2
b
p1 , p 2   1 
2 2

 The filter is stable if the poles lies inside the unit circle i.e.
|p1| < 1 & |p2| < 1

 For stability b2 < 1. If b2 = 1 then the system is an


oscillator (Marginally stable)

 For the poles to be complex

ie. b12 – 4b2 < 0  b 12 < 4b2 and


b1  2 b2 b2  0

 For the poles to be real If b12 – 4b2  0 .

The stability conditions define a region in the coefficient plane


(b1, b2) which is in the form of a triangle (see below)

The system is only stable if and only if the point (b1, b2) lies inside
the stability triangle.

Chapter 5 147
b 12
parabola b2 =
4

b2
b2 = 1

Complex Conjugate
Poles

0
-2 -1 0 1
Real Poles b1
2

-1

Stability Triangle
If the two poles are real then they must have a value between -1 and 1 for
the system to be stable.

 b1  b12  4b2
1  1
2
 2  b1   b12  4b2  2  b1

 2  b1   b12  4b2 and b12  4b2  2  b1


(2  b1 ) 2  b12  4b2 and b12  4b2  (2  b1 ) 2
b1  b2  1  0 and b1  b2  1  0

 The region below the parabola (b12 > 4b2) corresponds to real
and distinct poles.
 The points on the parabola (b12 = 4b2) result in real and equal
(double) poles.
 The points above the parabola correspond to complex-
conjugate poles.

Chapter 5 148
Exerise:
(a) Determine the stability region (triangle) for following the
causal system
1
H ( z) 
1  b1 z 1  b2 z 2
Your answer should include , sketch and equations of the
boundaries of the region. Also, indicate the region where
complex conjugate poles exist.

(b) The transfer function of a second order digital filter is given


1
by H ( z ) 
1  b1z 1  b2 z 2

Assuming b12  4b2  0 show that the resonant frequency (0) of


this filter is given by   cos1  b1 
0 2 b 
 2

Chapter 5 149
5.8 Digital Oscillators
A digital oscillator can be made using a second order discrete-
time system, by using appropriate coefficients. A difference
equation for an oscillating system is given by

pn  A cosn 
From the table of z-transforms we know that the z-transform of
p[n] above is

1  cosz 1
P( z ) 
1  2 cosz 1  z  2

Y ( z) 1  cos z 1
Let P( z )   ,
X ( z ) 1  2 cos z 1  z  2

Taking inverse z-transform on both sides, we obtain

yn  2 cos yn  1  yn  2  xn  cos xn  1

An oscillator has no input. i.e., 𝑥[𝑛] = 0 and


𝑥[𝑛 − 1] = 0

So the equation of the digital oscillator becomes

yn  2 cos yn  1  yn  2

Chapter 5 150
and its structure is shown below.

y[n] = A cos(n)

y[n-1] y[n-2]
+ z-1 z-1

b1 = 2cos

b2 = -1

To obtain y[n] = A cos(n), use the following initial conditions:


y[0] = A cos(0.) = A
y[-1] = A cos(-1.) = A cos

The frequency can be tuned by changing the coefficient b1 (b2 is


a constant). The resonant frequency  of the oscillator is,

 b1 b1
cos  
2 b2 2 (For an oscillator b2 = 1)

Example: A digital sinusoidal oscillator is shown below.

x[n] + y[n] = A sin((n+1))


-1
z

-b1 z-1

-b2

Chapter 5 151
(a) Assuming 0 is the resonant frequency of the digital oscillator,
find the values of b1 and b2 for sustaining the oscillation.
1 1
𝐻 (𝑧) = =
1 + 𝑏1 𝑧 −1 + 𝑏2 𝑧 −2 (1 − 𝑟𝑒 𝑗𝜃0 𝑧 −1 )(1 − 𝑟𝑒 −𝑗𝜃0 𝑧 −1 )
1
=
1 − 2𝑟𝑐𝑜𝑠(𝜃0 )𝑧 −1 + 𝑟 2 𝑧 −2
b1 = -2 r cos0; b 2 = r2

For oscillation b2 = 1  r = 1  b1 = -2 cos0

(b) Write the difference equation for the above figure. Assuming
x[n] = (Asin0)[n], and y(-1) = y(-2) = 0.

Show, by analysing the difference equation, that the application


of an impulse at n = 0 serves the purpose of beginning the
sinusoidal oscillation, and prove that the oscillation is self-
sustaining thereafter.
yn  b1 yn  1  yn  2  xn
yn  2 cos 0 yn  1  yn  2  A sin  0 n

n=0
y[0] = 2cos0 y[-1] – y[-2] + A sin0 [0]

0 0 0
𝑦[o0] = 𝐴osin 𝜃0 o
I I I
n n 0 n 0
n=1 p p o p o
y[1] = 2cos0 y[0]
ut –y[-1] I 0 [1]ut
ut + A sin I
te te n te n
p sin 2𝜃0r
𝑦[1] = 2 cos 𝜃r 0 𝐴 sinr 𝜃0 = 𝐴 p
m m ut m ut
n=2 f f te f te
y[2] = 2 cos0 y[1]
o – y[0] o + Ar sin0[2]o r
m
= 2 cos0 rA sin2r0 – A sin0 r m
a 152 a f a f
Chapter 5
n n o n o
o o r o r
s s a s a
= 2A cos0 [2 sin0cos0] – A sin0
= A sin0 [4 cos20 –1 ] = A[3sin0 – 4 sin30]
where sin30 = 3sin0 – 4 sin30
𝑦[2] = 𝐴 sin 3𝜃0 and so forth

(c) By setting the input to zero and under certain initial conditions,
sinusoidal oscillation can be obtained using the structure shown
above. Find these initial conditions.

yn  2 cos yn  1  yn  2  xn


(x[n] = 0 for an oscillator)

n=0 y[0] = 2cos0 y[-1] – y[-2]

for oscillation, y[-1] = 0  no cosine terms

y[0] = -y[-2]  y[-2] = -Asin0 (sine term is required)


y[0] = 0-(-A sin0) = A sin0

Initial conditions: 𝑦[−1] = 0; 𝑦[−2] = −𝐴𝑠𝑖𝑛𝜃𝑜

Exercise:

The transfer function of a second order digital oscillator with an


oscillation frequency of 0 is given by
z
H ( z)  2 ; b1  2 cos 0
z  b1 z  1
Show that the impulse response corresponding to the system
function H(z) is given by
sin( n 0 ) u (n)
h( n) 
sin( 0 )

Chapter 5 153
5.8.1 Sine and cosine oscillators

Sinusoidal oscillators can be used to deliver the carrier in


modulators. In modulation schemes, both sines and cosines
oscillators are needed. A structure that delivers sines and cosines
simultaneously is shown below:

z-1

cos
+
y[n]= cos(n)
sin

-sin
cos
+
x[n]= sin(n)
z-1

Proof:
Trigonometric equation for cos(n+1) is:
cos((n+1) ) = cos(n)cos() - sin(n) sin()

Let y[n] = cos(n) and x[n] = sin(n)


 y[n+1] = cos() y[n] – sin() x[n]

Replace n by n-1
y[n] = cos() y[n-1] – sin() x[n-1] (A)

Similarly
sin((n+1)) = sin() cos(n) + sin(n) cos()
 x[n+1] = sin() y[n] + x[n] cos()

Replace n  n-1
x[n] = sin() y[n-1] + x[n-1] cos() (B)

Using equations A & B above, the structure shown above can be


obtained.
Chapter 5 154
Example: An oscillator is given by the following coupled
difference equations expressed in matrix form.

 yc n cos  0  sin  0   yc n  1


 y n   sin  cos  0   ys n  1
 s   0

Draw the structure for the realisation of this oscillator, where 0


is the oscillation frequency. If the initial conditions yc[-1] =
Acos0 and ys[-1] = -Asin0, obtain the outputs yc[n] and ys[n]
using the above difference equations.

yc n  cos 0 yc n  1  sin  0 y s n  1


y s n  sin  0 yc n  1  cos 0 y s n  1

z-1

cos0
+ yc[n]
sin0

-sin0
cos0
+
ys[n]
-1
z

n=0 ys[0] = sin0 (A cos0) + cos0 (-Asin0) = 0


n=0 yc[0] = cos0 (Acos0) - sin0 (-Asin0) = A
n=1 yc[1] = cos0.A - sin0 .0 = Acos0
n=1 ys[1] = A sin0 + 0 = A sin0
n=2 yc[2] = cos0 yc[1] - sin0 ys[1]
= cos0 A cos0 - sin0 A sin0 = A cos(20)
n=n yc[n] = A cos (n0)
similarly ys[n] = A sin(n0)

Chapter 5 155
Exercise: For the structure shown below, write down the
appropriate difference equations and hence state the function of
this structure.

5.9 Notch filters

When a zero is placed at a given point on the z-plane, the


frequency response will be zero at the corresponding point. A pole
on the other hand produces a peak at the corresponding frequency
point.

Poles that are close to the unit circle give rise large peaks, where
as zeros close to or on the unit circle produces troughs or minima.
Thus, by strategically placing poles and zeros on the z-plane, we
Chapter 5 156
can obtain sample low pass or other frequency selective filters
(notch filters).

Example:
Obtain, by the pole-zero placement method, the transfer function
of a sample digital notch filter (see figure below) that meets the
following specifications:

Notch Frequency: 50Hz


3db width of the Notch: ±5Hz
Sampling frequency: 500 Hz
 f 
The radius, r of the poles is determined by: r  1   
 fs 

|H(f)|

0 50 f (Hz)
250

To reject the component at 50Hz , place a pair of complex zeros


at points on the unit circle corresponds to 50Hz.

50
i.e. at angles of 3600   36 0  0.2
500
Chapter 5 157
To achieve a sharp notch filter and improved amplitude response
on either side of the notch frequency , a pair of complex conjugate
zeros are placed at a radius r < 1.
 f 
  1  
10 
r  1     0.937
 fs   500 

|z| =1

360

360

0.937

z  e j 0.2 z  e j 0.2 


H ( z) 
z  0.937e j0.2 z  0.937e j0.2 
z 2  1  (e j 0.2  e j 0.2 )

z 2  0.878  0.937(e j 0.2  e j 0.2 ) z
z 2  1  2 cos(0.2 )

z 2  0.878  2  0.937 cos(0.2 )
1  1.6180 z 1  z  2

1  1.5161z 1  0.878 z  2

Exercise: A bandpass digital filter is required to meet the


following specifications:
(1) Complete signal rejection at dc and 250Hz;
Chapter 5 158
(2) A narrow passband centred at 125Hz;
(3) A 3dB bandwidth of 10Hz
Assuming a sampling frequency of 500Hz, obtain the transfer
function of the filter, by suitably placing z-plane poles and zeros,
and it difference equations.

The radius, r of the poles is determined by the desired bandwidth.


An approximate relationship between r, for r>0.9, and bandwidth,
𝑏𝑤
bw, is given by 𝑟 ≈ 1 − ( )𝜋
𝐹𝑠

5.9 Summary
At the end of this chapter, it is expected that you should know:
 Types of digital filters (FIR/IIR) and their properties.
 Conversion from FIR/IIR difference equations to transfer functions and
back again.
 FIR (Non Recursive, all-zero) Filters
o Understanding of phase delay and group delay
o Definition of linear phase filters
 IIR (Recursive, all-pole or pole-zero) Filters
o Cascaded, parallel, and canonic structures
 Calculation of 3 dB cut-off frequency and 3 dB bandwidth for a simple
first-order FIR and IIR filter
 Be able to plot the magnitude response of a simple first-order FIR and
IIR filter.
 Be able to distinguish between lowpass and highpass filters based on the
difference equations or transfer functions for both FIR and IIR
 Given an FIR filter (difference equation or transfer function), be able to
draw the magnitude and phase responses, and be able to explain the
relationship between magnitude and phases responses.
 The differences between minimum, maximum and mixed phase filters.
 The similarity in magnitude responses when filter zeroes are reflected
about the unit circle.
 All-pass filters: be able to show that their magnitude response is constant
but their phase response is non-zero.
 Be able to derive the transfer function for a second order resonator filter,
and be able to analyse its stability properties using the stability triangle
and pole positions. Be able to understand the range the filter coefficients
can take in order to preserve stability.

Chapter 5 159
 Principles of stable, marginally stable and unstable filters and equations
for digital oscillators.
 Be able to draw the structure of a digital oscillator that can
simultaneously produce sine and cosine oscillations, and to initialise it
correctly.
 Understanding and design of notch filters.

Chapter 5 160

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy