Part 2: Do you Power SPICE?

Current Mode BUCK Converter

Howdy, welcome to my den! This is the place for various projects to be shared with like minded people.
Open source? Use this stuff if you take full responsibility, and give to Daddyzaur what’s Daddyzaur’s.

So, are you an electrical engineer working with SPICE tools, designing real power supplies? Or you’re a hobbyist and you really want to build a current mode BUCK converter, but nobody put together some step-by-step instructions you can use for your project? If so, keep reading.

You will find here some explanations and an archive with all you need to get you started. You will get a high degree of confidence on your design, after seeing a perfect match between the average and switch mode models, compared throughout various Transient and AC simulations, under various conditions, with side-by-side perfectly matching signals.

In the archive I provided are all the symbols, models and sub-circuits, included in one single project folder. You also need to install Smath Studio and LTSpice. You do not need to litter external folders with bits and pieces of your project files: the project folder is Self Contained, you can place it anywhere you like and it will just work, in Linux or Windows:

Part 2 of my Do you Power SPICE mini series is an example of a Current Mode Control BUCK Converter one can analyze and build with confidence, using an interactive set of SPICE and math tools. Usually, this type of application will employ a Type 2 Compensator. I put together those tools using mostly the excellent books written by Christophe Basso, and I tried to follow his work as close as possible. If you do not know who I am talking about go ahead and check his books:

https://www.amazon.com/Christophe-P.-Basso/e/B001IOH604%3F

The starting point must always be a complete list with requirements for you converter: most everybody would agree, it is a good idea to know beforehand what you need. For this part you will find in my archive a Smath Studio design file _00002_BUCK_CM_T3.sm you can use to plug-in your data input and compute the parameters for SPICE. I tried to keep a resemblance of some rules: GREEN fields are title, YELLOW fields are usually for data input, RED fields are resulting parameters, BLUE fields are resulting quantities, and colorless fields are computing fields.

Now that you’ve got the input data and the SPICE parameters, go ahead and modify the LTSpice project files, with your data. The secret sauce for this flexibility is an (almost) identical interface I placed in every schematic with PARAMS for every and all variables you will need, and visual blocks for computed values. I said ALMOST because some of the .IC statements should be sometimes disabled or adjusted as required for the side-by-side sub-projects. Otherwise, nothing should be different. You can copy and paste this PARAMS block in all those LTSpice sub-projects, just verify the .IC statements:

Go ahead, open the project files one by one and study them. You will find here almost everything for the transient and the AC analysis you need to design a stable control loop. Here is a summary with the SPICE sub-projects name convention: CM stands for Current Mode, T2 for Type 2 Compensator, SW for Switch Mode Models, AVG for Average Models, TRAN for Transient Simulation, manual for the manual method of placing poles and zeroes, Kfactor for the automatic K factor method, AC for the AC Simulation, and finally Side-by-side indicates the project file contains two circuits you can compare together, in a single simulation:

This image has an empty alt attribute; its file name is image-8-1024x640.png
This image has an empty alt attribute; its file name is image-9-1024x640.png

Part 1: Do you Power SPICE?

Voltage Mode BUCK Converter

Howdy, welcome to my den! This is the place for various projects to be shared with like minded people.
Open source? Use this stuff if you take full responsibility, and give to Daddyzaur what’s Daddyzaur’s.

So, are you an electrical engineer working with SPICE tools, designing real power supplies? Or you’re a hobbyist and you really want to build a voltage mode BUCK converter, but nobody put together some step-by-step instructions you can use for your project? If so, keep reading.

You will find here some explanations and an archive with all you need to get you started. You will get a high degree of confidence on your design, after seeing a perfect match between the average and switch mode models, compared throughout various Transient and AC simulations, under various conditions, with side-by-side perfectly matching signals.

In the archive I provided are all the symbols, models and sub-circuits, included in one single project folder. You also need to install Smath Studio and LTSpice. You do not need to litter external folders with bits and pieces of your project files: the project folder is Self Contained, you can place it anywhere you like and it will just work, in Linux or Windows:

Part 1 of my Do you Power SPICE mini series is an example of a Voltage Mode Control BUCK Converter one can analyze and build with confidence, using an interactive set of SPICE and math tools. Usually, this type of application will employ a Type 3 Compensator. I put together those tools using mostly the excellent books written by Christophe Basso, and I tried to follow his work as close as possible. If you do not know who I am talking about go ahead and check his books:

https://www.amazon.com/Christophe-P.-Basso/e/B001IOH604%3F

The starting point must always be a complete list with requirements for you converter: most everybody would agree, it is a good idea to know beforehand what you need. For this part you will find in my archive a Smath Studio design file _000001_BUCK_VM_T3.sm you can use to plug-in your data input and compute the parameters for SPICE. I tried to keep a resemblance of some rules: GREEN fields are title, YELLOW fields are usually for data input, RED fields are resulting parameters, BLUE fields are resulting quantities, and colorless fields are computing fields.

Now that you’ve got the input data and the SPICE parameters, go ahead and modify the LTSpice project files, with your data. The secret sauce for this flexibility is an (almost) identical interface I placed in every schematic with PARAMS for every and all variables you will need, and visual blocks for computed values. I said ALMOST because some of the .IC statements should be sometimes disabled or adjusted as required for the side-by-side sub-projects. Otherwise, nothing should be different. You can copy and paste this PARAMS block in all those LTSpice sub-projects, just verify the .IC statements:

Go ahead, open the project files one by one and study them. You will find here almost everything for the transient and the AC analysis you need to design a stable control loop. Here is a summary with the SPICE sub-projects name convention: VM stands for Voltage Mode, T3 for Type 3 Compensator, SW for Switch Mode Models, AVG for Average Models, TRAN for Transient Simulation, manual for the manual method of placing poles and zeroes, Kfactor for the automatic K factor method, AC for the AC Simulation, and finally Side-by-side indicates the project file contains two circuits you can compare together, in a single simulation:

Bitnami