You are on page 1of 92

Pr

U ofe
N
SW ss
or
,A E
us . A
tra m
b
lia ik
a ira
ja
h
Part A: Signal Processing
h
ja
ira
Chapter 2: Discrete-Time Systems

a
lia ik
2.1 Discrete-Time Systems

b
2.2 Block Diagram Representation

tra m
2.3 Difference Equations
2.4 Classification of Discrete-Time Systems

us . A
2.4.1 Static Systems
2.4.2 Time-invariant Systems
,A E
2.4.3 Linear Systems
2.4.4 Causal Systems
or
2.4.5 Stable Systems
2.5 Linear Time-Invariant Discrete (LTD) systems
SW ss

2.5.1 Impulse response of a LTI System


2.5.2 Finite Impulse Response (FIR) System
U ofe

2.5.3 Infinite Impulse Response (IIR) System


2.5.4 Convolution
Pr

2.6 Stability of LTD Systems


2.7 Problem Sheet A2
N
Chapter 2: Discrete-Time Systems

h
ja
2.1 Discrete-Time System

a ira
„ A discrete - time system is a device or algorithm

lia ik
that operates on a discrete-time signal called the

b
input or excitation according to some well defined

tra m
rule, to produce another discrete-time signal called

us . A
the output or response.
,A E
or
„ We say that the input signal x[n] is transformed by
SW ss

the system into a signal y[n], and express the


U ofe

general relationship between x[n] and y[n] as

y[n] = H {x[n]}
Pr

(2.1)
N
h
y[n] = H {x[n]} (2.1)

ja
ira
where the symbol H denotes the transformation

a
or processing performed by the system on x[n] to

lia ik
produce y[n] (see Fig 2.1)

b
tra m
x[n] y[n]

us . A
,A E H
or
H
SW ss

x[n] y[n]
U ofe
Pr

Figure 2.1. Block diagram representation of a discrete-time System


N
h
2.2 Block Diagram Representation

ja
ira
In order to introduce a block diagram

a
„

lia ik
representation of discrete-time systems, we

b
need to define some basic blocks that can be

tra m
interconnected to form complex systems.

us . A
,A E
(a) An adder : A system that performs the
or
addition of two signal sequences to form
SW ss

another sequence, which we denote as y[n].


U ofe

Note: It is not necessary to store either one of the


Pr

sequences in order to perform the addition. In other


N

words, the addition operation is memoryless.


h
x1[n]

ja
y[n] = x1[n]+x2[n]

ira
+
x2[n]

a
lia ik
b
x1[0] x1[2]
sequence y[0] y[2]

tra m
us . A
x1[n] = {4, 5, -3} ∴y[n] = {2, 9, 0}
,A E
at n=0 n=2
or
n=0 n=1 n=2
SW ss

x2[n] = {-2, 4, 3}
U ofe

n=0 n=2
Pr

Figure 2.2. Block diagram representation of an adder, x1[n] and x2[n]


N

denote discrete-time input signals and y[n] denote a discrete-time


output signals.
h
ja
(b) A constant multiplier: This operation simply

ira
represents applying a scale factor on the input
x[n]. Note that this operation is also

a
lia ik
memoryless.

b
tra m
multiplier

us . A
,A E x[n] y[n] = ax[n]
a
or
SW ss

Figure 2.3. Block diagram representation of a


U ofe

multiplier. x[n] and y[n] denote discrete-time input


and output signals respectively. a denotes a scalar
Pr

multiplier.
N
h
sequence

ja
ira
x[n] = {2, -5, 6, 8}; a = 0.1; y[n] ={0.2, -0.5, 0.6, 0.8}

a
lia ik
b
tra m
at n=0 n=3 at n=0 n=3

us . A
(c) A Unit Delay Element : The unit delay is a special
,A E
system that simply delays the signal passing through it
or
by one sample.
SW ss

If the input signal is x[n], the output is x[n-1]. In fact,


the sample x[n-1] is stored in memory at time n-1 and
U ofe

it is recalled from memory at time n to form y[n] = x[n-1].


Pr

Thus this basic building block requires memory


N
h
ja
ira
„ The use of symbol T or z-1 to denote the unit of
delay.

a
lia ik
b
tra m
x[n] y[n] = x[n-1]

us . A
,A E T
or

Figure 2.4. Block diagram representation of a


SW ss

unit delay. T denotes the sampling period.


U ofe
Pr
N
Example:

h
unit delay

ja
ira
x[n] y[n] = x[n-1]

a
Z-1

lia ik
b
tra m
at n= -1; n=0; n=1

us . A
,A E x[n] = {0, 1, 0, 5, 7, -2, -1, 0}
or
SW ss

y[n] = {0, 1, 0, 5, 7 , -2, -1}


U ofe

y[0] y[1] y[2] … y[6]


Pr
N

{ y[n] = x[n-1]; y[0]=x[0-1]=x[-1]; y[1] = x[1-1]=x[0];…}


h
Note: Normally a combination of adders, multipliers

ja
and unit delays form a complex discrete-time system.

ira
„ % Exercise 1. Shifting
„ % discrete-time signals

a
„ %
% We use the equations from

lia ik
„

„ % the problem sheet A2, Q6b.

b
„ discrete_time = -20:19;
unit_step = [zeros(1,20) ones(1,20)];

tra m
„

„ % We now learn another way


% of shifting a signal.

us . A
„

„ % Shifting to the left means


„ % delaying a signal by some
„ % discrete-time.
,A E
„ unit_step_shifted_left = zeros(1,40);
% initializing the vector with zeros.
or
„ unit_step_shifted_left(1:38) =
unit_step(3:40);
% We replace the first 38
SW ss

„ % samples of
„ % unit_step_shifted_left
U ofe

„ % with the last 38


„ % samples of the original
„ % unit_step.
Pr

„ %
„ % Shifting to the right means
N

„ % advancing a signal by some


„ % discrete-time.
h
„ unit_step_shifted_right unit step

ja
= zeros(1,40);
1

unit_step_shifted_right(

ira
„
3:40) = 0.5

unit_step(1:38);

a
„ %

lia ik
0
„ figure -20 -15 -10 -5 0 5 10 15 20

b
unit step shifted left
„ subplot(3,1,1) 1

tra m
„ stem(discrete_time,
unit_step)

us . A
0.5

„ title('unit step')
„ subplot(3,1,2)
,A E 0
„ stem(discrete_time, -20 -15 -10 -5 0 5 10 15 20

unit_step_shifted_left)
unit step shifted right
or
1

„ title('unit step shifted


SW ss

left') 0.5
„ subplot(3,1,3)
U ofe

„ stem(discrete_time,
unit_step_shifted_right) 0
-20 -15 -10 -5 0 5 10 15 20

title('unit step shifted


Pr

„
right')
N
2.3 Difference Equations

h
ja
ira
A discrete-time system consisting of

a
„

lia ik
combinations of adders, multipliers and unit

b
delays can always be described by a set of

tra m
us . A
difference equations. The equations would be
ordinary algebraic equations if no delays were
,A E
present.
or
SW ss
U ofe
Pr
N
h
Examples:

ja
ira
(a) y[n] = x[n-2]

a
lia ik
b
tra m
us . A
x[n] x[n-1] y[n] = x[n-2]
,A E T T
or
T - Unit sample delay
SW ss

sampling period
U ofe
Pr
N
1 1 1

h
(b) y[n] = x[n] + x[n − 1] + x[n − 2]

ja
2 4 4

a ira
lia ik
b
tra m
x[n] x[n-1] x[n-2]

us . A
T T
,A E
or

0.5 0.25 0.25


SW ss

y[n]
U ofe

0.5 x[n]
+
Pr
N
y [n ] = x[n ] + 0.25 y [n − 1]

h
(c)

ja
a ira
lia ik
b
x[n] y[n]

tra m
+

us . A
y[n-1]
,A E T
0.25
or
SW ss

4
U ofe

(d) y[ n] = ∑ x[n − k ] = x[n] + x[n − 1] + x[n − 3] + x[n − 4]


k =0
Pr
N
Example:

h
ja
y[n] = a0 x[n] + a1 x[n − 1] − b1 y[n − 1]

a ira
Draw a system implementation for the above

lia ik
„

difference equation.

b
tra m
us . A
x[n] a0 v[n] y[n]
,A E + +
T T
or
SW ss

a1 -b1
U ofe

System 1 Feedforward Part Feedback Part System 2


Pr
N

Figure 2.5. Direct Form I structure


h
x[n] a0 v[n] y[n]

ja
+ +

ira
T T

a
-b1

lia ik
a1

b
tra m
System 1 System 2

us . A
Feedforward Part Feedback Part
,A E Figure 2.5. Direct Form I structure
or
„ We can write the above difference equation as a set
SW ss

of two equations
v[n] = a0 x[n] + a1 x[n − 1] - system 1
U ofe

y[n] = v[n] − b1 y[n − 1]


Pr

„ - system 2
N
h
ja
x[n] v[n] y[n]
System 1 System 2

ira
Cascade

a
structure

lia ik
b
x[n] p[n] y[n]

tra m
System 2 System 1

us . A
Figure 2.6. Two systems forming a cascade structure can be
,A E
interchanged without affecting the final output signal.
or
SW ss
U ofe

Without changing the input-output relationship, we


can reverse the ordering of the two systems in the
Pr

cascade representation.
N
h
ja
ira
a0
x[n] p[n] y[n]

a
+ +

lia ik
b
p[n-1] p[n-1]
T T

tra m
us . A
,A E -b1 a1
or
Feedback Part Feedforward Part
System 2 System 1
SW ss

Figure 2.7. Direct Form II structure


U ofe
Pr
N
h
ja
ira
a0

a
x[n] p[n] y[n]

lia ik
+ +

b
tra m
T

us . A
,A E -b1 p[n-1] a1
or
SW ss

Figure 2.8. Canonical form.


U ofe
Pr
N
There is no need for two delay operations, they can

h
„

ja
be combined into a single delay as shown in Figure

ira
2.8. Since delay operations are implemented with
memory in a computer, the implementation of Figure

a
2.8 would require less memory compared to the

lia ik
implementation of Figure 2.7.

b
tra m
us . A
„ It can be proven that both block diagrams Figure 2.5
and Figure 2.7/Figure 2.8 represent the same
,A E
difference equation.
or
SW ss

a0 a0
x[n] p[n] y[n] x[n] p[n] y[n]
+ + + +
U ofe

p[n-1] T T p[n-1]
T
-b1 a1
Pr

-b1 p[n-1] a1
Feedback Part Feedforward Part
System 2 System 1
N

Figure 2.8. Canonical


Figure 2.7. Direct Form II structure
form.
Proof:

h
ja
y[n] = a0 x[n] + a1 x[n − 1] − b1 y[n − 1] (2.2)

ira
From Figure 2.7:

a
lia ik
p[n] = x[n] − b1 p[n − 1]

b
(2.3)

tra m
y[n] = a0 p[n] + a1 p[n − 1]

us . A
(2.4)
,A E
Substituting n → n-1 in equation (2.4),
or

y[n − 1] = a0 p[n − 1] + a1 p[n − 2]


SW ss

(2.5)
U ofe

Multiplying equation (2.5) by -b1,


Pr

b1 y[n − 1] = a0b1 p[n − 1] + a1b1 p[n − 2] (2.6)


N
h
Adding equation (2.4) and (2.6),

ja
ira
y[n] + b1 y[n − 1] = a0 p[n] + a0b1 p[n − 1] + a1 p[n − 1] + a1b1 p[n − 2]

a
144424443 1444 424444 3

lia ik
a0 x [n ] a1x [n −1]

b
tra m
Therefore,

us . A
y[n] = a 0 x[n] + a1 x[n − 1] − b1 y[n − 1]
,A E
or
SW ss

as in equation (2.2)
U ofe
Pr
N
2.4 Classification of Discrete-

h
ja
Time Systems [8]

ira
In the analysis as well as in the design of

a
„

lia ik
systems, it is desirable to classify the systems

b
tra m
according to the general properties that they

us . A
satisfy. For a system to possess a given
,A E
property, the property must hold for every
or
possible input signal to the system. If a
SW ss

property holds for some input signals but for


U ofe

others, the system does not possess the


property.
Pr
N
h
ja
ira
„ General Categories are:

a
lia ik
„ Static systems

b
„ Time - invariant systems

tra m
us . A
„ Linear systems
,A E
„ Causal systems
or
„ Stable systems
SW ss
U ofe
Pr
N
2.4.1 Static Systems

h
ja
A discrete-time system is called static or memoryless

ira
„

if its output at any instant ‘n’ depends at most on the

a
input sample at the same time, but not on past or

lia ik
future samples of the input.

b
tra m
Example: y[n] = ax[n]

us . A
,A E y[n] = nx[n] + bx 3 [n]
Both are static or memoryless.
or

On the other hand, the systems described by the


SW ss

following input-output relations, such as


U ofe

y[n ] = x[n ] + 3 x[n − 1]


are dynamic systems or
Pr

N
y[n ] = ∑ x[n − k ] system with memory.
N

k =0
2.4.2 Time-invariant systems

h
ja
ira
„ A time-invariant system is defined as follows:

a
x[n − n0 ] ⎯⎯→ y[n − n0 ]

lia ik
H

b
tra m
us . A
where y[n] = H{x[n]}.
,A E
or
Specifically, a system is time invariant if a
SW ss

time shift in the input signal results in an


U ofe

identical time shift in the output signal.


Pr
N
Example: Determine if the system is time

h
ja
variant or time invariant.

ira
y[n] = H {x[n]} = nx[n] (2.7)

a
lia ik
The response of this system to x[n-k] is

b
„

tra m
w[n] = nx[n − k ]

us . A
Now if we delay y[n] in (2.7) by k units in
„
,A E
time, we obtain
or

y[n − k ] = (n − k )x[n − k ]
SW ss

= nx[n − k ] − kx[n − k ]
U ofe

This system is time variant, since y[n − k ] ≠ w[n]


Pr

„
N
h
ja
2.4.3 Linear Systems

a ira
A linear system is defined as follows:

lia ik
„

b
tra m
a1 x1 [n] + a2 x2 [n] ⎯⎯→ a1 y1 [n] + a2 y2 [n]

us . A
H
(2.8)
,A E
or
where a1 and a2 are arbitrary constants.
SW ss
U ofe
Pr
N
h
Example: Three sample averager

ja
ira
1
y[n] = {x[n + 1] + x[n] + x[n − 1]} = H {x[n]}

a
lia ik
3

b
x[n] ⎯⎯→
H
y[n]

tra m
1
H {ax1 [n] + bx2 [n]} = {ax1 [n + 1] + bx2 [n + 1]

us . A
,A E 3
+ ax1 [n] + bx2 [n]
or
+ ax1 [n − 1] + bx2 [n − 1]}
SW ss

= [ay1 [n] + by2 [n]]


U ofe
Pr

The 3-sample averager is a linear system.


N
h
ja
Example:

a ira
y [n ] = H {x [n ]} = x 2 [n ]

lia ik
H {ax 1 [n ] + bx 2 [n ]} = {ax 1 [n ] + bx 2 [n ]}

b
2

tra m
= a 2 x12 [n ] + b 2 x 22 [n ] + 2 abx 1 [n ]x 2 [n ]

us . A
,A E
which is not equal to ax12 [n ] + bx 22 [n ]
or
SW ss
U ofe

This system is nonlinear.


Pr
N
h
ja
Example :

a ira
lia ik
y [n ] = nx [n ] = H { x [n ] }

b
tra m
H { ax1 [n ] + bx 2 [n ] } = anx 1 [n ] + bnx 2 [n ]
us . A = ay 1 [n ] + by 2 [n ]
,A E
or
SW ss

The system is linear.


U ofe
Pr
N
h
2.4.4 Causal systems

ja
ira
„ A system is said to be causal if the output of

a
the system at any time ‘n’ depends only on

lia ik
b
present and past inputs, but does not depend

tra m
on future inputs.

us . A
If a system does not satisfy this definition, it
„
,A E
is called noncausal. Such a system has an
or

output that depends not only on present and


SW ss

past inputs but also on future inputs.


U ofe
Pr
N
h
Example :

ja
a ira
y[n] = x[n] − x[n − 1] → Causal

lia ik
b
y[n] = ax[n] → Causal

tra m
us . A
y[n] = x[n] + 3 x[n + 4] → Noncausal
,A E
y[n] = x[− n] → Noncausal
or
SW ss
U ofe

{Let n = -1 ⇒ y[-1]= x [1], the output at


n = -1 depends on the input at n = 1.}
Pr
N
h
„ Discrete - time sequence is called

ja
causal if it has zero values for n<0.

a ira
y[n]

lia ik
Causal

b
& Stable

tra m
us . A
,A E y[n] = ( ) u[n]
2 n
3
or

n
SW ss
U ofe
Pr

Figure 2.9. An example of causal discrete-time


N

sequence.
h
2.4.5 Stable Systems

ja
ira
„ A discrete signal x[n] is bounded if

a
there exists a finite M such that

lia ik
b
|x[n]| < M for all n.

tra m
us . A
„ A discrete - time system in Bounded
,A E
Input-Bounded Output (BIBO) stable if
or

every bounded input sequence x[n]


SW ss

produced a bounded output sequence.


U ofe

If x[n]max ≤ A, then y[n]max ≤ B


Pr
N
h
ja
Example:

a ira
The discrete - time system

lia ik
„

b
y[n] = ny[n − 1] + x[n], n > 0

tra m
us . A
is at rest [i.e. y[-1]=0]. Check if the system is
,A E
BIBO stable.
or
SW ss
U ofe
Pr
N
If x[n]=u[n], then |x[n]| ≤ 1. But for this

h
„

ja
bounded input, the output is

ira
n = 0 → y[0] = x[0] = 1

a
n = 1 → y[1] = 1 y[0] + x[1] = 2

lia ik
b
n = 2 → y[2] = 2 y[1] + x[2] = 5

tra m
us . A
,A E M M

Which is unbounded. Hence the system


or
„

is unstable.
SW ss
U ofe
Pr
N
2.5 Linear Time-Invariant Discrete

h
ja
(LTD) Systems

ira
Transformation of Discrete-Time signals :

a
lia ik
b
A discrete-time signal, x[n] may be shifted in

tra m
„

time (delayed or advanced) by replacing the

us . A
variables n with n-k where k > 0 is an integer
,A E
or
x[n-k] => x[n] is delayed by k samples
SW ss

x[n+k] => x[n] is advanced by k samples


U ofe
Pr
N
h
„ For example consider a shifted version of the unit

ja
impulse function (see Figure 2.10). If we multiply an

ira
arbitrary signal x[n] by this function, we obtain a

a
signal that is zero everywhere, except at n = k.

lia ik
∴ y[n] = x[n]⋅ δ [n − k ] = x[k ]⋅ δ [n − k ]

b
(2.9)

tra m
us . A
δ[n-k]
x[n]
,A E 1 1
or
n n
0 1 2 k-1 k k+1 0 1 2 k-1 k k+1
SW ss

y[n]
U ofe

Figure 2.10. Multiplying a discrete-time


signal, x[n], with a shifted unit impulse
1 function, δ[n-k], produces a discrete-
Pr

n time signal whose sample is zero except


N

0 1 2 k-1 k k+1 at n=k.


h
An arbitrary sequence can then be expressed

ja
„

ira
as a sum of scaled and delayed unit impulses.

a
p[n]

lia ik
a4

b
a-3 a1

tra m
us . A
-3
,A E -2 -1 0 1 2 3 4 5 6 7 n
a2 a7
or

p[n] = a-3δ[n+3] + a1δ[n-1] + a2 δ[n-2] + a4 δ[n-4]+ a7-δ[n-7]


SW ss
U ofe

Figure 2.11. An example of expressing arbitrary discrete-time


Pr

sequences as a sum of scaled and delayed unit impulses.


N
h
„ More generally, the discrete-time sequence can be

ja
expressed according to

a ira

x[n ] = ∑ x[k ]δ [n − k ]

lia ik
(2.10)

b
k = −∞

tra m
us . A
„ For real time signals

,A E
x[n] = ∑ x[k ]δ [n − k ]
or
k =0
SW ss

„ and for a real-time signal with a finite number of


U ofe

samples N. N −1
x[n] = ∑ x[k ]δ [n − k ] (2.11)
Pr

k =0
N
h
„ If x[n] has finite duration, the infinite sum in

ja
equation (2.11) may be replaced by a finite sum.

ira
N1
That is if x[n] ≠ 0 for –N2 ≤ n ≤ N1, x[n] = ∑ x[k ]δ [n − k ]

a
lia ik
k =− N 2

b
tra m
x[n]

us . A
,A E
or
SW ss

N2 0 N1 n
U ofe

Figure 2.12. An example of finite duration


Pr

discrete-time sequences.
N
h
„ Equation (2.11) is a special form of convolution.

ja
Generally, the convolution of two sequences x[n] and

ira
y[n] is defined as

a
lia ik

x[n ] * y[n ] = ∑ x[k ]y[n − k ]

b
tra m
k = −∞

us . A

convolution
,A E = ∑ x[n − k ]y[k ]
k = −∞
( 2.12)
or
„ convolution is commutative:
SW ss
U ofe

ie. x[n] * y[n] = y[n] * x[n]


Pr
N
2.5.1 The impulse Response of a

h
ja
LTI system

ira
For example consider the discrete-time system, H,

a
„

lia ik
shown in Figure 2.13

b
tra m
x[n] System H
T

us . A
,A E b
a v[n] c y[n]
or
+ + T
SW ss
U ofe

Figure 2.13. An example of discrete-time system, whose


Pr

input and output are represented by x[n] and y[n],


N

respectively.
h
x[n] System H

ja
T

ira
b
a v[n] c y[n]
+

a
+ T

lia ik
b
tra m
Difference equation for the system H :

us . A
v[n] = ax[n] + bx[n − 1] + y[n]
,A E
or
SW ss

y[n] = cv[n − 1] (2.13)


U ofe

From the above difference equations, y[n] can be


determined for a given input.
Pr
N
Let x[n] = δ[n] Unit impulse

h
„

ja
ira
„ Assume v[n] = 0 for n ≤0 ⇒ y[n] is also initially zero
for n ≤ 0. Substituting n = 0,1,2,... in equation

a
lia ik
(2.13), we obtain

b
tra m
„ n=0 v[0]=ax[0]+bx[-1]+y[0]=

us . A
,A E a⋅1+b⋅0+0=a
⇒ y[1] = a⋅c
or
SW ss

„ n=1 v[1] = ax[1] + bx[0] + y[1] =


a⋅0 + b⋅1+ a⋅c= b+ac
U ofe

⇒ y[2] = cv[1] = c(b+ac)


Pr
N
h
„ n=2 v[2] = ax[2] + bx[1] + y[2] =

ja
0 + 0 + c(b+ac)

ira
⇒ y[3] = cv[2] = c2(b+ac)

a
lia ik
b
...

tra m
„ n=n–1 v[n-1] = bcn-2 + acn-1

us . A
,A E ∴ y[n] = c v[n-1] = bcn-1 + acn
or

∴ y[n] = [ ] = n −1
+ ac
SW ss

n
x [n ]=δ [n ]
h n bc
U ofe

Impulse response
Pr
N
Δ
The response y[n]= h[n] to an impulse excitation

h
„

ja
(x[n] = δ [n]) is known as the impulse response and it

ira
is a very important characteristic of a discrete

a
system.

lia ik
b
tra m
x[n] y[n]

us . A
H
,A E
If x[n] = δ[n], then y[n] = h[n]. The output tells us
or
„

the system behaviour as the system is being hit by all


SW ss

input frequencies. h[n] completely characterizes the


U ofe

system.
Pr
N
h
„ We have

ja
ira
δ[n] H h[n]

a
lia ik
and since the system is time invariant, the response

b
„

tra m
to δ[n-k] must be h[n-k]

us . A
H
δ[n-k]
,A E h[n-k]
or
SW ss

„ Therefore
U ofe

x[k]δ[n-k] H x[k]h[n-k]
Pr
N
h
ja
ira
„ Now recall that each x[n] can be written as a
weighted sum of shifted unit impulse (see equation

a
lia ik
(2.10)). Therefore

b
tra m
∞ ∞

∑ [ ]δ [ − ] ⎯⎯→
H
∑ x[k ]h[n − k ]
us . A
x k n k
,A E k = −∞ k = −∞

x[n] x[n] * h[n] (see equation (2.12))


or
and
SW ss

x[n ] ⎯⎯→
H
y[n ] = x[n ]* h[n ]
U ofe
Pr
N
h
„ The response to an arbitrary input signal x[n] is the

ja
convolution of x[n] with the impulse response of the

ira
system.
System H:

a
lia ik
x[n] H y[n]

b
tra m
us . A
impulse response of the system
y[n] = x[n]* h[n]
,A E
(2.15)
or

y[n] = x[n]* h[n] = ∑ x[k ]h[n − k ]
SW ss

k = −∞
U ofe


y[n] = h[n]* x[n] = ∑ h[k ]x[n − k ] (2.16)
Pr

k = −∞
N

where h[n]=H{δ[n]}.
2.5.2 Finite Impulse Response

h
ja
(FIR) System

ira
If the impulse response of a LTI system is of finite

a
„

lia ik
duration, the system is said to be Finite Impulse

b
Response (FIR).

tra m
us . A
x[n] = δ[n] x[n] = δ[n]
,A E T 2
x[n] -1/2
or
2
SW ss

0 1 2 n y[n] 1 n
+ −
Input 2
U ofe

Impulse Response
Non-recursive system
Pr
N

Figure 2.14. An example of LTI systems with finite impulse


response.
h
ja
ira
x[n] = δ[n]

a
„ y[n] = 2x[n] - 0.5x[n-1]

lia ik
„ n=0 y[0] = h[0] = 2x[0] – 0.5x[-1] = 2

b
tra m
„ n=1 y[1] = h[1] = 2x[1] – 0.5x[0] = -0.5

us . A
„ n=2 y[2] = h[2] = 2x[2] – 0.5x[1] = 0
,A E
or
„ n=n 0
SW ss
U ofe
Pr
N
2.5.3 Infinite Impulse response

h
ja
(IIR) system

ira
If the impulse response of a linear time-invariant

a
„

lia ik
system is of infinite duration, the system is said to be

b
an Infinite Impulse Response (IIR) system.

tra m
us . A
,A E x[n] = δ[n] recursive system
v[n] 1 y[n]
x[n]
+
or
T
SW ss

0 1 2
U ofe

n
Input
Pr

Figure 2.15. An example of discrete systems with infinite impulse


N

response.
h
ja
v[n ] = x[n ] + y[n ]

ira
y[n ] = 1.v[n − 1]

a
lia ik
b
tra m
us . A
If x[n] = δ[n], calculate h[n]
,A E
„
or

for n=0,1,2,...
SW ss
U ofe
Pr
N
h
ja
Example:

a ira
Find the impulse response h[n] of the following first-

lia ik
„

order recursive system.

b
tra m
⎧ay[n − 1] + x[n ] n≥0

us . A
y[n ] = ⎨
,A E ⎩ 0 otherwise
or

To find h[n], we let x[n] = δ[n] and apply the zero


SW ss

initial condition.
U ofe
Pr
N
h
n = 0, y[0] = h[0] = ay[-1] + δ[0] = 1

ja
„

ira
„ n = 1, y[1] = h[1] = ay[0] + δ[1] = a

a
„ n = 2, y[2] = h[2] = ay[1] + δ[2] = a2

lia ik
b
tra m
us . A
„ n = n, y[n] = h[n] = an for n ≥ 0
,A E
y[n] = h[n] = 0 for n < 0, because δ[n] is
or
„
SW ss

zero for n < 0 and


U ofe

„ y[-1]= 0.
Pr
N
h
„ Hence, h[n]=anu[n] for all n

ja
ira
h[n]

a
h[n]

lia ik
0<a<1 a>1
1

b
tra m
1

us . A
,A E
0 n 0 n
or
x[n] y[n] ≡ x[n] y[n]
SW ss

h[n]=anu[n] +
U ofe

T
Pr

y[n] = x[n] * h[n] a


N
h
Example:

ja
a ira
„ Find the impulse response h[n] of the

lia ik
following fourth order non-recursive system.

b
tra m
y[n ] = a0 [n] + a1 x[n − 1] + a2 x[n − 2] +

us . A
a3 x[n − 3] + a4 x[n − 4]
,A E
or
SW ss

„ To find h[n], we let x[n] = δ[n].


U ofe
Pr
N
„ n=0 h[0] = a0δ[0] +a1δ[-1]+a2δ[-2]+

h
a3δ[-3] +a4δ[-4] = a0

ja
ira
„ n=1 h[1] = a0δ[1] + a1δ[0] + a2δ[-1]+

a
a3δ[-2]+a4δ[-3] = a1

lia ik
b
tra m
„ n=2 h[2] = a0δ[2] + a1δ[1] + a2δ[0] +

us . A
a3δ[-1] + a4δ[-2]= a2
,A E
n=3 h[3] = a0δ[3] + a1δ[2] + a2δ[1] +
or
„

a3δ[0] + a4δ[-1] = a3
SW ss
U ofe

„ n=4 h[4] = 0 + 0 + 0 + 0 + a4δ[0] = a4


Pr

h[5] = 0 + 0 + 0 + 0 + a4δ[1] = 0
N

„ n=5
h
„ For n ≥ 5, h[n] = 0, since the nonzero value of δ[n]

ja
has moved out of the memory of this system.

a ira
x[n]
δ[n] T T T T

lia ik
b
tra m
us . A
y[n]=h[n]
,A E +
or
h[n] a0, a1, a2, a3 & a4 are
SW ss

called coefficients (+
a2
or -) or constants
U ofe

a0
a1 a3
Pr
N

a4
Example:

h
ja
Two structures are shown below:

ira
„

(a) Write the difference equation

a
(b) Calculate the impulse response

lia ik
b
x[n]
T T

tra m
us . A
1 1 1

,A E y[n]
+
or
SW ss

x[n]
T T
U ofe

1 1 1
Pr

y[n]
+
N
x[n]
T T

h
ja
ira
1 1 1

a
lia ik
y[n]
+

b
tra m
us . A
„ Structure 1 :
,A E
y[n] = x[n] + x[n-1] + x[n-2]
or

h[n]=y[n]|x[n] =δ[n]
SW ss
U ofe

h[n] = δ[n] + δ[n-1] + δ[n-2]


Pr

h[0]=1; h[1] = 1; h[2] = 1 and h[n] = 0 n≥3


N
x[n] T T

h
ja
ira
+1 -1

a
lia ik
y[n]

b
+

tra m
us . A
„ Structure 2 :
,A E
y[n] = x[n] - x[n-2]
or

h[n]=y[n]|x[n] =δ[n]
SW ss
U ofe

h[n] = δ[n] - δ[n-2]


Pr

h[0]=1; h[1] = 0; h[2] = -1 and h[n] = 0 n≥3


N
2.5.4 Convolution

h
ja
ira

y[n] = x[n]* h[n] = ∑ x[k ]h[n − k ]

a
lia ik
k = −∞

b

tra m
y[n] = h[n]* x[n] = ∑ h[k ]x[n − k ]
us . A
,A E k = −∞

Commutative Law:
or

x[n]* h[n] = h[n]* x[n]


SW ss
U ofe

Associative Law:
Pr

(x[n]* h1 [n]) * h2 [n] = x[n]* (h1 [n]* h2 [n])


N
h
ja
a ira
x[n] y[n]

lia ik
y[n]

h1[n] h2[n] x[n]
h[n]= h1[n]*h2[n]

b
tra m
us . A
y[n]

x[n]
,A E y[n] x[n]
h2[n] h1[n]
h1[n] h2[n]
or
SW ss
U ofe
Pr
N
h
ja
Distributive Law:

a ira
x[n]* (h1[n]* h2 [n]) = x[n]* h1[n] + x[n]* h2 [n]

lia ik
b
tra m
us . A
h1[n]
,A E
x[n] y[n] y[n]
or
+ ≡ h[n]= h1[n]+ h2[n]
x[n]
SW ss

h2[n]
U ofe
Pr
N
h
Graphical computation of convolution.

ja
ira
„ The convolution of two signals x[n] and h[n] is

a
shown in steps in the diagram below.

lia ik
b
h[n] x[n]

tra m
1

us . A
,A E
i
or
0 1 2 3 4 n
SW ss

h[-i]
U ofe

1
Step 1: Fold h[i] over in
Pr

time; this gives h[-i].


N

i
h
ja
h[2-i]
Step 2:

ira
Shift h[-i] through a distance n, This 1
gives h[n-i].

a
We have chosen n=2 in the diagram.

lia ik
b
tra m
0 1 2 3 4 5 i

us . A
,A E x[i]h[2-i]
or
Step 3: 1
SW ss

Multiply x[i] by h[n-i]


U ofe

0 1 2 3 4 5 i
Pr
N
h
y[n]
Step 5:

ja
1
Vary n from -∞ to ∞. This gives y[n].

a ira
lia ik
0 12 3 4 5 i

b
tra m
y[n]

us . A
Step 4:
Sum this product over all i. This
,A E y[2]
gives the signal value y(2),
or
SW ss

0 1 2 34 5 n

y[2] = ∑ x[i ]h[2 − i ]
U ofe

i = −∞
Pr
N
h
Exercise :

ja
ira
„ Compute the convolution y[n] = x[n] * h[n] of the

a
following pair of signals, using

lia ik
(a) Equation (2.16)

b
(b) Graphical computation.

tra m
us . A
x[n] h[n]
,A E
0.5 3
or
2
SW ss

1
U ofe

-4 -3 -2 -1 2 n 0 1 2 3 4 n
Pr
N
h
ja
Answer :

a ira
lia ik
y[n]=x[n]*h[n]

b
tra m
3.0

us . A
,A E 2.5
1.5 1.5
0.5
or
SW ss

0 1 2 3 4 5 n
U ofe
Pr
N
% Exercise 3. Convolution &

h
„

ja
„ % filtering

ira
„ %
„ % Matlab has a built-in function

a
% to perform convolution, which

lia ik
„

% is called `conv'.

b
„

% Use `help' command to find out

tra m
„

% more about `conv'.

us . A
„

„ %
% We now evaluate the sequences
„
,A E
„ % x, h and y from the previous
or
„ % example.
SW ss

„ sequence_x = [zeros(1,4) ones(1,3)*0.5 zeros(1,3)]


sequence_h = [zeros(1,4) 3:-1:1 zeros(1,3)]
U ofe

„ sequence_y = conv (sequence_x, sequence_h);


discrete_time = -4:5;
Pr

„
N
h
„ % Plot the sequences 1
x[n]

ja
„ figure 0.8

subplot(3,1,1)

ira
„ 0.6

„ plot(unit_step) 0.4

a
„ stem(discrete_time, 0.2

sequence_x)

lia ik
0
-5 -4 -3 -2 -1 0 1 2 3 4 5

axis([-5 5 0 1]) h[n]

b
„ 3
title ('x[n]')

tra m
„

„ subplot(3,1,2) 2

us . A
„ stem(discrete_time, 1
sequence_h)
axis([-5 5 0 3])
„
,A E 0
-5 -4 -3 -2 -1 0 1 2 3 4 5
„ title('h[n]') y[n]
or
3
„ subplot(3,1,3)
extended_discrete_time = -
SW ss

„ 2

8:10;
stem(extended_discrete_time,
U ofe

1
„
sequence_y) 0
„ axis([-5 5 0 3]) -5 -4 -3 -2 -1 0 1 2 3 4 5
Pr

„ title('y[n]')
N
h
ja
Example:

ira
„ Determine the impulse response for the cascade of

a
two linear time-invariant systems having impulse

lia ik
b
response.

tra m
us . A
n n
⎛1⎞ ⎛1⎞
h1 [n] = ⎜ ⎟ u[n] and h2 [n] = ⎜ ⎟ u[n]
⎝ 2⎠ ⎝ 4⎠
,A E
or
SW ss
U ofe

x[n] p[n] y[n]


h1[n] h2[n]
Pr
N
h
ja
ira
y[n] = p[n] * h2[n] and p[n]=x[n]*h1[n]

a
= (x[n] * h1[n]) * h2[n]

lia ik
b
= x[n] * (h1[n] * h2[n]),

tra m
{using associative law: h1[n] * h2[n] =h[n]}

us . A
,A E
or
x[n] h[n] y[n]
SW ss
U ofe
Pr
N
h

ja
h[n] = h1 [n]* h2 [n] = ∑ h [k ]h [n − k ]

ira
1 2
k =−∞

a
∞ k n−k k n−k
⎛1⎞ ⎛1⎞ ⎛1⎞ ⎛1⎞

lia ik
n
= ∑ ⎜ ⎟ u[k ]⋅ ⎜ ⎟ u[n − k ] = ∑ ⎜ ⎟ ⎜ ⎟

b
k =0 ⎝ 2 ⎠ ⎝ 4⎠ k =0 ⎝ 2 ⎠ ⎝ 4 ⎠

tra m
us . A
n n n
⎛1⎞ ⎛ 1 ⎞ n+1
=⎜ ⎟
,A E ∑ (2) = ⎜ ⎟ (2 − 1)
k

⎝ 4⎠ k =0 ⎝ 4⎠
or

⎡ ⎛1⎞ ⎤
SW ss

n n
⎛1⎞
h[n ] = ⎜ ⎟ ⎢2 − ⎜ ⎟ ⎥ for n≥0
U ofe

⎝ 2 ⎠ ⎢⎣ ⎝ 2 ⎠ ⎥⎦
Pr

h[ n] = 0 for n≤0
N

h[n] = h2 [n]* h1 [n] = ∑ h [k ]h [n − k ]

h
2 1
k =−∞

ja
∞ k n−k
⎛1⎞ ⎛1⎞
= ∑ ⎜ ⎟ u[k ]⎜ ⎟ u[n − k ]

ira
k =−∞ ⎝ 4 ⎠ ⎝ 2⎠

a
k n−k
n
⎛1⎞ ⎛1⎞
= ∑⎜ ⎟ ⋅⎜ ⎟

lia ik
k =0 ⎝ 4 ⎠ ⎝ 2⎠

b
tra m
n n k −k
⎛1⎞ ⎛1⎞ ⎛1⎞
=⎜ ⎟ ∑ ⎜ ⎟ ⋅⎜ ⎟

us . A
⎝ 2⎠ k =0 ⎝ 4 ⎠ ⎝ 2⎠

∴ ⎡ ⎛1⎞ ⎤
n n k n n
⎛1⎞ ⎛1⎞ ⎛1⎞
∑ h[n] = ⎜ ⎟ ⎢2 − ⎜ ⎟ ⎥u[n]
=⎜ ⎟
,A E ⎜ ⎟
⎝ 2⎠ k =0 ⎝ 2 ⎠
⎝ 2 ⎠ ⎢⎣ ⎝ 2 ⎠ ⎥⎦
or
n +1
⎛1⎞
n 1− ⎜ ⎟
SW ss

⎛ ⎞
1 ⎝ 2⎠
=⎜ ⎟
⎝ 2 ⎠ 1− 1
U ofe

2
⎡ ⎛ ⎞ ⎤
Pr

n n
⎛ ⎞
1 1
= ⎜ ⎟ ⎢2 − ⎜ ⎟ ⎥ for n≥0
N

⎝ 2 ⎠ ⎢⎣ ⎝ 2 ⎠ ⎥⎦
h
Example :

ja
a ira
„ Determine the response of the (relaxed)

lia ik
system characterised by the impulse response

b
tra m
us . A
x[n] ⎛1⎞
n y[n]
h[n] = ⎜ ⎟ u[n]
,A E
⎝2⎠
or
SW ss
U ofe
Pr
N
h

y[n] = ∑ h[k ]x[n − k ]

ja
ira
k = −∞

= ∑( ) u[k ]⋅ 2n − k u[n − k ]

a
1 k

lia ik
2

b
tra m
n k n k

= ∑ ( 12 ) 2n − k = 2n ∑ ( 14 )

us . A
k =0 k =0

1− ( )
,A E 1 n +1
=2 n 4
or
1− 1
4
SW ss
U ofe

2 n +1 ⎛ 1 ⎞ ⎤
⎡ n +1

y[n ] = ⎢2 − ⎜ ⎟ ⎥u[n ]
3 ⎢⎣ ⎝ 2 ⎠ ⎥⎦
Pr
N
h
2.6 Stability of Linear Time-

ja
Invariant Systems [11]

a ira
lia ik
„ An LTD system is stable if, and only if, the

b
tra m
stability factor denoted by S, and defined by

us . A
,A E ∞
S= ∑ | h[k ] | < ∞
or

k = −∞
SW ss
U ofe

is finite.
Pr
N
Let x[n] be a bounded input sequence

h
„

ja
{ie. | x[n]|<M for all n, where M is a

ira
finite number}.

a
lia ik
b
We must show that the output is bounded

tra m
„

us . A
when S is finite. To this end, we work again
with the convolution formula.
,A E
or

y[n] = ∑ h[k ]x[n − k ]
SW ss
U ofe

k = −∞
Pr
N
h
If we take the absolute value of both sides of

ja
„
the above equation, we obtain

a ira
lia ik

y[n] = ∑ h[k ]x[n − k ]

b
tra m
k = −∞

us . A
Now, the absolute value of the sum of terms
„
,A E
is always less than or equal to the sum of the
or

absolute values of the terms


SW ss
U ofe


| y[n] |≤ ∑ | h[k ] | | x[n − k ] |
Pr

k = −∞
N
h
ja
„ Since the input values are bounded , say by

ira
M, we have for all n:

a
lia ik

b
| y[n] |≤ M ∑ | h[k ] | ≤ MS

tra m
us . A
k = −∞
,A E
Hence, since both M and S are finite, the
or
„

output is also bounded. ie, a LTD system is


SW ss

stable if its impulse response is absolutely


U ofe

summable.
Pr
N
Example:

h
ja
ira
„ Check the stability of the first-order recursive

a
system shown below:

lia ik
y[n] = ay[n − 1] + x[n]

b
tra m
us . A
„ The impulse response of this system is:
,A E
h[n] = a u[n] n
for all formula
or
SW ss
U ofe

∞ ∞
S= ∑ | h[n] | =
k = −∞
∑ | a
k = −∞
| n
Pr
N
h
„ It is obvious that S is unbounded for |a| ≥ 1,

ja
since then each term in the series is ≥ 1.

a ira
lia ik
„ For |a| < 1, we can apply the infinite

b
geometric sum formula, to find

tra m
us . A
1
S= for | a |< 1
,A E
1− | a |
or
SW ss

Since S is finite for |a| < 1, the system is


U ofe

stable.
Pr
N
h
Q4. Draw a system implementation for each of the

ja
following difference equations:

a ira
lia ik
(a) 2 y[n] + y[n − 1] − 4 y[n − 3] = x[n] + 3 x[n − 5]

b
(b) y[n] = x[n] − x[n − N ]

tra m
us . A
(c) y[n] = a 0 x[n] + a1 x[n − 1] + a 2 x[n − 2] − b1 y[n − 1] − b2 y[n − 2]
y[n] = x[n] − x[n − 1]
(d)
,A E
(e) y[n] = x[n] + x[n − 1]
or

(f) y[n] = 2 x[n] − 3 x[n − 1] + 2 x[n − 2]


SW ss

y[n] = b1 y[n − 1] + a 0 x[n] + a1 x[n − 1]


U ofe

(g)
Pr
N
h
Summary of Part A Chapter 2

ja
ira
„ At the end of this chapter, it is expected that you
should know:

a
lia ik
b
„ The definition of a discrete-time system

tra m
us . A
„ Basic blocks of a discrete-time system: the adder,
,A E
multiplier and unit delay
or

How to draw the block diagram of a discrete-time


SW ss

„
system given its difference equation
U ofe

How to write the difference equation of a discrete-


Pr

„
time system given its block diagram
N
„ The difference between Direct Forms I and II and

h
Canonical Form, and how to write a difference

ja
equation in all three forms, showing the

ira
equivalence between them

a
lia ik
The definition (showing proofs and/or examples)

b
„

tra m
of the following types of system:

us . A
„ Static

„ Time Invariant
,A E
„ Linear
or
„ Causal
SW ss

„ Stable
U ofe

„ Interpretation of a discrete time signal as a


Pr

weighted sum
N

of delayed impulses
„ Definition and understanding of convolution (including

h
hand and graphical computation of convolution)

ja
ira
The impulse response of a linear, time-invariant

a
„

lia ik
system, and how to calculate it from a difference

b
equation

tra m
us . A
„ The difference between an FIR and an IIR system. In
,A E
particular, that the impulse responses of FIR systems
or
have identical values to the coefficients of the difference
SW ss

equation.
U ofe

Given the impulse responses of two cascaded systems,


Pr

„
N

be able to compute the overall impulse response.

You might also like