毕业设计倒立摆英文版.docx
- 文档编号:17891336
- 上传时间:2023-08-04
- 格式:DOCX
- 页数:85
- 大小:204.10KB
毕业设计倒立摆英文版.docx
《毕业设计倒立摆英文版.docx》由会员分享,可在线阅读,更多相关《毕业设计倒立摆英文版.docx(85页珍藏版)》请在冰点文库上搜索。
毕业设计倒立摆英文版
Example:
ModelinganInvertedPendulum
Problemsetupanddesignrequirements
Forceanalysisandsystemequations
Matlabrepresentationandtheopen-loopresponse
Problemsetupanddesignrequirements
Thecartwithaninvertedpendulum,shownbelow,is"bumped"withanimpulseforce,F.Determinethedynamicequationsofmotionforthesystem,andlinearizeaboutthependulum'sangle,theta=Pi(inotherwords,assumethatpendulumdoesnotmovemorethanafewdegreesawayfromthevertical,chosentobeatanangleofPi).Findacontrollertosatisfyallofthedesignrequirementsgivenbelow.
Forthisexample,let'sassumethat
M
massofthecart
0.5kg
m
massofthependulum
0.5kg
b
frictionofthecart
0.1N/m/sec
l
lengthtopendulumcenterofmass
0.3m
I
inertiaofthependulum
0.006kg*m^2
F
forceappliedtothecart
x
cartpositioncoordinate
theta
pendulumanglefromvertical
ForthePID,rootlocus,andfrequencyresponsesectionsofthisproblemwewillbeonlyinterestedinthecontrolofthependulumsposition.Thisisbecausethetechniquesusedinthesetutorialscanonlybeappliedforasingle-input-single-output(SISO)system.Therefore,noneofthedesigncriteriadealwiththecart'sposition.Forthesesectionswewillassumethatthesystemstartsatequilibrium,andexperiencesanimpulseforceof1N.Thependulumshouldreturntoitsuprightpositionwithin5seconds,andnevermovemorethan0.05radiansawayfromthevertical.
Thedesignrequirementsforthissystemare:
∙Settlingtimeoflessthan5seconds.
∙Pendulumanglenevermorethan0.05radiansfromthevertical.
However,withthestate-spacemethodwearemorereadilyabletodealwithamulti-outputsystem.Therefore,forthissectionoftheInvertedPendulumexamplewewillattempttocontrolboththependulum'sangleandthecart'sposition.Tomakethedesignmorechallengingwewillbeapplyingastepinputtothecart.Thecartshouldachieveit'sdesiredpositionwithin5secondsandhavearisetimeunder0.5seconds.Wewillalsolimitthependulum'sovershootto20degrees(0.35radians),anditshouldalsosettleinunder5seconds.
ThedesignrequirementsfortheInvertedPendulumstate-spaceexampleare:
∙Settlingtimeforxandthetaoflessthan5seconds.
∙Risetimeforxoflessthan0.5seconds.
∙Overshootofthetalessthan20degrees(0.35radians).
Forceanalysisandsystemequations
BelowarethetwoFreeBodyDiagramsofthesystem.
SummingtheforcesintheFreeBodyDiagramofthecartinthehorizontaldirection,yougetthefollowingequationofmotion:
Notethatyoucouldalsosumtheforcesintheverticaldirection,butnousefulinformationwouldbegained.SummingtheforcesintheFreeBodyDiagramofthependuluminthehorizontaldirection,youcangetanequationforN:
Ifyousubstitutethisequationintothefirstequation,yougetthefirstequationofmotionforthissystem:
(1)
Togetthesecondequationofmotion,sumtheforcesperpendiculartothependulum.Solvingthesystemalongthisaxisendsupsavingyoualotofalgebra.Youshouldgetthefollowingequation:
TogetridofthePandNtermsintheequationabove,sumthemomentsaroundthecentroidofthependulumtogetthefollowingequation:
Combiningtheselasttwoequations,yougettheseconddynamicequation:
(2)
SinceMatlabcanonlyworkwithlinearfunctions,thissetofequationsshouldbelinearizedabouttheta=Pi.Assumethattheta=Pi+ø(ørepresentsasmallanglefromtheverticalupwarddirection).Therefore,cos(theta)=-1,sin(theta)=-ø,and(d(theta)/dt)^2=0.Afterlinearizationthetwoequationsofmotionbecome(whereurepresentstheinput):
1.TransferFunction
Toobtainthetransferfunctionofthelinearizedsystemequationsanalytically,wemustfirsttaketheLaplacetransformofthesystemequations.TheLaplacetransformsare:
NOTE:
Whenfindingthetransferfunctioninitialconditionsareassumedtobezero.
SincewewillbelookingattheanglePhiastheoutputofinterest,solvethefirstequationforX(s),
thensubstitutingintothesecondequation:
Re-arranging,thetransferfunctionis:
where,
Fromthetransferfunctionaboveitcanbeseenthatthereisbothapoleandazeroattheorigin.Thesecanbecanceledandthetransferfunctionbecomes:
2.State-Space
Afteralittlealgebra,thelinearizedsystemequationsequationscanalsoberepresentedinstate-spaceform:
TheCmatrixis2by4,becauseboththecart'spositionandthependulum'spositionarepartoftheoutput.Forthestate-spacedesignproblemwewillbecontrollingamulti-outputsystemsowewillbeobservingthecart'spositionfromthefirstrowofoutputandthependulum'swiththesecondrow.
Matlabrepresentationandtheopen-loopresponse
1.TransferFunction
ThetransferfunctionfoundfromtheLaplacetransformscanbesetupusingMatlabbyinputtingthenumeratoranddenominatorasvectors.Createanm-fileandcopythefollowingtexttomodelthetransferfunction:
M=.5;
m=0.2;
b=0.1;
i=0.006;
g=9.8;
l=0.3;
q=(M+m)*(i+m*l^2)-(m*l)^2;%simplifiesinput
num=[m*l/q0]
den=[1b*(i+m*l^2)/q-(M+m)*m*g*l/q-b*m*g*l/q]
Youroutputshouldbe:
num=
4.54550
den=
1.00000.1818-31.1818-4.4545
Toobservethesystem'svelocityresponsetoanimpulseforceappliedtothecartaddthefollowinglinesattheendofyourm-file:
t=0:
0.01:
5;
impulse(num,den,t)
axis([01060])
Note:
Matlabcommandsfromthecontrolsystemtoolboxarehighlightedinred.
Youshouldgetthefollowingvelocityresponseplot:
Asyoucanseefromtheplot,theresponseisentirelyunsatisfactory.Itisnotstableinopenloop.Youcanchangetheaxistoseemoreoftheresponseifyouneedtoconvinceyourselfthatthesystemisunstable.
1.State-Space
Below,weshowhowtheproblemwouldbesetupusingMatlabforthestate-spacemodel.Ifyoucopythefollowingtextintoam-file(orintoa'.m'filelocatedinthesamedirectoryasMatlab)andrunit,MatlabwillgiveyoutheA,B,C,andDmatricesforthestate-spacemodelandaplotoftheresponseofthecart'spositionandpendulumangletoastepinputof0.2mappliedtothecart.
M=.5;
m=0.2;
b=0.1;
i=0.006;
g=9.8;
l=0.3;
p=i*(M+m)+M*m*l^2;%denominatorfortheAandBmatricies
A=[0100;
0-(i+m*l^2)*b/p(m^2*g*l^2)/p0;
0001;
0-(m*l*b)/pm*g*l*(M+m)/p0]
B=[0;
(i+m*l^2)/p;
0;
m*l/p]
C=[1000;
0010]
D=[0;
0]
T=0:
0.05:
10;
U=0.2*ones(size(T));
[Y,X]=lsim(A,B,C,D,U,T);
plot(T,Y)
axis([020100])
Youshouldseethefollowingoutputafterrunningthem-file:
A=
01.000000
0-0.18182.67270
0001.0000
0-0.454531.18180
B=
0
1.8182
0
4.5455
C=
1000
0010
D=
0
0
Thebluelinerepresentsthecart'spositionandthegreenlinerepresentsthependulum'sangle.Itisobviousfromthisplotandtheoneabovethatsomesortofcontrolwillhavetobedesignedtoimprovethedynamicsofthesystem.Fourexamplecontrollersareincludedwiththesetutorials:
PID,rootlocus,frequencyresponse,andstatespace.Selectfrombelowtheoneyouwouldliketouse.
Note:
ThesolutionsshowninthePID,rootlocusandfrequencyresponseexamplesmaynotyieldaworkablecontrollerfortheinvertedpendulumproblem.Asstatedpreviously,whenweputthisproblemintothesingle-input,single-outputframework,weignoredthexpositionofthecart.Thependulumcanbestabilizedinaninvertedpositionifthexpositionisconstantorifthecartmovesataconstantvelocity(noacceleration).Wherepossibleintheseexamples,wewillshowwhathappenstothecart'spositionwhenourcontrollerisimplementedonthesystem.WeemphasizethatthepurposeoftheseexamplesistodemonstratedesignandanalysistechniquesusingMatlab;nottoactuallycontrolaninvertedpendulum.
ModelingExamples
CruiseControl|MotorSpeed|MotorPosition|BusSuspension|InvertedPendulum|PitchController|Ball&Beam
InvertedPendulumExamples
Modeling|PID|RootLocus|FrequencyResponse|StateSpace|DigitalControl
Example:
SolutiontotheInvertedPendulumProblemUsingPIDControl
Open-loopRepresentation
Closed-looptransferfunction
AddingthePIDcontroller
Whathappenstothecart'sposition?
Thetransferfunctionoftheplantforthisproblemisgivenbelow:
where,
Thedesigncriteria(withthependulumreceivinga1Nimpulseforcefromthecart)are:
∙Settlingtimeoflessthan5seconds.
∙Pendulumshouldnotmovemorethan0.05radiansawayfromthevertical.
Toseehowthisproblemwasoriginallysetup,consulttheinvertedpendulummodelingpage.
Open-loopRepresentation
ThefirstthingtodowhenusingPIDcontrolinMatlabistofindthetransferfunctionofthesystemandtochecktoseeifitmakessense.ThetransferfunctionfoundfromtheLaplacetransformsfortheoutputPhi(thependulum'sangle)canbesetupusingMatlabbyinputtingthenumeratoranddenominatorasvectors.Createanm-file(ora'.m'filelocatedinthesamedirectoryasMatlab)andcopythefollowingtexttomodelthetransferfunction:
M=.5;
m=0.2;
b=0.1;
i=0.006;
g=9.8;
l=0.3;
q=(M+m)*(i+m*l^2)-(m*l)^2;%simplifiesinput
num=[m*l/q0]
den=[1b*(i+m*l^2)/q-(M+m)*m*g*l/q-b*m*g*l/q]
Youroutputshouldbe:
num=
4.54550
den=
1.00000.1818-31.1818-4.4545
Closed-looptransferfunction
Thecontrolofthisproblemisalittledifferentthanthestandardcontrolproblemsyoumaybeusedto.Sincewearetryingtocontrolthependulum'sposition,whichshouldreturn
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 毕业设计 倒立 英文