Sie sind auf Seite 1von 4

MCT-301 SIGNAL AND SYSTEM LAB MANUAL

------------------------------------------------------------------------------------------------------------------------------------------

Lab # 02

Familiarization with new commands & perform the given task


Objectives:
 Study and plot the transformation of the Time Variable for Discrete Time Signals
 Apply time shifting and time scaling.
 Apply the commands of Heaviside,
Introduction:
Shifting of signal:
Time shifting of signals is generally used to fast-forward or delay a signal, as is necessary in
most practical circumstances. Time shifting is mathematically expressed as, Y (t) = X(t – t 0).
Where, X(t) is the original signal, and t0 represents the shift in time. For a signal X(t), if the
position shift t0 > 0, then the signal is said to be right shifted or delayed. In the same manner, if t 0
< 0, implies the signal is left shifted or delayed. MATLAB can be used to perform shifting of
signals. A signal can be delayed as well as advanced.

Reversing of signal:
Assume our independent variable representing the signal to be positive. It can be negative just by
multiplying it by negative number. 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.

Heaviside Command:
The Heaviside step function, or the unit step function, usually denoted by H or θ, is a
discontinuous function, named after Oliver Heaviside, whose value is zero for negative
arguments and one for positive arguments.
Heaviside: Heaviside step function
Syntax: heaviside(x)
Description: heaviside(x) returns the value 0 for x < 0, 1 for x > 0, and 1/2 for x = 0.

Sampling of signals:
y = unsample (x, n) increases the sample rate of x by inserting n – 1 zero between samples. If x is
a matrix, the function treats each column as a separate sequence. y = upsample (x, n, phase)
specifies the number of samples by which to offset the upsampled sequence.
y = upsample (x, n) increases the sample rate of x by inserting n – 1 zero between samples. If x is
a matrix, the function treats each column as a separate sequence.

INSTRUCTOR: S M UMAIR RASHEED


LECTURER
MECHATRONICS & CONTROL ENGG. DEPT.

Page |1
MCT-301 SIGNAL AND SYSTEM LAB MANUAL
------------------------------------------------------------------------------------------------------------------------------------------

Fliplr Command:
Fliplr: Flip array left to right
Syntax: B = fliplr(A)
Description: B = fliplr(A) returns A with its columns flipped in the left-right direction.
If A is a row vector, then fliplr(A) returns a vector of the same length with the order of its
elements reversed. If A is a column vector, then fliplr(A) simply returns A. For multidimensional
arrays, fliplr operates on the planes formed by the first and second dimensions.

Simulations:
 Applying Time Shifting, Time scaling and Time reversing on a single function
Suppose that x(t)=te-t, -1 ≤ t ≤ 3. Plot the signal q(t)=x(1-2t)

Fig. 2.1 Function graph Fig. 2.2 Function graph time Scaling

Fig. 2.3 time reversing graph Fig. 2.4 time shifting graph

INSTRUCTOR: S M UMAIR RASHEED


LECTURER
MECHATRONICS & CONTROL ENGG. DEPT.

Page |2
MCT-301 SIGNAL AND SYSTEM LAB MANUAL
------------------------------------------------------------------------------------------------------------------------------------------

Fig. 2.5 shows plotting discrete time reversal Fig. 2.6 Time reveresal using fliplr

Fig. 2.7 shows the heaviside plotting

Fig. 2.8 Using simple commands show continous signal plotted in the form of unit step signal
INSTRUCTOR: S M UMAIR RASHEED
LECTURER
MECHATRONICS & CONTROL ENGG. DEPT.

Page |3
MCT-301 SIGNAL AND SYSTEM LAB MANUAL
------------------------------------------------------------------------------------------------------------------------------------------

Fig. 2.9 show continous signal plotted in the form of unit step signal using heaviside

Fig. 2.10 shows the up and down sampling examples

Conclution:

 After using the commands we are able to plot step functions and can scalwwe them
according to time.
 Also learn the sampling of a function

INSTRUCTOR: S M UMAIR RASHEED


LECTURER
MECHATRONICS & CONTROL ENGG. DEPT.

Page |4

Das könnte Ihnen auch gefallen