Вы находитесь на странице: 1из 14

Control Systems Lab

Lab1,2
Lab instructor
Maheen Islam
Contact:13mseemislam@seecs.edu.pk
Thursday, February, 13
th
2014
Introduction
Lab notebook (individual)
Pre lab assignment/task
Matlab commands practiced in lab
Quiz
Assignments (done in notebook)
Final (Lab exam)
Attendance within First 5 minutes


2
Revisit
Evaluation of LTI models in MatLab
What are LTI models?
How can we evaluate LTI models in Matlab?

Introduction to Control system toolbox

3
Revisit
LTI Models
Step 1 Determine a physical system and specifications from
requirements.
Step 2 Draw a functional block diagram.
Step 3 Represent the physical system as a schematic.
Step 4 Use the schematic to obtain a mathematical model, such
as a block diagram.
Controls System Toolbox
Control System Toolbox provides industry-standard
algorithms and apps for systematically analysing, designing,
and tuning linear control systems. You can specify your system
as a transfer function, state-space, pole-zero-gain, or
frequency-response model.
4
Revisit
Commands practiced in last Lab
[NUM,DEN] = TFDATA(SYS) returns the numerator(s) and
denominator(s) of the transfer function SYS.
[Z,P,K] = ZPKDATA(SYS) returns the zeros, poles, and gain
Operations
+ , - , * , / , . ,
POLY(A) Convert roots to polynomial
ROOTS(C) Find polynomial roots
Example: tf(poly(a1),poly(a2))
Transfer function:
s^3 - 9 s^2 + 23 s - 15
----------------------------
s^3 - 9 s^2 + 26 s - 24


5
PreLab- to be done as assignment
in notebook
Using a hand calculation, find the Laplace
transform of
() =0.0075
.0034
2.5
cos 22 +0.87
2.5
sin 22 0.0072
8


Using a hand calculation, find the inverse
Laplace transform of
=
2(+3)(+5)(+7)
(+8)(
2
+10+100)


6
Lab
Symbolic Math Toolbox
Basic- provides functions for solving and manipulating
symbolic math expressions and performing variable-
precision arithmetic.
can perform
differentiation, integration,
simplification, transforms, and equation solving
Application in Calculus, ODE, Linear Algebra

Our objective:
To use these commands to solve transforms in
control systems

7
Commands to be learnt
SYMS Short-cut for constructing symbolic
objects
Example :
syms x y s
>> f=x^2 + 2*y
f =
x^2 + 2*y
8
Commands to be learnt
COLLECT(S,v) , Collect coefficients
Example :
collect((x+1)^2)
ans =
x^2 + 2*x + 1
FACTOR(N) returns a vector containing the prime
factors of N
Example :
factor(ans)
ans =
(x + 1)^2
9
Commands to be learnt
NUMDEN gives Numerator and denominator of a symbolic
expression.
[N,D] = NUMDEN(A)
Example:
[n,d] = numden((x+y)/(y*x))

n =

x + y


d =

x*y
10
Commands to be learnt
SIMPLE(S) , performs simplification
PRETTY (s), Pretty print a symbolic
expression
L = LAPLACE(F) is the Laplace transform , F
with default independent variable t
F = ILAPLACE(L) is the inverse Laplace
transform of L with default independent
variable s.
11
Commands to be learnt
SYM2POLY, Symbolic polynomial to polynomial
coefficient vector
POLY2SYM Polynomial coefficient vector to symbolic
polynomial
>>syms x y t >>p=[1 2]
>> f = x+1 f=poly2sym(p)
f= f=
x + 1 x+2

>> p=sym2poly(f)
p =
1 1

12
Lab task
() =0.0075
.0034
2.5
cos 22 +0.87
2.5
sin 22 0.0072
8


=
2(+3)(+5)(+7)
(+8)(
2
+10+100)

For the above equations try the following commands
a. Sym s t,
b. sym2poly, tf, num, den
c. Syms t, laplace,
d. syms s t, ilaplace
e. Syms s t , numden, sym2poly (polynomial form)

13
PreLab for next lab
14

Вам также может понравиться