📄 servo_demo1.mdl
字号:
}
Branch {
Points [0, 160]
DstBlock "Relational\nOperator1"
DstPort 1
}
}
Line {
SrcBlock "e1"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Relational\nOperator2"
DstPort 1
}
Branch {
Points [0, 180]
DstBlock "Relational\nOperator3"
DstPort 1
}
}
}
}
Block {
BlockType ZeroOrderHold
Name "sampled\nerror"
Position [150, 30, 180, 60]
SampleTime "0.02"
}
Block {
BlockType Outport
Name "duty cycle"
Position [775, 68, 805, 82]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "sampled\nerror"
SrcPort 1
DstBlock "loop\ngain"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "sampled\nerror"
DstPort 1
}
Line {
SrcBlock "Constant5"
SrcPort 1
Points [0, -5]
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "integral\ngain"
DstPort 1
}
Line {
SrcBlock "prevent\nwindup"
SrcPort 1
Points [20, 0; 0, 55; -535, 0; 0, -125]
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "integral\ngain"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Sum"
DstPort 2
}
Branch {
Points [0, 35; -125, 0; 0, -30]
DstBlock "Sum2"
DstPort 2
}
}
Line {
SrcBlock "set point"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "feedback"
SrcPort 1
Points [0, -50]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "loop\ngain"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 40]
Branch {
Points [0, 90]
DstBlock "prevent\nwindup"
DstPort 2
}
Branch {
DstBlock "Switch"
DstPort 1
}
}
Branch {
DstBlock "Sum"
DstPort 1
}
}
Line {
SrcBlock "Saturation"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "duty cycle"
DstPort 1
}
Branch {
DstBlock "prevent\nwindup"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Annotation {
Name "proportional + integral control"
Position [447, 60]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "controller"
Position [414, 249]
UseDisplayTextAsClickCallback off
FontName "Arial"
FontSize 16
FontWeight "bold"
}
}
}
Block {
BlockType Reference
Name "Desired Response for \nPiston Position"
Ports [1]
Position [685, 275, 775, 345]
BackgroundColor "green"
DropShadow on
SourceBlock "srolib/Signal Constraint"
SourceType "Signal Constraint"
ShowPortLabels on
DialogPosition "[0.031875 0.296666666666667 0.3725 0.2758333333"
"33333]"
SaveIn "workspace"
SaveAs "servo_optim"
LogID "SRO_DataLog_1"
}
Block {
BlockType Gain
Name "Gain1"
Position [405, 87, 445, 123]
ShowName off
Gain "Ao"
}
Block {
BlockType HitCross
Name "Hit \nCrossing"
Ports [1]
Position [250, 186, 280, 214]
ShowName off
HitCrossingOffset "[0, Ipull, (Ihold + deltai), (Ihold - deltai)]"
HitCrossingDirection "either"
ShowOutputPort off
}
Block {
BlockType SubSystem
Name "Magnetic\nCircuit"
Ports [2, 2]
Position [355, 123, 430, 172]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Magnetic\nCircuit"
Location [129, 298, 973, 648]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "vsol"
Position [15, 93, 45, 107]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "x"
Position [15, 203, 45, 217]
Port "2"
IconDisplay "Port number"
Port {
PortNumber 1
Name "armature position"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Gain
Name "Gain"
Position [190, 100, 220, 130]
ShowName off
Gain "1/N"
}
Block {
BlockType Gain
Name "Gain1"
Position [80, 110, 110, 140]
ShowName off
Gain "R"
}
Block {
BlockType Gain
Name "Gain6"
Position [490, 132, 535, 168]
ShowName off
Gain "1/mu0"
}
Block {
BlockType Lookup2D
Name "H vs. B"
Position [425, 67, 455, 98]
RowIndex "Bvalues"
ColumnIndex "[-1 1]"
OutputValues "Hdata'"
}
Block {
BlockType Memory
Name "Memory"
Position [325, 150, 355, 180]
ShowName off
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [550, 22, 580, 53]
ShowName off
}
Block {
BlockType Signum
Name "Sign"
Position [255, 149, 290, 181]
ShowName off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [135, 88, 170, 137]
ShowName off
Inputs "+-"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [210, 187, 240, 218]
ShowName off
Inputs "+-"
}
Block {
BlockType Product
Name "air mmf"
Ports [2, 1]
Position [570, 142, 600, 173]
}
Block {
BlockType Gain
Name "current"
Position [690, 82, 730, 118]
Gain "1/N"
}
Block {
BlockType Constant
Name "equiv. series gap"
Position [410, 179, 445, 201]
NamePlacement "alternate"
Value "gser"
}
Block {
BlockType Integrator
Name "flux"
Ports [1, 1]
Position [255, 100, 285, 130]
NamePlacement "alternate"
LowerSaturationLimit "0"
IgnoreLimit off
}
Block {
BlockType Gain
Name "flux\ndensity"
Position [315, 96, 355, 134]
NamePlacement "alternate"
Gain "1/A"
}
Block {
BlockType Gain
Name "force"
Position [615, 18, 690, 62]
NamePlacement "alternate"
Gain "0.5*A/mu0"
}
Block {
BlockType Constant
Name "gap at\nx = 0"
Position [145, 185, 185, 205]
NamePlacement "alternate"
Value "gmax"
}
Block {
BlockType Sum
Name "net air gap"
Ports [2, 1]
Position [475, 182, 505, 213]
}
Block {
BlockType Sum
Name "overall\nmmf"
Ports [2, 1]
Position [635, 71, 660, 124]
}
Block {
BlockType Gain
Name "steel mmf"
Position [520, 68, 565, 102]
Gain "Lsteel"
}
Block {
BlockType Outport
Name "Fsol"
Position [785, 33, 815, 47]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Block {
BlockType Outport
Name "isol"
Position [785, 93, 815, 107]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
Name "armature position"
Labels [1, 1]
SrcBlock "x"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "gap at\nx = 0"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "net air gap"
DstPort 2
}
Line {
SrcBlock "equiv. series gap"
SrcPort 1
DstBlock "net air gap"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "vsol"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "net air gap"
SrcPort 1
Points [30, 0; 0, -35]
DstBlock "air mmf"
DstPort 2
}
Line {
SrcBlock "current"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "isol"
DstPort 1
}
Branch {
Points [0, 135; -685, 0; 0, -110]
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "flux\ndensity"
SrcPort 1
Points [0, 0]
Branch {
Points [0, -40]
DstBlock "H vs. B"
DstPort 1
}
Branch {
Points [0, -40]
Branch {
Points [0, 40; 75, 0; 0, 35]
DstBlock "Gain6"
DstPort 1
}
Branch {
Points [0, -45; 155, 0]
Branch {
Points [0, 15]
DstBlock "Product"
DstPort 2
}
Branch {
DstBlock "Product"
DstPort 1
}
}
}
}
Line {
SrcBlock "overall\nmmf"
SrcPort 1
DstBlock "current"
DstPort 1
}
Line {
SrcBlock "air mmf"
SrcPort 1
Points [10, 0; 0, -50]
DstBlock "overall\nmmf"
DstPort 2
}
Line {
SrcBlock "steel mmf"
SrcPort 1
DstBlock "overall\nmmf"
DstPort 1
}
Line {
SrcBlock "H vs. B"
SrcPort 1
DstBlock "steel mmf"
DstPort 1
}
Line {
SrcBlock "Gain6"
SrcPort 1
DstBlock "air mmf"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "flux"
DstPort 1
}
Branch {
Points [0, 50]
DstBlock "Sign"
DstPort 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -