资源描述:
《Matlab, Simulink - Simulink Modeling Tutorial - Train System.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、CTMS:SimulinkModelingTutorialSimulinkModelingTutorialTrainsystemFreebodydiagramandNewton'slawModelConstructionRunningtheModelObtainingMATLABModelInSimulink,itisverystraightforwardtorepresentaphysicalsystemoramodel.Ingeneral,adynamicsystemcanbeconstructed
2、fromjustbasicphysicallaws.Wewilldemonstratethroughanexample.TrainsystemInthisexample,wewillconsideratoytrainconsistingofanengineandacar.Assumingthatthetrainonlytravelsinonedirection,wewanttoapplycontroltothetrainsothatithasasmoothstart-upandstop,alongwit
3、haconstant-speedride.ThemassoftheengineandthecarwillberepresentedbyM1andM2,respectively.Thetwoareheldtogetherbyaspring,whichhasthestiffnesscoefficientofk.Frepresentstheforceappliedbytheengine,andtheGreekletter,mu(whichwillalsoberepresentedbytheletteru),r
4、epresentsthecoefficientofrollingfriction.FreebodydiagramandNewton'slawThesystemcanberepresentedbyfollowingFreeBodyDiagrams.Page1CTMS:SimulinkModelingTutorialFromNewton'slaw,youknowthatthesumofforcesactingonamassequalsthemasstimesitsacceleration.Inthiscas
5、e,theforcesactingonM1arethespring,thefrictionandtheforceappliedbytheengine.TheforcesactingonM2arethespringandthefriction.Intheverticaldirection,thegravitationalforceiscanceledbythenormalforceappliedbytheground,sothattherewillbenoaccelerationinthevertical
6、direction.Wewillbegintoconstructthemodelsimplyfromtheexpressions:Sum(forces_on_M1)=M1*x1''Sum(forces_on_M1)=M1*x1''ConstructingTheModelThissetofsystemequationscannowberepresentedgraphically,withoutfurthermanipulation.First,wewillconstructtwocopies(onefor
7、eachmass)oftheexpressionssum_F=Maora=1/M*sum_F.Openanewmodelwindow,anddragtwoSumblocks(fromtheLinearlibrary),oneabovetheother.LabeltheseSumblocks"Sum_F1"and"Sum_F2".TheoutputsofeachoftheseSumblocksrepresentsthesumoftheforcesactingoneachmass.Multiplyingby
8、1/Mwillgiveustheacceleration.DragtwoGainblocksintoyourmodelandattacheachonewithalinetotheoutputsoftheSumblocks.Page2CTMS:SimulinkModelingTutorialattacheachonewithalinetotheoutputsoftheSumblocks.TheseGainblocksshouldcontain