Discrete-Time Signal Processing

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

Discrete-Time Signal Processing

1
What is Signal

• Anything that conveys information about the behavior or


nature of some phenomenon
• Represented mathematically as function of one or more
independent variables (time, space etc)

Example
• Speech signal, Electrocardiogram (ECG),
Electroencephalogram (EEG), a photographic image etc.

2
Continuous-time signal:

• Defined along continuum of time


• can take on values on continuous interval (a, b), a may be - and b may be +

Fig: segment of a continuous time speech signal

3
Discrete-time signal:
• Defined only at certain specific values of time
Amplitude is not discrete

Fig: sequence of samples obtained from the continuous time speech signal

Digital signal (a kind of discrete-time signal)

• Both amplitude and time are discrete

4
Discrete-time signal: sequences

• Represented as x = x  n , -<n<


• Can be obtained directly as sequence or from the sample of an
analog (continuous-time) signal xa (t )

Graphical representation of Discrete time signal

5
Sampling of an analog signal:
For uniform sampling x(n) = xa (nT )
Here,
T = sampling period
Fs = samplig frequency (hertz) or sampling rate (samples per second)
1
T=
Fs
n
t = nT =
Fs
Let , Analog signal with frequency F or
xa (t ) = A cos(2 Ft +  ) angular frequency  = 2 F
xa (nT ) = A cos(2 FnT +  )
 F 
= A cos  2 n +  
 Fs 
F
 x(n) = A cos ( 2 fn +  ) , where f = = relative or normalized frequency
Fs
or  =2 f = relative angular frequency 6
Sampling of an analog signal:

The range of frequency F and  for continuous time sinusoids are


−  F   and −  << respectively

According to Nyquist criteria Fs  2 F

Therefore the range of f and  of discrete time signal are


1 1
−  f  and −      respectively.
2 2

Example 1.4.1, 1.4.2, 1.4.3 and 1.4.4

7
Example 1.4.2

Consider the analog signal xa (t ) = 3cos(100 t )

a) Determine the minimum sampling rate required to avoid aliasing


b) If the sampling rate is 200 Hz then what is the discrete-time signal obtained
after sampling?
c) If the sampling rate is 75 Hz, what is the discrete-time signal obtained
after sampling?
d) What is the frequency 0  F  Fs / 2 of a sinusoid that yields samples identical
to those obtained at (c)?

8
Example 1.4.2

Consider the analog signal xa (t ) = 3cos(100 t )

a) Determine the minimum sampling rate required to avoid aliasing

Solution:

xa (t ) = 3cos(100 t ) = 3cos(2 50t )


The freq. of the analog signal is 50 Hz. According to Nyquist criteria the
minimum sampling rate is 100 Hz.

b) If sampling rate is 200 Hz, then the discrete time sequence is

100 
x(n) = 3cos( n) = 3cos( n)
200 2

9
c) If sampling rate is 75 Hz, then the discrete time sequence is

 100   4 
x(n) = 3cos  n  = 3cos  n
 75   3 
 2   2 
= 3cos  2 −  n = 3cos  n
 3   3 

d) The sampling rate in part c) is 75 Hz, and the normalized frequency of the
discrete time sequence is 1/3.
Since
F 1 F
f =  =  F = 25 Hz
Fs 3 75

So the frequency of the continuous time sinusoid which will yield exact same
samples as in part c) is 25 Hz.
10
Some elementary discrete-time signals
(basic sequences)
1. Unit sample sequence/ unit impulse:

 (n) = 0, n0
1, n=0

11
2. Unit step signal:

12
3. Unit ramp signal:

13
4. Exponential signal:

x[n] = a n for all n

when a real, x[n] is real

14
4. Exponential signal (complex):

when a complex, x[n] is complex

a  re j x[n] = r n e jn
=r n (cos  n + j sin  n)
=r n cos  n + jr n sin  n

Sinusoidal sequences

5. Sinusoidal sequences:
General form:

x[n] = A cos(0 n +  ) for all integer value of n

Frequency in 0 = 2 f Frequency in
cycles/sample
radian/sample

15
Difference between continuous-time and discrete-time complex exponential sequences and
sinusoidal sequences:

1. A discrete-time sinusoid is periodic only if its frequency f is a rational number

Definition of periodicity,
x[n] is periodic with period N ( N  0) if and only if
x(n+N)=x(n), for all n

Here, x(n) = A cos(2 fn +  )


x(n + N ) = A cos{2 f (n + N ) +  )
= A cos{2 fn + 2 fN +  )

So, to be periodic with period N


A cos(2 fn +  ) = A cos(2 fn + 2 fN +  )

16
This is possible if

2 fN = 2 k , k any integer value


f =k N
f must be rational

2. Discrete-time sinusoids whose frequencies are separated by an integer multiple of 2


are identical

cos(0 n +  ) = cos{(0 + 2 k )n +  )

All sinusoidal sequences xk (n) = A cos(k n +  ), k = 0,1, 2, ,  k = 0 + 2k


indistinguishable

Two sinusoids having frequencies in the range −     are distinct

17
3. The highest rate of oscillation in a discrete-time sinusoid is attained when  =  or -

x(n) = cos 0 n

( f = 1 , N = 4)
4
( f = 0, N = )

( f = 1 , N = 2)
( f = 1 , N = 16) 2
16

0  (0 →  ), f  (0 → 1 2), N  ( → 2)
( f = 1 , N = 8)
8

18
  0  2 There is an alias of the sinusoid having
frequency in the range 0 → 

Proof : Consider 2 sinusoids with 1 = 0 and 2 = 2 − 0

19
  0  2 There is an alias of the sinusoid having
frequency in the range 0 → 

Proof : Consider 2 sinusoids with 1 = 0 and 2 = 2 − 0 , where   0  2

x1 (n) = A cos 1n = A cos 0 n


x2 (n) = A cos 2 n = A cos(2 − 0 )n
= A cos(−0 )n = x1 (n)
(proved)

The frequency range for discrete- time sinusoids is finite with duration 2

20
Simple manipulations of discrete-time signals
Transformation of the independent variable (time)
1. Time-shift of x(n)
TDk [ x(n)] = x(n − k ), k integer.
k +ve  delaying x(n) by k units of time (shift of signal to the right)
k -ve  advancing x(n) by k units of time (shift of signal to the left)

delay

advance

Real-time processing not possible


21
2. Folding/ reflection of x(n) FD[ x(n)] = x(−n)

Fig: Reflection of x(n) about n = 0

TDk {FD[ x(n)]}  FD{TDk [ x(n)]}

22
3. Down sampling of x(n) DS  {x(n)} = x(  n),  an integer

23
Transformation of the dependent variable (amplitudes)
Addition, multiplication and scaling of sequences

Amplitude scaling y(n) = Ax(n)

Addition of 2 sequences y (n) = x1 (n) + x2 (n) (sample to sample basis)

Product of 2 sequences y (n) = x1 (n) x2 (n) (sample to sample basis)

24
Discrete-time systems
A device or algorithm that operates on a discrete-time signal (input) according to
some well-defined rules and transforms the input to produce a discrete time signal
output.

operator

25
Discrete-time systems
Input-Output description of systems

• Mathematical expression or rule


• explicitly defines input-out relationship of a system
• no knowledge of the internal structure of the system (system as a black
box)
Determine the response of the following systems to the input signal
 n -3  n  3
x ( n) = 
0 otherwise
( a ) y ( n) = x ( n)
(b) y (n) = x(n − 1)
(c) y (n) = x(n + 1)
1
(d ) y (n) = [ x(n + 1) + x(n) + x( n − 1)]
3
(e) y (n) = max[ x(n + 1), x(n), x(n − 1)]
n
( f ) y(n)=  x(k ) = x(n) + x( n − 1) + x( n − 2) + .........
k =−
26
Input signal x(n) = { , 0,3, 2,1, 0,1, 2,3, 0, }

a ) y ( n) = x ( n) Identity system
== { , 0,3, 2,1, 0,1, 2,3, 0, }

b) y(n) = x(n − 1)
= { ,0,3, 2,1,0,1, 2,3,0, }

c) y(n) = x(n + 1)
= { ,0,3, 2,1,0,1, 2,3,0, }

27
Input signal x(n) = { , 0,3, 2,1, 0,1, 2,3, 0, }

1
d ) y (n) = [ x(n + 1) + x(n) + x( n − 1)]
3
5 2 5
== { , 0,1, , 2,1, ,1, 2, ,1, 0, }
3 3 3

e) y (n) = max[ x(n + 1), x(n), x( n − 1)]


== { , 0,3,3,3, 2,1, 2,3,3,3, 0, }

28
Input signal x(n) = { , 0,3, 2,1, 0,1, 2,3, 0, }
n 
f) y ( n) =  x(k ) = x(n) + x(n − 1) + x(n − 2) +
k =−
={0,3,5, 6, 6, 7,9,12,12, }
 Accumulator system
(accumulation of all the previous inputs)
n n −1
y ( n) =  x(k ) =  x(k ) + x(n) = y(n − 1) + x(n)
k =− k =−

Current output Previous output Current input

Given Find Need to know


x(n0 ) at n = n0 y (n0 ) y(n0 − 1)

In relaxed
Initial condition system 0 29
Block diagram representation of discrete-time systems

Some basic building blocks:

An adder:

A constant multiplier:

30
A signal multiplier:

A unit delay element:

A unit advance element:

31
Using basic building blocks sketch the block diagram representation
of the discrete-time system described by the input-output relation.
1 1 1
y (n) = y (n − 1) + x(n) + x(n − 1),
4 2 2
where x(n) is the input and y( n) is the output.

32
Using basic building blocks sketch the block diagram representation
of the discrete-time system described by the input-output relation.
1 1 1
y (n) = y (n − 1) + x(n) + x(n − 1),
4 2 2
where x(n) is the input and y( n) is the output.

33
Classification of discrete-time systems

Static versus dynamic system:


Static (memory less) system:
Output does not depend on the past or future value of the input (memory less system)

y (n) = ax(n)
y (n) = nx(n) + bx 3 (n)

Dynamic system:
Output depends on the present and/or past values of the input

y (n) = x(n) + 3x(n − 1)


Finite memory
n
y ( n) =  x ( n − k )
k =0

y ( n) =  x ( n − k ) Infinite memory
34
k =0
Time-invariant versus time-variant system:


x(n) ⎯⎯ → y ( n)

x(n − k ) ⎯⎯ → y (n − k )
for every input signal x(n) and every time shift k .

* Test for time invariance system:

1) For any arbitrary input x( n) get the output y (n)from sys i/p o/p description
2) Change the input to x( n − k ) and get the output y (n, k )
3) Delay the output by k → y ( n − k )
if y (n, k ) = y (n − k )  TI system

35
Linear versus non-linear system:

A linear system follows scaling and additivity property

If in a system,
for i/o= 0, we get o/p=0 Relaxed linear system

for i/o= 0, we get o/p= some value Non-relaxed linear system


or
Non-linear system
* Test for linear system:

1) Consider two arbitrary inputs x1 (n), x2 (n)


2) for input x3 (n) = a1 x1 (n) + a2 x2 (n), get y3 (n)
3) Get y1 (n) and y2 (n) respectively for x1 (n) and x2 (n)
4) check whether y3 (n) = a1 y1 (n) + a2 y2 (n)
if yes  Linear system 36
Causal versus non-causal system:
Depends on
o/p Past and/or present value of the I/P
Causal system

Stable versus unstable system:

Theorem:

An arbitrary relaxed system is said to be BIBO stable if for


every bounded input the system produces a bounded output.

i.e. for x(n)  M x  , y(n)  M y   for all n

37
Interconnection of discrete-time systems

1. Cascade (series) connection

Here,

In general,

For LTI system

38
2. Parallel connection

Here,

39
Analysis of discrete-time LTI systems

Techniques:
1. Based on direct solution of system’s i/p-o/p equation.
N M
y (n) = − ak y (n − k ) +  bk x(n − k ) [for LTI system]
k =1 k =0

→ difference equation
2. Based on resolving i/p into the sum of elementary signals and
obtaining the system’s response for each of the elementary signals.

Steps:
a) resolve i/p x(n) as  c x (n), x
k
k k k elementary signal

b) get system's response yk (n) = [ xk (n)]


c) y (n) = [ x(n)] = [ ck xk (n)] =  ck yk (n)
k k
40
* If there is no restriction on x(n)
then xk (n) = weighted sum of unit impulse sequence  (n)

* if x(n) periodic with period N


then xk (n) = e jk n , k = 0,1,  N − 1
where k = (2 / N )k are harmonically related

41
Resolution of a discrete time signal into impulses
elementary signal xk (n) =  (n − k )

a sequence of non-zero values


over an infinite duration

a sequence of zeros everywhere


except at n = k

x(n) (n − k ) = x(k ) (n − k )
42

Finally, x ( n) =  x(k ) (n − k )
k =−

The convolution sum (response of LTI system to any arbitrary i/p)

Let the response of a sys. for an unit impulse shifted by k

y(n, k )  h(n, k ) = [ (n − k )]



if i/p x(n) =  x(k ) (n − k )
k =−

then y (n) = [ x(n)] = [  x( k ) (n − k )]
k =−

=  x(k ) (n − k )
k =−
Response of any relaxed

=  x (k )h (n , k )
k =−
linear system to any
arbitrary i/p x(n) 43
For TI system
h(n, k ) = h(n − k ) = [ (n − k )]
So, for LTI system

y ( n) =  x ( k ) h( n − k )
k =−
Functions of k

Convolution sum

Steps to calculate y(n) mathematically: x(n) & h(n) known

1) Folding. Fold h(k ) about k = 0 to obtain h( −k )


2) Shifting. Shift h(−k ) by n = n0 to the right (left) if n0 is positive (negative) h(n0 − k )
3) Multiplication. Multiply x(k ) by h(n0 − k ) to obtain vn0 (k )  x(k )h(n0 − k )
4) Summation. Sum all the values of the product sequence vn 0 (k ) to obtain y(n0 )
5) Repeatation of step 2-step 4 for all possible time shift, n (−  n  )
to finally obtain y(n)
44
Calculation of y(n) shown graphically:


y (0) =  v (k )
k =−
0

=4
45

y(1) =  v (k ) = 8
k =−
1


y(−1) = v
k =−
−1 (k ) = 1

46
From observation,
y ( n) = 0 for n  −2
the entire response of the system for −   n  

y (n) = .....0, 0,1, 4,8,8,3, −2, 0, 0,.......



* Convolution operation is commutative, i.e.

 
y ( n) =  x ( k ) h( n − k ) =  h( k ) x ( n − k )
k =− k =−

(proof written in the book page 80)

47
Properties of convolution and the interconnection of LTI systems

y (n) = x(n)* h(n) =  x ( k ) h( n − k )
k =−
Impulse response is shifted & folded

y (n) = h(n)* x(n) =  h( k ) x ( n − k )
k =−
Input is shifted & folded

Fig: Interchange of roles of x(n) & h(n)

48
Convolution follows

Commutative law:
x(n)* h(n) = h(n)* x(n)
(The order to perform convolution is immaterial)
Associative law:
[ x(n) * h1 ( n)]* h2 ( n) = x( n) *[ h1 ( n) * h2 ( n)] = x( n) * h( n),
where, h(n) = h1 (n) * h2 ( n) = h2 ( n) * h1 ( n)
(viewed in cascade connection)

From commutative law

49
Distributive law:

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

(viewed in parallel connection)

50
Condition of Causality of LTI systems:
Depends on
o/p Past and/or present value of the i/p
For LTI sys.
o/p at n = n0

y (n0 ) =  h( k ) x ( n
k =−
0 − k)
 −1
=  h( k ) x( n0 − k ) +  h( k ) x ( n
0 − k)
k =0 k =−

=[ h(0) x( n0 ) + h(1) x( n0 − 1) + h(2) x( n0 − 2) + ] +


[ h( −1) x( n0 + 1) + h( −2) x( n0 + 2) + ]

future values of x(n)


for y (n0 ) to be causal
h(n)=0 for n  0 (Necessary and sufficient condition for causality)
51
In general for y (n) to be causal, we can write

y ( n) =  h( k ) x ( n − k )
k =0
n
=  x ( k ) h( n − k )
k =−

An LTI system is causal if & only if h(n) = 0 for n  0

if x(n) also causal, i.e. x(n) = 0 for n  0, then


n
y ( n) =  h( k ) x ( n − k )
k =0
n
=  x( k )h(n − k )
k =0

52
Condition of Stability of LTI systems:
For LTI sys. 
y ( n) =  h( k ) x ( n − k )
k =−

 
k =−
h( k ) x ( n − k )
An LTI system is stable if h(n)
is absolutely summable

if x(n)  M x (M x , a finite number)



as n → , h(n) → 0
then y(n)  M x 
k =−
h( k )


bounded if Sh = 
k =−
h( k )  
LTI System classification based on the duration of its impulse response:

LTI systems
characterized in terms of h(n)
FIR System IIR System
finite duration h(n) infinite duration h(n)

Causal FIR system: h(n) = 0, n  0 & n  M


M −1
The sys. response y ( n) =  h( k ) x ( n − k )
k =0
Acts as window that uses the most recent M no. of i/p to get o/p

Causal FIR system requires a finite memory


Discrete time system classification based on implementation:

Discrete time system

Recursive System Non recursive system

depends
o/p of a recursive Past+present values Past values of
system of i/ps + o/ps

y(n) = F[ y(n −1), y(n − 2), y(n − N ), x(n), x(n −1), x(n − M )]
Discrete time system classification based on implementation:

FIR system Finite number of addition, multiplication &


memory locations
(so can be implemented non recursively)
No feed back from output
3
y ( n) =  h( k ) x ( n − k )
k =0

= h(0) x(n) + h(1) x(n − 1) + h(2) x(n − 2) + h(3) x(n − 3)

x(n) −1 −1 −1
z z z
h(0) h(1) h(2) h(3)
+ + + y(n)
+z +z +z
Discrete time system classification based on implementation:

IIR system Infinite number of addition,


multiplication & memory locations


y ( n) =  h( k ) x ( n − k )
k =−
Non recursive Implementation
is not possible as shown above

Express the input output relationship as the form


of difference equation
Discrete time system classification based on implementation:

Example:
n
y (n) =  x(k ), n = 0,1, 2,  (no. of addition, memory
k =0
location with n )
Rearranging n −1
y ( n) = x ( n) +  x ( k )
k =0

=x( n) + y ( n − 1)
 y (n) = y (n − 1) + x(n)
2 multiplications,
1 addition, 1
mem. location

Presence of the past output

System can be implemented recursively


y(n) = y(n −1) + x(n) 1st order recursive system
described by linear constant
coefficient difference equations

General form of recursive system described by linear constant


coefficient difference equations:
N M
y(n) = − ak y (n − k ) +  bk x(n − k )
k =1 k =0

N M Order of diff. equation/ system


  ak y (n − k ) =  ak x(n − k ) a0 = 1
k =0 k =0

To get y(n), n  0, we need x(n), n  0 & y(−1), y(−2), y(− N )

Summarizes all we need to know about the past history of the response of the
sys. to compute present and future o/ps
LTI Systems chatacterized by constant coefficient difference equations:

Recursive & nonrecursive systems


subclass

Systems described by constant


coefficient linear difference equations
(IIR systems)
Example: Cumulative average system
n 1
y(n) = ay(n −1) + x(n) y ( n) = y (n − 1) + x ( n)
(n + 1) (n + 1)

(Difference
Constant
equation of LTI Varies with n
coefficient
system)
(Difference
equation of LTV
st
1 order difference equation system)
y(n) = ay(n −1) + x(n) Implicit description of sys.

Let
1) x(n) may be causal or non-causal
2) y(−1) (initial condition) exists

 y (0) = ay (−1) + x(0)


y (1) = ay (0) + x(1) = a 2 y(−1) + ax(0) + x(1)
y(2) = ay(1) + x(2) = a3 y(−1) + a 2 x(0) + ax(1) + x(2)

y (n) = ay (n − 1) + x(n)
n +1 n −1
=a y (−1) + a x(0) + a
n
x(1) + + x(n)
n
y (n) = a n +1 y (−1) +  a k x(n − k ) Explicit description
of sys.
k =0
(system’s o/p is expressed as the function of system’s i/p
and initial conditions only)

Total response of a system


y ( n ) = Response due to zero input + Response due to zero initial condition
= yzi (n) + yzs (n)

n
y( zs ) (n) =  a k x(n − k ), n  0 Zero state response/ forced response
k =0 When initial condition is taken as 0
when y (−1)  0, x(n) = 0
n +1 Zero input response/ natural response
y zi (n) = a y (−1), n  0 When input is taken as 0

Non-relaxed system

If the system is initially relaxed


n
y (n) = y( zs ) (n) =  a k x(n − k ), n  0
k =0

h(k )
 here, h(n) = a u(n) n

since y(−1) = 0 → x(n) can be assumed as causal


y(n) = ay(n -1) + x(n) The relaxed recursive sys. is
actually LTI IIR system
Zero state response Zero input response
1) Also called forced 1) Also called natural
response response
2) Obtained when initial 2) Obtained when input is
condition is taken as 0 taken as 0

3) Depends on 3) Depends on
a) nature of the system a) nature of the system
b) nature of the input b) initial conditions
Solution of Linear constant coefficient difference equations:

Objective: To get an explicit expression of y(n) get y ( n), n  0 given


1) a specific x(n) &
2) a set of initial conditions
Direct method Indirect method (based on z-transform)

Direct method:
y ( n ) = yh ( n ) + y p ( n )

Homogeneous/
Particular
complementary
solution
solution
Homogeneous Solution of a difference equation:
N M

 a y ( n − k ) =  b x (n − k )
k =0
k
k =0
k a0 = 1

obtained assuming i/p=0


N
  a y (n − k ) = 0
k
assume the solution in the form of exponential, i.e.,
k =0
yh ( n ) =  n
N
  ak  n − k = 0
k =0

  n − N [ N + a1 N −1 + a2  N − 2 + + aN −1 + aN ] = 0

Characteristic polynomial of a system

In general has N number of roots

(Distinct/complex/identical)
For N distinct roots

yh = c11n + c22 n + c33n + + c N N n

Weighing coefficients Values are obtained from system’s initial


condition

Example

Determine the homogeneous solution of the system describe by the first-order


difference equation
y( n) + a1 y( n −1) = x( n)

Let the homogeneous solution obtained by setting x(n) = 0 is


yh ( n ) =  n
yh (n) + a1 yh (n − 1) = 0
  n + a1 n −1 = 0
  n −1 ( + a1 ) = 0
  = −a1
solution to the homogeneous difference equation is
yh ( n ) = C  n = C ( − a ) n

The zero-input response

y (0) = −a1 y (−1)


& yh (0) = C (−a)0 = C
 C = −a1 y (−1)

 zero input response of the system is


y zi (n) = (−a1 ) n +1 y (−1) n0
Example

Determine the zero-input response of the system describe by the homogeneous


second-order difference equation
y( n) − 3 y( n −1) − 4 y(n − 2) = 0

assume yh (n) =  n

 n − 3 n−1 − 4 n−2 = 0  1 = −1, 2 = 4


 yh (n) = C1 (−1)n + C2 (4)n Solution of homogeneous
equation
The zero-input response

y (0) = 3 y ( −1) + 4 y ( −2)


y (1) = 3 y (0) + 4 y ( −1) = 13 y ( −1) + 12 y ( −2)&
Find C1 & C2 in terms of y (−1) & y(−2)
yh (0) = C1 + C2
yh (n) = −C1 + 4C2
assume the solution in the form of exponential, i.e.,
yh ( n ) =  n
N
  ak  n − k = 0
k =0

  n − N [ N + a1 N −1 + a2  N − 2 + + aN −1 + aN ] = 0

Characteristic polynomial of a system

In general has N number of roots


(Distinct/complex/identical)

For identical roots

yh = c11n + c2 n1n + c3n 21n + + cm n m −11n + cm +12n + + c N N n


Particular Solution of a difference equation:
Let y p (n) = particular solution
For any specific input x(n), y p (n) must satisfy
N M

a y
k =0
k p (n − k ) =  bk x(n − k )
k =0
a0 = 1

form depends on x(n)

Input Signal Particular Solution


A K
AM n KM n
An M K 0 n M + K1n M −1 + + KM
An nM An ( K0 nM + K1n M −1 + + KM )
 A cos 0 n  K1 cos 0 n + K 2 sin 0 n
 A sin  n 
 0 
Example

Determine the particular solution of the difference equation


5 1
y( n) = y( n −1) − y( n − 2) + x( n)
6 6
when the forcing function x(n) = 2n , n  0 and zero elsewhere.

Let the particular solution y p ( n) = K 2 n , n  0


5 1
 K 2 = K 2 − K 2n − 2 + 2n
n n −1

6 6

at n = 2
5 1
4K = K − K + 4
3 6
8 8 n
K=  y p ( n) = 2 , n  0
5 5
Total Solution of a difference equation:

y ( n ) = yh ( n ) + y p ( n )

Example

Determine the total solution y (n), n  0, to the difference equation


y (n) + a1 y (n − 1) = x(n)
when x(n) is a unit step sequence [i.e. x (n) = u (n) and y (−1) is the initial condition]

assume yh (n) =  n   n + a1 n −1 = 0 yh (n) = C ( −a1 ) n


  n −1 ( + a1 ) = 0
  = −a1
assume y p (n) = Ku (n)

 Ku (n) + a1Ku (n − 1) = u (n)


at n = 1,
K + a1K = 1 1
 y p ( n) = u (n)
1 1 + a1
K =
(1 + a1 )

total solution
1
y (n) = C (−a1 ) n + u ( n) n0
1 + a1

initial initial
condition  0 condition = 0 y (n) = y zs (n)
Obtaining zero state response:

Assign initial condition=0

we have two form of equations at n=0


1) y (n) + a1 y (n − 1) = u (n) y (0) + a1 y (−1) = 1  y(0) = 1
1
2) y ( n) = C ( −a1 ) n + u ( n) 1 a
1 + a1 y(0) = C + C = 1
1 + a1 1 + a1

1 − (−a1 ) n +1
 y zs (n) = n0
1 + a1

if initial condition  0 find C and y(n)

contains both yzs and yzi


Impulse response of a linear time-invariant recursive system

h(n) = zero-state response of the system with the input  (n)


and the system is initially relaxed

Example 2.4.10

Determine the impulse response h(n) for the system described by the second order
difference equation y(n) − 3 y(n − 1) − 4 y(n − 2) = x(n) + 2 x(n − 1)
** For the system shown below find the input-output relation. Classify the system as FIR or
IIR. Find an explicit expression for the impulse response of the system

You might also like