📄 dcpwm1.mdl
字号:
Line {
SrcBlock "saw"
SrcPort 1
Points [15, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "step"
SrcPort 1
DstBlock "Output"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "step"
DstPort 1
}
}
}
Block {
BlockType Step
Name "Tl_pu"
Position [165, 175, 195, 205]
Time "0.1"
Before "1"
After "[1/4 1/2]"
SampleTime "0"
Port {
PortNumber 1
Name "Tl"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Gain
Name "Tr"
Position [235, 173, 280, 207]
Gain "30"
Port {
PortNumber 1
Name "Tl"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Gain
Name "Vr"
Position [235, 113, 280, 147]
Gain "240"
Port {
PortNumber 1
Name "va"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Scope
Name "current"
Ports [1]
Position [605, 79, 635, 111]
Location [569, 164, 1120, 436]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "Armature current [A]"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "1"
YMin "-30"
YMax "20"
DataFormat "StructureWithTime"
MaxDataPoints "14000"
}
Block {
BlockType SubSystem
Name "cycle\n average"
Ports [1, 1]
Position [520, 50, 560, 80]
ForegroundColor "blue"
TreatAsAtomicUnit off
System {
Name "cycle\n average"
Location [580, 607, 997, 761]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "115"
Block {
BlockType Inport
Name "sig"
Position [25, 38, 55, 52]
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [80, 30, 110, 60]
ShowName off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [260, 35, 280, 55]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType TransportDelay
Name "Transport\nDelay 1/fo"
Position [225, 70, 255, 100]
DelayTime "1/1000"
}
Block {
BlockType Gain
Name "fo"
Position [135, 28, 180, 62]
Gain "1000"
}
Block {
BlockType Outport
Name "ave"
Position [305, 38, 335, 52]
}
Line {
SrcBlock "Integrator"
SrcPort 1
DstBlock "fo"
DstPort 1
}
Line {
SrcBlock "fo"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, 40]
DstBlock "Transport\nDelay 1/fo"
DstPort 1
}
}
Line {
SrcBlock "sig"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Transport\nDelay 1/fo"
SrcPort 1
Points [10, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "ave"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "cycle\n average1"
Ports [1, 1]
Position [300, 15, 340, 45]
ForegroundColor "blue"
TreatAsAtomicUnit off
System {
Name "cycle\n average1"
Location [544, 522, 961, 676]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "sig"
Position [25, 38, 55, 52]
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [80, 30, 110, 60]
ShowName off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [260, 35, 280, 55]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType TransportDelay
Name "Transport\nDelay 1/fo"
Position [225, 70, 255, 100]
DelayTime "1/1000"
}
Block {
BlockType Gain
Name "fo"
Position [135, 28, 180, 62]
Gain "1000"
}
Block {
BlockType Outport
Name "ave"
Position [305, 38, 335, 52]
}
Line {
SrcBlock "Integrator"
SrcPort 1
DstBlock "fo"
DstPort 1
}
Line {
SrcBlock "fo"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, 40]
DstBlock "Transport\nDelay 1/fo"
DstPort 1
}
}
Line {
SrcBlock "sig"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Transport\nDelay 1/fo"
SrcPort 1
Points [10, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "ave"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "fo"
Position [45, 150, 75, 180]
Value "1000"
}
Block {
BlockType Scope
Name "speed"
Ports [1]
Position [605, 174, 635, 206]
Location [570, 500, 1121, 788]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "Speed [rad/s]"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "1"
YMin "85"
YMax "105"
DataFormat "StructureWithTime"
MaxDataPoints "14000"
}
Block {
BlockType Scope
Name "va"
Ports [1]
Position [385, 44, 415, 76]
Location [28, 163, 560, 437]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.02"
YMin "-250"
YMax "250"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
MaxDataPoints "6000"
}
Block {
BlockType Lookup
Name "va_pu"
Position [50, 75, 80, 105]
InputValues "[0 0.5 0.5 2]"
OutputValues "[0.8 0.8 0.7 0.7]"
}
Line {
Name "va"
SrcBlock "Vr"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "cycle\n average1"
DstPort 1
}
Branch {
Labels [1, 0]
Points [60, 0]
Branch {
DstBlock "DC \nMOTOR1"
DstPort 1
}
Branch {
DstBlock "Mux1"
DstPort 2
}
}
}
Line {
Name "Tl"
SrcBlock "Tl_pu"
SrcPort 1
DstBlock "Tr"
DstPort 1
}
Line {
Name "wm"
Labels [1, 0]
SrcBlock "DC \nMOTOR1"
SrcPort 2
DstBlock "speed"
DstPort 1
}
Line {
Name "ia"
Labels [0, 0]
SrcBlock "DC \nMOTOR1"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [0, -65]
DstBlock "cycle\n average"
DstPort 1
}
Branch {
Labels [1, 0]
Points [70, 0]
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "cycle\n average"
SrcPort 1
Points [5, 0]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "current"
DstPort 1
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "va_pu"
DstPort 1
}
Line {
SrcBlock "PWM"
SrcPort 1
DstBlock "Vr"
DstPort 1
}
Line {
SrcBlock "fo"
SrcPort 1
Points [15, 0; 0, -25]
DstBlock "PWM"
DstPort 2
}
Line {
SrcBlock "va_pu"
SrcPort 1
Points [10, 0; 0, 30]
DstBlock "PWM"
DstPort 1
}
Line {
Name "Tl"
Labels [-1, 1]
SrcBlock "Tr"
SrcPort 1
DstBlock "DC \nMOTOR1"
DstPort 2
}
Line {
SrcBlock "cycle\n average1"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "va"
DstPort 1
}
Annotation {
Name " PWM EXCITATION"
Position [172, 60]
ForegroundColor "red"
FontSize 12
FontWeight "bold"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -