Uploaded by asad shabbir

ADSP-Lecture 2

advertisement
ADSP-Lecture 2
LTI System, Convolution, Difference Equations
Classification of Discrete-time Systems
Memoryless Systems: If the output of the system at an instant ๐‘› only depends on the
input sample at that time (and not on past or future samples) then the system is
called memoryless or static,
e.g. ๐‘ฆ(๐‘›) = ๐‘Ž๐‘ฅ(๐‘›) + ๐‘๐‘ฅ2(๐‘›)
Otherwise, the system is said to be dynamic or to have memory,
e.g. ๐‘ฆ(๐‘›) = ๐‘ฅ(๐‘›) − 4๐‘ฅ(๐‘› − 2)
Causal vs. Non-causal Systems
In a causal system, the output at any time n only depends on the present and past inputs.
An example of a causal system:
๐‘ฆ(๐‘›) = ๐น[๐‘ฅ(๐‘›), ๐‘ฅ(๐‘› − 1), ๐‘ฅ(๐‘› − 2), … ]
y[n] = x[n] − x[n−1] (Forward Difference)
All other systems are non-causal.
A subset of non-causal system where the system output, at any time n only depends on
future inputs is called anti-causal.
๐‘ฆ(๐‘›) = ๐น[๐‘ฅ(๐‘› + 1), ๐‘ฅ(๐‘› + 2), … ]
y[n] = x[n+1] − x[n] (Backward Difference)
Stable vs. Unstable Systems
Unstable systems exhibit erratic and extreme behavior. BIBO stable systems are those
producing a bounded output for every bounded input:
x ( n) ๏‚ฃ M x ๏€ผ ๏‚ฅ ๏ƒž y ( n) ๏‚ฃ M y ๏€ผ ๏‚ฅ
Example:
Stable or unstable?
y (n) = y 2 (n − 1) + x(n)
x( n) = C๏ค ( n) Bounded signal
Solution:
y (0) = C , y (1) = C 2 , y (2) = C 4 ,..., y (n) = C 2 n
1๏€ผ C ๏‚ฃ ๏‚ฅ
unstable
Linear vs. Non-linear Systems
Superposition principle: ๐‘‡[๐‘Ž๐‘ฅ1(๐‘›) + ๐‘๐‘ฅ2(๐‘›)] = ๐‘Ž๐‘‡[๐‘ฅ1(๐‘›)] + ๐‘๐‘‡[๐‘ฅ2 (๐‘›)]
A relaxed linear system with zero input produces a zero output.
Additivity property
Scaling property
Linear vs. Non-linear Systems
Example:
y ( n) = x ( n 2 )
Solution:
y1 (n) = x1 (n 2 )
Linear or non-linear?
y2 (n) = x2 (n 2 )
y3 (n) = T (a1 x1 (n) + a2 x2 (n)) = a1x1 (n 2 ) + a2 x2 (n 2 )
a1 y1 (n) + a2 y2 (n) = a1 x1 (n 2 ) + a2 x2 (n 2 )
Example:
Linear!
y (n) = e x ( n )
Useful Hint: In a linear system, zero input results in a zero
output!
x( n) = 0 ๏ƒž y ( n) = 1
Non-linear!
System Examples (continue)
Nonlinear System.
Eg. w[n] = log10(|x[n]|) is not linear.
Time-invariant System:
If y[n] = T{x[n]}, then y[n−n0] = T{x[n −n0]}
The accumulator is a time-invariant system.
The compressor system (not time-invariant)
y[n] = x[Mn], −๏‚ฅ < n < ๏‚ฅ.
Time-invariant vs. Time-variant Systems
If input-output characteristics of a system do not change with time then it is called
time-invariant or shift-invariant. This means that for every input ๐‘ฅ(๐‘›) and every shift
๐‘˜
T
T
x( n) โŽฏ
โŽฏ→
y ( n) ๏ƒž x ( n − k ) โŽฏ
โŽฏ→
y (n − k )
Time-invariant vs. Time-variant Systems
Time-invariant example: differentiator
T
x( n) โŽฏ
โŽฏ→
y ( n) = x( n) − x( n − 1)
T
x( n − 1) โŽฏ
โŽฏ→
y (n − 1) = x( n − 1) − x(n − 2)
T
x ( n) โŽฏ
โŽฏ→
y (n) = x(n).Cos (๏ท0 .n)
Time-variant example: modulator
x(n -1) ¾T¾
® x(n -1).Cos(w0 .n) ¹ y(n -1)
y(n -1) = x(n -1).Cos(w0.(n -1))
Example:
Accumulator System
Is the system memory-less?
Is the system causal?
Is the system Linear?
Is the system Time-invariant?
Is the system stable?
y๏›n๏ =
n
๏ƒฅ x๏›k ๏
k = −๏‚ฅ
Linear Time-Invariant (LTI) Systems
LTI systems have two important characteristics:
Time invariance: A system ๐‘‡ is called time-invariant or shift-invariant if input-output
characteristics of the system do not change with time
T
T
x ( n) โŽฏ
โŽฏ→
y ( n) ๏ƒž x ( n − k ) โŽฏ
โŽฏ→
y (n − k )
Linearity: A system ๐‘‡ is called linear iff
๐‘‡[๐‘Ž๐‘ฅ1(๐‘›) + ๐‘๐‘ฅ2(๐‘›)] = ๐‘Ž๐‘‡[๐‘ฅ1(๐‘›)] + ๐‘๐‘‡[๐‘ฅ2 (๐‘›)]
Why do we care about LTI systems?
Availability of a large collection of mathematical techniques
Many practical systems are either LTI or can be approximated by LTI systems.
Linear and Time Invariant Example
Linear Time Invariant Systems
A system that is both linear and time invariant is called a linear time invariant (LTI)
system.
By setting the input x[n] as ๏ค[n], the impulse function, the output h[n] of an LTI system
is called the impulse response of this system.
Time invariant: when the input is ๏ค[n-k], the output is h[n-k].
Remember that the x[n] can be represented as a linear combination of delayed
impulses
๏‚ฅ
x๏›n๏ =
๏ƒฅ x๏›k ๏๏ค ๏›n − k ๏
k = −๏‚ฅ
Impulse Response
Impulse Response of LTI Systems
โ„Ž(๐‘›): the response of the LTI system to the input unit sample ๏ค(๐‘›), i.e. โ„Ž(๐‘›) = ๐‘‡{๐‘ฅ(๐‘›)}
๏‚ฅ
y(n) = T[x(n)] =๏ƒฅ x(k )h(n − k ) = x(n) * h(n)
k = −๏‚ฅ
An LTI system is completely characterized by a single impulse response โ„Ž(๐‘›).
Response of the system to the input
Convolution
unit sample sequence at n=k
sum
Impulse Response Example
The impulse response of the system
y[n] = ๏ก1x[n] + ๏ก 2 x[n − 1] + ๏ก3 x[n − 2] + ๏ก 4 x[n − 3]
is obtained by setting ๐‘ฅ[๐‘›] = ๐›ฟ[๐‘›] resulting in
h[n] = ๏ก1๏ค [n] + ๏ก 2๏ค [n − 1] + ๏ก3๏ค [n − 2] + ๏ก 4๏ค [n − 3]
The impulse response is thus a finite-length sequence of length 4 given by
{h[n]} = {๏ก1, ๏ก 2 , ๏ก3 , ๏ก 4}
๏‚ญ
Impulse Response Example
Example - The impulse response of the discrete-time accumulator
n
y[n] =
๏ƒฅ x[๏ฌ]
๏ฌ = −๏‚ฅ
is obtained by setting ๐‘ฅ[๐‘›] = ๐›ฟ[๐‘›] resulting in
h[n] =
n
๏ƒฅ ๏ค [๏ฌ] = ๏ญ[n]
๏ฌ = −๏‚ฅ
FIR and IIR systems
Linear Time Invariant Systems (continue)
• Hence
๏‚ฅ
๏‚ฅ
๏‚ฅ
๏ƒฌ
๏ƒผ
๏ƒฏ
๏ƒฏ
x๏›k ๏h๏›n − k ๏
y๏›n๏ = T ๏ƒญ ๏ƒฅ x๏›k ๏๏ค ๏›n − k ๏๏ƒฝ = ๏ƒฅ x๏›k ๏T ๏ป๏ค ๏›n − k ๏๏ฝ =
๏ƒฏ
๏ƒฏ
k = −๏‚ฅ
๏ƒฎk = −๏‚ฅ
๏ƒพ k = −๏‚ฅ
๏ƒฅ
• Therefore, a LTI system is completely characterized
by its impulse response h[n].
Stable and Causal LTI Systems
An LTI system is (BIBO) stable if and only if
Impulse response is absolute summable
๏‚ฅ
๏ƒฅ h๏›k ๏ ๏€ผ ๏‚ฅ
k = −๏‚ฅ
Let’s write the output of the system as
y๏›n๏ =
If the input is bounded
๏‚ฅ
๏‚ฅ
k = −๏‚ฅ
k = −๏‚ฅ
๏ƒฅ h๏›k ๏x๏›n − k ๏ ๏‚ฃ ๏ƒฅ h๏›k ๏ x๏›n − k ๏
x[n] ๏‚ฃ Bx
Then the output is bounded by
y๏›n๏ ๏‚ฃ Bx
๏‚ฅ
๏ƒฅ h๏›k ๏
k = −๏‚ฅ
The output is bounded if the absolute sum is finite
An LTI system is causal if and only if
h๏›k ๏ = 0 for k ๏€ผ 0
Causality & Stability- Example
โ„Ž ๐‘› = ๐‘Ž๐‘› ๐‘ข ๐‘›
Convolution Summation
y๏›n๏ =
๏‚ฅ
๏ƒฅ x๏›k ๏h๏›n − k ๏
k = −๏‚ฅ
Note that the above operation is convolution, and can be written in short by y[n] =
x[n] ๏€ช h[n].
The output of an LTI system is equivalent to the convolution of the input and the
impulse response.
In a LTI system, the input sample at n = k, represented as x[k]๏ค[n-k], is transformed
by the system into an output sequence x[k]h[n-k] for −๏‚ฅ < n < ๏‚ฅ.
Applications
Visualizing Convolution
There are four basic steps to the calculation:
Tabular Mechanism
∞
Convolution in the time domain:
๐‘ฆ ๐‘› = เท ๐‘ฅ[๐‘˜] โ„Ž[๐‘› − ๐‘˜]
๐‘˜=−∞
y[n] = 2 –3 3 3 –6 0 1 0 0
Example: Tabular
๐‘ฅ ๐‘› = 1, 2, 3
โ„Ž ๐‘› = {1, 2, 3}
Example: Convolution Summation
๐‘ฅ ๐‘› = 1, 2, 3
โ„Ž ๐‘› = {1, 2, 3}
Example:
The operation has a simple graphical interpretation:
Calculating Successive Values
• We can calculate each output point by shifting the unit pulse
response one sample at a time:
๏‚ฅ
y[n] =
๏ƒฅ x[k ] h[n − k ]
k = −๏‚ฅ
• y[n] = 0 for n < ???
y[-1] =
y[0] =
y[1] =
…
y[n] = 0 for n > ???
• Can we generalize this result?
Graphical Convolution (Cont.)
Observations:
y[n] = 0 for n > 4
If we define the duration of h[n] as the difference in time from the first nonzero
sample to the last nonzero sample, the duration of h[n], Lh, is
4 samples.
Similarly, Lx = 3.
The duration of y[n] is: Ly = Lx + Lh – 1. This is a good sanity check.
Graphically
x (๏ด )
t
h (t )
h (t − ๏ด )
x (๏ด )
t
Overlap
Example
DTC-FLIP & SLIDE method(Finite Length Signals)
Computation of Discrete Convolution
Convolution
Useful Summation
Convolution
Download