Plecs { Name "Half_bridge" Version "4.5" CircuitModel "ContStateSpace" StartTime "0.0" TimeSpan "0.02" Timeout "" Solver "auto" 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 "3" StiffnessDetectionMsg "2" MaxConsecutiveZCs "0" AlgebraicLoopWithStateMachineMsg "3" AssertionAction "1" InitializationCommands "" 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 "" AlgebraicLoopMethod "1" AlgebraicLoopTolerance "1e-6" ScriptsDialogGeometry "" ScriptsDialogSplitterPos "0" Schematic { Location [0, 23; 1536, 777] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type DCVoltageSource Name "V_dc" Show on Position [200, 115] Direction down Flipped on Parameter { Variable "V" Value "250" Show off } } Component { Type DCVoltageSource Name "V_dc1" Show on Position [200, 210] Direction down Flipped on Parameter { Variable "V" Value "250" Show off } } Component { Type DCVoltageSource Name "V_dc2" Show on Position [230, 160] Direction left Flipped on Parameter { Variable "V" Value "100" Show off } } Component { Type Inductor Name "L1" Show on Position [345, 160] Direction right Flipped off Parameter { Variable "L" Value "1.5e-3" Show off } Parameter { Variable "i_init" Value "0" Show off } } Component { Type Resistor Name "R1" Show on Position [425, 160] Direction right Flipped off Parameter { Variable "R" Value "1" Show off } } Component { Type Comparator Name "Comparator" Show on Position [640, 400] Direction right Flipped off } Component { Type TriangleGenerator Name "Triangular Wave" Show on Position [525, 470] Direction right Flipped off Parameter { Variable "Min" Value "0" Show off } Parameter { Variable "Max" Value "1" Show off } Parameter { Variable "f" Value "50000" Show off } Parameter { Variable "DutyCycle" Value "0.5" Show off } Parameter { Variable "Delay" Value "0" Show off } } Component { Type LogicalOperator Name "Logical\nOperator" Show on Position [765, 400] Direction up Flipped off Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type From Name "From" Show off Position [425, 120] Direction right Flipped off Parameter { Variable "Tag" Value "S1" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From1" Show off Position [425, 205] Direction right Flipped off Parameter { Variable "Tag" Value "S2" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto" Show off Position [885, 400] Direction right Flipped off Parameter { Variable "Tag" Value "S2" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto1" Show off Position [885, 355] Direction right Flipped off Parameter { Variable "Tag" Value "S1" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Ammeter Name "Am1" Show on Position [285, 160] Direction right Flipped off } Component { Type Goto Name "Goto2" Show off Position [305, 200] 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 [705, 180] Direction up Flipped off Location [0, 26; 1536, 807] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAD8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAH4A////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAAB+AP///wAAAAMAAAAAAAAAAPw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABfAP///wAAB4AAAAOxAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAA" "gAAAH0AAAADAAAAfQAAAAEAAAB9AAAABgAAAH0AAAAHAAAAfQAAAAQAAAB9AAAABQAAAH0AAAAIAA" "AAfQAAAAkAAAB9AAAA+wAAAAsBAAABAAAAAAAAAAAAAAAAff////8AAACBAAAAAAAAAAsAAADQAAA" "AAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAA" "AArAAAAAQAAAAAAAAPoAAAAACs=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "1" TimeRange "0.0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] 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 } } } Component { Type Voltmeter Name "Vm1" Show on Position [555, 180] Direction up Flipped off } Component { Type Switch Name "S1" Show on Position [480, 120] Direction down Flipped off Parameter { Variable "s_init" Value "0" Show off } } Component { Type Diode Name "D1" Show on Position [515, 120] 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 Switch Name "S2" Show on Position [480, 205] Direction down Flipped off Parameter { Variable "s_init" Value "0" Show off } } Component { Type Diode Name "D2" Show on Position [515, 205] 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 Scope Name "Scope1" Show on Position [705, 265] Direction up Flipped off Location [0, 26; 1536, 807] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAD8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAH4A////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAAB+AP///wAAAAMAAAAAAAAAAPw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABfAP///wAAB4AAAAOxAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAA" "gAAAH0AAAADAAAAfQAAAAEAAAB9AAAABgAAAH0AAAAHAAAAfQAAAAQAAAB9AAAABQAAAH0AAAAIAA" "AAfQAAAAkAAAB9AAAA+gAAAAsBAAABAAAAAAAAAAAAAAAAff////8AAACBAAAAAAAAAAsAAADPAAA" "AAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAA" "AArAAAAAQAAAAAAAAPoAAAAACs=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "1" TimeRange "0.0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] 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 } } } Component { Type From Name "From2" Show off Position [650, 265] Direction right Flipped off Parameter { Variable "Tag" Value "IL" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Reference SrcComponent "Components/Control/Continuous/Continuous PID\\nController" Name "Continuous PID\nController" Show on Position [405, 395] Direction up Flipped off Frame [-40, -25; 40, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "cont_type" Value "3" Show on } Parameter { Variable "par_source" Value "1" Show on } Parameter { Variable "kp" Value "6.284" Show on } Parameter { Variable "ki" Value "18020" Show on } Parameter { Variable "kd" Value "1" Show off } Parameter { Variable "kf" Value "1" Show off } Parameter { Variable "ex_reset" Value "1" Show off } Parameter { Variable "x0_source" Value "1" Show on } Parameter { Variable "x0" Value "0" Show on } Parameter { Variable "ex_sat" Value "1" Show on } Parameter { Variable "sat_lim" Value "1" Show on } Parameter { Variable "up_limit" Value "1" Show on } Parameter { Variable "low_limit" Value "0" Show on } Parameter { Variable "aw_method" Value "3" Show on } Parameter { Variable "kbc" Value "1" Show off } Terminal { Type Input Position [-40, 0] Direction left } Terminal { Type Output Position [44, 0] Direction right } Terminal { Type Input Position [-5, -25] Direction up } Terminal { Type Input Position [5, -25] Direction up } Terminal { Type Input Position [15, -25] Direction up } Terminal { Type Input Position [-40, -15] Direction left } Terminal { Type Input Position [-40, 10] Direction left } Terminal { Type Input Position [25, -25] Direction up } Terminal { Type Input Position [35, -25] Direction up } Terminal { Type Input Position [-40, -20] Direction left } Terminal { Type Input Position [-40, -10] Direction left } Terminal { Type Input Position [-40, 20] Direction left } } Component { Type Sum Name "Sum" Show off Position [235, 395] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type From Name "From3" Show off Position [160, 460] Direction right Flipped off Parameter { Variable "Tag" Value "IL" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type SineGenerator Name "Sine Wave" Show on Position [80, 395] Direction right Flipped off Parameter { Variable "Amplitude" Value "15" Show off } Parameter { Variable "Bias" Value "0" Show off } Parameter { Variable "Frequency" Value "125*2*pi" Show off } Parameter { Variable "Phase" Value "0" Show off } Parameter { Variable "Units" Value "1" Show off } } Connection { Type Wire SrcComponent "V_dc" SrcTerminal 2 Points [200, 160] Branch { DstComponent "V_dc1" DstTerminal 1 } Branch { DstComponent "V_dc2" DstTerminal 2 } Branch { Points [155, 160; 155, 300; 555, 300] DstComponent "Vm1" DstTerminal 2 } } Connection { Type Wire SrcComponent "L1" SrcTerminal 1 DstComponent "R1" DstTerminal 2 } Connection { Type Wire SrcComponent "S2" SrcTerminal 2 Points [480, 160] Branch { DstComponent "R1" DstTerminal 1 } Branch { DstComponent "S1" DstTerminal 1 } Branch { Points [515, 160] Branch { DstComponent "Vm1" DstTerminal 1 } Branch { DstComponent "D1" DstTerminal 1 } Branch { DstComponent "D2" DstTerminal 2 } } } Connection { Type Signal SrcComponent "Triangular Wave" SrcTerminal 1 Points [580, 470; 580, 405] DstComponent "Comparator" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator" SrcTerminal 1 DstComponent "Goto" DstTerminal 1 } Connection { Type Signal SrcComponent "Comparator" SrcTerminal 3 Points [705, 400] Branch { DstComponent "Logical\nOperator" DstTerminal 2 } Branch { Points [705, 355] DstComponent "Goto1" DstTerminal 1 } } Connection { Type Wire SrcComponent "L1" SrcTerminal 2 DstComponent "Am1" DstTerminal 1 } Connection { Type Wire SrcComponent "Am1" SrcTerminal 2 DstComponent "V_dc2" DstTerminal 1 } Connection { Type Signal SrcComponent "Am1" SrcTerminal 3 DstComponent "Goto2" DstTerminal 1 } Connection { Type Signal SrcComponent "Vm1" SrcTerminal 3 DstComponent "Scope" DstTerminal 1 } Connection { Type Signal SrcComponent "From" SrcTerminal 1 DstComponent "S1" DstTerminal 3 } Connection { Type Wire SrcComponent "V_dc" SrcTerminal 1 Points [200, 75; 480, 75] Branch { DstComponent "S1" DstTerminal 2 } Branch { Points [515, 75] DstComponent "D1" DstTerminal 2 } } Connection { Type Signal SrcComponent "From1" SrcTerminal 1 DstComponent "S2" DstTerminal 3 } Connection { Type Wire SrcComponent "V_dc1" SrcTerminal 2 Points [200, 250; 480, 250] Branch { DstComponent "S2" DstTerminal 1 } Branch { Points [515, 250] DstComponent "D2" DstTerminal 1 } } Connection { Type Signal SrcComponent "From2" SrcTerminal 1 DstComponent "Scope1" DstTerminal 1 } Connection { Type Signal SrcComponent "From3" SrcTerminal 1 Points [235, 460] DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Sine Wave" SrcTerminal 1 DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Continuous PID\nController" SrcTerminal 2 DstComponent "Comparator" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "Continuous PID\nController" DstTerminal 1 } } }