Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Mehran University of Engineering and Technology, SZAB Campus, Khairpur Mir’s

Department of Electrical Engineering


Signals & Systems
Lab # 03

Name: Roll No: ________

Score: ______________________Signature: ____________ Date:

Basic Operations on Signals

OBJECTIVES:

1. To perform basic operations of signals


 Time Scaling
 Time Reversal
 Time Shift
2. To perform combinations of these operations on a signal
3. To plot the signals and their operated counterparts using MATLAB

EQUIPMENT:

 IBM compatible computer


 MATLAB

DISCUSSION

Basic Operations
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.

1
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.

EXAMPLES:

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=-2:0.01:2;
b = 2;
x = sawtooth(w*t);
x1 = sawtooth(w*b*t);
b=0.5;
x2 = sawtooth(w*b*t);
plot(t, x, t, x1,':', t, x2, '--');
legend('original signal', 'compressed version', 'expanded
version');
grid;
axis([-2 2 -2 2]);
title('your roll number')

Program 2:
Following Matlab program generates and plots function x(t)=et, and its time reversed
version x(-t).

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).

2
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,t, x1, '--', t, x2, ':');
legend('original signal', 'Time delayed
signal', 'Time advanced signal');
axis([-3 3 0 10]);
grid
title('your roll no')

PROCEDURE:

1. Type program 1 and save it with a filename having prog1.m extension,


and then run it.
2. Type program 2 and save it with a filename having prog2.m extension,
and then run it.
3. Type program 3 and save it with a filename having prog3.m extension,
and then run it.

OBSERVATION:

Attach the plots you obtained from the above mentioned programs and
also for the programs mentioned in exercises below.

EXERCISES:

Exercise 1:

Write a MATLAB program, which generates and plots function


x(t)=sin(2fot), its delayed version x(t-0.2) and, compressed
version of the delayed signal, i.e., x(2(t- 0.2)), and expanded version
of the delayed signal i.e, x(0.5(t-0.2)). Keep f0=1.

Exercise 2:

Write a program that gets any sequence of the input signal, amplification
factor, attenuation factor and amplitude reversal factor from user. Perform
these operations on dependent variable and display all the graphs of signal
amplification, attenuation and reversal with original signal as individual
graphs but on single graph window.

You might also like