📄 slbb.mdl
字号:
# $Revision: 1.10 $
Model {
Name "slbb"
Version 2.20
SimParamPage Solver
SampleTimeColors off
InvariantConstants off
WideVectorLines off
ShowLineWidths off
StartTime "0.0"
StopTime "1000"
Solver ode5
RelTol "1e-3"
AbsTol "1e-6"
Refine "1"
MaxStep "0.1"
InitialStep "auto"
FixedStep "0.1"
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
SimulationMode normal
RTWSystemTargetFile "grt.tlc"
RTWInlineParameters off
RTWPlaceOutputsASAP off
RTWRetainRTWFile off
RTWTemplateMakefile "grt_unix.tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
PreLoadFcn "initbb"
CloseFcn "AnimBbFigTitle = [winName, ': Ball & Beam Animation"
"']; AnimBbFigH = findobj(0,'Name',AnimBbFigTitle); close(AnimBbFigH)"
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 "slbb"
Location [400, 88, 938, 459]
Open on
ToolBar on
StatusBar on
ScreenColor white
PaperOrientation landscape
PaperPositionMode auto
PaperType usletter
PaperUnits inches
Block {
BlockType "S-Function"
Name "Animation"
Ports [1, 0, 0, 0, 0]
Position [440, 35, 490, 55]
FunctionName "animbb"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType SubSystem
Name "Ball-Beam Dynamics"
Ports [1, 4, 0, 0, 0]
Position [255, 139, 310, 196]
ShowPortLabels off
MaskType "Ball-Beam Dynamics"
MaskDescription "Ball-Beam Dynamics"
MaskHelp "Dynamics of the ball and beam system"
MaskPromptString "Initial Conditions:"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskInitialization "init_cond = @1;"
MaskDisplay "plot(-4,-1,4,5,[0 -1 1 0 3 2.9 -3 -2.9 0],[2 0 "
"0 2 3 3.1 1.1 1.0 2],0.3*cos(linspace(0,2*pi,9))+2,0.3*sin(linspace(0,2*pi,9)"
")+3.1);"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
MaskValueString "[0 0 0 0]"
System {
Name "Ball-Beam Dynamics"
Location [80, 483, 765, 993]
Open off
ToolBar off
StatusBar off
ScreenColor white
PaperOrientation landscape
PaperPositionMode auto
PaperType usletter
PaperUnits inches
Block {
BlockType Inport
Name "in_1"
Position [15, 360, 35, 380]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Gain
Name "Gain"
Position [85, 253, 150, 287]
Orientation left
Gain "-9.81"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Block {
BlockType Gain
Name "Gain1"
Position [90, 118, 150, 152]
Gain "0.7143"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1, 0, 0, 0]
Position [205, 175, 230, 195]
Orientation left
Inputs "2"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1, 0, 0, 0]
Position [100, 180, 120, 200]
Orientation left
Inputs "++"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Block {
BlockType Fcn
Name "sin(x3)"
Position [190, 257, 250, 283]
Orientation left
Expr "sin(u[1])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Block {
BlockType Integrator
Name "x1"
Ports [1, 1, 0, 0, 0]
Position [230, 75, 250, 95]
ExternalReset none
InitialConditionSource internal
InitialCondition "init_cond(1)"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Integrator
Name "x2"
Ports [1, 1, 0, 0, 0]
Position [230, 125, 250, 145]
ExternalReset none
InitialConditionSource internal
InitialCondition "init_cond(2)"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Integrator
Name "x3"
Ports [1, 1, 0, 0, 0]
Position [230, 310, 250, 330]
ExternalReset none
InitialConditionSource internal
InitialCondition "init_cond(3)"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Integrator
Name "x4"
Ports [1, 1, 0, 0, 0]
Position [230, 360, 250, 380]
ExternalReset none
InitialConditionSource internal
InitialCondition "init_cond(4)"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Fcn
Name "x4^2"
Position [275, 200, 315, 220]
Orientation left
Expr "u[1]^2"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Block {
BlockType Outport
Name "out_1"
Position [435, 150, 455, 170]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_2"
Position [435, 195, 455, 215]
Port "2"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_3"
Position [435, 240, 455, 260]
Port "3"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_4"
Position [435, 285, 455, 305]
Port "4"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "x4"
DstPort 1
}
Line {
SrcBlock "x2"
SrcPort 1
Points [35, 0]
Branch {
Points [80, 0; 0, 70]
DstBlock "out_2"
DstPort 1
}
Branch {
Points [0, -25; -110, 0; 0, -25]
DstBlock "x1"
DstPort 1
}
}
Line {
SrcBlock "x1"
SrcPort 1
Points [55, 0]
Branch {
Points [0, 95]
DstBlock "Product"
DstPort 1
}
Branch {
Points [80, 0; 0, 75]
DstBlock "out_1"
DstPort 1
}
}
Line {
SrcBlock "x4^2"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "sin(x3)"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -