Control Lab 2 Ka 1000

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

clc%Clearsthecommandwindow

clearall%Clearallvariables

J=1;%Nms^2/rad
D=20;%Nms/rad
Ka=1000;%Amplifier
Ra=1;%ohm
Km=5;%Nm/A
L=1*10^3;%H

tf1=tf(Ka,[1,0]);%Proportionalgain
tf2=tf(1,[J,D]);%Transferfunction(brokenintwop1)
tf3=tf(Km,[L,Ra]);%Transferfunction(brokenintwop2)
tf4=tf2*tf3*tf1;%Transferfunction(final)
Opt=stepDataOptions;%Stepinput
Opt.stepamplitude=0.1;%Stepamplitude(0.1)
step(tf4,Opt)%Plotresponsetostepinputforopenloopsystem
figure()%Generate2ndplot
sysfeedback=feedback(tf4,1)%feedbackforcloseloopsystem
step(sysfeedback,Opt)%Plotresponsetostepinputforclosedloopsystem
figure()%Generate3rdplot
pole(sysfeedback)%Generatespolelocationonthe3rdgraph
pzmap(sysfeedback)%Setsinitialpositiontozero
figure()%Generate
stepinfo(sysfeedback)

sysfeedback=

5000

0.001s^3+1.02s^2+20s+5000

Continuoustimetransferfunction.

ans=

1.0e+03*

1.0051+0.0000i
0.0075+0.0701i
0.00750.0701i

ans=

RiseTime:0.0162
SettlingTime:0.5031
SettlingMin:0.4923
SettlingMax:1.7109
Overshoot:71.0891
Undershoot:0
Peak:1.7109
PeakTime:0.0445

PublishedwithMATLABR2014b

You might also like