2-LTI Discrete Time Systems

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Systems for Digital Signal

Processing
2 – LTI discrete-time signals & systems
• Basic sequences
• Operations on sequences
• Impulse response: definition and examples
• Convolution sum and its properties
• Conditions for system stability and causality
• Linear constant coefficient difference equations
• Impulse response vs. difference equations
1
Basic sequences - 1
1. Discrete-time pulse (or Kronecker delta)
δ(n)
1 n = 0
δ( n ) = 
0 n ≠ 0 n
-8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10

2. Unit step sequence


1 n ≥ 0
u ( n) =  u(n)
0 n < 0
n
-8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10
δ(n) = u (n) − u (n − 1)

2
Basic sequences - 2
3. Real exponential sequence
x(n)
...
x ( n) = a n
... n
-8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10

4. Complex exponential sequence

( σ + jω 0 ) n
x ( n) = e

3
Basic sequences - 3
5. Sinusoidal sequence
x(n)

x(n) = A cos(nω0 + φ)
n

Def. A sequence x(n) is defined to be periodic with period N if


x(n) = x(n + N ) for all N
Example: a sinusoidal not always is periodic. It is periodic if and only if
2 kπ 2π must be a
ω 0 N = 2 kπ N =
ω0 ω0 rational number

4
Operations on sequences
Addition x + y = {x(n) + y (n)}

(Element-wise) product x ⋅ y = {x(n) y (n)}

Multiplications by a constant αx = {αx(n)}

Time shift y (n) = x(n − n0 )

n =∞
Energy of a (deterministic)
sequence
E= ∑ | x ( n) |
n = −∞
2

5
Sequences as train of impulses

x ( n) = ∑ x ( k ) δ( n − k )
k = −∞

x(n)
a-3
a1
2 7 n
-8 -7 -6 -5 -4 -3 -2 -1 1 3 4 5 6 8 9 10

a2 a7

Example
x(n) = a−3δ(n + 3) + a1δ(n − 1) + a2 δ(n − 3) + a7 δ(n − 7)

6
Impulse response of a linear system

x(n) T[] y(n)=T[x(n)]

0 0
If x(n)=δ(n) T[] h(n)=T[δ(n)]
Impulse response

The impulse response can be either finite or infinite.


– FIR: Finite Impulse Response
– IIR: Infinite Impulse Response
It the system is time-invariant the impulse response resulting from
δ(n-no) is just a shifted replica of h(n), i.e. h(n-no)
7
Example: MA
k =M
y (n ) = ∑ x (n − k )
2
1
Moving Average:
M 1 + M 2 + 1 k =− M
1

M2  1
 M1 ≤ n ≤ M 2
h (n ) = ∑ δ (n − k ) h (n ) =  M 1 + M 2 + 1
1
or
M 1 + M 2 + 1 k =− M 0 otherwise
1

... ...
x(n) y(n)
−M1 … 0 … M2

8
Example: accumulator
n

Accumulator y ( n) = ∑ x(k )
k = −∞

n
h( n) = ∑ δ( k ) = u ( n )
k = −∞

...
x(n) y(n)
0

9
I/O relationship of a linear system


x ( n) = ∑ x(x(n)
k )δ(n − k )
k = −∞
T[] y(n)=T[x(n)]

∞ ∞
y ( n) = ∑ x(k )T [δ(n − k )] = ∑ x(k )h (n)
k = −∞ k = −∞
k
Impulse response at time k

If the system is LTI


∞ ∞
y ( n) = ∑ x(k )T [δ(n − k )] = ∑ x (k )h(n − k ) = x (n )* h(n )
k = −∞ k = −∞
Convolution Sum
An LTI system is completely characterized by its impulse response

10
Basic properties
1. Commutative property x ( n) * h( n) = h( n) * x ( n)
2. Associative property x (n )* (h1 (n )* h2 (n )) = (x (n )* h1 (n ))* h2 (n )

3. If two LTI systems are x(n) h1(n) h2(n) y(n)


connected in series the total

=
impulse response is the
convolution of the impulse x(n) h1(n)*h2(n) y(n)
responses

h1(n)
4. If two LTI systems are x(n) + y(n)
connected in parallel the total
impulse response is given by h2(n)
the sum of the impulse

=
responses
x(n) h1(n)+h2(n) y(n)
11
Example
a n n≥0
x ( n) = u ( n) − u ( n − N ) h( n) =  y(n)=?
0 n<0


y ( n) = x ( n) * h( n) = ∑ x(k )h(n − k )
k = −∞
x(k)
k
0 1 2 3 4 5 6

h(k) k
0 1 2 3 4 5 6

h(0−k) k
0 1 2 3 4 5 6
12
Example (cont’d)
x(k)
k
0 1 2 3 4 5 6
compute y(0)
→ h(0−k) k
0 1 2 3 4 5 6
compute y(1)
→ h(1−k) k
0 1 2 3 4 5 6 and so on…

• Three conditions have to be considered, i.e. when n<0, when 0≤n≤N-1


and when n≥N

13
Example (cont’d)
n<0 → y (n ) = 0
− ( n +1) −1
n n
1 − a a n
− a
0≤ n≤N-1 → y (n) = ∑ a n − k =a n ∑ a − k =a n −1
=
k =0 k =0 1− a 1 − a −1
N −1 N −1
1 − a − N a n − a n− N
n>N-1 → y (n) = ∑ a ∑a
n−k −k
=a n
=a n
−1
=
k =0 k =0 1− a 1 − a −1

0
0 5 10 15 20 25 30 35 40 45 50

14
Condition for stability
Theorem: a necessary and sufficient condition for BIBO stability is that
∆ ∞
S= ∑ | h( k ) | < ∞
k = −∞

Proof of necessary condition (N.C.): If x (∙) is bounded and S<∞,


then y(∙) is bounded
∞ ∞
| y (n) |= ∑ h(k )x(n − k ) ≤ M ∑ | h(k ) | < ∞
k = −∞ k = −∞
where M = max x(n)

Proof of sufficient condition (S.C.): If x (∙) and y(∙) are bounded,


then S<∞
∞ ∞ ∞
y (n ) = ∑ h(k )x(n − k ) ≤ ∑ h(k ) x(n − k ) ≤M ∑ h(k ) <∞
k = −∞ k = −∞ k = −∞

15
Condition for causality
Theorem: a necessary and sufficient condition for system causality is
that
h(n) = 0 for n < 0
Proof:

y (n ) = ∑ h(k )x(n − k ) =
k = −∞
... + h (2 )x (n − 2 ) + h (1)x (n − 1) + h (0)x (n ) + h (− 1)x (n + 1) + h (− 2 )x (n + 2 ) + ...

Evidently, the system output at sample n depends only on x(n) for


n<0 if and only if the terms of the impulse response for n<0 are = 0

16
Condition for causality
Theorem: a necessary and sufficient condition for system causality is
that
h(n) = 0 for n < 0
Proof:

y (n ) = ∑ h(k )x(n − k ) =
k = −∞
... + h (2 )x (n − 2 ) + h (1)x (n − 1) + h (0)x (n ) + h (− 1)x (n + 1) + h (− 2 )x (n + 2 ) + ...

Evidently, the system output at sample n depends only on x(n) for


n<0 if and only if the terms of the impulse response for n<0 are = 0

17
Linear and constant coefficients
difference equations (LCDE)
LTI systems can be equivalently represented in terms of linear and
constant coefficients difference equations, i.e.
N M

∑a
k =0
k y (n − k ) =∑ bk x(n − k )
k =0

N M
ak bk
y ( n) = − ∑ y ( n − k ) + ∑ x ( n − k )
k =1 a0 k = 0 a0

This is a recursive implementation of an LTI system. In the case of


initial rest conditions (i.e. y(-1)=…=y(-N)=0) the system is causal.
18
Impulse response vs. LCDE: an example
dvc
i=C
dt dvc vc vg 1st order
vg vc =− + ordinary diff.
v g − vc dt RC RC eq.
i= Discretization through
R backward Euler method
(with step T)

 T 
vc (n )1 +  − vc (n − 1) = v g (n )
T
First-order LCDE
 RC  RC

y (n ) = αy (n − 1) + (1 − α )x (n ) x (n ) = v g (n ) and y (n ) = vc (n )
1
where α=
1 + RC
T

y (0) = h (0) = 1 − α
y (− 1) = 0
y (1) = h (1) = (1 − α )α h (n ) = (1 − α )α n u (n )
x (n ) = δ (n )
Note that if
y (2 ) = h (2 ) = (1 − α )α 2 Impulse response

19
Impulse response vs. difference
equation approach: comparison
Impulse response Difference equation

y (n ) = x (n )* h (n ) y (n ) = αy (n − 1) + (1 − α )x (n )
where

h (n ) = (1 − α )α n u (n )
For any n we need:
• 2 MUL  αy (n − 1), (1 − α )x (n )
For a given n we need: • 4 mem. loc.  α , y (n − 1), (1 − α ), x (n )
• 1 ADD  ...+ ...
 x (n )α
n −k
• n+1 MUL
n −1
• 1 MUL  α ⋅ α
 α (1 − α )
n
• 1 MUL
• 2n+2 mem. loc. αn ,...,α ,1 − α , x (0 ),..., x (n )
n LTI output computation
through difference equations
• n ADD  ∑ ....
k =0
much more efficient from
computational point of view

20
Impulse response vs. difference
equation approach: comparison (cont’d)
No. Ops (MUL+ADD) Convolution sum

~2(M+N) Difference equations

n
In general, the implementation through difference equation is scalable, while the
convolution sum is not. However, for FIR systems approaches are equivalent

Terms of conv. sum are finite FIR case No dependence on past outputs

N M

∑ ∑
M'
y (n ) = − y (n − k ) + x (n − k )
ak bk
y (n ) = ∑ h(k )x(n − k )
k =0
= a
k =1 0
a
k =0 0

h (k ) =
bk
M = M ' , ak = 0 ∀k ≠ 0 , and ∀k = 0 ,..., M
a0
21
The moving average example
Sometimes, even in the case of FIR systems, a recursive expression for the
same system can be defined to reduce computational complexity  less than M
multiply-and-accumulate (MAC) operations

Example: Moving Average 2 MUL and 3 ADD


only, regardless of M.
M
y (n ) = ∑ x (n − k ) = y (n − 1) + [x (n ) − x (n − M − 1)]
1 1 However, the memory
requirements are the
M + 1 k =0 M +1 same as a standard
FIR.

y(n-1) Unitary
delay

x(n) Attenuator y(n)


1 ++
_
M +1

M+1 sample
delay
22

You might also like