📄 ssts__mass_spring_damping.mdl
字号:
Block {
BlockType Display
Format "short"
Decimation "10"
Floating off
SampleTime "-1"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Integrator
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
IgnoreLimit off
ZeroCross on
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType RandomNumber
Mean "0"
Variance "1"
Seed "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType Scope
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "-1"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "SSTS__mass_spring_damping"
Location [2, 74, 998, 744]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "Band-Limited\nWhite Noise"
Ports [0, 1]
Position [40, 325, 70, 355]
SourceBlock "simulink/Sources/Band-Limited\nWhite Noise"
SourceType "Band-Limited White Noise."
ShowPortLabels on
Cov "[0.1]"
Ts "0.1"
seed "[23341]"
VectorParams1D on
}
Block {
BlockType Clock
Name "Clock"
Position [650, 120, 670, 140]
Decimation "10"
}
Block {
BlockType Display
Name "Display"
Ports [1]
Position [655, 325, 745, 355]
Decimation "1"
Lockdown off
}
Block {
BlockType Display
Name "Display1"
Ports [1]
Position [770, 675, 860, 705]
Decimation "1"
Lockdown off
}
Block {
BlockType Display
Name "Display2"
Ports [1]
Position [880, 1080, 970, 1110]
Decimation "1"
Lockdown off
}
Block {
BlockType SubSystem
Name "Mass_Spring_Damping"
Ports [1, 1]
Position [235, 237, 535, 443]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskDescription "Input : Force\nOutput: Displacement\n\nm -- m"
"ass\nc -- damping coefficient\nk -- stiffness\n\nm*acceleration + c*velocity "
"+ k*displacement = force"
MaskPromptString "Mass|Stiffness|Damping Coefficient"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "m=@1;k=@2;c=@3;"
MaskDisplay "image(imread('SSTS__tether_MMET_III_spring_damp"
"er_mass.jpg'));"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "10|10|0.5"
MaskTabNameString ",,"
System {
Name "Mass_Spring_Damping"
Location [2, 70, 1022, 748]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [435, 253, 465, 267]
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [440, 432, 470, 463]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Clock
Name "Clock"
Position [670, 145, 690, 165]
Decimation "10"
}
Block {
BlockType Gain
Name "Damping coefficient Gain"
Position [280, 370, 310, 400]
Gain "c"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Divide"
Ports [2, 1]
Position [680, 437, 710, 468]
Inputs "*/"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Subtract"
Ports [2, 1]
Position [610, 427, 640, 458]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Display
Name "Timer"
Ports [1]
Position [735, 140, 825, 170]
Decimation "1"
Lockdown off
}
Block {
BlockType Integrator
Name "acc Integrator"
Ports [1, 1]
Position [115, 440, 145, 470]
IgnoreLimit off
}
Block {
BlockType Gain
Name "k stiffness Gain"
Position [340, 440, 370, 470]
Gain "k"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "mass"
Position [465, 510, 495, 540]
Value "m"
}
Block {
BlockType Integrator
Name "vel Integrator"
Ports [1, 1]
Position [260, 440, 290, 470]
IgnoreLimit off
}
Block {
BlockType Outport
Name "Out1"
Position [655, 603, 685, 617]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "vel Integrator"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "k stiffness Gain"
DstPort 1
}
Branch {
Points [0, 155]
DstBlock "Out1"
DstPort 1
}
}
Line {
SrcBlock "acc Integrator"
SrcPort 1
Points [0, 0; 30, 0]
Branch {
DstBlock "vel Integrator"
DstPort 1
}
Branch {
Points [0, -70]
DstBlock "Damping coefficient Gain"
DstPort 1
}
}
Line {
SrcBlock "k stiffness Gain"
SrcPort 1
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "Damping coefficient Gain"
SrcPort 1
Points [75, 0; 0, 55]
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Add"
SrcPort 1
Points [0, 0]
DstBlock "Subtract"
DstPort 2
}
Line {
SrcBlock "Subtract"
SrcPort 1
DstBlock "Divide"
DstPort 1
}
Line {
SrcBlock "mass"
SrcPort 1
Points [155, 0; 0, -65]
DstBlock "Divide"
DstPort 2
}
Line {
SrcBlock "Divide"
SrcPort 1
Points [30, 0; 0, -130; -705, 0; 0, 130]
DstBlock "acc Integrator"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [90, 0; 0, 175]
DstBlock "Subtract"
DstPort 1
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "Timer"
DstPort 1
}
Annotation {
Name "dx/dt"
Position [222, 444]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "x"
Position [316, 448]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "d(dx/dt)/dt"
Position [72, 444]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "kx"
Position [417, 465]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "c(dx/dt)"
Position [345, 378]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "F"
Position [573, 422]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -