📄 chap1_1.mdl
字号:
$PropName "ActiveConfigurationSet"
$ObjectID 1
}
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Derivative
LinearizePole "inf"
}
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
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
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 Scope
Floating off
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 "0"
}
Block {
BlockType SignalGenerator
WaveForm "sine"
TimeSource "Use simulation time"
Amplitude "1"
Frequency "1"
Units "Hertz"
VectorParams1D on
}
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"
}
Block {
BlockType TransferFcn
Numerator "[1]"
Denominator "[1 2 1]"
AbsoluteTolerance "auto"
Realization "auto"
}
}
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 "chap1_1"
Location [14, 82, 810, 563]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [540, 157, 575, 193]
Inputs "2"
}
Block {
BlockType SubSystem
Name "PID \nController"
Ports [1, 1]
Position [340, 154, 380, 186]
ShowPortLabels off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "PID Controller"
MaskDescription "Enter expressions for proportional, integral, a"
"nd derivative terms.\nP+I/s+Ds"
MaskHelp "This block implements a PID controller where pa"
"rameters are entered for the Proportional, Integral and Derivative terms. Unm"
"ask this block to see how it works. The derivative term is implemented using "
"a true derivative block."
MaskPromptString "Proportional:|Integral|Derivative:"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskInitialization "P=@1; I=@2; D=@3;"
MaskDisplay "disp('PID')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "60|1|3"
MaskTabNameString ",,"
System {
Name "PID \nController"
Location [14, 74, 376, 318]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In_1"
Position [25, 65, 45, 85]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Gain
Name "D"
Position [95, 129, 115, 151]
Gain "D"
}
Block {
BlockType Derivative
Name "Derivative"
Position [150, 128, 190, 152]
}
Block {
BlockType TransferFcn
Name "Integral"
Position [110, 57, 145, 93]
Numerator "[I]"
Denominator "[1 0]"
}
Block {
BlockType Gain
Name "Proportional"
Position [120, 13, 140, 37]
Gain "P"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [245, 57, 265, 93]
Inputs "+++"
}
Block {
BlockType Outport
Name "Out_1"
Position [290, 65, 310, 85]
IconDisplay "Port number"
InitialOutput "0"
}
Line {
SrcBlock "D"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out_1"
DstPort 1
}
Line {
SrcBlock "In_1"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 65]
DstBlock "D"
DstPort 1
}
Branch {
Points [15, 0]
Branch {
Points [0, -50]
DstBlock "Proportional"
DstPort 1
}
Branch {
DstBlock "Integral"
DstPort 1
}
}
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [20, 0; 0, -55]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Integral"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Proportional"
SrcPort 1
Points [65, 0; 0, 40]
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [605, 159, 635, 191]
Location [229, 247, 674, 486]
Open off
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "10"
YMin "-1"
YMax "1"
DataFormat "StructureWithTime"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Ports [0, 1]
Position [210, 145, 240, 175]
Frequency "0.2"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [275, 152, 305, 183]
Inputs "+-"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [410, 152, 485, 188]
Numerator "[133]"
Denominator "[1 25 0]"
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, -45; 245, 0; 0, 50]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "PID \nController"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
Points [15, 0; 0, 15]
Branch {
DstBlock "Mux"
DstPort 2
}
Branch {
Points [0, 55; -245, 0]
DstBlock "Sum"
DstPort 2
}
}
Line {
SrcBlock "PID \nController"
SrcPort 1
DstBlock "Transfer Fcn"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -