Professional Documents
Culture Documents
Bahria University Karachi Campus: Basic Operation On Signals
Bahria University Karachi Campus: Basic Operation On Signals
LAB EXPERIMENT # 3
OBJECTIVE:
To perform basic operations on signals, Time Scaling, Time Reversal, Time Shift.
To plot the signals and their operated counterparts using MATLAB
TOOLS:
THEORY:
There are three basic operations performed on signals in a complex system. Before one models
complex signals and systems, he must understand the mathematical representation and physical effect
of these operations on signals.
Time Scaling
The time scaled version of x(t) is represented mathematically as x(bt), where b is the scale factor
and is always greater than 0. Further, there are two possibilities; i.e., either b<1 or b>1. If b<1, the
resulting scaling is called Expansion, and the resulting signal is called Expanded Signal. Conversely,
if b>1, the resulting scaling is called Compression, and the resulting signal is called Compressed
Signal.
Time Reversal
The time reversed version of x(t) is represented mathematically as x(-t), where minus sign
shows the time reversal. The resulting signal is called Time Reversed Signal.
Time Shifting
The time shifted version of x(t) is represented mathematically as x(t-t1), where t1 is the
amount of time by which the signal is delayed. The time shift is called Delay if t1>0 and it is called
Time Advance if t1<0. If t1>0, the resulting signal is called Time Delayed Signal. Conversely,
if t1<0, the resulting signal is called Time Advanced Signal.
13
LAB-3
PROCEDURE:-
Program 1
Following MATLAB program plots function x(t)=sawtooth(wt), its compressed version
x(2t), and its expanded version x(0.5t).
f=1;
w=2*pi*f;
t=-5:0.01:5;
b = 2;
x = sawtooth(w*t);
x1 = sawtooth(w*b*t);
b=0.5;
x2 = sawtooth(w*b*t);
plot(t, x, 'red', t, x1,'green', t, x2, 'blue');
axis([-3 3 -5 5]);
Program 2
Following MATLAB program generates and plots function x(t)=et, and its time reversed version
x(-t).
t=-3:0.01:3;
x = exp(t);
xrev= exp(-t);
plot(t, x, 'red', t, xrev, 'blue');
axis([-3 3 0 5]);
Program 3
Following Matlab program plots function x(t)=e-3t, its time delayed x(t-1), and its time
advanced version x(t+1).
t=-3:0.01:3;
t1 = 1;
a=3;
x = exp(-a*t);
x1 = exp(-a*(t-t1));
t1=-1;
x2 = exp(-a*(t-t1));
plot(t, x, 'red', t, x1, 'green', t, x2, 'blue');
axis([-3 3 0 5]);
grid on
14
LAB-3
Type these three programs; program 1, program 2, and program 3 and save them with filenames prog1,
prog2, prog3 respectively, and then run them.
OBSERVATION:
Attach the plots you obtained from the above mentioned programs and also for the programs mentioned
in exercises below.
QUESTIONS:
1. Write a MATLAB program, which generates and plots function x(t)=sin(2fot), its delayed
version x(t-0.2) and, compressed version of the delayed signal, i.e., x(2t-0.2), and expanded
version of the delayed signal i.e., x(0.5t-0.2). Keep f0=1.
4n
2. Plot the discrete time signal x[nT] , for T=2. Also plot the following:
2 n2
x[(n+4)T], T = 2
x[(n-2)T], T = 0.75
t
3. Plot the continuous time signal x(t) . Plot the following:
t 4
2
15