Plecs { Name "hbridge_converter_ix" Version "4.4" CircuitModel "ContStateSpace" StartTime "0.0" StopTime "0.1" Timeout "" Solver "dopri" MaxStep "1e-3" InitStep "-1" FixedStep "Ts_plant" Refine "1" ZCStepSize "1e-9" RelTol "1e-3" AbsTol "-1" TurnOnThreshold "0" SyncFixedStepTasks "2" UseSingleCommonBaseRate "2" LossVariableLimitExceededMsg "3" NegativeSwitchLossMsg "3" DivisionByZeroMsg "2" StiffnessDetectionMsg "2" MaxConsecutiveZCs "1000" AlgebraicLoopWithStateMachineMsg "2" AssertionAction "1" InitializationCommands "% switching frequency\nfsw = 10e3; % switching frequ" "ency in Hz\n\n% plant dicretizaton\nTs_plant = 2e-6; % sample step size of t" "he plant subsystem in sec\nTs_controller = 1/fsw; % sample step size of the c" "ontroller subsystem in sec\n\n% current set point\nftoggle = fsw/200; % ~50 H" "z\nIset_max= 5; % current reference in A\nIset_min= -5; % current refe" "rence in A\n\n% input voltage\nVdc = 24; %input voltage in V\n\n% test load\n" "R = 2; % load resistance in ohms\nL = 250e-6; % load inductance in H\n\n" "% PI current regulator design parameters\nT_timedelay = 2.5*Ts_controller; % " "time delay\nT_sz = 0.5*Ts_controller; % continuous time domain to digital con" "version delay\n\nT_delay = T_timedelay+T_sz;\nK1 = 1/R;\nTn = L/R;\nTi = 2*K1" "*T_delay;\nKp = Tn/Ti;\nKi = 1/Ti;\n\n% voltage sensing \nVm.K = 3.3/Vdc; % " "scale the voltage to be within 3.3 V\n\n% current sensing gain and offset\nIm" ".K = 3.3/(abs(Iset_max)+abs(Iset_min))/2; % scale the currents to be within 3" ".3 V\nIm.O = 3.3/2; % offset the currents to be above 0V" InitialState "1" SystemState "" TaskingMode "1" TaskConfigurations "" CodeGenParameterInlining "2" CodeGenFloatingPointFormat "1" CodeGenAbsTimeUsageMsg "1" CodeGenBaseName "" CodeGenOutputDir "src" CodeGenExtraOpts "" CodeGenTarget "PLECS RT Box 1" CodeGenTargetSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAYAAAAkA" "HAAdwBtAEMAYQBwAHQAdQByAGUAUABvAGwAYQByAGkAdAB5AAAAAgAyAAAAJABkAGkAZwBpAHQAYQ" "BsAE8AdQB0AHAAdQB0AEwAZQB2AGUAbAAAAAIAMQAAACIAYQBuAGEAbABvAGcATwB1AHQAcAB1AHQ" "AUgBhAG4AZwBlAAAAAgAxAAAAIABhAG4AYQBsAG8AZwBJAG4AcAB1AHQAUgBhAG4AZwBlAAAAAgAy" "AAAAGgBUAEEAUgBHAEUAVABfAEQARQBWAEkAQwBFAAAAJgBiAHIAdQBpAG4AcwAtAHIAdABiAG8Ae" "AAuAGwAbwBjAGEAbAAuAAAAGgBFAFgAVABFAFIATgBBAEwAXwBNAE8ARABFAAAAAgAx" ExtendedMatrixPrecision "1" MatrixSignificanceCheck "2" EnableStateSpaceSplitting "2" DisplayStateSpaceSplitting "1" DiscretizationMethod "2" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAcAAAAYAF" "QAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAwAAAAGABUAHIAaQBnAGcAZQByAEQAZQBsAGEAeQA" "AAAIAMAAAABwAVAByAGkAZwBnAGUAcgBDAGgAYQBuAG4AZQBsAAAABAAtADEAAAAWAFMAZQBuAHMA" "aQB0AGkAdgBpAHQAeQAAAAIAMAAAABYAUgBlAGYAcgBlAHMAaABSAGEAdABlAAAABAAyADAAAAAUA" "E4AdQBtAFMAYQBtAHAAbABlAHMAAAAIADgAMQA5ADIAAAAUAEQAZQBjAGkAbQBhAHQAaQBvAG4AAA" "ACADE=" AlgebraicLoopMethod "1" AlgebraicLoopTolerance "1e-6" ScriptsDialogGeometry "" ScriptsDialogSplitterPos "0" Schematic { Location [44, 63; 448, 377] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Subsystem Name "Plant" Show on Position [250, 115] Direction up Flipped off Frame [-40, -35; 40, 35] LabelPosition [0, 38] LabelAlign up TreatAsAtomicUnit on SampleTime "-1" TaskingMode "1" CodeGenEnable on CodeGenSampleTime "Ts_plant" CodeGenDiscretizationMethod "2" CodeGenInliningExceptions "AAAACwAAAAABAAAABgBWAGQAYw==" CodeGenTarget "PLECS RT Box 1" CodeGenTargetSettings "AAAAfwAAAAAlUU1hcDxRU3RyaW5nLFFNYXA8UVN0cmluZyxRU" "3RyaW5nPiA+AAAAAAIAAAAcAFAATABFAEMAUwAgAFIAVAAgAEIAbwB4ACAAMQAAABYAAAAeAHMAeQ" "BuAGMAaAByAG8AbgBpAHoAZQBUAGkAbQBlAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8" "ARAAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEMAAAACADAAAAAYAHMAdABhAHIAdAB1" "AHAAUwBGAFAAXwBCAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8AQQAAAAIAMAAAABoAc" "wBhAG0AcABsAGkAbgBnAEQAZQBsAGEAeQAAAAIAMAAAABgAbQBhAHgAXwBvAHYAZQByAHIAdQBuAH" "MAAAACADUAAAASAG0AYQBzAHQAZQByAFMARgBQAAAAAgAxAAAAJABkAGkAZwBpAHQAYQBsAE8AdQB" "0AHAAdQB0AEwAZQB2AGUAbAAAAAIAMQAAABAAYwBhAG4AMgBUAHgAUgB4AAAAAgAxAAAAHgBjAGEA" "bgAyAFQAZQByAG0AaQBuAGEAdABpAG8AbgAAAAIAMgAAABQAYwBhAG4AMgBFAG4AYQBiAGwAZQAAA" "AIAMAAAABAAYwBhAG4AMgBCAGEAdQBkAAAADAA1ADAAMAAwADAAMAAAABAAYwBhAG4AMQBUAHgAUg" "B4AAAAAgAxAAAAHgBjAGEAbgAxAFQAZQByAG0AaQBuAGEAdABpAG8AbgAAAAIAMgAAABQAYwBhAG4" "AMQBFAG4AYQBiAGwAZQAAAAIAMAAAABAAYwBhAG4AMQBCAGEAdQBkAAAADAA1ADAAMAAwADAAMAAA" "ABwAYQBuAGEAbABvAGcAUwBhAG0AcABsAGkAbgBnAAAAAgAxAAAAIgBhAG4AYQBsAG8AZwBPAHUAd" "ABwAHUAdABSAGEAbgBnAGUAAAACADEAAAAgAGEAbgBhAGwAbwBnAEkAbgBwAHUAdABSAGEAbgBnAG" "UAAAACADEAAAAaAFQAQQBSAEcARQBUAF8ARABFAFYASQBDAEX/////AAAAGgBFAFgAVABFAFIATgB" "BAEwAXwBNAE8ARABFAAAAAgAxAAAAJgBJAG0AcABlAHIAaQB4ACAAQwBvAG4AdAByAG8AbABsAGUA" "cgBzAAAAAA==" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAcAAA" "AYAFQAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAzAAAAGABUAHIAaQBnAGcAZQByAEQAZQBsAGE" "AeQAAAAgALQA1ADEAMgAAABwAVAByAGkAZwBnAGUAcgBDAGgAYQBuAG4AZQBsAAAAAgA0AAAAFgBT" "AGUAbgBzAGkAdABpAHYAaQB0AHkAAAACADAAAAAWAFIAZQBmAHIAZQBzAGgAUgBhAHQAZQAAAAQAM" "gAwAAAAFABOAHUAbQBTAGEAbQBwAGwAZQBzAAAACAA4ADEAOQAyAAAAFABEAGUAYwBpAG0AYQB0AG" "kAbwBuAAAAAgAx" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-40, 0] Direction left Index "1" } Terminal { Type Output Position [44, 15] Direction right Index "1" } Terminal { Type Output Position [44, -15] Direction right Index "2" } Schematic { Location [458, 498; 1069, 767] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Voltmeter Name "Vm1" Show off Position [150, 130] Direction up Flipped off } Component { Type VoltageSource Name "V" Show off Position [120, 130] Direction down Flipped on Parameter { Variable "DiscretizationBehavior" Value "2" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type Constant Name "Vdc" Show off Position [75, 130] Direction right Flipped off Frame [-15, -10; 15, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "Vdc" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "Vdc'" Show on Position [555, 60] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "11" Show on } Parameter { Variable "scale" Value "Vm.K" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "minOutput" Value "0" Show off } Parameter { Variable "maxOutput" Value "3.3" Show off } Parameter { Variable "TargetPortIndices" Value "2" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Reference SrcComponent "PLECSRTBoxLib/PWM Capture1" Name "PWM Capture" Show on Position [55, 45] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "[16:19]" Show on } 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 Reference SrcComponent "Components/Electrical/Power Modules/HB1" Name "HB1" Show off Position [255, 130] Direction up Flipped off Frame [-20, -50; 20, 50] LabelPosition [-5, 0] LabelAlign right Parameter { Variable "semiSymbol" Value "1" Show off } Parameter { Variable "assert" Value "1" Show off } Parameter { Variable "Configuration" Value "2" Show off } Terminal { Type Input Position [-20, -30] Direction left } Terminal { Type Port Position [0, -55] Direction up } Terminal { Type Port Position [0, 55] Direction down } Terminal { Type Port Position [25, 0] Direction right } Terminal { Type Input Position [-20, 30] Direction left } } Component { Type Reference SrcComponent "Components/Electrical/Power Modules/HB1" Name "HB2" Show off Position [425, 130] Direction down Flipped on Frame [-20, -50; 20, 50] LabelPosition [23, 0] LabelAlign left Parameter { Variable "semiSymbol" Value "1" Show off } Parameter { Variable "assert" Value "1" Show off } Parameter { Variable "Configuration" Value "2" Show off } Terminal { Type Input Position [-20, -30] Direction left } Terminal { Type Port Position [0, -55] Direction up } Terminal { Type Port Position [0, 55] Direction down } Terminal { Type Port Position [25, 0] Direction right } Terminal { Type Input Position [-20, 30] Direction left } } Component { Type Inductor Name "L1" Show off Position [335, 130] Direction left Flipped off Parameter { Variable "L" Value "L" Show on } Parameter { Variable "i_init" Value "0" Show off } } Component { Type Resistor Name "R1" Show off Position [385, 130] Direction right Flipped off Parameter { Variable "R" Value "R" Show on } } Component { Type Ammeter Name "Am1" Show off Position [290, 130] Direction right Flipped on } Component { Type Reference SrcComponent "PLECSRTBoxLib/Analog Out1" Name "Io'" Show on Position [555, 200] Direction up Flipped off Frame [-25, -20; 25, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "channel" Value "4" Show on } Parameter { Variable "scale" Value "Im.K" Show off } Parameter { Variable "offset" Value "Im.O" Show off } Parameter { Variable "minOutput" Value "0" Show off } Parameter { Variable "maxOutput" Value "3.3" Show off } Parameter { Variable "TargetPortIndices" Value "3" Show off } Terminal { Type Input Position [-25, 0] Direction left } } Component { Type Scope Name "Scope" Show on Position [555, 130] Direction up Flipped off Location [46, 456; 449, 789] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAAB6vwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAFwA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAHAAAAeoAAABmAP///wAAAAMAAAHjAAA" "AnfwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAAAAAeMAAABQAP///wAAAZMAAAEy" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAAAwAAAGQAAAACAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAACQAAAGQAAA" "AIAAAAZAAAAAEAAABkAAAAtwAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAC" "QAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAAnAAAAAQAAAAAAAAPoAAAAACc=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" Axes "2" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "Time(s)" ShowLegend "1" Axis { Name "PWM Signals" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 1 KeepBaseline off BaselineValue 0 } Axis { Name "Inductor Current" AutoScale 1 MinValue 0 MaxValue 1 Signals {"iL"} SignalTypes [ ] AxisLabel "Current (A)" Untangle 0 KeepBaseline on 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 SignalDemux Name "Demux3" Show off Position [125, 45] Direction right Flipped on Parameter { Variable "Width" Value "[2 2]" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [205, 105] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type SignalDemux Name "Demux1" Show off Position [475, 105] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 DstComponent "V" DstTerminal 3 } Connection { Type Wire SrcComponent "V" SrcTerminal 1 Points [120, 70; 150, 70] Branch { Points [255, 70] Branch { Points [425, 70] DstComponent "HB2" DstTerminal 2 } Branch { DstComponent "HB1" DstTerminal 2 } } Branch { DstComponent "Vm1" DstTerminal 1 } } Connection { Type Wire SrcComponent "Vm1" SrcTerminal 2 Points [150, 190] Branch { Points [120, 190] DstComponent "V" DstTerminal 2 } Branch { Points [255, 190] Branch { Points [425, 190] DstComponent "HB2" DstTerminal 3 } Branch { DstComponent "HB1" DstTerminal 3 } } } Connection { Type Wire SrcComponent "L1" SrcTerminal 2 DstComponent "R1" DstTerminal 2 } Connection { Type Wire SrcComponent "Am1" SrcTerminal 2 DstComponent "L1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 DstComponent "HB1" DstTerminal 1 } Connection { Type Wire SrcComponent "Am1" SrcTerminal 1 DstComponent "HB1" DstTerminal 4 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [215, 110; 215, 160] DstComponent "HB1" DstTerminal 5 } Connection { Type Wire SrcComponent "R1" SrcTerminal 1 DstComponent "HB2" DstTerminal 4 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 DstComponent "HB2" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 Points [465, 110; 465, 160] DstComponent "HB2" DstTerminal 5 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 2 Points [180, 40; 180, 105] DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 3 Points [500, 50; 500, 105] DstComponent "Demux1" DstTerminal 1 } Connection { Type Signal SrcComponent "Vm1" SrcTerminal 3 Points [170, 130; 170, 60] DstComponent "Vdc'" DstTerminal 1 } Connection { Type Signal SrcComponent "PWM Capture" SrcTerminal 1 Points [95, 45] Branch { DstComponent "Demux3" DstTerminal 1 } Branch { Points [95, 30; 510, 30; 510, 125] DstComponent "Scope" DstTerminal 1 } } Connection { Type Signal SrcComponent "Am1" SrcTerminal 3 Points [290, 200; 510, 200] Branch { DstComponent "Io'" DstTerminal 1 } Branch { Points [510, 135] DstComponent "Scope" DstTerminal 2 } } } } Component { Type Delay Name "Calc. Delay1" Show off Position [185, 215] Direction left Flipped off Parameter { Variable "N" Value "1" Show off } Parameter { Variable "X0" Value "0*Im.K+Im.O" Show off } Parameter { Variable "Ts" Value "Ts_controller" Show off } } Component { Type Delay Name "Calc. Delay" Show off Position [185, 185] Direction left Flipped off Parameter { Variable "N" Value "1" Show off } Parameter { Variable "X0" Value "24*Vm.K" Show off } Parameter { Variable "Ts" Value "Ts_controller" Show off } } Component { Type Subsystem Name "Controller" Show on Position [125, 115] Direction up Flipped off Frame [-35, -35; 35, 35] LabelPosition [0, 38] LabelAlign up TreatAsAtomicUnit on SampleTime "-1" TaskingMode "1" CodeGenEnable on CodeGenSampleTime "Ts_controller" CodeGenDiscretizationMethod "2" CodeGenTarget "Imperix Controllers" CodeGenTargetSettings "AAAAfwAAAAAlUU1hcDxRU3RyaW5nLFFNYXA8UVN0cmluZyxRU" "3RyaW5nPiA+AAAAAAIAAAAcAFAATABFAEMAUwAgAFIAVAAgAEIAbwB4ACAAMQAAABYAAAAeAHMAeQ" "BuAGMAaAByAG8AbgBpAHoAZQBUAGkAbQBlAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8" "ARAAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEMAAAACADAAAAAYAHMAdABhAHIAdAB1" "AHAAUwBGAFAAXwBCAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8AQQAAAAIAMAAAABoAc" "wBhAG0AcABsAGkAbgBnAEQAZQBsAGEAeQAAAAIAMAAAABgAbQBhAHgAXwBvAHYAZQByAHIAdQBuAH" "MAAAACADUAAAASAG0AYQBzAHQAZQByAFMARgBQAAAAAgAxAAAAJABkAGkAZwBpAHQAYQBsAE8AdQB" "0AHAAdQB0AEwAZQB2AGUAbAAAAAIAMQAAABAAYwBhAG4AMgBUAHgAUgB4AAAAAgAxAAAAHgBjAGEA" "bgAyAFQAZQByAG0AaQBuAGEAdABpAG8AbgAAAAIAMgAAABQAYwBhAG4AMgBFAG4AYQBiAGwAZQAAA" "AIAMAAAABAAYwBhAG4AMgBCAGEAdQBkAAAADAA1ADAAMAAwADAAMAAAABAAYwBhAG4AMQBUAHgAUg" "B4AAAAAgAxAAAAHgBjAGEAbgAxAFQAZQByAG0AaQBuAGEAdABpAG8AbgAAAAIAMgAAABQAYwBhAG4" "AMQBFAG4AYQBiAGwAZQAAAAIAMAAAABAAYwBhAG4AMQBCAGEAdQBkAAAADAA1ADAAMAAwADAAMAAA" "ABwAYQBuAGEAbABvAGcAUwBhAG0AcABsAGkAbgBnAAAAAgAxAAAAIgBhAG4AYQBsAG8AZwBPAHUAd" "ABwAHUAdABSAGEAbgBnAGUAAAACADEAAAAgAGEAbgBhAGwAbwBnAEkAbgBwAHUAdABSAGEAbgBnAG" "UAAAACADEAAAAaAFQAQQBSAEcARQBUAF8ARABFAFYASQBDAEX/////AAAAGgBFAFgAVABFAFIATgB" "BAEwAXwBNAE8ARABFAAAAAgAxAAAAJgBJAG0AcABlAHIAaQB4ACAAQwBvAG4AdAByAG8AbABsAGUA" "cgBzAAAAAQAAABoAYwBhAG4AXwBiAGEAdQBkAF8AcgBhAHQAZQAAAA4AMQAwADAAMAAwADAAMA==" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAYAAA" "AYAFQAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAwAAAAGABUAHIAaQBnAGcAZQByAEQAZQBsAGE" "AeQAAAAIAMAAAABYAUwBlAG4AcwBpAHQAaQB2AGkAdAB5AAAAAgAwAAAAFgBSAGUAZgByAGUAcwBo" "AFIAYQB0AGUAAAAEADIAMAAAABQATgB1AG0AUwBhAG0AcABsAGUAcwAAAAgAOAAxADkAMgAAABQAR" "ABlAGMAaQBtAGEAdABpAG8AbgAAAAIAMQ==" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-35, -15] Direction left Index "1" } Terminal { Type Input Position [-35, 15] Direction left Index "2" } Terminal { Type Output Position [39, 0] Direction right Index "1" } Schematic { Location [453, 64; 1181, 415] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Subsystem Name "Left Leg Duty-Cycle" Show on Position [465, 110] Direction up Flipped off Frame [-45, -20; 45, 20] LabelPosition [0, 23] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-45, -10] Direction left } Terminal { Type Output Position [49, -10] Direction right } Terminal { Type Input Position [-45, 10] Direction left } Terminal { Type Output Position [49, 10] Direction right } Schematic { Location [460, 668; 861, 874] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Product Name "Divide" Show off Position [170, 90] Direction up Flipped off Parameter { Variable "Inputs" Value "/*" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Saturation Name "Saturation" Show off Position [225, 90] Direction right Flipped off Parameter { Variable "UpperLimit" Value "1" Show off } Parameter { Variable "LowerLimit" Value "0" Show off } } Component { Type MinMax Name "Min/Max" Show off Position [100, 55] Direction up Flipped off Parameter { Variable "Operation" Value "2" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type Constant Name "V4" Show off Position [40, 60] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "0.1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Input Name "V*" Show on Position [40, 95] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "duty" Show on Position [350, 90] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vdc" Show on Position [40, 25] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Product Name "Product" Show off Position [295, 150] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "V" Show on Position [350, 150] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Divide" SrcTerminal 1 DstComponent "Saturation" DstTerminal 1 } Connection { Type Signal SrcComponent "V4" SrcTerminal 1 DstComponent "Min/Max" DstTerminal 3 } Connection { Type Signal SrcComponent "V*" SrcTerminal 1 DstComponent "Divide" DstTerminal 3 } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 Points [65, 25; 65, 50] DstComponent "Min/Max" DstTerminal 2 } Connection { Type Signal SrcComponent "Min/Max" SrcTerminal 1 Points [130, 55; 130, 85] Branch { DstComponent "Divide" DstTerminal 2 } Branch { Points [130, 155] DstComponent "Product" DstTerminal 3 } } Connection { Type Signal SrcComponent "Product" SrcTerminal 1 DstComponent "V" DstTerminal 1 } Connection { Type Signal SrcComponent "Saturation" SrcTerminal 2 Points [255, 90] Branch { DstComponent "duty" DstTerminal 1 } Branch { Points [255, 145] DstComponent "Product" DstTerminal 2 } } } } Component { Type Subsystem Name "Current\nController (PI)" Show on Position [295, 110] Direction up Flipped off Frame [-40, -20; 40, 20] LabelPosition [0, 23] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskType "Digital Current Regulator" MaskDescription "Digital proportional-integral regulator. Also imple" "ments anti-windup. Desired regulator output \"out*\" must be fed back into th" "e \"out\" port after it has been saturated." MaskIconFrame on MaskIconOpaque off MaskIconRotates on MaskInit "% Discretization of continuous gains\nKpz = (Kp/Ki-Ts" "/2)*Ki;\nKiz = Ts*Ki;" Parameter { Variable "Kp" Prompt "Kp" Type FreeText Value "Kp" Show off Tunable off TabName "" } Parameter { Variable "Ki" Prompt "Ki" Type FreeText Value "Ki" Show off Tunable off TabName "" } Parameter { Variable "Ts" Prompt "Ts" Type FreeText Value "Ts_controller" Show off Tunable off TabName "" } Terminal { Type Input Position [-40, -10] Direction left } Terminal { Type Input Position [-40, 10] Direction left } Terminal { Type Output Position [44, -10] Direction right } Schematic { Location [316, 668; 796, 902] ZoomFactor 1 SliderPosition [-1, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "error" Show on Position [45, 30] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "out" Show on Position [45, 135] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "out*" Show on Position [440, 135] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Gain Name "Gain" Show off Position [195, 30] Direction right Flipped off Parameter { Variable "K" Value "Kpz+Kiz" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum" Show off Position [375, 135] 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 Delay Name "Delay" Show off Position [305, 135] Direction right Flipped off Parameter { Variable "N" Value "1" Show off } Parameter { Variable "X0" Value "0" Show off } Parameter { Variable "Ts" Value "Ts" Show on } } Component { Type Sum Name "Sum1" Show off Position [255, 135] 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 "Gain1" Show off Position [195, 135] Direction right Flipped off Parameter { Variable "K" Value "Kiz/(Kpz+Kiz)" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain2" Show off Position [195, 85] Direction right Flipped off Parameter { Variable "K" Value "Kiz" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum2" Show off Position [135, 135] 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 ZeroOrderHold Name "Zero-Order\nHold" Show off Position [100, 30] Direction right Flipped off Parameter { Variable "Ts" Value "Ts" Show off } } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 Points [255, 85] DstComponent "Sum1" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 DstComponent "Delay" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 Points [375, 30] DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain1" SrcTerminal 2 DstComponent "Sum1" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 DstComponent "Gain1" DstTerminal 1 } Connection { Type Signal SrcComponent "out" SrcTerminal 1 DstComponent "Sum2" DstTerminal 2 } Connection { Type Signal SrcComponent "error" SrcTerminal 1 DstComponent "Zero-Order\nHold" DstTerminal 1 } Connection { Type Signal SrcComponent "Zero-Order\nHold" SrcTerminal 2 Points [135, 30] Branch { DstComponent "Gain" DstTerminal 1 } Branch { Points [135, 85] DstComponent "Gain2" DstTerminal 1 } } Connection { Type Signal SrcComponent "Delay" SrcTerminal 2 Points [340, 135] Branch { DstComponent "Sum" DstTerminal 3 } Branch { Points [340, 180; 255, 180] DstComponent "Sum1" DstTerminal 4 } } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 Points [400, 135] Branch { DstComponent "out*" DstTerminal 1 } Branch { Points [400, 195; 135, 195] DstComponent "Sum2" DstTerminal 3 } } } } Component { Type Subsystem Name "Right Leg Duty-Cycle" Show on Position [465, 230] Direction up Flipped off Frame [-45, -20; 45, 20] LabelPosition [0, 23] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-45, -10] Direction left } Terminal { Type Output Position [49, -10] Direction right } Terminal { Type Input Position [-45, 10] Direction left } Terminal { Type Output Position [49, 10] Direction right } Schematic { Location [570, 668; 967, 881] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Product Name "Divide" Show off Position [170, 90] Direction up Flipped off Parameter { Variable "Inputs" Value "/*" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Saturation Name "Saturation" Show off Position [225, 90] Direction right Flipped off Parameter { Variable "UpperLimit" Value "1" Show off } Parameter { Variable "LowerLimit" Value "0" Show off } } Component { Type MinMax Name "Min/Max" Show off Position [100, 55] Direction up Flipped off Parameter { Variable "Operation" Value "2" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type Constant Name "V4" Show off Position [40, 60] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "0.1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Input Name "V*" Show on Position [40, 95] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "duty" Show on Position [350, 90] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vdc" Show on Position [40, 25] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Product Name "Product" Show off Position [295, 150] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "V" Show on Position [350, 150] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Constant Name "Constant" Show off Position [265, 45] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Sum" Show off Position [290, 90] Direction up Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|-+" Show off } Parameter { Variable "DataType" Value "11" Show off } } Connection { Type Signal SrcComponent "Divide" SrcTerminal 1 DstComponent "Saturation" DstTerminal 1 } Connection { Type Signal SrcComponent "V4" SrcTerminal 1 DstComponent "Min/Max" DstTerminal 3 } Connection { Type Signal SrcComponent "V*" SrcTerminal 1 DstComponent "Divide" DstTerminal 3 } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 Points [65, 25; 65, 50] DstComponent "Min/Max" DstTerminal 2 } Connection { Type Signal SrcComponent "Min/Max" SrcTerminal 1 Points [130, 55; 130, 85] Branch { DstComponent "Divide" DstTerminal 2 } Branch { Points [130, 155] DstComponent "Product" DstTerminal 3 } } Connection { Type Signal SrcComponent "Product" SrcTerminal 1 DstComponent "V" DstTerminal 1 } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 Points [290, 45] DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "duty" DstTerminal 1 } Connection { Type Signal SrcComponent "Saturation" SrcTerminal 2 Points [255, 90] Branch { Points [255, 145] DstComponent "Product" DstTerminal 2 } Branch { DstComponent "Sum" DstTerminal 2 } } } } Component { Type Sum Name "Sum" Show off Position [215, 100] 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 [580, 160] Direction right Flipped off Parameter { Variable "Width" Value "[1 1]" Show off } } Component { Type Sum Name "Sum2" Show off Position [345, 180] Direction down 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 "Sum3" Show off Position [365, 100] 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 PulseGenerator Name "Iset" Show on Position [60, 210] Direction right Flipped off Parameter { Variable "Hi" Value "Iset_max" Show on } Parameter { Variable "Lo" Value "Iset_min" Show on } Parameter { Variable "f" Value "ftoggle" Show on } Parameter { Variable "DutyCycle" Value "0.5" Show off } Parameter { Variable "Delay" Value "0" Show off } Parameter { Variable "DataType" Value "9" Show off } } Component { Type SignalMux Name "Mux1" Show off Position [235, 205] Direction left Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Goto Name "Goto" Show off Position [265, 205] Direction left Flipped on Parameter { Variable "Tag" Value "iL" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From" Show off Position [630, 275] Direction right Flipped off Parameter { Variable "Tag" Value "iL" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Scope Name "Scope" Show on Position [670, 285] Direction up Flipped off Location [641, 646; 1397, 984] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAIQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///wAAAAMAAAAAAAA" "AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABQAP///wAAAvQAAAE3" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAAAwAAAGQAAAACAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAACQAAAGQAAA" "AIAAAAZAAAAAEAAABkAAAApgAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAB" "/AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAAnAAAAAQAAAAAAAAPoAAAAACc=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAA==" Axes "3" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "Time (s)" ShowLegend "1" Axis { Name "Inductor Current" AutoScale 1 MinValue 55 MaxValue 120 Signals {} SignalTypes [ ] AxisLabel "Current (A)" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Modulation Index" AutoScale 1 MinValue 0 MaxValue 1.05 Signals {"m1"} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Input Voltage" AutoScale 1 MinValue 650 MaxValue 1000 Signals {} SignalTypes [ ] AxisLabel "Voltage (V)" 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 } } } Component { Type ControlTaskTrigger Name "Control Task Trigger" Show on Position [140, 25] Direction left Flipped on Parameter { Variable "CodeFcn" Value "if (Target.Family ~= \"Imperix Controllers\") then" "\n return 'This block is not compatible with the selected target family (\"%" "s\")' % {Target.Family}\nend\n\nreturn {\n}" Show off } } Component { Type Reference SrcComponent "Imperix_Control/ADC" Name "Vin" Show on Position [160, 155] Direction up Flipped off Frame [-30, -25; 30, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "device" Value "4" Show off } Parameter { Variable "channel" Value "7" Show off } Parameter { Variable "sensor" Value "1" Show off } Parameter { Variable "sensor_gain" Value "Im.K" Show off } Parameter { Variable "sensor_offset" Value "Im.O" 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 "Vdc" Show on Position [160, 295] 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 "11" Show off } Parameter { Variable "sensor" Value "1" Show off } Parameter { Variable "sensor_gain" Value "Vm.K" Show off } Parameter { Variable "sensor_offset" Value "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/Probe variable" Name "Probe variable4" Show off Position [565, 100] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "dl" 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 [565, 220] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "dr" 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 variable6" Show off Position [245, 240] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "Io" 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 variable7" Show off Position [245, 275] 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/Tunable parameter" Name "Tunable parameter" Show off Position [355, 220] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "Vbias" Show off Evaluate off } Parameter { Variable "initial_value" Value "12" 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/CB_PWM" Name "PWM" Show on Position [670, 170] 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 "8:9" 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 "3" 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/Configuration" Name "Configuration" Show on Position [50, 40] 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" 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 "Sum" SrcTerminal 1 DstComponent "Current\nController (PI)" DstTerminal 1 } Connection { Type Signal SrcComponent "Current\nController (PI)" SrcTerminal 3 DstComponent "Sum3" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum3" SrcTerminal 1 DstComponent "Left Leg Duty-Cycle" DstTerminal 1 } Connection { Type Signal SrcComponent "Left Leg Duty-Cycle" SrcTerminal 4 Points [525, 120; 525, 180] DstComponent "Sum2" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 Points [235, 180; 235, 120] DstComponent "Current\nController (PI)" DstTerminal 2 } Connection { Type Signal SrcComponent "Mux1" SrcTerminal 1 DstComponent "Goto" DstTerminal 1 } Connection { Type Signal SrcComponent "From" SrcTerminal 1 DstComponent "Scope" DstTerminal 1 } Connection { Type Signal SrcComponent "Tunable parameter" SrcTerminal 1 Points [385, 220] Branch { DstComponent "Right Leg Duty-Cycle" DstTerminal 1 } Branch { Points [385, 145; 365, 145] Branch { DstComponent "Sum3" DstTerminal 3 } Branch { Points [345, 145] DstComponent "Sum2" DstTerminal 3 } } } Connection { Type Signal SrcComponent "Left Leg Duty-Cycle" SrcTerminal 2 Points [540, 100] Branch { Points [540, 155] DstComponent "Mux" DstTerminal 2 } Branch { DstComponent "Probe variable4" DstTerminal 1 } } Connection { Type Signal SrcComponent "Right Leg Duty-Cycle" SrcTerminal 2 Points [540, 220] Branch { Points [540, 165] DstComponent "Mux" DstTerminal 3 } Branch { DstComponent "Probe variable5" DstTerminal 1 } } Connection { Type Signal SrcComponent "Vin" SrcTerminal 1 Points [215, 155] Branch { DstComponent "Sum" DstTerminal 3 } Branch { Points [215, 200] Branch { DstComponent "Mux1" DstTerminal 3 } Branch { Points [215, 240] DstComponent "Probe variable6" DstTerminal 1 } } } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 Points [215, 295] Branch { Points [400, 295] Branch { Points [400, 240] Branch { DstComponent "Right Leg Duty-Cycle" DstTerminal 3 } Branch { Points [400, 240] Branch { Points [400, 120] DstComponent "Left Leg Duty-Cycle" DstTerminal 3 } } } Branch { DstComponent "Scope" DstTerminal 3 } } Branch { Points [215, 275] DstComponent "Probe variable7" DstTerminal 1 } } Connection { Type Signal SrcComponent "Iset" SrcTerminal 1 Points [95, 210] Branch { Points [95, 100] DstComponent "Sum" DstTerminal 2 } Branch { DstComponent "Mux1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [600, 160] Branch { DstComponent "PWM" DstTerminal 1 } Branch { Points [600, 285] DstComponent "Scope" DstTerminal 2 } } Connection { Type Event SrcComponent "Configuration" SrcTerminal 1 DstComponent "Control Task Trigger" DstTerminal 1 } Connection { Type Event SrcComponent "Configuration" SrcTerminal 3 Points [625, 35] DstComponent "PWM" DstTerminal 4 } Connection { Type Event SrcComponent "Configuration" SrcTerminal 2 Points [115, 45; 115, 170] Branch { DstComponent "Vin" DstTerminal 2 } Branch { DstComponent "Vdc" DstTerminal 2 } } } } Connection { Type Signal SrcComponent "Plant" SrcTerminal 3 Points [325, 100; 325, 215] DstComponent "Calc. Delay1" DstTerminal 1 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 2 Points [310, 130; 310, 185] DstComponent "Calc. Delay" DstTerminal 1 } Connection { Type Signal SrcComponent "Calc. Delay" SrcTerminal 2 Points [65, 185; 65, 130] DstComponent "Controller" DstTerminal 2 } Connection { Type Signal SrcComponent "Calc. Delay1" SrcTerminal 2 Points [50, 215; 50, 100] DstComponent "Controller" DstTerminal 1 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 3 DstComponent "Plant" DstTerminal 1 } Annotation { Name "H-bridge converter deployable on Imperix B-Box RCP and PL" "ECS RT Box" Position [195, 45] } Annotation { Name "This model file has been adapted from PLECS code examples" Position [190, 250] } } } DemoSignature "6WDz0gC4AERn7gvMbXHM+WBFzp9qU7KGEyCI7n7CnwA="