📄 connected_to_pwm.mdl
字号:
InitialCurrent "0"
Capacitance "1e-6"
Setx0 off
InitialVoltage "0"
Measurements "Branch current"
}
Block {
BlockType Saturate
Name "Saturation"
Position [995, 385, 1025, 415]
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Scope
Name "Scope"
Ports [2]
Position [690, 169, 730, 231]
Floating off
Location [1, 52, 1025, 767]
Open off
NumInputPorts "2"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "494.25~15"
YMax "497.75~31"
DataFormat "StructureWithTime"
SampleTime "0.1"
}
Block {
BlockType Scope
Name "Scope1"
Ports [2]
Position [1095, 280, 1135, 335]
Floating off
Location [1, 52, 1025, 737]
Open off
NumInputPorts "2"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "531.3~-0.53146"
YMax "531.47~-0.53131"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0.1"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [785, 390, 805, 410]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
OutDataTypeStr "Inherit: Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "Vc1"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [890, 382, 950, 418]
Numerator "[1 2000]"
Denominator "[1 0.1]"
Port {
PortNumber 1
Name "pi"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Reference
Name "V"
Ports [0, 1, 0, 0, 0, 2]
Position [740, 443, 765, 467]
DialogController "POWERSYS.PowerSysDialog"
FontName "Verdana"
FontSize 11
SourceBlock "powerlib/Measurements/Voltage Measurement"
SourceType "Voltage Measurement"
ShowPortLabels "FromPortIcon"
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
PhasorSimulation off
OutputType "Complex"
PSBequivalent "0"
}
Block {
BlockType SubSystem
Name "driver2"
Ports [2, 1]
Position [930, 464, 970, 491]
Orientation "left"
ForegroundColor "[0.000000, 0.501961, 0.000000]"
ShowName off
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
System {
Name "driver2"
Location [-1, 165, 668, 417]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "uc1"
Position [90, 63, 120, 77]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "Carr"
Position [85, 28, 115, 42]
Port "2"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Fcn
Name "Fcn"
Position [210, 40, 270, 70]
Expr "u(2)-u(1)"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [155, 34, 185, 76]
ShowName off
Inputs "2"
}
Block {
BlockType Relay
Name "Relay"
Position [295, 40, 325, 70]
ForegroundColor "[1.000000, 0.000000, 0.501961]"
OnSwitchValue "0"
OffSwitchValue "0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [405, 19, 435, 51]
Floating off
Location [1, 52, 1153, 863]
Open off
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "0.95"
YMax "1.05"
SaveName "ScopeData7"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Outport
Name "G"
Position [360, 48, 390, 62]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock "Carr"
SrcPort 1
Points [10, 0; 0, 10]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Relay"
SrcPort 1
Points [15, 0]
Branch {
Points [0, -20]
DstBlock "Scope1"
DstPort 1
}
Branch {
Labels [1, 0]
DstBlock "G"
DstPort 1
}
}
Line {
SrcBlock "Fcn"
SrcPort 1
DstBlock "Relay"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Fcn"
DstPort 1
}
Line {
SrcBlock "uc1"
SrcPort 1
Points [0, -5]
DstBlock "Mux"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "powergui"
Ports []
Position [120, 545, 239, 583]
AncestorBlock "powerlib/powergui"
UserDataPersistent on
UserData "DataTag0"
CopyFcn "powergui( 'Copy_Callback' , gcb , 0 , [ ] );"
DeleteFcn "powergui( 'Copy_Callback' , gcb , 1 , [ ] ); \npowergui( 'CloseButton_Callback' , gcb , [ ] , [ ] );\n "
ModelCloseFcn "powergui( 'CloseButton_Callback' , gcb , [ ] , [ ] );"
PreSaveFcn "powergui( 'PreSaveFcn_Callback' , gcb , [ ] , [ ] ); \npowergui( 'CloseButton_Callback' , gcb , [ ] , [ ] );"
InitFcn "powergui( 'InitFcn_Callback' , gcb , 0 , [ ] );"
NameChangeFcn "powergui( 'NameChangeFcn_Callback' , gcb , 0 , [ ] );"
OpenFcn "powergui(gcb,1)"
FontName "Verdana"
FontSize 11
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskType "PSB option menu block"
MaskDescription "Provides the simulation environment for a connected SimPowerSystems block diagram. When the hook port option is used, each separate diagram requires exactly one connected Powergui Environment block.\n\nTo access the Powergui Graphical Interface tools for this model, type: \n>>powergui\n"
MaskHelp "web(psbhelp)"
MaskPromptString "Simulation type: |Sample time (s):|Phasor frequency (Hz):|Implement switching devices as ideal switches|Switch tolerance|Interpolate|Initial electrical states: |Display SimPowerSystems warnings and infos messages|Add a hook port to the powergui block|Display internal function messages|Use TLC file when in Accelerator Simulation Mode and for RTW applications|Restore disabled links of SimPowerSystems blocks|Load flow frequency (Hz):|Frequency Range|Log impedance|log Frequency|grid|Save Data To Workspace|Variable Name|Structure Name (PSBFFTSCOPE)|ZoomFFT (PSBFFTSCOPE)|Start Time (PSBFFTSCOPE)|Cycles (PSBFFTSCOPE)|Display style (PSBFFTSCOPE)|Fundamental (PSBFFTSCOPE)|Frequency Axis (PSBFFTSCOPE)|Max Frequency (PSBFFTSCOPE)|Frequency indice (STEADYSTATE)|RMS display (STEADYSTATE)|Display Results|Old Ts setting (OBSOLETE)|Phasor simulation (OBSOLETE)"
MaskStyleString "popup(Continuous|Discrete|Phasor),edit,edit,checkbox,edit,checkbox,popup(blocks|steady|zero),checkbox,checkbox,checkbox,checkbox,popup(yes|warning|no),edit,edit,checkbox,checkbox,checkbox,checkbox,edit,edit,checkbox,edit,edit,edit,edit,checkbox,edit,edit,edit,checkbox,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,on,on,on,on,on,on,on"
MaskCallbackString "powergui('SimulationType',[],[],gcb);|||powergui('SPID',[],[],gcb);|||||powergui('HookPort',[],[],gcb);|||||||||||||||||||||||"
MaskEnableString "on,on,off,off,off,off,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,off"
MaskVisibilityString "on,on,on,on,on,off,on,on,on,on,on,on,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off"
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,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
MaskVariables "SimulationMode=@1;SampleTime=&2;frequency=@3;SPID=@4;SwTol=@5;Interpol=@6;x0status=@7;echomessages=@8;HookPort=@9;FunctionMessages=@10;EnableUseOfTLC=@11;RestoreLinks=&12;frequencyindice=@13;Frange=@14;Ylog=@15;Xlog=@16;ShowGrid=@17;save=@18;variable=&19;structure=&20;ZoomFFT=@21;StartTime=@22;cycles=@23;DisplayStyle=&24;fundamental=@25;FreqAxis=@26;MaxFrequency=@27;frequencyindicesteady=@28;RmsSteady=@29;display=@30;Ts=@31;methode=@32;"
MaskInitialization "message = powergui('MaskInitialization',gcb,SimulationMode,SampleTime);"
MaskDisplay "disp(message)"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Discrete|1e-6|60|off|0|off|blocks|off|off|off|off|warning|0|[0:2:500]|off|on|off|off|ZData||on|0.0|1|1|60|off|1000|1|1|off|0|off"
MaskTabNameString "Solver,Solver,Solver,Solver,Solver,Solver,Solver,Preferences,Preferences,Preferences,Preferences,Preferences,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Tools,Solver,Solver"
System {
Name "powergui"
Location [137, 405, 682, 583]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType SubSystem
Name "EquivalentModel1"
Ports []
Position [15, 70, 143, 105]
FontName "Arial"
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskInitialization "SPS = get_param(gcbh,'UserData');\nif isempty(SPS)\n Ts=1;\n A=0;\n B=0;\n C=0;\n D=0;\n x0=0;\n SwitchResistance=1;\n SwitchType=1;\n SwitchGateInitialValue=1;\n OutputsToResetToZero=1;\n NoErrorOnMaxIteration=1;\nelse\n Ts=SPS.PowerguiInfo.Ts;\n A=SPS.Adiscrete;\n B=SPS.Bdiscrete;\n C=SPS.Cdiscrete;\n D=SPS.Ddiscrete;\n x0=SPS.x0discrete;\n SwitchResistance=SPS.SwitchResistance;\n SwitchType=SPS.SwitchType;\n SwitchGateInitialValue=SPS.SwitchGateInitialValue;\n OutputsToResetToZero=SPS.YSwitchCurrent;\n NoErrorOnMaxIteration=SPS.NoErrorOnMaxIteration;\nend"
MaskDisplay "color('orange')\ndisp('EQUIVALENT CIRCUIT')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "EquivalentModel1"
Location [277, 402, 960, 695]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType SubSystem
Name "Gates"
Ports [0, 1]
Position [15, 112, 80, 138]
FontName "Arial"
FontSize 14
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
System {
Name "Gates"
Location [20, 127, 741, 886]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType From
Name "From1"
Position [15, 21, 85, 49]
GotoTag "tp08730f3d_7442_49a8_9c7b_f6385292ff06"
TagVisibility "global"
}
Block {
BlockType From
Name "From2"
Position [15, 66, 85, 94]
GotoTag "tp9e22422f_e4de_40a5_8c67_c55dff1aa4dc"
TagVisibility "global"
}
Block {
BlockType From
Name "From3"
Position [15, 111, 85, 139]
GotoTag "tpe509bdae_76d5_4442_8f3f_9f8b833eec5f"
TagVisibility "global"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [325, 270, 330, 610]
ShowName off
Inputs "[1 1 1]"
DisplayOption "bar"
}
Block {
BlockType Outport
Name "gates"
Position [390, 433, 420, 447]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "gates"
DstPort 1
}
Line {
SrcBlock "From1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -