Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
31 views23 pages

Lecture 06-C3 SE1 24-25 Topic 05

topic

Uploaded by

nttam242004
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)
31 views23 pages

Lecture 06-C3 SE1 24-25 Topic 05

topic

Uploaded by

nttam242004
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/ 23

INS 3144 Digital Signal Processing

Lecture 06: Implementation of Digital


Signal Processing System (Topic 5)

17/10/2024 Class 03
Lecturer: Dr Ngoc Thanh Pham.
Faculty of Applied Sciences, International School, Vietnam
National. University Hanoi.
IMPLEMENTATION OF DIGITAL
SIGNAL PROCESSING SYSTEM
DIGITAL SIGNAL PROCESSING
SYSTEMS

BASIC FILTERING TYPES

DIGITAL FILTER REALIZATIONS

Dr Ngoc Thanh Pham VNUIS 2


DIGITAL SIGNAL PROCESSING
SYSTEMS

Dr Ngoc Thanh Pham VNUIS 3


DIFFERENCE EQUATION AND DIGITAL
FILTERING
❖ Express the relationship between the
input, 𝑥(𝑛), and the output, 𝑦(𝑛), of a
DSP system by
𝑦 𝑛 = 𝑏0 𝑥 𝑛 + 𝑏1 𝑥 𝑛 − 1 +
⋯ + 𝑏𝑀 𝑥 𝑛 − 𝑀 − 𝑎1 𝑦 𝑛 − 1 DSP system with input and output
− ⋯ − 𝑎𝑁 𝑦(𝑛 − 𝑁)
𝑥(𝑛 − 𝑀), and past output sequence: 𝑦(𝑛 −
▪ 𝑏𝑖 , 0 ≤ 𝑖 ≤ 𝑀 and 𝑎𝑗 , 1 ≤ 𝑗 ≤ 𝑁 represent
1), … , 𝑦(𝑛 − 𝑁).
the coefficients of the system and 𝑛 is the
𝑀 𝑁
time index
▪ DSP system output is the weighted 𝑦(𝑛) = ෍ 𝑏𝑖 𝑥(𝑛 − 𝑖) − ෍ 𝑎𝑗 𝑦(𝑛 − 𝑗).
𝑖=0 𝑗=1
summation of the current input value x(n)
➢ This process is referred to as digital
and its past values: 𝑥(𝑛 − 1), … ,
filtering

Dr Ngoc Thanh Pham VNUIS 4


DIFFERENCE EQUATION AND DIGITAL
FILTERING
Example 6.1 Solution to Example 6.1
Compute the system output ❖ System coefficients: 𝑁 = 2, 𝑀 = 1, 𝑎1 =
𝑦(𝑛) = 0.5𝑦(𝑛 − 2) + 𝑥(𝑛 − 1) 0, 𝑎2 = −0.5, 𝑏0 = 0, and 𝑏1 = 1.
for the first four samples using the following ❖ (a) Setting 𝑛 = 0, and using initial
initial conditions: conditions,
(a) Initial conditions: 𝑦(−2) = 1, 𝑦(−1) = 𝑥(0) = (0.5)0 𝑢(0) = 1
0, 𝑥(−1) = −1, and input 𝑥(𝑛) = 𝑦(0) = 0.5𝑦(−2) + 𝑥(−1) = 0.5 ⋅ 1 +
(0.5)𝑛 𝑢(𝑛). (−1) = −0.5
(b) Zero initial conditions: 𝑦(−2) = ❖ Setting 𝑛 = 1, and using the initial
0, 𝑦(−1) = 0, 𝑥(−1) = 0, and input 𝑥(𝑛) = condition 𝑦(−1) = 0,
(0.5)𝑛 𝑢(𝑛). 𝑥(1) = (0.5)1 𝑢(1) = 0.5

Dr Ngoc Thanh Pham VNUIS 5


DIFFERENCE EQUATION AND DIGITAL
FILTERING
❖ Setting 𝑛 = 1, we achieve
𝑦(1) = 0.5𝑦(−1) + 𝑥(0) = 0.5 ⋅ 0 + 1
𝑥(1) = (0.5)1 𝑢(1) = 0.5
= 1.0
𝑦(1) = 0.5𝑦(−1) + 𝑥(0) = 0 ⋅ 0 + 1 = 1.
❖ and with 𝑦(1) = 1.0, we yield
❖ Similarly, with the past output 𝑦(0) = 0,
𝑥(3) = (0.5)3 𝑢(3) = 0.125
𝑥(2) = (0.5)2 𝑢(2) = 0.25.
𝑦(3) = 0.5𝑦(1) + 𝑥(2) = 0.5 ⋅ 1 + 0.25
𝑦(2) = 0.5𝑦(0) + 𝑥(1) = 0.5 ⋅ 0 + 0.5 =
= 0.75
0.5
➢ Clearly, 𝑦(𝑛) could be recursively
❖ and with 𝑦(1) = 1, we obtain
computed for 𝑛 > 3.
𝑥(3) = (0.5)3 𝑢(3) = 0.125
(b) Setting 𝑛 = 0, we obtain
𝑦(3) = 0.5𝑦(1) + 𝑥(2) = 0.5 ⋅ 1 + 0.25 =
𝑥(0) = (0.5)0 𝑢(0) = 1
0.75Clearly, 𝑦(𝑛) could be recursively
𝑦(0) = 0.5𝑦(−2) + 𝑥(−1) = 0 ⋅ 1 + 0 = 0
computed for 𝑛 > 3.
Dr Ngoc Thanh Pham VNUIS 6
DIFFERENCE EQUATION AND TRANSFER
FUNCTION
We rewrite the digital filtering process
𝑦 𝑛 = 𝑏0 𝑥 𝑛 + 𝑏1 𝑥 𝑛 − 1 +
⋯ + 𝑏𝑀 𝑥 𝑛 − 𝑀 − 𝑎1 𝑦 𝑛 − 1
− ⋯ − 𝑎𝑁 𝑦(𝑛 − 𝑁)
❖ Assume all initial conditions of this DSP system with input and output
system are zero, taking the z-transform
𝑌 𝑧 = 𝑏0 𝑋 𝑧 + 𝑏1 𝑋 𝑧 𝑧 −1 + ⋯ numerator and denominator polynomials
+𝑏𝑀 𝑋(𝑧)𝑧 −𝑀 − 𝑎1 𝑌(𝑧)𝑧 −1 − ⋯ 𝐵(𝑧) = 𝑏0 + 𝑏1 𝑧 −1 + ⋯ + 𝑏𝑀 𝑧 −𝑀
− 𝑎𝑁 𝑌(𝑧)𝑧 −𝑁 𝐴(𝑧) = 1 + 𝑎1 𝑧 −1 + ⋯ + 𝑎𝑁 𝑧 −𝑁 .
𝑌(𝑧) 𝑏0 + 𝑏1 𝑧 −1 + ⋯ + 𝑏𝑀 𝑧 −𝑀 ❖ Difference equation → the z-transfer
𝐻(𝑧) = = function → the digital filter in the z-
𝑋(𝑧) 1 + 𝑎1 𝑧 −1 + ⋯ + 𝑎𝑁 𝑧 −𝑁
𝐵(𝑧) domain → the stability and frequency
𝐻(𝑧) = is a transfer function with its
𝐴(𝑧) response can be examined

Dr Ngoc Thanh Pham VNUIS 7


DIFFERENCE EQUATION AND TRANSFER
FUNCTION
Example 6.2 A DSP system is described by 𝑌(𝑧) 1 + 1.3𝑧 −1 + 0.36𝑧 −2
the following difference equation:
= 1 − 𝑧 −2 𝑋(𝑧)
𝑦 𝑛 =𝑥 𝑛 −𝑥 𝑛−2
Therefore, the transfer function, which is the
−1.3𝑦(𝑛 − 1) − 0.36𝑦(𝑛 − 2).
➢ Find the transfer function 𝐻(𝑧), the ratio of 𝑌(𝑧) over 𝑋(𝑧), can be found as
denominator polynomial 𝐴(𝑧), and the
𝑌(𝑧) 1 − 𝑧 −2
numerator polynomial 𝐵(𝑧). 𝐻(𝑧) = = −1 −2
.
𝑋(𝑧) 1 + 1.3𝑧 + 0.36𝑧
Solution to Example 6.2 : Taking the z- We could obtain the denominator polynomial
transform on both sides and numerator polynomial
𝑌 𝑧 = 𝑋 𝑧 − 𝑋 𝑧 𝑧 −2
𝐴(𝑧) = 1 + 1.3𝑧 −1 + 0.36𝑧 −2 , and
−1.3𝑌(𝑧)𝑧 −1 − 0.36𝑌(𝑧)𝑧 −2 .
𝐵(𝑧) = 1 − 𝑧 −2 .

Dr Ngoc Thanh Pham VNUIS 8


DIFFERENCE EQUATION AND TRANSFER
FUNCTION
Example 6.3: A digital system is described achieve
by the following difference equation: 𝑌(𝑧) = 𝑋(𝑧) − 0.5𝑋(𝑧)𝑧 −1 + 0.36𝑋(𝑧)𝑧 −2 .
𝑦(𝑛) ❖ Therefore, the transfer function, that is the
= 𝑥(𝑛) − 0.5𝑥(𝑛 − 1) + 0.36𝑥(𝑛 − 2). ratio of 𝑌(𝑧) to 𝑋(𝑧), can be found as
𝑌(𝑧)
➢ Find the transfer function 𝐻(𝑧), the 𝐻(𝑧) = = 1 − 0.5𝑧 −1 + 0.36𝑧 −2 .
𝑋(𝑧)
denominator polynomial 𝐴(𝑧), and the
❖ From the derived transfer function 𝐻(𝑧),
numerator polynomial 𝐵(𝑧).
it follows that
Solution Example 6.3. 𝐴(𝑧) = 1
❖ Taking the 𝑧-transform on both sides of 𝐵(𝑧) = 1 − 0.5𝑧 −1 + 0.36𝑧 −2 .
the previous difference equation, we

Dr Ngoc Thanh Pham VNUIS 9


DIFFERENCE EQUATION AND TRANSFER
FUNCTION
Example 6.4: denominator polynomials have the negative
Convert each of the following transfer power of z, it follows that
functions into its difference equations.
𝑧2 − 1
𝑧 2 −1 2
(a) 𝐻(𝑧) = 𝑧
𝑧 2 +1.3𝑧+0.36 𝐻 𝑧 = 2
𝑧 + 1.3𝑧 + 0.36
𝑧 2 −0.5𝑧+0.36
(b) 𝐻(𝑧) =
𝑧2
𝑧2
1 − 𝑧 −2
= −1 −2
.
Solution Example 6.4. 1 + 1.3𝑧 + 0.36𝑧
❖ We write the transfer function using the
❖ (a) Dividing the numerator and
ratio of 𝑌(𝑧) to 𝑋(𝑧) :
denominator by 𝑧 2 to obtain the transfer
function whose numerator and

Dr Ngoc Thanh Pham VNUIS 10


DIFFERENCE EQUATION AND TRANSFER
FUNCTION
𝑌(𝑧) 1 − 𝑧 −2 = 𝑥(𝑛) − 𝑥(𝑛 − 2).
= −1 −2
. ❖ Writing the output 𝑦(𝑛) in terms of inputs
𝑋(𝑧) 1 + 1.3𝑧 + 0.36𝑧
❖ Then we have and past outputs leads to
𝑌(𝑧) 1 + 1.3𝑧 −1 + 0.36𝑧 −2 𝑦 𝑛 =𝑥 𝑛 −𝑥 𝑛−2
= 𝑋(𝑧) 1 − 𝑧 −2 . −1.3𝑦(𝑛 − 1) − 0.36𝑦(𝑛 − 2).
❖ By distributing 𝑌(𝑧) and 𝑋(𝑧), we yield Thus, 𝑌(𝑧) = 𝑋(𝑧) 1 − 0.5𝑧 −1 + 0.36𝑧 −2 .
𝑌(𝑧) + 1.3𝑧 −1 𝑌(𝑧) + 0.36𝑧 −2 𝑌(𝑧) 𝑌(𝑧) = 𝑋(𝑧) − 0.5𝑧 −1 𝑋(𝑧) + 0.36𝑧 −2 𝑋(𝑧).
= 𝑋(𝑧) − 𝑧 −2 𝑋(𝑧). Applying the inverse z-transform using the
❖ Applying the inverse z-transform and shift property we obtain
using the shift property, we get 𝑦(𝑛)
𝑦 𝑛 + 1.3𝑦 𝑛 − 1 + 0.36𝑦 𝑛 − 2 = 𝑥(𝑛) − 0.5𝑥(𝑛 − 1) + 0.36𝑥(𝑛 − 2).

Dr Ngoc Thanh Pham VNUIS 11


IMPULSE RESPONSE, STEP RESPONSE, AND
SYSTEM RESPONSE
❖ The impulse response ℎ(𝑛) of the DSP ❖ The step response can be found as
system 𝐻(𝑧) can be obtained by solving −1
𝑧
𝑦(𝑛) = 𝑍 𝐻(𝑧) .
its difference equation using a unit 𝑧−1
❖ Furthermore, the 𝑧-transform of the
impulse input 𝛿(𝑛).
general system response is given by
❖ With the help of the z-transform and
𝑌(𝑧) = 𝐻(𝑧)𝑋(𝑧).
noticing that 𝑋(𝑧) = 𝑍{𝛿(𝑛)} = 1,
❖ If we know the transfer function 𝐻(𝑧)
ℎ(𝑛) = 𝑍 −1 {𝐻(𝑧)𝑋(𝑧)} = 𝑍 −1 {𝐻(𝑧)}. and 𝑧-transform of the input 𝑋(𝑧), we are
❖ Similarly, for a step input, we can able to determine the system response
determine step response assuming the 𝑦(𝑛) by finding the inverse 𝑧-transform
zero initial conditions. Letting of the output 𝑌(𝑧) :
𝑧 𝑦(𝑛) = 𝑍 −1 {𝑌(𝑧)}.
𝑋(𝑧) = 𝑍[𝑢(𝑛)] = ,
𝑧−1
Dr Ngoc Thanh Pham VNUIS 12
THE Z-PLANE POLE-ZERO PLOT AND STABILITY
z-plane pole-zero plot: A very useful tool to
analyze digital systems.
❖ a digital transfer function can be written
in the pole-zero form
𝑏0 𝑧 − 𝑧1 𝑧 − 𝑧2 ⋯ 𝑧 − 𝑧𝑀
H(𝑧) =
𝑧 − 𝑝1 𝑧 − 𝑝2 ⋯ 𝑧 − 𝑝𝑁
✓ the zeros 𝑧𝑖 can be found by solving roots
of the numerator polynomial,
✓ the poles 𝑝𝑖 can be solved for the roots of
the denominator polynomial.
z-Plane and pole-zero plot

Dr Ngoc Thanh Pham VNUIS 13


THE Z-PLANE POLE-ZERO PLOT AND STABILITY
The z-plane has the following features:
❖ The horizontal axis is the real part of the
variable z.
❖ the vertical axis represents the imaginary
part of the variable z.
❖ The z-plane is divided into two parts by a
unit circle.
❖ Each pole is marked on z-plane using the
cross symbol x
❖ each zero is plotted using the small circle
symbol o. z-Plane and pole-zero plot

Dr Ngoc Thanh Pham VNUIS 14


THE Z-PLANE POLE-ZERO PLOT AND STABILITY
Example 6.5 Given the digital transfer By setting 𝑧 2 + 1.2𝑧 + 0.45 = 0 and 𝑧 −
function 0.5 = 0, we obtain two poles
𝑝1 = −0.6 + 𝑗0.3
𝑧 −1 − 0.5𝑧 −2
𝐻(𝑧) = −1 −2
, 𝑝2 = 𝑝1∗ = −0.6 − 𝑗0.3
1 + 1.2𝑧 + 0.45𝑧
and a zero 𝑧1 = 0.5
➢ Plot poles and zeros.
we also yield the pole-zero form as
Solution to Example 6.5 𝑧 −1 − 0.5𝑧 −2
𝐻(𝑧) =
𝑧 −1 − 0.5𝑧 −2 𝑧 2 1 + 1.2𝑧 −1 + 0.45𝑧 −2
𝐻(𝑧) = (𝑧 − 0.5)
1 + 1.2𝑧 −1 + 0.45𝑧 −2 𝑧 2 = .
𝑧 − 0.5 (𝑧 + 0.6 − 𝑗0.3)(𝑧 + 0.6 + 𝑗0.3)
= 2
𝑧 + 1.2𝑧 + 0.45

Dr Ngoc Thanh Pham VNUIS 15


THE Z-PLANE POLE-ZERO PLOT AND STABILITY

The z-plane
pole-zero plot

Dr Ngoc Thanh Pham VNUIS 16


THE SYSTEM STABILITY
❖ the relationship of the sampled system in
Laplace domain and its digital system in
z-transform domain by the following
mapping
𝒛 = 𝒆𝒔𝑻
❖Substituting 𝑠 = −𝛼 ± 𝑗𝜔, 𝑧 = 𝑒 −𝛼𝑇±𝑗𝜔𝑇 .
In the polar form, we have Relationship between Laplace transform and
𝑧 = 𝑒 −𝛼𝑇 ∠ ± 𝜔𝑇 z-transform.
−𝛼𝑇 Relationship between Laplace transform and
✓ 𝛼 > 0, |𝑧| = 𝑒 < 1. Left-hand side
z-transform.
half plane (LHHP) of s-plane is mapped
to the inside of the unit circle of z-plane.
Dr Ngoc Thanh Pham VNUIS 17
THE SYSTEM STABILITY
𝒛 = 𝒆−𝜶𝑻 ∠ ± 𝝎𝑻
✓ 𝛼 > 0, |𝑧| = 𝑒 −𝛼𝑇 < 1. Left-hand side
half plane (LHHP) of s-plane is mapped
to the inside of the unit circle of z-plane.
✓ 𝛼 = 0, |𝑧| = 𝑒 −𝛼𝑇 = 1. Thus the 𝑗𝜔 axis
of the s-plane is mapped on the unit circle
of the z-plane
Mapping between s-plane and z-plane
✓ right-hand half plane (RHHP) of the s-
plane is mapped to the outside of the unit The digital system requires that its all poles
cycle in the 𝑧-plane. plotted on the z-plane must be inside the unit
circle

Dr Ngoc Thanh Pham VNUIS 18


THE SYSTEM STABILITY
We summarize the rules for determining the ❖If the outmost pole(s) is(are) first-order
stability of a DSP system as follows: pole(s) of the 𝑧-transfer function 𝐻(𝑧)
❖ If the outmost pole(s) of the z-transfer and on the unit circle on the 𝑧-plane pole-
function 𝐻(𝑧) describing the DSP system zero plot, then the system is marginally
stable.
is (are) inside the unit circle on the 𝑧-
❖If the outmost pole(s) is(are) multiple-
plane pole-zero plot, then the system is
order pole(s) of the 𝑧-transfer function
stable. 𝐻(𝑧) and on the unit circle on the 𝑧-plane
❖ If the outmost pole(s) of the 𝑧-transfer pole-zero plot, then the system is
function 𝐻(𝑧) is (are) outside the unit unstable.
circle on the 𝑧-plane pole-zero plot, the ❖The zeros do not affect the system
system is unstable. stability.

Dr Ngoc Thanh Pham VNUIS 19


THE SYSTEM STABILITY

Dr Ngoc Thanh Pham VNUIS 20


THE SYSTEM STABILITY
Example 6.6: The following transfer Solution to Example 6.6
functions describe digital systems. ❖ A zero is found to be 𝑧 = −0.5.
𝑧 + 0.5 ❖ Poles: 𝑧 = 0.5, |𝑧| = 0.5 < 1; 𝑧 =
𝐻(𝑧) =
(𝑧 − 0.5) 𝑧 2 + 𝑧 + 0.5 − 0.5 ± 𝑗0.5,
𝑧 2 + 0.25
𝐻(𝑧) = |𝑧| = (−0.5)2 + (±0.5)2 = 0.707 < 1
(𝑧 − 0.5) 𝑧 2 + 3𝑧 + 2.5
𝑧 + 0.5 ➢ Since the outmost poles are inside the
𝐻(𝑧) = unit circle, the system is stable.
(𝑧 − 0.5) 𝑧 2 + 1.4141𝑧 + 1
𝑧 2 + 𝑧 + 0.5 (b) Zeros are 𝑧 = ±𝑗0.5. Poles: 𝑧 =
𝐻(𝑧) = 0.5, |𝑧| = 0.5 < 1; 𝑧 = −1.5 ± 𝑗0.5,
(𝑧 − 1)2 (𝑧 + 1)(𝑧 − 0.6)
➢ determine the stability status for the
digital system.

Dr Ngoc Thanh Pham VNUIS 21


THE SYSTEM STABILITY
Solution to Example 6.6
|𝑧| = (1.5)2 + (±0.5)2 = 1.5811 > 1.
❖ Since we have two poles at 𝑧 = −1.5 ±
𝑗0.5, which are outside the unit circle,
the system is unstable.
c) A zero: 𝑧 = −0.5. Poles:
𝑧 = 0.5, |𝑧| = 0.5 < 1; 𝑧 = −0.707 ±
𝑗0.707,
|𝑧| = (0.707)2 + (±0.707)2 = 1

Dr Ngoc Thanh Pham VNUIS 22


THE SYSTEM STABILITY
Solution to Example 6.6
➢ Since the outmost poles are first order at
𝑧 = −0.707 ± 𝑗0.707 and are on the unit
circle, the system is marginally stable.
(d) Zeros: 𝑧 = −0.5 ± 𝑗0.5.
Poles: 𝑧 = 1, |𝑧| = 1; 𝑧 = 1, |𝑧| = 1; 𝑧 =
− 1, |𝑧| = 1; 𝑧 = 0.6, |𝑧| = 0.6 < 1.
➢ Since the outmost pole is multiple-
order (second order) pole at 𝑧 = 1 and
is on the unit circle, the system is
unstable.

Dr Ngoc Thanh Pham VNUIS 23

You might also like