📄 slcp.mdl
字号:
Model {
Name "slcp"
Version 4.00
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines on
ShowLineDimensions off
ShowPortDataTypes off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovNameIncrementing off
CovHtmlReporting on
BlockParametersDataTip on
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
PreLoadFcn "initcp"
CloseFcn "AnimFigTitle = [winName, ': Cart & Pole Animation']"
"; AnimFigH = findobj(0,'Name',AnimFigTitle); close(AnimFigH)"
Created "Fri Jun 02 16:26:54 2000"
Creator "pascal"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "pascal"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Wed Aug 09 17:53:05 2000"
ModelVersionFormat "1.%<AutoIncrement:2>"
ConfigurationManager "none"
DefaultBlockFontName "Helvetica"
DefaultBlockFontSize 10
DefaultBlockFontWeight "normal"
DefaultBlockFontAngle "normal"
DefaultAnnotationFontName "Helvetica"
DefaultAnnotationFontSize 10
DefaultAnnotationFontWeight "normal"
DefaultAnnotationFontAngle "normal"
DefaultLineFontName "Helvetica"
DefaultLineFontSize 9
DefaultLineFontWeight "normal"
DefaultLineFontAngle "normal"
SimParamPage "Solver"
StartTime "0.0"
StopTime "1000"
SolverMode "SingleTasking"
Solver "ode5"
RelTol "1e-3"
AbsTol "1e-6"
Refine "1"
MaxStep "0.1"
MinStep "auto"
MaxNumMinSteps "-1"
InitialStep "auto"
FixedStep ".01"
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"
SaveFormat "Array"
LimitDataPoints off
MaxDataPoints "1000"
Decimation "1"
AlgebraicLoopMsg "warning"
MinStepSizeMsg "warning"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
InheritedTsInSrcMsg "warning"
SingleTaskRateTransMsg "none"
MultiTaskRateTransMsg "error"
IntegerOverflowMsg "warning"
CheckForMatrixSingularity "none"
UnnecessaryDatatypeConvMsg "none"
Int32ToFloatConvMsg "warning"
SignalLabelMismatchMsg "none"
LinearizationMsg "none"
VectorMatrixConversionMsg "none"
SfunCompatibilityCheckMsg "none"
BlockPriorityViolationMsg "warning"
ArrayBoundsChecking "none"
ConsistencyChecking "none"
ZeroCross on
Profile off
SimulationMode "normal"
RTWSystemTargetFile "grt.tlc"
RTWInlineParameters off
RTWRetainRTWFile off
RTWTemplateMakefile "grt_unix.tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
TLCProfiler off
TLCDebug off
TLCCoverage off
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
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 on
ExtModeLogAll on
OptimizeBlockIOStorage on
BufferReuse on
ParameterPooling on
BlockReductionOpt off
BooleanDataType 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 "slcp"
Location [324, 74, 829, 427]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
ReportName "simulink-default.rpt"
Block {
BlockType "S-Function"
Name "Animation"
Ports [1]
Position [380, 34, 435, 66]
FunctionName "animcp"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType SubSystem
Name "Cart & Pole\nDynamics"
Ports [1, 4]
Position [235, 150, 285, 205]
ShowPortLabels off
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "Cart & Pole"
MaskDescription "Inverted Pendulum (cart & pole)"
MaskHelp "Inverted Pendulum"
MaskPromptString "Initial Conditions (angle, angular velocity, ca"
"rt position and cart velocity):|Physical Specifications (pole length, pole ma"
"ss, cart mass and g):"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskInitialization "init_cond = @1; specs = @2;l=specs(1)/2;m=specs"
"(2);mc=specs(3);g=specs(4);"
MaskDisplay "plot(-4,-1,4,6,[0 3 2.8 -0.2 0],[1 5 5.15 1.15 "
"1],[-1 -1 1 1 -1],[1 0 0 1 1],[-3.5 3.5],[0 0])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "[0, 0, 0, 0]|[1.0, 0.1, 1.0, 9.8]"
System {
Name "Cart & Pole\nDynamics"
Location [134, 510, 934, 815]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "in_1"
Position [205, 60, 225, 80]
Port "1"
Interpolate on
}
Block {
BlockType Fcn
Name "Fcn1"
Position [350, 85, 390, 105]
ShowName off
Expr "(g*u(2)+u(3)*((-u(1)-m*l*u(4)*u(4)*u(2))/(m"
"c+m)))/(l*(4/3-(m*u(3)*u(3))/(mc+m)))"
}
Block {
BlockType Fcn
Name "Fcn2"
Position [450, 220, 490, 240]
ShowName off
Expr "(u(1)+m*l*(u(4)*u(4)*u(2)-u(5)*u(3)))/(mc+m"
")"
}
Block {
BlockType Fcn
Name "Fcn4"
Position [145, 89, 200, 111]
ShowName off
Expr "sin(u[1])"
}
Block {
BlockType Fcn
Name "Fcn5"
Position [145, 118, 200, 142]
ShowName off
Expr "cos(u[1])"
}
Block {
BlockType Mux
Name "Mux1"
Ports [4, 1]
Position [280, 65, 315, 120]
ShowName off
Inputs "4"
DisplayOption "none"
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1]
Position [400, 208, 430, 252]
ShowName off
Inputs "[4,1]"
DisplayOption "none"
}
Block {
BlockType Integrator
Name "theta"
Ports [1, 1]
Position [505, 85, 525, 105]
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "init_cond(1)"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Integrator
Name "theta dot"
Ports [1, 1]
Position [435, 85, 455, 105]
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "init_cond(2)"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Integrator
Name "x"
Ports [1, 1]
Position [570, 220, 590, 240]
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "init_cond(3)"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Integrator
Name "x dot"
Ports [1, 1]
Position [510, 220, 530, 240]
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "init_cond(4)"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Outport
Name "out_1"
Position [670, 85, 690, 105]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_2"
Position [675, 125, 695, 145]
Port "2"
OutputWhenDisabled "held"
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_3"
Position [675, 165, 695, 185]
Port "3"
OutputWhenDisabled "held"
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_4"
Position [675, 205, 695, 225]
Port "4"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "x"
SrcPort 1
Points [25, 0; 0, -55]
DstBlock "out_3"
DstPort 1
}
Line {
SrcBlock "x dot"
SrcPort 1
Points [0, 0]
Branch {
Points [15, 0; 0, -15]
DstBlock "out_4"
DstPort 1
}
Branch {
DstBlock "x"
DstPort 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -