📄 predball.mdl
字号:
Value "Normalize"
}
Block {
BlockType DiscreteStateSpace
Name "Discrete State-Space1"
Position [255, 211, 365, 249]
A "[zeros(1,Ni-1);eye(Ni-2,Ni-1)] %0 %[0 0"
";1 0]"
B "eye(Ni-1,1) %1 %[1;0]"
C "[zeros(1,Ni-1);eye(Ni-1,Ni-1)] %[0;1] %"
"[1 0;0 1]"
D "eye(Ni,1) %[1;0] %[0;0]"
SampleTime "Ts"
}
Block {
BlockType DiscreteStateSpace
Name "Discrete State-Space2"
Position [260, 66, 370, 104]
A "[zeros(1,Nj-1);eye(Nj-2,Nj-1)] %0 %[0 0"
";1 0]"
B "eye(Nj-1,1) %1 %[1;0]"
C "[zeros(1,Nj-1);eye(Nj-1,Nj-1)] %[0;1] %"
"[1 0;0 1]"
D "eye(Nj,1) %[1;0] %[0;0]"
SampleTime "Ts"
}
Block {
BlockType Fcn
Name "Fcn"
Position [135, 220, 170, 250]
Expr "(u(1)-minp)*2/(maxp-minp) - 1"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [95, 70, 130, 100]
Expr "(u(1)-mint)*2/(maxt-mint) - 1"
}
Block {
BlockType Fcn
Name "Fcn2"
Position [710, 225, 745, 255]
Expr "(maxt-mint)*(u(1)+1)/2 + mint"
}
Block {
BlockType Reference
Name "Matrix\nGain"
Ports [1, 1]
Position [395, 215, 425, 245]
SourceBlock "simulink3/Math/Matrix\nGain"
SourceType "Matrix Gain"
K "IW"
}
Block {
BlockType Reference
Name "Matrix\nGain1"
Ports [1, 1]
Position [390, 70, 420, 100]
SourceBlock "simulink3/Math/Matrix\nGain"
SourceType "Matrix Gain"
K "LW1_2"
}
Block {
BlockType Reference
Name "Matrix\nGain2"
Ports [1, 1]
Position [560, 215, 590, 245]
SourceBlock "simulink3/Math/Matrix\nGain"
SourceType "Matrix Gain"
K "LW2_1"
}
Block {
BlockType Switch
Name "Switch"
Position [200, 270, 230, 300]
Threshold "0.5"
}
Block {
BlockType Switch
Name "Switch1"
Position [160, 145, 190, 175]
Threshold "0.5"
}
Block {
BlockType Switch
Name "Switch2"
Position [835, 255, 865, 285]
Threshold "0.5"
}
Block {
BlockType UnitDelay
Name "Unit Delay1"
Position [210, 70, 240, 100]
SampleTime "Ts"
}
Block {
BlockType SubSystem
Name "netsum"
Ports [3, 1]
Position [450, 209, 475, 251]
TreatAsAtomicUnit off
MaskDisplay "disp('+')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "netsum"
Location [320, 85, 820, 386]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [20, 50, 40, 70]
}
Block {
BlockType Inport
Name "In2"
Position [20, 90, 40, 110]
Port "2"
}
Block {
BlockType Inport
Name "In3"
Position [20, 130, 40, 150]
Port "3"
}
Block {
BlockType Sum
Name "netsum"
Ports [3, 1]
Position [90, 59, 115, 101]
Inputs "3"
}
Block {
BlockType Outport
Name "Out1"
Position [145, 80, 165, 100]
}
Line {
SrcBlock "netsum"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In3"
SrcPort 1
DstBlock "netsum"
DstPort 3
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "netsum"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "netsum"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "netsum1"
Ports [2, 1]
Position [620, 220, 645, 255]
TreatAsAtomicUnit off
MaskDisplay "disp('+')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "netsum1"
Location [320, 85, 820, 386]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [20, 65, 40, 85]
}
Block {
BlockType Inport
Name "In2"
Position [20, 105, 40, 125]
Port "2"
}
Block {
BlockType Sum
Name "netsum1"
Ports [2, 1]
Position [90, 60, 115, 95]
Inputs "2"
}
Block {
BlockType Outport
Name "Out1"
Position [145, 80, 165, 100]
}
Line {
SrcBlock "netsum1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "netsum1"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "netsum1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "purelin"
Ports [1, 1]
Position [660, 228, 685, 252]
TreatAsAtomicUnit off
MaskDisplay "plot([-1 1],[0 0],[-1 1],[-1 1])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "purelin"
Location [144, 218, 404, 300]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "n"
Position [25, 33, 55, 47]
}
Block {
BlockType Outport
Name "a"
Position [205, 33, 235, 47]
}
Line {
SrcBlock "n"
SrcPort 1
DstBlock "a"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "tansig"
Ports [1, 1]
Position [500, 218, 525, 242]
TreatAsAtomicUnit off
MaskDisplay "plot([-1 1],[0 0],[-1 -.9 -.8 -.7 -.6 -"
".5 -.4 -.3 -.2 -.1 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1],2./(1+exp(-8*[-1 -.9 -.8 -"
".7 -.6 -.5 -.4 -.3 -.2 -.1 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1]))-1)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "tansig"
Location [0, 38, 640, 480]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "n"
Position [25, 33, 55, 47]
}
Block {
BlockType Math
Name "Exp"
Ports [1, 1]
Position [155, 25, 185, 55]
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Gain
Name "Gain"
Position [90, 25, 120, 55]
Gain "-2"
}
Block {
BlockType Gain
Name "Gain1"
Position [370, 30, 400, 60]
Gain "2"
}
Block {
BlockType Math
Name "Reciprocal"
Ports [1, 1]
Position [295, 30, 325, 60]
Operator "reciprocal"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [225, 27, 255, 58]
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [445, 27, 475, 58]
Inputs "+-"
}
Block {
BlockType Constant
Name "one"
Position [160, 85, 180, 105]
}
Block {
BlockType Constant
Name "one1"
Position [375, 85, 395, 105]
}
Block {
BlockType Outport
Name "a"
Position [515, 38, 545, 52]
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "a"
DstPort 1
}
Line {
SrcBlock "one1"
SrcPort 1
Points [30, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [25, 0]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Reciprocal"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Reciprocal"
DstPort 1
}
Line {
SrcBlock "one"
SrcPort 1
Points [25, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Exp"
SrcPort 1
Points [20, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Exp"
DstPort 1
}
Line {
SrcBlock "n"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "yhat"
Position [885, 263, 915, 277]
}
Block {
BlockType Outport
Name "yhat1"
Position [585, 153, 615, 167]
Port "2"
}
Line {
SrcBlock "purelin"
SrcPort 1
Points [0, 0]
Branch {
Points [0, 40]
DstBlock "Switch2"
DstPort 3
}
Branch {
DstBlock "Fcn2"
DstPort 1
}
}
Line {
SrcBlock "Fcn2"
SrcPort 1
Points [70, 0]
DstBlock "Switch2"
DstPort 1
}
Line {
SrcBlock "Switch2"
SrcPort 1
DstBlock "yhat"
DstPort 1
}
Line {
SrcBlock "Constant4"
SrcPort 1
Points [15, 0]
DstBlock "Switch2"
DstPort 2
}
Line {
SrcBlock "y"
SrcPort 1
Points [10, 0]
Branch {
Points [0, 110; 75, 0]
DstBlock "Switch1"
DstPort 3
}
Branch {
DstBlock "Fcn1"
DstPort 1
}
}
Line {
SrcBlock "Fcn1"
SrcPort 1
Points [10, 0]
DstBlock "Switch1"
DstPort 1
}
Line {
SrcBlock "Switch1"
SrcPort 1
DstBlock "Unit Delay1"
DstPort 1
}
Line {
SrcBlock "Constant3"
SrcPort 1
Points [15, 0]
DstBlock "Switch1"
DstPort 2
}
Line {
SrcBlock "Unit Delay1"
SrcPort 1
DstBlock "Discrete State-Space2"
DstPort 1
}
Line {
SrcBlock "Discrete State-Space2"
SrcPort 1
DstBlock "Matrix\nGain1"
DstPort 1
}
Line {
SrcBlock "Constant2"
SrcPort 1
Points [25, 0]
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "u"
SrcPort 1
Points [5, 0]
Branch {
Points [0, 110; 70, 0]
DstBlock "Switch"
DstPort 3
}
Branch {
Points [5, 0]
DstBlock "Fcn"
DstPort 1
}
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [5, 0]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -