📄 c9mbbr4.mdl
字号:
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData1"
DataFormat "StructureWithTime"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "-1"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Ports [0, 1]
Position [170, 119, 205, 171]
ShowName off
FontName "Times New Roman"
FontSize 12
WaveForm "square"
Amplitude "1"
Frequency "0.05"
Units "Hertz"
VectorParams1D on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [330, 135, 350, 155]
ShowName off
FontName "Times New Roman"
FontSize 12
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [445, 135, 465, 155]
ShowName off
FontName "Times New Roman"
FontSize 12
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [595, 135, 615, 155]
ShowName off
FontName "Times New Roman"
FontSize 12
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Sum
Name "Sum3"
Ports [3, 1]
Position [725, 135, 745, 155]
ShowName off
FontName "Times New Roman"
FontSize 12
IconShape "round"
Inputs "++-"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [860, 215, 920, 245]
ShowName off
FontName "Times New Roman"
FontSize 12
VariableName "simout"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Structure"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [180, 305, 240, 335]
Orientation "left"
ShowName off
FontName "Times New Roman"
FontSize 12
VariableName "simout1"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType TransferFcn
Name "filter2"
Position [380, 307, 440, 343]
Orientation "left"
ShowName off
FontName "Times New Roman"
FontSize 12
Numerator "[50]"
Denominator "[1 50]"
AbsoluteTolerance "auto"
Realization "auto"
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
DstBlock "Command \nin \ncentimeters"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Outer Loop Kp"
DstPort 1
}
Line {
SrcBlock "Outer Loop Kp"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Derivative\nw/ filter"
SrcPort 1
DstBlock "Outer Loop Kd"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Aplha to Theta"
DstPort 1
}
Line {
SrcBlock "Aplha to Theta"
SrcPort 1
DstBlock "Must \nOpertate\nin Linear\nRegion"
DstPort 1
}
Line {
SrcBlock "Command \nin \ncentimeters"
SrcPort 1
DstBlock "Physical\nLimitation\nof Beam"
DstPort 1
}
Line {
SrcBlock "filter2"
SrcPort 1
DstBlock "Calibrate Postion \nto read in centimeters\n(-2"
"0 to 20) "
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Kp\n"
DstPort 1
}
Branch {
DstBlock "Kp\n1"
DstPort 1
}
}
Line {
SrcBlock "Kp\n"
SrcPort 1
DstBlock "Sum3"
DstPort 2
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [5, 0]
DstBlock "Sum3"
DstPort 1
}
Line {
SrcBlock "Kp\n1"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Must \nOpertate\nin Linear\nRegion"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Sum3"
SrcPort 1
DstBlock "Cable Gain\nPre-Compensation"
DstPort 1
}
Line {
SrcBlock "Cable Gain\nPre-Compensation"
SrcPort 1
Points [0, 0]
Branch {
Points [0, -50]
DstBlock "Scope1"
DstPort 1
}
Branch {
Points [5, 0]
Branch {
Points [0, 0; 0, 85]
DstBlock "To Workspace"
DstPort 1
}
Branch {
DstBlock "Analog Output To Amplifier\nDriving the Mot"
"or"
DstPort 1
}
}
}
Line {
SrcBlock "Encoder Input"
SrcPort 1
DstBlock "Conversion to Radians"
DstPort 1
}
Line {
SrcBlock "Conversion to Radians"
SrcPort 1
Points [0, 0; -10, 0]
Branch {
Points [-130, 0]
DstBlock "Sum2"
DstPort 2
}
Branch {
DstBlock "Derivative\nw/ filter1"
DstPort 1
}
}
Line {
SrcBlock "Outer Loop Kd1"
SrcPort 1
DstBlock "Sum3"
DstPort 3
}
Line {
SrcBlock "Derivative\nw/ filter1"
SrcPort 1
DstBlock "Outer Loop Kd1"
DstPort 1
}
Line {
SrcBlock "Outer Loop Kd"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Ball Sensor Input"
SrcPort 1
DstBlock "filter2"
DstPort 1
}
Line {
SrcBlock "Physical\nLimitation\nof Beam"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Calibrate Postion \nto read in centimeters\n(-2"
"0 to 20) "
SrcPort 1
Points [-10, 0; 0, -5]
Branch {
Points [0, -40]
Branch {
Points [0, -25]
Branch {
Points [0, -50; 55, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "Scope"
DstPort 1
}
}
Branch {
Points [0, 0]
DstBlock "Derivative\nw/ filter"
DstPort 1
}
}
Branch {
DstBlock "To Workspace1"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -