Professional Documents
Culture Documents
1
Convolution
It is possible to determine the current value of a Where the convolution sum involves four operations:
signal x(n) by getting its value at k. 1. Folding fold h(k) about 0 to obtain h(k).
By multiplying the value of x(n) at k by a function h, 2. Shifting shift h(k) to the right (left) if n is positive
we can get the effect of x(n) on h. (negative) to obtain h(n k).
3. Multiplication multiply x(k) by h(n k) to obtain the
Therefore
product sequence.
4. Summation sum all the product sequences to obtain
y ( n) x ( k ) h( n k )
k
the value of the output at time n = n0.
5 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 6 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
Example Exercise
The impulse response of an LTI system is
2
Properties of the Convolution Sum Example
We express the convolution sum as Find the response of the system y(n) given:
x(n) [2 1 0 4 3 2] h2 (n) [1 0 3 2 1]
y (n) x ( k ) h ( n k ) x ( n) h( n)
k
h1(n) [3 2 2 1 1 5] h3(n) [1 1 2 0 1]
Commutative Law
x ( n) h( n) h( n) x ( n ) x(n) H1
Associative Law + y(n)
x(n) [h1 (n) h2 (n)] [ x(n) h1 (n)] h2 (n) H2 H3
Distributive Law
x(n) [h1 (n) h2 (n)] [ x(n) h1 (n)] [ x(n) h2 (n)] Answer: y(n) [4 4 9 15 22 18 5 39 3 37 11 12 1 2]
9 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 10 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
3
Impulse Response, h(n) Causal DT-LTI System
The response (output) of an arbitrary system H from a A DT-LTI system is causal if and only if its impulse
unit impulse signal. response h(n) is zero for negative values of n.
x(n) = (n) H y(n) = h(n) y ( n) x ( k ) h( n k ) h ( k ) x ( n k )
k 0 k 0
13 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 14 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
| h( k ) |
k M
h(n) = 0
H
n n
0 0 M1
15 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 16 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
4
Infinite Impulse Response (IIR) System FIR Systems vs. IIR Systems
A system with an infinite-duration impulse response. An FIR system has a finite duration impulse response,
while an IIR has an infinite impulse response. Thus an
FIR system has zero output outside some finite
y ( n) h( k ) x ( n k )
k 0 interval.
Using convolution, we can see the output of a system
at any given time n is simply a weighted combination of
H the input samples x(n), x(n 1), , x(n M + 1).
n n
0 0
It weighs them by the values of the impulse response
x(n) = (n) y(n) = h(n) h(k) at k = 0, 1, 2,, M + 1.
17 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 18 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
Correlation
In effect, the system acts as a window that views only Correlation computes for the degree to which two
the most recent M input signals forming the output. It signals are similar (related) and extract some of the
neglects, or simply forgets all prior input samples. information depending on the application.
Therefore it has a finite memory length of M. Often used in sonar, radar, digital communications,
In contrast, for an IIR system, it has infinite duration geology, etc.
impulse response, requiring infinite memory.
19 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 20 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
5
A Correlation Example
Let x(n) be the Having the reference signal x(n), and the received signal
transmitted signal and y(n), the problem is to compare y(n) with x(n) to
REC
EIV
ED y(n) the received signal. If determine if there is a target, and if so, determine the
a target is present in time delay D to compute for the distance.
NS MIT
TED space, y(n) will consist of In practice, x(n D) is heavily corrupted by noise to the
TRA
a delayed version of x(n) point where visual inspection of y(n) does not reveal
(due to the round-trip any information.
y (n) x(n D) w(n) time) from the reflection, Correlation provides us with a means of extracting this
where: corrupted by noise. important information from y(n).
- attenuation due to free space
D round-trip delay If there is no target, y(n)
w(n) additive noise will consist of noise
alone.
21 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 22 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
Transmitted Signal
2
Correlated Signal
1.5 10
0.5
0 5
0 10 20 30 40 50 60 70 80 90 100 Actual Delay
1
Delay
0.5 (Round-trip time)
0 -5
0 10 20 30 40 50 60 70 80 90 100
1 -10
-1
-15
0 10 20 30 40 50 60 70 80 90 100
0 10 20 30 40 50 60 70 80 90 100
23 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 24 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
6
Cross-correlation
Suppose we have two real signals, x(n) and y(n), each Comparing the two, we have
having finite energy. The cross-correlation of x(n) and
y(n) is a sequence rxy(l) defined as rxy (l ) ryx (l )
Therefore, rxy(l) is simply the folded version of ryx(l),
rxy (l ) x(n) y (n l ) or rxy (l )
n
x(n l ) y (n)
n where folding is done with respect to l = 0. Hence rxy(l)
Where l is the time shift (lag), and the subscripts xy provides exactly the same information as ryx(l) with
indicate the sequences being correlated. The order of respect to the similarity of x(n) to y(n).
the indices indicate the direction in which one sequence A special case of correlation is autocorrelation where
is shifted relative to the other. y(n) = x(n).
x (n) x (n l ) x (n l ) x(n)
rxx (l )
ryx (l ) y (n) x(n l )
n
or ryx (l ) y (n l ) x(n)
n n n
25 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 26 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
Autocorrelation Example:
Example Yearly Wlfer Sunspot Numbers
x(n) [1 0 1 1 2] y(n) [1 0 1 1 3]
Yearly Wolfer Sunspot Numbers
Given: 200
150
Answers: 1. rxy(l) [3 1 4 4 7 3 1 1 2]
Autocorrelation Sequence
1
2. ryx(l) [2 1 1 3 7 4 4 1 3]
0
We can see that ryx(l) is the folded version
1 Solar Cycle
of rxy(l), therefore ryx(l) = rxy(l). -0.5
0 5 10 15 20 25
27 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 28 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
7
Example Observations
Determine the autocorrelation sequence of x(n): 1. The convolution of two sequences is computed by Folding,
Shifting, Multiplication and Summation.
2. The crosscorrelation of two sequences is computed by Shifting,
x(n) [1 0 1 1 2] Multiplication and Summation.
3. From (1) and (2), it follows that rxy(l) = x(l)*y(l). The
Answer: rxx(l) [2 1 3 3 7 3 3 1 2]
convolution of x(n) and y(n) is the crosscorrelation of the two
sequences.
We can see that rxx(l) attains its maximum
value at l = 0. Also, the autocorrelation 4. If rxy(l) = ryx(l), thus rxy(l) is the folded version of ryx(l)
sequence is an even function. 5. From (4), it follows that the autocorrelation function is an even
function.
6. If y(n) = h(n)*x(n), therefore ryx(l) = h(l)*rxx(l).
7. Since ryy(l) = ry(l)*ry(l), therefore ryy(l) = rhh(l)*rxx(l).
29 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 30 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
8
Recursive DT System Non-recursive DT System
A system whose output y(n) at any given time n A system whose output y(n) at any given time n
depends on any number of past output values y(n 1), depends only the present and past inputs.
y(n 2),, y(n N).
y(n) = F[y(n 1), y(n 2),, y(n N), x(n)] y(n) = F[x(n), x(n 1),, x(n M)]
z 1 z 1
33 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 34 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
35 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 36 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
9
Time Invariance Stability
The system described by the general form of Nth order Recursive system described by constant-coefficient
difference equation is time invariant if the coefficients difference equation is BIBO stable if and only if for
ak and bk are constants for all k. every bounded input and every bounded initial condition,
the total system response is bounded.
37 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 38 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
39 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 40 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
10
Total Response
The total response of the system is the sum of the
zero-state and the zero-input response.
43 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 44 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
11
Solution of Linear Constant Coefficient
Difference Equations
Iterative Method
There are at least three methods of solving LCCDEs by The iterative method is the simplest but most tedious.
the direct method: To get the value of the output at a given time n, the
Iterative or recursive DE is evaluated for different values of n, given some
Classical or mathematical initial condition.
Systems-oriented approach The number of initial conditions required to solve for
Indirect method refers to the application of the the output value depends on the order of the DE, i.e. a
Z-transform in solving DEs. 1st order DE requires 1 initial condition, a 2nd order DE
needs 2 initial conditions, and so on.
45 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 46 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
Example 1 Example 2
Determine y(1), y(2), and y(3) for an initially relaxed Determine y(4) for a DT system characterized by the
system defined by LCCDE
47 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 48 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
12
Classical Method or Mathematical Homogenous Solution, yh(n)
The total response of a system described by linear The homogeneous solution is obtained by making the
constant-coefficient difference equation (LCCDE) is the input function equal to zero.
sum of two parts, homogeneous and particular solution, N N
i.e. y ( n) a k y ( n k ) or a
k 0
k y (n k ) 0
k 1
49 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 50 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
Example 1
Case 1: Distinct Roots Determine yh(n) for the DE
The general form is
51 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 52 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
13
Example 2 Example 3
Determine yh(n) for the DE Determine yzi(n) for the DE
21 3 14 2
53 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 54 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
Assume that the particular solution yp(n) will depend Input Signal, x(n) Particular Solution, yp(n)
on the form of the input x(n), that is if x(n) is (n) (x(n)= 0; n > 0) 0
exponential, the particular solution is also exponential A (constant) K
or if x(n) is sinusoid then yp(n) would also be a sinusoid. AMn KMn
The particular solution is any solution satisfying AnM K0nM + K1nM 1 ++ KM
a
k 0
k y p (n k ) bk x(n k )
k 0
, a0 = 1 Acos0n
K1 cos0n + K2 sin0n
Asin0n
14
Example
To determine yp(n), use the following procedure: Given y(n) + 2y(n 1) = x(n)
1. Postulate a trial solution where: x(n) = 2u(n) + 4nu(n)
The assumed yp(n) must not appear in yh(n) to avoid
redundancy. Select a particular solution that is linearly
y(1) = 1
independent of the terms in the homogeneous solution.
One method to avoid a trial solution with a redundant term solve for y(2) and check using iterative.
is by treating it similarly to a characteristic equation with
multiple roots.
2. Substitute a trial solution into the LCCDE
Answer:
1 n 2
yt (n) 2 1 4n u(n)
3. Evaluate the coefficients K 3 3
In evaluating the equation, none of the terms must vanish. y(2) = 10
4. Determine the final solution
57 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 58 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
Recall that the total response of a system is the sum Given y(n) + 2y(n 1) = x(n)
of the zero-input and zero-state responses where: x(n) = 2u(n) + 4nu(n)
yt(n) = yzi(n) + yzs(n) y(1) = 1
59 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 60 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
15
Impulse Response of DT-LTI Recursive System
y zs (n) h(n)
61 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
16
Direct Form II Structure
w(n) b0 w(n) b0
x(n) + + y(n) x(n) + + y(n)
S2 S1 S2 S1
However, as seen previously, interchanging the order Combining the two delays into a single delay unit
of the two systems will not affect the output. gives us the Direct Form II structure.
h1 (n) h2 (n) h2 (n) h1 (n)
We can see that the delays in the middle are
redundant.
65 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 66 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
M
y (n) b
k 0
k w(n k )
67 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 68 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
17
An FIR System An IIR System
A system whose response to a unit sample is a finite A system whose response to a unit sample is an
duration signal. infinite duration signal.
Also known as a moving average system. Always in the form of a recursive system.
Usually in the form of a non-recursive system. The general form of an IIR system is:
The general form of an FIR system is:
N
M y (n) a k y ( n k ) b0 x ( n )
y (n) b
k 0
k x(n k ) k 1
69 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 70 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
71 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 72 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
18
>> simulink >> simulink
>> >>
19
>> simulink >> simulink From Sinks blockset
>> >>
20
>> simulink >> simulink
>> y View the output >> y
y = y =
0.114000000000000 0.114000000000000
0.381995200000000 0.381995200000000
0.724046023360000 0.724046023360000
0.961597214139648 0.961597214139648
1.058448284014003 1.058448284014003
1.055077358008106 1.055077358008106 Redo for Direct Form II
1.009268149497086 1.009268149497086
0.963245919684837 0.963245919684837
0.935544115013962 0.935544115013962
0.926929996136171 0.926929996136171
0.930101796144381 0.930101796144381
0.937153826930602 0.937153826930602
0.943079613026168 0.943079613026168
0.946142435799550 0.946142435799550
0.946728994505841 0.946728994505841
>> >>
0.946728994505841 0.946728994505841
>> [y y1] Compare the output of DF I (y) with the output of DF II (y1) >> [y y1]
ans = ans =
0.114000000000000 0.114000000000000 0.114000000000000 0.114000000000000
0.381995200000000 0.381995200000000 0.381995200000000 0.381995200000000
0.724046023360000 0.724046023360000 0.724046023360000 0.724046023360000
0.961597214139648 0.961597214139648 0.961597214139648 0.961597214139648
1.058448284014003 1.058448284014003 1.058448284014003 1.058448284014003
1.055077358008106 1.055077358008106 1.055077358008106 1.055077358008106
1.009268149497086 1.009268149497086 1.009268149497086 1.009268149497086
0.963245919684837 0.963245919684837 0.963245919684837 0.963245919684837
0.935544115013962 0.935544115013962 0.935544115013962 0.935544115013962
0.926929996136171 0.926929996136171 0.926929996136171 0.926929996136171
0.930101796144381 0.930101796144381 0.930101796144381 0.930101796144381
0.937153826930602 0.937153826930602 0.937153826930602 0.937153826930602
0.943079613026168 0.943079613026168 0.943079613026168 0.943079613026168
0.946142435799550 0.946142435799550 0.946142435799550 0.946142435799550
0.946728994505841 0.946728994505841 0.946728994505841 0.946728994505841
>> subplot(2,1,1);stem(0:14,y);subplot(2,1,2);stem(0:14,y1) >> subplot(2,1,1);stem(0:14,y);subplot(2,1,2);stem(0:14,y1)
>> Compare the outputs graphically >>
21
1. Find the response of the system y(n) given:
h1(n) [2 1 0 1 3 4]
h2 (n) [2 0 3 5 2]
ECE 411 h3(n) [1 0 2 3 1]
2. Given 4y(n) 4y(n 1) + y(n 2) = ()nu(n) 3. Given y(n) 2y(n 1) + 2y(n 2) = x(n)
where: y(2) = 1 where: I.C. = 0, x(n) = (n)
y(1) = 1
find yt(n).
find yt(n).
Answer:
31 9 1
n
1
y(n) n n 2
n n 3
u ( n) Answer: y(n) 2 n 1
cos (n 1)
22 8 2 2 4
87 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 88 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
22
4. Solve problem #2 using the systems-based approach
ASSIGNMENT 3:
4y(n) 4y(n 1) + y(n 2) = ()nu(n)
where: y(2) = 1 Answer the following problems at the end of Chapter 2
y(1) = 1 on the textbook (Digital Signal Processing,
Proakis/Manolakis, 3e).
Problems 2.16 2.18, 2.25 2.28, 2.30, 2.43, 2.47
yzi (n) 54 12 34 n 12
n n
Answer: Use an A4-sized paper
89 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems 90 ECE 411 - Signals, Spectra, and Signal Processing: DT-LTI Systems
23