📄 power_pwm.mdl
字号:
VerticalAlignment "top"
UseDisplayTextAsClickCallback off
FontSize 12
}
Annotation {
Name "Take a look at the simulation parameters. T"
"he Maximum time step has been limited to 10 microseconds.\nThis is required d"
"ue to the relatively high switching frequency (1980 Hz) of the inverter. "
" \n\nObserve that the rotor and stator currents ar"
"e quite \"noisy,\" despite the use of a smoothing reactor. The noise \nintrod"
"uced by the PWM inverter is also observed in the electromagnetic torque wavef"
"orm Te. However, the \nmotor's inertia prevents this noise from appearing"
" in the motor's speed waveform. \n"
"\nThe RMS value of the fundamental component of the line voltage at the machi"
"ne's stator terminals is extracted \nwith a Fourier block, which can be fou"
"nd in the Measurements group of the Extras library. "
" \n\nFinally, observe the PWM inverter's output. Use the zoom on the vab o"
"scilloscope to zoom in on the waveform."
Position [24, 326]
HorizontalAlignment "left"
VerticalAlignment "top"
UseDisplayTextAsClickCallback off
FontSize 12
}
Annotation {
Name "Louis-A. Dessaint and R. Champagne (Ecole"
" de Technologie Superieure, Montreal)"
Position [25, 66]
HorizontalAlignment "left"
VerticalAlignment "top"
UseDisplayTextAsClickCallback off
FontSize 12
}
}
}
Block {
BlockType Reference
Name "Fourier"
Ports [1, 2]
Position [185, 214, 230, 261]
SourceBlock "powerlib_extras/Measurements/Fourier"
SourceType "Fourier analyser"
ShowPortLabels on
f1 "60"
n "1"
}
Block {
BlockType Lookup
Name "Look-Up\nTable"
Position [390, 409, 415, 431]
Orientation "left"
InputValues "[0 0.25 0.75 1] / 1980"
OutputValues "[0 1 -1 0]"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [2, 1]
Position [455, 394, 480, 441]
Orientation "left"
Operator "rem"
}
Block {
BlockType Scope
Name "N (rpm)"
Ports [1]
Position [625, 110, 655, 140]
BackgroundColor "green"
Floating off
Location [12, 704, 388, 1023]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "1"
YMin "-200"
YMax "1800"
DataFormat "Structure"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [475, 304, 495, 331]
Orientation "left"
NamePlacement "alternate"
ShowName off
RndMeth "Floor"
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [345, 313, 370, 402]
Orientation "left"
NamePlacement "alternate"
ShowName off
RndMeth "Floor"
}
Block {
BlockType Display
Name "RMS Vab voltage"
Ports [1]
Position [315, 210, 395, 240]
Decimation "100"
Lockdown off
}
Block {
BlockType Relay
Name "RelayA"
Position [215, 305, 245, 325]
Orientation "left"
NamePlacement "alternate"
OnSwitchValue "0"
OffSwitchValue "0"
OnOutputValue "220*sqrt(2/3)"
OffOutputValue "-220*sqrt(2/3)"
}
Block {
BlockType Relay
Name "RelayB"
Position [215, 350, 245, 370]
Orientation "left"
NamePlacement "alternate"
OnSwitchValue "0"
OffSwitchValue "0"
OnOutputValue "220*sqrt(2/3)"
OffOutputValue "-220*sqrt(2/3)"
}
Block {
BlockType Relay
Name "RelayC"
Position [215, 395, 245, 415]
Orientation "left"
NamePlacement "alternate"
OnSwitchValue "0"
OffSwitchValue "0"
OnOutputValue "220*sqrt(2/3)"
OffOutputValue "-220*sqrt(2/3)"
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [165, 300, 195, 330]
Orientation "left"
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Sum
Name "Sum5"
Ports [2, 1]
Position [165, 390, 195, 420]
Orientation "left"
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "+-|"
}
Block {
BlockType Sum
Name "Sum6"
Ports [2, 1]
Position [435, 303, 455, 367]
Orientation "left"
ShowName off
}
Block {
BlockType Sum
Name "Sum7"
Ports [2, 1]
Position [295, 345, 325, 375]
Orientation "left"
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Scope
Name "Te (N.m)"
Ports [1]
Position [625, 155, 655, 185]
BackgroundColor "green"
Floating off
Location [397, 705, 779, 1024]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "-30"
YMax "100"
DataFormat "Structure"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Terminator
Name "Terminator"
Position [270, 240, 290, 260]
ShowName off
}
Block {
BlockType Constant
Name "Tm"
Position [270, 50, 300, 70]
ShowName off
Value "11.9"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction"
Ports [1, 1]
Position [385, 323, 415, 347]
Orientation "left"
NamePlacement "alternate"
ShowName off
}
Block {
BlockType Reference
Name "Vab"
Description "source block"
Ports [1, 0, 0, 0, 0, 1, 1]
Position [92, 245, 123, 290]
Orientation "up"
AttributesFormatString "\\n"
SourceBlock "powerlib/Electrical\nSources/Controlled Voltage"
" Source"
SourceType "Controlled Voltage Source"
ShowPortLabels on
Initialize on
SourceType "AC"
Amplitude "0"
Phase "0"
Frequency "0"
Measurements "None"
}
Block {
BlockType Reference
Name "Vbc"
Description "source block"
Ports [1, 0, 0, 0, 0, 1, 1]
Position [66, 340, 99, 390]
Orientation "up"
AttributesFormatString "\\n"
SourceBlock "powerlib/Electrical\nSources/Controlled Voltage"
" Source"
SourceType "Controlled Voltage Source"
ShowPortLabels on
Initialize on
SourceType "AC"
Amplitude "0"
Phase "0"
Frequency "0"
Measurements "None"
}
Block {
BlockType Scope
Name "ir,is (A)"
Ports [2]
Position [625, 58, 655, 102]
BackgroundColor "green"
NamePlacement "alternate"
Floating off
Location [745, 406, 1124, 858]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "ir (A)"
axes2 "is (A)"
}
YMin "-90~-90"
YMax "90~90"
DataFormat "Structure"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Gain
Name "peak2rms"
Position [255, 213, 285, 237]
NamePlacement "alternate"
Gain "1/(sqrt(2))"
}
Block {
BlockType SubSystem
Name "powergui"
Ports []
Position [40, 470, 100, 494]
AncestorBlock "powerlib/powergui"
CopyFcn "powergui('Copy_Callback',gcb,0,[]);"
DeleteFcn "powergui('Copy_Callback',gcb,1,[]);powergui('Cl"
"ose_Callback',gcb,[],[]);\n "
" "
ModelCloseFcn "powergui('Close_Callback',gcb,[],[]);"
PreSaveFcn "try \nclose(get_pa"
"ram(gcbh,'userdata'))\nend "
OpenFcn "if (power_openblockproxy ('secondary'))\npowerg"
"ui(gcb,'PM')\nend;"
FontSize 11
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskType "PSB option menu block"
MaskHelp "web(psbhelp)"
MaskPromptString "General parameter: Simulation Mode |General par"
"ameter: Sample Time|General parameter: Echo Messages|Initial electrical stat"
"es status|Impedance tool: Frequency Range|Impedance tool: Log impedance|Imped"
"ance tool: log Frequency|Impedance tool: grid|Impedance tool: Save Data To Wo"
"rkspace|Impedance tool: Variable Name|Structure Name (PSBFFTSCOPE)|ZoomFFT (P"
"SBFFTSCOPE)|Start Time (PSBFFTSCOPE)|Cycles (PSBFFTSCOPE)|Display style (PSBF"
"FTSCOPE)|Fundamental (PSBFFTSCOPE)|Frequency Axis (PSBFFTSCOPE)|Max Frequency"
" (PSBFFTSCOPE)|Frequency indice (PSBLOADFLOW)|Frequency indice (STEADYSTATE)"
"|RMS display (STEADYSTATE)|Display Results|Sample time (s): |General paramet"
"er: phasor frequency|Phasor simulation"
MaskStyleString "popup(Continuous|Discrete|Phasor),edit,checkbox"
",popup(blocks|steady|zero),edit,checkbox,checkbox,checkbox,checkbox,edit,edit"
",checkbox,edit,edit,edit,edit,checkbox,edit,edit,edit,edit,checkbox,edit,edit"
",checkbox"
MaskTunableValueString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on"
MaskCallbackString "||||||||||||||||||||||||"
MaskEnableString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,off,off,off,off,off,off,off,off,off"
",off,off,off,off,off,off,off,off,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,,,,,,,,,,,,,,,,,"
MaskVariables "SimulationMode=@1;SampleTime=@2;echomessages=@3"
";x0status=@4;Frange=@5;Ylog=@6;Xlog=@7;ShowGrid=@8;save=@9;variable=&10;struc"
"ture=&11;ZoomFFT=@12;StartTime=@13;cycles=@14;DisplayStyle=&15;fundamental=@1"
"6;FreqAxis=@17;MaxFrequency=@18;frequencyindice=@19;frequencyindicesteady=@20"
";RmsSteady=@21;display=@22;Ts=@23;frequency=@24;methode=@25;"
MaskInitialization "powerlibroot = which('powersysdomain');\nPSBroo"
"t = powerlibroot(1:end-16);\n%\nswitch SimulationMode\n case 1\n"
" message=sprintf('Continuous');\n case 2\n messa"
"ge=sprintf('Discrete,\\nTs = %.4g s.',SampleTime);\n case 3\n "
" message=sprintf('Phasors');\nend\nif strcmp(bdroot,'powerlib')\n mes"
"sage='powergui';\nend\npower_initmask();"
MaskDisplay "disp(message)"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Continuous|0|off|blocks|[0:2:500]|off|on|off|of"
"f|ZData||on|0.0|1|1|60|off|1000|1|1|1|off|0|60|off"
MaskTabNameString ",,,,,,,,,,,,,,,,,,,,,,,,"
System {
Name "powergui"
Location [137, 405, 682, 583]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType SubSystem
Name "EquivalentModel1"
Ports []
Position [15, 70, 143, 105]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskInitialization "SPS = get_param(gcbh,'UserData');\nif isemp"
"ty(SPS)\n A=0;\n B=0;\n C=0;\n D=0;\n x0=0;\nelse\n A=S"
"PS.A;\n B=SPS.B;\n C=SPS.C;\n D=SPS.D;\n x0=SPS.x0;\nend"
MaskDisplay "color('green')\ndisp('EQUIVALENT CIRCUIT')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "EquivalentModel1"
Location [279, 434, 674, 551]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType SubSystem
Name "Sources"
Ports [0, 1]
Position [15, 32, 80, 58]
FontName "Arial"
FontSize 14
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Sources"
Location [16, 100, 737, 762]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType From
Name "From1"
Position [15, 21, 85, 49]
GotoTag "tp514348"
}
Block {
BlockType From
Name "From2"
Position [15, 66, 85, 94]
GotoTag "tp514301"
}
Block {
BlockType From
Name "From3"
Position [15, 111, 85, 139]
GotoTag "tp514303"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [325, 270, 330, 610]
Inputs "[2 1 1]"
DisplayOption "bar"
}
Block {
BlockType Outport
Name "u"
Position [365, 433, 395, 447]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "u"
DstPort 1
}
Line {
SrcBlock "From1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "From2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "From3"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
}
}
Block {
BlockType "S-Function"
Name "State-Space"
Ports [1, 1]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -