You are on page 1of 6

Control System Lab.

EI 593 (EE)

Introduction
1) Entering and displaying constants and expressions :i) x = 5 ; y = 4*x + 12/3 100^0.5 ; z = 2 + 3j try x <enter> y <enter>
2) Entering a Vector and displaying it :
i) x = [ 1 2 3 4 ] ; y = 10 + x ; try y <enter>
3) Entering and displaying matrices :
i) A = [ 1 2 ; 3 4 ; 5 6 ] ; A = ?
ii) XX = [ 1 ; 2 ; 3 ; 4 ] ; XX = ?
iii) Z = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] ; Z = ?
4) Note the following matrix operations :
i)
+,= Addition, Subtraction
ii) *
= Matrix Product
iii) .*
= Elementwise Product
iv) A/B
= AB-1
v) A\B
= A-1B Solution of Ax = B
vi) A^n
= An
vii) A
= Transpose of A
Try them with two 3x1 column vector and 2x3 and 3x3 matrices.
g = 0.3333
0
0
0.6667
0
0
1.0000
0
0
Note : Here f = d * e, which is not possible as the two matrices i.e., d & e are not compatible i.e.,
one is a 3x1 matrix and other is also 3x1 matrix so multiplication cannot be done.
5) Creating arrays with a colon :D = 1 : 4, D = ?
D = 1 : 0.5 : 4 ; D = ? ; length (D) = ?
X = 1 : 0.05 : 1 ; Y = X . *X ; X = ? ; Y = ?
6) Note the following functions and constants from Help :- abs, asin, acos, atan, conj, exp, Imeg, log,
log 10, real, sign, sin, tan, pi, sum, diag.
7) Try SUM [ 1 2 3 ] ; SUM (Magic (3))
8) Note the following commands from help :
clc, dir, info, look for, what, clear, size, who, home, exit, ans, eps, flops.
9) Note the following matrix function :
eig, poly, inv, trace, expm with arbitary non-singular 3x3 matrices A & B and diagonal matrix L.
Find L-1, eig L, eig, A-1LA, Poly A, expm, Trace(A), Trace(B).
a) Compare eig (A) and eig (A)
b) Take any matrix A, find Z = A*A and sqrtm (Z).
10) Note the features of Linear 2-D plot functions plot and auxiliary functions axis and grid
a) Try the command sequence
b) Change the line type and colour.
c) Toggle the grids ON and OFF.
d) Crop the graph to view interesting parts of the graph closely.
11) Take any non-singular 3x3 matrices A & P and find eig (A), eig (P -1AP).
12) Let A = [ 3 0 9 ; 3 1 0 ; 0 0 2 ] Find eig (A) and diag (A).

Experiment 1
Name of the Experiment: Familiarization with MATLAB Control System toolbox & MATLAB
SIMULINK Toolbox.
1) Note the control system toolbox functions feedback, series, parallel, print sys & C loop from help.
2)
a) Enter the system transfer function :
10
s+1
G1 (s) = and G2 (s) = by separately specifying the numerator
s(s+5)
s
and denominator as vectors containing coefficients of s in descending sources of s display G1 (s)
and G2 (s). [ eg. num1 = [ 0 0 10 ]; den1 = [ 1 5 0 ]; ]
b) Find the transfer function of resultant system when G2 (s) is connected in series with G1 (s) and
display the result.
c) Find the transfer function when G1 (s) is connected in forward path and G2 (s) in feedback path
with (1) positive feedback and (2) negative feedback. Display the result in each case.
d) Find the closed loop transfer function of the system G 1 (s) with unity feedback.
3) Look up the function PZMAP by using help. Obtain the pole zero mapping of the following system.
s+2
G (s) =
s(s+1)(s+3)
4)
a) Look up the function minreal by using help.
s2 + 4s + 3
b) Enter the transfer function G(s) =
.
s3 + 5s2 + 6s
Obtain the minimal realization of the system after pole-zero cancellation.
c) Obtain the pole zero mapping of the system before and after cancellation of pole zero.
5) Enter the command Simulink at the MATLAB prompt to open the sinulink block library. Select
New from the file menu on the menu bar of simulink to open a new file. Use a step input block
from the sources library (double click on a library block to open it) a transfer function block from
the linear library. Draw these from the respective libraries to the untitled window. Connect them as
shown below.

step input

T.F.

Auto scale graph

Experiment 2
Name of the Experiment : Study of step response for first and second order system with unity feedback
using MATLAB and calculation of parameters for different system design.

Experiment 2A
1) Find out the step response of following unity feedback first order system whose open loop transfer
function is given and calculate time constant, settling time and steady state error.
i)

5
G (s) =
s+25

ii)

6
G (s) =
1+0.8s

iii)

s
G (s) =
s+5

iv)

0.8
G (s) =
1+0.4s

v)

1
G (s) =
1+5s

Experiment 2B
2) Find out the step response of following unity feedback second order system (whose open loop
transfer function is given) with unity feedback and calculation of time response specifications for
different system design.
i)

ii)

G (s) =

16

s2 + 4s + 16

G (s) =

25

(s + 3)(s + 6)

G (s) =

10

(s + 5)2

iii)

iv)
G (s) =
v)
G (s) =

s2 + 10s + 25
0.8

s2 + s + 1.04

Experiment 3

Name of the Experiment: Simulation of impulse response for type zero, one and two with unity feedback
using MATLAB.
1. Obtain the impulse response of following unity feedback system whose open loop transfer function is
given. Also find out the steady state error in each case.
1)

2
G (s) =
s+4

2)

2
G (s) =
s(0.1s+2)

3)

5
G (s) =
s(s+6)

4)

5
G (s) =
s2+16s

5)

5
G (s) =
s2(s+1)

6)

10
G (s) =
s3+3s2

Experiment 4

Name of the Experiment : Determination of Root Locus, Bode Plot and Nyquist Plot using MATLAB
toolbox for a given second order transfer function and listing of specifications.

Experiment 4A
Draw root locus of the following unity feedback system using MATLAB and find out the range of value of k
(if any) for which the system will become stable.
k
a)
G(s) H(s) =
(s+1)(s+2)
b)

k
G(s) H(s) =
(s+4)2

c)

k
G(s) H(s) =
s(s2+6s+24)

d)

k(s +4)(s +6)


G(s) H(s) =
(s2+5s+6)

e)

k (s+1)
G(s) H(s) =
(s2+7s+12)

Experiment 4B
Name of the Experiment : Determination of Bode Plot for a given second order transfer function and
listing of the specifications. Comment on close loop stability.
Simulation of MATLAB commands for Bode Plot :a)
4
G(s) H(s) =
s2+6s+16
b)

30
G(s) H(s) =
s(1+0.5s)(1+0.08s)

c)
G(s) H(s) =

50

(s+1)(s+2)

Experiment 4C
Draw the Nyquist plot and find out gain crossover frequency, phase crossover frequency, gain and
phase margin. Comment on close loop stability :a)

50
G(s) H(s) =
(s+1)(s+2)

k
(b) G(s) H(s) =
s(s+1)(s+5)
b)

G(s) H(s) =

1.25(s+1)

(s+0.5)(s2)

G(s) H(s) =

2.5(s+1)

(s+0.5)2

G(s) H(s) =

s + 0.25

s2(s+1)(s+0.5)

d)

e)

You might also like