📄 sysmdl_h.mdl
字号:
Model { Name "sysmdl_h" Version 2.00 SimParamPage Solver SampleTimeColors off WideVectorLines on PaperOrientation landscape StartTime "0.0" StopTime "10.0" Solver ode45 RelTol "1e-3" AbsTol "1e-6" Refine "1" MaxStep "auto" InitialStep "auto" FixedStep "auto" MaxOrder 5 OutputOption RefineOutputTimes OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" LimitMaxRows off MaxRows "1000" Decimation "1" AlgebraicLoopMsg warning MinStepSizeMsg warning UnconnectedInputMsg warning UnconnectedOutputMsg warning UnconnectedLineMsg warning ConsistencyChecking off ZeroCross on BlockDefaults { Orientation right ForegroundColor black BackgroundColor white DropShadow off NamePlacement normal FontName "Helvetica" FontSize 10 FontWeight normal FontAngle normal ShowName on } AnnotationDefaults { HorizontalAlignment center VerticalAlignment middle ForegroundColor black BackgroundColor white DropShadow off FontName "Helvetica" FontSize 10 FontWeight normal FontAngle normal } System { Name "sysmdl_h" Location [525, 59, 894, 240] Open on ScreenColor white Block { BlockType Inport Name "thrust \nin" Position [20, 75, 40, 95] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType SubSystem Name "Cart \nModel" Position [60, 60, 145, 110] ShowPortLabels on System { Name "Cart \nModel" Location [439, 44, 910, 405] Open off ScreenColor white Block { BlockType Inport Name "thrust \nin" Position [15, 175, 35, 195] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType Mux Name "Compose\noutput\nvector" Position [360, 138, 385, 197] Inputs "4" } Block { BlockType Fcn Name "Compute\ntheta_dot_dot" Position [120, 288, 185, 322] Orientation left Expr "-(cos(u(5))*sin(u(5))*m*l*u(4)*u(4)-m*g*sin(" "u(5))+u(3)*cos(u(5))-g*M*sin(u(5)))/(l*(M+m*" "sin(u(5))*sin(u(5))))" MaskIconFrame on MaskIconOpaque on MaskIconRotate off MaskIconUnits autoscale } Block { BlockType Fcn Name "Compute\nx_dot_dot" Position [120, 13, 185, 47] Orientation left Expr "(m*l*sin(u(5))*u(4)*u(4)-m*cos(u(5))*g*sin(u" "(5))+u(3))/(M+m*sin(u(5))*sin(u(5)))" MaskIconFrame on MaskIconOpaque on MaskIconRotate off MaskIconUnits autoscale } Block { BlockType Mux Name "Mux" Position [205, 128, 245, 242] Inputs "5" } Block { BlockType Integrator Name "theta" Position [145, 224, 165, 266] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "theta_dot" Position [80, 224, 100, 266] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "x" Position [140, 79, 160, 121] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "x_dot" Position [80, 79, 100, 121] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Outport Name "state \nout" Position [410, 160, 430, 180] Port "1" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "theta_dot" SrcPort 1 Points [10, 0; 0, 0] Branch { DstBlock "theta" DstPort 1 } Branch { Points [0, -40] DstBlock "Mux" DstPort 4 } Branch { Points [0, 35; 220, 0; 0, -90] DstBlock "Compose\noutput\nvector" DstPort 4 } } Line { SrcBlock "x_dot" SrcPort 1 Points [5, 0] Branch { DstBlock "x" DstPort 1 } Branch { Points [0, 65] DstBlock "Mux" DstPort 2 } Branch { Points [0, -25; 200, 0; 0, 85] DstBlock "Compose\noutput\nvector" DstPort 2 } } Line { SrcBlock "Compute\nx_dot_dot" SrcPort 1 Points [-65, 0; 0, 70] DstBlock "x_dot" DstPort 1 } Line { SrcBlock "Compute\ntheta_dot_dot" SrcPort 1 Points [-65, 0; 0, -60] DstBlock "theta_dot" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 Points [20, 0] Branch { Points [0, -155] DstBlock "Compute\nx_dot_dot" DstPort 1 } Branch { Points [0, 120] DstBlock "Compute\ntheta_dot_dot" DstPort 1 } } Line { SrcBlock "Compose\noutput\nvector" SrcPort 1 DstBlock "state \nout" DstPort 1 } Line { SrcBlock "x" SrcPort 1 Points [10, 0; 0, 0] Branch { Points [0, 45] DstBlock "Mux" DstPort 1 } Branch { Points [155, 0; 0, 45] DstBlock "Compose\noutput\nvector" DstPort 1 } } Line { SrcBlock "theta" SrcPort 1 Points [10, 0; 0, 0] Branch { Points [0, -20] DstBlock "Mux" DstPort 5 } Branch { Points [0, 20; 125, 0; 0, -90] DstBlock "Compose\noutput\nvector" DstPort 3 } } Line { SrcBlock "thrust \nin" SrcPort 1 DstBlock "Mux" DstPort 3 } } } Block { BlockType Demux Name "Demux" Position [170, 32, 205, 133] Outputs "4" } Block { BlockType Terminator Name "Terminate\ntheta" Position [310, 85, 330, 105] } Block { BlockType Terminator Name "Terminate\ntheta_dot" Position [245, 110, 265, 130] } Block { BlockType Terminator Name "Terminate x_dot" Position [245, 60, 265, 80] } Block { BlockType Outport Name "x\nout" Position [225, 35, 245, 55] NamePlacement alternate Port "1" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "Cart \nModel" SrcPort 1 DstBlock "Demux" DstPort 1 } Line { SrcBlock "thrust \nin" SrcPort 1 DstBlock "Cart \nModel" DstPort 1 } Line { SrcBlock "Demux" SrcPort 4 DstBlock "Terminate\ntheta_dot" DstPort 1 } Line { SrcBlock "Demux" SrcPort 3 DstBlock "Terminate\ntheta" DstPort 1 } Line { SrcBlock "Demux" SrcPort 2 DstBlock "Terminate x_dot" DstPort 1 } Line { SrcBlock "Demux" SrcPort 1 DstBlock "x\nout" DstPort 1 } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -