LTI Discrete-Time Systems in the Transform Domain LTI Discrete

LTI DiscreteDiscrete- Time Systems in
the Transform Domain
LTI DiscreteDiscrete- Time Systems in
the Transform Domain
• An LTI discrete-time system is completely
characterized in the time-domain by its
impulse response sequence {h[n]}
• Thus, the transform-domain representation
of a discrete-time signal can also be equally
applied to the transform-domain
representation of an LTI discrete-time
system
• Such transform-domain representations
provide additional insight into the behavior
of such systems
• It is easier to design and implement these
systems in the transform-domain for certain
applications
• We consider now the use of the DTFT and
the z-transform in developing the transformdomain representations of an LTI system
1
Copyright © 2001, S. K. Mitra
2
Finite-Dimensional LTI
FiniteDiscrete-- Time Systems
Discrete
Finite-Dimensional LTI
FiniteDiscrete-- Time Systems
Discrete
• Applying the DTFT to the difference
equation and making use of the linearity and
the time-invariance properties of Table 3.2
we arrive at the input-output relation in the
transform-domain as
• In this course we shall be concerned with
LTI discrete-time systems characterized by
linear constant coefficient difference
equations of the form:
N
M
k=0
k=0
Copyright © 2001, S. K. Mitra
N
∑ dk y[n − k ] = ∑ pk x[n − k ]
∑ dke
M
− jω k
Y (e j ω ) = ∑ pk e − jω k X (e j ω )
k =0
k =0
jω
jω
whereY (e ) and X ( e ) are the DTFTs of
y[n] and x[n], respectively
3
Copyright © 2001, S. K. Mitra
4
Finite-Dimensional LTI
FiniteDiscrete-- Time Systems
Discrete
Finite-Dimensional LTI
FiniteDiscrete-- Time Systems
Discrete
• Applying the z-transform to both sides of
the difference equation and making use of
the linearity and the time-invariance
properties of Table 3.9 we arrive at
• In developing the transform-domain
representation of the difference equation, it
has been tacitly assumed that X (e jω ) and
Y ( e j ω ) exist
• The previous equation can be alternately
written as
 N

 M

 ∑ d k e − j ω k Y ( e j ω ) =  ∑ pk e − j ω k  X ( e j ω )
 k =0

 k =0

5
Copyright © 2001, S. K. Mitra
Copyright © 2001, S. K. Mitra
N
∑ dk z
k=0
6
−k
Y(z ) =
M
∑ pk z
−k
X (z )
k =0
where Y(z) and X(z) denote the z-transforms
of y[n] and x[n] with associated ROCs ,
respectively
Copyright © 2001, S. K. Mitra
1
Finite--Dimensional LTI
Finite
Discrete- Time Systems
Discrete-
The Frequency Response
• A more convenient form of the z-domain
representation of the difference equation is
given by
 N

 M

 ∑ d k z − k Y ( z ) =  ∑ pk z− k  X ( z )
 k=0

 k=0

7
Copyright © 2001, S. K. Mitra
8
Copyright © 2001, S. K. Mitra
The Frequency Response
The Frequency Response
• An important property of an LTI system is
that for certain types of input signals, called
eigen functions , the output signal is the
input signal multiplied by a complex
constant
• We consider here one such eigen function
as the input
• Consider the LTI discrete-time system with
an impulse response {h[n]} shown below
9
Copyright © 2001, S. K. Mitra
x[n]
h[n]
y[n]
• Its input-output relationship in the timedomain is given by the convolution sum
y[ n] =
10
The Frequency Response
∞
∑ h[k ] x[ n − k ]
k = −∞
Copyright © 2001, S. K. Mitra
The Frequency Response
• If the input is of the form
• Then we can write
x[ n] = e jω n , − ∞ < n < ∞
y[ n] = H ( e j ω ) e j ω n
then it follows that the output is given by
∞
 ∞

y[ n] = ∑ h[ k ] e jω (n −k ) =  ∑ h[k ] e − j ω k  e jω n
 k = −∞

k = −∞
• Let
∞
H (e j ω ) = ∑ h[ k ] e − j ω k
11
• Most discrete-time signals encountered in
practice can be represented as a linear
combination of a very large, maybe infinite,
number of sinusoidal discrete-time signals
of different angular frequencies
• Thus, knowing the response of the LTI
system to a single sinusoidal signal, we can
determine its response to more complicated
signals by making use of the superposition
property
k = −∞
Copyright © 2001, S. K. Mitra
• Thus for a complex exponential input signal
e j ω n , the output of an LTI discrete-time
system is also a complex exponential signal
of the same frequency multiplied by a
complex constant H (e jω )
• Thus e jω n is an eigen function of the system
12
Copyright © 2001, S. K. Mitra
2
The Frequency Response
The Frequency Response
• H (e jω ) , in general, is a complex function
of ω with a period 2π
• It can be expressed in terms of its real and
imaginary parts
H (e j ω ) = H re (e j ω ) + j Him (e j ω )
jω
• The quantity H (e ) is called the frequency
response of the LTI discrete-time system
• H (e jω ) provides a frequency-domain
description of the system
• H (e jω ) is precisely the DTFT of the impulse
response {h[n]} of the system
13
Copyright © 2001, S. K. Mitra
or, in terms of its magnitude and phase,
H (e jω ) = H (e jω ) e jθ (ω)
where
θ (ω) = arg H ( e j ω )
14
The Frequency Response
The Frequency Response
• The function H (e jω ) is called the
magnitude response and the function θ (ω)
is called the phase responseof the LTI
discrete-time system
• Design specifications for the LTI discretetime system, in many applications, are
given in terms of the magnitude response or
the phase response or both
15
17
Copyright © 2001, S. K. Mitra
Copyright © 2001, S. K. Mitra
• In some cases, the magnitude function is
specified in decibels as
G( ω) = 20 log10 H (e jω ) dB
where G(ω) is called the gain function
• The negative of the gain function
A ( ω) = − G(ω)
is called the attenuation or loss function
16
Copyright © 2001, S. K. Mitra
The Frequency Response
The Frequency Response
• Note: Magnitude and phase functions are
real functions of ω, whereas the frequency
response is a complex function of ω
• If the impulse responseh[n] is real then it
follows from Table 3.4 that the magnitude
function is an even function of ω:
H (e j ω ) = H ( e − j ω )
and the phase function is an odd function of
ω:
θ (ω) = −θ (−ω)
• Likewise, for a real impulse response h[n],
H re (e j ω ) is even and H im( e j ω ) is odd
• Example - Consider the M-point moving
average filter with an impulse response
given by
h[n] = 1 / M , 0 ≤ n ≤ M −1
otherwise
 0,
• Its frequency response is then given by
Copyright © 2001, S. K. Mitra
M −1
H (e jω ) = M1 ∑ e − jω n
18
n =0
Copyright © 2001, S. K. Mitra
3
The Frequency Response
The Frequency Response
∞
∞
• Or, H (e jω ) = 1  ∑ e − jω n − ∑ e − jω n 
M
 n=0

n= M
− jMω
∞
1
−
e


= 1  ∑ e − jω n 1 − e − jMω = 1 ⋅
M
M 1 − e − jω

n =0
=
19
)
1 sin( M ω / 2) − j ( M −1 )ω / 2
⋅
e
M sin( ω / 2 )
θ (ω) = −
Copyright © 2001, S. K. Mitra
20
Frequency Response
Computation Using MATLAB
Copyright © 2001, S. K. Mitra
• Example - Program 4_1 can be used to
generate the magnitude and gain responses
of an M-point moving average filter as
shown below
M=5
M=14
50
Magnitude
0.6
0.4
0.2
22
0
0
0
-50
-100
M=5
M=14
-150
0.2
0.4
ω/π
0.6
0.8
1
-200
0
0.2
0.4
0.6
0.8
Copyright ω/π
© 2001, S. K. Mitra
1
Frequency Response
Computation Using MATLAB
• To this end the function unwrap can be
used, provided the computed phase is in
radians
• The jumps by the amount of 2π should not
be confused with the jumps caused by the
zeros of the frequency response as indicated
in the phase response of the moving average
filter
• The phase response of a discrete-time
system when determined by a computer
may exhibit jumps by an amount 2π caused
by the way the arctangent function is
computed
• The phase response can be made a
continuous function of ω by unwrapping the
phase response across the jumps
Copyright © 2001, S. K. Mitra
100
1
0.8
Frequency Response
Computation Using MATLAB
23
Copyright © 2001, S. K. Mitra
Frequency Response
Computation Using MATLAB
• The function freqz(h,w) can be used to
determine the values of the frequency
response vectorh at a set of given
frequency points w
• Fromh, the real and imaginary parts can be
computed using the functions real and
imag, and the magnitude and phase
functions using the functions abs and
angle
21
( M −1)ω M/2
2π k
+ π ∑µ ( ω − M )
2
k =0
Phase, degrees
(
• Thus, the magnitude responseof the M-point
moving average filter is given by
sin(Mω / 2 )
H (e jω ) = 1 ⋅
M sin(ω / 2)
and the phase response is given by
24
Copyright © 2001, S. K. Mitra
4
Steady--State Response
Steady
Steady--State Response
Steady
• Note that the frequency response also
determines the steady-state response of an
LTI discrete-time system to a sinusoidal
input
• Example - Determine the steady-state
output y[n] of a real coefficient LTI
discrete-time system with a frequency
response H (e jω) for an input
• We can express the input x[n] as
x[ n] = g[ n] + g * [n ]
where
2
• Now the output of the system for an input
e jωon is simply
H (e jωo )e jωon
x[ n] = A cos(ωon + φ), − ∞ < n < ∞
25
Copyright © 2001, S. K. Mitra
26
Copyright © 2001, S. K. Mitra
Steady--State Response
Steady
Steady--State Response
Steady
• Because of linearity, the responsev[n] to an
input g[n] is given by
v [n] =
• Combining the last two equations we get
y[ n] = v[n ] + v * [ n]
1 Ae jφH (e jω o )e jωo n
2
= 1 Ae jφ H ( e jωo )e jωon + 1 Ae − jφ H (e − jωo )e − jωon
2
2
Copyright © 2001, S. K. Mitra
28
• The expression for the steady-state response
developed earlier assumes that the system is
initially relaxed before the application of
the input x[n]
• In practice, excitation x[n] to a discrete-time
system is usually a right-sided sequence
applied at some sample index n = no
• We develop the expression for the output
for such an input
• Thus, the output y[n] has the same sinusoidal
waveform as the input with two differences:
(1) the amplitude is multiplied by H ( e jωo ),
the value of the magnitude function at ω = ωo
(2) the output has a phase lag relative to the
input by an amount θ (ω o ), the value of the
phase function at ω = ω o
Copyright © 2001, S. K. Mitra
Copyright © 2001, S. K. Mitra
Response to a Causal
Exponential Sequence
Steady--State Response
Steady
29
2
= 1 A H (e j ωo ) {e jθ(ωo )e jφe j ωo n +e − jθ(ωo )e− j φe − j ωon }
2
= 1 A H ( e jωo ) cos(ωo n + θ ( ωo ) + φ )
2
• Likewise, the output v*[n] to the input g*[n]
is
v * [ n] = 1 Ae − jφ H (e − jωo )e − jωon
27
g [n ] = 1 Ae jφe jωon
30
Copyright © 2001, S. K. Mitra
5
Response to a Causal
Exponential Sequence
Response to a Causal
Exponential Sequence
• Without any loss of generality, assume x[ n] = 0
for n < 0
• From the input-output relation
y[ n] = ∑∞
k = −∞ h[ k ] x[ n − k ]
we observe that for an input
 n
• Or, y[ n] =  ∑ h[k ] e − jωk
 k=0
x[ n] = e jωnµ[n ]
31
the output is given by
 n
y[ n] =  ∑ h[ k ] e jω( n− k )
 k=0

 µ[ n]
 Copyright © 2001, S. K. Mitra
32
Response to a Causal
Exponential Sequence
• Or,
 ∞
y[ n] = H (e jω ) e jωn −  ∑ h[k ] e − jωk
 k = n+1
33
y sr[ n] = H ( e
)e
ytr [n ] =
jωn
34
Response to a Causal
Exponential Sequence
Copyright © 2001, S. K. Mitra
∞
∑ h[k ] e− jω( k −n )
k =n +1
≤
∞
∞
k = n+1
k =0
∑ h[ k ] ≤ ∑ h[ k ]
Copyright © 2001, S. K. Mitra
Response to a Causal
Exponential Sequence
• For a causal, stable LTI IIR discrete-time
system, h[n] is absolutely summable
• As a result, the transient response ytr [n ] is a
bounded sequence
• Moreover, as n → ∞ ,
∑∞k =n +1 h[ k] → 0
and hence, the transient response decays to
zero as n gets very large
35
 jωn
 e

Copyright © 2001, S. K. Mitra
• The second term on the RHS is called the
transient response:
 ∞

ytr [n ] = −  ∑ h[ k ] e − jωk  e jωn
 k = n+1

• To determine the effect of the above term
on the total output response, we observe
 jωn
 e

Copyright © 2001, S. K. Mitra
• The output forn < 0 is y[n] = 0
• The output for n ≥ 0 is given by
 n

y[ n] =  ∑ h[k ] e − jωk  e jωn
 k =0

 ∞
 jωn  ∞
−
j
ω
k
 e
=  ∑ h[k ] e
−  ∑ h[k ] e − jωk
 k =0

 k = n+1
Response to a Causal
Exponential Sequence
• The first term on the RHS is the same as
that obtained when the input is applied at
n = 0 to an initially relaxed system and is
the steady-state response:
jω
 jωn
 e µ[n ]

• For a causal FIR LTI discrete-time system
with an impulse response h[n] of length
N + 1, h[n] = 0 forn > N
• Hence, ytr [n ] = 0 for n > N − 1
• Here the output reaches the steady-state
value ysr[ n] = H ( e jω )e jωn at n = N
36
Copyright © 2001, S. K. Mitra
6
The Concept of Filtering
The Concept of Filtering
• One application of an LTI discrete-time
system is to pass certain frequency
components in an input sequence without
any distortion (if possible) and to block
other frequency components
• Such systems are called digital filters and
one of the main subjects of discussion in
this course
37
Copyright © 2001, S. K. Mitra
• The key to the filtering process is
π
x[ n] = 21π ∫ X (e jω ) e jω n dω
−π
• It expresses an arbitrary input as a linear
weighted sum of an infinite number of
exponential sequences, or equivalently, as a
linear weighted sum of sinusoidal sequences
38
The Concept of Filtering
The Concept of Filtering
• Thus, by appropriately choosing the values
of the magnitude function H ( e jω ) of the
LTI digital filter at frequencies
corresponding to the frequencies of the
sinusoidal components of the input, some of
these components can be selectively heavily
attenuated or filtered with respect to the
others
• To understand the mechanism behind the
design of frequency-selective filters,
consider a real-coefficient LTI discrete-time
system characterized by a magnitude
function
1,
ω ≤ ωc
H (e jω ) ≅ 
 0, ωc < ω ≤ π
39
Copyright © 2001, S. K. Mitra
40
The Concept of Filtering
• As
H (e jω1 ) ≅ 1,
0 < ω1 < ω c < ω 2 < π
to this system
• Because of linearity, the output of this
system is of the form
y[ n] =
A H (e jω1 )
Copyright © 2001, S. K. Mitra
The Concept of Filtering
• We apply an input
x[n ] = A cos ω1n + B cos ω 2 n,
y[ n] ≅ A H ( e jω1 ) cos (ω1n + θ (ω1 ))
• Thus, the system acts like a lowpass filter
• In the following example, we consider the
design of a very simple digital filter
cos (ω1n + θ( ω1) )
Copyright © 2001, S. K. Mitra
H (e jω 2 ) ≅ 0
the output reduces to
+ B H (e jω2 ) cos (ω2 n + θ (ω 2 ))
41
Copyright © 2001, S. K. Mitra
42
Copyright © 2001, S. K. Mitra
7
The Concept of Filtering
The Concept of Filtering
• Example - The input consists of a sum of two
sinusoidal sequences of angular frequencies
0.1 rad/sample and 0.4 rad/sample
• We need to design a highpass filter that will
pass the high-frequency component of the
input but block the low-frequency component
• For simplicity, assume the filter to be an FIR
filter of length 3 with an impulse response:
h[0] = h[2] = α,
h[1] = β
43
Copyright © 2001, S. K. Mitra
• The convolution sum description of this
filter is then given by
y[ n] = h[0] x[n ] + h[1] x[n −1] + h[ 2] x[n − 2]
= α x[ n] + β x[ n − 1] + α x[n − 2]
44
• y[n] and x[n] are, respectively, the output
and the input sequences
• Design Objective : Choose suitable values
of α and β so that the output is a sinusoidal
sequence with a frequency 0.4 rad/sample
Copyright © 2001, S. K. Mitra
The Concept of Filtering
The Concept of Filtering
• The magnitude and phase functions are
H (e jω ) = 2α cos ω + β
θ (ω ) = −ω
• Now, the frequency response of the FIR
filter is given by
H (e jω) = h[ 0] + h[1] e − jω + h[ 2] e − j 2ω
= α(1 + e − j2ω ) + β e − jω
 e jω + e − jω  − jω
e
= 2 α
+ β e − jω
2


• In order to block the low-frequency
component, the magnitude function at
ω = 0.1 should be equal to zero
• Likewise, to pass the high-frequency
component, the magnitude function at
ω = 0.4 should be equal to one
= ( 2α cos ω + β)e − jω
45
Copyright © 2001, S. K. Mitra
46
The Concept of Filtering
Copyright © 2001, S. K. Mitra
The Concept of Filtering
• Thus, the two conditions that must be
satisfied are
H (e j0. 1) = 2α cos(0. 1) + β = 0
• Thus the output-input relation of the FIR
filter is given by
y[ n] = −6.76195 ( x[ n] + x[n − 2]) + 13. 456335 x[n − 1]
where the input is
x[ n] = {cos(0.1n) + cos(0. 4n)}µ[ n]
H (e j 0. 4 ) = 2α cos( 0. 4) + β = 1
• Solving the above two equations we get
α = −6.76195
β = 13.456335
47
Copyright © 2001, S. K. Mitra
• Program 4_2 can be used to verify the
filtering action of the above system
48
Copyright © 2001, S. K. Mitra
8
The Concept of Filtering
The Concept of Filtering
• Figure below shows the plots generated by
running this program
• The first seven samples of the output are
shown below
4
y[n]
x 2[n]
x 1[n]
Amplitude
3
2
1
0
-1
49
0
20
40
60
Time index n
80
100
Copyright © 2001, S. K. Mitra
50
The Concept of Filtering
The Concept of Filtering
• From this table, it can be seen that,
neglecting the least significant digit,
y[ n] = cos(0.4( n − 1))
for n ≥ 2
• Computation of the present value of the
output requires the knowledge of the
present and two previous input samples
• Hence, the first two output samples, y[0]
and y[1], are the result of assumed zero
input sample values at n = − 1 and n = −2
51
Copyright © 2001, S. K. Mitra
Copyright © 2001, S. K. Mitra
• Therefore, first two output samples
constitute the transient part of the output
• Since the impulse response is of length 3,
the steady-state is reached at n = N = 2
• Note also that the output is delayed version
of the high-frequency component cos(0.4n)
of the input, and the delay is one sample
period
52
Copyright © 2001, S. K. Mitra
9