blockmv.mdl
来自「realize analysis and design for computer」· MDL 代码 · 共 241 行
MDL
241 行
Model { Name "blockmv" Version 2.00 SimParamPage Solver SampleTimeColors off WideVectorLines on PaperOrientation landscape StartTime "0.0" StopTime "999999" Solver VariableStepDiscrete 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 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 "blockmv" Location [121, 82, 621, 382] Open on ScreenColor white Block { BlockType SubSystem Name "Band-Limited\nWhite Noise" Position [40, 47, 85, 83] BackgroundColor magenta DropShadow on ShowPortLabels off MaskType "Continuous White Noise." MaskDescription "White noise for continuous (s-domain) systems.\n" "Band-limited using zero-order-hold." MaskHelp "Implemented using white noise into Zero-Order " "Hold block. The seed and power can be vectors " "of the same length to produce a vector of " "white noise sources. For faster simulation, " "set sample time to the highest value possible " "but in accordance with the fastest dynamics " "of system." MaskPromptString "Noise Power:|Sample Time:|Seed" MaskStyleString "edit,edit,edit" MaskInitialization "Cov = @1; Ts = @2; seed = @3; r = rand(1,12); " "r2 = [r(1),r;r,r(12)]; t =[1:13;1:13];" MaskDisplay "plot(t(:),r2(:))" MaskIconFrame on MaskIconOpaque on MaskIconRotate off MaskIconUnits autoscale MaskValueString "[1]|h|[1477]" System { Name "Band-Limited\nWhite Noise" Location [54, 341, 339, 470] Open off ScreenColor magenta Block { BlockType Gain Name "Gain" Position [155, 31, 195, 69] Gain "[sqrt(Cov)]/[sqrt(Ts)]" } Block { BlockType RandomNumber Name "White Noise" Position [25, 40, 45, 60] Seed "seed" } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold" Position [85, 34, 120, 66] SampleTime "Ts" } Block { BlockType Outport Name "Out_1" Position [230, 40, 250, 60] Port "1" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "Zero-Order\nHold" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "Out_1" DstPort 1 } Line { SrcBlock "White Noise" SrcPort 1 DstBlock "Zero-Order\nHold" DstPort 1 } } } Block { BlockType DiscreteTransferFcn Name "Discrete\nTransfer Fcn" Position [75, 135, 125, 185] BackgroundColor magenta DropShadow on ShowName off Numerator "[-s0 -s1]" Denominator "[r0 r1]" SampleTime "h" } Block { BlockType DiscreteStateSpace Name "Discrete State-Space" Position [240, 133, 355, 177] BackgroundColor magenta DropShadow on ShowName off A "[-a1 1; -a2 0]" B "[c1-a1 b1; c2-a2 b2]" C "[1 0]" D "[1 0]" X0 "0" SampleTime "h" } Block { BlockType Mux Name "Mux" Position [175, 136, 205, 169] BackgroundColor magenta DropShadow on ShowName off Inputs "2" } Block { BlockType Outport Name "y" Position [400, 145, 420, 165] Port "1" OutputWhenDisabled held InitialOutput "0" } Block { BlockType Outport Name "u" Position [180, 205, 200, 225] Port "2" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "Band-Limited\nWhite Noise" SrcPort 1 Points [55, 0; 0, 80] DstBlock "Mux" DstPort 1 } Line { SrcBlock "Discrete\nTransfer Fcn" SrcPort 1 Points [0, 0] Branch { Points [15, 0; 0, 55] DstBlock "u" DstPort 1 } Branch { DstBlock "Mux" DstPort 2 } } Line { SrcBlock "Discrete State-Space" SrcPort 1 Points [0, 0] Branch { Points [10, 0; 0, 105; -325, 0; 0, -100] DstBlock "Discrete\nTransfer Fcn" DstPort 1 } Branch { DstBlock "y" DstPort 1 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Discrete State-Space" DstPort 1 } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?