How to create control-to-output transfer function plots in LTSpice - Page 1
Forum section: electronics / beginners

author: state_of_flux
author_rank: Contributor
timestamp: April 27, 2020, 04:04:13 pm
content: I have a converter which has a buck pre-regulator and then a resonant stage inverter. I wish to extract the control-to-output transfer function of the converter so I can study the phase margin, gain margin, cut-off frequency/bandwidth of the supply.My first question is, what is the fastest way to do this in LTSpice, what is the procedure/theory?Second of all, should this be done in open loop (no compensation components?) or should I calculate first some compensation components and then measure the transfer function and modify the compensation components accordingly.What is the procedure for converters with multiple control loops? Should the loop gain of each stage be measured independently, with their individual phase/gain margins and cut-off frequencies? Or is there a better way?Thanks in advance.

author: OamSlaugh
author_rank: Newbie
timestamp: May 02, 2020, 06:17:37 pm
content: Hi state_of_flux,That's an excellent topic. It's also a big one, so to start with I'll give you the overview of the procedure that I personally follow and some useful literature, and then we can go from there.The second question has a shorter answer, so I'll hit that first. Open-loop typically refers to disconnecting the feedback from the output rather than having no compensation components (I would call that un-compensated). You can start without the compensation network to get a feel for the plant transfer function, and then add compensation to tune the design to your needs. In LTSpice you will need to perform an open-loop AC simulation to find the transfer function, but will also need a closed-loop connection to find the correct DC operating point. You can create a closed-loop at DC by adding a 1 TH inductor between the feedback and the output. This will be short at DC, but open at any frequency. Similarly the AC injection voltage should be connected through a 1 TF capacitor so that it does not affect the DC operating point. I attached an illustration.As far as the overall simulation goes, you will need to model a few main components:1. The switching stage of the supply. This is a model that averages the voltages and currents in the "on" and "off" states and is controlled by the duty cycle.2. The error amplifier. This is an op amp or OTA and is often described in the controller's datasheet.3. The switching inductor.4. Output capacitance and load capacitance. The more accurately you can model ESR and parasitic inductance the more the simulation will match reality. This will affect the bandwidth and the stability margins.You may notice that I'm not including the MOSFET/diode models in this list. For AC simulation of the transfer function these do not exist as discrete elements and are replaced the switching stage model.The best online document that I have found so far is "Measurement Based VRM Modeling" by Steve Sandler and it is available from Picotest here:https://www.picotest.com/downloads/Measurement-Base-VRM-Model-Tutorial-Final-2017.pdfThis goes into a lot of detail on the creation of the average model of the switching stage and building up component models from measurements of the physical part.When I build a power supply simulation I personally follow something like this:1. Assess the type of controller that is being used. Is it buck, boost, etc. and does it use voltage mode or current mode?2. Select the appropriate average switching model for voltage or current mode.3. Add the error amplifier model based on whatever gain and bandwidth values are given in the controller datasheet.4. Add the switching inductor with a resistor to represent the ESR.5. Add the bulk output capacitor. Usually the vendors will have models available on their websites. If not you will want to at least use a resistor to represent the ESR.6. Attach a reference voltage to the positive terminal of the error amplifier (should be specified in the controller datasheet).7. Add the feedback resistor divider.8. Add a resistor to the output to simulate the DC load.9. Run a DC operating point simulation to verify that the output voltage is correct.10. Add an AC voltage source for the injection voltage, and attach the 1 TH inductor and 1 TF capacitor to create the closed and open-loop modes.11. Run an AC simulation and plot output voltage vs injection voltage to get the transfer function.If you have a system with multiple stages the control loops of each supply should be measured independently, but assessments should also be done with the other supply(ies) included to account for the impact of their input and output impedance.Hopefully that at least gets you going in the right direction.Cheers