blockhold.mdl
来自「realize analysis and design for computer」· MDL 代码 · 共 373 行
MDL
373 行
Model { Name "blockhold" Version 2.00 SimParamPage Solver SampleTimeColors off WideVectorLines off PaperOrientation landscape StartTime "0.0" StopTime "10" 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 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 "blockhold" Location [30, 70, 565, 416] Open on ScreenColor white Block { BlockType SubSystem Name "First-Order\nHold1" Position [235, 209, 270, 241] ShowName off ShowPortLabels off MaskType "First-Order Hold" MaskDescription "First-Order Hold" MaskHelp "Implements a First-Order sample-and-hold " "latch operating at the sampling interval " "you specify." MaskPromptString "Sample Time:" MaskStyleString "edit" MaskInitialization "Ts=@1;" MaskDisplay "plot(0,0,100,100,[90,70,50,30,10],[60,40,80,30,2" "0])" MaskIconFrame on MaskIconOpaque on MaskIconRotate off MaskIconUnits autoscale MaskValueString "h" System { Name "First-Order\nHold1" Location [217, 151, 621, 322] Open off ScreenColor white Block { BlockType Inport Name "input" Position [25, 35, 45, 55] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType Gain Name "Gain" Position [285, 33, 325, 77] Gain "1/Ts" } Block { BlockType Integrator Name "Integrator" Position [235, 42, 260, 68] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Sum Name "Sum" Position [190, 37, 210, 68] Inputs "+-" } Block { BlockType UnitDelay Name "Unit Delay" Position [90, 93, 140, 117] X0 "0" SampleTime "Ts" } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold" Position [100, 29, 135, 61] SampleTime "Ts" } Block { BlockType Outport Name "output" Position [345, 45, 365, 65] Port "1" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "Gain" SrcPort 1 DstBlock "output" DstPort 1 } Line { SrcBlock "Integrator" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { SrcBlock "Unit Delay" SrcPort 1 Points [20, 0; 0, -45] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Zero-Order\nHold" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "input" SrcPort 1 Points [15, 0] Branch { Points [0, 60] DstBlock "Unit Delay" DstPort 1 } Branch { DstBlock "Zero-Order\nHold" DstPort 1 } } } } Block { BlockType Integrator Name "Integrator" Position [305, 130, 325, 150] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Sin Name "Sine Wave" Position [55, 125, 75, 145] ShowName off Amplitude "1" Frequency "1" Phase "0" SampleTime "0.05" } Block { BlockType Sin Name "Sine Wave1" Position [55, 215, 75, 235] ShowName off Amplitude "1" Frequency "1" Phase "h" SampleTime "-1" } Block { BlockType Sum Name "Sum" Position [180, 130, 200, 150] Inputs "+-" } Block { BlockType Sum Name "Sum1" Position [360, 125, 380, 145] Inputs "++" } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold" Position [230, 54, 265, 86] ShowName off SampleTime "h" } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold1" Position [225, 124, 260, 156] ShowName off SampleTime "h" } Block { BlockType Outport Name "Outport" Position [410, 60, 430, 80] ShowName off Port "1" OutputWhenDisabled held InitialOutput "0" } Block { BlockType Outport Name "Outport1" Position [415, 125, 435, 145] ShowName off Port "2" OutputWhenDisabled held InitialOutput "0" } Block { BlockType Outport Name "Outport2" Position [415, 215, 435, 235] ShowName off Port "3" OutputWhenDisabled held InitialOutput "0" } Block { BlockType Outport Name "Outport3" Position [130, 30, 150, 50] ShowName off Port "4" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "Outport1" DstPort 1 } Line { SrcBlock "Integrator" SrcPort 1 Points [0, 0] Branch { Points [10, 0; 0, 40; -180, 0; 0, -35] DstBlock "Sum" DstPort 2 } Branch { DstBlock "Sum1" DstPort 2 } } Line { SrcBlock "Zero-Order\nHold1" SrcPort 1 Points [0, 0] Branch { Points [15, 0; 0, -40; 60, 0; 0, 30] DstBlock "Sum1" DstPort 1 } Branch { DstBlock "Integrator" DstPort 1 } } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Zero-Order\nHold1" DstPort 1 } Line { SrcBlock "First-Order\nHold1" SrcPort 1 DstBlock "Outport2" DstPort 1 } Line { SrcBlock "Sine Wave1" SrcPort 1 DstBlock "First-Order\nHold1" DstPort 1 } Line { SrcBlock "Zero-Order\nHold" SrcPort 1 DstBlock "Outport" DstPort 1 } Line { SrcBlock "Sine Wave" SrcPort 1 Points [0, 0] Branch { DstBlock "Sum" DstPort 1 } Branch { Points [70, 0; 0, -65] DstBlock "Zero-Order\nHold" DstPort 1 } Branch { Points [15, 0; 0, -95] DstBlock "Outport3" DstPort 1 } } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?