Buscar

MatLabCommands1

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Prévia do material em texto

Matlab Commands for Control Theory – Transfer Functions 
To get more information on the commands type >>help commandname at MatLab prompt. 
Command Name Description 
Partial Fraction Expansion 
[r,p,k]=pfe(n,d) Partial Fraction Expansion. 
Manipulating Transfer Functions 
mySys=tf([1 31],[1 8 15]) 
mySys.OutputDelay=1 
Define a Transfer Function 
Time Delay=1 sec. 
[n,d]=tfdata(mySys,'v') 
n=mySys.num{1} or d=mySys.den{1} 
Get numerator and denominator of transfer function 
ltiprops List of properties for LTI (Linear Time Invariant) systems 
SeriesSys=series(mySys1,mySys2) 
SeriesSys=mySys1*mySys2 Put two transfer functions in series 
ParSys=parallel(mySys1,mySys2) 
ParSys=mySys1+mySys2 Put two transfer functions in parallel 
FSys=feedback(mySys1,mySys2) 
FSys=mySys1/(1+mySys1*mySys2) Put transfer functions in a feedback loop. 
FSys=minreal(FSys) Find min realization of system (equal poles and zeros canceled) 
conv(d1,d2) Multiply polynomials 
pole(FSys) Poles of Transfer function 
zero(FSys) Zeroes of Transfer function 
Characterizing systems 
roots(d) Find roots of a polynomial 
poly(v) Create polynomial from its roots (inverse of roots). 
damp(d) or damp(FSys) Polynomial Roots or Transfer Function poles, w/ z , wn. 
step(mySys1) 
step(mySys1,mySys2) 
[y,t]=step(mySys1); 
y=step(mySys1,t); 
Step Response (can also do impulse response) 
bode(mySys1) 
[mag, phase, freq]=bode(mySys1); 
freq=logspace(-1,3); 
[mag, phase]=bode(mySys1,freq); 
m=mag(:); %Find mag vector 
p=phase(:); %Find phase vector 
Frequency Response (Bode Plot) 
h=evalfr(mySys1,w) Calculate gain of Xfer function at a particular frequency, 
sgrid or sgrid(z,wn) Draw lines of constant z and wn. 
Symbolic Manipulation 
syms s G H k Define symbolic variables 
ns=poly2sym(n,'s') 
ds=poly2sym(d,'s') Convert polynomial to symbolic (also sym2poly) 
ilaplace(n1s/d1s) Inverse Laplace 
StpRspS=(1/s)*(n1s/d1s) 
StpRspT=ilaplace(StpRspS) Step Response 
t=0:0.01:5; 
y=eval(vectorize(StpRspT)); 
plot(t,y) 
Numerical evaluation of symbolic result. 
G=1/(s^2+s+16); 
H=k*s+1; 
myTF=G/(1+G*H) 
Manipulation of transfer function 
simple(myTF) Find simplest form 
Get General Help 
help control help symbolic

Outros materiais