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

Eee2005 - Digital Signal Processing

The document describes an experiment to generate various signals using MATLAB. The signals generated include unit impulse, unit step, unit ramp, exponential increasing and decreasing, sine, triangular, Gaussian, and parabolic signals. MATLAB code is provided to generate plots of each signal. The results show that the experiment successfully generated the signals to analyze system performance and functionality using time domain analysis.

Uploaded by

Nathan Shankar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Eee2005 - Digital Signal Processing

The document describes an experiment to generate various signals using MATLAB. The signals generated include unit impulse, unit step, unit ramp, exponential increasing and decreasing, sine, triangular, Gaussian, and parabolic signals. MATLAB code is provided to generate plots of each signal. The results show that the experiment successfully generated the signals to analyze system performance and functionality using time domain analysis.

Uploaded by

Nathan Shankar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

EEE2005 – DIGITAL SIGNAL PROCESSING

Lab Digital Assignment-1

Name: Nathan Shankar


Reg No: 19BEE0381
Slot: L51+L52
Faculty: Prof. Sharmila A
Expt. No.: 1 Name: Nathan Shankar
Date: 12 / 08 / 2021 Reg No: 19BEE0381

GENERATION OF SIGNALS
AIM:

To generate the following signals using MATLAB2021a

1. Unit impulse signal

2. Unit step signal

3. Unit ramp signal

4. Exponential increasing signal

5. Exponential decreasing signal

6. Sine signal

7. Triangular signal

8. Gaussian signal

9. Parabolic signal

REQUIRED SOFTWARE:

System with MATLAB R2015a.

MATLAB PROGRAM:

1.Unit impulse signal, Unit step signal, Unit ramp signal:


clc;
clear all;
close all;
n = -20:20;
x = [zeros(1,20) 1 zeros(1,20)];
subplot(3,1,1);
stem(n,x);
xlabel('Time index n');
ylabel('Amplitude');
title('Unit Impulse Signal');
y = [zeros(1,20) 1 ones(1,20)];
subplot(3,1,2);
stem(n,y);
xlabel('Time index n');
ylabel('Amplitude');
title('Unit Step Signal');
z=[zeros(1,21),1:20];
subplot(3,1,3);
stem(n,z);
xlabel('Time index n');
ylabel('Amplitude');
title('Unit Ramp Signal');
2.Exponential

a. Increasing signal
n=0:10;
a=2;
x=a.^n;
stem(n,x);

b. Decreasing signal
n=0:10;
a=0.5;
x=a.^n;
stem(n,x);

3. Sine Wave

t=0:0.1:20;
x=3*sin(t);
plot(x);
xlabel('Time');
ylabel('Amplitude');
title('Sinusoidal Signal');

4. Triangular Wave

a=2;
x1=1-abs(t)/a;
x2=0;
x=x1.*(abs(t)<=a)+ x2.*(abs(t)>a);
plot(x);
xlabel('Time');
ylabel('Amplitude');
title('Triangular Signal');

5. Gaussian Waveforms:

a=2;
x=exp(-a.*(t.^2));
plot(x);
xlabel('Time');
ylabel('Amplitude');
title('Gaussian Signal');

6. Parabolic Signal:

a=0.4;
x1=(a*(t.^2))/2;
x2=0;
x=x1.*(t>=0)+ x2.*(t<0);
plot(x);
xlabel('Time');
ylabel('Amplitude');
title('Parabolic Signal');
OUTPUT GRAPH:
INFERENCE :

1. Unit impulse signal :


Impulse function is denoted by δ(t). and it is defined as δ(t) = 1 𝑡 = 0
0 t≠0
Unit Impulse is also called Dirac Delta Function. It is an Even Signal and also an Energy Signal. Upon integrating we
get a unit step signal. The area of the impulse function is one. Impulse response emphasis on change in the system
in reaction to some external change

2. Unit step signal


Unit step function is denoted by u(t). It is defined as u(t)= 1 𝑡 ≥ 0
0 t<0
Unit Step function is also called Heaviside Step Function. It is neither an Even nor an Odd signal. Upon integrating we
get a ramp signal. The step signal defines the sudden change in properties of actual signal. It is being used to see the
transient response of system as it gives you the idea about how the system reply to interruption and somehow the
system stability.

3. Unit ramp signal


Unit ramp function is denoted by r(t). It is defined as r(t)= 𝑡 𝑡 ≥ 0
0 t<0
It is neither a power signal nor a energy signal. It resembles a constant velocity input to the system. Area under unit
ramp is unity. Integral of a ramp signal gives a parabolic signal.

4. Exponential increasing signal


Exponential signal are of the form of x(t) = eαt. The shape of exponential can be defined by α. In this case since α > 1.
This is neither a Power nor an Energy signal.

5. Exponential decreasing signal


Exponential decreasing signal are of the form of x(t) = e-αt. The shape of exponential can be defined by α. In this case
since α < 1. This is an Energy signal.

6. Sine signal
Sinusoidal signal is in the form of x(t) = A cos(w0+ θ), where A is the amplitude of the signal and w0 is the frequency.
The rate at which the amplitude changes is not constant. In fact, the slope of a sinusoid varies in a sinusoidal fashion.
The period of the sinusoid is T = 1/ f = 2π /ω.

7. Triangular signal
A triangular signal is denoted by δ(t). It is defined as δ(t)= = 1 − |t| |t| < 1
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
A triangular wave or triangle wave is a non-sinusoidal waveform. It is a periodic, piecewise linear, continuous real
function. Like a square wave, the triangle wave contains only odd harmonics.

8. Gaussian signal
The graph of a Gaussian is a characteristic symmetric "bell curve" shape. The parameter a is the height of the curve's
peak, b is the position of the center of the peak, and c.
(𝑥−𝑏)2

f(x)=𝑎𝑒 2𝑐2
9. Parabolic signal
In parabolic signal, the instantaneous value varies proportional to the square of time from the initial value of zero at
t=0. The parabolic signal resembles a constant acceleration input to the system
𝐴𝑡 2
f(x)= 𝑡≥0
2
0 t<0

RESULT : The experiment to generate the above mentioned signals using MATLAB R2021a was performed
successfully and the output was verified. In time domain analysis, these test signals are used to assess a system's
performance and functionality. All of these have different graphs and contribute to some form of analysis of a
system. A dynamic system's behavior and character are determined by these signals. In our day to day life all
digital electronics, including computers, data transfer devices, phones and even something as small as a
pacemaker employ digital signals.

You might also like