0% found this document useful (0 votes)
70 views8 pages

Discrete - Time Systems Discrete - Time Systems: Examples

Continuous and Discrete Time Signals and Systems (Mandal & Asif) solutions

Uploaded by

hakkem b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views8 pages

Discrete - Time Systems Discrete - Time Systems: Examples

Continuous and Discrete Time Signals and Systems (Mandal & Asif) solutions

Uploaded by

hakkem b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Discrete-Time Systems Discrete-Time Systems: 

Examples
• A discrete-time system processes a given 
• 2-input, 1-output discrete-time systems -
input sequence x[n] to generates an output
Modulator, adder
sequence y[n] with more desirable 
properties • 1-input, 1-output discrete-time systems -
Multiplier, unit delay, unit advance
• In most applications, the discrete-time 
system is a single-input, single-output 
system:
x[n] Discrete � time y[n]
System
Input sequence Output sequence
1 2
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Discrete-
Discrete-Time Systems: Examples Discrete-
Discrete-Time Systems:Examples
n
• Accumulator - y[n] � � x[�]
� � ��
• Accumulator - Input-output relation can 
n �1 also be written in the form
� � x[�] � x[ n] � y[n � 1] � x[n] �1 n
� � ��
y[n] � � x[�] � � x[�]
• The output y[n] at time instant n is the sum  � � �� � �0
n
of the input sample x[n] at time instant n  � y[�1] � � x[�], n � 0
y[n � 1]
and the previous output               at time  ��0

n � 1,
instant            which is the sum of all  • The second form is used for a causal input 
��
previous input sample values from         to n �1 y[�1]
sequence, in which case              is called 
the initial condition
• The system cumulatively adds, i.e., it 
3
accumulates all input sample values 4
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Discrete-
Discrete-Time Systems:Examples Discrete-
Discrete-Time Systems:Examples
• M-point moving-average system - • If there is no bias in the measurements, an 
M �1 improved estimate of the noisy data is 
y[ n] � M
1
� x[ n � k ] obtained by simply increasing M
k �0
• Used in smoothing random variations in  • A direct implementation of the M-point 
data M �1
moving average system requires       
M �1
additions, 1 division, and storage of         
• In most applications, the data x[n] is a  past input data samples
bounded sequence
• A more efficient implementation is 
• M-point average y[n] is also a  developed next
bounded sequence
5 6
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

1
Discrete-
Discrete-Time Systems:Examples Discrete-
Discrete-Time Systems:Examples
1 � M �1 �
y[ n] � � � x[ n � �] �
x[ n � M ] � x[ n � M ] � • Computation of the modified M-point 
M� �
� �0
moving average system using the recursive 
1� M �
� � � x[ n � �] � x[ n] � x[ n � M ] � equation now requires 2 additions and 1 
M� �
� �1 division
1 � M �1 � • An application:  Consider 
� � � x[ n � 1 � �] � x[ n] � x[ n � M ] �
M� �
� �0 x[n] = s[n] + d[n], 
Hence
where s[n] is the signal corrupted by a noise
y[ n] � y[ n � 1] �
1
M
� x[ n] � x[ n � M ]� d[n]
7 8
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Discrete-
Discrete-Time Systems:Examples Discrete-
Discrete-Time Systems:Examples
s[ n] � 2[n(0.9) n ], d[n] - random signal
8 • Exponentially Weighted Running Average 
Filter
d[n]
s[n]
6 x[n]

y[ n] � �y[ n � 1] � x[ n], 0 � � � 1
Amplitude

0 • Computation of the running average requires 
-2
0 10 20 30 40 50 only 2 additions, 1 multiplication and storage 
of the previous running average
Time index n

7
s[n]

• Does not require storage of past input data 
6 y[n]
5

samples
Amplitude

1
9 0 10
0 10 20 30 40 50
Time index n Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Discrete-
Discrete-Time Systems:Examples Discrete-
Discrete-Time Systems:Examples
• Linear interpolation - Employed to estimate 
0 � � �1
• For               , the exponentially weighted 
sample values between pairs of adjacent 
average filter places more emphasis on current 
sample values of a discrete-time sequence
data samples and less emphasis on past data 
samples as illustrated below • Factor-of-4 interpolation
y[ n] � ���y[ n � 2] � x[ n � 1]� � x[ n]
� � 2 y[ n � 2] � �x[ n � 1] � x[ n]
� � 2 ��y[ n � 3] � x[ n � 2]� � �x[ n � 1] � x[ n] y[n]

� �3 y[ n � 3] � � 2 x[ n � 2] � �x[ n � 1] � x[ n] 3 4
n
0 1 2 5 6 7 8 9 10 11 12
11 12
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

2
Discrete-Time Systems:  Discrete-Time Systems: 
Examples Examples
• Factor-of-2 interpolator - • Factor-of-2 interpolator -

y[n] � xu [ n] � 1 � xu [n � 1] � xu [n � 1]�
2
• Factor-of-3 interpolator -
y[n] � xu [n] � 1 � xu [n � 1] � xu [ n � 2]�
3
Down �sampled
� 2 � xu [n � 2] � xu [n � 1]� Original ( 512�512 )
( 256�256 )
Interpolated ( 512 � 512 )
3
13 14
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Discrete-Time Systems:  Discrete-Time Systems: 
Examples Examples
Median Filter – Median Filter –
• The median of a set of (2K+1) numbers is  • Example: Consider the set of numbers
the number such that K numbers from the 
set have values greater than this number and  �2, � 3, 10, 5, � 1�
the other K numbers have values smaller • Rank-order set is given by
• Median can be determined by rank-ordering  �� 3, � 1, 2, 5, 10�
the numbers in the set by their values and  • Hence,
choosing the number at the middle
med�2, � 3, 10, 5, � 1� � 2
15 16
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Discrete-Time Systems:  Discrete-Time Systems: 
Examples Examples
Median Filter –
Median Filter –
• Implemented by sliding a window of odd 
length over the input sequence {x[n]} one  • Finds applications in removing additive 
sample at a time random noise, which shows up as sudden 
large errors in the corrupted signal
• Output y[n] at instant n is the median value 
of the samples inside the window centered  • Usually used for the smoothing of signals 
at n corrupted by impulse noise

17 18
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

3
Discrete-Time Systems:  Discrete-Time Systems: 
Examples Classification
Median Filtering Example – • Linear System
• Shift-Invariant System
• Causal System
• Stable System
• Passive and Lossless Systems

19 20
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Linear Discrete-Time Systems Linear Discrete-Time Systems
n n
y1[ n]
• Definition - If          is the output due to an  • Accumulator - y1[n] � � x1[�], y2 [n] � � x2 [�]
input          and 
x1[n] y2 [n] is the output due to an  � � �� � � ��
For an input
input           then for an input
x2 [n]
x[n] � � x1[n] � � x2 [n]
x[n] � � x1[n] � � x2 [n]
the output is
the output is given by n
y[n] � � y1[n] � � y2 [n] y[n] � � �� x1[�] � � x2 [�]�
� � ��
n n
• Above property must hold for any arbitrary  � � � x1[�] � � � x2 [�] � � y1[n] � � y2 [n]
� �,
constants      and       and for all possible  � � �� � � ��
inputs         and
x1[n] x2 [n] • Hence, the above system is linear
21 22
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Linear Discrete-Time Systems Linear Discrete-Time Systems
y1[n] y2 [n ] x1[n]
• The outputs         and           for inputs         
and          are given by
x2 [n] • Now � y1[n] � � y2 [n]
n n n
y1[n] � y1[�1] � � x1[�] � � ( y1[�1] � � x1[�]) � � ( y2 [�1] � � x2 [�])
� �0 � �0 � �0
n n n
y2 [n] � y2 [�1] � � x2 [�] � (� y1[�1] � � y2 [�1]) � (� � x1[�] � � � x2 [�])
� �0 � �0 � �0
� x1[n] � � x 2 [n]
• The output y[n] for an input                         
is given by y[n] � � y1[n] � � y2 [n]
• Thus                                        if
n
y[n] � y[�1] � � (� x1[�] � � x 2 [�]) y[�1] � � y1[�1] � � y2 [�1]
23 � �0 24
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

4
Linear Discrete-Time System Nonlinear Discrete-Time 
System
• For the causal accumulator to be linear the 
condition y[�1] � � y1[�1] � � y2 [�1] • The median filter described earlier is a 
y[�1]
must hold for all initial conditions         ,          nonlinear discrete-time system
y2 [�1]
y1[�1] ,            , and all constants � and � • To show this, consider a median filter with 
• This condition cannot be satisfied unless the  a window of length 3
accumulator is initially at rest with zero  • Output of the filter for an input
initial condition �x1[ n]� � �3, 4, 5�, 0 � n � 2
• For nonzero initial condition, the system is  is
nonlinear �y1[ n]� � �3, 4, 4�, 0 � n � 2
25 26
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Nonlinear Discrete-Time  Nonlinear Discrete-Time 
System System
• Output for an input
• Note
�x2 [ n]� � �2, � 1, � 1�, 0 � n � 2
is �y1[ n] � y2 [ n]� � �3, 3, 3� � �y[ n]�
�y2 [ n]� � �0, � 1, � 1�, 0 � n � 2
• However, the output for an input  • Hence, the median filter is a nonlinear 
discrete-time system
�x[ n]� � �x1[ n] � x2 [ n]�
is
�y[ n]� � �3, 4, 3�
27 28
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Shift-Invariant System Shift-Invariant System
• For a shift-invariant system, if           is the 
y1[n]
response to an input         , then the response 
x1[n] • In the case of sequences and systems with 
to an input indices n related to discrete instants of time, 
x[n] � x1[n � no ] the above property is called time-invariance
property
is simply
y[n] � y1[n � no ] • Time-invariance property ensures that for a 
specified input, the output is independent of 
no
where      is any positive or negative integer the time the input is being applied
• The above relation must hold for any 
29 arbitrary input and its corresponding output 30
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

5
Shift-Invariant System Shift-Invariant System
• Example - Consider the up-sampler with an 
input-output relation given by • However from the definition of the up-sampler
x[n / L], n � 0, � L, � 2 L, .....
xu [n] � �� xu [n � no ]
� 0, otherwise
x[(n � no ) / L], n � no , no � L, no � 2L, .....
x1[n] � x[n � no ]
• For an input                            the output          x1,u [n] � ��
� 0, otherwise
is given by � x1,u [n]
x [n / L], n � 0, � L, � 2 L, .....
x1,u [n] � �� 1 • Hence, the up-sampler is a time-varying system
� 0, otherwise
� x[(n � Lno ) / L], n � 0, � L, � 2 L, .....
��
31
� 0, otherwise
Copyright © 2005, S. K. Mitra
32
Copyright © 2005, S. K. Mitra

Linear Time-Invariant System Causal System
• Linear Time-Invariant (LTI) System -
A system satisfying both the linearity and  • In a causal system, the     -thno output sample    
the time-invariance property y[no ] depends only on input samples x[n] 
• LTI systems are mathematically easy to  n � no and does not depend on input 
for        
analyze and characterize, and consequently,  samples for n � no
easy to design y1[n] y2 [n]
• Let          and           be the responses of a 
• Highly useful signal processing algorithms  x1[n]
causal discrete-time system to the inputs              
have been developed utilizing this class of  and          , respectively
x2 [n]
systems over the last several decades
33 34
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Causal System
Causal System • Examples of causal systems:
y[n] � �1x[n] � � 2 x[n � 1] � � 3 x[n � 2] � � 4 x[n � 3]
• Then
x1[n] � x2[n] for n < N y[n] � b0 x[n] � b1x[n � 1] � b2 x[n � 2]
implies also that � a1 y[n � 1] � a2 y[n � 2]
y1[n] � y2[n] for n < N y[n] � y[n � 1] � x[n]
• For a causal system, changes in output  • Examples of noncausal systems:
1
samples do not precede changes in the input  y[n] � xu [n] � ( xu [n � 1] � xu [n � 1])
2
samples 1
y[n] � xu [n] � ( xu [n � 1] � xu [n � 2])
3 2
35 36 � ( xu [n � 2] � xu [n � 1])
Copyright © 2005, S. K. Mitra 3 Copyright © 2005, S. K. Mitra

6
Stable System
Causal System
• There are various definitions of stability
• A noncausal system can be implemented as  • We consider here the bounded-input,
a causal system by delaying the output by  bounded-output (BIBO) stability
an appropriate number of samples • If y[n] is the response to an input x[n] and if
• For example a causal implementation of the  x[n] � Bx for all values of n
factor-of-2 interpolator is given by then
1 y[n] � B y for all values of n
y[n] � xu [n � 1] � ( xu [n � 2] � xu [n])
2

37 38
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Stable System Passive and Lossless Systems
• Example - The M-point moving average 
filter is BIBO stable: • A discrete-time system is defined to be
M �1 passive if, for every finite-energy input x[n],
1
y[n] �
M � x[n � k ] the output y[n] has, at most, the same energy, 
k �0
i.e.
x[n] � Bx
• For a bounded input                 we have � �
2 2
1
M �1
1
M �1 � y[n] � � x[n] � �
y[n] �
M � x[n � k ] � M � x[n � k ] n � �� n � ��
k �0 k �0
1 • For a lossless system, the above inequality is 
� ( MBx ) � Bx satisfied with an equal sign for every input
M
39 40
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Passive and Lossless Systems Impulse and Step Responses
• Example - Consider the discrete-time  • The response of a discrete-time system to a 
y[n] � � x[n � N ]
system defined by                             with  N unit sample sequence {�[n]} is called the 
a positive integer unit sample response or simply, the 
• Its output energy is given by impulse response, and is denoted by {h[n]}
� 2 2 � 2 • The response of a discrete-time system to a 
� y[n] � � � x[n] unit step sequence {�[n]} is called the unit
n � �� n � ��
step response or simply, the step response, 
� �1
• Hence, it is a passive system if            and is  and is denoted by {s[n]}
a lossless system if � � 1
41 42
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

7
Impulse Response Impulse Response
• Example - The impulse response of the  • Example - The impulse response of the 
system discrete-time accumulator
y[n] � �1x[n] � � 2 x[n � 1] � � 3 x[n � 2] � � 4 x[n � 3] n
is obtained by setting x[n] = �[n] resulting 
y[n] � � x[�]
� � ��
in
is obtained by setting x[n] = �[n] resulting 
h[n] � �1� [n] � � 2� [n � 1] � � 3� [n � 2] � � 4� [n � 3] in n
• The impulse response is thus a finite-length  h[n] � � � [�] � � [n]
sequence of length 4 given by � � ��
{h[n]} � {�1, � 2 , � 3 , � 4}
43 44
� Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Impulse Response Time-Domain Characterization 
• Example - The impulse response {h[n]} of  of LTI Discrete-Time System
the factor-of-2 interpolator • Input-Output Relationship -
1
y[n] � xu [n] � ( xu [n � 1] � xu [n � 1]) A consequence of the linear, time-
2
xu [n] � � [n]
• is obtained by setting                      and is  invariance property is that an LTI discrete-
given by time system is completely characterized by 
1 its impulse response
h[n] � � [n] � (� [n � 1] � � [n � 1])
2
• Knowing the impulse response one 
• The impulse response is thus a finite-length 
can compute the output of the system for 
sequence of length 3:
any arbitrary input
45
{h[n]} � {0.5, 1 0.5} 46
� Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Time-Domain Characterization  Time-Domain Characterization 
of LTI Discrete-Time System of LTI Discrete-Time System
• Let h[n] denote the impulse response of a  • Since the system is time-invariant
LTI discrete-time system input output
• We compute its output y[n] for the input: �[n � 2] � h[n � 2]
x[ n] � 0.5�[ n � 2] � 1.5�[n � 1] � �[ n � 2] � 0.75�[ n � 5]
�[n � 1] � h[n � 1]
• As the system is linear, we can compute its 
�[n � 2] � h[n � 2]
outputs for each member of the input 
separately and add the individual outputs to  �[n � 5] � h[n � 5]
determine y[n] 
47 48
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

You might also like