MBSD2 Lecture 12 System Initialization, Shifting L

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1AdvancedModel-Based-SystemDesignLecture12:Lecture12:SystemInitializationShiftingLogicSystemInitialization•Wenowhaveavehiclethatwecandrivewithmanualacceleratorandbrakepedals.•Withmostvehiclesyoucannotjustjump2•Withmostvehicles,youcannotjustjumpinandpresstheacceleratorpedalanddriveaway.Thefollowingusuallyoccurs–Youturnthekeytostartthevehicle.–Thevehiclegoesthroughacomponentcheck.–Thevehiclesystemsareenabled.–Youmustthenshiftthevehicleoutofparkintoforwardorreverse.Copyright2009Rose-HulmanInstituteofTechnology.2SystemInitialization•WewilladdaparallelStateflowcharttogothroughthevehiclestartupandshiftingprocedures3procedures.•ThisStateflowchartwillenablethecharge-controlStateflowchartthatcontrolstheengine-generatorchargingsystem.•WewillstartwithmodelLecture12_Model0,whichwillbepassedoutinclass.SystemInitialization•First,wewilladdaswitchtothedriverblockthatsimulatesthekeyswitchofaconventionalvehicle.4•Ourvehicledoesnothaveastarter,soallweneedisanoff-onswitch.•Wewilluseamanualswitchtoswitchthesignalbetween0and1.•WewilladdthistotheDriverControllsbus,and_,thissignalwillgodirectlytothecontroller.•WewillNamethesignalVehicle_Key.Copyright2009Rose-HulmanInstituteofTechnology.3DriverSubsystem5Controller•Next,wewilladdasecondStateflowchart.•TheonlyinputstothischartwillbetheVehicle_Keysignalandaclock,whichisthesameclockasusedforthechargecontroller6sameclockasusedforthechargecontroller.•Thischarthasasingleoutput,whichistheVehicle_Readysignal.•Thevalueofthissignalisinitializedtozeroandwillremainzerountilwecheckthestatusofthebatterymotorgeneratorandenginebattery,motor,generator,andengine.•WewillalsoaddavariablecalledStatefordebuggingpurposes.•AddaStateflowchartasshown:Copyright2009Rose-HulmanInstituteofTechnology.4ControllerModifications7Controller•ThecontentsofthechartonlychecktoseethestatusoftheVehicle_Keyswitch.•Notethat,forthemoment,thevehicle_KeyswitchonlytellsthevehicletoturnonItisnot8switchonlytellsthevehicletoturnon.Itisnotcapableofturningthevehicleoff.•(Wewillimplementthislaterbecauseweneedtodoacontrolledshut-downprocedure.)•ThebeginningoftheStartup_and_Shiftingchartareshownnext:areshownnext:Copyright2009Rose-HulmanInstituteofTechnology.5Controller9Thereisanerrorinthisdiagram.Somethingwasleftout.Youmayfinditlater…Controller•TheCharge_ControllerStateflowchartmustalsobemodified.•Wewanttospecifythattheengineandgeneratornotbeenableduntiluntilthe10generatornotbeenableduntiluntiltheStartup_and_Shiftingchartcheckoutallofthecomponentsandsignalsthatthevehicleisready.•WewillneedtoaddtheVehicle_Readysignalasaninputtothischartaninputtothischart.Copyright2009Rose-HulmanInstituteofTechnology.6Controller•ModifytheCharge_Controllerchartasshown:11Charge_Controller•WewilladdanexitconditiontotheinitializationstateoftheCharge-ControllerStateflowchartthatwillnotallowthe12Stateflowchartthatwillnotallowthevehicletoenterthenormalcharge/dischargecycleuntilthevheicleisready.•Notethatthismodificationdoesnotffaddresstheissueofagracefulshutdown.Copyright2009Rose-HulmanInstituteofTechnology.7ChargeController13Thisstatetransitionguardadded.BatteryModel•Nextwewilladdastartuphandshakeforthebatteryandsomeoperationaldetails.•Thebatteryhasacontrolsignalthatmustbesenttoitandastatussignalthatitsendstoindicateitsstate14statussignalthatitsendstoindicateitsstate.•Thebatteryhasaninternalcontactor.Whenthecontactorisopen,thebatteryvoltageiszeroandthepackisdisconnectedfromthesystem.•Whenthecontactorisclosed,thebatteryisconnectedtothesystem(motorandgeneratorinourcase)andtheoutputltithtiditdbdlvoltageisthatindicatedbyourmodel.Copyright2009Rose-HulmanInstituteofTechnology.8BatteryModel•ConnectCommand–Inputsignalreceivedbythebattery–1–Closethecontactor.15–0–OpenContactor.•PackState–outputsignalsentbytheBattery–0–Unavailable–1–Idle–2–Disconnected(ContactorOpen)–3–Precharging–4–Connected(ContactorClosed).BatteryModel•Thebatterymodelneedstobemodifiedasfollows–TheConnectCommandmustbeaddedaspartoftheControl_Signalsbus.–Aswitchisaddedtothemodelsothatthebatteryvoltageisswitchedbetweenzeroandthemodelvoltagedependingonthevalueofsignal“ConnectCommand.”–Whenthebatteryreceivestheaconnectcommandof1aftera3seconddelaythe16–Whenthebatteryreceivestheaconnectcommandof1,aftera3seconddelay,thecontactorswitchwillcloseandthebatteryvoltagewillbeequaltothemodelvoltage.–Iftheconnectcommandgoestozero,thecontactorshouldopenimmediately.•AdiagnosticoutputshouldbeaddedthatcontainsthePackstatesignal.Thepackstatesignalshouldhavethefollowingvaluesdependingonthestateofthebatterymodel:–2–Thecontactorisopen,thebatteryisdisconnected,andthebatteryvoltageiszerozero.–3–Duringthethreeseconddelaywhenthebatteryisconnecting.–4–Thecontactorisclosed.Thebatteryisconnected,andthevoltageisequaltothemodeledvoltage.Copyright2009Rose-HulmanInstituteofTechnology.9BatteryModel•TheStartup_and_ShiftingControllermustbemodifiedasfollows:–AfterVehicle_Key=1,thecontrollermustissuethe17connectcommand.–Beforeproceedingtothenextstate,thecontrollerwaitsforthePackstatetoEqual4.–Ifthepackstatedoesnotgoto4,donotproceedanddonotallo

1 / 18
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功