Closed Loop Compensator Design Help

Thread Starter

CameronNielsen

Joined May 8, 2017
17
Hello,

I am working on a project to regulate a buck-boost controller using a voltage loop and a CPM modulator. I think I have got everything down reasonably well as when I substitute someone else's design in for my own it behaves properly but my circuit is behaving slightly irregularly and I think it is due to the compensator design. My calculations are below for the compensator (which uses a saturating inductor model in LTSpice)





Here is the implementation in LTSpice



I have the waveforms and the overall circuit but these are a bit more difficult to untangle - I included them below in case they are useful.


 

crutschow

Joined Mar 14, 2008
34,473
You can generate the AC closed-loop Bode response in LTspice by substituting a linear gain block for the PWM converter in the loop along with the compensation circuit and the LC output filter.
That will show you the gain and phase margin.
The gain of the block is determined by the transfer function of the PWM circuit, i.e, what is the ratio of a voltage change at the PWM modulator input versus the PWM output average voltage at the output of the inductor.

I did that for a buck converter I designed and the results were close to the real circuit response.
 

Thread Starter

CameronNielsen

Joined May 8, 2017
17
You can generate the AC closed-loop Bode response in LTspice by substituting a linear gain block for the PWM converter in the loop along with the compensation circuit and the LC output filter.
That will show you the gain and phase margin.
The gain of the block is determined by the transfer function of the PWM circuit, i.e, what is the ratio of a voltage change at the PWM modulator input versus the PWM output average voltage at the output of the inductor.

I did that for a buck converter I designed and the results were close to the real circuit response.
Hmm, not familiar with this approach do you have a snip of your example? For the purposes of this assignment we will need to use the shown components but if it helps me design the compensator I am all for it.

Any thoughts on my calcs here?
 

crutschow

Joined Mar 14, 2008
34,473
Hmm, not familiar with this approach do you have a snip of your example? For the purposes of this assignment we will need to use the shown components but if it helps me design the compensator I am all for it.
Here's the basic simulation block:
It's good for checking if the compensation response is as you calculated and tweaking it if necessary.

upload_2017-6-9_20-17-27.png

Any thoughts on my calcs here?
Sorry but, the only time I do math is when I absolutely have to.
And this is not one of those times. :rolleyes:
 
Last edited:

Thread Starter

CameronNielsen

Joined May 8, 2017
17
Here's the basic simulation block:
It's good for checking if the compensation response is as you calculated and tweaking it if necessary.

View attachment 128605


Sorry but, the only time I do math is when I absolutely have to.
And this is not one of those times. :rolleyes:
I am getting a matrix is singular error when I try and run the test circuit - must have goofed something up in implementation:



To be honest, I'm not sure how the CPM controller will compare with a simple PWM - but if the control signal is well regulated it should work (I tested a friends design and it worked fine)
 

crutschow

Joined Mar 14, 2008
34,473
C2 looks abnormally small, so you need to look at that.
Note that 1MHz in your .ac simulation is 1 milliHertz (Spice is case insensitive). You want 1megHz.

Here's the closed-loop simulation of your circuit using an ideal op amp.
There's a significant 10dB peak at 11kHz, indicating an error in the compensation values (likely C2).
Note that the modulator gain will have some effect on this curve so you should try to determine what that is.

upload_2017-6-9_21-28-59.png
 
Last edited:

Thread Starter

CameronNielsen

Joined May 8, 2017
17
Here's the open loop gain:
There's a significant peak at 4kHz which needs to be compensated.

View attachment 128624

Here's the paper I use to design my control loop, which may be of help to you.
I still cannot get this simulation circuit to run despite copying exactly what you have shown I get a singular matrix. I have a working design using someone else's compensator/inductor design and I'd like to see what the difference is in the frequency response.

The other design has a 9 uH inductor and the following compensator build (note that he is using a switching frequency of 400khz while mine is around 250khz to help improve efficiency)



This regulates perfectly to 5 V and 20 V using 1 and 4 V respectively as a control signal.

I have noticed that my sensed current going into the CPM block does not follow my control signal coming out from the op-amp very well compared to his circuit but I was chalking that up to compensator issues
 

crutschow

Joined Mar 14, 2008
34,473
Attached is the .asc file I used for the simulation.

One thing I forgot to mention is that it's important to include the value of the inductor and output capacitor equivalent parasitic series resistance in the simulation (which are not included in the attached) as they have a significant effect on the results.

You also may need a lead capacitor in parallel with the 10k input resistor for best compensation.
 

Attachments

Last edited:
Top