Sei sulla pagina 1di 155

FUNDAMENTAL DSP CONCEPTS

C. Williams & W. Alexander


North Carolina State University, Raleigh, NC (USA)
ECE 513, Fall 2013
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 1 / 155
Outline
1 Introduction
2 Digital Signal Processing Applications
3 Why Digital Signal Processing
4 Representation of DiscreteTime Signals
5 Operations on Sequences
6 Normalized Frequency Representation
7 The ZTransform
8 Region of Convergence
9 Frequency Representation of DiscreteTime Systems
10 Difference Equation Representation
11 The Frequency Response
12 PoleZero Plots
13 System Response
14 Frequency Shifting
15 Inverse ZTransform for Systems with Complex Poles
16 Inverse ZTransform for Systems with Multiple Poles
17 Cascade Implementation of Digital Filters
18 Stabilization of an Unstable Filter
19 References
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 2 / 155
Introduction
Signals play an important role in many activities in our daily lives.
Examples include:
Speech
Music
Biomedical signals
Video
Digital Television
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 3 / 155
Introduction
A deterministic signal
is a function of an independent variable such as time, distance,
position, temperature, and pressure. It
can be uniquely determined by
a well-dened process such as a mathematical expression of one or
more independent variables,
or by table look up.
For example,
s(t ) = 3 sin (2.1t + 0.3198) u(t ) (1)
is a deterministic signal with independent variable t .
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 4 / 155
Introduction
A speech signal can not be described functionally by a
mathematical expression.
However, a recorded segment of speech can be represented to a
high degree of accuracy as the sum of several sinusoids of
different amplitudes and frequencies such as [1]
s(t ) =
N

k=1
A
k
(t ) sin [2F
k
(t )t +
k
(t )] (2)
A signal that is determined in a random way and can not be
predicted ahead of time is a random signal.
Statistical approaches are often used to analyze random signals.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 5 / 155
DSP Applications
Digital signal processing is heavily used in information technology.
Information technology includes such diverse subjects as
digital signal processing,
image processing,
multimedia applications,
computational engineering,
visualization of data,
database management,
teleconferencing,
remote operation of robots,
autonomous vehicles,
computer networks, etc.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 6 / 155
Why DSP?
Many applications involving continuoustime signals use digital
signal processing.
This often involves
1
sampling the continuoustime signal at regular intervals,
2
quantizing the samples to obtain a digital sequence,
3
processing the digital system using a computer or a digital system,
4
converting the output digital sequence to a continuoustime
system.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 7 / 155
Digital signal processing of a continuoustime signal using this
approach may be preferable over processing the signal directly in
the continuoustime domain for many of the following reasons:
1
Programmability
2
Accuracy
3
Data storage without degradation
4
Multiplexing of signals
5
Easy to process low frequency signals
6
Cost is generally low due to volume production
7
It is easy to use encryption to provide security with digital signals.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 8 / 155
Why DSP?
Disadvantages associated with digital signal processing:
1
A digital signal processing system is often more complicated than a
corresponding analog signal processing system.
2
The upper frequency for digital systems is determined by the
sampling frequency.
3
Digital systems are constructed using active circuits that consume
power. Analog systems, that consume less power, can be designed
using only passive circuits.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 9 / 155
Representation of DiscreteTime Signals I
A discretetime signal x(n) is a function of an independent
variable that can only take on discrete values.
We can represent a discretetime signal using:
1
A table as given in Table 1,
n 0 1 2 3 4 5 6
x(n) -3 -1 -2 5 0 4 -1
Table: A tabular representation of a discretetime function.
2
A functional representation such as
x(n) =
_
_
_
0 for n < 0
(0.2)
n
for 0 n 10
0 for n > 10
(3)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 10 / 155
Representation of DiscreteTime Signals II
3
A sequence representation such as
x(n) =
_
_
_
3, 1, 1, 5,

0, 4, 1
_
_
_
(4)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 11 / 155
Operations on Sequences I
We often desire to operate on an input sequence x(n) using a set
of prescribed rules to obtain an output sequence.
The basic operations for this course include
1
Modulation - y(n) = h(n)x(n) (point by point multiplication of two
sequences) as shown in Figure 1.
x(n)
Figure: Modulation.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 12 / 155
Operations on Sequences II
2
Addition - y(n) = h(n) + x(n) (point by point addition of two
sequences) as shown in Figure 2.
x(n)
Figure: Addition.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 13 / 155
Operations on Sequences III
3
Multiplication - y(n) = ax(n) (multiplication of each point by a
constant) as shown in Figure 3.
x(n)
Figure: Multiplication.
4
Delay - y(n) = x(n 1) as shown in Figure 4.
Z
-1
x(n) x(n-1)
Figure: Delay.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 14 / 155
Operations on Sequences IV
Division is an important operation for many practical DSP
operations.
Division is a more complicated operation than multiplication or
addition, etc.
Therefore, division for DSP operations is typically implemented by
1
Replacing division by a constant with multiplication by the
reciprocal of the constant,
2
Dividing by a power of two by shifting twos complement numbers to
the right or to the left as appropriate.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 15 / 155
Normalized Frequency Representation
When we sample a continuoustime signal:
1
We obtain a sequence that can be represented by replacing the
independent variable t by nT in the case where t is the
independent variable.
2
This results in a normalized representation of the frequency
content.
3
We can replace the continuoustime radial frequency by the
discretetime frequency = T.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 16 / 155
Normalized Frequency Representation
Example (1.1)
Consider the signal
x(t ) = Ae
j t
u(t ) (5)
After sampling, we have
x(n) = Ae
j nT
= Ae
j n
(6)
Thus, we see that the normalized discretetime frequency is
obtained by multiplying the continuoustime frequency by the
sampling interval T.
= T (7)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 17 / 155
Example (1.1)
We know from the Sampling Theorem that the largest possible
sampling interval to avoid aliasing is
T
max
=

N
(8)
Thus, the normalized discretetime Nyquist frequency is always

N
=
N
T
max
=

N

N
= (9)
We will be primarily concerned with the normalized discretetime
frequencies
(10)
in this course since we will be studying discretetime signals.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 18 / 155
The Z Transform for a discretetime sequence x(n) is dened as
the power series [1]
X(z) =

n=
x(n)z
n
(11)
In most of our examples, the sequence of interest begins at some
designated sample which we arbitrarily assign the index 0.
In this case, the sequence does not exist prior to n = 0 and
X(z) =

n=0
x(n)z
n
(12)
This is called the right sided ZTransform.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 19 / 155
Region of Convergence
The ZTransform of a discretetime sequence only exists for
those values of z for which the innite power series converges.
The region of convergence (ROC) for the Z Transform is the set of
all values of z for which this innite power series converges.
An innite power series may have more than one ROC and the
discretetime sequence associated with each of these ROCs may
be different.
Thus, Z Transform for a specic discretetime sequence must also
include the ROC.
We will use an example to illustrate this concept [1].
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 20 / 155
Region of Convergence
Example (1.2)
Consider the sequence
x(n) =
_
a
n
, n 0
b
n
, n 1
(13)
Using the denition, the Z Transform for this sequence is given by
X(z) =
1

n=
(b
n
)z
n
+

n=0
a
n
z
n
(14)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 21 / 155
Region of Convergence
Example (1.2)
We can obtain a closed form expression for X(z) since it is a
geometric series. Let
S
1
=
1

n=
(b
n
)z
n
(15)
and
S
2
=

n=0
a
n
z
n
(16)
Then
S
1
=

m=1
b
m
z
m
=

m=1
(b
1
z)
m
(17)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 22 / 155
Region of Convergence
Example (1.2)
A geometric series in the form
Y =
N

n=0
c
n
(18)
can be written in closed form as
Y =
1 c
N+1
1 c
(19)
where c may be complex as well as real.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 23 / 155
Region of Convergence
Example (1.2)
We can use this result to obtain a closed form expression for S
1
.
S
1
=
_

m=0
(b
1
z)
m
1
_
(20)
where we have added and subtracted the term for m = 0. Thus,
S
1
= lim
M
_
1 (b
1
z)
M+1
1 (b
1
z)
1
_
(21)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 24 / 155
Region of Convergence
Example (1.2)
If

b
1
z

< 1 (|z| < |b|) (22)


then
lim
M
(b
1
z)
M+1
= 0 (23)
and
S
1
=
_
1
1 (b
1
z)
1
_
(24)
Simplifying this result, we obtain
S
1
=
z
z b
(25)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 25 / 155
Region of Convergence
Example (1.2)
We can obtain a closed form expression for S
2
in a similar way.
S
2
= lim
N
_
1 (az
1
)
N+1
1 (az
1
)
_
(26)
If

az
1

< 1 (|a| < |z|) (27)


then
lim
N
(az
1
)
N+1
= 0 (28)
and
S
2
=
_
1
1 (az
1
)
_
(29)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 26 / 155
Region of Convergence
Example (1.2)
Simplifying this result, we obtain
S
2
=
z
z a
(30)
Combining the two partial results, we obtain
X(z) = S
1
+ S
2
=
z
z a
+
z
z b
(31)
X(z) =
2z
2
(a + b)z
z
2
(a + b)z + ab
(32)
This Z Transform has nite values for the region
|a| < |z| < |b| |a| < |b| (33)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 27 / 155
Region of Convergence
Example (1.2)
On the other hand, if |b| < |a|, we have chosen the wrong way to
partition X(z). The two sequences S
1
and S
2
have no common
region of convergence.
Figure 5 shows the region of convergence (in gray) for S
1
with
b = 3.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 28 / 155
Region of Convergence
Example (1.2)
Figure: Region of convergence for S
1
with b = 3.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 29 / 155
Region of Convergence
Example (1.2)
Figure 6 shows the region of convergence (in gray) for a = 0.5.
Figure: Region of convergence for S
2
with a = 0.5.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 30 / 155
Region of Convergence
Example (1.2)
Figure 7 shows the region of convergence for X(z) with a = 0.5
and b = 3.0.
Figure: Region of convergence for X(z)(a = 0.5, b = 3.0).
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 31 / 155
Region of convergence
We can obtain the discretetime sequence corresponding to a Z
Transform by evaluating it within the ROC.
We will use an example to illustrate this concept.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 32 / 155
Region of Convergence
Example (1.3)
This example involves nding a bounded sequence with the
following ZTransform
X(z) =
0.81z
z + 0.62
+
0.5815z
z + 1.6129
(34)
Note that X(z) has been expanded into partial fractions.
Let
X
1
(z) =
0.81z
z + 0.62
(35)
and
X
2
(z) =
0.5815z
z + 1.6129
(36)
such that
X(z) = X
1
(z) + X
2
(z) (37)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 33 / 155
Region of Convergence
Example (1.3)
We will nd the appropriate sequence for each term and then add
the two sequences.
X
1
(z) =
0.81
1 (0.62z
1
)
(38)
If

0.62z
1

< 1 (39)
so that
lim
N
(0.62z
1
)
N+1
= 0 (40)
then
X
1
(z) = 0.81

n=0
(0.62)
n
z
n
(41)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 34 / 155
Region of Convergence
Example (1.3)
It follows that
x
1
(n) = 0.81 (0.62)
n
u(n) (42)
In looking at X
2
(z), we see that the pole has a magnitude greater
than 1.0.
Therefore, it must be a left sided sequence.
Using the results of the previous example, we observe that if
lim
n

bz
1

n
= 0, b = 1.6129 (43)
then
x
2
(n) = 0.5815(1.6129)
n
; n 1 (44)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 35 / 155
Region of Convergence
Example (1.3)
It follows that
x(n) =
_
0.5815(1.6129)
n
for n 1
0.81(0.62)
n
for 0 n
(45)
Figure 8 gives a stem plot of x(n) for n = 50 to n = 50.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 36 / 155
Region of Convergence
Example (1.3)
50 40 30 20 10 0 10 20 30 40 50
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
Stem plot of x(n) for n = 50 to n = 50
sample number
m
a
g
n
i
t
u
d
e
Figure: Stem plot of x(n) for n = - 50 to n = 50.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 37 / 155
Frequency Representation
We will consider the frequency representation of a discretetime
sequence.
We rst consider an aperiodic sequence and we will later consider
the frequency representation of periodic and nite duration
sequences.
The two-sided ZTransform is given by
X(z) =

n=
x(n)z
n
(46)
The two-sided ZTransform can represent an aperiodic sequence
over the range of n .
The region of convergence must include the unit circle in order for
the sequence x(n) to be nite for all values of n.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 38 / 155
Frequency Representation
The unit circle is dened where z = e
j

e
j

= 1 (47)
We can evaluate X(z) on the unit circle as follows.
X() = X(z)|
z=e
j
=

n=
x(n)e
j n
(48)
We dene Equation 48 as the Fourier Transform of the aperiodic,
discretetime sequence x(n).
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 39 / 155
Frequency Representation
It is easy to show that X() is periodic since
e
j (+2k)
= e
j
e
j 2k
= e
j
; k (49)
where k is an integer and
e
2jk
= 1 k (50)
Thus, X(j ) is periodic with period 2 or
X() = X( + 2k) ; k (51)
We can obtain the inverse transform of X() to obtain the
sequence x(n) if the region of convergence for X(z) includes the
unit circle.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 40 / 155
Frequency Representation
Let us multiply X() by e
j m
and integrate it over one period to
obtain
_

X()e
j m
d =
_

n=
x(n)e
j n
_
e
j m
d (52)
If X() exist (implies that the region of convergence for X(z)
includes the unit circle), then we can change the order of
summation and integration.
_

X()e
j m
d =

n=
x(n)
_

e
j (mn)
d (53)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 41 / 155
Frequency Representation
We observe that
_

e
j (mn)
d =
_
2 m = n
0 m = n
(54)
It follows that
_

X()e
j m
d = 2x(n) (55)
or
x(m) =
1
2
_

X()e
j m
d (56)
Thus, the Fourier Transform synthesis, transform pair for
discretetime sequence is given by
x(m) =
1
2
_

X()e
j m
d (57)
X() =

n=
x(n)e
j n
(58)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 42 / 155
Frequency Representation
We can obtain the frequency representation of a sequence by
evaluating its Z-Transform on the unit circle as shown in the
previous section.
We will present an example to illustrate the frequency
representation of a discretetime sequence.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 43 / 155
Frequency Representation Example
Example (1.4)
Consider the discretetime sequence
x(n) = 2.0(0.75)
n
u(n) (59)
The corresponding ZTransform is given by
X(z) = 2.0

n=0
(0.75)
n
z
n
=
2.0
1 0.75z
1
; |z| > 0.75 (60)
Since the region of convergence includes the unit circle, X() is
dened and
X() =
2.0
1 0.75e
j
(61)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 44 / 155
Frequency Representation Example
Example (1.4)
We can simplify X()
X() =
2.0(1 0.75e
j
)
(1 0.75e
j
)(1 0.75e
j
)
(62)
X() =
2.0 1.5cos() 1.5jsin()
1 1.5cos() + 0.5625
(63)
Fig. 9 gives a plot of the magnitude of X() and Fig. 10 gives a
plot of the phase of X().
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 45 / 155
Frequency Representation Example
Example (1.4)
0 0.5 1 1.5 2 2.5 3 3.5
1
2
3
4
5
6
7
8
Frequency Plot
Frequency(radians)
M
a
g
n
i
t
u
d
e
Figure: Magnitude plot of X() for Example 19.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 46 / 155
Frequency Representation Example
Example (1.4)
0 0.5 1 1.5 2 2.5 3 3.5
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
Phase Plot
Frequency (radians/sec)
P
h
a
s
e

A
n
g
l
e

(
r
a
d
i
a
n
s
)
Figure: Phase plot of X() for Example 19.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 47 / 155
Frequency Representation Example
Example (1.4)
These plots can be generated by using the following Matlab code.
We can load the system transfer function coefcients using
b = [2.0];
a = [1 -0.75];
We can then compute the frequency response using
w = pi
*
(0.0:0.01:1.0);
h = freqz(b,a,w);
hmag = abs(h);
hphase = angle(h);
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 48 / 155
Frequency Representation Example
Example (1.4)
We can then plot the results using
figure(1)
plot(w, hmag)
title(Frequency Plot)
xlabel(Frequency(radians))
ylabel(Magnitude)
print -dps ch1ex7a.ps
figure(2)
plot(w, hphase);
title(Phase Plot)
xlabel(Frequency (radians/sec))
ylabel(Phase Angle (radians))
print -dps ch1ex7b.ps
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 49 / 155
Frequency Representation Example
Example (1.4)
These plots provide the magnitude and phase of the system
response for the range 0 .
It is important to note that since we have assumed that x(n) is real
X() = X

()
|X()| = |X()|
arg (X()) = arg (X()) (64)
We can observe this by computing X() for the full range of
.
Note that X() is periodic so we can easily obtain X() for
negative values by subtracting multiples of 2 from the given
frequencies.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 50 / 155
Frequency Representation Example
Example (1.4)
We can use Matlab to compute X() for .
The full range plots can be obtained with the following Matlab
script.
dw = pi/100;
w3 = dw
*
(-100:100);
h3 = freqz(b,a,w3);
hmag3 = abs(h3);
hphase3 = angle(h3);
The corresponding magnitude response is given in Figure 11 and
the corresponding phase response is given in Figure 12.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 51 / 155
Frequency Representation Example
Example (1.4)
4 3 2 1 0 1 2 3 4
1
2
3
4
5
6
7
8
Frequency Plot (Full Range)
Frequency(radians)
M
a
g
n
i
t
u
d
e
Figure: Magnitude plot of X() for the full range for Example 1.4.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 52 / 155
Frequency Representation Example
Example (1.4)
4 3 2 1 0 1 2 3 4
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
Phase Plot ( Full Range)
Frequency (radians/sec)
P
h
a
s
e

A
n
g
l
e

(
r
a
d
i
a
n
s
)
Figure: Phase plot of X() the full range for Example 1.4.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 53 / 155
Frequency Representation Example
Example (1.4)
Alternately, the full range from 0 2 can be obtained using
the following Matlab code.
[h4,w4] = freqz(b,a,201, whole);
hmag4 = abs(h4);
hphase4 = angle(h4);
The corresponding magnitude response is given in Figure 13 and
the corresponding phase response is given in Figure 14.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 54 / 155
Frequency Representation Example
Example (1.4)
0 1 2 3 4 5 6 7
1
2
3
4
5
6
7
8
Magnitude Plot
Frequency (radians)
M
a
g
n
i
t
u
d
e
Figure: Magnitude plot of X() for the full range for Example 1.4.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 55 / 155
Frequency Representation Example
Example (1.4)
0 1 2 3 4 5 6 7
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
Phase Plot
Frequency (radians)
M
a
g
n
i
t
u
d
e
Figure: Phase plot of X() the full range for Example 1.4.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 56 / 155
Difference Equation Representation
The general form for the system transfer function of a linear,
shift-invariant discretetime system is given by
H(z) =
L

k=0
b(k)z
k
1.0 +
L

k=1
a(k)z
k
(65)
Figure 15 gives a block diagram of the discretetime system.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 57 / 155
Difference Equation Representation
H(z)
X(z) Y(z)
Figure: Block diagram for a discretetime system.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 58 / 155
Difference Equation Representation
We can also write the system transfer function in terms of the ratio
of the ZTransforms of the output and the input.
H(z) =
Y(z)
X(z)
(66)
It follows that
Y(z)
_
1.0 +
L

k=1
a(k)z
k
_
= X(z)
_
L

k=0
b(k)z
k
_
(67)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 59 / 155
Difference Equation Representation
We can use the timeshift property of the ZTransform to obtain
the difference equation.
If
x(n) X(z) (68)
then
x(n k) z
k
X(z) (69)
The region of convergence is the same as that for X(z)
except at z = 0 for k > 0 and except for z = for k < 0.
Thus, if x(n k) = 0 n < k, we can write
z
k
X(z) =

n=0
x(n k)z
n
(70)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 60 / 155
Difference Equation Representation
Similarly, if y(n k) = 0 n < k, we can write
z
k
Y(z) =

n=0
y(n k)z
n
(71)
We can use this result to modify Equation 67 to obtain

n=0
[y(n) + a(1)y(n 1) + + a(L)y(n L)] z
n
(72)
=

n=0
[b(0)x(n) +b(1)x(n 1) + + b(L)x(n L)] z
n
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 61 / 155
Difference Equation Representation
Equating powers of z, we obtain
y(n) + a(1)y(n 1) + + a(L)y(n L)
= b(0)x(n) + b(1)x(n 1)
+ + b(L)x(n L) (73)
or
y(n) = b(0)x(n) + b(1)y(n 1) + + b(L)x(n L)
a(1)y(n 1) a(L)y(n L) (74)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 62 / 155
Difference Equation Representation
It follows that the linear shiftinvariant discretetime system can
be represented in either of the following standard forms.
H(z) =
L

k=0
b(k)z
k
1.0 +
L

k=1
a(k)z
k
y(n) =
L

k=0
b(k)x(n k)
L

k=1
a(k)y(n k) (75)
Note the relationship between the coefcients b(k) and a(k) in the
system transfer function and the corresponding coefcients in the
difference equation.
This relationship makes it easy to write the difference equation for
a given system transfer function by inspection or vice versa.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 63 / 155
Frequency Response
The general form for the transfer function for a causal,
discretetime is
H(z) =
Y(z)
X(z)
=
L

k=0
b(k)z
k
1.0 +
L

k=1
a(k)z
k
(76)
Note that H(z) is represented using negative powers of z.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 64 / 155
Frequency Response
We can also write H(z) in the form
H(z) =
Y(z)
X(z)
=
L

k=0
b(k)z
Lk
z
L
+
L

k=1
a(k)z
Lk
(77)
We can obtain this form by multiplying the numerator and
denominator of the previous form by z
L
.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 65 / 155
Frequency Response
We can obtain the frequency response of the system by applying
a unit magnitude sinusoidal signal with zero phase and arbitrary
frequency as an input.
We assume that
x(n) = e
j n
(78)
It follows that
x(n k) = e
j (nk)
= x(n)e
j k
(79)
Since the system is linear and shiftinvariant, the output is a
frequency dependent constant multiplied by the input.
y(n) = H()e
j n
= H()x(n) (80)
Note that H() is independent of n and therefore, it is a constant
since n is the independent variable.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 66 / 155
Frequency Response
It is easy to show this by considering the difference equation for a
discretetime system
y(n) +
L

