blockaa.mdl
来自「realize analysis and design for computer」· MDL 代码 · 共 399 行
MDL
399 行
Model { Name "blockaa" Version 2.00 SimParamPage Solver SampleTimeColors off WideVectorLines on PaperOrientation landscape StartTime "0.0" StopTime "10" Solver ode45 RelTol "1e-8" AbsTol "1e-6" Refine "1" MaxStep "auto" InitialStep "auto" FixedStep "auto" MaxOrder 5 OutputOption RefineOutputTimes OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime off TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput off 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 "blockaa" Location [3, 41, 613, 449] Open on ScreenColor white Block { BlockType Constant Name "Constant" Position [385, 200, 405, 220] Orientation left ShowName off Value "sw" } Block { BlockType SubSystem Name "Double\n integrator" Position [480, 112, 510, 163] DropShadow on ShowPortLabels off System { Name "Double\n integrator" Location [300, 252, 621, 461] Open off ScreenColor white Block { BlockType Inport Name "u" Position [45, 80, 65, 100] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType Gain Name "Gain" Position [105, 77, 130, 103] ShowName off Gain "K" } Block { BlockType Integrator Name "x1" Position [210, 80, 230, 100] ExternalReset none InitialConditionSource internal InitialCondition "x10" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "x2" Position [165, 80, 185, 100] ExternalReset none InitialConditionSource internal InitialCondition "x20" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Outport Name "y" Position [255, 80, 275, 100] Port "1" OutputWhenDisabled held InitialOutput "0" } Block { BlockType Outport Name "ydot" Position [255, 120, 275, 140] Port "2" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "u" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "x2" DstPort 1 } Line { SrcBlock "x2" SrcPort 1 Points [0, 0] Branch { DstBlock "x1" DstPort 1 } Branch { Points [0, 40] DstBlock "ydot" DstPort 1 } } Line { SrcBlock "x1" SrcPort 1 DstBlock "y" DstPort 1 } } } Block { BlockType Mux Name "Mux" Position [175, 123, 205, 157] BackgroundColor magenta DropShadow on ShowName off Inputs "3" } Block { BlockType DiscreteStateSpace Name "RST 2" Position [235, 118, 350, 162] BackgroundColor magenta DropShadow on A "[-ao1 1;-ao2 0]" B "[t1-t0*ao1 -s1+s0*ao1 ao1-r1; t2-t0*ao2 -s2+s0*a" "o2 ao2-r2]" C "[1 0]" D "[t0 -s0 0]" X0 "0" SampleTime "h" } Block { BlockType Saturate Name "Saturation" Position [385, 128, 415, 152] DropShadow on ShowName off UpperLimit "ulim" LowerLimit "-ulim" } Block { BlockType Step Name "Step Input" Position [35, 120, 55, 140] DropShadow on ShowName off Time "0" Before "0" After "1" } Block { BlockType Switch Name "Switch" Position [280, 194, 310, 226] Orientation left ShowName off Threshold ".5" } Block { BlockType Terminator Name "Terminator" Position [530, 140, 550, 160] ShowName off } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold" Position [280, 245, 320, 275] Orientation left BackgroundColor magenta DropShadow on ShowName off SampleTime "h" } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold1" Position [90, 115, 130, 145] BackgroundColor magenta DropShadow on ShowName off SampleTime "h" } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold2" Position [210, 195, 250, 225] Orientation left BackgroundColor magenta DropShadow on ShowName off SampleTime "h" } Block { BlockType Outport Name "y" Position [580, 115, 600, 135] Port "1" OutputWhenDisabled held InitialOutput "0" } Block { BlockType Outport Name "u" Position [450, 60, 470, 80] Port "2" OutputWhenDisabled held InitialOutput "0" } Block { BlockType Outport Name "Outport2" Position [95, 65, 115, 85] ShowName off Port "3" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "Double\n integrator" SrcPort 2 DstBlock "Terminator" DstPort 1 } Line { SrcBlock "Saturation" SrcPort 1 Points [0, 0] Branch { DstBlock "Double\n integrator" DstPort 1 } Branch { Points [10, 0; 0, 95; -80, 0; 0, -15] DstBlock "Switch" DstPort 3 } Branch { Points [10, 0; 0, -70] DstBlock "u" DstPort 1 } } Line { SrcBlock "Zero-Order\nHold2" SrcPort 1 Points [-45, 0] DstBlock "Mux" DstPort 3 } Line { SrcBlock "Switch" SrcPort 1 DstBlock "Zero-Order\nHold2" DstPort 1 } Line { SrcBlock "Constant" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { SrcBlock "RST 2" SrcPort 1 Points [0, 0] Branch { Points [10, 0; 0, 60] DstBlock "Switch" DstPort 1 } Branch { DstBlock "Saturation" DstPort 1 } } Line { SrcBlock "Double\n integrator" SrcPort 1 Points [0, 0] Branch { Points [45, 0; 0, 135] DstBlock "Zero-Order\nHold" DstPort 1 } Branch { DstBlock "y" DstPort 1 } } Line { SrcBlock "Zero-Order\nHold" SrcPort 1 Points [-124, 0; 0, -120] DstBlock "Mux" DstPort 2 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "RST 2" DstPort 1 } Line { SrcBlock "Zero-Order\nHold1" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Step Input" SrcPort 1 Points [0, 0] Branch { DstBlock "Zero-Order\nHold1" DstPort 1 } Branch { Points [11, 0; 0, -55] DstBlock "Outport2" DstPort 1 } } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?