📄 bungee.mdl
字号:
Model {
Name "bungee"
Version 4.00
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovNameIncrementing off
CovHtmlReporting on
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
PreLoadFcn "a1=1;a2=1;k=20;m=90;g=10;"
Created "Fri Jul 14 11:19:43 2000"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "obas"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Fri Oct 20 14:05:46 2000"
ModelVersionFormat "1.%<AutoIncrement:9>"
ConfigurationManager "none"
SimParamPage "Solver"
StartTime "0.0"
StopTime "100"
SolverMode "Auto"
Solver "ode45"
RelTol "1e-3"
AbsTol "auto"
Refine "1"
MaxStep "auto"
MinStep "auto"
MaxNumMinSteps "-1"
InitialStep "auto"
FixedStep "auto"
MaxOrder 5
OutputOption "RefineOutputTimes"
OutputTimes "[]"
LoadExternalInput off
ExternalInput "[t, u]"
SaveTime on
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "yout"
LoadInitialState off
InitialState "xInitial"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
LimitDataPoints on
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_default_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 "MS Sans Serif"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "MS Sans Serif"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "MS Sans Serif"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "bungee"
Location [158, 74, 984, 603]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "122"
AutoZoom on
ReportName "simulink-default.rpt"
Block {
BlockType Constant
Name "Constant"
Position [15, 80, 45, 110]
FontName "Helvetica"
Value "m*g"
VectorParams1D on
}
Block {
BlockType Fcn
Name "Fcn"
Position [225, 280, 285, 310]
Orientation "left"
FontName "Helvetica"
Expr "a2*abs(u)*u"
}
Block {
BlockType Ground
Name "Ground"
Position [435, 365, 455, 385]
Orientation "left"
FontName "Helvetica"
}
Block {
BlockType Integrator
Name "Position"
Ports [1, 1]
Position [365, 120, 395, 150]
FontName "Helvetica"
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "-30"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
Port {
PortNumber 1
Name "x"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [535, 119, 565, 151]
FontName "Helvetica"
Floating off
Location [188, 365, 512, 604]
Open off
NumInputPorts "1"
TickLabels "OneTimeTick"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "StructureWithTime"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [4, 1]
Position [150, 84, 175, 181]
ShowName off
FontName "Helvetica"
IconShape "rectangular"
Inputs "++--"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [555, 212, 580, 323]
ShowName off
FontName "Helvetica"
IconShape "rectangular"
Inputs "+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Switch
Name "Switch"
Position [255, 350, 285, 380]
Orientation "left"
FontName "Helvetica"
Threshold "0"
}
Block {
BlockType Integrator
Name "Velocity"
Ports [1, 1]
Position [280, 120, 310, 150]
FontName "Helvetica"
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
Port {
PortNumber 1
Name "xdot"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
}
Block {
BlockType Gain
Name "air resistance"
Position [250, 215, 280, 245]
Orientation "left"
FontName "Helvetica"
Gain "a1"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Constant
Name "distance of \nend point to\nground"
Position [495, 225, 525, 255]
FontName "Helvetica"
Value "50"
VectorParams1D on
}
Block {
BlockType Gain
Name "mass"
Position [200, 119, 235, 151]
FontName "Helvetica"
Gain "1/m"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
Port {
PortNumber 1
Name "xddot"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
}
Block {
BlockType Scope
Name "realistic picture"
Ports [1]
Position [620, 254, 650, 286]
FontName "Helvetica"
Floating off
Location [188, 365, 512, 604]
Open on
NumInputPorts "1"
TickLabels "OneTimeTick"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData1"
DataFormat "StructureWithTime"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Gain
Name "spring constant"
Position [360, 313, 395, 347]
Orientation "left"
FontName "Helvetica"
Gain "-k"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Line {
Name "xddot"
FontName "MS Sans Serif"
FontSize 9
FontWeight "normal"
FontAngle "normal"
Labels [-1, 0]
SrcBlock "mass"
SrcPort 1
DstBlock "Velocity"
DstPort 1
}
Line {
Name "xdot"
FontName "MS Sans Serif"
FontSize 9
FontWeight "normal"
FontAngle "normal"
Labels [0, 0]
SrcBlock "Velocity"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Position"
DstPort 1
}
Branch {
Points [0, 95]
Branch {
DstBlock "air resistance"
DstPort 1
}
Branch {
Points [0, 65]
DstBlock "Fcn"
DstPort 1
}
}
}
Line {
Name "x"
FontName "MS Sans Serif"
FontSize 9
FontWeight "normal"
FontAngle "normal"
Labels [0, 0]
SrcBlock "Position"
SrcPort 1
Points [25, 0]
Branch {
Points [20, 0]
Branch {
DstBlock "Scope"
DstPort 1
}
Branch {
Points [0, 160]
DstBlock "Sum1"
DstPort 2
}
}
Branch {
Points [0, 195]
Branch {
Points [0, 35]
DstBlock "Switch"
DstPort 2
}
Branch {
DstBlock "spring constant"
DstPort 1
}
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "mass"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "air resistance"
SrcPort 1
Points [-110, 0]
DstBlock "Sum"
DstPort 4
}
Line {
SrcBlock "Fcn"
SrcPort 1
Points [-100, 0; 0, -150]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [-160, 0; 0, -245]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "distance of \nend point to\nground"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "realistic picture"
DstPort 1
}
Line {
SrcBlock "spring constant"
SrcPort 1
Points [-55, 0]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Ground"
SrcPort 1
DstBlock "Switch"
DstPort 3
}
Annotation {
Position [581, 442]
Text "Bungee jumping model\nm*xddot=mg+b(x)-a1*xdot-a"
"2*abs(xdot)*xdot\nb(x)=0 if x<=0, b(x)=-k(x) if x>0.\nk=5;a1=1;a2=1;m=90;g=10"
";\nx0=-30;\n(x is your distance from the end of the\nunstretched cord, measur"
"ed downwards.)\nExercise for simulating from command line:\nWrite a script so"
" that:\nGiven the height of the bridge, length of\nthe cord and yor weight, "
"find the safe\nspring constant k so that you stay alive!"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -