📄 servo_demo1.mdl
字号:
}
}
Line {
SrcBlock "Memory"
SrcPort 1
Points [35, 0; 0, -75]
DstBlock "H vs. B"
DstPort 2
}
Line {
SrcBlock "flux"
SrcPort 1
DstBlock "flux\ndensity"
DstPort 1
}
Line {
SrcBlock "force"
SrcPort 1
DstBlock "Fsol"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "force"
DstPort 1
}
Line {
SrcBlock "Sign"
SrcPort 1
DstBlock "Memory"
DstPort 1
}
Annotation {
Name "magnetic circuit"
Position [374, 289]
UseDisplayTextAsClickCallback off
FontName "Arial"
FontSize 16
FontWeight "bold"
}
}
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [900, 57, 905, 93]
BackgroundColor "black"
ShowName off
Inputs "2"
}
Block {
BlockType SubSystem
Name "PWM_driver_ckt"
Ports [2, 1]
Position [230, 106, 305, 164]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskType "Stateflow"
MaskDescription "Stateflow diagram"
MaskDisplay "plot(sf('Private','sfblk','xIcon'),sf('Private'"
",'sfblk','yIcon'));text(0.5,0,sf('Private', 'sfblk', 'tIcon'),'HorizontalAl',"
"'Center','VerticalAl','Bottom');"
MaskSelfModifiable on
MaskIconFrame off
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
Port {
PortNumber 1
Name "solenoid\nvoltage"
PropagatedSignals "v"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
System {
Name "PWM_driver_ckt"
Location [70, 200, 570, 460]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "duty_cycle"
Position [20, 101, 40, 119]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "i"
Position [20, 136, 40, 154]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 160, 320, 200]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function servo_demo1 1"
Ports [2, 2]
Position [180, 100, 230, 160]
FunctionName "sf_sfun"
Parameters "Ihold,Ipull,Tpwm,Vd,Vs,Vz,deltai"
PortCounts "[2 2]"
Port {
PortNumber 2
Name "v"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 171, 480, 189]
}
Block {
BlockType Outport
Name "v"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 65]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "duty_cycle"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
SrcBlock "i"
SrcPort 1
DstBlock " SFunction "
DstPort 2
}
Line {
Name "v"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "v"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Supply\nPressure"
Position [360, 95, 380, 115]
NamePlacement "alternate"
Value "Ps"
}
Block {
BlockType SubSystem
Name "armature\nmotion"
Ports [2, 1]
Position [460, 89, 515, 151]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "armature\nmotion"
Location [152, 487, 683, 764]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Fball"
Position [15, 18, 45, 32]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Fsol"
Position [15, 58, 45, 72]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Gain
Name "damping"
Position [265, 110, 295, 140]
Orientation "left"
Gain "Cv"
}
Block {
BlockType SubSystem
Name "double integrator"
Ports [1, 2]
Position [300, 17, 350, 73]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "double integrator"
Location [344, 545, 1104, 841]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "xdotdot"
Position [15, 63, 45, 77]
IconDisplay "Port number"
}
Block {
BlockType Constant
Name "Constant"
Position [505, 219, 585, 241]
Orientation "left"
ShowName off
Value "gmax - gmin"
}
Block {
BlockType Constant
Name "Constant1"
Position [505, 174, 585, 196]
Orientation "left"
ShowName off
Value "0"
}
Block {
BlockType Constant
Name "Constant2"
Position [360, 41, 390, 59]
ShowName off
Value "0"
}
Block {
BlockType Constant
Name "Constant3"
Position [90, 96, 120, 114]
ShowName off
Value "0"
}
Block {
BlockType Constant
Name "Constant4"
Position [95, 171, 125, 189]
ShowName off
Value "0"
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [2, 1]
Position [515, 52, 545, 83]
ShowName off
ExternalReset "rising"
LowerSaturationLimit "Inf"
IgnoreLimit off
}
Block {
BlockType Integrator
Name "Integrator2"
Ports [1, 2]
Position [605, 51, 635, 84]
ShowName off
LimitOutput on
UpperSaturationLimit "gmax - gmin"
LowerSaturationLimit "0"
ShowSaturationPort on
IgnoreLimit off
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [230, 92, 260, 123]
ShowName off
}
Block {
BlockType Logic
Name "Logical\nOperator1"
Ports [2, 1]
Position [290, 127, 320, 158]
ShowName off
}
Block {
BlockType Logic
Name "Logical\nOperator2"
Ports [2, 1]
Position [360, 102, 390, 133]
ShowName off
Operator "OR"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [435, 207, 465, 238]
Orientation "left"
ShowName off
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator1"
Position [140, 82, 170, 113]
ShowName off
Operator ">"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator2"
Position [435, 162, 465, 193]
Orientation "left"
ShowName off
Operator "<="
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator3"
Position [155, 157, 185, 188]
ShowName off
Operator "<"
}
Block {
BlockType Switch
Name "Switch"
Position [435, 45, 465, 75]
Threshold "0.5"
}
Block {
BlockType Outport
Name "x"
Position [715, 53, 745, 67]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Block {
BlockType Outport
Name "xdot"
Position [715, 13, 745, 27]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "Integrator1"
SrcPort 1
Points [25, 0]
Branch {
Points [0, -50]
DstBlock "xdot"
DstPort 1
}
Branch {
DstBlock "Integrator2"
DstPort 1
}
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
Points [-225, 0; 0, -110]
DstBlock "Logical\nOperator"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator2"
SrcPort 1
Points [-165, 0; 0, -30]
DstBlock "Logical\nOperator1"
DstPort 2
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Relational\nOperator2"
DstPort 2
}
Line {
SrcBlock "xdotdot"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Switch"
DstPort 3
}
Branch {
Points [0, 20]
Branch {
DstBlock "Relational\nOperator1"
DstPort 1
}
Branch {
Points [0, 75]
DstBlock "Relational\nOperator3"
DstPort 1
}
}
}
Line {
SrcBlock "Constant3"
SrcPort 1
DstBlock "Relational\nOperator1"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator1"
SrcPort 1
DstBlock "Logical\nOperator"
DstPort 1
}
Line {
SrcBlock "Constant4"
SrcPort 1
DstBlock "Relational\nOperator3"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator3"
SrcPort 1
Points [50, 0; 0, -40]
DstBlock "Logical\nOperator1"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Logical\nOperator2"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator1"
SrcPort 1
Points [20, 0]
DstBlock "Logical\nOperator2"
DstPort 2
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator2"
SrcPort 1
Points [15, 0; 0, -60]
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Integrator2"
SrcPort 2
Points [10, 0; 0, 45; -160, 0; 0, -45]
DstBlock "Integrator1"
DstPort 2
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Integrator1"
DstPort 1
}
Line {
SrcBlock "Integrator2"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "x"
DstPort 1
}
Branch {
Points [0, 95]
Branch {
Points [0, 60]
DstBlock "Relational\nOperator"
DstPort 1
}
Branch {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -