Transcript Document
Linear Constant-coefficient
Difference Equations
N
M
k 0
m 0
ak yn k bm xn m
for all n
An important subclass of linear time-invariant
systems consist of those system for which the
input x[n] and output y[n] satisfy an Nth-order
linear constant-coefficient difference equation.
A general form is shown above.
Signal Flow Graph of the
Difference Equation
Assume that a0 = 1. Let TD denote one-sample delay.
x[n]
b0
+
+
y[n]
TD
TD
b1
x[n-1]
+
+
a1
TD
TD
b2
x[n-2]
+
+
a2
y[n-2]
TD
TD
x[n-M]
y[n-1]
bM
+
+
aN
y[n-N]
Difference Equation: FIR
system
The assumption a0 = 1 can be always achieved
by dividing all the coefficients by a0 if a00.
The difference equation characterizes a
recursive way of obtaining the output y[n] from
the input x[n].
When ak = 0 for k = 1 … N, the difference
equation degenerates to a FIR system.
The output consists of a linear combination of finite
inputs.
M
yn
bm xn m
m 0
Difference equation: IIR
System
When bm are not all zeros for m = 1 … M, the
difference equation degenerates to
N
yn x0 ak yn k
k 1
This causes an IIR system
The effect of an impulse response sequence applied
to the input keeps on circulating around the feedback
loops indefinitely.
Accumulator
Example
n
yn xk
k
xn
n 1
xk xn yn 1
k
Example (continue)
Moving average system when M1=0:
The impulse response is h[n] = u[n] u[nM2 1]
yn
M2
xn k
M 2 1
1
k 0
Also, note that
yn yn 1
1
M 2 1
xn xn M 2 1
The term y[n] y[n1] suggests the implementation
can be cascaded with an accumulator.
Moving Average System
Hence, there are at least two difference equation
representations of the moving average system. First,
x[n]
b
+
b
+
y[n]
TD
x[n-1]
TD
x[n-2]
b
+
b
+
TD
x[n-M]
where b = 1/ (M2+1)
and TD denotes onesample delay
Moving Average System
(continue)
Second,
The first representation is FIR, and the second
is IIR.
Solution of Difference
Equation
Just as differential equations for continuous-time
systems, a linear constant-coefficient difference
equation for discrete-time systems does not provide a
unique solution if no additional constraints are
provided.
Solution: y[n] = yp[n] + yh[n]
yh[n]: homogeneous solution obtained by setting all the
inputs as zeros.
N
ak yn k 0
k 1
yh[n]: a particular solution satisfying the difference equation.
Solution of Difference
Equation
Additional constraints: consider the N auxiliary
conditions that y[-1], y[-2], …, y[-N] are given.
The other values of y[n] (n0) can be generated by
N
M
ak
bm
yn
yn k
xn m
k 1 a0
m 0 a0
when x[n] is available, y[1], y[2], … y[n], … can be
computed recursively.
To generate values of y[n] for n<N recursively,
N 1
M
ak
bk
yn N
yn k
xn m
k 1 a N
m 0 a N
Example of the Solution
Consider the difference equation
y[n] = ay[n-1] + x[n].
Assume the input is x[n] =K [n], and the auxiliary
condition is y[1] = c.
2
Hence, y[0] = ac+K, y[1] = a y[0]+0 = a c+aK, …
n+1c+anK, for n0.
Recursively, we found that y[n] = a
1
1
For n<1, y[-2] = a (y[1] x[1] ) = a c,
y[2] = a1 y[1] = a2 c, …, and y[n] = an+1c for n<1.
Hence, the solution is
y[n] = an+1c+Kanu[n],
Example of the Solution
(continue)
The recursively-implemented system for finding the
solution is non-causal.
The solution system is non-linear:
When K=0, i.e., the input is zero, the solution (system
response) y[n] = an+1c.
Since a linear system requires that the output be zero for
all time when the input is zero for all time.
The solution system is not shift invariant:
when input were shifted by n0 samples, x1[n] =K [n - n0],
the output is y1[n] = an+1c+Kann0 u[n - n0].
LTI solution
Our principal interest in the text is in systems that
are linear and time invariant.
How to make the recursively-implemented solution
system be LTI?
Initial-rest condition:
If the input x[n] is zero for n less than some time n0, the
output y[n] is also zero for n less than n0.
The previous example does not satisfy this condition since
x[n] = 0 for n<0 but y[1] = c.
Property: If the initial-rest condition is satisfied, then
the system will be LTI and causal.
Frequency-Domain Representation of
Discrete-time Signals and Systems
Eigen function of a LTI system
When apply an eigenfunction as input, the output is the
same function multiplied by a constant.
x[n] = ejwn is the eigenfunction of all LTI systems.
Let h[n] be the impulse response of an LTI system, when
ejwn is applied as the input,
yn
jwn k
jwn
h
k
e
e
k
jwk
h
k
e
k
Eigenfunction of LTI
hk e
Let H e jw
k
jwk
we have y n H e e
consequently, ejwn is the eigenfunction of the
system, and the associated eigenvalue is H(ejw).
We call H(ejw) the LTI system’s frequency
response that consists of the real and
imaginary parts, H(ejw) = HR(ejw) + jHI(ejw), or in
terms of magnitude and phase,
jw
jwn
H e e
He
jw
jw
jH e jw
Example of Frequency
Response
Frequency response of the ideal delay system,
y[n] =x[n nd],
If we consider x[n] = ejwn as input, then
yn e jwnnd e jwnd e jwn
Hence, the frequency response is
e
He
jw
jwnd
The magnitude and phase are
1,
He
jw
wn
H e
jw
d
Linear Combination
When a signal can be represented as a linear
combination of complex exponentials:
xn k e
jwk n
k
By the principle of superposition, the output is
yn k H e jwk e jwk n
k
Thus, we can find the output if we know the
frequency response of the system.
Example of Linear Combination
Sinusoidal responses of LTI systems:
A j jw0n A j jw0n
xn A cosw0 n e e
e e
x1n x2 n
2
2
The response of x1[n] and x2[n] are
y1n H e jw0 A / 2e j e jw0n
y2 n H e jw0 A / 2e j e jw0n
If h[n] is real, it can be shown that H(e-jw0) = H*(ejw0), the
total response y[n] = y1[n] + y2[n] is
yn A H e jw0 cosw0 n , where H e jw0
Difference to Continuous-time
System Response
For a continuous-time system, the frequency
response is not necessarily to be periodic.
However, for a discrete-time system, the frequency
response is always periodic with period 2, since
hk e
H e jw
k
jwk
j w 2 k
j w 2
h
k
e
H
e
k
Because H(ejw) is periodic with period 2, we need only
specify H(ejw) over an interval of length 2, eg., [0, 2] or
[, ]. For consistency, we choose the interval [, ].
The inherent periodicity defines the frequency response
everywhere outside the chosen interval.
Ideal Frequency-selective Filters
The “low frequencies” are frequencies close to zero,
while the “high frequencies” are those close to .
Since that the frequencies differing by an integer multiple
of 2 are indistinguishable, the “low frequency” are those
that are close to an even multiple of , while the “high
frequencies” are those close to an odd multiple of .
Ideal frequency-selective filters:
An important class of linear-invariant systems includes
those systems for which the frequency response is unity
over a certain range of frequencies and is zero at the
remaining frequencies.
Frequency Response of Ideal
Low-pass Filter
Frequency Response of Ideal
High-pass Filter
Frequency Response of Ideal
Band-stop Filter
Frequency Response of Ideal
Band-pass Filter
Frequency Response of the
Moving-average System
The impulse response of the moving-average
system is
1
M1 n M 2
hn M 1 M 2 1
0
otherwise
Therefore, the frequency response is
M2
1
H e jw
e jwn
M 1 M 2 1 n M1
By noting that the following formula holds:
n
m 1
k
1 , m n
k n
m
Frequency Response of the Movingaverage System (continue)
H e jw
1
e jwM1 e jwM 2 1
M1 M 2 1
1 e jw
1
e jwM1 M 2 1 / 2 e jwM1 M 2 1 / 2
M1 M 2 1
1
M1 M 2 1
1 e jw
e jwM1 M 2 1 / 2 e jwM1 M 2 1 / 2
e jwM 2 M1 1 / 2
e jwM 2 M1 / 2
e jw / 2 e jw / 2
sin jwM 1 M 2 1 / 2 jwM 2 M1 / 2
1
e
M1 M 2 1
sinw / 2
exp
He
jw
jH e jw
(magnitude and phase)
Frequency Response of the Movingaverage System (continue)
M1 = 0 and M2 = 4
Amplitude
response
Phase
response
2w
Suddenly Applied Complex
Exponential Inputs
In practice, we may not apply the complex
exponential inputs ejwn to a system, but the more
practical-appearing inputs of the form
x[n] = ejwn u[n]
i.e., complex exponentials that are suddenly applied at an
arbitrary time, which for convenience we choose n=0.
Consider its output to a causal LTI system:
0
n
yn hk xn k hk e jwk e jwn
k
k
0
n0
n0
Suddenly Applied Complex
Exponential Inputs (continue)
We consider the output for n 0.
jwn
jwk
jwn
jwk
e
e
yn hk e
hk e
k 0
k n 1
jw jwn
jwk jwn
He e
hk e
e
k
n
1
Hence, the output can be written as y[n] = yss[n] + yt[n],
where
y ss n H e jw e jwn
Steady-state response
yt n
hk e jwk e jwn
k n 1
Transient response
Suddenly Applied Complex
Exponential Inputs (continue)
If h[n] = 0 except for 0 n M (i.e., a FIR system),
then the transient response yt[n] = 0 for n+1 > M.
That is, the transient response becomes zero
since the time n = M. For n M, only the steadystate response exists.
For infinite-duration impulse response (i.e., IIR)
yt n
jwk jwn
h
k
e
e
k n 1
hk Qn
k n 1
For stable system, Qn must become increasingly
smaller as n , and so is the transient response.
Suddenly Applied Complex
Exponential Inputs (continue)
Illustration for the FIR case by convolution
Suddenly Applied Complex
Exponential Inputs (continue)
Illustration for the IIR case by convolution
Representation of Sequences by
Fourier Transforms
Fourier Representation: representing a signal by
complex exponentials.
1
xn
2
X e jw e jwn dw
xne
X e
jw
n
jwn
Inverse Fourier
transform
Fourier transform (or forward
Fourier transform)
A signal x[n] is represented as the Fourier integral of the
complex exponentials in the range of frequencies [, ].
The weight X(ejw) of the frequency applied in the integral can
be determined by the input signal x[n], and X(ejw) reveals
how much of each frequency is required to synthesize x[n].
Representation of Sequences by
Fourier Transforms (continue)
X e jw X e jw e jX e
jw
The phase X(ejw) is not uniquely specified since any
integer multiple of 2 may be added to X(ejw) at any
value of w without affecting the result.
Denote ARG[X(ejw)] to be the phase value in [, ].
Since the frequency response of a LTI system is the Fourier
transform of the impulse response, the impulse response
can be obtained from the frequency response by applying
the inverse Fourier transform integral:
1
hn
2
H e e
jw
jwn
dw
Existence of Fourier Transform
Pairs
Whey they are transform pairs? Consider the integral
1
jwm jwn
xˆ n
xme
e dw
2 m
1
xm
2
m
1
Since
2
e
jwn m
e
jwn m
dw
sin n m 1 m n
dw
n m
n m
0 m n
xˆ n
xm n m xn
m
Conditions for the Existence of
Fourier Transform Pairs
Conditions for the existence of Fourier transform pairs
of a signal:
Absolutely summable
xn
n
Mean-square convergence:
lim
M
X e jw X M e jw
2
xne
dw 0 , for X M e jw
M
jwn
n M
In other words, the error |X(ejw) XM(ejw) | may not approach
for each w, but the total “energh” in the error does.
Conditions for the Existence of
Fourier Transform Pairs (continue)
Still some other cases that are neither absolutely
summable nor mean-square convergence, the Fourier
transform still exist:
Eg., Fourier transform of a constant, x[n] = 1 for all n,
is an impulse train:
2 w 2r
X e jw
r
The impulse of the continuous case is a “infinite heigh, zero
width, and unit area” function. If some properties are
defined for the impulse function, then the Fourier transform
pair involving impulses can be well defined too.
Conditions for the Existence of
Fourier Transform Pairs (continue)
Properties of continuous impulse function:
w 0 for w 0 ,
wdw 1, w0 f wdw f w0
Eg., consider a sequence whose Fourier transform is
the periodic impulse train
jw
2 w w
Xe
0
2r
r
then the sequence is a complex exponential sequence (note
that extends only over one period, from, we need include
the term)
1
xn
2
2 w w0 e
jwn
dw e
jw0 n
Symmetry Property of the Fourier
Transform
Conjugate-symmetric sequence: xe[n] = xe*[n]
Conjugate-asymmetric sequence: xo[n] = xo*[n]
If a real sequence is conjugate symmetric, then it is
called an even sequence satisfying xe[n] = xe[n].
If a real sequence is conjugate antisymmetric, then it is
called an odd sequence satisfying x0[n] = x0[n].
Any sequence can be represented as a sum of a
conjugate-symmetric and asymmetric sequences,
x[n] = xe[n] + xo[n], where xe[n] = (1/2)(x[n]+ x*[n])
and xo[n] = (1/2)(x[n] x*[n]).
Symmetry Property of the Fourier
Transform (continue)
Similarly, a Fourier transform can be decomposed
into a sum of conjugate-symmetric and antisymmetric parts:
X(ejw) = Xe(ejw) + Xo(ejw) ,
where
Xe(ejw) = (1/2)[X(ejw) + X*(ejw)]
and
Xo(ejw) = (1/2)[X(ejw) X*(ejw)]
Symmetry Property of the Fourier
Transform (continue)
Fourier Transform Pairs (if x[n] X(ejw))
x*[n] X*(e jw)
x*[n] X*(ejw)
Re{x[n]} Xe(ejw) (conjugate-symmetry part of X(ejw))
jIm{x[n]} Xo(ejw) (conjugate anti-symmetry part of X(ejw))
xe[n] (conjugate-symmetry part of x[n]) XR(ejw) = Re{X(ejw)}
xo[n] (conjugate anti-symmetry part of x[n])
jXI(ejw) = jIm{X(ejw)}
Symmetry Property of the Fourier
Transform (continue)
Fourier Transform Pairs (if x[n] X(ejw))
Any real xe[n] X(ejw) = X*(ejw) (Fourier transform is
conjugate symmetric)
Any real xe[n] XR(ejw) = XR(ejw) (real part is even)
Any real xe[n] XI(ejw) = XI(ejw) (imaginary part is odd)
Any real xe[n] |XR(ejw)| = |XR(ejw)| (magnitude is even)
Any real xe[n] XR(ejw)= XR(ejw) (phase is odd)
xo[n] (even part of real x[n]) XR(ejw)
xo[n] (odd part of real x[n]) jXI(ejw)
Example of Symmetry Properties
The Fourier transform of the real sequence x[n] = anu[n]
for a < 1 is
1
jw
Xe
1 ae jw
Its magnitude is an even function, and phase is odd.
Fourier Transform Theorems
Linearity
x1[n] X1(ejw), x2[n] X2(ejw)
implies that
a1x1[n] + a2x2[n] a1X1(ejw) + a2X2(ejw)
Time shifting
x[n] X(ejw)
implies that
xn nd e
jwnd
Xe
jw
Fourier Transform Theorems
(continue)
Frequency shifting
x[n] X(ejw)
implies that
e jw0n xn X e j ww0
Time reversal
x[n] X(ejw)
If the sequence is time reversed, then x[n] X(ejw)
Furthermore, if x[n] is real then x[n] X*(ejw), since X(ejw)
is conjugate symmetric.
Fourier Transform Theorems
(continue)
Differentiation in frequency
x[n] X(ejw)
implies that
dX e jw
nxn j
dw
Parseval’s theorem
x[n] X(ejw)
implies that
E
xn
n
2
1
2
X e
jw
2
dw
Fourier Transform Theorems
(continue)
The convolution theorem
x[n] X(ejw) and h[n] H(ejw),
and if y[n] = x[n] h[n], then
Y(ejw) = X(ejw)H(ejw)
The modulation or windowing theorem
x[n] X(ejw) and w[n] W(ejw),
and if y[n] = x[n]w[n], then
Ye
jw
1
2
X e W e
j
j w
d
a periodic
convolution
Fourier Transform Pairs
n 1
n n0 e
jwn0
1 ( n )
2 w 2k
k
a un ( a 1)
n
1
jw
1 ae
Fourier Transform Pairs (continue)
un
1
jw
1 ae
w 2k
k
n 1a un ( a 1)
n
r n sinw p n 1
sinw p
1
1 ae
jw 2
un ( r 1)
1
1 2r cos w p e jw r 2 e j 2 w
1
w wc
sinwc n
jw
X e
n
0 wc w
Fourier Transform Pairs (continue)
1 0 n M
sinwM 1 / 2 jwM / 2
xn
e
sinw / 2
0 otherwise
e jw0 n
2 w w0 2k
k
cosw0 n
j
j
e
w
w
2
k
e
w w0 2k
0
k
Determining a Fourier Transform
Using Symmetric Properties and Pairwise Formulas – Examples
Suppose we wish to find the Fourier transform of
x[n] = anu[n-5].
x1 n a un
n
x2 n x1 n 5
1
jw
1 ae
X 1 e jw
Thus, X 2 e jw e j 5 w X 1 e jw
xn a 5 x2 n, so X e jw
e j 5w
1 ae jw
a 5e j 5w
jw
1 ae
Another Example
Determining the impulse response for a difference
equation
y[n](1/2) y[n1] = x[n] (1/4)x[n1]
To find the impulse response, we set x[n] = [n].
Then the above equation becomes
h[n](1/2) h[n1] = [n] (1/4)[n1]
Applying the Fourier transform, we obtain
H(ejw) (1/2)e-jwH(ejw) = 1 (1/4) e-jw
So H(ejw) = (1 (1/4) e-jw) / (1 (1/2) e-jw)
Another Example (continue)
From the pairwise table, we know
a un ( a 1)
n
1
1 ae jw
thus, (1/2)nu[n] 1 / (1 (1/2) e-jw)
By the shifting property,
(1/4)(1/2)n1u[n1] (1/4) e-jw / (1 (1/2) e-jw)
Thus,
h[n] = (1/2)nu[n] (1/4)(1/2)n1u[n1]