Plecs { Name "single_phase_inverter_ix" Version "4.4" CircuitModel "ContStateSpace" StartTime "0.0" StopTime "1" Timeout "" Solver "dopri" MaxStep "1e-3" InitStep "-1" FixedStep "1e-3" Refine "1" ZCStepSize "1e-9" RelTol "1e-3" AbsTol "-1" TurnOnThreshold "0" SyncFixedStepTasks "2" UseSingleCommonBaseRate "2" LossVariableLimitExceededMsg "3" NegativeSwitchLossMsg "3" DivisionByZeroMsg "1" StiffnessDetectionMsg "2" MaxConsecutiveZCs "1000" AlgebraicLoopWithStateMachineMsg "3" AssertionAction "1" InitializationCommands "% Grid\nPg_n = 2000; % SMA Sunny Boy 2000\nfg_n = 50" ";\nwg_n = fg_n*2*pi;\nVg_n = 220;\nVg_n_pk = Vg_n*sqrt(2);\nIg_n = Pg_n/Vg_n;" "\nIg_n_pk = Ig_n*sqrt(2);\nLg = 1e-3;\n\n% Converter \nZ_n = Vg_n/Ig_n;\nL_n " "= Z_n/wg_n;\n\nVdc = 750;\nfsw = 16e3;\nwsw = fsw*2*pi;\n\n% L filter design" "\nIg_p2p_max = Ig_n_pk*0.1;\nLf1 = Vdc*(1/fsw/2)/Ig_p2p_max/2;\nRf1 = 0.1;\n" "\n% PLL design\nTstl_PLL = 0.01;\nKp_PLL = 9.2/Tstl_PLL;\nXi_PLL = 1;\nTi_PLL" " = Tstl_PLL*Xi_PLL^2/2.3;\nKi_PLL = Kp_PLL/Ti_PLL;\n\n% PI design\nLf_PI = Lf" "1;\nRf_PI = Rf1;\nK_plant = 1/Rf_PI;\nT_plant = Lf_PI/Rf_PI;\n\nKpe = 1;\nTsw" " = 1/fsw;\nTpe = Tsw*2;\n\n% PI design: Optimum Magnitude method\nTn_PI = T_p" "lant;\nTi_PI = 2*K_plant*Kpe*Tpe;\n\t\nKp_PI = Tn_PI/Ti_PI;\nKi_PI = 1/Ti_PI;" "\nKbc_PI = Ki_PI/Kp_PI;\n\t\n% PR design\nLf_PR = Lf1;\nRf_PR = Rf1;\nK_plant" " = 1/Rf_PR;\nT_plant = Lf_PR/Rf_PR;\n\nKpe = 1;\nTsw = 1/fsw;\nTpe = 1.5*Tsw;" "\n\nw0_PR = wg_n;\n\n% PR design: Optimum Magnitude method\nTn_PR = T_plant;" "\nTi_PR = 2*K_plant*Kpe*Tpe;\nKp_PR = Tn_PI/Ti_PR;\nKi_PR = 1/Ti_PR;\n\n% HIL" " simulation\nTs_plant = 2e-6;\nTs_control = 1/fsw;\n\n% Scaling\nVdc_scl = 4/" "Vdc;\nVg_scl = 4/Vg_n_pk;\nIg_scl = 4/Ig_n_pk;" InitialState "1" SystemState "" TaskingMode "1" TaskConfigurations "" CodeGenParameterInlining "2" CodeGenFloatingPointFormat "2" CodeGenAbsTimeUsageMsg "3" CodeGenBaseName "" CodeGenOutputDir "" CodeGenExtraOpts "" CodeGenTarget "Generic" CodeGenTargetSettings "" ExtendedMatrixPrecision "1" MatrixSignificanceCheck "2" EnableStateSpaceSplitting "2" DisplayStateSpaceSplitting "1" DiscretizationMethod "2" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAYAAAAYAF" "QAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAwAAAAGABUAHIAaQBnAGcAZQByAEQAZQBsAGEAeQA" "AAAIAMAAAABYAUwBlAG4AcwBpAHQAaQB2AGkAdAB5AAAAAgAwAAAAFgBSAGUAZgByAGUAcwBoAFIA" "YQB0AGUAAAAEADIAMAAAABQATgB1AG0AUwBhAG0AcABsAGUAcwAAAAgAOAAxADkAMgAAABQARABlA" "GMAaQBtAGEAdABpAG8AbgAAAAIAMQ==" AlgebraicLoopMethod "1" AlgebraicLoopTolerance "1e-6" ScriptsDialogGeometry "" ScriptsDialogSplitterPos "0" Schematic { Location [39, 62; 508, 345] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Subsystem Name "Plant" Show on Position [310, 115] Direction up Flipped on Frame [-65, -40; 65, 40] LabelPosition [0, 0] TreatAsAtomicUnit on SampleTime "-1" TaskingMode "1" CodeGenEnable on CodeGenSampleTime "Ts_plant" CodeGenDiscretizationMethod "2" CodeGenTarget "PLECS RT Box 1" CodeGenTargetSettings "AAAAfwAAAAAlUU1hcDxRU3RyaW5nLFFNYXA8UVN0cmluZyxRU" "3RyaW5nPiA+AAAAAAEAAAAcAFAATABFAEMAUwAgAFIAVAAgAEIAbwB4ACAAMQAAABYAAAAeAHMAeQ" "BuAGMAaAByAG8AbgBpAHoAZQBUAGkAbQBlAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8" "ARAAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEMAAAACADAAAAAYAHMAdABhAHIAdAB1" "AHAAUwBGAFAAXwBCAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8AQQAAAAIAMAAAABoAc" "wBhAG0AcABsAGkAbgBnAEQAZQBsAGEAeQAAAAIAMAAAABgAbQBhAHgAXwBvAHYAZQByAHIAdQBuAH" "MAAAACADUAAAASAG0AYQBzAHQAZQByAFMARgBQAAAAAgAxAAAAJABkAGkAZwBpAHQAYQBsAE8AdQB" "0AHAAdQB0AEwAZQB2AGUAbAAAAAIAMQAAABAAYwBhAG4AMgBUAHgAUgB4AAAAAgAxAAAAHgBjAGEA" "bgAyAFQAZQByAG0AaQBuAGEAdABpAG8AbgAAAAIAMgAAABQAYwBhAG4AMgBFAG4AYQBiAGwAZQAAA" "AIAMAAAABAAYwBhAG4AMgBCAGEAdQBkAAAADAA1ADAAMAAwADAAMAAAABAAYwBhAG4AMQBUAHgAUg" "B4AAAAAgAxAAAAHgBjAGEAbgAxAFQAZQByAG0AaQBuAGEAdABpAG8AbgAAAAIAMgAAABQAYwBhAG4" "AMQBFAG4AYQBiAGwAZQAAAAIAMAAAABAAYwBhAG4AMQBCAGEAdQBkAAAADAA1ADAAMAAwADAAMAAA" "ABwAYQBuAGEAbABvAGcAUwBhAG0AcABsAGkAbgBnAAAAAgAxAAAAIgBhAG4AYQBsAG8AZwBPAHUAd" "ABwAHUAdABSAGEAbgBnAGUAAAACADMAAAAgAGEAbgBhAGwAbwBnAEkAbgBwAHUAdABSAGEAbgBnAG" "UAAAACADEAAAAaAFQAQQBSAEcARQBUAF8ARABFAFYASQBDAEUAAAAAAAAAGgBFAFgAVABFAFIATgB" "BAEwAXwBNAE8ARABFAAAAAgAx" CodeGenAbsTimeUsageMsg "1" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAcAAA" "AYAFQAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAwAAAAGABUAHIAaQBnAGcAZQByAEQAZQBsAGE" "AeQAAAAIAMAAAABwAVAByAGkAZwBnAGUAcgBDAGgAYQBuAG4AZQBsAAAAAgAwAAAAFgBTAGUAbgBz" "AGkAdABpAHYAaQB0AHkAAAACADAAAAAWAFIAZQBmAHIAZQBzAGgAUgBhAHQAZQAAAAQAMgAwAAAAF" "ABOAHUAbQBTAGEAbQBwAGwAZQBzAAAACgAyADAAMAAwADAAAAAUAEQAZQBjAGkAbQBhAHQAaQBvAG" "4AAAACADE=" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-65, 15] Direction left Index "1" } Terminal { Type Output Position [69, -10] Direction right Index "1" } Terminal { Type Output Position [69, 0] Direction right Index "2" } Terminal { Type Output Position [69, 10] Direction right Index "3" } Terminal { Type Input Position [-65, -15] Direction left Index "2" } Schematic { Location [521, 488; 1175, 743] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type DCVoltageSource Name "Vin" Show on Position [50, 130] Direction up Flipped off Parameter { Variable "V" Value "Vdc" Show off } } Component { Type Reference SrcComponent "Components/Electrical/Power Modules/MFB1" Name "MFB1" Show off Position [210, 130] Direction up Flipped off Frame [-60, -60; 60, 60] LabelPosition [-45, 0] LabelAlign right Parameter { Variable "semiSymbol" Value "1" Show off } Parameter { Variable "N" Value "1" Show off } Parameter { Variable "assert" Value "1" Show off } Parameter { Variable "Configuration" Value "2" Show off } Terminal { Type Input Position [-60, -30] Direction left } Terminal { Type Port Position [65, -5] Direction right } Terminal { Type Port Position [65, 5] Direction right } Terminal { Type Port Position [-65, -55] Direction left } Terminal { Type Input Position [-60, 30] Direction left } Terminal { Type Port Position [-65, 55] Direction left } Terminal { Type Input Position [20, -30] Direction left } Terminal { Type Input Position [20, 30] Direction left } } Component { Type Inductor Name "Lf1" Show on Position [325, 110] Direction left Flipped off Parameter { Variable "L" Value "Lf1" Show off } Parameter { Variable "i_init" Value "0" Show off } } Component { Type ACVoltageSource Name "Grid" Show on Position [590, 130] Direction down Flipped on Parameter { Variable "V" Value "Vg_n_pk" Show off } Parameter { Variable "w" Value "2*pi*fg_n" Show off } Parameter { Variable "phi" Value "pi/6" Show off } } Component { Type From Name "From" Show off Position [130, 100] Direction right Flipped off Parameter { Variable "Tag" Value "Q1" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From1" Show off Position [130, 160] Direction right Flipped off Parameter { Variable "Tag" Value "Q2" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From2" Show off Position [210, 100] Direction right Flipped off Parameter { Variable "Tag" Value "Q3" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From3" Show off Position [210, 160] Direction right Flipped off Parameter { Variable "Tag" Value "Q4" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Reference SrcComponent "PLECSRTBoxLib/PWM Capture1" Name "sw" Show on Position [310, 185] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[0:3]" Show off } Parameter { Variable "polarity" Value "1" Show off } Parameter { Variable "inputType" Value "1" Show off } Parameter { Variable "Ts" Value "Ts_plant" Show off } Parameter { Variable "TargetPortIndices" Value "1" Show off } Terminal { Type Output Position [29, 0] Direction right } } Component { Type SignalDemux Name "Demux" Show off Position [360, 185] Direction right Flipped on Parameter { Variable "Width" Value "4" Show off } } Component { Type Goto Name "Goto" Show off Position [385, 170] Direction right Flipped off Parameter { Variable "Tag" Value "Q1" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto1" Show off Position [425, 180] Direction right Flipped off Parameter { Variable "Tag" Value "Q2" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto2" Show off Position [385, 190] Direction right Flipped off Parameter { Variable "Tag" Value "Q3" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto3" Show off Position [425, 200] Direction right Flipped off Parameter { Variable "Tag" Value "Q4" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Voltmeter Name "Vm1" Show off Position [560, 130] Direction down Flipped on } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "Vg" Show on Position [585, 190] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "0" Show off } Parameter { Variable "scale" Value "Vg_scl" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "2" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "Ig" Show on Position [490, 70] Direction up Flipped on Frame [-25, -20; 25, 20] LabelPosition [0, -23] LabelAlign down Parameter { Variable "channel" Value "1" Show off } Parameter { Variable "scale" Value "Ig_scl" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "3" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Ammeter Name "Am2" Show off Position [415, 110] Direction left Flipped off } Component { Type Resistor Name "Rf1" Show on Position [375, 110] Direction left Flipped on Parameter { Variable "R" Value "Rf1" Show off } } Component { Type Scope Name "Elec" Show on Position [325, 55] Direction down Flipped on Location [910, 52; 1461, 434] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAABYvwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAFwA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAHAAAAWIAAABmAP///wAAAAMAAAAAAAA" "AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABQAP///wAAAicAAAFj" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAAAwAAAGQAAAACAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAACQAAAGQAAA" "AIAAAAZAAAAAEAAABkAAAAlgAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAB" "vAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAAnAAAAAQAAAAAAAAPoAAAAACc=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" Axes "2" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "Time (s)" ShowLegend "1" Axis { Name "Grid Voltage" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] AxisLabel "Voltage (V)" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Grid Current" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] AxisLabel "Current (A)" Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 ShowFourierLegend off Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "Vdc" Show on Position [145, 50] Direction up Flipped on Frame [-25, -20; 25, 20] LabelPosition [0, -23] LabelAlign down Parameter { Variable "channel" Value "2" Show off } Parameter { Variable "scale" Value "Vdc_scl" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "" Show off } Parameter { Variable "maxOutput" Value "" Show off } Parameter { Variable "TargetPortIndices" Value "4" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Voltmeter Name "Vm2" Show off Position [80, 130] Direction up Flipped off } Component { Type Breaker Name "Br1" Show off Position [525, 110] Direction left Flipped off Parameter { Variable "s_init" Value "0" Show off } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Digital In1" Name "CB" Show on Position [565, 70] Direction down Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, -23] LabelAlign down Parameter { Variable "channel" Value "4" Show off } Parameter { Variable "inputType" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "5" Show off } Terminal { Type Output Position [29, 0] Direction right } } Connection { Type Wire SrcComponent "MFB1" SrcTerminal 2 Points [290, 125; 290, 110] DstComponent "Lf1" DstTerminal 1 } Connection { Type Signal SrcComponent "From" SrcTerminal 1 DstComponent "MFB1" DstTerminal 1 } Connection { Type Signal SrcComponent "From1" SrcTerminal 1 DstComponent "MFB1" DstTerminal 5 } Connection { Type Signal SrcComponent "From2" SrcTerminal 1 DstComponent "MFB1" DstTerminal 7 } Connection { Type Signal SrcComponent "From3" SrcTerminal 1 DstComponent "MFB1" DstTerminal 8 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 DstComponent "Goto" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 DstComponent "Goto1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 4 DstComponent "Goto2" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 5 DstComponent "Goto3" DstTerminal 1 } Connection { Type Wire SrcComponent "Lf1" SrcTerminal 2 DstComponent "Rf1" DstTerminal 2 } Connection { Type Wire SrcComponent "Rf1" SrcTerminal 1 DstComponent "Am2" DstTerminal 1 } Connection { Type Signal SrcComponent "Vm2" SrcTerminal 3 Points [100, 130; 100, 50] DstComponent "Vdc" DstTerminal 1 } Connection { Type Wire SrcComponent "MFB1" SrcTerminal 4 Points [80, 75] Branch { Points [50, 75] DstComponent "Vin" DstTerminal 1 } Branch { DstComponent "Vm2" DstTerminal 1 } } Connection { Type Wire SrcComponent "MFB1" SrcTerminal 6 Points [80, 185] Branch { Points [50, 185] DstComponent "Vin" DstTerminal 2 } Branch { DstComponent "Vm2" DstTerminal 2 } } Connection { Type Signal SrcComponent "sw" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "CB" SrcTerminal 1 Points [525, 70] DstComponent "Br1" DstTerminal 3 } Connection { Type Wire SrcComponent "Am2" SrcTerminal 2 DstComponent "Br1" DstTerminal 1 } Connection { Type Wire SrcComponent "Grid" SrcTerminal 1 Points [560, 110] Branch { DstComponent "Br1" DstTerminal 2 } Branch { DstComponent "Vm1" DstTerminal 1 } } Connection { Type Wire SrcComponent "Grid" SrcTerminal 2 Points [560, 150] Branch { Points [290, 150; 290, 135] DstComponent "MFB1" DstTerminal 3 } Branch { DstComponent "Vm1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Am2" SrcTerminal 3 Points [415, 70] Branch { Points [415, 60] DstComponent "Elec" DstTerminal 2 } Branch { DstComponent "Ig" DstTerminal 1 } } Connection { Type Signal SrcComponent "Vm1" SrcTerminal 3 Points [540, 130] Branch { Points [445, 130; 445, 50] DstComponent "Elec" DstTerminal 1 } Branch { Points [540, 190] DstComponent "Vg" DstTerminal 1 } } } } Component { Type Subsystem Name "Controller" Show on Position [135, 115] Direction up Flipped on Frame [-60, -40; 60, 40] LabelPosition [0, 0] TreatAsAtomicUnit on SampleTime "-1" TaskingMode "1" CodeGenEnable on CodeGenSampleTime "Ts_control" CodeGenDiscretizationMethod "2" CodeGenInliningExceptions "AAAACwAAAAABAAAABABJAHA=" CodeGenTarget "Imperix Controllers" CodeGenTargetSettings "AAAAfwAAAAAlUU1hcDxRU3RyaW5nLFFNYXA8UVN0cmluZyxRU" "3RyaW5nPiA+AAAAAAIAAAAcAFAATABFAEMAUwAgAFIAVAAgAEIAbwB4ACAAMQAAABYAAAAeAHMAeQ" "BuAGMAaAByAG8AbgBpAHoAZQBUAGkAbQBlAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8" "ARAAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEMAAAACADAAAAAYAHMAdABhAHIAdAB1" "AHAAUwBGAFAAXwBCAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8AQQAAAAIAMAAAABoAc" "wBhAG0AcABsAGkAbgBnAEQAZQBsAGEAeQAAAA4AMQAvAGYAcwB3AC8AMgAAABgAbQBhAHgAXwBvAH" "YAZQByAHIAdQBuAHMAAAACADUAAAASAG0AYQBzAHQAZQByAFMARgBQAAAAAgAxAAAAJABkAGkAZwB" "pAHQAYQBsAE8AdQB0AHAAdQB0AEwAZQB2AGUAbAAAAAIAMQAAABAAYwBhAG4AMgBUAHgAUgB4AAAA" "AgAxAAAAHgBjAGEAbgAyAFQAZQByAG0AaQBuAGEAdABpAG8AbgAAAAIAMgAAABQAYwBhAG4AMgBFA" "G4AYQBiAGwAZQAAAAIAMAAAABAAYwBhAG4AMgBCAGEAdQBkAAAADAA1ADAAMAAwADAAMAAAABAAYw" "BhAG4AMQBUAHgAUgB4AAAAAgAxAAAAHgBjAGEAbgAxAFQAZQByAG0AaQBuAGEAdABpAG8AbgAAAAI" "AMgAAABQAYwBhAG4AMQBFAG4AYQBiAGwAZQAAAAIAMAAAABAAYwBhAG4AMQBCAGEAdQBkAAAADAA1" "ADAAMAAwADAAMAAAABwAYQBuAGEAbABvAGcAUwBhAG0AcABsAGkAbgBnAAAAAgAyAAAAIgBhAG4AY" "QBsAG8AZwBPAHUAdABwAHUAdABSAGEAbgBnAGUAAAACADEAAAAgAGEAbgBhAGwAbwBnAEkAbgBwAH" "UAdABSAGEAbgBnAGUAAAACADEAAAAaAFQAQQBSAEcARQBUAF8ARABFAFYASQBDAEUAAAAAAAAAGgB" "FAFgAVABFAFIATgBBAEwAXwBNAE8ARABFAAAAAgAxAAAAJgBJAG0AcABlAHIAaQB4ACAAQwBvAG4A" "dAByAG8AbABsAGUAcgBzAAAAAA==" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAcAAA" "AYAFQAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAwAAAAGABUAHIAaQBnAGcAZQByAEQAZQBsAGE" "AeQAAAAIAMAAAABwAVAByAGkAZwBnAGUAcgBDAGgAYQBuAG4AZQBsAAAAAgAyAAAAFgBTAGUAbgBz" "AGkAdABpAHYAaQB0AHkAAAACADAAAAAWAFIAZQBmAHIAZQBzAGgAUgBhAHQAZQAAAAQAMgAwAAAAF" "ABOAHUAbQBTAGEAbQBwAGwAZQBzAAAACAAxADAAMAAwAAAAFABEAGUAYwBpAG0AYQB0AGkAbwBuAA" "AAAgAx" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-60, 10] Direction left Index "1" } Terminal { Type Input Position [-60, 0] Direction left Index "2" } Terminal { Type Input Position [-60, -10] Direction left Index "3" } Terminal { Type Output Position [64, 15] Direction right Index "1" } Terminal { Type Output Position [64, -15] Direction right Index "2" } Schematic { Location [517, 63; 1374, 400] ZoomFactor 1 SliderPosition [0, 23] ShowBrowser off BrowserWidth 100 Component { Type Scope Name "Elec" Show on Position [495, 225] Direction up Flipped off Location [39, 429; 514, 776] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAABxvwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAKwA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAHAAAAcYAAABmAP///wAAAAMAAANjAAA" "AXPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAAAAA2MAAABQAP///wAAAdsAAAFA" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAAAwAAAGQAAAACAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAACQAAAGQAAA" "AIAAAAZAAAAAEAAABkAAAAuQAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAC" "SAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAAnAAAAAQAAAAAAAAPoAAAAACc=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "4" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "Time (s)" ShowLegend "1" Axis { Name "Grid Angle" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] AxisLabel "Angle (rad)" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Grid Angle Frequency" AutoScale 0 MinValue 250 MaxValue 400 Signals {} SignalTypes [ ] AxisLabel "Frequency (rad/s)" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Grid Voltage" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] AxisLabel "Voltage (V)" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Grid Current" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] AxisLabel "Current (A)" Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 ShowFourierLegend off Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type ConfigurableSubsystem Name "PI Ctrl" Show on Position [505, 120] Direction up Flipped on Frame [-20, -20; 20, 20] LabelPosition [0, -23] LabelAlign down SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Parameter { Variable "Kp_PI" Prompt "Kp PI" Type FreeText Value "Kp_PI" Show off Tunable off TabName "PI" } Parameter { Variable "Ki_PI" Prompt "Ki PI" Type FreeText Value "Ki_PI" Show off Tunable off TabName "PI" } Parameter { Variable "Kbc_PI" Prompt "Kbc PI" Type FreeText Value "Kbc_PI" Show off Tunable off TabName "PI" } Parameter { Variable "Limit_PI" Prompt "Limit PI" Type FreeText Value "[-Vg_n_pk Vg_n_pk]" Show off Tunable off TabName "PI" } Parameter { Variable "Kp_PR" Prompt "Kp PR" Type FreeText Value "Kp_PR" Show off Tunable off TabName "PR" } Parameter { Variable "Ki_PR" Prompt "Ki PR" Type FreeText Value "Ki_PR" Show off Tunable off TabName "PR" } Parameter { Variable "w0_PR" Prompt "w0 PR" Type FreeText Value "w0_PR" Show off Tunable off TabName "PR" } Terminal { Type Input Position [-20, 0] Direction left } Terminal { Type Output Position [24, 0] Direction right } Terminal { Type Input Position [0, -20] Direction up } TerminalNames { "i", "o", "rst" } Location [1014, 624; 1496, 870] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "PI" Schematic { Component { Type Input Name "i" Show on Position [35, 80] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "o" Show on Position [365, 80] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Gain Name "Kp" Show on Position [95, 50] Direction right Flipped off Parameter { Variable "K" Value "Kp_PI" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Ki" Show on Position [95, 110] Direction right Flipped off Parameter { Variable "K" Value "Ki_PI" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Integrator Name "Integrator" Show off Position [225, 115] Direction right Flipped off Parameter { Variable "ExternalReset" Value "3" Show off } Parameter { Variable "InitialConditionSource" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ShowStatePort" Value "1" Show off } Parameter { Variable "UpperLimit" Value "inf" Show off } Parameter { Variable "LowerLimit" Value "-inf" Show off } } Component { Type Sum Name "Sum" Show off Position [250, 80] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+|+" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Saturation Name "Saturation" Show off Position [305, 80] Direction right Flipped off Parameter { Variable "UpperLimit" Value "Limit_PI(2)" Show off } Parameter { Variable "LowerLimit" Value "Limit_PI(1)" Show off } } Component { Type Sum Name "Sum2" Show off Position [270, 155] Direction down Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+-|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain2" Show off Position [225, 155] Direction right Flipped on Parameter { Variable "K" Value "Kbc_PI" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum3" Show off Position [140, 110] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Input Name "rst" Show on Position [165, 130] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Kp" SrcTerminal 2 Points [250, 50] DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Integrator" SrcTerminal 2 Points [250, 115] DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "i" SrcTerminal 1 Points [60, 80] Branch { Points [60, 110] DstComponent "Ki" DstTerminal 1 } Branch { Points [60, 50] DstComponent "Kp" DstTerminal 1 } } Connection { Type Signal SrcComponent "Saturation" SrcTerminal 2 Points [330, 80] Branch { DstComponent "o" DstTerminal 1 } Branch { Points [330, 155] DstComponent "Sum2" DstTerminal 3 } } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 DstComponent "Gain2" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum3" SrcTerminal 1 DstComponent "Integrator" DstTerminal 1 } Connection { Type Signal SrcComponent "Ki" SrcTerminal 2 DstComponent "Sum3" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 Points [140, 155] DstComponent "Sum3" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 Points [270, 80] Branch { DstComponent "Saturation" DstTerminal 1 } Branch { DstComponent "Sum2" DstTerminal 2 } } Connection { Type Signal SrcComponent "rst" SrcTerminal 1 Points [190, 130; 190, 120] DstComponent "Integrator" DstTerminal 3 } } Name "PR" Schematic { Component { Type Input Name "i" Show on Position [35, 80] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "o" Show on Position [415, 80] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Gain Name "Kp" Show on Position [95, 50] Direction right Flipped off Parameter { Variable "K" Value "Kp_PR" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Ki" Show on Position [95, 110] Direction right Flipped off Parameter { Variable "K" Value "Ki_PR" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Integrator Name "Integrator" Show off Position [255, 115] Direction right Flipped off Parameter { Variable "ExternalReset" Value "3" Show off } Parameter { Variable "InitialConditionSource" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ShowStatePort" Value "1" Show off } Parameter { Variable "UpperLimit" Value "inf" Show off } Parameter { Variable "LowerLimit" Value "-inf" Show off } } Component { Type Sum Name "Sum" Show off Position [290, 80] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+|+" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Integrator Name "Integrator1" Show off Position [255, 150] Direction right Flipped on Parameter { Variable "ExternalReset" Value "3" Show off } Parameter { Variable "InitialConditionSource" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ShowStatePort" Value "1" Show off } Parameter { Variable "UpperLimit" Value "inf" Show off } Parameter { Variable "LowerLimit" Value "-inf" Show off } } Component { Type Sum Name "Sum1" Show off Position [180, 110] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "w0^2" Show on Position [205, 150] Direction right Flipped on Parameter { Variable "K" Value "w0_PR^2" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Saturation Name "Saturation" Show off Position [355, 80] Direction right Flipped off Parameter { Variable "UpperLimit" Value "Limit_PI(2)" Show off } Parameter { Variable "LowerLimit" Value "Limit_PI(1)" Show off } } Component { Type Sum Name "Sum2" Show off Position [320, 200] Direction down Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+-|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain2" Show off Position [255, 200] Direction right Flipped on Parameter { Variable "K" Value "Kbc_PI" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum3" Show off Position [140, 110] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Input Name "rst" Show on Position [180, 40] Direction left Flipped on Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Kp" SrcTerminal 2 Points [290, 50] DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "i" SrcTerminal 1 Points [60, 80] Branch { Points [60, 110] DstComponent "Ki" DstTerminal 1 } Branch { Points [60, 50] DstComponent "Kp" DstTerminal 1 } } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 DstComponent "Integrator" DstTerminal 1 } Connection { Type Signal SrcComponent "Integrator1" SrcTerminal 2 DstComponent "w0^2" DstTerminal 1 } Connection { Type Signal SrcComponent "w0^2" SrcTerminal 2 Points [180, 150] DstComponent "Sum1" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 DstComponent "Gain2" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 Points [140, 200] DstComponent "Sum3" DstTerminal 3 } Connection { Type Signal SrcComponent "Ki" SrcTerminal 2 DstComponent "Sum3" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum3" SrcTerminal 1 DstComponent "Sum1" DstTerminal 2 } Connection { Type Signal SrcComponent "Integrator" SrcTerminal 2 Points [290, 115] Branch { DstComponent "Sum" DstTerminal 3 } Branch { Points [290, 145] DstComponent "Integrator1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 Points [320, 80] Branch { DstComponent "Saturation" DstTerminal 1 } Branch { DstComponent "Sum2" DstTerminal 2 } } Connection { Type Signal SrcComponent "Saturation" SrcTerminal 2 Points [380, 80] Branch { DstComponent "o" DstTerminal 1 } Branch { Points [380, 200] DstComponent "Sum2" DstTerminal 3 } } Connection { Type Signal SrcComponent "rst" SrcTerminal 1 Points [220, 40] Branch { Points [310, 40; 310, 155] DstComponent "Integrator1" DstTerminal 3 } Branch { Points [220, 120] DstComponent "Integrator" DstTerminal 3 } } } } Parameter { Variable "Configuration" Value "2" Show off } } Component { Type Trigonometry Name "Trigonometric\nFunction" Show off Position [350, 120] Direction right Flipped off Parameter { Variable "Operator" Value "1" Show off } Parameter { Variable "Unit" Value "1" Show off } } Component { Type Gain Name "Ip" Show on Position [400, 120] Direction right Flipped off Parameter { Variable "K" Value "Ig_n_pk" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum" Show off Position [455, 120] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum1" Show off Position [555, 120] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalMux Name "Mux" Show off Position [445, 245] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Product Name "Divide" Show off Position [600, 125] Direction up Flipped off Parameter { Variable "Inputs" Value "*/" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Subsystem Name "PLL" Show on Position [275, 130] Direction up Flipped on Frame [-20, -20; 20, 20] LabelPosition [0, -23] LabelAlign down SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskType "Phase-locked loop" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on MaskInit "wn = fn*2*pi;\nwf = wn*2;" Parameter { Variable "fn" Prompt "Nominal frequency [Hz]" Type FreeText Value "fg_n" Show off Tunable off TabName "" } Parameter { Variable "Vn" Prompt "Nominal voltage [V]" Type FreeText Value "Vg_n_pk" Show off Tunable off TabName "" } Parameter { Variable "Kp" Prompt "Kp gain value" Type FreeText Value "Kp_PLL" Show off Tunable off TabName "" } Parameter { Variable "Ki" Prompt "Ki gain value" Type FreeText Value "Ki_PLL" Show off Tunable off TabName "" } Terminal { Type Input Position [-20, 0] Direction left } Terminal { Type Output Position [24, 10] Direction right } Terminal { Type Output Position [24, -10] Direction right } Schematic { Location [572, 624; 1132, 865] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "V" Show on Position [30, 65] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name base64 "zrg=" Show on Position [525, 75] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name base64 "z4k=" Show on Position [525, 35] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Reference SrcComponent "Components/Control/Transformations/SRF->RRF" Name "SRF->RRF" Show off Position [125, 75] Direction up Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up Terminal { Type Input Position [-15, -5] Direction left } Terminal { Type Output Position [19, 0] Direction right } Terminal { Type Input Position [-15, 5] Direction left } } Component { Type SignalMux Name "Mux" Show off Position [75, 70] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Gain Name "Kpd" Show on Position [185, 75] Direction right Flipped off Parameter { Variable "K" Value "2/Vn" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [225, 75] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Gain Name "Kp" Show on Position [270, 40] Direction right Flipped off Parameter { Variable "K" Value "Kp" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Ki" Show on Position [270, 100] Direction right Flipped off Parameter { Variable "K" Value "Ki" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Integrator Name "Integrator" Show off Position [320, 100] Direction right Flipped off Parameter { Variable "ExternalReset" Value "1" Show off } Parameter { Variable "InitialConditionSource" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ShowStatePort" Value "1" Show off } Parameter { Variable "UpperLimit" Value "inf" Show off } Parameter { Variable "LowerLimit" Value "-inf" Show off } } Component { Type Sum Name "Sum" Show off Position [345, 70] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+|+" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum1" Show off Position [385, 70] Direction up Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Constant Name base64 "z4lu" Show on Position [365, 35] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "wn" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Integrator Name "Integrator1" Show off Position [440, 75] Direction right Flipped off Parameter { Variable "ExternalReset" Value "2" Show off } Parameter { Variable "InitialConditionSource" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ShowStatePort" Value "2" Show off } Parameter { Variable "UpperLimit" Value "inf" Show off } Parameter { Variable "LowerLimit" Value "-inf" Show off } } Component { Type ConstantRelationalOperator Name "Compare to\nConstant" Show off Position [440, 105] Direction right Flipped on Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Operator" Value "5" Show off } Parameter { Variable "Threshold" Value "pi*2" Show off } } Component { Type Reference SrcComponent "Components/Control/Transformations/SRF->RRF" Name "SRF->RRF1" Show off Position [120, 200] Direction down Flipped on Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up Terminal { Type Input Position [-15, -5] Direction left } Terminal { Type Output Position [19, 0] Direction right } Terminal { Type Input Position [-15, 5] Direction left } } Component { Type TransferFunction Name "Transfer Fcn" Show off Position [120, 160] Direction right Flipped off Frame [-30, -15; 30, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "Numerator" Value "[wf]" Show off } Parameter { Variable "Denominator" Value "[1 wf]" Show off } Parameter { Variable "X0" Value "0" Show off } } Component { Type SignalDemux Name "Demux1" Show off Position [80, 200] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Connection { Type Signal SrcComponent "Ki" SrcTerminal 2 DstComponent "Integrator" DstTerminal 1 } Connection { Type Signal SrcComponent "Kp" SrcTerminal 2 Points [345, 40] DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Integrator" SrcTerminal 2 Points [345, 100] DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent base64 "z4lu" SrcTerminal 1 Points [385, 35] DstComponent "Sum1" DstTerminal 3 } Connection { Type Signal SrcComponent "Compare to\nConstant" SrcTerminal 2 Points [405, 105; 405, 80] DstComponent "Integrator1" DstTerminal 3 } Connection { Type Signal SrcComponent "Integrator1" SrcTerminal 4 Points [440, 45; 480, 45; 480, 105] DstComponent "Compare to\nConstant" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "Sum1" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [235, 70] Branch { Points [235, 100] DstComponent "Ki" DstTerminal 1 } Branch { Points [235, 40] DstComponent "Kp" DstTerminal 1 } } Connection { Type Signal SrcComponent "Integrator1" SrcTerminal 2 Points [490, 75] Branch { DstComponent base64 "zrg=" DstTerminal 1 } Branch { Points [490, 135; 170, 135] Branch { Points [90, 135; 90, 80] DstComponent "SRF->RRF" DstTerminal 3 } Branch { Points [170, 205] DstComponent "SRF->RRF1" DstTerminal 3 } } } Connection { Type Signal SrcComponent "Transfer Fcn" SrcTerminal 2 Points [160, 160; 160, 195] DstComponent "SRF->RRF1" DstTerminal 1 } Connection { Type Signal SrcComponent "SRF->RRF1" SrcTerminal 2 DstComponent "Demux1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 Points [55, 205; 55, 75] DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "SRF->RRF" DstTerminal 1 } Connection { Type Signal SrcComponent "V" SrcTerminal 1 DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Kpd" SrcTerminal 2 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "SRF->RRF" SrcTerminal 2 Points [150, 75] Branch { Points [150, 125; 70, 125; 70, 160] DstComponent "Transfer Fcn" DstTerminal 1 } Branch { DstComponent "Kpd" DstTerminal 1 } } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 Points [405, 70] Branch { DstComponent "Integrator1" DstTerminal 1 } Branch { Points [405, 35] DstComponent base64 "z4k=" DstTerminal 1 } } } } Component { Type Reference SrcComponent "Imperix_Control/Control Task Trigger" Name "Control Task Trigger" Show on Position [130, 40] Direction left Flipped on } Component { Type Reference SrcComponent "Imperix_Control/ADC" Name "Vg" Show on Position [145, 130] Direction up Flipped off Frame [-30, -25; 30, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "device" Value "0" Show off } Parameter { Variable "channel" Value "0" Show off } Parameter { Variable "sensor" Value "1" Show off } Parameter { Variable "sensor_gain" Value "Vg_scl" Show off } Parameter { Variable "sensor_offset" Value "0.0" Show off } Parameter { Variable "analog_gain" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "1" Show off } Terminal { Type Output Position [34, 0] Direction right } Terminal { Type EventInput Position [-30, 15] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/ADC" Name "Ig" Show on Position [145, 200] Direction up Flipped off Frame [-30, -25; 30, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "device" Value "0" Show off } Parameter { Variable "channel" Value "1" Show off } Parameter { Variable "sensor" Value "1" Show off } Parameter { Variable "sensor_gain" Value "Ig_scl" Show off } Parameter { Variable "sensor_offset" Value "0.0" Show off } Parameter { Variable "analog_gain" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "2" Show off } Terminal { Type Output Position [34, 0] Direction right } Terminal { Type EventInput Position [-30, 15] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/ADC" Name "Vdc" Show on Position [145, 270] Direction up Flipped off Frame [-30, -25; 30, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "device" Value "0" Show off } Parameter { Variable "channel" Value "2" Show off } Parameter { Variable "sensor" Value "1" Show off } Parameter { Variable "sensor_gain" Value "Vdc_scl" Show off } Parameter { Variable "sensor_offset" Value "0.0" Show off } Parameter { Variable "analog_gain" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "3" Show off } Terminal { Type Output Position [34, 0] Direction right } Terminal { Type EventInput Position [-30, 15] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/CB_PWM" Name "PWM" Show on Position [815, 130] Direction up Flipped off Frame [-30, -30; 30, 30] LabelPosition [0, 33] LabelAlign up Parameter { Variable "nb_bbx" Value "0" Show off } Parameter { Variable "out_conf" Value "2" Show off } Parameter { Variable "pwm_out_single" Value "0" Show off } Parameter { Variable "pwm_out_dual" Value "0:1" Show off } Parameter { Variable "carrier" Value "1" Show off } Parameter { Variable "block_input_duty" Value "2" Show off } Parameter { Variable "block_input_phase" Value "1" Show off } Parameter { Variable "block_input_activate" Value "1" Show off } Parameter { Variable "rate" Value "2" Show off } Parameter { Variable "duty" Value "0.5" Show off } Parameter { Variable "phase" Value "[0 0]" Show off } Parameter { Variable "block_input_clock" Value "2" Show off } Parameter { Variable "dead_time" Value "1e-6" Show off } Parameter { Variable "sim_dead_time" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "4" Show off } Terminal { Type Input Position [-30, -10] Direction left } Terminal { Type Input Position [-30, 5] Direction left } Terminal { Type Input Position [-30, 0] Direction left } Terminal { Type EventInput Position [-30, 20] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/DO_PWM" Name "DO" Show on Position [815, 210] Direction up Flipped off Frame [-30, -30; 30, 30] LabelPosition [0, 33] LabelAlign up Parameter { Variable "nb_bbx" Value "0" Show off } Parameter { Variable "out_conf" Value "1" Show off } Parameter { Variable "pwm_out_single" Value "5" Show off } Parameter { Variable "pwm_out_dual" Value "0" Show off } Parameter { Variable "block_input_activate" Value "1" Show off } Parameter { Variable "dead_time" Value "1e-6" Show off } Parameter { Variable "sim_dead_time" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "5" Show off } Terminal { Type Input Position [-30, 5] Direction left } Terminal { Type Input Position [-30, -5] Direction left } } Component { Type SignalSwitch Name "Switch" Show off Position [725, 120] Direction left Flipped on Parameter { Variable "Criteria" Value "2" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type Constant Name "Constant" Show off Position [675, 95] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "[0 0]" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Subsystem Name "duty-cycles" Show off Position [650, 125] Direction up Flipped off Frame [-15, -10; 15, 10] LabelPosition [0, 13] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [19, 0] Direction right } Terminal { Type Input Position [-15, 0] Direction left } Schematic { Location [640, 285; 977, 471] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Offset Name "Offset" Show off Position [220, 90] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Offset" Value "[0.5 0.5]" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain" Show off Position [170, 90] Direction right Flipped off Parameter { Variable "K" Value "[0.5 -0.5]" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "m" Show on Position [275, 90] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "e" Show on Position [65, 90] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalSelector Name "Cont\nSelector" Show off Position [120, 90] Direction right Flipped off Parameter { Variable "InputWidth" Value "1" Show off } Parameter { Variable "OutputIndices" Value "[1 1]" Show off } } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "Offset" DstTerminal 1 } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 DstComponent "m" DstTerminal 1 } Connection { Type Signal SrcComponent "e" SrcTerminal 1 DstComponent "Cont\nSelector" DstTerminal 1 } Connection { Type Signal SrcComponent "Cont\nSelector" SrcTerminal 2 DstComponent "Gain" DstTerminal 1 } } } Component { Type Reference SrcComponent "Imperix_Control/Tunable parameter" Name "Tunable parameter2" Show off Position [640, 205] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "Breaker" Show off Evaluate off } Parameter { Variable "initial_value" Value "0" Show off } Parameter { Variable "sim_output" Value "1" Show off } Parameter { Variable "step_time" Value "[1 2]" Show off } Parameter { Variable "step_data" Value "[0 1]" Show off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Output Position [14, 0] Direction right } } Component { Type Reference SrcComponent "Imperix_Control/Probe variable" Name "Probe variable" Show off Position [335, 80] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "omega" Show off Evaluate off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-10, 0] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/Probe variable" Name "Probe variable1" Show off Position [210, 285] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "Vdc" Show off Evaluate off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-10, 0] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/Probe variable" Name "Probe variable2" Show off Position [210, 215] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "Ig" Show off Evaluate off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-10, 0] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/Probe variable" Name "Probe variable3" Show off Position [210, 110] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "Vg" Show off Evaluate off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-10, 0] Direction left } } Component { Type SignalDemux Name "Demux" Show off Position [700, 250] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Reference SrcComponent "Imperix_Control/Probe variable" Name "Probe variable4" Show off Position [735, 240] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "m1" Show off Evaluate off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-10, 0] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/Probe variable" Name "Probe variable5" Show off Position [735, 260] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "m2" Show off Evaluate off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-10, 0] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/Configuration" Name "Configuration" Show on Position [35, 55] Direction up Flipped off Frame [-30, -30; 30, 30] LabelPosition [0, 33] LabelAlign up Parameter { Variable "clock_freq" Value "fsw" Show off } Parameter { Variable "phase" Value "0.5" Show off } Parameter { Variable "postscaler" Value "0" Show off } Parameter { Variable "cycle_delay" Value "5e-6" Show off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type EventOutput Position [34, -15] Direction right } Terminal { Type EventOutput Position [34, 5] Direction right } Terminal { Type EventOutput Position [34, -5] Direction right } } Connection { Type Signal SrcComponent "Trigonometric\nFunction" SrcTerminal 2 DstComponent "Ip" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "PI Ctrl" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 DstComponent "Divide" DstTerminal 2 } Connection { Type Signal SrcComponent "PI Ctrl" SrcTerminal 2 DstComponent "Sum1" DstTerminal 2 } Connection { Type Signal SrcComponent "Ip" SrcTerminal 2 Points [425, 120] Branch { DstComponent "Sum" DstTerminal 2 } Branch { Points [425, 240] DstComponent "Mux" DstTerminal 2 } } Connection { Type Signal SrcComponent "PLL" SrcTerminal 2 Points [315, 120] Branch { DstComponent "Trigonometric\nFunction" DstTerminal 1 } Branch { Points [315, 210] DstComponent "Elec" DstTerminal 1 } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [460, 245; 460, 240] DstComponent "Elec" DstTerminal 4 } Connection { Type Signal SrcComponent "Tunable parameter2" SrcTerminal 1 Points [725, 205] Branch { DstComponent "DO" DstTerminal 2 } Branch { Points [725, 180] Branch { DstComponent "Switch" DstTerminal 4 } Branch { Points [505, 180] DstComponent "PI Ctrl" DstTerminal 3 } } } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 Points [695, 95] DstComponent "Switch" DstTerminal 3 } Connection { Type Signal SrcComponent "Divide" SrcTerminal 1 DstComponent "duty-cycles" DstTerminal 2 } Connection { Type Signal SrcComponent "Switch" SrcTerminal 1 DstComponent "PWM" DstTerminal 1 } Connection { Type Signal SrcComponent "PLL" SrcTerminal 3 Points [305, 140] Branch { Points [305, 220] DstComponent "Elec" DstTerminal 2 } Branch { Points [305, 80] DstComponent "Probe variable" DstTerminal 1 } } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 Points [185, 270] Branch { Points [570, 270] DstComponent "Divide" DstTerminal 3 } Branch { DstComponent "Probe variable1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Ig" SrcTerminal 1 Points [185, 200] Branch { Points [275, 200] Branch { Points [455, 200] DstComponent "Sum" DstTerminal 3 } Branch { Points [275, 250] DstComponent "Mux" DstTerminal 3 } } Branch { DstComponent "Probe variable2" DstTerminal 1 } } Connection { Type Signal SrcComponent "Vg" SrcTerminal 1 Points [185, 130] Branch { Points [235, 130] Branch { DstComponent "PLL" DstTerminal 1 } Branch { Points [235, 160; 295, 160] Branch { Points [555, 160] DstComponent "Sum1" DstTerminal 3 } Branch { Points [295, 230] DstComponent "Elec" DstTerminal 3 } } } Branch { DstComponent "Probe variable3" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [710, 245] DstComponent "Probe variable4" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [710, 255] DstComponent "Probe variable5" DstTerminal 1 } Connection { Type Signal SrcComponent "duty-cycles" SrcTerminal 1 Points [680, 125] Branch { DstComponent "Switch" DstTerminal 2 } Branch { DstComponent "Demux" DstTerminal 1 } } Connection { Type Event SrcComponent "Configuration" SrcTerminal 1 DstComponent "Control Task Trigger" DstTerminal 1 } Connection { Type Event SrcComponent "Configuration" SrcTerminal 2 Points [100, 60; 100, 145] Branch { DstComponent "Vg" DstTerminal 2 } Branch { Points [100, 215] Branch { DstComponent "Ig" DstTerminal 2 } Branch { DstComponent "Vdc" DstTerminal 2 } } } Connection { Type Event SrcComponent "Configuration" SrcTerminal 3 Points [765, 50; 765, 150] DstComponent "PWM" DstTerminal 4 } } } Component { Type Delay Name "Delay" Show off Position [220, 185] Direction left Flipped off Parameter { Variable "N" Value "1" Show off } Parameter { Variable "X0" Value "0" Show off } Parameter { Variable "Ts" Value "Ts_control" Show off } } Component { Type SignalMux Name "Mux" Show off Position [400, 115] Direction left Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [55, 115] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Connection { Type Signal SrcComponent "Delay" SrcTerminal 2 Points [30, 185; 30, 115] DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 4 DstComponent "Mux" DstTerminal 4 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 3 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 2 DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 DstComponent "Controller" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 DstComponent "Controller" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 4 DstComponent "Controller" DstTerminal 3 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 4 DstComponent "Plant" DstTerminal 1 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 5 DstComponent "Plant" DstTerminal 5 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [420, 115; 420, 185] DstComponent "Delay" DstTerminal 1 } Annotation { Name "Single-phase inverter deployable on imperix B-Box RCP and" " PLECS RT Box" Position [225, 45] } Annotation { Name "This model file has been adapted from PLECS code examples" Position [230, 235] } } } DemoSignature "keAkjQht5IeMSDC+jF0Ik3cy8nX0gn9sP3FVErrDQ3I="