Professional Documents
Culture Documents
Toolbox
MATLAB 11/15/2017 1
Outline
MATLAB
MATLAB and Toolboxes
MATLAB and Control
Control System Toolbox
Simulink
p1 s n p 2 s n 1 ... p n 1
H (s )
q1 s m q1 s m 1 ... q m 1
where
p1 , p 2 ... p n 1 numerator coefficients
q1 , q1 ... q m 1 denominator coefficients
where
p1 , p 2 ... p n 1 the zeros of H(s)
q1 ,q1 ... q m 1 the poles of H(s)
Y ( s) 4s 3 4( s 0.75)
G( s) 2
U ( s) s 6s 5 ( s 1)( s 5)
MATLAB Control Toolbox 11/15/2017 16
Control System Toolbox
Zero-pole-gain model (ZPK)
where
x state vector
u and y input and output vectors
A , B ,C and D state-space matrices
x1 ' 0 1 x1 0 x1 (0) 0
x ' 5 6 x 1 u x (0) 0
2
2 2
x1
y 3 4
x2
d=
b=
u1
u1
y1 0
x1 0
x2 1
ss2tf
zp2tf ss2zp
tf2zp zp2ss
Zero-pole-gain
The values of gain and phase margin and corresponding frequencies are
%plot the step response %Get data from the transfer function
step(T) [n,d]=tfdata(G,'v')