Lab Report 1
Lab Report 1
Objectives of Lab 1
EE-379: Control Systems Page 1
The objectives of the first lab are:
An introduction to MATLAB Control systems toolbox, which is one of the most popular
software tools used by control engineers.
Find how to represent transfer functions (or models) in MATLAB and Simulink.
Introduction:
Laplace Transform transforms a function of a real variable t to a function of a complex variable
s. The purpose of this conversion is to transform ordinary differential equations into algebraic
equations, which makes it easier to solve ODE’s. Inverse transform simply converts the function back
into time domain. These properties allow it to be used for solving and analyzing linear dynamical
systems and optimization purposes.
Lab Tasks
Task 1:
(a) Laplace Transform
MATLAB Code:
%Laplace Transform
syms t;
g1t = t*sin(2*t)+exp(-2*t);
G1s = laplace(g1t)
Output:
MATLAB Code:
syms s;
G1s = 1/(s*(s+2)*(s+3));
g1t = ilaplace(G1s)
G2s = 10/(s+3)*(s+2)^2;
g2t = ilaplace(G2s)
Output:
Task 2:
Poles and Zeros of Transfer Function
MATLAB Code:
syms s;
num = [5 10];
den = [1 7 12];
G1 = tf(num,den)
MATLAB Code:
syms s;
num = [30 -180];
den = [1 4 13 7];
G1 = tf(num,den);
G1_zpk = zpk(G1)
num = [1 0 1 1];
den = [1 1 0 6];
G2 = tf(num,den);
G2_zpk = zpk(G2)
num = [1 5 6];
den = [1 4 15 35];
G5 = tf(num,den);
G5_zpk = zpk(G5)
num = [1 0 -1];
den = [1 4 6 4];
G6 = tf(num,den);
G6_zpk = zpk(G6)
Output:
MATLAB Code:
syms s;
Output:
Task 6:
Simulink
M=0.5;
m=0.5;
b=0.1;
L=0.3;
I=0.006;
q=(M+m)*(I+m*L^2)-(m*L)^2;
g=9.80;
num = [(m*L)/q 0 0];
den = [1 (b*(I+m*(L^2)))/q -(((M+m)*m*g*L)/q) -((m*g*L)/q) 0];
G1 = tf(num,den)
pzplot(G1)
Conclusion:
In this lab, we learned the basic procedure of calculating the Laplace and inverse Laplace in
MATLAB using the laplace () and ilaplace () functions respectively. The functionality of transfer
function tf () and zeros, poles, gain zpk () were also observed in detail. Moreover, we used Simulink to
form various transfer functions. We also learned the procedure to create a generalized form of
transfer function using the same software.