📄 realpidcasx.mdl
字号:
Block {
BlockType Outport
Name "Out1"
Position [315, 78, 345, 92]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
DstBlock "Pdelay"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
DstBlock "Pdelay1"
DstPort 1
}
Line {
SrcBlock "Pdelay"
SrcPort 1
DstBlock "Sum5"
DstPort 1
}
Line {
SrcBlock "Pdelay1"
SrcPort 1
DstBlock "Sum5"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Transfer Fcn1"
DstPort 1
}
Branch {
DstBlock "Transfer Fcn"
DstPort 1
}
}
Line {
SrcBlock "Sum5"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Realizable PID controller"
Ports [1, 1, 0, 0, 0]
Position [290, 103, 380, 147]
ShowPortLabels on
System {
Name "Realizable PID controller"
Location [72, 73, 467, 296]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "In1"
Position [25, 98, 55, 112]
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Gain
Name "Gain"
Position [80, 90, 110, 120]
Gain "K"
SaturateOnIntegerOverflow on
}
Block {
BlockType Saturate
Name "Saturation"
Position [205, 98, 235, 122]
UpperLimit "Satub"
LowerLimit "Satlb"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1, 0, 0, 0]
Position [155, 100, 175, 120]
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1, 0, 0, 0]
Position [295, 90, 315, 110]
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [180, 160, 235, 200]
Orientation "left"
NamePlacement "alternate"
Numerator "[1]"
Denominator "[TauI 1]"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn2"
Position [175, 27, 255, 73]
Numerator "[TauD 0]"
Denominator "[0.05*TauD 1]"
}
Block {
BlockType Outport
Name "Out1"
Position [340, 93, 370, 107]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
Points [-35, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [0, -55]
DstBlock "Transfer Fcn2"
DstPort 1
}
}
Line {
SrcBlock "Saturation"
SrcPort 1
Points [0, -5; 15, 0]
Branch {
Points [10, 0; 0, 75]
DstBlock "Transfer Fcn1"
DstPort 1
}
Branch {
DstBlock "Sum3"
DstPort 2
}
}
Line {
SrcBlock "Transfer Fcn2"
SrcPort 1
Points [20, 0]
DstBlock "Sum3"
DstPort 1
}
Line {
SrcBlock "Sum3"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Annotation {
Position [217, 122]
VerticalAlignment "top"
Text "Md\n"
}
}
}
Block {
BlockType SubSystem
Name "Realizable PID controller1"
Ports [1, 1, 0, 0, 0]
Position [75, 98, 140, 142]
ShowPortLabels on
System {
Name "Realizable PID controller1"
Location [181, 122, 576, 345]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "In1"
Position [25, 93, 55, 107]
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Gain
Name "Gain"
Position [80, 85, 110, 115]
Gain "K1"
SaturateOnIntegerOverflow on
}
Block {
BlockType Saturate
Name "Saturation"
Position [200, 93, 230, 117]
UpperLimit "Satub"
LowerLimit "Satlb"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1, 0, 0, 0]
Position [160, 95, 180, 115]
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1, 0, 0, 0]
Position [290, 90, 310, 110]
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [180, 160, 235, 200]
Orientation "left"
NamePlacement "alternate"
Numerator "[1]"
Denominator "[TauI1 1]"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn2"
Position [175, 27, 255, 73]
Numerator "[TauD1 0]"
Denominator "[0.05*TauD1 1]"
}
Block {
BlockType Outport
Name "Out1"
Position [340, 93, 370, 107]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
Points [-30, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Transfer Fcn2"
SrcPort 1
Points [15, 0]
DstBlock "Sum3"
DstPort 1
}
Line {
SrcBlock "Sum3"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "Transfer Fcn2"
DstPort 1
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Saturation"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Sum3"
DstPort 2
}
Branch {
Points [0, 75]
DstBlock "Transfer Fcn1"
DstPort 1
}
}
}
}
Block {
BlockType Saturate
Name "Saturation"
Position [400, 113, 430, 137]
UpperLimit "Satub"
LowerLimit "Satlb"
}
Block {
BlockType Scope
Name "Scope"
Ports [1, 0, 0, 0, 0]
Position [765, 115, 795, 145]
Floating off
Location [243, 297, 858, 658]
Open off
NumInputPorts "1"
TickLabels "on"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "Matrix"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1, 0, 0, 0, 0]
Position [375, 50, 405, 80]
Orientation "left"
Floating off
Location [188, 365, 512, 604]
Open off
NumInputPorts "1"
TickLabels "on"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "Matrix"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Step
Name "Step Input"
Position [45, 55, 65, 75]
Orientation "left"
Time "0"
Before "0"
After "Setpoint"
SampleTime "0"
}
Block {
BlockType Step
Name "Step Input1"
Position [490, 45, 510, 65]
Time "0"
Before "0"
After "Disturb"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1, 0, 0, 0]
Position [255, 115, 275, 135]
IconShape "rectangular"
Inputs "+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1, 0, 0, 0]
Position [35, 110, 55, 130]
IconShape "rectangular"
Inputs "+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1, 0, 0, 0]
Position [560, 110, 580, 130]
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [770, 50, 830, 80]
VariableName "simout"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [475, 170, 535, 200]
VariableName "effort"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType TransferFcn
Name "q2 invert"
Position [165, 102, 225, 138]
Numerator "conv(denCs2,Qdden)"
Denominator "conv(numCs2,Qdden)"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Realizable PID controller"
DstPort 1
}
Line {
SrcBlock "Multi_tf Process2"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Step Input1"
SrcPort 1
Points [30, 0]
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Realizable PID controller"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Saturation"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "To Workspace1"
DstPort 1
}
Branch {
Points [0, 0]
Branch {
DstBlock "Multi_tf Process2"
DstPort 1
}
Branch {
DstBlock "Scope1"
DstPort 1
}
}
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [0, 0]
Branch {
Points [0, 105; -345, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "Multi_tf Process1"
DstPort 1
}
}
Line {
SrcBlock "Step Input"
SrcPort 1
Points [-20, 0]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Realizable PID controller1"
SrcPort 1
DstBlock "q2 invert"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Realizable PID controller1"
DstPort 1
}
Line {
SrcBlock "q2 invert"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Multi_tf Process1"
SrcPort 1
Points [20, 0]
Branch {
Points [0, 130; -695, 0]
DstBlock "Sum1"
DstPort 2
}
Branch {
DstBlock "To Workspace"
DstPort 1
}
Branch {
DstBlock "Scope"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -