Professional Documents
Culture Documents
DATE OF
: 17 th Oct , 2022
EXPERIMENT
Lab Number : 2
ROLL NO : ___200401033____
Objective:
In this lab, we will learn to develop advanced models in Simulink. We have already
got basic knowledge of MATLAB in the previous semester.
Introduction to Simulink:
Simulink is a dynamic system simulation environment. This allows us to
represent our system as a block diagram where we can connect blocks using the
mouse and edit block parameters using the keyboard. Simulink supports linear and
nonlinear systems modeled in continuous time, sampled time, or
a mixture of both. We can easily create models from scratch or take
existing models and add to them. The simulation is interactive, so we can change
parameters on the fly and see what happens immediately.
Lab Performance:
Task 1:
Generate 10 uniformly distributed random numbers in the range −𝑋𝑋 to 𝑋𝑋,
where 𝑋𝑋 refer to the last two digits of your registration number. Store these
numbers in a file named Data_File.mat by using the To file block. You will be
required to mention a Variable name and select Save format: Array. After
retrieving these random numbers, develop a stem plot in MATLAB.
Procedure:
clc
close all
clear all
y=[-18.5486937023460,1.96021276012073,1.77729932068721,-
11.3365410754162,-28.2027317253885,-22.0105247725782,-
0.397538791130081,-
2.34657555322469,8.54986558088561,22.8347829672670];
stem(y)
title('Random No.')
xlabel('Frequency');
ylabel('Magnitude');
Task 2:
Implement the following equation in Simulink:
2 6
𝑦= (4 sin(3𝑡) − 3 cos(4𝑡)) + 𝑒−2𝑡. (2)
25 25
Task 2:
Visit the following website and choose an audio sample
of your
choice.https://file-examples.com/index.php/sample-audio-
files/sample-mp3-download/
i. Display the time and frequency information of the chosen signal.
ii. At which frequency, you get the highest peak?
iii. Find two peaks on the time display of the signal. What is the time
difference between them?
1.
Time Display:
Frequency Display:
3. T1=7.524, T2=2.508
▲T=5.0167
a)
b)
c)
Conclusions:
From this lab report we conclude that with the help of SIMULINK software we can
compute any given equation. Also, we can display the time and frequency signal of
any given audio. We learn to plot/stem a signal using to workspace and from
Workspace.