EE441 Data Structures (Fall 2004)
Download
Report
Transcript EE441 Data Structures (Fall 2004)
Course Outline (Tentative)
Fundamental Concepts of Signals and Systems
Linear Time-Invariant (LTI) Systems
Fourier Transform & Properties …
Modulation (An application example)
Discrete-Time Frequency Domain Methods
Response to complex exponentials
Harmonically related complex exponentials …
Fourier Integral
Convolution integral and sum
Properties of LTI Systems …
Fourier Series
Signals
Systems
DT Fourier Series
DT Fourier Transform
Sampling Theorem
Laplace Transform
Z Transform
Chapter II
Linear Time-Invariant (LTI) Systems
Linear Time-Invariant Systems
Important class of systems as many physical phenomena can
be modeled as such
Representation of DT Signals in Terms of Pulses
DT unit impulse can be used to construct any DT signal
Think of a DT signal as a sequence of individual impulses
Consider
x[n]
-1
-4
...
-3 -2
...
2 3
0 1
4
n
Linear Time-Invariant Systems
x[n] is actually a sequence of time-shifted and scaled impulses
x[-2]δ[n+2]
x[0]δ[n]
x[-1]δ[n+1]
-1
-2
0
x[1]δ[n-1]
01
012
x[2]δ[n-2]
Linear Time-Invariant Systems
It is possible to re-generate an arbitrary signal by
sampling it with shifted unit impulse:
x[n] = - - - + x[-4] δ[n+4] + x[-3] δ[n+3] + x[-2] δ[n+2] +
+ x[-1] δ[n+1] + x[0] δ[n] + x[1] δ[n-1] + - - -
This is called as sifting property:
x[n]
x[k ] [n k ]
k
shifted impulse
weights
Sifting property of DT impulse
DT Unit Impulse Response
x[n] is superposition of scaled & shifted impulses
The output of a linear system to x[n] =
superposition of the scaled responses of the system to each of
these shifted impulses
Let hk[n] be the response of a linear system to δ[n-k].
From superposition property of linear systems, the response y[n] is the
sum of individual responses, i.e.,
x[n]
x[k ] [n k ]
k
y[n]
x[k ]h [n]
k
k
DT Unit Impulse Response
In general, if the system is also time-invariant, then
hk[n], response to δ[n-k], is a time-shifted version of
h0[n], which is the response of the system to δ[n];
hk [n] h0 [n k ]
So, for k=0, i.e., input is δ[n], then the response of the
system is
h[n] h0 [n]
Unit Impulse Response
h[n] is the output (response) of the LTI system
when δ[n] (impulse) is the input
Convolution Sum
Representation of LTI Systems
Recall that for an LTI system (due to superposition property):
x[n]
x[k ] [n k ]
y[n]
k
x[k ]h [n]
k
k
Hence, for an LTI system, the output y[n] for the input x[n] is
y[n]
x[k ]h[n k ]
k
Convolution Sum
Superposition Sum
convolution of the sequences (signals) x[n] and h[n], and represented by:
y[n] x[n] h[n]
Convolution Sum
Example
Example: Consider an LTI system with impulse response h[n] and input x[n] is
applied to the system. Find the output y[n].
2
x[n]
0.5
n
0 1 2
0 1
y[n]
h[n]
1
x[k ]h[n k ] x[0]h[n 0] x[1]h[n 1] 0.5h[n] 2h[n 1]
k
2.5
0.5
0 1 2
2 h[n-1]
0.5 h[n]
+
1 2 3
2.5
2
0.5
0 1 2 3
y[n]
Convolution Sum
Example
Example: Consider LTI system with h[n]
2
0.5
x[n]
h[n]
1
n
0 1 2
0 1
y[n]=
x[k] h[n-k]
k
Consider h[n-k] as a time-reversed and shifted version of h[k]
If we plot h[-k] then we can obtain h[n-k] simply by shifting to
right (by n) if n>0, or to left if n<0
Convolution Sum
Example
2
x[k]
0.5
0
k
1
1
h[n-k] , n<0
k
n-2 n-1
n
Flip h[k]
By shifting h[k] for all possible values
of n, pass it through x[n].
for n 0, y[n] x[k ]h[n k ] 0
k
for n 0, y[0] x[k ]h[0 k ] 0.5
0
k
k
-2
-1
h[0-k]
0
for n 2, y[2] x[k ]h[2 k ] 0.5 2 2.5
k
k
k
-1
0
h[1-k]
1
1
k
2.5
2
2
h[3-k]
n-2 n-1 n
h[n-k] , n>3
2.5
2
0.5
3
k
0
k
h[2-k]
k
0 1
for n 3, y[3] x[k ]h[3 k ] 2
for n 3, y[n] x[k ]h[n k ] 0
k
0
for n 1, y[1] x[k ]h[1 k ] 0.5 2 2.5
y[n]=0
0 1 2 3
y[n]
Convolution Sum
Example
Ex:
Consider x[n]= n u[n] for 0< <1 and h[n]=u[n]. Find y[n].
y[n]=
x[k] h[n-k]
k
1
x[k]= k u[k]
h[-k]
---
k
k
0 1 2
0
Convolution Sum
Example
for n<0
x[k]h[n-k]=0
for k
for n≥0
1
x[k]= k u[k]
k
x[k]h[n-k]≠0
k
0 1
0 1 2
for n≥0
h[n-k]
--
for
0≤k≤n
n
Convolution Sum
Example
k , 0 k n
x[k]h[n-k] =
0 , o/w
n
y[n] =
k
k 0
1 n1
1
1 n1
y[n]
u[n]
1
for n 0
Convolution Sum
Example
Ex: Consider an LTI system with input x[n]=2n u[-n] and h[n]=u[n]. Find y[n].
1
1
1
1
---
1
2
x[k]=2k
4
u[-k]
h[n-k]
---
8
1
16
k
k
0
-4 -3 -2 -1 0
n
for n≥0, x[k]h[n-k] has nonzero samples for k≤0
0
y[n] =
k
0
x[k]h[n-k] =
k
2k
1
=
k 0 2
k
=
1
1
1
2
=2
Convolution Sum
Example
for n<0, x[k]h[n-k] has nonzero samples for k≤n
y[n] =
x[k]h[n-k] =
k
k
1
l 0 2
n
n
l n
2k
1
=
l n 2
l
l
1
n
2 2n 1
l 0 2
2
1
, n0
2
y[n] n1
, n0
2
1
1
1
---
2
4
8
1
16
-5 -4 -3 -2 -1 0 1 2
y[n]
---
Representation of CT Signals in terms
of Impulses
Consider a pulse or “staircase” approximation,
xˆ (t ) , to a CT signal x(t)
x(t)
Similar to DT case, xˆ (t ) can be
expressed as a linear combination
of delayed pulses
---Δ
Δ 2Δ
t
kΔ
0
1
, 0t
Define (t )
0,
o/w
δΔ(t)
1
0 Δ
t
Representation of CT Signals in
Terms of Impulses
Since (t ) has unit amplitude, we can represent
of shifted and scaled rectangular pulses…
xˆ (t )
x(k)
k
As Δ
0,
xˆ (t )
xˆ (t )
in terms
(t k)
approaches to x(t)
x(t ) lim
0
x(k) (t k)
k
x(t ) x( ) (t )d (sifting property)
Representation of CT Signals in
Terms of Impulses
Other derivations for this ??
Recall:
x(t ) (t ) x( ) (t )
Integrate both sides over :
x(t ) (t )d x( ) (t )d
x(t ) (t )d
x( ) (t )d
1
x(t ) x( ) (t )d
CT Unit Impulse Response &
Convolution Integral
Let us define
hˆk (t )
yˆ (t )
as the response of a linear system to
(t k)
ˆ (t )
x
(
k
)
h
k
k
As Δ 0 yˆ (t) approaches to y(t)
y(t) = lim
0
x(k)hˆ
k
Hence,
y (t )
k
(t ) (note as 0 (t k) (t )
x( )h (t )d
hence
hˆk (t ) h (t )
)
CT Unit Impulse Response &
Convolution Integral
By time-invariance
h (t ) h0 (t )
and therefore,
h(t ) h0 (t )
impulse response!
x( )h(t )d
Convolution
integral
y (t )
y (t ) x(t ) h(t )
An LTI system is completely characterized by its impulse response
(i.e., h[n] in DT, h(t) in CT)
Convolution Integral
Example
at
Let x(t ) e u (t ) , a>0 be the input to an LTI system with
h(t) = u(t). Find y(t)!
1
x ( )
1
h( )
0
0
y (t )
x( )h(t )d
Convolution Integral
Example
h( )
h(t )
t
0
h(t )
0
for t>0
0
For t<0,
t>0
t
x( )h(t ) 0
for t<0
y(t)=0
e a , 0 t
x( )h(t )
0 , o/w
Convolution Integral
Example
t
for t>0
y(t ) e
0
a
1 a
d e
a
1
y (t ) (1 e at )u (t )
a
1
a
y (t )
t
t
0
1
(1 e at )
a
Properties of Convolution and
LTI Systems
1) Commutative Property:
Convolution is a commutative operation in both DT and CT.
x[n] h[n] h[n] x[n] h[k ] x[n k ]
x(t ) h(t ) h(t ) x(t ) h( )x(t )d
Easily shown
by substituting
variables
Practical use ??
(take h[k], time-reverse and shift x[k] whenever it’s easier)
Properties of Convolution and
LTI Systems
2) Distributive Property:
Convolution distributes over addition.
x[n] (h1[n] h2[n]) x[n] h1[n] x[n] h2[n]
x(t ) (h1 (t ) h2 (t )) x(t ) h1 (t ) x(t ) h2 (t )
Practical interpretation ??
x
h1
+
h2
(parallel interconnection of systems)
y
x
h1+h2
y
Properties of Convolution and
LTI Systems
( x1[n] x2[n]) h[n] x1[n] h[n] x2[n] h[n]
( x1 (t ) x2 (t )) h(t ) x1 (t ) h(t ) x2 (t ) h(t )
Practical ??
- (response to sum of two inputs = sum of responses to inputs individually)
- Break a complicated convolution into several simpler ones (useful !!)
Properties of Convolution and
LTI Systems
3) Associative Property:
x[n] (h1[n] h2[n]) ( x[n] h1[n]) h2[n]
x(t ) (h1 (t ) h2 (t )) ( x(t ) h1 (t )) h2 (t )
x[n]
h1[n]
h2[n]
y[n]
: (x[n]* h1[n])* h2[n]
by associativity
x[n]
h1[n]*h2[n]
y[n]
x[n]
h2[n]*h1[n]
y[n]
x[n]
h2[n]
h1[n]
y[n]
Result 1
by commutativity
Result 2
Properties of Convolution and
LTI Systems
Results:
Impulse response of cascade LTI systems is the convolution of their
individual impulse responses
Overall system response is independent of the order of the systems in
cascade !
4) LTI Systems with & w/o Memory:
h[n] 0 for
If
h(t ) 0 for
n0
t 0
then the LTI system is memoryless !
(look at the convolution sum
Hence,
h[n] K [n]
h(t ) K (t )
y[n] h[k ]x[n k ] )
k
y[n] Kx[n]
y (t ) Kx(t )
memoryless
Properties of Convolution and
LTI Systems
5) Invertibility of LTI Systems
x(t)
x(t)
h(t)
y(t)
h1(t)
Identity System
δ(t)
w(t)=x(t)
x(t)
if the system is invertible then h(t ) h1 (t ) (t )
h[n] h1[n] [n]
h1 (t )
is the impulse response of the LTI inverse system.
and
h1[n]
Properties of Convolution and LTI Systems
Example
Consider LTI system of time-shift:
y(t)=x(t-t0)
Impulse response of the system is
h(t)=δ(t-t0)
y (t ) x(t ) h(t )
x(t t0 ) x(t ) (t t0 )
Convolution of a signal with a
shifted impulse shifts the signal
Inverse: shift the output back!
h1 (t ) (t t0 )
h(t ) h1 (t ) (t t0 ) (t t0 ) (t )
Properties of Convolution and LTI Systems
Example
Consider an LTI system with h[n]=u[n]
y[n]
x[k ]u[n k ]
; as u[n-k] = 0 for n-k<0
k
y[n]
n
x[k ]
accumulator
k
LTI inverse:
y[n]=x[n]-x[n-1]
(1st difference)
h1[n] = δ[n]-δ[n-1]
Check if really inverse:
h[n]*h1[n] = u[n]*(δ[n]-δ[n-1])
= u[n]*δ[n]-u[n]*δ[n-1]
= u[n]-u[n-1] = δ[n]
Properties of Convolution and
LTI Systems
6) Causality for LTI Systems:
y[n]
x[k ]h[n k ]
; the output y[n] must not depend on x[k] for k>n
k
h[n-k] should be zero for k>n
h[n]=0
for n<0
h(t)=0
for t<0
Practical intuition ??
(impulse response must be zero before the impulse occurs:
initial rest)
For causal LTI systems, convolution sum becomes:
y[n]
n
k
k 0
x[k ]h[n k ] h[k ]x[n k ]
Properties of Convolution and
LTI Systems
In CT: h(t)=0
becomes:
y(t )
for t<0
causal; convolution integral
t
0
x( )h(t )d h( ) x(t )d
REMARK: Causal Signal ! (zero for n<0, t<0)
Properties of Convolution and
LTI Systems
7) Stability for LTI Systems:
x[n] B, n
Consider
y[n]
h[k ]x[n k ]
k
h[k ] x[n k ]
k
B h[k ]
<B
n
k
if the impulse response is absolutely summable
h[k ]
k
then the system is stable!
Properties of Convolution and
LTI Systems
In CT: if the impulse response is absolutely integrable
h( ) d
then the system is stable!
Example: Shift h(t)=δ(t-t0)
h( ) d ( t ) d 1
0
stable!
Accumulator: h[n]=u[n]
u[k ] u[k ]
k
k 0
unstable!
Unit Step Response
Another signal used quite often to describe the behaviour of LTI
systems corresponds to the output when x[n]=u[n] or x(t)=u(t)
s[n] u[n] h[n]
h[k ]u[n k ]
k
n
h[k ]
k
h[n] s[n] s[n 1]
In continuous-time:
s(t ) u (t ) h(t )
h( )u (t )d
: the step response of a DT
LTI system is the running sum
of its impulse response
Unit Step Response
t
s (t ) h( )d
: the step response of a CT LTI system is the
running integral of its impulse response
The impulse response is the first derivative of the unit step response
ds (t )
h(t )
s ' (t )
dt
Causal LTI Systems Described by
Differential and Difference Equations
CT systems for which the input and output are
related through a linear constant-coefficient
differential equation,
e.g., RC circuit
DT systems for which the input and output are
related through a linear constant-coefficient
difference equation,
e.g., bank account
Linear Constant-Coefficient
Differential Equations
Consider
dy (t )
2 y (t ) x(t )
dt
Implicit representation of input-output relationship
Complete solution has two parts:
- particular solution, yp(t)
- homogeneous solution, yh(t)
y (t ) y p (t ) yh (t )
• yh(t) is the solution to x(t)=0, i.e., dy (t ) 2 y (t ) 0
• yp(t) depends on x(t)
dt
Linear Constant-Coefficient
Differential Equations
For x(t)=Ke3tu(t) yp(t)=Ye3t
K
Substitute yp(t) and try Y
5
for t>0
K 3t
yp(t) = e , t>0
5
yh(t)=Aest Asest+2Aest=0 s=-2 yh(t)=Ae-2t
K 3t
2t
y(t)= e Ae
, t>0
5
Linear Constant-Coefficient
Differential Equations
K 3t
y(t) e Ae 2t , t 0
5
We need initial conditions.
For causal LTI systems, we assume initial rest, y(0)=0
K
substitute: A
5
K 3t
2t
y(t)
e
e
u(t)
5
Linear Constant-Coefficient
Differential Equations
In general, Nth order linear constant-coefficient differential
equation is
d k y(t) M
d k x(t)
ak
bk
k
k
dt
dt
k 0
k 0
N
has particular solution + homogeneous solution
d k y(t)
ak
0
k
dt
k 0
initial (auxiliary) conditions are necessary.
N
for causal LTI systems, initial rest:
dy( 0 )
d N 1 y( 0 )
y( 0 )
0
N 1
dt
dt
Linear Constant-Coefficient
Differential Equations
Assume an LTI system described by Nth order linear constantcoefficient differential equation as follows
d k y(t)
x(t )
k
k 0 dt
N
In this case, we find that h(t) (impulse response) satisfies
d k h(t)
0
k
k 0 dt
with the initial (auxiliary) conditions (recall that for
causal LTI systems, initial rest):
N
dh( 0 )
d N 2 h( 0 )
d N 1h( 0 )
h( 0 )
0,
1 for t 0 and h(t ) 0 for t 0
N 2
N 1
dt
dt
dt
Check Auxiliary text 2 (Yuksel) for proof.
Linear Constant-Coefficient
Differential Equations
Example: Consider the LTI system described by
y ''(t ) 7 y '(t ) 12 y(t ) et u (t )
Let us find the impulse response first. h(t) satisfies
h ''(t ) 7h '(t ) 12h(t ) 0 with h(0) 0, h '(0) 1
The characteristic equation is:
s 2 7 s 12 0 Satisfied for s=-3,
and s=-4
c1e3t c2e4t , for t 0
h(t )
0
, t0
When the initial conditions are used, the coefficients are determined as
h(0) 0 c1 c2
c1 1, c2 1
h '(0) 1 3c1 4c2
h(t ) (e3t e4t )u(t )
You can then obtain the output by using convolution
Linear Constant-Coefficient
Difference Equations
In DT:
N
a
k 0
M
k
y[n k] bk x[n k]
k 0
N
1 M
Rearrange it, then: y[n]
bk x[n k] ak y[n - k]
a0 k 0
k 1
Recursive operation as the output at time n is a
function of previous values of input and output.
We need initial conditions: y[-1], ..., y[-N]
Linear Constant-Coefficient
Difference Equations
As a special case, N=0, then
M
bk
y[n] x[n k]
k 0 a0
(non-recursive (LTI system),
No need for initial conditions)
Its impulse response:
bn
,
0
n
M
h[n] a0
0 ,
otherwise
This is a finite duration impulse response. Such systems
are called finite impulse response (FIR) systems.
Linear Constant-Coefficient
Difference Equations
Example: Consider the difference equation
y[n] x[n]
1
y[n 1]
2
1
y[n] y[n 1] x[n]
2
recursive; initial conditions are needed
Assume x[n] Kδ[n] and initial rest, i.e., x[n]=0, y[n]=0 for n≤-1:
1
y[1] K
2
1
1
y[1] x[1] y[0] K
2
2
2
1
1
y[2] x[2] y[1] K
2
2
y[0] x[0]
n
n
1
1
1
h[n]
u[n]
y[n] x[n] y[n - 1] K for K=1,
2
2
2
For N≥1:
Infinite
Impulse
Response
(IIR)
Block Diagram Representations
Used to help in understanding and implementation of
systems
DT Case:
First-order difference equation
y[n]+ay[n-1]=bx[n] (addition, multiplication, delay)
x2[n]
x1[n]
+
x1[n]+ x2[n]
x[n]
y[n]=-ay[n-1]+bx[n]:
x[n]
b
a
ax[n]
x[n]
D
y[n]
+
D
-a
y[n-1]
x[n-1]
Block Diagram Representations
CT Case: First-order differential equation
dy(t)
1 dy(t) b
ay(t) bx(t) y(t)
x(t)
dt
a dt
a
x(t)
b/a
y(t)
+
D
-1/a
Block Diagram Representations
In real implementations, differentiators are difficult to implement and
extremely sensitive to error & noise.
t
dy(t)
bx(t) - ay(t) y(t) (bx( ) - ay( ))d
dt
-
(For initial rest, take integral from -∞ to t)
x(t)
t
∫
x( ) d
-
x(t)
b
+
∫
-a
OP-AMP !
y(t)