0% found this document useful (0 votes)
30 views5 pages

Controls Lab1

Uploaded by

maimoonaziz2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views5 pages

Controls Lab1

Uploaded by

maimoonaziz2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Control Systems

EEE-325
Lab Report#01

Submitted Maimoona Aziz


By: Syed Zubair Abbas
Khansa Maryam
Registration FA20-BEE-094
No: FA20-BEE-202
FA20-BEE-232
Class: BEE-5B

Submitted Sir Ahsan Malik


To:
Lab #01
MATLAB Tutorial (Basic Commands)

 Pre-Lab:
Objectives:
To study the basic commands of MATLAB and understand SIMULINK
environment.
 In-Lab Tasks:
Lab Task 1
Plot the function 𝑥𝑥(𝑡𝑡) = 𝑒𝑒𝜆𝜆𝜆𝜆 for λ = −1, −2, −3, −4 and 0 ≤ t < 10 on the same
graph. Also use legend commands and different line styles or colors to label the plots.
t = 0:0.1:10
lem = [-1;-2;-3;-4]
h=exp(lem*t)
plot(t,h)
xlabel('Time')
ylabel('h(t)')
legend("in lab task 1")

Lab Task 2
i. Plot the function x(t) = cos(t) for 0 < t < 4π.

ii. Generate the same signal in SIMULINK and plot.

iii. Compare plots of parts i and ii in the same graph.


t=0:0.1:4*pi
x=cos(t)
plot(t,x)
xlabel('Time')
ylabel('cos(t)')
legend("in lab task 2")

 Post Lab Tasks:


Task 1:
t = 0:0.1:100;
b=1;
y = (5*t+b);
subplot(4,1,1);
plot(t,y);
xlabel('time');
ylabel('x(t)');
legend ("b=1");
b=2;
y = (5*t+b);
subplot(4,1,2);
plot(t,y);
xlabel('time');
ylabel('x(t)');
legend ("b=2");
b=3;
y = (5*t+b);
subplot(4,1,3);
plot(t,y);
xlabel('time');
ylabel('x(t)');
legend ("b=3");
b=4;
y = (5*t+b);
subplot(4,1,4);
plot(t,y);
xlabel('time');
ylabel('x(t)');
legend ('b=4');
Task 2:

All together:
t = 0:0.1:10
x = sin(t)
subplot(3,1,1)
plot(t,x)
title('sin wave')

t = 0:0.1:10
x1 = cos(t)
subplot(3,1,2)
plot(t,x1)
title('cos wave')

t = 0:0.01:10
x1 = square(t)
subplot(3,1,3)
plot(t,x1)
title('square wave')

 Critical Analysis:
In this lab, we overviewed MATLAB & its basic commands & were
able to revise concepts of signals & systems. Other than that we plot
basic cos, sin & square wave by using plot command. Additionally, we
have used xlabel and ylabel to mention that x and y axis and also we use
subplot for more than one graph at a time. We also used legend to show
the name of wave. Furthermore we used the Simulink to build or generate
cosine wave by putting a scope in Simulink.

You might also like