0% found this document useful (0 votes)
47 views

Operation On Discrete-Time Signals & Discrete-Time System: Lecture - 3

Uploaded by

Himanshu sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Operation On Discrete-Time Signals & Discrete-Time System: Lecture - 3

Uploaded by

Himanshu sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Lecture -3

Operation on Discrete-time
signals & discrete-time system
Dr K. Mohanaprasad
Associate Professor
School of Electronics Engineering
(SENSE)
VIT Chennai
Some Basic Operations
on Sequences
 Product (modulation) operation:

ª Modulator
x[n] × y[n]
y[n] = x[n] ⋅
w[n] w[n]
 Creating a finite-length sequence from an infinite-length
sequence by multiplying the latter with a finite-length
sequence called a window sequence
 Process called windowing
Some Basic Operations on Sequences

 Addition operation:
x[n] + y[n]
ª Adder
y[n] = x[n] +
w[n] w[n]
 Multiplication operation

ª Multiplier
A
x[n] y[n] y[n] = A ⋅
x[n]
Some Basic Operations
on Sequences

 Time-shifting operation: y[n] = x[n − N ]


where N is an integer
 If N > 0, it is delaying operation

ª Unit delay z −1 y[n] y[n] = x[n −


x[n]
1]
 If N < 0, it is an advance operation

ª Unit advance
x[n] z y[n]
y[n] = x[n +
1]
Some Basic Operations
on Sequences

 Time-reversal (folding) operation:

y[n] = x[−n]
 Branching operation: Used to
provide multiple copies of
a sequence

x[n] x[n]

x[n]
Time-scale example:
x(t-1) x(t+1)
1

-2 -1 1
Continued……….
•d)  Time Shifting :
e) Time Reversal:
f) Sampling rate alteration:

R > 1 = Interpolation
R < 1 = Decimation
9
Continued……….
•  
Interpolation:

10
Continued……….
•  
Decimation:

11
Discrete Systems
 A discrete-time system processes a given input sequence x[n] to
generates an output sequence y[n] with more desirable
properties
 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
y[n] = ℜ{x[n]}

The operator that acts on the input sequence


Classification of Systems
 Discrete time systems can be classified based on their properties

ª Discrete vs. continuous


ª Linear vs. non-linear
ª Shift-invariant or shift-variant
ª Causal vs. noncausal
ª Memoryless vs. with memory
ª Stable vs. unstable
Linearity
 Let y1[n] be the output due to an input x1[n] and y2[n] be the output due to an input
x2[n]. A system is said to be linear, if the following superposition & homogeneity
properties are satisfied

x[n] = α x1[n] + β x2 [n] y[n] = α y1[n] + β y2 [n]

ℜ{αx1[n]+βx2[n]}= α.ℜ{x1[n]}+ β.{x2[n]}

 This property must hold for any arbitrary constants α and β , and for all possible
inputs x1[n] and x2[n], and can also be generalized to any arbitrary number of
inputs
An Example - Accumulator
 A discrete system whose input / output relationship is given as
n
y[n] = ∑ x[l] The second form is used, if the
l=−∞ signal is causal, in which case
n
y[-1] is the initial condition
= y[−1] ∑ x[l],
+ l=0

is known as an accumulator. The output at any given time, is simply the sum of all
inputs up to that time.

 Is the accumulator linear?


 How about the accumulator for the causal
systems?
Â
 How
As anabout the system
exercise, try y[n]y[n]=ax [n]+b
= x 2 [n] −1 x[n − 1]x[n + 1]
y (t )   2 x(t )
Ex. Test the Linearity of the system 2

2
y1 (t )  4 x1 (t )
2
y2 (t )  4 x2 (t )
y3 (t )  a1 y1 (t ) a2 y2 (t )
2 2
y3 (t )  4a1 x1 (t ) 4a2 x2 (t )

y4 (t )  H  a1 x1 (t )  a2 x2 (t )

