📄 lugr.txt
字号:
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Fcn"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "angle"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [15, 0; 0, 150]
Branch {
Points [105, 0]
DstBlock "Mux1"
DstPort 3
}
Branch {
Points [0, 40]
DstBlock "speed"
DstPort 1
}
}
Line {
SrcBlock "Fcn"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Out1"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "F"
DstPort 1
}
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
}
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1, 0, 0, 0]
Position [560, 142, 595, 178]
Inputs "2"
DisplayOption "none"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1, 0, 0, 0]
Position [585, 39, 615, 106]
Inputs "2"
DisplayOption "none"
}
Block {
BlockType SubSystem
Name "PID \nController1"
Ports [1, 1, 0, 0, 0]
Position [175, 144, 215, 176]
ShowPortLabels off
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"
MaskInitialization "P=@1; I=@2; D=@3;"
MaskDisplay "disp('PID')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "20|0|5"
System {
Name "PID \nController1"
Location [10, 74, 372, 318]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "In_1"
Position [25, 65, 45, 85]
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Gain
Name "D"
Position [95, 129, 115, 151]
Gain "D"
SaturateOnIntegerOverflow on
}
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"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1, 0, 0, 0]
Position [245, 57, 265, 93]
IconShape "rectangular"
Inputs "+++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Out_1"
Position [290, 65, 310, 85]
Port "1"
OutputWhenDisabled "held"
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, 0, 0, 0, 0]
Position [650, 144, 680, 176]
Floating off
Location [182, 297, 693, 536]
Open on
NumInputPorts "1"
TickLabels "OneTimeTick"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "1 "
YMin "-200"
YMax "0"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "StructureWithTime"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1, 0, 0, 0, 0]
Position [650, 59, 680, 91]
Floating off
Location [190, 208, 637, 496]
Open on
NumInputPorts "1"
TickLabels "OneTimeTick"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "10"
YMin "-1"
YMax "1"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "StructureWithTime"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope2"
Ports [1, 0, 0, 0, 0]
Position [270, 94, 300, 126]
Floating off
Location [183, 118, 646, 398]
Open on
NumInputPorts "1"
TickLabels "OneTimeTick"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "1 "
YMin "-200"
YMax "0"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "StructureWithTime"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Position [40, 135, 70, 165]
WaveForm "sine"
Amplitude "0.1"
Frequency "0.10"
Units "Hertz"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1, 0, 0, 0]
Position [115, 142, 145, 173]
IconShape "rectangular"
Inputs "+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1, 0, 0, 0]
Position [325, 152, 355, 183]
IconShape "rectangular"
Inputs "+-"
SaturateOnIntegerOverflow on
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Integrator1"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Mux"
DstPort 2
}
Branch {
Points [0, 115; -450, 0; 0, -120]
DstBlock "Sum"
DstPort 2
}
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Integrator1"
DstPort 1
}
Branch {
Points [0, -80]
DstBlock "Mux1"
DstPort 2
}
}
Line {
SrcBlock "Lugre friction"
SrcPort 1
Points [5, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "PID \nController1"
DstPort 1
}
Line {
SrcBlock "PID \nController1"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 45]
DstBlock "Lugre friction"
DstPort 1
}
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "Scope2"
DstPort 1
}
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, -95; 405, 0]
Branch {
Points [0, 95]
DstBlock "Mux"
DstPort 1
}
Branch {
DstBlock "Derivative"
DstPort 1
}
}
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Scope1"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -