Plecs { Name "buck_ac_sweep_acm_S_domain" Version "3.7" CircuitModel "ContStateSpace" StartTime "0.0" StopTime "1e-2" Solver "dopri" MaxStep "1e-3" InitStep "-1" FixedStep "1e-3" Refine "4" ZCStepSize "1e-9" RelTol "1e-6" AbsTol "-1" TurnOnThreshold "0" SyncFixedStepTasks "2" UseSingleCommonBaseRate "2" LossVariableLimitExceededMsg "3" NegativeSwitchLossMsg "3" DivisionByZeroMsg "2" StiffnessDetectionMsg "2" MaxConsecutiveZCs "1000" AssertionAction "1" InitializationCommands "fid = fopen(\"myfile.txt\");\n\nfor i = 1:100\n\tfli" "ne = fgetl(fid);\n\t\n\tif(fline == -1)\n\t\tbreak;\n\tend\n\n\tdisp(fline);" "\n\teval(fline);\n\t\t\n\t\nend\n\nfclose(fid)" InitialState "1" SystemState "" CodeGenTopologies "[]" CodeGenSwitchingAlgorithm "1" CodeGenMatrixCodingStyle "1" CodeGenParameterInlining "2" CodeGenInliningExceptions "AAAACwAAAAAA" CodeGenIntegerWordSize "32" CodeGenAbsTimeUsageMsg "3" CodeGenBaseName "" CodeGenOutputDir "" CodeGenExtraOpts "" ExtendedMatrixPrecision "1" MatrixSignificanceCheck "2" Schematic { Location [0, 45; 3840, 2060] ZoomFactor 2.37037 SliderPosition [0, -506] ShowBrowser off BrowserWidth 100 Component { Type Reference SrcComponent "Components/Control/Small Signal Analysis/Loop Gain Meter" Name "Loop Gain Meter" Show on Position [215, 515] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [-13, 0] LabelAlign right Parameter { Variable "invert" Value "2" Show off } Terminal { Type Input Position [10, 0] Direction right } Terminal { Type Output Position [-14, 0] Direction left } } Component { Type DCVoltageSource Name "V_dc1" Show off Position [220, 165] Direction down Flipped on Parameter { Variable "V" Value "Vinput" Show on } } Component { Type Diode Name "D1" Show off Position [360, 170] 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 Inductor Name "L1" Show off Position [400, 85] Direction left Flipped off Parameter { Variable "L" Value "Lout" Show on } Parameter { Variable "i_init" Value "0" Show off } } Component { Type Resistor Name "R" Show off Position [635, 165] Direction down Flipped off Parameter { Variable "R" Value "Rload" Show on } } Component { Type Capacitor Name "C1" Show off Position [555, 215] Direction down Flipped on Parameter { Variable "C" Value "Cout" Show on } Parameter { Variable "v_init" Value "0" Show on } } Component { Type PlecsProbe Name "Probe\nIL-Vo" Show on Position [95, 125] Direction right Flipped off } Component { Type Ammeter Name "Am1" Show on Position [520, 85] Direction left Flipped off } Component { Type Voltmeter Name "Vout" Show on Position [750, 165] Direction up Flipped off } Component { Type Goto Name "Goto" Show off Position [825, 165] Direction right Flipped off Parameter { Variable "Tag" Value "Vo" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto1" Show off Position [555, 60] Direction right Flipped off Parameter { Variable "Tag" Value "IL" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From2" Show off Position [310, 135] Direction up Flipped off Parameter { Variable "Tag" Value "PWM" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Ground Name "Ground1" Show off Position [220, 275] Direction up Flipped off } Component { Type Resistor Name "R2" Show off Position [460, 85] Direction left Flipped off Parameter { Variable "R" Value "Lout_ESR" Show on } } Component { Type Resistor Name "R4" Show off Position [555, 150] Direction down Flipped off Parameter { Variable "R" Value "Cout_ESR" Show on } } Component { Type SignalDemux Name "Demux1" Show off Position [140, 125] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Scope Name "Scope1" Show on Position [180, 125] Direction up Flipped off Location [971, 693; 1382, 1128] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAGcA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAHEA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABxAP///wAAAAMAAAAAAAAAAPw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABpAP///wAAAZsAAAGQAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAC" "QAAAGQAAAAIAAAAZAAAAAcAAABkAAAABgAAAGQAAAAFAAAAZAAAAAQAAABkAAAAAwAAAGQAAAACAA" "AAZAAAAAEAAABkAAAA1QAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAMAAAChAAA" "AAQAAAAAAAAAAAAAACQAAAAAAAAA0AAAAAQAAAAA=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA" "AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" Axes "2" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" Axis { Name "IL" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Vout" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] 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 } } } Component { Type Resistor Name "R1" Show on Position [255, 85] Direction right Flipped off Parameter { Variable "R" Value "1e-3" Show off } } Component { Type MosfetWithDiode Name "FETD" Show on Position [310, 85] Direction left Flipped off Parameter { Variable "Ron" Value "0" 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 TransferFunction Name "Transfer Fcn Vo" Show on Position [290, 390] Direction right Flipped off Frame [-30, -15; 30, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "Numerator" Value "[b2s_v b1s_v b0s_v]" Show off } Parameter { Variable "Denominator" Value "[a2s_v a1s_v a0s_v]" Show off } Parameter { Variable "X0" Value "0" Show off } } Component { Type Sum Name "Sum1" Show off Position [215, 390] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } } Component { Type Gain Name "Voltage \nSensor Gain" Show on Position [215, 455] Direction up Flipped off Parameter { Variable "K" Value "Hs_v" Show off } Parameter { Variable "Multiplication" Value "1" Show off } } Component { Type TransferFunction Name "Transfer Fcn IL" Show on Position [540, 390] Direction right Flipped off Frame [-30, -15; 30, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "Numerator" Value "[b2s_i b1s_i b0s_i]" Show off } Parameter { Variable "Denominator" Value "[a2s_i a1s_i a0s_i]" Show off } Parameter { Variable "X0" Value "0" Show off } } Component { Type Sum Name "Sum2" Show off Position [465, 390] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } } Component { Type Gain Name "Current\nSensor Gain" Show on Position [465, 455] Direction up Flipped off Parameter { Variable "K" Value "Hs_i" Show off } Parameter { Variable "Multiplication" Value "1" Show off } } Component { Type Subsystem Name "Modulator" Show on Position [765, 390] Direction down Flipped off Frame [-50, -20; 50, 20] LabelPosition [0, 0] SampleTime "-1" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [-54, 0] Direction left } Terminal { Type Input Position [50, 0] Direction right } Schematic { Location [0, 20; 960, 467] ZoomFactor 1 SliderPosition [121, 0] ShowBrowser off BrowserWidth 100 Component { Type TriangleGenerator Name "Sawtooth\nGenerator" Show off Position [265, 95] Direction right Flipped on Parameter { Variable "Min" Value "0" Show off } Parameter { Variable "Max" Value "1" Show off } Parameter { Variable "f" Value "fsw" Show on } Parameter { Variable "DutyCycle" Value "1" Show off } Parameter { Variable "Delay" Value "0" Show off } } Component { Type RelationalOperator Name "Relational\nOperator" Show off Position [205, 150] Direction right Flipped on Parameter { Variable "Operator" Value "3" Show off } } Component { Type Output Name "PWM" Show on Position [150, 150] Direction left Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Gain Name "Gain" Show off Position [375, 155] Direction right Flipped on Parameter { Variable "K" Value "1/VM_i" Show off } Parameter { Variable "Multiplication" Value "1" Show off } } Component { Type Saturation Name "Saturation" Show off Position [295, 155] Direction right Flipped on Parameter { Variable "UpperLimit" Value "0.99" Show on } Parameter { Variable "LowerLimit" Value "0.01" Show on } } Component { Type Input Name "Vc" Show on Position [445, 155] Direction right Flipped on Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Sawtooth\nGenerator" SrcTerminal 1 Points [235, 95] DstComponent "Relational\nOperator" DstTerminal 1 } Connection { Type Signal SrcComponent "Relational\nOperator" SrcTerminal 3 DstComponent "PWM" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "Saturation" DstTerminal 1 } Connection { Type Signal SrcComponent "Vc" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Saturation" SrcTerminal 2 DstComponent "Relational\nOperator" DstTerminal 2 } } } Component { Type Saturation Name "Saturation" Show on Position [385, 390] Direction right Flipped off Parameter { Variable "UpperLimit" Value "VM_i*0.99" Show on } Parameter { Variable "LowerLimit" Value "VM_i*0.01" Show on } } Component { Type Saturation Name "Saturation1" Show on Position [650, 390] Direction right Flipped off Parameter { Variable "UpperLimit" Value "VM_i*0.99" Show on } Parameter { Variable "LowerLimit" Value "VM_i*0.01" Show on } } Component { Type From Name "From1" Show off Position [465, 515] Direction up Flipped off Parameter { Variable "Tag" Value "IL" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From" Show off Position [215, 560] Direction up Flipped off Parameter { Variable "Tag" Value "Vo" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Constant Name "Voltage \nController\nReference" Show on Position [155, 390] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "Vc_v" Show off } } Component { Type Goto Name "Goto6" Show off Position [850, 390] Direction right Flipped off Parameter { Variable "Tag" Value "PWM" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Connection { Type Wire SrcComponent "FETD" SrcTerminal 2 Points [360, 85] Branch { DstComponent "L1" DstTerminal 1 } Branch { DstComponent "D1" DstTerminal 2 } } Connection { Type Wire SrcComponent "R" SrcTerminal 2 Points [635, 85] Branch { Points [555, 85] Branch { DstComponent "R4" DstTerminal 2 } Branch { DstComponent "Am1" DstTerminal 2 } } Branch { Points [750, 85] DstComponent "Vout" DstTerminal 1 } } Connection { Type Wire SrcComponent "D1" SrcTerminal 1 Points [360, 255] Branch { Points [220, 255] Branch { DstComponent "V_dc1" DstTerminal 2 } Branch { DstComponent "Ground1" DstTerminal 1 } } Branch { Points [555, 255] Branch { DstComponent "C1" DstTerminal 2 } Branch { Points [635, 255] Branch { DstComponent "R" DstTerminal 1 } Branch { Points [750, 255] DstComponent "Vout" DstTerminal 2 } } } } Connection { Type Wire SrcComponent "Am1" SrcTerminal 1 DstComponent "R2" DstTerminal 2 } Connection { Type Wire SrcComponent "R2" SrcTerminal 1 DstComponent "L1" DstTerminal 2 } Connection { Type Wire SrcComponent "C1" SrcTerminal 1 DstComponent "R4" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 DstComponent "Scope1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 DstComponent "Scope1" DstTerminal 2 } Connection { Type Signal SrcComponent "Probe\nIL-Vo" SrcTerminal 1 DstComponent "Demux1" DstTerminal 1 } Connection { Type Wire SrcComponent "FETD" SrcTerminal 1 DstComponent "R1" DstTerminal 1 } Connection { Type Wire SrcComponent "R1" SrcTerminal 2 Points [220, 85] DstComponent "V_dc1" DstTerminal 1 } Connection { Type Signal SrcComponent "From2" SrcTerminal 1 DstComponent "FETD" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 DstComponent "Transfer Fcn Vo" DstTerminal 1 } Connection { Type Signal SrcComponent "Voltage \nSensor Gain" SrcTerminal 2 DstComponent "Sum1" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 DstComponent "Transfer Fcn IL" DstTerminal 1 } Connection { Type Signal SrcComponent "Current\nSensor Gain" SrcTerminal 2 DstComponent "Sum2" DstTerminal 3 } Connection { Type Signal SrcComponent "Modulator" SrcTerminal 1 DstComponent "Goto6" DstTerminal 1 } Connection { Type Signal SrcComponent "Transfer Fcn Vo" SrcTerminal 2 DstComponent "Saturation" DstTerminal 1 } Connection { Type Signal SrcComponent "Transfer Fcn IL" SrcTerminal 2 DstComponent "Saturation1" DstTerminal 1 } Connection { Type Signal SrcComponent "Saturation" SrcTerminal 2 DstComponent "Sum2" DstTerminal 2 } Connection { Type Signal SrcComponent "Saturation1" SrcTerminal 2 DstComponent "Modulator" DstTerminal 2 } Connection { Type Signal SrcComponent "From1" SrcTerminal 1 DstComponent "Current\nSensor Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Voltage \nController\nReference" SrcTerminal 1 DstComponent "Sum1" DstTerminal 2 } Connection { Type Signal SrcComponent "From" SrcTerminal 1 DstComponent "Loop Gain Meter" DstTerminal 1 } Connection { Type Signal SrcComponent "Loop Gain Meter" SrcTerminal 2 DstComponent "Voltage \nSensor Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Am1" SrcTerminal 3 Points [520, 60] DstComponent "Goto1" DstTerminal 1 } Connection { Type Signal SrcComponent "Vout" SrcTerminal 3 DstComponent "Goto" DstTerminal 1 } } ProbeBlock { Tag "buck_ac_sweep_acm_S_domain/Probe\\nIL-Vo" Probe { Component "L1" Path "" Signals {"Inductor current"} } Probe { Component "C1" Path "" Signals {"Capacitor voltage"} } } Analysis { Type ACSweep Name "Open-Loop Gain (AC Sweep)" OperatingPoint "1" TimeSpan "-1" StartTime "0" Tolerance "1e-4" MaxIter "20" FrequencyRange "[100 fsw*0.4]" FrequencyScale "2" AdditionalFreqs "[]" AmplitudeRange "1e-1" NumPoints "50" Perturbation "Loop Gain Meter/Perturbation" Response "Loop Gain Meter/Response" JacobianPerturbation "1e-4" JacobianCalculation "2" InitCycles "0" } } DemoSignature "rVRRGNkK5x6p7BjLbtxyI8erbXfK/gaEhSnQx3MTwOI="