📄 bungee.mdl
字号:
GenerateASAP2 off
}
PropName "Components"
}
}
hdlcoderui.hdlcc {
$ObjectID 11
Description "HDL Coder custom configuration component"
Version "1.2.0"
Name "HDL Coder"
Array {
Type "Cell"
Dimension 1
Cell ""
PropName "HDLConfigFile"
}
HDLCActiveTab "0"
}
PropName "Components"
}
Name "Configuration"
CurrentDlgPage "Solver"
}
PropName "ConfigurationSets"
}
Simulink.ConfigSet {
$PropName "ActiveConfigurationSet"
$ObjectID 1
}
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Constant
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Fcn
Expr "sin(u[1])"
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 Ground
}
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
ContinuousStateAttributes "''"
}
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 Sum
IconShape "rectangular"
Inputs "++"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
UseDisplayTextAsClickCallback off
}
LineDefaults {
FontName "Arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "Bungee"
Location [2, 72, 1278, 748]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Sum
Name "Add"
Ports [4, 1]
Position [150, 82, 180, 183]
Inputs "++--"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Add1"
Ports [2, 1]
Position [510, 179, 535, 341]
Inputs "+-"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "Constant"
Position [45, 80, 75, 110]
Value "m*g"
}
Block {
BlockType Fcn
Name "Fcn"
Position [200, 275, 260, 305]
Orientation "left"
NamePlacement "alternate"
Expr "a2*abs(u)*u"
}
Block {
BlockType Gain
Name "Gain"
Position [225, 114, 255, 156]
Gain "1/m"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "xddot"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Ground
Name "Ground"
Position [455, 345, 475, 365]
Orientation "left"
}
Block {
BlockType Integrator
Name "Position"
Ports [1, 1]
Position [390, 120, 420, 150]
IgnoreLimit off
Port {
PortNumber 1
Name "x"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [505, 119, 535, 151]
Floating off
Location [188, 390, 512, 629]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Switch
Name "Switch"
Position [225, 330, 255, 360]
Orientation "left"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Integrator
Name "Velocity"
Ports [1, 1]
Position [305, 120, 335, 150]
IgnoreLimit off
Port {
PortNumber 1
Name "xdot"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Gain
Name "air resistance"
Position [220, 210, 250, 240]
Orientation "left"
Gain "a1"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "distance of \nend point to\n ground"
Position [450, 205, 480, 235]
Value "80"
}
Block {
BlockType Scope
Name "realistic picture"
Ports [1]
Position [585, 244, 615, 276]
Floating off
Location [188, 390, 512, 629]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Gain
Name "spring constant"
Position [345, 265, 375, 295]
Orientation "left"
Gain "-k"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Add"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
Name "xddot"
Labels [0, 0]
SrcBlock "Gain"
SrcPort 1
DstBlock "Velocity"
DstPort 1
}
Line {
Name "xdot"
Labels [0, 0]
SrcBlock "Velocity"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Position"
DstPort 1
}
Branch {
Points [0, 90; -50, 0]
Branch {
Points [0, 65]
DstBlock "Fcn"
DstPort 1
}
Branch {
DstBlock "air resistance"
DstPort 1
}
}
}
Line {
Name "x"
Labels [0, 0]
SrcBlock "Position"
SrcPort 1
Points [10, 0]
Branch {
Labels [1, 0]
DstBlock "Scope"
DstPort 1
}
Branch {
Points [0, 145]
Branch {
Points [0, 20]
Branch {
Points [0, 0]
DstBlock "Add1"
DstPort 2
}
Branch {
Points [0, 45]
DstBlock "Switch"
DstPort 2
}
}
Branch {
DstBlock "spring constant"
DstPort 1
}
}
}
Line {
SrcBlock "Add1"
SrcPort 1
DstBlock "realistic picture"
DstPort 1
}
Line {
SrcBlock "distance of \nend point to\n ground"
SrcPort 1
DstBlock "Add1"
DstPort 1
}
Line {
SrcBlock "air resistance"
SrcPort 1
Points [-90, 0; 0, -55]
DstBlock "Add"
DstPort 4
}
Line {
SrcBlock "Fcn"
SrcPort 1
Points [-80, 0; 0, -145]
DstBlock "Add"
DstPort 3
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [-120, 0; 0, -225]
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "Ground"
SrcPort 1
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "spring constant"
SrcPort 1
Points [-20, 0; 0, 55]
DstBlock "Switch"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -