Professional Documents
Culture Documents
Discrete - Time Systems Discrete - Time Systems: Examples
Discrete - Time Systems Discrete - Time Systems: Examples
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[l]
l = −∞
• Accumulator - Input-output relation can
n −1 also be written in the form
= ∑ x[l] + x[ n] = y[n − 1] + x[n] −1 n
l = −∞
y[n] = ∑ x[l] + ∑ x[l]
• The output y[n] at time instant n is the sum l = −∞ l =0
n
of the input sample x[n] at time instant n = y[−1] + ∑ x[l], n ≥ 0
and the previous output y[n − 1] at time l=0
instant n − 1, which is the sum of all • The second form is used for a causal input
previous input sample values from − ∞ to n − 1 sequence, in which case y[−1] 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 moving average system requires M − 1
additions, 1 division, and storage of M − 1
• 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 − l] +
x[ n − M ] − x[ n − M ] ⎟ • Computation of the modified M-point
M⎝ ⎠
l =0
moving average system using the recursive
1⎛ M ⎞
= ⎜ ∑ x[ n − l] + x[ n] − x[ n − M ] ⎟ equation now requires 2 additions and 1
M⎝ ⎠
l =1 division
1⎛ M −1 ⎞
= ⎜ ∑ x[ n − 1 − l] + x[ n] − x[ n − M ] ⎟ • An application: Consider
M⎝ ⎠
l =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) ], d[n] - random signal
n
8 • Exponentially Weighted Running Average
d[n]
6
s[n]
x[n] Filter
y[ n] = αy[ n − 1] + x[ n], 0 < α < 1
Amplitude
3
samples
2
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
• For 0 < α < 1, 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
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
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
must hold for all initial conditions y[−1], nonlinear discrete-time system
y1[−1] , y2 [−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
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, .....
• For an input x1[n] = x[n − no ] 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
− n = 0, ± L, ± 2 L, .....
= ⎧⎨
x[( n Ln o ) / L ],
31
⎩ 0, otherwise
Copyright © 2005, S. K. Mitra
32
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
1
samples 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] = xu [n − 1] + ( xu [n − 2] + xu [n]) y[n] ≤ B y for all values of n
2
37 38
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[l]
l = −∞
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] = ∑ δ [l] = µ [n]
sequence of length 4 given by l = −∞
{h[n]} = {α1, α 2 , α 3 , α 4}
43
↑ Copyright © 2005, S. K. Mitra
44
Copyright © 2005, S. K. Mitra
8
Time-Domain Characterization Time-Domain Characterization
of LTI Discrete-Time System
of LTI Discrete-Time System
• Likewise, as the system is linear
input output • Now, any arbitrary input sequence x[n] can
0.5δ[n + 2] → 0.5h[n + 2] be expressed as a linear combination of
1.5δ[n − 1] → 1.5h[n − 1] delayed and advanced unit sample
− δ[n − 2] → − h[n − 2] sequences in the form
∞
0.75δ[n − 5] → 0.75h[n − 5] x[n] = ∑ x[k ] δ[n − k ]
• Hence because of the linearity property we k = −∞
get • The response of the LTI system to an input
y[n] = 0.5h[n + 2] + 1.5h[n − 1]
x[ k ] δ[n − k ] will be x[k ] h[n − k ]
49
− h[n − 2] + 0.75h[n − 5] 50
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Time-Domain Characterization
Convolution Sum
of LTI Discrete-Time System
• Hence, the response y[n] to an input • The summation
∞ ∞ ∞
x[ n] = ∑ x[k ] δ[ n − k ] y[n] = ∑ x[k ] h[n − k ] = ∑ x[n − k ] h[n]
k = −∞ k = −∞ k = −∞
will be ∞ is called the convolution sum of the
y[n] = ∑ x[k ] h[ n − k ] sequences x[n] and h[n] and represented
k = −∞
which can be alternately written as compactly as
∞ y[n] = x[n] * h[n]
y[n] = ∑ x[n − k ] h[k ]
51 k = −∞ 52
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
9
Convolution Sum Convolution Sum
• Schematic Representation - • We illustrate the convolution operation for
the following two sequences:
h[n − k ] v[k ]
h[− k ] zn × ∑ y[n] ⎧1, 0 ≤ n ≤ 5
k x[ n] = ⎨
x[k ] ⎩0, otherwise
⎧1.8 − 0.3n, 0 ≤ n ≤ 5
• The computation of an output sample using h[ n] = ⎨
the convolution sum is simply a sum of ⎩ 0, otherwise
products • Figures on the next several slides the steps
• Involves fairly simple operations such as involved in the computation of
55
additions, multiplications, and delays 56
y[n] = x[n] * h[n]
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Amplitude
1
0.5 1
0
0
-0.5
-10 0 10 k→ -10 0 10 k →
y[-4] y[n]
8 8
6 6
Amplitude
Amplitude
4 4
2 2
0 0
-10 0 10 -10 0 10
n n
57 58
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Amplitude
Amplitude
Amplitude
1 1
0.5 1 0.5 1
0 0 0
0
-0.5 -0.5
-10 0 10 -10 0 10 -10 0 10 -10 0 10
y[-1] k→ y[n] k→ y[0] k→ y[n] k→
8 8 8 8
6 6 6 6
Amplitude
Amplitude
Amplitude
Amplitude
4 4 4 4
2 2 2 2
0 0 0 0
-10 0 10 -10 0 10 -10 0 10 -10 0 10
59 n n 60 n n
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
10
Convolution Sum Convolution Sum
Plot of x[1- k] and h[k] h[k]x[1- k] Plot of x[3- k] and h[k] h[k]x[3- k]
2 3 2 3
1.5 1.5
2 2
Amplitude
Amplitude
Amplitude
Amplitude
1 1
0.5 1 0.5 1
0 0 0 0
-0.5 -0.5
-10 0 10 -10 0 10 -10 0 10 -10 0 10
k→ k→ k→ k→
y[1] y[n] y[3] y[n]
8 8 8 8
6 6 6 6
Amplitude
Amplitude
Amplitude
Amplitude
4 4 4 4
2 2 2 2
0 0 0 0
-10 0 10 -10 0 10 -10 0 10 -10 0 10
61 n n 62 n n
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Amplitude
Amplitude
Amplitude
1 1
0.5 1 0.5 1
0 0 0 0
-0.5 -0.5
-10 0 10
k→
-10 0 10
k→
-10 0 10 k→ -10 0 10 k→
y[5] y[n] y[7] y[n]
8 8 8 8
6 6 6 6
Amplitude
Amplitude
Amplitude
Amplitude
4 4 4 4
2 2 2 2
0 0 0 0
-10 0 10 -10 0 10 -10 0 10 -10 0 10
63 n n 64 n n
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Amplitude
Amplitude
Amplitude
1 1
0.5 1 0.5 1
0 0 0 0
-0.5 -0.5
-10 0 10 -10 0 10 -10 0 10 -10 0 10
k→ k→ k→ k→
y[9] y[n] y[10] y[n]
8 8 8 8
6 6 6 6
Amplitude
Amplitude
Amplitude
Amplitude
4 4 4 4
2 2 2 2
0 0 0 0
-10 0 10 -10 0 10 -10 0 10 -10 0 10
65 n n 66 n n
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
11
Convolution Sum Convolution Sum
Plot of x[12- k] and h[k] h[k]x[12- k] Plot of x[13- k] and h[k] h[k]x[13- k]
2 3 2 3
1.5 1.5
2 2
Amplitude
Amplitude
Amplitude
Amplitude
1 1
0.5 1 0.5 1
0 0 0 0
-0.5 -0.5
-10 0 10
k→
-10 0 10
k→
-10 0 10 k→ -10 0 10 k→
y[12] y[n] y[13] y[n]
8 8 8 8
6 6 6 6
Amplitude
Amplitude
Amplitude
Amplitude
4 4 4 4
2 2 2 2
0 0 0 0
-10 0 10 -10 0 10 -10 0 10 -10 0 10
67 n n 68 n n
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
12
Time-Domain Characterization Time-Domain Characterization
of LTI Discrete-Time System of LTI Discrete-Time System
• As a result, for n < 0, the product of the k-th • The product sequence {x[k ]h[−k ]} is plotted
samples of {x[k]} and {h[n − k ]} is always below which has a single nonzero sample
zero, and hence x[0]h[0] for k = 0
y[n] = 0 for n < 0 x[k ]h[ −k ]
0
k
• Consider now the computation of y[0] –5 –4 –3 –2 –1 1 2 3
• The sequence h[ − k ] –2
{h[− k ]} is shown
2
1
–3
• Thus y[0] = x[0]h[0] = −2
k
on the right –1
–6 –5 –4 –2 –1 0 1 2 3
73 74
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
13
Time-Domain Characterization
Time-Domain Characterization
of LTI Discrete-Time System
of LTI Discrete-Time System
• Note: The sum of indices of each sample
• The sequence {y[n]} generated by the product inside the convolution sum is equal
convolution sum is shown below to the index of the sample being generated
y[n] by the convolution operation
5
• For example, the computation of y[3] in the
3
previous example involves the products
0 1
1 1 1
7
n
x[0]h[3], x[1]h[2], x[2]h[1], and x[3]h[0]
–2 –1 2 3 4 5 6 8 9
• The sum of indices in each of these
–2
–3 products is equal to 3
79 –4 80
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
14
Tabular Method of Tabular Method of
Convolution Sum Computation Convolution Sum Computation
• The method can also be applied to convolve • Finally, the decimal point is inserted
two finite-length two-sided sequences according to the rules of conventional
• In this case, a decimal point is first placed multiplication
to the right of the sample with the time • The sample immediately to the left of the
index n = 0 for each sequence decimal point is then located at the time
• Next, convolution is computed ignoring the index n = 0
location of the decimal point
85 86
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
Simple Interconnection
Convolution Using MATLAB
Schemes
• The M-file conv implements the convolution
sum of two finite-length sequences • Two simple interconnection schemes are:
• If a =[− 2 0 1 − 1 3] • Cascade Connection
b =[1 2 0 -1] • Parallel Connection
then conv(a,b) yields
[− 2 − 4 1 3 1 5 1 − 3]
87 88
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
15
Cascade Connection
Cascade Connection
• An application of the inverse system
• An application is in the development of an concept is in the recovery of a signal x[n]
inverse system from its distorted version xˆ[n] appearing at
the output of a transmission channel
• If the cascade connection satisfies the
relation • If the impulse response of the channel is
h1[n] * h2[n] = δ[n] known, then x[n] can be recovered by
designing an inverse system of the channel
then the LTI system h1[n] is said to be the channel ^ inverse system
inverse of h2[n] and vice-versa x[n ]
x[n ] h1[n] h2[n] x[n ]
91 92 h1[n] * h 2[n] = δ[ n]
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
16
Simple Interconnection Schemes Simple Interconnection Schemes
97 98
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra
17