servo.mdl
来自「一个很棒的网络控制系统仿真软件」· MDL 代码 · 共 569 行
MDL
569 行
Model { Name "servo" Version 5.1 SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ExecutionOrder off RecordCoverage off CovPath "/" CovSaveName "covdata" CovNameIncrementing off CovHtmlReporting on BlockNameDataTip off BlockParametersDataTip on BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off InitFcn "clear functions" Created "Wed Nov 3 20:14:37 1999" Creator "anton" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%<Auto>" LastModifiedBy "mandersson" ModifiedDateFormat "%<Auto>" LastModifiedDate "Wed Jun 22 13:51:36 2005" ModelVersionFormat "1.%<AutoIncrement:254>" ConfigurationManager "none" SimParamPage "Solver" LinearizationMsg "none" Profile off AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" ExtModeMexFile "ext_comm" ExtModeBatchMode off ExtModeTrigType "manual" ExtModeTrigMode "oneshot" ExtModeTrigPort "1" ExtModeTrigElement "any" ExtModeTrigDuration 1000 ExtModeTrigHoldOff 0 ExtModeTrigDelay 0 ExtModeTrigDirection "rising" ExtModeTrigLevel 0 ExtModeArchiveMode "off" ExtModeAutoIncOneShot off ExtModeIncDirWhenArm off ExtModeAddSuffixToVar off ExtModeWriteAllDataToWs off ExtModeArmWhenConnect off ExtModeLogAll on BufferReuse on SimulationMode "normal" Solver "ode45" SolverMode "Auto" StartTime "0.0" StopTime "2" MaxOrder 5 MaxStep "auto" MinStep "auto" MaxNumMinSteps "-1" InitialStep "auto" FixedStep "auto" RelTol "1e-3" AbsTol "auto" OutputOption "RefineOutputTimes" OutputTimes "[0.00199]" Refine "1" LoadExternalInput off ExternalInput "[t, u]" LoadInitialState off InitialState "xInitial" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" SaveFinalState off FinalStateName "xFinal" SaveFormat "Array" Decimation "1" LimitDataPoints off MaxDataPoints "1000" ConsistencyChecking "none" ArrayBoundsChecking "none" AlgebraicLoopMsg "warning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" InheritedTsInSrcMsg "warning" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" CheckForMatrixSingularity "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SfunCompatibilityCheckMsg "none" RTWInlineParameters off BlockReductionOpt off BooleanDataType off ParameterPooling on OptimizeBlockIOStorage on ZeroCross on RTWSystemTargetFile "grt.tlc" RTWTemplateMakefile "grt_default_tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off RTWRetainRTWFile off TLCProfiler off TLCDebug off TLCCoverage off 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" } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "tp513594" Location [474, 95, 955, 392] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType Clock Name "Clock" Position [75, 20, 95, 40] DisplayTime off Decimation "10" } Block { BlockType SubSystem Name "Computer" Ports [2, 1] Position [160, 121, 225, 179] ShowPortLabels on Permissions "ReadWrite" TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" SimViewingDevice off Port { PortNumber 1 Name "u" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } System { Name "Computer" Location [60, 236, 406, 378] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" Block { BlockType Inport Name "In 1" Position [15, 18, 45, 32] Port "1" PortDimensions "-1" SampleTime "-1" DataType "auto" SignalType "auto" Interpolate on } Block { BlockType Inport Name "In 2" Position [15, 48, 45, 62] Port "2" PortDimensions "-1" SampleTime "-1" DataType "auto" SignalType "auto" Interpolate on } Block { BlockType Ground Name "Ground1" Position [55, 100, 75, 120] } Block { BlockType Ground Name "Ground2" Position [55, 65, 75, 85] } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [65, 16, 70, 54] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Scope Name "Schedule" Ports [1] Position [300, 54, 325, 76] Floating off Location [99, 595, 1117, 972] Open off NumInputPorts "1" TickLabels "on" ZoomMode "on" List { ListType AxesTitles axes1 "%<SignalLabel>" } List { ListType SelectedSignals axes1 "" } Grid "on" TimeRange "2" YMin "0.8" YMax "1.7" SaveToWorkspace off SaveName "ScopeData" DataFormat "Array" LimitDataPoints off MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Terminator Name "Terminator" Position [255, 35, 275, 55] } Block { BlockType Terminator Name "Terminator1" Position [270, 65, 290, 85] } Block { BlockType Terminator Name "Terminator2" Position [255, 100, 275, 120] } Block { BlockType Reference Name "TrueTime Kernel" Ports [3, 5] Position [115, 22, 230, 98] DropShadow on SourceBlock "truetime/TrueTime Kernel" SourceType "" sfun "servo_init" args "1" battery off clockdrift "0" clockoffset "0" } Block { BlockType Outport Name "Out 1" Position [280, 23, 310, 37] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "In 1" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "TrueTime Kernel" SrcPort 1 DstBlock "Out 1" DstPort 1 } Line { SrcBlock "TrueTime Kernel" SrcPort 2 DstBlock "Terminator" DstPort 1 } Line { SrcBlock "TrueTime Kernel" SrcPort 4 DstBlock "Terminator1" DstPort 1 } Line { SrcBlock "TrueTime Kernel" SrcPort 3 Points [0, 5] DstBlock "Schedule" DstPort 1 } Line { SrcBlock "Ground2" SrcPort 1 Points [20, 0] DstBlock "TrueTime Kernel" DstPort 2 } Line { SrcBlock "Ground1" SrcPort 1 Points [20, 0] DstBlock "TrueTime Kernel" DstPort 3 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "TrueTime Kernel" DstPort 1 } Line { SrcBlock "In 2" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "TrueTime Kernel" SrcPort 5 Points [5, 0] DstBlock "Terminator2" DstPort 1 } } } Block { BlockType TransferFcn Name "DC Servo" Position [270, 131, 340, 169] Numerator "[1000]" Denominator "[1 1 0]" AbsoluteTolerance "auto" Realization "auto" Port { PortNumber 1 Name "y" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Display Name "Display" Ports [1] Position [130, 15, 220, 45] Format "short" Decimation "1" Floating off SampleTime "-1" } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [390, 76, 395, 114] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType SignalGenerator Name "Signal\nGenerator" Position [40, 120, 70, 150] WaveForm "square" Amplitude "1" Frequency "1" Units "Hertz" VectorParams1D on Port { PortNumber 1 Name "r" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Scope Name "r,y" Ports [1] Position [425, 83, 450, 107] Floating off Location [594, 173, 997, 441] Open off NumInputPorts "1" TickLabels "OneTimeTick" ZoomMode "xonly" List { ListType AxesTitles axes1 "%<SignalLabel>" } List { ListType SelectedSignals axes1 "" } Grid "on" TimeRange "2" YMin "-1.5" YMax "1.5" SaveToWorkspace off SaveName "ScopeData" DataFormat "StructureWithTime" LimitDataPoints off MaxDataPoints "120000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Scope Name "u" Ports [1] Position [290, 58, 315, 82] Floating off Location [594, 495, 997, 763] Open off NumInputPorts "1" TickLabels "OneTimeTick" ZoomMode "xonly" List { ListType AxesTitles axes1 "%<SignalLabel>" } List { ListType SelectedSignals axes1 "" } Grid "on" TimeRange "2" YMin "-2" YMax "2" SaveToWorkspace off SaveName "ScopeData1" DataFormat "StructureWithTime" LimitDataPoints off MaxDataPoints "120000" Decimation "1" SampleInput off SampleTime "0" } Line { Name "u" FontSize 10 Labels [0, 1] SrcBlock "Computer" SrcPort 1 Points [20, 0] Branch { DstBlock "DC Servo" DstPort 1 } Branch { Points [0, -80] DstBlock "u" DstPort 1 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "r,y" DstPort 1 } Line { Name "r" FontSize 10 SrcBlock "Signal\nGenerator" SrcPort 1 Points [55, 0] Branch { Labels [-1, 1] DstBlock "Computer" DstPort 1 } Branch { Points [0, -30] DstBlock "Mux" DstPort 2 } } Line { SrcBlock "Clock" SrcPort 1 DstBlock "Display" DstPort 1 } Line { Name "y" Labels [0, 1] SrcBlock "DC Servo" SrcPort 1 Points [15, 0] Branch { Labels [-1, 1] Points [20, 0; 0, 65; -250, 0; 0, -50] DstBlock "Computer" DstPort 2 } Branch { Points [0, -65] DstBlock "Mux" DstPort 1 } } Annotation { Text "TrueTime 1.3 PID-control of a DC servo\nCopyri""ght (c) 2005\nMartin Anderssonm, Dan Henriksson and Anton Cervin\nDepartment ""of Automatic Control, Lund University, Sweden\nPlease direct questions and bu""g reports to: truetime@control.lth.se " Position [241, 261] } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?