Plecs { Name "Forward_Magnetics_2" Version "4.3" CircuitModel "ContStateSpace" StartTime "0.0" StopTime "40e-3" Timeout "" Solver "radau" MaxStep "1e-3" InitStep "-1" FixedStep "1e-4" Refine "1" ZCStepSize "1e-9" RelTol "1e-5" AbsTol "-1" TurnOnThreshold "0.0001" SyncFixedStepTasks "2" UseSingleCommonBaseRate "2" LossVariableLimitExceededMsg "3" NegativeSwitchLossMsg "3" DivisionByZeroMsg "2" StiffnessDetectionMsg "2" MaxConsecutiveZCs "1000" AlgebraicLoopWithStateMachineMsg "2" AssertionAction "1" InitializationCommands "B_sat = 1.56; % saturation flux density of the core " "block\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" "%%%%%%%\n%*******************************************************************" "******%\n% Calculating air gap distance\n%***********************************" "**************************************%\nmu0 = 4*pi*1e-7; % vacuum magnetic p" "ermeability constant \nA_core = 2.7e-4; % cross-sectional area of the core bl" "ock\nl_core = 17.5e-2; % average length of single core block\nmu_r_unsat = 45" "000; % relative susceptibility in unsaturated condition\nR_mag_core = 1/(mu0*" "mu_r_unsat)*l_core/A_core; % magnetic reluctance of single core block \nN_1 =" " 72; % turns number of the primary winding \nN_2 = 6; % turns number of the s" "econdary winding\nN_3 = 72; % turns number of the demagnetization winding\n\n" "A_airgap = A_core*1.1; % air gap cross-sectional area, a multiplication facto" "r 1.1 is assumed considering fringing effect \nL_m = 5e-3; % desired magnetiz" "ation inductance from primary side\nR_mag_total = (N_1^2)/L_m; % total magnet" "ic reluctance = 2*R_mag_airgap + 2*R_mag_core \nR_mag_airgap = (R_mag_total " "- R_mag_core*2)/2; % magnetic reluctance in the air gap\nl_airgap = R_mag_air" "gap*mu0*A_airgap; % distance of single air gap\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%" "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%**************************" "***********************************************%\n% Calculating leakage perme" "ance\n%**********************************************************************" "***%\nL_k2 = 1e-8; % leakage inductance value of the secondary winding from E" "xercise 1\n% Under the assumption that the leakage path's magnetization reluc" "tance for\n% each of the three windings are the same, the leakage inductance " "are proportional\n% to the square of the winding turns number\nL_k1 = ((72/6)" "^2)*L_k2; \nL_k3 = ((72/6)^2)*L_k2;\n\nP_k1 = L_k1/(N_1^2);\nP_k2 = L_k2/(" "N_2^2);\nP_k3 = L_k3/(N_3^2);\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" InitialState "1" SystemState "" CodeGenParameterInlining "2" CodeGenInliningExceptions "AAAACwAAAAAA" CodeGenFloatingPointFormat "2" CodeGenAbsTimeUsageMsg "3" CodeGenBaseName "" CodeGenOutputDir "" CodeGenExtraOpts "" CodeGenTarget "Generic" CodeGenTargetSettings "" ExtendedMatrixPrecision "1" MatrixSignificanceCheck "2" EnableStateSpaceSplitting "2" DisplayStateSpaceSplitting "1" DiscretizationMethod "2" ExternalModeSettings "" AlgebraicLoopMethod "1" AlgebraicLoopTolerance "1e-6" ScriptsDialogGeometry "" ScriptsDialogSplitterPos "0" Schematic { Location [353, 45; 1329, 384] ZoomFactor 1 SliderPosition [1, 0] ShowBrowser off BrowserWidth 100 Component { Type PulseGenerator Name "Pulse Generator" Show off Position [270, 250] Direction right Flipped off Parameter { Variable "Hi" Value "1" Show off } Parameter { Variable "Lo" Value "0" Show off } Parameter { Variable "f" Value "20e3" Show on } Parameter { Variable "DutyCycle" Value "0.4" Show on } Parameter { Variable "Delay" Value "0" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Inductor Name "L2" Show off Position [710, 75] Direction left Flipped off Parameter { Variable "L" Value "50e-6" Show on } Parameter { Variable "i_init" Value "0" Show off } } Component { Type Capacitor Name "C2" Show off Position [765, 100] Direction down Flipped on Parameter { Variable "C" Value "400e-6" Show on } Parameter { Variable "v_init" Value "0" Show off } } Component { Type Resistor Name "R2" Show off Position [805, 100] Direction down Flipped off Parameter { Variable "R" Value "1" Show on } } Component { Type Voltmeter Name "Vm2" Show off Position [845, 115] Direction up Flipped off } Component { Type Mosfet Name "FET2" Show off Position [340, 250] Direction up Flipped off Parameter { Variable "Ron" Value "1e-3" Show off } Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type PlecsProbe Name "Probe1" Show on Position [785, 185] Direction right Flipped off } Component { Type SignalDemux Name "CDemux" Show off Position [840, 185] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Diode Name "D10" Show off Position [410, 260] Direction up Flipped on Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "1e-3" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type ACVoltageSource Name "V_ac1" Show off Position [40, 185] Direction down Flipped on Parameter { Variable "V" Value "325" Show on } Parameter { Variable "w" Value "2*pi*50" Show on } Parameter { Variable "phi" Value "0" Show off } } Component { Type Diode Name "D11" Show off Position [125, 110] Direction down Flipped off Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Diode Name "D12" Show off Position [125, 260] Direction down Flipped off Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Diode Name "D13" Show off Position [170, 110] Direction down Flipped off Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Diode Name "D14" Show off Position [170, 260] Direction down Flipped off Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Capacitor Name "C3" Show off Position [215, 180] Direction up Flipped off Parameter { Variable "C" Value "100e-6" Show off } Parameter { Variable "v_init" Value "0" Show off } } Component { Type Inductor Name "L4" Show off Position [80, 155] Direction left Flipped off Parameter { Variable "L" Value "2e-4" Show off } Parameter { Variable "i_init" Value "0" Show off } } Component { Type Scope Name "Scope1" Show on Position [910, 125] Direction up Flipped off Location [1330, 45; 1894, 650] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAIQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///wAAAAMAAAOcAAAAkPw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAAAAA5wAAABCAP///wAAAjQAAAJBAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAC" "QAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAQAAAGQAAAADAA" "AAZAAAAAIAAABkAAADnAAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAClAAA" "AAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAA" "AL3AAAAAQAAAAAAAAPoAAAAABM=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA" "AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "==" Axes "3" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "Time (s)" Axis { Name "Output Voltage" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Load voltage"} SignalTypes [ ] AxisLabel "Voltage (V)" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "MOSFET Current" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] AxisLabel "Current (A)" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Inductor 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 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 Diode Name "D1" Show on Position [635, 75] Direction left Flipped off Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Diode Name "D2" Show on Position [660, 115] Direction up Flipped on Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Resistor Name "RM" Show on Position [370, 250] Direction up Flipped off Parameter { Variable "R" Value "1e6" Show off } } Component { Type Resistor Name "RD" Show on Position [440, 260] Direction up Flipped off Parameter { Variable "R" Value "1e6" Show off } } Component { Type Resistor Name "RD1" Show on Position [635, 50] Direction left Flipped on Parameter { Variable "R" Value "1e6" Show off } } Component { Type Resistor Name "RD2" Show on Position [685, 115] Direction up Flipped off Parameter { Variable "R" Value "1e6" Show off } } Component { Type MagneticInterface Name "MagInt5" Show off Position [460, 90] Direction up Flipped off Parameter { Variable "n" Value "N_1" Show off } Parameter { Variable "Polarity" Value "1" Show off } } Component { Type MagneticInterface Name "MagInt8" Show off Position [585, 90] Direction down Flipped off Parameter { Variable "n" Value "N_2" Show off } Parameter { Variable "Polarity" Value "1" Show off } } Component { Type MagneticInterface Name "MagInt9" Show off Position [460, 180] Direction up Flipped off Parameter { Variable "n" Value "N_3" Show off } Parameter { Variable "Polarity" Value "2" Show off } } Component { Type Reference SrcComponent "Components/Magnetic/P_air" Name "P_g3" Show off Position [585, 175] Direction up Flipped on Frame [-8, -10; 8, 10] LabelPosition [11, 0] LabelAlign left Parameter { Variable "A" Value "A_airgap" Show off } Parameter { Variable "l" Value "l_airgap" Show off } Parameter { Variable "F_init" Value "0" Show off } Terminal { Type MagneticPort Position [0, -15] Direction up } Terminal { Type MagneticPort Position [0, 15] Direction down } } Component { Type Reference SrcComponent "Components/Magnetic/P_leak" Name "P_leak1" Show off Position [495, 90] Direction up Flipped off Frame [-8, -15; 8, 15] LabelPosition [11, 0] LabelAlign left Parameter { Variable "P" Value "P_k1" Show off } Parameter { Variable "F_init" Value "0" Show off } Terminal { Type MagneticPort Position [0, -20] Direction up } Terminal { Type MagneticPort Position [0, 20] Direction down } } Component { Type Reference SrcComponent "Components/Magnetic/P_leak" Name "P_leak2" Show off Position [495, 180] Direction up Flipped off Frame [-8, -15; 8, 15] LabelPosition [11, 0] LabelAlign left Parameter { Variable "P" Value "P_k3" Show off } Parameter { Variable "F_init" Value "0" Show off } Terminal { Type MagneticPort Position [0, -20] Direction up } Terminal { Type MagneticPort Position [0, 20] Direction down } } Component { Type Reference SrcComponent "Components/Magnetic/P_air" Name "P_g2" Show off Position [460, 135] Direction up Flipped off Frame [-8, -10; 8, 10] LabelPosition [11, 0] LabelAlign left Parameter { Variable "A" Value "A_airgap" Show off } Parameter { Variable "l" Value "l_airgap" Show off } Parameter { Variable "F_init" Value "0" Show off } Terminal { Type MagneticPort Position [0, -15] Direction up } Terminal { Type MagneticPort Position [0, 15] Direction down } } Component { Type Reference SrcComponent "Components/Magnetic/P_lin" Name "P_lin2" Show on Position [525, 225] Direction right Flipped on Frame [-15, -8; 15, 8] LabelPosition [0, 11] LabelAlign up Parameter { Variable "A" Value "A_core" Show off } Parameter { Variable "l" Value "l_core" Show off } Parameter { Variable "mu_r" Value "mu_r_unsat" Show off } Parameter { Variable "F_init" Value "0" Show off } Terminal { Type MagneticPort Position [0, -20] Direction up } Terminal { Type MagneticPort Position [0, 20] Direction down } } Component { Type Reference SrcComponent "Components/Magnetic/P_lin" Name "P_lin1" Show on Position [525, 40] Direction left Flipped on Frame [-15, -8; 15, 8] LabelPosition [0, -11] LabelAlign down Parameter { Variable "A" Value "A_core" Show off } Parameter { Variable "l" Value "l_core" Show off } Parameter { Variable "mu_r" Value "mu_r_unsat" Show off } Parameter { Variable "F_init" Value "0" Show off } Terminal { Type MagneticPort Position [0, -20] Direction up } Terminal { Type MagneticPort Position [0, 20] Direction down } } Component { Type Reference SrcComponent "Components/Magnetic/P_leak" Name "P_leak3" Show off Position [550, 90] Direction up Flipped off Frame [-8, -15; 8, 15] LabelPosition [11, 0] LabelAlign left Parameter { Variable "P" Value "P_k1" Show off } Parameter { Variable "F_init" Value "0" Show off } Terminal { Type MagneticPort Position [0, -20] Direction up } Terminal { Type MagneticPort Position [0, 20] Direction down } } Connection { Type Signal SrcComponent "Probe1" SrcTerminal 1 DstComponent "CDemux" DstTerminal 1 } Connection { Type Signal SrcComponent "CDemux" SrcTerminal 2 Points [865, 180; 865, 125] DstComponent "Scope1" DstTerminal 2 } Connection { Type Signal SrcComponent "CDemux" SrcTerminal 3 Points [875, 190; 875, 135] DstComponent "Scope1" DstTerminal 3 } Connection { Type Wire SrcComponent "D12" SrcTerminal 1 Points [125, 295; 170, 295] Branch { Points [215, 295] Branch { Points [340, 295] Branch { Points [370, 295] Branch { Points [410, 295] Branch { DstComponent "D10" DstTerminal 1 } Branch { Points [440, 295] DstComponent "RD" DstTerminal 2 } } Branch { DstComponent "RM" DstTerminal 2 } } Branch { DstComponent "FET2" DstTerminal 2 } } Branch { DstComponent "C3" DstTerminal 2 } } Branch { DstComponent "D14" DstTerminal 1 } } Connection { Type Wire SrcComponent "V_ac1" SrcTerminal 1 Points [40, 155] DstComponent "L4" DstTerminal 1 } Connection { Type Signal SrcComponent "Pulse Generator" SrcTerminal 1 DstComponent "FET2" DstTerminal 3 } Connection { Type Signal SrcComponent "Vm2" SrcTerminal 3 DstComponent "Scope1" DstTerminal 1 } Connection { Type Wire SrcComponent "D2" SrcTerminal 1 Points [660, 135] Branch { Points [660, 150] Branch { Points [765, 150] Branch { Points [805, 150] Branch { Points [845, 150] DstComponent "Vm2" DstTerminal 2 } Branch { DstComponent "R2" DstTerminal 1 } } Branch { DstComponent "C2" DstTerminal 2 } } Branch { Points [610, 150; 610, 105] DstComponent "MagInt8" DstTerminal 1 } } Branch { DstComponent "RD2" DstTerminal 2 } } Connection { Type Wire SrcComponent "L2" SrcTerminal 1 Points [660, 75] Branch { DstComponent "D1" DstTerminal 2 } Branch { Points [660, 90] Branch { DstComponent "D2" DstTerminal 2 } Branch { Points [685, 90] DstComponent "RD2" DstTerminal 1 } } Branch { Points [660, 50] DstComponent "RD1" DstTerminal 1 } } Connection { Type Magnetic SrcComponent "P_lin2" SrcTerminal 2 Points [585, 225] DstComponent "P_g3" DstTerminal 1 } Connection { Type Wire SrcComponent "MagInt9" SrcTerminal 1 Points [410, 165; 410, 75] Branch { Points [215, 75] Branch { DstComponent "C3" DstTerminal 1 } Branch { Points [170, 75] Branch { DstComponent "D13" DstTerminal 2 } Branch { Points [125, 75] DstComponent "D11" DstTerminal 2 } } } Branch { DstComponent "MagInt5" DstTerminal 1 } } Connection { Type Magnetic SrcComponent "P_lin1" SrcTerminal 2 Points [460, 40; 460, 60] Branch { DstComponent "MagInt5" DstTerminal 3 } Branch { Points [495, 60] DstComponent "P_leak1" DstTerminal 1 } } Connection { Type Wire SrcComponent "D1" SrcTerminal 1 Points [610, 75] Branch { Points [610, 50] DstComponent "RD1" DstTerminal 2 } Branch { DstComponent "MagInt8" DstTerminal 2 } } Connection { Type Magnetic SrcComponent "P_lin1" SrcTerminal 1 Points [585, 40; 585, 60] Branch { DstComponent "MagInt8" DstTerminal 4 } Branch { Points [550, 60] DstComponent "P_leak3" DstTerminal 1 } } Connection { Type Magnetic SrcComponent "P_lin2" SrcTerminal 1 Points [460, 225; 460, 205] Branch { DstComponent "MagInt9" DstTerminal 4 } Branch { Points [495, 205] DstComponent "P_leak2" DstTerminal 2 } } Connection { Type Magnetic SrcComponent "MagInt9" SrcTerminal 3 Points [460, 150] Branch { DstComponent "P_g2" DstTerminal 2 } Branch { Points [495, 150] DstComponent "P_leak2" DstTerminal 1 } } Connection { Type Magnetic SrcComponent "P_g2" SrcTerminal 1 Points [460, 120] Branch { DstComponent "MagInt5" DstTerminal 4 } Branch { Points [495, 120] DstComponent "P_leak1" DstTerminal 2 } } Connection { Type Magnetic SrcComponent "P_g3" SrcTerminal 2 Points [585, 120] Branch { DstComponent "MagInt8" DstTerminal 3 } Branch { Points [550, 120] DstComponent "P_leak3" DstTerminal 2 } } Connection { Type Wire SrcComponent "D14" SrcTerminal 2 Points [170, 215] Branch { DstComponent "D13" DstTerminal 1 } Branch { Points [40, 215] DstComponent "V_ac1" DstTerminal 2 } } Connection { Type Wire SrcComponent "D12" SrcTerminal 2 Points [125, 155] Branch { DstComponent "D11" DstTerminal 1 } Branch { DstComponent "L4" DstTerminal 2 } } Connection { Type Wire SrcComponent "L2" SrcTerminal 2 Points [765, 75] Branch { Points [805, 75] Branch { Points [845, 75] DstComponent "Vm2" DstTerminal 1 } Branch { DstComponent "R2" DstTerminal 2 } } Branch { DstComponent "C2" DstTerminal 1 } } Connection { Type Wire SrcComponent "MagInt5" SrcTerminal 2 Points [340, 105; 340, 225] Branch { DstComponent "FET2" DstTerminal 1 } Branch { Points [370, 225] DstComponent "RM" DstTerminal 1 } } Connection { Type Wire SrcComponent "MagInt9" SrcTerminal 2 Points [410, 195; 410, 225] Branch { DstComponent "D10" DstTerminal 2 } Branch { Points [440, 225] DstComponent "RD" DstTerminal 1 } } Annotation { Name "Forward converter with transformer circuit including air " "gaps and leakage" Position [230, 35] } } ProbeBlock { Tag "Forward_Magnetics_2/Probe1" Probe { Component "FET2" Path "" Signals {"MOSFET current"} } Probe { Component "L2" Path "" Signals {"Inductor current"} } } } DemoSignature "X31oNz7e/CpT3WNVAMrs7VE1jfLOelHX48/wZEYpn5o="