版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
AMESIM中文教程-第4章高級實(shí)例本章你將:?搭建更復(fù)雜的系統(tǒng)?穩(wěn)定化運(yùn)行?Seealiasingwithdatasampling?使用動態(tài)塊?使用旋轉(zhuǎn)機(jī)械塊4.11?顯示系統(tǒng)的狀態(tài)變量?用穩(wěn)定化運(yùn)行發(fā)現(xiàn)初始值?在圖形比較使用保存和裝載數(shù)據(jù)?給曲線添加文本4.1.1狀態(tài)計(jì)數(shù)功能使你能看到仿真中顯示的狀態(tài)變量(外部的或隱含的或約束的),該功能作為快速觀察狀態(tài)變量標(biāo)題的方式也是非常有用的。在時間階躍步序列中,積分過程要持續(xù)進(jìn)行到終點(diǎn)。在每一個階躍步,都使用這個重復(fù)過程來確定狀態(tài)變量在新時刻的值。這一重復(fù)過程必須成功地收斂于階躍過程;此外,每一步之后,都要基于運(yùn)行參數(shù)對話框指定的允許誤差進(jìn)行誤差測試。在某特殊步,一些狀態(tài)變量可能很容易滿足收斂和誤差測試,而其它變量則勉強(qiáng)通過測試。AMESim記錄下滿足測試有極大困難的狀態(tài)變量,在運(yùn)行模式,通過點(diǎn)擊狀態(tài)計(jì)數(shù)按鈕,將出現(xiàn)狀態(tài)計(jì)數(shù)對話框,它會摘述一些信息,這些信息對于確定慢仿真過程非常有用。繼續(xù)上一章的實(shí)例,再下載已經(jīng)創(chuàng)建的QuarterCar.ame文件。為確保該實(shí)例所描述的過程對你的系統(tǒng)有意義,在參數(shù)模式下請確認(rèn)如下數(shù)值已被設(shè)置:子模型草圖上的數(shù)量(如果有)標(biāo)題數(shù)值Body_Mass/MAS0021bodyvelocity0.0bodydisplacement0.0SPR000A22springforcewithboth0.0displacementszeroWheel_Mass/MAS0023wheelvelocity0.0wheeldisplacement0.0SPR000A4springforcewithboth0.0displacementszero進(jìn)入運(yùn)行模式進(jìn)行仿真,有5個狀態(tài)變量,請點(diǎn)擊狀態(tài)計(jì)數(shù)按鈕產(chǎn)生如圖4.2所示對話框:Figure4.2本例中,使運(yùn)行速度變較的很可能是子模型為MAS002(車輪質(zhì)量)的狀態(tài)變量(wheelvelocity),如果仿真緩慢,你可以點(diǎn)擊更新(Update)按鈕或自動更新對話框。你可以通過點(diǎn)擊受控一欄(Controlled)重新布置列表。如果雙擊列表中的一項(xiàng),AMESim將識別出它,如圖4.3所示。Figure4.3:簡單的動態(tài)運(yùn)行5s,車體的速度和位移曲線示于圖4.4。Figure4.4有兩段截然不同的運(yùn)動狀態(tài):1.車體在階躍發(fā)生前試圖找到其平衡位置,就好象被舉高在懸掛上,彈簧和輪胎處于放松狀態(tài)只是接觸地面而已,然后在遇到階躍前有一個突然釋放,給出很短暫的周期。2.階躍到達(dá)之后,車體又企圖找到一個新的平衡位置。在第3章入門啟動一章,你看到了如何通過進(jìn)行兩次動態(tài)運(yùn)行來刪除這個短暫的行為。在第一次運(yùn)行時,使輸入信號保持為初始常值,來獲得自由響應(yīng)。在第二次運(yùn)行時,把第一次運(yùn)行結(jié)束時刻的結(jié)果作為初始值。然而,對于一個大系統(tǒng)初始化運(yùn)行往往需要很長時間,另外一個可選擇的,可行又快捷但欠可靠的方法是使用穩(wěn)定化運(yùn)行。4.1.2有時我們會有一個非常大的系統(tǒng),動態(tài)運(yùn)行需要很長時間,我們會更愿意在平衡狀態(tài)對系統(tǒng)啟動仿真而不想等待動態(tài)運(yùn)行結(jié)束。1.在參數(shù)模式下設(shè)置階躍值為1.2.在運(yùn)行模式點(diǎn)擊運(yùn)行參數(shù)按鈕。出現(xiàn)運(yùn)行參數(shù)對話框。3.點(diǎn)擊標(biāo)準(zhǔn)選項(xiàng)欄。4.注意運(yùn)行模式區(qū)域。默認(rèn)情況是動態(tài)模式而非穩(wěn)定化模式。你可以選擇其一或兩者都選。5.點(diǎn)擊穩(wěn)定化按鈕。6.運(yùn)行一次并檢查車體質(zhì)量的結(jié)果。Figure4.5你可以發(fā)現(xiàn)速度和加速度的值幾乎可以忽略,車體處于平衡位置。車體下降了:0.283672m:400*9.81,150004509.81,200000,注意由于沒有足夠的數(shù)據(jù)要產(chǎn)生一個有意義的圖形曲線是不可能的。還要注意有一組意思幾乎相同卻易混的術(shù)語:?穩(wěn)定化運(yùn)行,?問臺運(yùn)行,?自由響應(yīng)運(yùn)行,?平衡位置運(yùn)行。穩(wěn)定化運(yùn)行是AMESim首選的術(shù)語,這個階段精確地定義狀態(tài)變量是很有用的。狀態(tài)變量平衡位置的唯一值CPU時間解算器類型:常規(guī)/謹(jǐn)慎穩(wěn)定化運(yùn)行診斷獲得平衡位置的推薦策略AMESimy,i,1,..N,那么這個狀態(tài)變量可能是:iDv/dt=F1+F2/Mdyi/dtF+Cdx/dt+Kdx/dt(dx/dt)dyi/dt=0constraintThestateisdefinedbyanalgebraicexpressionnotinvolvingfindvsuchthat=dyidtFCdxdtKdxdtdxdt++0=dyidtF1+F20=Inadynamicruntheintegratorattemptstoestimatetheevolutionofthesestatevariableswithtime.Asuccessfulstabilizingrunleadstoaequilibriumposition.Inanequilibriumposition,ifallinputsareheldconstantthestatevariableswillalsobeconstantwithtimeortheirderivativeswillbeconstant.Wenowcontinuewiththecurrentexample.1.OpentheRunParametersdialogbox,selecttheStandardoptionstabandselecttheStabilizing+DynamicradiobuttonintheRunmodearea.2.Startarun.3.Plotthebodydisplacementandthebodyvelocity.Figure4.6:BodydisplacementandbodyvelocityTheruncorrectlyproducesanequilibriumpositionatthestartoftherunthengivesthedynamicsofthemotioninducedbythestep.Thuswehavetwoapproachesforstartinginanequilibriumposition:?UseofHoldinputsconstant.?Useofastabilizingrun.Boththesetechniquesareuseful.Thefirsttechniqueapproachesequilibriumusingthenaturaldynamicsofthesystem.Inotherwordsitusesthefreeresponseofthesystem.Thestabilizingrunusesamuchmoreaggressivemethod.Thetablebelowsummarizestherelativemeritsofthetechniques.HoldinputsconstantStabilizingrunReliabilityIfthesystemisstable,themethodisnormallyreliable.Themethoddoesnotalwaysworkandwhenitdoeswork,itmaygiveanequilibriumpositionwhichisnotaccessiblefromthestartingvalue.UniquenessofsolutionNormallyifasolutionisobtained,itdoesnotvarysignificantlywithparameterssuchasintegratortolerance.Iftherearemultipleequilibriumpositions,itisdifficulttotellinadvancewhichonewillbefound.timeCanbesignificantlyhigher.Ifthemethodworks,CPUtimesarenormallylower.ParametersavailabletoconvergenceWecanvaryallthedynamicrunparameters:tolerance,errortype,maximumstepsize,standard/cautious,finaltime.ThefollowingparameterswillinfluencethesuccessoftherunandtheCPUtime:tolerance,errortype,standard/cautious.Wenowgiveabriefnoteonsomeofthesepoints.UniquenessofanequilibriumpositionToillustratethenon-existenceofauniqueequilibriumposition,wepresenttwoexamples.Figure4.7:NoequilibriumstateHerethereisnoequilibriumstate.Thestabilizingrunmustanddoesfail.Figure4.8:InfinitenumberofequilibriumpositionsHerethereareawholerangeofpositionswhichareequilibriumstates.Inotherwordsthereareaninfinitenumberofequilibriumpositions.Thestabilizingrunfindsoneofthese.TheHoldinputsconstantmethodsfindstheequilibriumpositionaccessiblefromthestartingposition.Donotthinkitisalwayseasiertofinddirectlyasteadystatesolutionthandoadynamicsolution.Oftentheoppositeistrue.CPUtimesItisinterestingtocomparethetwotechniquesonthecurrentexample.RememberthatanestimatefortheCPUtimeisdisplayedintheSimulationRundialogboxwhentheruniscomplete.Whenthismanualexamplewasprepared,thefollowingtimeswererecorded.Onthisexamplethestabilizingrunwasmuchmoreefficientbutonotherexamplestheoppositewouldbetrue.dynamicrunwithHoldinputsconstantStabilizingrunwithoutdynamicrunCPUtimes0.1410.015type:Regular/CautiousTheseoptionsareavailableintheRunParametersdialogboxintheStandardoptionstab.Withnumericalalgorithmsthereisoftenacompromisetobemadebetweenspeedandreliability.WhentheRegularsolvertypeisselected,theAMESimsolverisfairlyaggressivetryingtogetafastsolution.WithCautiousselectedslowermorereliablestrategiesareusedwhichoftenleadtohigherCPUtimes.Theoptionsapplytobothstabilizingrunsanddynamicrunsbuttheeffectisgreaterforstabilizingruns.PerverselywithsomesystemstheRegularoptionismorereliablethanCautious.StabilizingrundiagnosticsInthecurrentexamplethestabilizingrunworksverywell.However,sometimesitfails.InthiscaseAMESimcanbepersuadedtodisplaysomediagnostics.ToenabletheseselecttheStandardoptionstabintheRunParametersdialogboxandticktheDiagnosticscheckboxintheStabilizingrunoptionsarea.Asthestabilizingrunstarts,ananalysismadeofthestructureoftheJacobiancorrespondingtotheequationsbeingsolved.TheJacobianisamatrixofsizecorrespondingtonumberofstatevariablesNinthesystem.TherankofthisJacobianiscalculatedandifitislessthanN,messagesaredisplayed.Thefollowingaredisplayedusingamodifiedversionofthecurrentsystem.Figure4.9:RankofJacobianlessthanNNotethattherearereferencestolockedvariables.Thesearedescribedinthenextchapter.RecommendedstrategyforobtaininganequilibriumpositionNormallyexperiencedAMESimuserstryusingastabilizingrun.Ifthisfails,theyusetheHoldinputsconstanttechnique.Ifthisfails,thesystempossiblydoesnothaveanequilibriumposition(see“Uniquenessofanequilibriumposition”,page107).4.1.3Savedata/LoaddataWearegoingtocomparethecurvesofthebodydisplacementusingasimpledynamicrunwiththeresultsusingastabilizingrunfollowedbyadynamicrun.1.IntheRunparametersdialogbox,selecttheStandardoptionstabandclickontheDynamicradiobutton.2.Runasimulation.3.PlotthebodydisplacementandsavethiscurveusingtheFilepulldownmenuoftheplotselectingSavedata.Figure4.10:SavedatatosavethecurveAdialogboxisproducedwhichasksforthenameofthefile.4.Enterasuitablenamee.g.disp.5.GobacktotheRunparametersdialogboxandenabletheStabilizing+Dynamicrunmode.6.Restartthesimulationandupdatethecurveofthebodydisplacement.Theoldcurveisreplacedbythenewone.7.Toreloadtheoldcurve,selectOpenintheFilepulldownmenu.Figure4.11:SelectOpentoreloadtheoldcurve8.Selectthefilenameddispwiththebrowser:Youcannowseetheoldandthenewcurveonthesameplot.9.Toaddtitles,selectTools_AddtitlesandyouwillgettheFigure4.12.Figure4.12:Addtitlesontheplot4.1.4Addingtexttoaplot1.Toaddtexttoaplot,usetheToolspulldownmenu.Figure4.13:Toolsmenuintheplotwindow2.SelectAddtext.3.Clickwhereyouwanttoaddthetext.Then,youseeasquareinwhichyoucantypeyourtext.Note:YouareallowedtotypeyourtextonseverallinesbypressingEntereachtimeyouwantanewline.4.Addtwotextstringstotheplotinordertoexplainthedifferencebetweenthetwocurves,asshowninFigure4.14:Figure4.14:Youcanaddtexttotheplot4.2Example2:RotaryInertiaObjectives?GettingAMESimdemos?Introducingthesignconventionforrotaryquantities?Introducingaliasingproblems?UsingDiscontinuityprintoutForthisexample,youwillusethesystemshowninFigure4.15.Notethatitconsistsoftwoverynearlyidenticalsystems.Figure4.15:GetthissystemfromtheAMESimdemosThismodeliscalledRotaryInertia.ameandcanbecopiedfromtheAMESimdemoareaasexplainedinthepreviouschapter.Youcanbuildthissystemyourselfbut,tosavealittletime,youcancopyasimilarsystemfromtheAMESimdemoarea.Thisisacollectionofpre-builtAMESimsystemswhichareusefultoillustratecertainAMESimfeatures.4.2.1GettingAMESimdemonstrationexamples1.UseHelp_GetAMESimdemotoproducetheChoosedemodialogbox.Figure4.16:HelpmenuThedemonstrationexamplesarearrangedinfoldersordirectoriesaccordingtothedomainthattheycover.YourequiretheManualTutorialsdomain.2.OpentheManualTutorialsfolder.3.HighlightRotaryInertia.ame.4.ClickonCopyandopen.5.AMESimallowsyoutogetasmanydemosystemsasyouwantsoyoumustgetridofChoosedemobyclickingonClose.4.2.2SignconventionforrotaryspeedsandtorquesAnarrowappearsontherotaryloadicon.Aswithlinearloads,whenyouhaveachainofthese,thearrowsshouldallpointinthesamedirection.Ifyoubreakthisrule,AMESimwillcompensateandtheresultswillstillbecorrectbutmuchmoredifficulttounderstand.Basicallythewellknownright-handcorkscrewruleisused.Figure4.17:ExternalvariablesoftherotaryloadIfyoulookatthesysteminFigure4.15andalsoFigure4.17,youcanseetheexternalvariablesoftherotaryloadsubmodelRL01.Onlytheport2velocityisdisplayedinthevariablelist.1.Lookatport2intheExternalVariablesdialogbox,imaginelookinginthedirectionoffrev/minandoperatingaright-handcorkscrew.Thisgivesthedirectionofrotation.2.Nowlookattheport2torquedenotedby_Nm.Theright-handcorkscrewruleindicatesthistorqueopposesthevelocity.Initiallytherotaryspeediszero.?IntheApartofthesystem,the600Nmtorqueopposesthevelocityandwillmakethevelocitynegative.?IntheBpartofthesystem,the600Nmisappliedatport1andassiststhevelocityandwillmakethevelocitypositive.Note:Signconventionsforrotaryquantitiesaremuchmoredifficulttounderstandthanforlinearquantities.Forthisreason,westronglyrecommendyouusethereplayfacilitywitharrowsandnumericalvaluesasanaidtounderstanding.Inourexample,seeFigure4.15:themoduloblocksbetweentheanglesensorandthegeneralstopperwillconverttheangleproducedbythesensortotherange0to360degrees.3.RunasimulationandplottheoutputfromthesensorofschemaA.Youseehowitdecreasessteadily.4.LookattheoutputfromthemoduloblockofschemaA.5.Youwillseeanangleindegreesalwaysintherange0to360?asitshouldbe.However,thegraphisnotverysatisfactoryasinFigure4.18.Figure4.18:OutputofthemoduloblockofschemaAManyreaderswillimmediatelyrecognizethisphenomenonasaliasing.4.2.3AliasingwithdatasamplingThisisveryfamiliartocontrolengineers.Putinverysimplelanguagewehaveaparticularcommunicationintervalandthismeanswearesamplingtheresultsofthesystemataparticularfrequency.Ifthereisaphenomenonoccurringintheresultswithanotherfrequency,inordertoseethisphenomenonwemusthaveasamplingfrequencywhichissignificantlyhigher.Inourexample,theresultsaresampledevery0.1sorat10Hz.1.PlottherotaryspeedofschemaB.Figure4.19:RotaryspeedofschemaBYouseethattheshaftisturningat600rev/minattheendofthesimulation.Thiscorrespondsto600/60=10Hz.Thedatahasbeenratherartificiallycreatedsothatthecommunicationintervalfrequencycoincideswiththefrequencyofrotation.2.Tryalteringtheconstanttorqueto610Nmandto590Nm.Wecannotproperlyseethephenomenonwearelookingfor.Togetameaningfulgraph,weshouldsampleatasignificantlyhigherfrequencythaniscontainedinthedatayouareplotting.3.Trychangingthecommunicationintervalto0.01s(correspondingto100Hz)andto0.001s(1000Hz).AnalternativeistoselectDiscontinuityprintoutintheRunparametersdialogbox.4.2.4DiscontinuitiesanddiscontinuityprintoutYoucancurealiasingbyreducingthecommunicationintervalbutalternativelyyoucansometimescureitbyenablingDiscontinuityprintout:1.DisplaytheRunparametersdialogbox.2.SelecttheStandardoptionstab.3.TicktheDiscontinuitiesprintoutboxintheDynamicrunoptionsarea.Figure4.20:StandardoptionsInverysimplelanguageadiscontinuityisaneventthatisphysicallyand/ornumericallyratherviolent.Inthecurrentsystem,thediscontinuityoccursmanytimeswhentheanglereaches360?andthenimmediatelydropsbackto0?.TheoptionDiscontinuitiesprintoutgivesextradataintheresultsfile.Attheexpenseofabiggerresultsfileyougetasharpergraph.SeeFigure4.21.Whenyoursimulationruns,aresultsfileiscreated.Forthepresentsystem,thisiscalledRotaryInertia_.results.Byextraprintout,wereallymeanextradataisaddedtothisfilejustbeforeandjustaftereachdiscontinuity.Insomeexamples,thisispricewellworthpayingbutforsomesystemsthathavelargenumbersofdiscontinuities,theresultsfilewouldbetoobig.Figure4.21:NewoutputofthemoduloblockofschemaAUsethereplayfacilitywitharrowsandnumericalvaluesfortherotaryquantities.Figure4.22showsthetorques.Figure4.22:ReplayfacilityFinallydoarunwithStabilizingmodeandaDynamicmodeenabled.Notehowtheinitialtransientissuccessfullyremoved4.3Example3:CarsuspensionObjectives?DisplaytwoAMESimsystems?Selectaregionofthesketch?Usethecopy/cut/paste?Useofdynamicblocks?UseasimplecontrolsystemFigure4.23:CarsuspensionThesystemyouwilluseisshowninFigure4.23andismadeupofthreesubsystems:?Ontheleft:thesystemusedonthequartercarexample?Inthecenter:thetheoreticalmodificationknownasthesky-hooksuspension?Ontheright:theactivedampersystemthatapproximatestothesky-hookTheideaofthesky-hookistohaveanadditionaldamperfixedtothebodyofthecarandtoapointintheskyverticallyabovethecar.Naturallythisarrangementisdifficulttoarrange!Notethatthemaindamperexperiencesthevelocityofthewheelandthevelocityofthecarbody.Incontrastthesky-hookdamperonlyexperiencesthevelocityofthecarbody.Intheactivesuspensionapproximationanimportantfeatureistheinclusionoftwovelocitysensorstoprovidethevelocityofthewheelandthevelocityofthecarbody.Toreplicatethemaindamperthesesignalsaredifferencedandpassedthroughagainwithavaluecorrespondingtothemaindamperrating.Fortheskyhookdamperonlythevelocityofthecarbodyisusedandthisisattachedtoagaincorrespondingtothesky-hookdamperrating.Thetwosignalsarecombinedandtransmittedasforcestothemassofthecarandofthewheel.Theroadprofileisdefinedinasingledutycyclesubmodel.Theoutputisthenduplicatedandsenttothethreesub-systems.Thismakesit100%certainthatthethreesubsystemsarereceivingthesamesignal!Tobuildthesystemyouwillcopythequartercarsystemintoanewsystem.Todothisweneedtodisplaytwosystemssimultaneously.4.3.1DisplayingtwoormoreAMESimsystemssimultaneouslyWhenyouselectanexistingAMESimsystemitisloadedandappearsinthesketcharea.Youcanloadotherexistingsystemsorrequestnewsystems.Asyoudothis,theyappearinsketcharea.Youcanthinkofthemasbeinginastackwiththelastoneselectedbeingatthetopofthestack.YoucancontrolhowtheyarestackedusingtheWindowspulldownmenu:Figure4.24:WindowsmenuYoucanselectoneofthesystemsandbringittothetopofthestack.YoucandisplaythemallusingtheCascadeandTileoptions.Forthecurrenttutorialexample:1.Startbyloadingthequartercarsystem.2.Nextopenanewsystem.Thequartercarsystemwillgobehindthenewsystem.3.SelecttheTileoptionsothattheyarebothdisplayed.Figure4.25:DisplayoftwosystemsNote:?Onlyoneofthewindowsis?active?.Tomakeaparticularwindow/systemactiveclickinit.?DifferentsystemscanbeindifferentAMESimmodes.OnesystemcanbeinSketchmodeandtheotherinParametermode.Thenextstageinourexampleistoselectthecompletequartercarsystem,copyandpasteittotheothersystem.MakesurebothsystemsareinSketchmode.4.3.2Selectingcomponents,linerunsandtextIfAMESimobjectsareselected:?Theycanbedeleted,copiedorpastedintothesameoranotherAMESimsystem.?Theycanbemadeintoasupercomponent.?TheshadowsubsystemcanbeusedinSubmodelmode.?TheCommonparametersfacilitycanbeusedinParametermode.?Theycanbepastedintodocumentsinmanywordprocessingsoftware.Toselectseveralobjects:Theshiftkeyallowsyoutoselectseveralobjectswhicharenotconnectedtogether:1.HolddowntheShiftkeyandclickonacomponent,lineortextobject.Itbecomesselectedanditiscircledwithblackdottedlines.2.Youcanselectotherobjectsinthesamewaybut,iftheobjectisalreadyselected,itbecomesunselected.Figure4.26:SelectseveralobjectsInFigure4.26,onecomponent,onelinerunandonetextobjectareselected.Toselectalargergroupofobjects:1.Putthemousepointerinthesketcharea.2.Holdthemouseleftbuttondownandmovethepointer.Thisdefinesarectanglewhichyouseeinthesketcharea.3.Releasethemousebutton.Objectsinsidethisrectanglebecomeselected.ToselectawholeAMESimsystem:Youcaneither:?SelectEdit_SelectallintheEditpulldownmenu.?TypeCtrl+Ainthesketcharea.Forthecurrenttutorialexample,selectthewholesystem.Thenextstageistopastethesystemintotheotherwindow.4.3.3Copy,Delete,CutandPasteActionsBeforedoinganyoftheseoperations,itisnecessarytoselecttheobjectsyouwishtooperateon.Normally,youdotheseactionsinSketchmodebutselectingandcopyingcanbedoneinanymode.NotethatCutcreatesacopyoftheitemsremovedwhereasDeletedoesnot.YoucanalwaysrecoveranitemremovedbyCutbyusingPastebutDeleteisirreversible.ToCut,Copy,PasteandDelete,youhavethreealternatives:?SelecttheappropriateitemintheEditpulldownmenu.Figure4.27:Editmenu?Usethefollowingbuttons:?tocut,todelete,?tocopyandtopaste.?Usethefollowingshortcuts:?Ctrl+Xtocut.?Ctrl+Ctocopy.?Ctrl+Vtopaste.?Deletetodelete.Forthetutorialexample:Step1:Pastethesystemtoadifferentwindow/system.1.Selectthecompletequartercarsystem.2.Copytheselectedobjectse.g.Ctrl+C.3.Clickinthenewsystemtomakeitactive.Themousepointertakesontheappearanceoftheobjectscopiedintheactivewindow/system.MirrorandRotateactionscanbeperformedifnecessarybyclickingthemouseleftbutton.4.Pastetheobjectsinthenewsysteme.g.Ctrl+V.5.Leftclicktoaddtheobjectstothesketch.Note:Theusualnooverlapruleappliesforthecopy,cut,pasteoperations.Figure4.28:Pasteonthenewsystem5.Leftclicktoaddtheobjectstothesketch.6.Closethequartercarmodelinordertoworkonlyonthenewmodel.7.Savethenewsystemas“skyhook”forexample.Step2:CompletethesketchasinFigure4.291.Removethelinefromtheroadprofile.2.Selectallthemechanicalcomponents.3.PastethemtwiceasinFigure4.29.Fortunately,thesubmodelparametersarepreservedinthepastingprocess.Figure4.29:PastetwicethesystemRecallweareusingasingledutycyclecomponenttodefinetheroadprofile.Threecopiesofthissignalmustbeproducedtobefedintothethreesub-systems.Therearetwowaysofdoingthis:?UsingsimplesignalduplicationblocksFigure4.30:Signalduplicationblocks?UsingageneraldynamicduplicatorblockFigure4.31:dynamicduplicatorblock4.3.4DynamicblocksThemajorityofAMESimcomponentshavefixednumbersofports,fixednumbersofvariablesoneachport,etc.Itisveryconvenienttohaveasmallcollectionofcomponentswhichallowthesequantitiestobevary.Thesearecalleddynamicblocks.AMESimarrangesthatwhenadynamicblockisselectedfromacategorydialogbox,thequantitiesmustbedefined.Whenthecomponentisaddedtothesketch,itbehavesjustlikeanyotherAMESimcomponent.Thequantitiestobedefinedmightbe:?numberofports?numberofvariables?numberofinputs?numberofoutputs?numberofparameters?numberofrealparameters?numberofintegerparameters?numberofstates?degreeofnumerator(foratransferfunction)?degreeofdenominator(foratransferfunction)Figure4.32:DefinethequantitiesTheAMESimdynamicblocksinthemechanicalandcontrollibraryaregivenbelow.IconSubmodelLabelDYNGAIN0dynamicgainDYNMUX0dynamicmultiplexerblockDYNDMUX0dynamicdemultiplexerblockDYNDUP0dynamicduplicatorblockDYNINT0dynamicintegratorblockDYNDIF1dynamicdifferentiatorblockDYNFUNC0dynamicfunctionDYNEXE0dynamicblockiconforinterfacewithinternalexecutableDYNSWITCHdynamicswitchblockDYNSUMJUN0dynamicblockiconwithvariablenumberofportsonleftandoneportonrightDYNSUBJUN0dynamicblockiconwithvariablenumberofportsonleftandoneportonrightDYNSTATESPACEdynamicblockiconwithvariablenumberofportsonrightandvariablenumberofportsonleftDYNTRANSFdynamicblockiconwithoneportonleftandoneportonrightLMECHN0dynamiclinearmechanicalnodetransferringvelocityLMECHN1dynamiclinearmechanicalnodewithvelocityanddisplacementtransferRMECHN0dynamicrotarynodeWhenoneoftheseblocksisaddedtothesketch,oneormorequantityhastobedefined.ThisisdonebymeansofadialogboxtypifiedinFigure4.33.Figure4.33:DynamicblockInthecurrentexample:1.Addadynamicduplicatorblocktothesystemspecifying3portsontheright.2.ThencompletethesystemasinFigure4.23.3.Constructthelinestoconnectthecomponents.4.Editsomepartsofthesystem.4.3.5Comparingthebodydisplacementwithdifferentsuspensions1.Setthefollowingparametersforthecompletedsystem:2.EnablebothStabilizingmodeandDynamicmode.3.Runasimulation.4.Comparethecarbodydisplacementwiththepassive,idealandactivesuspension.5.SeeFigure4.34.SubmodelnameDescriptionTitleValueDAM000Sky-hookdamperdamperrating2500N/(m/s)GA00Gainrepresentingthemaindampervalueofgain1000GA00Gainrepresentingtheskyhookdampervalueofgain2500STEP0StepfunctionValueafterstep0.1Steptime1Figure4.34:Bodydisplacementwiththedifferentsuspensions4.3.6EditingthecharacteristicsofexistingtextWearegoingtoreplacethecurrenttitle"Quartercar"withthenewtitle"Anactivesuspension":Figure4.35:Right-buttonmenu1.Putthepointeronthetextandholddownthemouseright-button.Thiscreatesapulldownmenu.Note:Thefunctionoftheremainingitemsisobvious.2.ClickonTextActions_Edit.3.PresstheDelete,DelorBackSpacekeytodeletethecurrenttitle,thenyoucanwritethenewtitle.CopyThisoptionchangesthepointertoacopyoftheexistingtextsothatyoucanpasteittothesketch.Note:EditThisoptionmakesthetexteditable.Putthepointerinsidetheboxandusethekeyboardtomodifythetext.Notealsoyoucanedittextinaplotinthesameway.Theright-buttonmenuinthiscaseisasfollows:AlignmentThisoptionisonlyusefulformulti-linetext.TheoptionsareLeft,CenterandRightjustified.Figure4.36:Right-buttonmenuonaplotThefunctionoftheoptionsisobviousfromtheirtitles.4.4Example4:CamoperatedvalveObjectives?Useasubmodelthatreadsadatafile?Showhowtoselectsimulationparameters?UsetheTableEditortopreviewanexistingdatafile?Showhowtoaltersomecharacteristicsofacurve?Introducetheplotmanager?Createanx-yplotAlignmentThisoptionisonlyusefulformulti-linetext.TheoptionsareLeft,CenterandRightjustified.4.4.1DescriptionFigure4.37:ValveandvalvespringoperatedbycamThissystemrepresentsanautomobileenginevalveandvalvespringassemblyoperatedbyanoverheadcam.TheoverheadcamrotatesatconstantspeeddefinedbythesignalsourceCONS0.Thesignalisconvertedtoanangularspeedinrev/minbyOMEGC0andsuppliedtothecamsubmodelCAM00.Thissubmodelreliesonadatafiletoconverttherotaryangularpositionindegreetoalinearcamdisplacementinm.Inotherwords,thedatafiledefinesthecamprofile.ThecamlineardisplacementandvelocityarepassedintoasubmodelLSPT00A.Thissubmodelrepresentstheclearancebetweenthecamfollowerandthetopofthevalve.Whenthisclearancebecomeszerothereisastrongspringforceanddampingforcemodelingthecontact.LCON12isanexampleofamechanicalnodeandisusedtoexchangevelocities,displacementsandforcesbetweenthespringsubmodelSPR000AandthemasssubmodelMAS005.Notethatthismasshaslimitationsonitsmovement.Wesayithasend-stops.4.4.2Simulatingthesystem1.CreatethesystemandusePremiersubmodeltogetthesimplestcompatiblesubmodels.2.ChangetoParametermodeandsetthefollowingnon-defaultvalues:SubmodelTitleValueCAM00fileofcampositionofangularpositionUsingUnix:$AME/tutorial/data/cam.dataUsingWindows:%AME%/tutorial/data/cam.data1forlinearsplines2forcubicsplines2SPR000Aspringforcewithbothdisplacementszero[N]500CONS0constantvalue1000MAS005mass[kg]0.01lowerdisplacementlimit[m]0upperdisplacementlimit[m]0.02LSTP00Agaporclearancewithbothdisplacementszero
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 半機(jī)動水稻插秧機(jī)安全操作規(guī)程
- 2024美容美發(fā)店鋪轉(zhuǎn)讓協(xié)議
- 分布式能源項(xiàng)目合作協(xié)議
- 2024綠化土地租賃及生態(tài)修復(fù)工程合同2篇
- 2024年食醋供銷合同2篇
- 工業(yè)級高頻讀寫器安全操作規(guī)程
- 二零二五年度太陽能熱水器安裝工勞務(wù)合同范本2篇
- 余氯總氯檢測儀安全操作規(guī)程
- 付旋轉(zhuǎn)式壓片機(jī)安全操作規(guī)程
- 2024版工程停工補(bǔ)償協(xié)議
- 2024年度員工試用期勞動合同模板(含保密條款)3篇
- 2024-2030年全球與中國汽車音頻DSP芯片組市場銷售前景及競爭策略分析報(bào)告
- 機(jī)關(guān)事業(yè)單位財(cái)務(wù)管理制度(六篇)
- 2025禮品定制合同范本
- 醫(yī)院消毒隔離制度范文(2篇)
- 2024年01月11026經(jīng)濟(jì)學(xué)(本)期末試題答案
- 烘干煤泥合同范例
- 人教版六年級上冊數(shù)學(xué)第八單元數(shù)學(xué)廣角數(shù)與形單元試題含答案
- 2025年“三基”培訓(xùn)計(jì)劃
- 第20課 北洋軍閥統(tǒng)治時期的政治、經(jīng)濟(jì)與文化 教案
- 叉車租賃合同模板
評論
0/150
提交評論