Invertedpendulum倒立摆的matlab建模_第1页
Invertedpendulum倒立摆的matlab建模_第2页
Invertedpendulum倒立摆的matlab建模_第3页
Invertedpendulum倒立摆的matlab建模_第4页
Invertedpendulum倒立摆的matlab建模_第5页
免费预览已结束,剩余7页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、ECE451 Con troll Engin eeri ngInverted p endulum09/29/2013Introduction:Inv erted pen dulum is a typi cal fast, multi-varaibles, non li near, un stable system, it has sig nifica nt meaning. We choose the PID con troller to fot the inv erted pen dulum.Assume the input is a step signal , the gravitatio

2、nal acceleration g=9.8m/s2 and lin earize the non li near model around the op erati ng point.I. Mathematic Modii ngM m b l I F x0mass of the car0.5 kgmass of the pen dulum0.2 kgcoefficie nt of frictio n for cart0.1 N/m/seclen gth to pen dulum cen ter of mass0.3 mmass mome nt of in ertia of the pen d

3、ulum 0.006 kg.m2 force app lied to the cart coord in ate of cart p ositi onpen dulum an gle from vertical (dow n)N and F are the force from horiz on tal and vertical direct ion.d2N = m dt7(x + l sin 0)Force an alysisCon sider the horiz on tal directi on cart force, we get the equatio n:Mx?= F- bx? N

4、Con sider the horiz on tal directi on pen dulum force, we get the equati on:N = mx?+ ml 0cos (- ml e2sin 0To get rid of P and N, we get this equati on:-PI sin 0- Nlcos 0=1 0 Merge these two equatio ns, about to P And N, to obta in a sec ond moti on equati on:(l + ml2) 0+ mgl sin 0 = -mix?cos 0 u to

5、rep rese nt the con trolled object with the input force F, li nearized two moti on equati ons(7 + F厂妙一= (ZV亠 X(71/ -F / /J )A十 bJc 一 tfApply LapI ace tran sform to the equati on above(7 +?/ )cD( s ).5 5)= s)v(A/ + rft)X(s)s + bXs)s -jftl- Us)The tran sfer fun cti on of an gle and p ositi on (5)mis工0

6、)(/ +曲- mglLet v = x?G)V(s) (7 +讪-n/gfput the equati on above into the sec ond equatio n十屮皿)4十 bL讪sWe get the tran sfer function川/ Fyqt/(r)4 b(J 十 niP)片(A/ 十 Hjmgl 2State sp ace equati on:= XV十Bnv= CY 十 DtfSolve the algebraic equati on, obta in soluti on as follows:t = y.-(I.nrgf-(I + JH 卩、 IM + M)+

7、 皿屮UM + JU) + mF /(A/ + 川)+ Mm I- 0=07一讪b用时(水J +川) ,ndd = y + 0 十/(M + M)+加厂/(jV +川)+ A伽厂/(.V + m +皿心 01000-.Y0(7 + wFb讥尸07 + hN,.Y”0+於尸/jV + /W)+:Y/jV + HJ)*dT rX000100-titib嘖U/ -却)0讪$ J /仁/ L Hl) +伽心/ 7八 + mF/(J7 + J/Jl Fin ally we get the system state sp ace equati ons.;.V000Py+O0010002. PID Con

8、troller Desig nWe now desig n a PID con troller for the inv erted pen dulum system. KD(s) is the tran sfer fun ctio n of the con troller.G(s) is the tran sfer fun cti on of the con trolled car.Con sideri ng that the input r(s) =0, the block diagram can be tran sformed as: The out put of the system i

9、snumy s F s1 kD sG sdenF snumPID numdenPID dennum denPIDF denPID den numPID numU(sPlantGUInum the nu merator of the object den the denomin ator of the object numPID -the nu merator of the PID con troller tran sfer fun cti on denPID -the denominator of the PID controller transfer function The object

10、tran sfer fun cti on isml 2sqm M mgl 2snumb I ml23sqbmglsqdenin which qml2 ml 2PID Con troller Tran sfer Fun cti on is2KD s KDs Kp sKI KdS KpS Ki 2sNow, we add the cars positi on as ano ther out put, we get in which G1 is the tran sfer fun cti on of the pen dulum, G2 is the tran sfer fun cti on of t

11、he car.The out put of the car po siti on isG2 s1 KD s G1 s F snum2den2Lin which, nu m1,de n1,nu m2,de n2 are sep arately mea n the con trolled object 1 and object 2 and PID controllers numerators and denominators.I ml2mlX sFrom_g2 sG2 ss4In which, qWe can easily simp lified the equati on ass,we coul

12、d get thatI ml2 bmgls s q q b I ml23s qml2 ml 2m M mgl s2 bmgl sqqF s 1 numPID nug denPID demnum2 denPIDF s denPID den k numPID num,3. Matlab SimulationIn desig n, the carts po siti on will be igno red. Un der these con diti ons, the desig n criteria are:1) settli ng time is less tha n 5 sec onds2)

13、pen dulum should not move more tha n 0.05 radia ns away from the verticalWhen kd=1,k=1,ki=1:numc1=4.5455 0 0 0, denc1=1 4.7273 -26.6364 0.0909 0 0, n um2= -1.8182 0 44.54550, den c2=1 4.7273 -26.6364 0.0909 0Angle_L- -lbTime (se-c)Then we tried many times to adjust the p arameter to satisfy the requ

14、ireme nts: Ts =5 s and overshoot M0.05.We find the op timal p arameters of kd,k,ki which is the sec ond situati on.2. When kd=20,k=300,ki=1:Numc仁 4.5455 0 0 0, dene仁0.001 0.09111.3325 0.0001 0 0, nu mc2= -1.8182 0 44.5455 0, den c2=0.001 0.09111.3325 0.0001 0 0The results:upnlj-aLUV& iaTime fsec)ll

15、:;Ptts itiencc c2 cIC 12Tine sec)Matlab codesM=0.5;m=0.2;b=0.1;l=0.006;g=9.8;l=0.3;q=(M+m)*(l+m*|A2)/q-(m*l)A2;num1=m*l/q 0 0;den 仁1 b*(l+m*|A2)/q-(M+m)*m*g*l/q-b*m*g*l/q 0;num2=-(l+m*|A2)/q 0 m*g*l/q;den2=den1;kd=1;k=1;ki=1;numP ID=kd k ki;denP ID=1 0;nu mci=c onv (num1 denP ID);den c1= po lyadd(c

16、onv (de nP ID,de n1),c onv(numPID,nu m1);t=0:0.1:20;figure(l)impu lse( nu mc1,de nc1,t)title( Anglefigure (2)impu lse( nu mc2,de nc2,t)title( PositionM=0.5;m=0.2;b=0.1;1=0.006;g=9.8;1=0.3;q=(M+m)*(l+m*|A2)/q-(m*l)A2;num1=m*l/q 0 0;den 仁1 b*(l+m*|A2)/q-(M+m)*m*g*l/q-b*m*g*l/q 0;num2=-(l+m*|A2)/q 0 m*

17、g*l/q;den2=den1;kd=20;k=300;ki=1;numP ID=kd k ki;denP ID=1 0;nu mci=c onv (num1 denP ID);den e1= po lyadd(c onv (de nP ID,de n1),c onv(numPID,nu m1); t=0:0.1:20;figure(1)impu lse( nu mc1,de nc1,t)title( Anglefigure (2)impu lse( nu mc2,de nc2,t)title( PositionSimulatio n:We will build a closed-lo op model with refere nee input of pen dulum p ositi on and a disturba nee force app lied

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论