Professional Documents
Culture Documents
E&TC
Aim: To perform time shifting, time scaling and reversal of given signals
1) x(-2n+2)
2) x((-n/2)-2)
Software: MATLAB
(Online Matlab Simulator)
Theory:
1. Time Shifting
Suppose that we have a signal x(t) and we define a new signal by adding/subtracting a
finite time value to/from it. We now have a new signal, y(t). The mathematical expression for
this would be x(t ± t0).
Graphically, this kind of signal operation results in a positive or negative “shift” of the signal
along its time axis and while doing so, none of its characteristics are altered. The time-
shifting operation results in the change of just the positioning of the signal without affecting
its amplitude or span.
a) Time-Delayed Signals
1
ADSP LAB, First Year M. Tech. E&TC
b) Time-Advanced Signals
2. Time Scaling
If we multiply the time variable by a factor of 2, then we will get our output signal contracted
by a factor of 2 along the time axis. Thus, it can be concluded that the multiplication of the
signal by a factor of n leads to the compression of the signal by an equivalent factor.
2
ADSP LAB, First Year M. Tech. E&TC
3. Time Reversal
Until now, we have assumed our independent variable representing the signal to be positive.
It can be negative. In fact, one can make it negative just by multiplying it by -1. This causes
the original signal to flip along its y-axis. That is, it results in the reflection of the signal
along its vertical axis of reference. As a result, the operation is aptly known as the time
reversal or time reflection of the signal.
Here you can observe that the value of x[n] at the time instant n = -2 is -1. This is equal to the
value of y[n] at n = 2. Likewise, x[-0.5] = y[0.5] = -1, x[1] = y[-1] = 1, and x[4] = y[-4] = 4.
This indicates that the graph of y[n] is nothing but the original signal x[n] reflected along the
vertical axis.
This applies to both continuous- and discrete-time signals.
Program/Code:
I. Time Shifting
%Shifting on first signal
clc;
clear all;
close all;
n1=input('Enter the amount to be delayed');
n2=input('Enter the amount to be advanced');
n=-2:2;
x=(-2*n+2);
subplot(3,1 ,1);
stem(n,x);
title('signal x(n)');
3
ADSP LAB, First Year M. Tech. E&TC
m=n+n1;
y=x;
subplot(3,1,2);
stem(m,y);
title('Delayed signal x(n-n1)');
t=n-n2;
z=x;
subplot(3,1,3);
stem(t,z);
title('Advanced signal x(n+n2)');
clc;
clear all;
close all;
n=[-3:3];
%first signal
x=((-2*n)+2);
subplot(2,4,1)
stem(n,x);
xlim([-6 6])
title('x1(n)')
%time scaling
subplot(2,4,2);
stem(n*2,x);
xlim([-8 8])
4
ADSP LAB, First Year M. Tech. E&TC
5
ADSP LAB, First Year M. Tech. E&TC
Output:
I. Output of Time Shifting
6
ADSP LAB, First Year M. Tech. E&TC
7
ADSP LAB, First Year M. Tech. E&TC
Conclusion:
We have learned the basic operations on various signals. By analyzing the obtained
plots/figures we practically learned the significance of these operations. Hence we have
successfully performed time shifting, time scaling & time reversing operation on the given
signals.