Lab 1

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 6

Control Engineering and

Instrumentation
(LAB)
Course Code: ME-316L

LAB # 1
Class: Fall-2015
Introduction 2

 What is Control Engineering


 It is an Engineering discipline that applies control theory to design
systems with desired behaviors.

 Why Control Engineering


 Control engineers make systems work efficiently and predictably.
Control System 3

Combination of components that act together to


perform a certain objective.

 Parts of a system
 Input (manipulated variable)
 State Variables
 Output (controlled Variable)
Introduction to MATLAB 4
 MATLAB (Short for Matrix Laboratory)
 MATLAB Environment
I. Command Window
II. Command History
III. Workspace
IV. Current Folder
 Built in functions
I. sqrt, inv(matrix),abs, etc

You may visit https://www.mathworks.com/ searches relating MATLAB.


Basic Codes 5

'Basic'
A=5
B=6
C=A+B;
D=A-B;
E=A*B;
F=A/B;

'How to write a matrix'


'2X2 Matrix'
A=[1 3; 2 4]
B=[5 6;7 8]

C=A+B
D=A-B
E=A*B
F=A/B
Plotting in MATLAB 6
x = [0:2:18];
y=[0, 0.33, 4.13, 6.29, 6.85, 11.19, 13.19, 13.96, 16.33, 18.17];
plot (x,y)

 Titles, Labels, and Grids:

plot(x,y)
xlabel('Time, sec')
ylabel('Distance, ft')
grid on

 for multiple plots you can use “hold on” command.

plot (x,y)
Hold on
z=[1:10];
plot (y,z)

You might also like