k=1
a(k)y(n k) =
L

k=0
b(k)x(n k) (81)
If we assume that
y(n) = H()e
j n
(82)
then, we have
y(n k) = H()e
j (nk)
= y(n)e
j k
(83)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 67 / 155
Frequency Response
Substituting these values in the difference equation, we obtain
H()e
j n
_
1.0 +
L

k=1
a(k)e
j k
_
= e
j n
_
L

k=0
b(k)e
j k
_
(84)
Solving for H(), we obtain
H() =
L

k=0
b(k)e
j k
1.0 +
L

k=1
a(k)e
j k
(85)
This result is equivalent to evaluating the system transfer function,
H(z), on the unit circle where
z = e
j
(86)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 68 / 155
Frequency Response
It follows that
H() = H(z)|
z=e
j
=
L

k=0
b(k)e
j k
1.0 +
L

k=1
a(k)e
j k
(87)
We will provide examples of the representation of the frequency
response for both FIR and IIR discretetime systems.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 69 / 155
FIR Filter Frequency Response Example
Example (1.5)
Consider the FIR lter with impulse response
h(n) = 0.0110(n) +0.1637(n 1) + 0.6947(n 2)
+0.1637(n 3) 0.0110(n 4) (88)
The corresponding difference equation for the lter is
y(n) = 0.0110x(n) + 0.1637x(n 1) + 0.6947x(n 2)
+0.1637x(n 3) 0.0110x(n 4) (89)
We can obtain the frequency response for the lter by using a unit
magnitude sinusoidal signal with zero phase and arbitrary
frequency as the input to the lter.
The frequency response at the arbitrary frequency is the
corresponding output divided by the input x(n).
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 70 / 155
FIR Filter Frequency Response Example
Example (1.5)
Thus, we let
x(n) = e
j n
(90)
Then
x(n 1) = e
j (n1)
= e
j
x(n)
x(n 2) = e
j (n2)
= e
j 2
x(n)
x(n 3) = e
j (n3)
= e
j 3
x(n)
x(n 4) = e
j (n4)
= e
j 4
x(n) (91)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 71 / 155
FIR Filter Frequency Response Example
Example (1.5)
It follows that
H() = 0.0110 + 0.1637e
j
+ 0.6947e
j 2
+ 0.1637e
j 3
0.0110e
j 4
(92)
H() = 0.0110e
2j
_
e
2j
+ e
2j
_
+ 0.1637e
2j
_
e
j
+ e
j
_
+ 0.6947e
2j
(93)
H() = e
2j
{0.6947 + 0.3274 cos() 0.0220 cos(2)} (94)
We can determine the magnitude and phase of H() at some
particular value of by substituting for in H().
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 72 / 155
FIR Filter Frequency Response Example
Example (1.5)
For example
H(0.2) = e
0.4
{0.6947 + 0.3274cos(0.2) 0.0220cos(0.4)}
= 0.9528e
0.4
H(0.5) = e

{0.6947 + 0.3274cos(0.5) 0.0220cos()}


= 0.7194e

H(0.65) = e
1.3
{0.6947 + 0.3274cos(0.65) 0.0220cos(1.3)}
= 0.5617e
1.3
H(0.75) = e
1.5
{0.6947 + 0.3274cos(0.75) 0.0220cos(1.5)}
= 0.4659e
1.5
H(0.9) = e
1.8
{0.6947 + 0.3274cos(0.9) 0.0220cos(1.8)}
= 0.3682e
1.8
H() = e
2
{0.6947 + 0.3274cos() 0.0220cos(2)}
= 0.3480 (95)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 73 / 155
FIR Filter Frequency Response Example
Example (1.5)
Figure 16 gives the magnitude spectrum of H().
0 0.5 1 1.5 2 2.5 3 3.5
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Magnitude Spectrum for FIR Example
Frequency (Radians/sec)
M
a
g
n
i
t
u
d
e
Figure: Magnitude Spectrum for FIR lter.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 74 / 155
FIR Filter Frequency Response Example
Example (1.5)
Figure 17 gives the phase spectrum for H().
0 0.5 1 1.5 2 2.5 3 3.5
7
6
5
4
3
2
1
0
Phase Spectrum for FIR Example
P
h
a
s
e

A
n
g
l
e

(
R
a
d
i
a
n
s
)
Frequency (Radians/sec)
Figure: Magnitude Spectrum for FIR lter.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 75 / 155
IIR Filter Frequency Response
Example (1.6)
Consider the IIR lter with system transfer function
H(z) =
0.6283z
2
1.2565z + 0.6283
z
2
1.1804z + 0.4816
(96)
We can use the Matlab function freqz to obtain the frequency
response of the system corresponding to H(z).
The following Matlab can be used to compute and plot the
frequency response for H(z).
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 76 / 155
IIR Filter Frequency Response
Example (1.6)
Read in the lter coefcients.
b = [0.6283 -1.2565 0.6283];
a = [1.0000 -1.1804 0.4816];
Compute the frequency response using the Matlab function freqz.
w = pi
*
(0:0.01:1.0);
h = freqz(b, a, w);
hmag = abs(h);
hphase = angle(h);
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 77 / 155
IIR Filter Frequency Response
Example (1.6)
Plot the results.
figure(1);
plot(w, hmag)
title(Frequency Response Plot)
xlabel(Normalized Frequency (radians))
ylabel(Magnitude)
print -dps iirfreq.ps
figure(2)
plot(w, hphase)
title(Phase Response Plot)
xlabel(Normalized Frequency (radians))
ylabel(Magnitude)
print -dps iirphase.ps
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 78 / 155
IIR Filter Frequency Response
Example (1.6)
Figure 18 gives the resulting magnitude response.
0 0.5 1 1.5 2 2.5 3 3.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Frequency Response Plot
Normalized Frequency (radians)
M
a
g
n
i
t
u
d
e
Figure: Magnitude plot of H() for Example 1.6.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 79 / 155
IIR Filter Frequency Response
Example (1.6)
Figure 19 gives the corresponding phase response.
0 0.5 1 1.5 2 2.5 3 3.5
0
0.5
1
1.5
2
2.5
3
3.5
Phase Response Plot
Normalized Frequency (radians)
M
a
g
n
i
t
u
d
e
Figure: Phase plot of H() for Example 1.6.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 80 / 155
IIR Filter Frequency Response
Example (1.6)
Note that the magnitude of the frequency response is zero at
= 0.
The plot shows the phase equal to zero at this value of as well.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 81 / 155
PoleZero Plots
The location of the poles and zeros in the complex plane
determine the frequency response of the system.
We can use polezero plots to help estimate the frequency
response of discretetime systems.
For example, it is usually desirable to have the magnitude of a low
pass lter approach or equal to zero as the frequency approaches
the Nyquist frequency ( for normalized frequencies).
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 82 / 155
PoleZero Plots
Therefore, we expect to nd the zeros to be at or clustered around
z = 1 for low pass lters.
The location of the poles will then determine the value of the cutoff
frequency which is typically dened as the point where the
magnitude gain is equal to

2
2
or the power gain is equal to 0.5.
For example, Figure 20 gives the polezero plot for a second
order low pass lter with cutoff frequency of
c
= 0.6.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 83 / 155
PoleZero Plots
1 0.5 0 0.5 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
2
Real Part
I
m
a
g
i
n
a
r
y

P
a
r
t
PoleZero Plot for Low Pass Filter
Figure: PoleZero Plot of H(z) for low pass lter with cutoff frequency

c
= 0.6.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 84 / 155
PoleZero Plots
The zeros are both located at z = 1 and the poles are located at
p(1) = 0.1848 + 0.4021j
p(2) = p

(1) = 0.1848 0.4021j (97)


Figure 21 gives the magnitude and phase response plots for this
lter.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 85 / 155
PoleZero Plots
4 3 2 1 0 1 2 3 4
0
0.5
1
1.5
Magnitude of Frequency Response for H(z)
Frequency (radians/sec)
M
a
g
n
i
t
u
d
e
4 3 2 1 0 1 2 3 4
4
2
0
2
4
Phase of Frequency Response for H(z)
Frequency (radians/sec)
P
h
a
s
e

(
r
a
d
i
a
n
s
)
Figure: Magnitude and Phase plots of H(z) for low pass lter with cutoff
frequency
c
= 0.6.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 86 / 155
PoleZero Plots
We also expect the gain of the low pass lter to be equal to nearly
equal to one at = 0 or where z = 1.
In this case, the second order low pass lter, with two zeros at
z = 1, can be generally represented as
H(z) =
A(z + 1)
2
z
2
2e{p(1)}z +|p(1)|
2
(98)
We can set the gain to one at z = 1 to obtain the value of A. It
follows that
A =
1 2e{p(1)} +|p(1)|
2
4
(99)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 87 / 155
PoleZero Plots
On the other hand, the gain for a high pass lter is desired to be at
or near zero at = 0.
Therefore, we expect the zeros of a high pass lter to be at or
clustered around z = 1.
The locations of the poles then determine the cutoff frequency.
Figure 22 gives the polezero plot for a second order high pass
lter with a cutoff frequency of
c
= 0.6.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 88 / 155
PoleZero Plots
1 0.5 0 0.5 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
2
Real Part
I
m
a
g
i
n
a
r
y

P
a
r
t
PoleZero Plot for High Pass Filter
Figure: PoleZero Plot of H(z) for high pass lter with cutoff frequency

c
= 0.6.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 89 / 155
PoleZero Plots
In this case, the poles are located in the same place as those for
the low pass lter above with the same cutoff frequency.
However, the zeros are located at z = 1 as expected.
Figure 23 gives the magnitude and phase response plots for this
lter.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 90 / 155
PoleZero Plots
4 3 2 1 0 1 2 3 4
0
0.2
0.4
0.6
0.8
1
Magnitude of Frequency Response for H(z)
Frequency (radians/sec)
M
a
g
n
i
t
u
d
e
4 3 2 1 0 1 2 3 4
4
2
0
2
4
Phase of Frequency Response for H(z)
Frequency (radians/sec)
P
h
a
s
e

(
r
a
d
i
a
n
s
)
Figure: Magnitude and Phase plots of H(z) for high pass lter with cutoff
frequency
c
= 0.6.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 91 / 155
PoleZero Plots
We expect the gain of the high pass lter to be equal to or nearly
equal to one at = or z = 1.
Thus, we can generally write the system transfer function for a
second order high pass lter with zeros at z = 1 as
H(z) =
A(z 1)
2
z
2
2e{p(1)}z +|p(1)|
2
(100)
We can set the gain to one at z = 1 to obtain the value of A.
Then, it follows that
A =
1 + 2e{p(1)} +|p(1)|
2
4
(101)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 92 / 155
PoleZero Plots
The gain for a band stop lter is desired to be at or near zero for
the stop frequency which is normally given by
s
= 0.5(
1
+
2
)
where
1
and
2
are the low and high cutoff frequencies
respectively.
The locations of the poles then determine the cutoff frequencies.
Figure 24 gives a polezero plot for a fourth order band stop lter
with cutoff frequencies of
1
= 0.6 and
2
= 0.75.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 93 / 155
PoleZero Plots
1 0.5 0 0.5 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
2
2
Real Part
I
m
a
g
i
n
a
r
y

P
a
r
t
PoleZero Plot for Band Stop Filter
Figure: PoleZero Plot of H(z) for band stop lter with cutoff frequencies at

1
= 0.6 and
2
= 0.75.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 94 / 155
PoleZero Plots
There are two zeros located at
r (1) = r (3) = 0.5373 + 0.8434j (102)
and two zeros located at
r (2) = r (4) = 0.5373 0.8434j (103)
The poles are located at
p(1) = 0.5810 + 0.6372j
p(2) = 0.5810 0.6372j
p(3) = 0.3187 + 0.7678j
p(4) = 0.3187 0.7678j (104)
Figure 25 gives the magnitude and phase response plots for this
lter.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 95 / 155
PoleZero Plots
4 3 2 1 0 1 2 3 4
0
0.2
0.4
0.6
0.8
1
Magnitude of Frequency Response for H(z)
Frequency (radians/sec)
M
a
g
n
i
t
u
d
e
4 3 2 1 0 1 2 3 4
10
5
0
5
10
Phase of Frequency Response for H(z)
Frequency (radians/sec)
P
h
a
s
e

(
r
a
d
i
a
n
s
)
Figure: Magnitude and Phase plots of H(z) for band stop lter with cutoff
frequency
1
= 0.6 and
2
= 0.75.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 96 / 155
PoleZero Plots
The gain for a band pass lter is desired to be at or near zero for
both = 0 and = .
Therefore, we expect to nd zeros of the transfer function at or
clustered near both z = 1 and at z = 1.
The locations of the poles then determine the cutoff pass band
frequencies.
Figure 26 gives a polezero plot for a fourth order band pass lter
with cutoff frequencies of
1
= 0.6 and
2
= 0.75.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 97 / 155
PoleZero Plots
1 0.5 0 0.5 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
2 2
Real Part
I
m
a
g
i
n
a
r
y

P
a
r
t
PoleZero Plot for Band Pass Filter
Figure: PoleZero Plot of H(z) for band pass lter with cutoff frequencies at

1
= 0.6 and
2
= 0.75.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 98 / 155
PoleZero Plots
There are two zeros at z = 1 and two zeros at z = 1.
Since the critical frequencies for this example are the same as
those for the band stop lter, the poles are located in the same
place as there are for the band stop lter above.
Figure 27 gives the frequency magnitude and phase plots for this
lter.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 99 / 155
PoleZero Plots
4 3 2 1 0 1 2 3 4
0
0.2
0.4
0.6
0.8
1
Magnitude of Frequency Response for H(z)
Frequency (radians/sec)
M
a
g
n
i
t
u
d
e
4 3 2 1 0 1 2 3 4
10
5
0
5
10
Phase of Frequency Response for H(z)
Frequency (radians/sec)
P
h
a
s
e

(
r
a
d
i
a
n
s
)
Figure: Magnitude and Phase plots of H(z) for high pass lter with cutoff
frequency
1
= 0.6 and
2
= 0.75.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 100 / 155
System Response
We can determine the response of a discretetime system for an
input sequence by obtaining the inverse Z Transform of the
product of the Z Transforms of the input sequence X(z) and the
system transfer function H(z).
We can use partial fraction expansion to nd the inverse Z
Transform in a convenient way.
Consider the output Z Transform given by
Y(z) = H(z)X(z) (105)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 101 / 155
System Response
We can expand
Y(z)
z
to obtain an expansion of the form
Y(z)
z
=
M

k=1
c
k
z p
k
(106)
where there are M poles, c
k
represents the expansion coefcients
and p
k
represents the corresponding poles.
We can then write
Y(z) =
M

k=1
c
k
z
z p
k
=
M

k=1
c
k
1 p
k
z
1
(107)
If all of the p
k
have magnitudes less than 1 (|p
k
| < 1 k), then
y(n) =
M

k=1
c
k
(p
k
)
n
u(n) (108)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 102 / 155
System Response Example
Example (1.7)
The system response for a discretetime system is given by
H(z) =
0.1593z
2
+ 0.3187z + 0.1593
(z + 0.472)(z 0.567)
(109)
We want to nd the output for this system for 0 n when the
input is
x(n) = 2.5(0.76)
n
u(n) (110)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 103 / 155
System Response Example
Example (1.7)
We rst nd X(z) and Y(z),
X(z) =
2.5z
z 0.76
(111)
Y(z) = X(z) H(z)
=
2.5z(0.1593z
2
+ 0.3187z + 0.1593)
(z 0.76)(z + 0.472)(z 0.567)
(112)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 104 / 155
System Response Example
Example (1.7)
We then divide Y(z) by z to put it in the proper form for the
resulting partial fraction expansion to be in the form for the
ZTransform of a geometric series.
Y(z)
z
=
2.5(0.1593z
2
+ 0.3187z + 0.1593)
(z 0.76)(z + 0.472)(z 0.567)
=
A
z 0.76
+
B
z + 0.472
+
C
z 0.567
(113)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 105 / 155
System Response Example
Example (1.7)
We can nd A,B,C as follows
A =
Y(z)
z
(z 0.76)|
z=0.76
= 5.1889
B =
X(z)
z
(z + 0.472)|
z=0.472
= 0.0866
C =
X(z)
z
(z 0.567)|
z=0.567
= 4.877 (114)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 106 / 155
System Response Example
Example (1.7)
It follows that we can write Y(z) as
Y(z) =
5.1889z
z 0.76
+
0.0866z
z + 0.472
+
4.877z
z 0.567
(115)
Now, we can determine the inverse Z-transform to obtain y(n).
y(n) = 5.1889(0.76)
n
+ 0.0866(0.472)
n
4.877(0.567)
n
0 n (116)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 107 / 155
System Response Example
Example (1.7)
We used the geometric series to obtain the inverse transform
X(z) =

n=0
x(n)z
n
(117)
If |p| < 1, then
X(z) =
cz
z p
=
c
1.0 pz
1
(118)
and
x(n) = c(p)
n
u(n) (119)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 108 / 155
Frequency Shifting
Frequency shifting can be used to perform a frequency
transformation of a discretetime system.
We will explore this analytically in this section.
The frequency response of a linear, shiftinvariant system can be
obtained from its ZTransform.
H(z) =

n=0
h(n)z
n
(120)
where h(n) is the impulse response of the system.
H() = H(z)|
z=e
j
=

n=0
h(n)e
j n
(121)
Assume that we multiply h(n) by a complex exponential e
j
1
to
obtain
h
1
(n) = h(n)e
j
1
n
(122)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 109 / 155
Frequency Shifting
The resulting frequency response is given by
H
1
() =

n=0
h(n)e
j
1
n
e
j n
(123)
H
1
() =

n=0
h(n)e
j (
1
)n
= H(
1
) (124)
We see that multiplying the impulse response h(n) by the complex
exponential e
j
1
shifts the frequency response by
1
and the
frequency response at = 0 is shifted to the location =
1
.
If we multiply h(n) by the complex exponential e
j
1
to obtain
h
2
(n) = h(n)e
j
1
n
(125)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 110 / 155
Frequency Shifting
The resulting frequency response is given by
H
2
() =

n=0
h(n)e
j (+
1
)n
= H( +
1
) (126)
We see that multiplying the impulse response h(n) by the complex
exponential e
j
1
shifts the frequency response by
1
and the
frequency response at = 0 is shifted to the location =
1
.
What happens if we multiply h(n) by
e
j
1
+e
j
1
2
?
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 111 / 155
Inverse ZTransform for Systems with Complex Poles
We will consider the case where the system has complex poles in
this section.
If the coefcients of both the numerator and denominator
polynomials of H(z) are real, then
1
the poles and zeros of H(z) are real, or
2
they occur in complex conjugate pairs.
We will consider the case where all of the poles are real except for
two complex poles that are complex conjugates.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 112 / 155
Inverse ZTransform for Systems with Complex Poles
We can therefore use partial fraction expansion to expand the
transfer function H(z) as
H(z) =
N
1

m=1
F
m
(z) +
N
2

k=1
C
k
z
z p
k
(127)
where all of the C
k
and p
k
are real and
F
m
(z) =
D
1m
z
z p
1m
+
D
2m
z
z p
2m
(128)
The constants D
1m
and D
2m
are complex conjugates and the
poles p
1m
and p
2m
are complex conjugates.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 113 / 155
Inverse ZTransform for Systems with Complex Poles
We can compute the inverse ZTransform of F
m
(z) to obtain
f
m
(n) = [D
1m
(p
1m
)
n
+ D
2m
(p
2m
)
n
] u(n) (129)
We can write p
1m
and p
2m
in complex exponential form as
p
1m
= e
+j
p
2m
= e
j
(130)
Then, we can write
f
m
(n) =
_
D
1m
e
(+j )n
+ D
2m
e
(j )n
_
(131)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 114 / 155
Inverse ZTransform for Systems with Complex Poles
However,
e
j n
= cos(n) + jsin(n)
e
j n
= cos(n) jsin(n) (132)
Thus,
f
m
(n) = (D
1m
+ D
2m
) e
n
cos(n)u(n)
+ j (D
1m
D
2m
) e
n
sin(n)u(n) (133)
We observe that
D
1m
+ D
2m
= 2e(D
1m
)
D
1m
D
2m
= 2j m(D
1m
) (134)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 115 / 155
Inverse ZTransform for Systems with Complex Poles
Thus
f
m
(n) = 2e (D
1m
) e
n
cos(n)u(n)
2m(D
1m
) e
n
sin(n)u(n) (135)
We can further simplify f
m
(n) by using the trigonometric equation
cos(n +) = cos() cos(n) sin() sin(n) (136)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 116 / 155
Inverse ZTransform for Systems with Complex Poles
We can then write f
m
(n) in the form
f
m
(n) = Ae
n
cos(n +) (137)
where
= tan
1
_
m(D
1m
)
e (D
1m
)
_
A = 2
_
m(D
1m
)
2
+e (D
1m
)
2
(138)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 117 / 155
Complex Poles Inverse ZTransform Example
Example (1.8)
We wish to nd the impulse response of the discretetime system
with its transfer function given by
H(z) =
0.5276z
3
+ 1.5829z
2
+1.5829z +0.5276
z
3
+ 1.76z
2
+ 1.1829z + 0.2781
(139)
If x(n) is an impulse, then
X(z) =

n=
(n)z
n
= 1 (140)
Thus,
Y(z) = H(z)X(z) = H(z) (141)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 118 / 155
Complex Poles Inverse ZTransform Example
Example (1.8)
For convenience in obtaining the geometric series form, we
expand
H(z)
z
=
0.5276z
3
+ 1.5829z
2
+ 1.5829z + 0.5276
z(z
3
+ 1.76z
2
+ 1.1829z + 0.2781)
=
D
1
z p
1
+
D
2
z p
2
+
C
1
z p
3
+
C
2
z
(142)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 119 / 155
Complex Poles Inverse ZTransform Example
Example (1.8)
It follows that
p
1
= 0.6252 + 0.3935j
p
2
= 0.6252 0.3935j = p

1
p
3
= 0.5097
p
4
= 0 (143)
and
D
1
= 0.3221 + 0.1501j
D
2
= 0.3221 0.1501j = D

1
C
1
= 0.7254
C
2
= 1.8972 (144)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 120 / 155
Complex Poles Inverse ZTransform Example
Example (1.8)
We dene
F
1
(z) =
D
1
z
z p
1
+
D
2
z
z p
2
(145)
We can then use the above development to nd f
1
(n) which is the
part of the impulse response corresponding to the complex pair of
poles p
1
and p
2
.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 121 / 155
Complex Poles Inverse ZTransform Example
Example (1.8)
We have
p
1
= e
+j
= e

(cos() + jsin())
tan() =
m(p
1
)
e(p
1
)
=
0.3935
0.6252
= tan
1
_
0.3935
0.6252
_
= 2.5799
e

cos() = 0.6252 e

=
0.6252
cos()
= 0.7387
= log
e
(0.7387) = 0.3029 (146)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 122 / 155
Complex Poles Inverse ZTransform Example
Example (1.8)
It follows that
f
1
(n) =
_
2(0.3221)e
0.3029n
cos(2.5799n)
_
u(n)

_
2(0.1501)e
0.3029n
sin(2.5799n)
_
u(n)
f
1
(n) =
_
0.6442e
0.3029n
cos(2.5799n)
_
u(n)

_
0.3002e
0.3029n
sin(2.5799n)
_
u(n) (147)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 123 / 155
Complex Poles Inverse ZTransform Example
Example (1.8)
We can simplify f
1
(n) further as
f
1
(n) = Ae
0.3029n
cos(2.5799n +)u(n) (148)
where
A = 2
_
(0.1501)
2
+ (0.3221)
2
= 0.7107
= tan
1
_
0.1501
0.3221
_
= 2.7055 (149)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 124 / 155
Complex Poles Inverse ZTransform Example
Example (1.8)
Thus,
h(n) = 1.8972(n) [0.7254(0.5097)
n
] u(n) + f
1
(n) (150)
h(n) = 1.8972(n) [0.7254(0.5097)
n
] u(n)
+ 0.7107e
0.3029n
cos(2.5799n + 2.7055)u(n)
(151)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 125 / 155
Inverse ZTransform for Systems with Multiple Poles
If the Z Transform has one or more multiple order poles, then the
partial fraction expansion must contain additional terms.
For example, if the Z Transform has a pole of order 3 such that
Y(z)
z
=
B(z)
_

M1
k=1
(z p
k
)
_
(z p
M
)
3
(152)
Then, the inverse Z Transform will have the form
Y(z)
z
=
M1

k=1
C
k
z p
k
+
C
1M
z p
m
+
C
2M
(z p
m
)
2
+
C
3M
(z p
m
)
3
(153)
The general equation for nding the residues for a system with L
poles located at p
m
is given by [2]
C
k
=
1
(L k)!(p
m
)
Lk
d
Lk
dz
_
(z p
m
)
L
Y(z)
z
_
(154)
We now consider an example where Y(z) has multiple poles.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 126 / 155
Multiple Poles Inverse ZTransform Example
Example (1.9)
Consider the discretetime system with transfer function given by
H(z) =
0.1584z
3
+ 0.4752z
2
+0.4752z +0.1584
z
3
0.2z
2
0.2275z + 0.0612
(155)
This can be rewritten as
H(z) =
0.1584 (z +1)
3
(z 0.35)
2
(z + 0.5)
(156)
We want to nd the impulse response of this system.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 127 / 155
Multiple Poles Inverse ZTransform Example
Example (1.9)
The poles of H(z) are located at
p(1) = 0.5
p(2) = p(3) = 0.35 (157)
We perform partial fraction expansion of
H(z)
z
to obtain
H(z)
z
=
C
1
z +0.5
+
C
2
z 0.35
+
C
3
(z 0.35)
2
+
C
4
z
(158)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 128 / 155
Multiple Poles Inverse ZTransform Example
Example (1.9)
C
1
=
(z + 0.5) H(z)
z

z=0.5
=
0.1584(0.5 + 1)
3
(0.5 0.35)
2
(0.5)
= 0.05481
C
3
=
(z 0.35)
2
H(z)
z

z=0.35
=
0.1584(0.35 + 1)
3
0.35(0.35 + 0.5)
= 1.31
C
4
=
z H(z)
z

z=0
=
0.1584(0 + 1)
3
(0 + 0.5)(0 0.35)
2
= 2.5861 (159)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 129 / 155
Multiple Poles Inverse ZTransform Example
Example (1.9)
We can nd C
2
as
C
2
=
d
_
(z 0.35)
2
H(z)
z
_
dz

z=0.35
= 2.3729 (160)
Thus,
H(z) =
0.05481z
z + 0.5

2.3729z
z 0.35
+
1.31z
(z 0.35)
2
+ 2.5861 (161)
Computing the inverse ZTransform, we obtain
h(n) = [0.05481(0.5)
n
2.3729(0.35)
n
] u(n)
+
_
1.31
0.35
n (0.35)
n
_
u(n) + 2.5861(n) (162)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 130 / 155
Cascade Implementation of Digital Filters
A given system transfer function for a discretetime system
H(z) =
B(z)
A(z)
=
L

k=0
b(k)
1.0 +
L

k=1
a(k)
(163)
can be represented as a product of rst order or higher order
system transfer functions such that
H(z) =
M

m=1
H
m
(z) (164)
The a(k) = 0.0 for a FIR lter.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 131 / 155
Cascade Implementation of Digital Filters
A FIR lter of order N has N poles at the origin
(p
k
= 0 1 k N).
The system transfer function coefcients for a linear, shift invariant
system are real constants.
We can factor H(z) such that
H(z) =
b(0)
L

m=1
(z q
m
)
L

m=1
(z p
m
)
(165)
The q
m
and p
m
are real or they occur in complex conjugate pairs.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 132 / 155
Cascade Implementation of Digital Filters I
We can form each H
k
(z) using one or more real q
m
or complex
conjugate pairs of q
m
so that the coefcients of all of the H
k
(z) are
also real.
A standard practice for partitioning H(z) into second order
sections is to:
Order the q
m
and p
m
in increasing (or decreasing) magnitude.
Combine the complex conjugate pairs in increasing (or decreasing)
magnitude to form second order system transfer functions.
H
k
(z) =
(z q
m
)(z q

m
)
(z p
m
)(z p

m
)
=
z
2
2(q
m
)z +

q
2
m

z
2
2(p
m
)z +|p
2
m
|
(166)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 133 / 155
Cascade Implementation of Digital Filters II
Pair real q
m
and p
m
in increasing (or decreasing) magnitude pairs
so that the q
m
and p
m
closest in magnitude are paired to form
second order system transfer functions.
H
k
(z) =
(z q
m
)(z q
m+1
)
(z p
m
)(z p
m+1
)
=
z
2
(q
m
+ q
m+1
)z + q
m
q
m+1
z
2
(p
m
+ p
m+1
)z + p
m
p
m+1
(167)
If the number of real roots is odd, then form a rst order section
using the q
m
and p
m
that are left after the above second order
sections have been formed.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 134 / 155
Cascade Implementation of Digital Filters
Pairing real roots closest in magnitude has the benet of reducing
rounding error when the coefcients are quantized.
The coefcient b(0) can be used as a multiplying constant for
H
1
(z) (or another H
k
(z)) or it can be distributed among the
second order sections.
For example, we can determine the gain for each section of the K
sections as follows.
A = |b(0)|
1
K
(168)
Then, we form

H
k
(z) = AH
k
(z) (169)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 135 / 155
Cascade Implementation of Digital Filters
It follows that
H(z) =
K

k=1

H
k
(z) = A
K
K

k=1
H
k
(z) (170)
if b(0) is positive and
H(z) =
K

k=1

H
k
(z) = A
K
K

k=1
H
k
(z) (171)
if b(0) is negative.
We can illustrate this concept using an FIR lter as an example.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 136 / 155
Cascade Implementation Example
Example (1.10)
Consider the FIR lter with system transfer function
H(z) = 0.0049 + 0.0077z
1
+ 0.0069z
2
0.1057z
3
+0.5960z
4
+ 0.5960z
5
0.1057z
6
+ 0.0069z
7
+0.0077z
8
0.0049z
9
(172)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 137 / 155
Cascade Implementation Example
Example (1.10)
We can obtain the q
m
which are the roots of H(z) as
q
1
= 3.5923
q
2
= 1.0395 +3.2775j
q
3
= 1.0395 3.2775j
q
4
= 3.2602
q
5
= 1.0000
q
6
= 0.3067
q
7
= 0.0879 +0.2772j
q
8
= 0.0879 0.2772j
q
9
= 0.2784 (173)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 138 / 155
Cascade Implementation Example
Example (1.10)
Note that the q
m
have been arranged in decreasing magnitude
order.
Using the procedure described above, we can form
H
1
(z) = (z q
2
)(z q
3
) = z
2
2.0790z + 11.8225
H
2
(z) = (z q
7
)(z q
8
) = z
2
0.1759z + 0.0846
H
3
(z) = (z q
1
)(z q
4
) = z
2
0.3321z 11.7114
H
4
(z) = (z q
6
)(z q
9
) = z
2
+ 0.0284z 0.0854
H
5
(z) = (z q
5
) = z + 1.0000 (174)
A = (0.0049)
1
5
= 0.3454 (175)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 139 / 155
Cascade Implementation Example
Example (1.10)
The corresponding difference equations with the use of A are
given by
s
1
(n) = 0.3454x(n) + 0.7182x(n 1) 4.0838x(n 2)
s
2
(n) = 0.3454s
1
(n) 0.0607s
1
(n 1) +0.0292s
1
(n 2)
s
3
(n) = 0.3454s
2
(n) 0.1147s
2
(n 1) 4.0454x
2
(n 2)
s
4
(n) = 0.3454s
3
(n) +0.0098s
3
(n 1) 0.0295s
3
(n 2)
y(n) = s
5
(n) = 0.3454s
4
(n) + 0.3454s
4
(n 1) (176)
We multiplied H
1
(z) by minus one because b(0) was negative.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 140 / 155
Stabilization of an Unstable Filter
The magnitude of a stable lter and the magnitude of an unstable
lter can have the same frequency response.
A stable digital lter will have its poles inside the unit circle such
that
|p
k
| < 1.0 1 k L (177)
for a lter with L poles.
We can stabilize an unstable lter with a pole p
m
outside the unit
circle by replacing it by its reciprocal and then adjusting the
magnitude of gain of the lter appropriately.
We will illustrate this concept using an example.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 141 / 155
Stabilization Example I
Example (1.11)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 142 / 155
Stabilization Example II
The system transfer function for an unstable discretetime system
is given by
H(z) =
B(z)
A(z)
(178)
where
B(z) = 0.4360 + 1.8677z
1
+ 3.4742z
2
+3.4742z
3
+1.8677z
4
+0.4360z
5
(179)
and
A(z) = 1.0000 + 2.4705z
1
+ 4.0048z
2
+2.9435z
3
+1.2649z
4
0.1281z
5
(180)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 143 / 155
Stabilization Example
Example (1.11)
We want to determine the system transfer function for a stable
discretetime system that has the same magnitude response as
the one given above in Equation 178.
The poles of H(z) are given by
p =
-0.6445 + 1.1156j
-0.6445 - 1.1156j
-0.6324 + 0.7262j
-0.6324 - 0.7262j
0.0832
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 144 / 155
Stabilization Example
Example (1.11)
The magnitudes of the poles are given by
|p| =
1.2883
1.2883
0.9630
0.9630
0.0832
We see that H(z) is unstable because the magnitude of the rst
two poles is 1.2883.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 145 / 155
Stabilization Example
Example (1.11)
We can write H(z) in the form
H(z) =
B(z)
(z p
1
)(z p

1
)(z p
3
)(z p

3
)(z p
5
)
(181)
where
p
1
= 0.6445 + 1.1156j
p
3
= 0.6324 + 0.7262j
p
5
= 0.0832 (182)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 146 / 155
Stabilization Example
Example (1.11)
A stable transfer function with the same magnitude response can
be determined as
H
1
(z) =
z
2
B(z)
(z
1
p
1
)(z
1
p

1
)(z p
3
)(z p

3
)(z p
5
)
(183)
Simplifying H
1
(z), we obtain
H
1
(z) =
B(z)
|p
1
|
2
(z
1
p
1
)(z
1
p

1
)(z p
3
)(z p

3
)(z p
5
)
(184)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 147 / 155
Stabilization Example
Example (1.11)
H
1
(z) =
B
1
(z)
A
1
(z)
B
1
(z) = 0.2627 + 1.1252z
1
+ 2.0931z
2
+2.0931z
3
+1.1252z
4
+0.2627z
5
A
1
(z) 1.0 + 1.9581z
1
+ 2.3420z
2
+1.2730z
3
+0.4353z
4
0.0465z
5
(185)
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 148 / 155
Stabilization Example
Example (1.11)
We can use the Matlab freqz function to compute 200 values of
the magnitude response of the original system transfer function as
given in Equation 178.
We can compute the magnitude response of the original H(z)
using the following Matlab script.
b1 = [0.4360 1.8677 3.4742 3.4742 1.8677 0.4360];
a1 = [1.0000 2.4705 4.0048 2.9435 1.2649 -0.1281];
n = 0:199;
w = n
*
pi/199;
h1 = freqz(b1, a1, w);
h1mag = abs(h1);
figure(1)
plot(w, h1mag);
print -dps stab1a.ps
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 149 / 155
Stabilization Example
Example (1.11)
Figure 28 gives the plot for the magnitude response of H(z).
Note that this magnitude response is not in decibels.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 150 / 155
Stabilization Example
Example (1.11)
0 0.5 1 1.5 2 2.5 3 3.5
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Figure: Magnitude response plot of H(z) for Example 1.11.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 151 / 155
Stabilization Example
Example (1.11)
We can use the Matlab freqz function to compute 200 values of
the magnitude response of the modied, stable system transfer
function.
We can compute the magnitude response of the original H(z)
using the following Matlab script.
b2 = [0.2627 1.1252 2.0931 2.0931 1.1252 0.2627];
a2 = [1.0000 1.9581 2.3420 1.2730 0.4353 -0.0465];
n = 0:199;
w = n
*
pi/199;
h1 = freqz(b2, a2, w);
h2mag = abs(h2);
figure(2)
plot(w, h2mag);
print -dps stab1b.ps
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 152 / 155
Stabilization Example
Example (1.11)
Figure 29 gives the plot for the magnitude response of H
1
(z).
Note that this magnitude response is not in decibels.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 153 / 155
Stabilization Example
Example (1.11)
0 0.5 1 1.5 2 2.5 3 3.5
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Figure: Magnitude response plot of H
1
(z) for Example 1.11.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 154 / 155
References
J. G. Proakis and D. G. Manolakis, Digital Signal Processing:
Principles, Algorithms and Applications.
Upper Saddle River, NJ 07458: Pearson Prentice Hall, fourth ed.,
2007.
S. K. Mitra, Digital Signal Processing: A Computer-Based
Approach.
New York, NY: McGraw Hill, third ed., 2006.
C. Williams & W. Alexander (NCSU) FUNDAMENTAL DSP CONCEPTS ECE 513, Fall 2013 155 / 155

Potrebbero piacerti anche