y4 (t )  4 a1 x1 (t )  a2 x2 (t )
2

2 2
y4 (t )  4a1 x1 (t ) 4a2 x2 (t ) 8a1a2 x1 (t ) x2 (t )

y3 (t )  y4 (t )
Hence the system is Non-Linear
Test the Linearity of the system y (t )  x(t 2 )
y1 (t )  x1 (t 2 )

y2 (t )  x2 (t 2 )
y3 (t )  a1 y1 (t ) a2 y2 (t )
y3 (t )  a1 x1 (t 2 ) a2 x2 (t 2 )
y 4 (t )  H  a1 x1 (t )  a2 x2 (t )
y4 (t )  a1 x1 (t ) a2 x2 (t )
2 2

y3 (t )  y 4 (t )
Hence the system is Linear
Shift - Invariance
 A system is said to be shift-invariant if ℜ(x[n-M])=y[n-M], for all n, m.

 For sequences and systems where the index n is related to discrete instants
of time, this property is also called the time-invariance property

 Time-invariance property ensures that for a specified input, the output is


independent of the time the input is being applied
An Example - Upsampler
 A system whose input / output characteristics can be written as
⎧ x[n / L], n = 0, ± L, ± 2L,.....
xu [n] = ⎨
⎩ 0, otherwise

is known as an upsampler.
 This system inserts L zeros between every sample. If the samples are
inserted based on their amplitudes, then the system is called an interpolator.

y[n]

Is the upsampler a time-


invariant system?
3 4
n
0 1 2 5 6 7 8 9 10 11 12
Linear
Time-Invariant Systems
 A system that satisfies both the linearity and the time (shift)
invariance properties is called a linear time (shift) invariant
system, LTI (LSI).

 We will see that these group of systems play a particularly important


role in signal processing.
ª They are easy to characterize and analyze, and hence easy to design
ª Efficient algorithms have been developed over the years for such systems
Test whether the system y(t) = ex(t) is Time-Invariant or not
y(t, t0) = ex(t-t0)
y(t-t0) = y(t)|t = t – t0
y(t-t0) = ex(t-t0)
Therefore, y(t,t0) = y(t-t0)
Hence, the system is Time Invariant
Causality
 A system is said to be causal, if the output at time n0 does not depend
on the inputs that come after n0.

 In other words, in a causal system, the n0th output sample y[n0]


depends only on input samples x[n] for n ≤ n0 and does not depend on
input samples for n>n0.
 Here are some examples: Which systems are causal?

y[n] = α1x[n] + α 2 x[n − 1] + α 3 x[n − 2] + α 4 x[n − 3]

y[n] = b0 x[n] + b1x[n − 1] + b2 x[n − 2]


1
y[n] = xu [n] + ( xu [n − 1] + xu [n + 1])
+ a1 y[n − 1] + a2 y[n − 2] 2
1
y[n] = y[n − 1] + x[n] y[n] = xu [n] + ( x u [n − 1] + x u [n + 2])
3

2
+ ( xu [n − 2] + xu [n + 1])
3
•Causal and non-causal System
•A system is causal if the present value of the output signal depends only on
the present or past values of the input signal.

•A system is noncausal if the present value of the output signal depends on the future values
of the input signal.
An Example - Downsampler
 A system whose input-output characteristic satisfies y[n] = x[Mn]
where M is a (+) integer, is called a downsampler or a decimator.
ª Such a system reduces the number of samples by a factor of M by removing M
samples from between every sample.

 Is this system
ª Linear? In class
exercise
ª Time (shift) invariant?
ª Causal?
Memory
 A system is said to be memoryless if the output depends only on the
current input, but not on any other past (or future) inputs. Otherwise,
the system is said to have memory.

 Which of the following systems have memory?

y[n] = y[n − 1] +
x[n]
y[n] = x[Mn]
⎧ x[n / L], n = 0, ± L, ± 2L,.....
xu [n] = ⎨
0, otherwise
n
y[n] = ∑ x[l]
l=−∞
Example
y(t) = x(t) sin (2t)
y[n] = u[n]
 
A system is said to possess memory (i.e. dynamic) if its output signal depends on past
or future values of the input signal.
Example
y(t) = x(t+1) + 5
y[n] = x[n] + x[n-1]
 
Stability
 There are several definitions of stability, which is of utmost
importance in filter design. We will use the definition of stability in
the BIBO sense

 A systems is said to be stable in the bounded input bounded output


sense, if the system produces a finite (bounded) output for any
finite
(bounded) input, that is,
ª If y[n] is the response to an input x[n] that satisfies |x[n]|≤Bx<∞, and y[n] satisfies
|y[n]| ]|≤By<∞, then the system is said to be stable in the BIBO sense.

 A system (filter) that is not stable is rarely of any practical use (except
for very specialized applications), and therefore, most filters are
designed to be BIBO stable.
An Example –
Moving Average Filter
 An M – point moving average system (filter) is defined as
M −1
1 ∑ x[n −k ]
y[n] = M
k =0

 What would you use such a system for?


 Is this system stable?
Discrete Convolution
 The operation by far the most commonly used by DSP professionals,
and most commonly misused, abused and confused by students.

 At the heart of any DSP system:

Discrete-time
x[n] System, h[n] y[n]
Input sequence Output sequence
y[n] = x[n] ∗ h[n]

= ∑ x[m] ⋅ h[n − m] h[n]: Impulse response of the system
m=−∞

= ∑ h[m] ⋅ x[n − m]
m=−∞
Discrete Convolution
 The “n” dependency of y[n] deserves some care: for each value of “n”
the convolution sum must be computed separately over all values of a
dummy variable “m”. So, for each “n”
1. Rename the independent variable as m. You now have x[m] and h[m]. Flip h[m]
over the origin. This is h[-m]
2. Shift h[-m] as far left as possible to a point “n”, where the two signals barely
touch. This is h[n-m]
3. Multiply the two signals and sum over all values of m. This is the convolution
sum for the specific “n” picked above.
4. Shift / move h[-m] to the right by one sample, and obtain a new h[n-m]. Multiply
and sum over all m.
5. Repeat 2~4 until h[n-m] no longer overlaps with x[m], i.e., shifted out of the x[m]
zone.

y[n] = x[n] ∗ h[n] = ∑ x[m] ⋅ h[n − m] = ∑ h[m] ⋅ x[n − m]
m=−∞ m=−∞
Properties of convolution
•Commutative

•Distributive

•Associative
Convolution Demo

x[n]=0.55n+3(u[n+3]-u[n-7]) dconvdemo.m h[n]=u[n]-u[n-10]


Convolution Example

n<N1
x[n] = a n u[n]
⎧1 N1 ≤ n ≤ N 2
h[n] = ⎨
⎩0 otherwise

⎧ N1<n<N2
⎪0 n < N1

⎪1 − a n− N1
y[n] = ⎨ N1 ≤ n <
+1
N2 ⎪ 1−a


⎪ n− N
2 1 − a N 2 − N1 +1 n ≥ N 2
a
⎩ 1−a
n>N2
In Matlab
 Matlab has the built-in convolution function, conv(.)
 Be careful, however in setting the time axis

n=-3:7;
x=0.55.^(n+3);
h=[1 1 1 1 1 1 1 1 1 1 1];
y=conv(x,h);
subplot(311)
stem(x)
title(‘Original signal’)
subplot(312)
stem(h) % Use stem for discrete
sequences title(‘Impulse response / second
signal’) subplot(313)
stem(y)
title(‘ convolution result’)

Digital Signal Processing, © 2006 Robi Polikar, Rowan University


The Vector Method for Convolution
of for Finite Sequences

 (a) x[n]=[-1 2 -3 2 -1]; h[n]=[-0.5 1 1.5]

Negative shifts of n Positive shifts of n

You might also like