📄 c_ss_controller.mdl
字号:
Orientation "up"
Gain "L2(1:4)"
Multiplication "Matrix(K*u) (u vector)"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
SampleTime "Ts"
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1]
Position [640, 311, 645, 349]
Orientation "left"
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType DiscreteStateSpace
Name "Observer"
Position [490, 311, 600, 349]
Orientation "left"
A "Aobs"
B "Bobs"
C "Cobs"
D "Dobs"
SampleTime "Ts"
}
Block {
BlockType Sum
Name "Sum1"
Ports [3, 1]
Position [450, 145, 470, 165]
ShowName off
IconShape "round"
Inputs "+--"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [100, 145, 120, 165]
ShowName off
IconShape "round"
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "position error"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Outport
Name "U"
Position [755, 148, 785, 162]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "Observer"
DstPort 1
}
Line {
SrcBlock "Integral Gain"
SrcPort 1
Points [0, 0]
DstBlock "Discrete-Time\nIntegrator"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [195, 0]
Branch {
DstBlock "U"
DstPort 1
}
Branch {
Points [0, 165]
DstBlock "Mux2"
DstPort 1
}
}
Line {
SrcBlock "Ref"
SrcPort 1
Points [40, 0]
Branch {
DstBlock "Sum3"
DstPort 1
}
Branch {
DstBlock "Feed Forward"
DstPort 1
}
}
Line {
SrcBlock "L2"
SrcPort 1
DstBlock "Sum1"
DstPort 3
}
Line {
SrcBlock "Encoder"
SrcPort 1
Points [0, 0; 40, 0]
Branch {
Points [0, -20]
DstBlock "Sum3"
DstPort 2
}
Branch {
Points [0, 185; 560, 0; 0, -45]
DstBlock "Mux2"
DstPort 2
}
}
Line {
SrcBlock "Feed Forward"
SrcPort 1
Points [150, 0]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Discrete-Time\nIntegrator"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
Name "position error"
Labels [0, 0]
SrcBlock "Sum3"
SrcPort 1
DstBlock "Integral Gain"
DstPort 1
}
Line {
SrcBlock "Observer"
SrcPort 1
Points [-25, 0]
DstBlock "L2"
DstPort 1
}
Annotation {
Name "State Feedback Controller with Observer and"
" Feed Forward Gain"
Position [406, 29]
UseDisplayTextAsClickCallback off
FontSize 16
FontWeight "bold"
}
}
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 4]
Position [645, 86, 650, 124]
BackgroundColor "black"
ShowName off
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "Mechanics"
Ports [1, 4]
Position [455, 93, 540, 192]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Mechanics"
Location [505, 98, 1120, 605]
Open off
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"
Block {
BlockType Inport
Name "Vin"
Position [25, 48, 55, 62]
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Load"
Ports [2, 3]
Position [145, 298, 225, 372]
Orientation "left"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
Port {
PortNumber 2
Name "dth_l"
PropagatedSignals "dth_l"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
Port {
PortNumber 3
Name "th_l"
PropagatedSignals "th_l"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
System {
Name "Load"
Location [427, 425, 978, 763]
Open off
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"
Block {
BlockType Inport
Name "dth_m"
Position [260, 25, 290, 40]
Orientation "down"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "th_m"
Position [350, 105, 380, 120]
Orientation "down"
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Integrator
Name "Integrator3"
Ports [1, 1]
Position [210, 165, 240, 195]
IgnoreLimit off
Port {
PortNumber 1
Name "dth_l"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "Integrator4"
Ports [1, 1]
Position [300, 165, 330, 195]
IgnoreLimit off
Port {
PortNumber 1
Name "th_l"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Gain
Name "Load Damping"
Position [175, 233, 255, 267]
Orientation "left"
Gain "bl"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Rotor inertia1"
Position [115, 164, 160, 196]
Gain "1/Jl"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "ddth_l"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Gain
Name "Spring \nconstant"
Position [415, 135, 445, 165]
Gain "Ks"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "torque_k"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Gain
Name "Spring \ndamping"
Position [305, 70, 335, 100]
Gain "b"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "torque_b"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [265, 75, 285, 95]
ShowName off
IconShape "round"
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [355, 140, 375, 160]
ShowName off
IconShape "round"
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum5"
Ports [2, 1]
Position [490, 105, 510, 125]
ShowName off
IconShape "round"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum6"
Ports [2, 1]
Position [70, 170, 90, 190]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "c_torque"
Position [45, 118, 75, 132]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "dth_l"
Position [295, 243, 325, 257]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "th_l"
Position [480, 173, 510, 187]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "th_m"
SrcPort 1
DstBlock "Sum4"
DstPort 1
}
Line {
SrcBlock "dth_m"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Load Damping"
SrcPort 1
Points [-90, 0]
DstBlock "Sum6"
DstPort 2
}
Line {
SrcBlock "Sum6"
SrcPort 1
DstBlock "Rotor inertia1"
DstPort 1
}
Line {
SrcBlock "Sum5"
SrcPort 1
Points [10, 0; 0, 195; -495, 0; 0, -130]
Branch {
DstBlock "c_torque"
DstPort 1
}
Branch {
DstBlock "Sum6"
DstPort 1
}
}
Line {
Name "torque_k"
Labels [0, 0]
SrcBlock "Spring \nconstant"
SrcPort 1
Points [50, 0]
DstBlock "Sum5"
DstPort 2
}
Line {
Name "torque_b"
Labels [0, 0]
SrcBlock "Spring \ndamping"
SrcPort 1
Points [160, 0]
DstBlock "Sum5"
DstPort 1
}
Line {
SrcBlock "Sum4"
SrcPort 1
DstBlock "Spring \nconstant"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Spring \ndamping"
DstPort 1
}
Line {
Name "ddth_l"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -