您好,欢迎访问三七文档
1AdvancedModel-Based-SystemDesignLecture11:Lecture11:PartitioningtheSystemHigh-LevelControlIncorporatingtheBrakeModel•Wenowhaveafairlylargeandcomplexsystem.•WewouldliketoarrangeitmorelikeaclassicalcontrolsystemandalsoarrangeittoeasilyfacilitatedeployingthemodelsonourHardware2facilitatedeployingthemodelsonourHardware-In-the-Loop(HIL)system.•Wewouldliketosetupthesystemintheformofacontrollerandaplant.Inthiscasetheplantiseverythinginourvehiclemodelexceptforthecontrolleranddriverblockcontrolleranddriverblock.•Thecontrollerreceivescommandsfromthedriverblockandcoordinatesthesubsystemcompoonentsinsidetheplant.Copyright2009Rose-HulmanInstituteofTechnology.2PartitioningtheSystem•Wewouldliketosetupaclassic-lookingcontrolsystem.•Wewillhavethedriversubsysteminterfaceto3ythecontroller,andthenthecontrollerinterfacetotheplantwhichcontainsalloftheothersubsystemcomponentsofthevehicleexcepttheloggingandvisualizationsubsystem.•WewillstartwiththelastmodeldevelopedinLecture10andrenameitasLecture11_Model1.•Thismodelisshownnext:4Copyright2009Rose-HulmanInstituteofTechnology.3PartitioningtheSystem•Separatethesubsystemcomponentsasshown:5PartitioningtheSystem•WewanttomakeasubsystemoutoftheDiagnosticbus,Battery,ElectricMotor,RearDiffandBodyGeneratorEngine6RearDiffandBody,Generator,Enginesubsystems.•Selectallofthesecomponentsandthenright-clickononeoftheselectedcomponentsandselectCreateSSubsystem:Copyright2009Rose-HulmanInstituteofTechnology.47PartitioningtheSystem•WhenyouselectCreateSubsystem,alloftheselectedsubsystemswillbegroupedintoasinglesubsystem8intoasinglesubsystem.•Renamethatsubsystem“Vehicle_Plant.”Copyright2009Rose-HulmanInstituteofTechnology.5PartitioningtheSystem•Wenowneedtodoafairamountofreorganizationandreroutingofsomecontrolsignals9controlsignals.•Wewillstartwiththedriver.Theoutputsignalswillbegroupedtogetherinwhatwewillnowcallthe“Driver_Controls_Bus.”•Themodeldoesnotneedtobemodified,butisshownnext:DriverBlock•NotethattheonlyreasonthedriverblockneedstheVehicle_System_DiagnostiocsisbecausethefeedbacksystemthattracksadrivecycleneedstoknowthevehiclespeedInafuturelecturethedriverblockwillhaveonly10speed.Inafuturelecture,thedriverblockwillhaveonlyoutputsunlessweimplementacruisecontrol.Copyright2009Rose-HulmanInstituteofTechnology.6ControllerModifications•TheDriver_DiagnosticswillnolongerbepartoftheVehicle_System_Diagnosticsbus.•Instead,thedrivercontrolsignalgodirectlyto11,ggythecontroller,andthecontrollerissuestheappropriatecommandstothesubsystemcomponentsbasedontheinputsprovided.•Modifythecontrollerasshownnext.TheonlychangeonthetopleveloftheControlleristhatthedrivercontrolsconnecttothecontrollerthroughaseparateport.ControllerTopLevelChanges•Thechangestothetoplevelofthecontrollerareshownnext:12PortsreplacedbyGotoblocks.ThesesignalswillbeplacedintheControlSignalsbus.GotoandFromblocksadded.Driver_Cojntrol_SignalsisnowaninputandgoesdirectlytotheAccelerationandBrakingsubsystem.Copyright2009Rose-HulmanInstituteofTechnology.7ControllerTop-LevelChanges13GotoandFromblocksadded.“Control_Signals”busadded.TopLevelChanges•Onthetoplevel,weneedtoconnecttheDriverControlsBus14Copyright2009Rose-HulmanInstituteofTechnology.8Vehicle_PlantChaqnges•Wenowneedtomakesomechangesintheplant.•TheonlyinputtothePlantisthe15ypVehicle_Control_Signalsbus.•WewillleavethissignalasabusbecauseitwillgotoeverysubsystemintheVehicle_Plant.•Plus,wewillbeaddingmanymorecontrolsignalsinthefuture.UsingtheControlSignalsgg_gbutwillcleanthingsupabit.•TheVehicle_Planthasbeenmodifiedasshownnext:Vehicle_Plant•NotethatweareimmediatelyassignaGotoblocktotheControl_Signalinput.•NotethatwehavealsoremovedtheDriver_DiagnosticsfromtheVehicleSystemDiagnosticsbus16fromtheVehicle_System_Diagnosticsbus.•WewillbeaddingadditionalsignalstotheWewillbeaddingadditionalsignalstotheControl_Signalsbus,sowewillleaveitasabusandthenitwillbeaninputtoallsubsystemblocksintheplant.Copyright2009Rose-HulmanInstituteofTechnology.9VehiclePlant–BatterySubsystem•Wewillmodifyoneplantsubsystematatime.•Atthemoment,thebatteryhasnowcontrolsignals.Thiswillchangewhenwedoourwake-17ggupsequenceforthevehicle.•Fornow,wewilladdthatControl_Signalsbusasaninputtothebattery,andthenterminatethatsignalinsidethebatterysubsystem.Thisway,thecontrolsignalswillbereadytousewithinthesubsystemoncetheappropriatelogichasbeendiscovered.BatteryModel•ThebatteryhasbeenmodifiedbyaddinganewporttoconnecttheControl_Signalsbutto:18•Attheplantlevel,weconnectthecontrolsignalbustothebatteryControls_Singalinput:Copyright2009Rose-HulmanInstituteofTechnology.10PlantMods–ElectricMotor•TheTorqueRequestfortheelectricmotorwillcomefromtheMotor_Torque_Requestbus19bus.•WewillchangetheinputoftheTorque_RequestporttoaControl_Signalsport.Insidethemodel,wewillneedtoextractthemotortorquefromtheBus.•Insidetheelectricmotor,weneedtoextracttheMotor_Torque_Requestsignalfromthebus:ElectricMotor20•Andthenconnectthissignaltothetorquerequestportionofthemodel:Copyright2009Rose-HulmanInstituteofTechnology.11MoreChanges•WecanmakesimilarchangestoallremainingsubsystemswithintheV
本文标题:MBSDLecture 2011-Partitioning the System, High-Lev
链接地址:https://www.777doc.com/doc-3327095 .html