Christophe Basso: Transfer Functions of Switching Converters (Day 1 Topic Christophe.mp4)
By simplistech
Summary
Topics Covered
- Start With the Simplest Possible Model
Full Transcript
Okay.
So, Kristoff also I'm here. You're there
and ready.
Excellent.
So, Kristoff is one busy dude. I have no idea anybody can write 10 books about anything, much less 10 books about
switching powers applications and yet they're so good and yeah they're just great. So and
fortunately in the process of doing some of those he's created a whole bunch of you know templates using simplist for
different topologies control schemes and so he's going to share a little bit of that with us today. So Kristoff
appreciate you doing this mercy.
Yes. So good morning or good evening everyone. So my name is Kristoff Bassau
everyone. So my name is Kristoff Bassau as Tom kindly introduced me. I'm going
to try to slow down the pace so that you can understand my Inspector Cluso accent which is rather thick usually especially at the end of the day. So what you can
see on the screen right now are the templates that I've designed for let's say testing the transfer functions that I were derive I was deriving on the
upper side book that you can see transfer function of switching converters in which I have explored the small signal responses of many switching converters whether they operate in CCM
DCM voltage or current mode control coot FO whatever. So what I what I was doing
FO whatever. So what I what I was doing is I was using an average model a small signal average model from which I was deriving the control to output transfer
function and I was comparing the AC response of what I was obtaining with Mathcad or another solver you can think of with simply actually. So for that
purpose I have developed several templates using simply and I have enriched these templates with many more examples of switching converters that I
came across for let's say solving customer issues or just for the the sake of having more switching examples and then I use these examples because you
you know that I have tried to to develop a small let's say specialty in loop control and small signal analysis. I've
just released another book that you can see uh the with the blue cover and it's essentially covering loop control and small signal
response of switching converters the way you would close the loop for uh reaching good phase margin gain margin and crossware frequency. So I have all these
crossware frequency. So I have all these templates that I have used for exemplifying all uh my design examples that I have in in this
book. So let's start with with one of
book. So let's start with with one of these circuits here. You see it's a it's a boost converter built around in LM5155. And what I like to do and that's
LM5155. And what I like to do and that's the way I work and whether it's on spice or simplest but mainly simplest what I do is I start with the simplest possible
model. So using let's say classical
model. So using let's say classical switch very basic cycle by circuitry and then I test the inte the electrical integrity of this circuit making sure
that it converges and delivers the right voltage and current at the given operating point and once this is working okay I start to enrich the models by putting a MOSFET model if you want or a
GAN transistor because you can you can also import this type of of ICE subcircuit into Sim Also something that I favor and we'll
show that in a moment is these blocks here. I like to automate things. It
here. I like to automate things. It
means I'm I'm I'm trying to explore different composition strategies and by compensation strategies I mean PS and zeros which are there to neutralize the
variability of the usual offenders.
These offenders being of course the load resistance, the ESR of the capacitors or the parasitics that are going to move during the production process or the
converter operating lifetime and you have to make sure that stability is always correct in terms of phase margin and and gain margin and cross frequency while these elements are moving. So the
goal of the compensation strategy is to neutralize these these stray elements and you do that by I do that here by automating as you can see on the right side here using a control block and not
the F12 window because I like to see things on on the on the schematic. So
here we're going to immediately see a working example. So you can see I have
working example. So you can see I have one body plot for the to extract the openloop gain of my power supply. I like
also to look at the compensator transfer function. I mean all the guy here that
function. I mean all the guy here that I'm designing what is its own AC response. And then here the cornerstone
response. And then here the cornerstone of any analysis is the control to output transfer function of your power stage.
If I run here the simulation, the first thing that you need to check is the correct operating point. As Tom
mentioned several times, and it's the same as in spice, you know, when you have an average model before you consider the AC results from the average model, you have to make sure that the DC
operating point is correct. So here I was expecting an output voltage of around 24 volt with a with a with a current of 2 amps and the feedback is around 1.8 8 volt knowing that the
dynamics that I have is 3 volt. So it's
in linear mode. Then I look at the power stage and this is the uh the power stage of my power supply. So it has a DC gain of something like 30 dBs. And then I've
selected a crossover frequency. Here
it's 2 kHz. You know that in a boost converter you have a right off plan zero. So I'm calculating here the right
zero. So I'm calculating here the right off plan zero which depends on the input voltage and the load current and the UT ratio. And it instructs it instructs me
ratio. And it instructs it instructs me that 20% of this value here should be around a few kilohz. So I read the control to output transfer function
magnitude here. You can see it's about 6
magnitude here. You can see it's about 6 dBs at uh 2 kHz and the phase lag is about probably - 92 degrees 90 94. I
enter these values here 6 dBs and 94 and the macro which is here is going to calculate automatically the components value using this OTAA here to cross over
exactly at the selected frequency I can look at the this is a type two you can see it's a integrator type of response slope minus one here then the zero is
going to break the slope to a zero slope and then a pole is going to improve the to to let's say roll off the gain at high frequency for building gain margin and then the phase is boosted in between
and that's the phase boost I have calculated with my macro and then I can see that simply is measuring a 2 kHz courseware frequency phase margin is
about 60° and then 17 dBs are scale margin now it's easy to click here and said I would like to have instead a 45
degrees phase margin and if I go again here. So it's again it's calculating a
here. So it's again it's calculating a new uh DC operating point. Okay. And then let's go. You can
point. Okay. And then let's go. You can
see that the phase margin now has decreased to around 45 46 degrees with the same crossover frequency. So it's
easy now to explore different compensation strategy and look at the trans response in this case. So I'm
going to look at let's say I'm going to enable the transient source. This guy is going to be silent and then I'm going to
select a transient analysis. Okay. And
here what I do first is that I'm going to have a little bit of okay it's the histories depth is two. So I'm going to accumulate the curves. And if I run
here it's fairly fast. There you go. You can see
fast. There you go. You can see here specific response. And now if I change the phase
response. And now if I change the phase margin back again to 60° you see exactly what is expected. So
here the transient response the drop that you can see here depends upon the ESR of the output capacitor but also upon the the capacitance and the
crossover frequency marginally about the phase margin. So I didn't change the
phase margin. So I didn't change the crossover frequency. So the drop here is
crossover frequency. So the drop here is about the same. However the recovery time here depends on the phase margin.
So the more phase margin you have, so approaching 90 degrees, the more sluggish the response you're going to have, but the less overshoot you're going to let's say exhibit and if you
reduce the phase margin, you recover at a faster rate. However, you will start probably to to have a little bit of overshoot here. The converter becomes
overshoot here. The converter becomes more nervous. So you can see here how
more nervous. So you can see here how simple it is to let's say look at this different trans response by exploring different scenario. And once this is
different scenario. And once this is done, you can go to simulator here and edit net list. And you can see here, let me zoom a little bit, the component values that have been automated by
simply. So it's easy then to extract
simply. So it's easy then to extract these components and and put them on your bench prototype. And you see here the right of plane zero frequency has
been calculated around 20 kHz. So 20% of it says that around 4 kHz as a maximum cost of frequency. Okay. So that's for the first example.
That's a very that's very cool. That's
very very cool.
So here, as you see, I'm um I'm a control block type of guy. So I don't like to use F12 because I like to see what's going on in the schematic. So how
do you very often I've have the question that people are telling me, well I've I've placed a text sheet and it doesn't work. So you have to go from symbol
work. So you have to go from symbol library sheet and text and then it's a control block that you need that you need to place on on the schematic. Okay,
it's not a a text window. Once you have the control block, you can put whatever you want automate calculations and then and then declare a variable either a
local variable or a global variable if you want to pass parameters to the uh to the subcircuit. And once something that I
subcircuit. And once something that I found as well or it was indicated by the simplest folks is that to to plot or access the the variables that you have
that have been computed by the software then you place this uh control elements here and here I'm looking at a gain for instance or a poll and then you go into simulator edit net list after
pre-process and then you see all these parameters here that have been calculated. So that's an easy way to
calculated. So that's an easy way to access them. Yeah, when you're optim
access them. Yeah, when you're optim when you're automating calculations, it's really helpful to make sure that the values that in what
you're plotting you you're displaying in green, that's what simplist that's that's very helpful and then as I said you could hear with
different body plots that let's say open compensated open loop gain. Usually I
like to have different colors and it's all symmetrically centered around zero so that I can easily you know look at the phase margin and crossover frequency and so this guy is black and this one is
red for easier easier reading and then I can by changing the crossover frequency same phase margin you can see that with a 1 kHz slightly higher drop here which
is much smaller when I have 2 kHz. So
again I can change phase margin or crossover frequency easily and see the effect on the transient response. Let's have a look now. I'm
response. Let's have a look now. I'm
going to open the bugv analog. So you go there you can see all the the templates on the left side and bugvid analog that
this guy here. What I've done here is I've tried to reproduce a p using a let's say the classical approach you could see in the in the university. It's
a filtered P ID. Okay, filtered P means that the classical P has one pole at the origin and two zeros. And if you look at the the transfer function that is given
by this P, it's what we call a non-proper transfer function. It means
that when S approaches infinity because of the two zeros, then you end up having still gain uh going up as the frequency it will eventually go down because of of
the frequency limit of the circuit. But
it's not easy to to meet the gain margin criteria. So what people have come up
criteria. So what people have come up with is what we call a filtered P I and a filtered P is an extra pole which is added here with the N
parameters and when you tweak a P on the bench and usually it's the case on with this joint control you can apply several method like Ziggler's metal for instance
where you you more or less reduce the KI and KD coefficients to zero. then you
increase the the KP coefficient until you start observing a ringing response.
And it's kind of trial and error method.
If you want to apply P here to a to a buck converter, what I do is I place my poles and and zeros either
let's say automatically using the K factor or manually here using this uh this uh equation here and then I instruct simplist to automatically
calculate what's the parameters will be to determine the KP uh KI or TI or KI and KD parameters and then will be passed to this circuit. to see exactly
what the the transfer function shall be for meeting the crossover frequency that I want. And if I press here, let's
I want. And if I press here, let's go. So again, bias point is correct. 5
go. So again, bias point is correct. 5
volt output current. And there you go.
You can see the P response. It's it's a a nice type three compensator. It's a
type three compensator because on top of the filter P expression, I've added here an extra pole. And this second pole added to the filtered P actually makes a
type three compensator. A type three compensator is a filtered P with an extra pole added to the transfer function. And you can see this is
function. And you can see this is exactly the response we have. And I was looking here for let's say a 10 kHz cross frequency with a 70° phase margin.
And if you look at the loop gain almost 70° almost 10 kHz crossware frequency with the here a slightly less phase margin probably because you know that if
you start pushing the crossover frequency then the own response of the compens of the opamp here starts to apply and then corrupt the gain and and
the phase boost that you would be expecting from your compensator.
Okay. So here you can see the the various responses and what I like again is that the P coefficients are automated by the macro. And if I go
here to simulator and I go to edit net list, you can see again here these are the K, KD and KPS which have been automated by simply and that I can reuse
in my digital control loop for instance to pass as design parameters. So this was analog. Let's
parameters. So this was analog. Let's
look now at the digital solution. So
there are plenty of approaches for digital simulations in simplist. One of
them is is using the the blocks that are available and there is one filter P over here and I'm going to look I'm going to open the corresponding circuit. So in
that case it's buck digital P and all of course all of these circuits are available in in the in as a as a stimulation template. And here if I
stimulation template. And here if I double click you can see that you can you have to populate KP KD and then the different regression method the
derivative method whether you you use dustinine or backward or forward type of method and here the same process is
applied. So I manually place my poles
applied. So I manually place my poles and my zeros and then I instruct Simply to automate the calculation of the KI,
KD and KP parameters and transform them into discrete values that are going to be passed to the filter here. And if I run again, I think I was looking for
let's see a 10 kilohz 60 degrees phase margin. And if I go
margin. And if I go there bias point is okay. And again you can see 10 kHz and around 57° phase margin. You know that there is what we
margin. You know that there is what we call warping. It means the frequency
call warping. It means the frequency response of the discrete poles and zeros is distorted depending on the sampling period. So it's probably a little bit at
period. So it's probably a little bit at play here. And also here I have included
play here. And also here I have included what you can see it's a there is a delay block here and I'll come back on it in a minute.
So here you see how these uh P parameters have been calculated by by simply here and passed then as uh as values to the uh to the to the
subcircuit before simulation. The delay
can be modeled using a delay line but there is none in simply. So I've used what we call a first order pad approximate. It's actually mixing a
approximate. It's actually mixing a right offline zero and a and a left pole which are neutralizing each other in terms of magnitude. But because here the
right half plane zero is lagging in terms of phase response. Then of
obviously the two phases combine from zero down to minus 180° and the total delay at the end is here. This is a node PWM. So there is no delay linked to the
PWM. So there is no delay linked to the duty ratio elaboration. So that's the delay that I'm that I'm creating. Okay.
And you can see the various responses here. Let's see now something that I use
here. Let's see now something that I use also quite often and it's fairly easy here. It's the Monte Carlo process with
here. It's the Monte Carlo process with the buck buck VM again. So you know that all these parameters here the the component value are going to be affected
by tolerances also because the value itself is going to change depending on the production lot or depending on the temperature. So you have to make sure
temperature. So you have to make sure that when these all these elements especially the ESR or the caps or the capacitance itself changes uh they do not affect the cost efficacy and it's
simple here to affect various distribution laws and then here that's the perhaps the not the most difficult but the thing that you will have to to dig a little bit to find them out. These
are what we call the goal functions. And
the goal functions are props specifically tailored to extract the cross frequency, the phase margin and the gain margin. And if you go to Monte Carlo here and you say setup Monte
Carlo, I'm asking here for 10 steps. So
it's fairly easy and and fast. I'm using
the four cores of my computer. And if I go then and say Monte Carlo, run Monte Carlo. Let's see if it works.
Carlo. Let's see if it works.
So it's going to go through different iterations say having more or less pod random type of values that is going to affect to the compensator and then in
the end there you go you can see that how the game margin is distributed from 31 dBs up to 34 dBs then I can look at the phase margin so it's fairly stable
the game the phase margin is going to change between 64 and 72 degrees and then the crossorency probably is al also fairly stable between five and and six
kilohz. So it's easy to to make sure
kilohz. So it's easy to to make sure that your power supply at least on the paper is fairly robust and it would be a pity not to go through this type of
exercise because truly it's easy to set up using simply okay and when you do that at least you have a fairly good assumption that the the design is is
robust at least on on the papers as a first approach. Okay. So this is the way you
approach. Okay. So this is the way you create the uh the arbitrary probe. You
go through this uh circuitry here. The
goal functions are with are already written and made available from simply.
So it's easy to pick the one you want.
So like game margin and phase margin and then once you place them on on the circuit it's easy to to collect the results. Very quickly now let's go on
results. Very quickly now let's go on PFC because the boo the PFCs are big application portion of Simply uh and I'm going to show you how fast it simulates
and this one is is working on the demo version actually and let's see what circuit it is. It is a booccm variable.
the booccm variable of that's the one here and it's it's a circuitry that has been made popular by Sambakov in a paper that
he published in 1998 it's kind of predictive type of PSCs where you see there is a current loop here it's sensing the negative the the current which is going here and there is a this
resistance here at the front end that is collecting the the inductor and the total current and then it's by changing the slope of the charging capacitor it's adjust the off time to modulate the
circuit to modulate the whole thing along the the main cycle. It's if you simulate this time of of circuit at least if you would like to have a few switch a few main cycles. So it means
maybe 400 or 600 milliseconds it will take ages before it actually delivers the results and also the granularity if you want to look at the various switching transitions it's it's going to
be hard to obtain something meaningful here. What is very cool is that I can
here. What is very cool is that I can put an AC source here and if I press see this guy here you will see immediately how fast it simulates and with that in
mind I can immediately obtain the results and again let's say let's say go and explore different compensation strategy to see how it does affect the
distortion. Okay. So you can see how
distortion. Okay. So you can see how fast it is. It's impossible to beat with with a spice simulator. Okay. So let's
close that one.
Something I've I've really liked is the fact that this source here you see is is actually an AC source. And if it's important to note, if the switching
frequency of this circuit is fixed and is a multiple of the mains network, then you can run POP analysis using the PFC and it's it goes fairly fast. And then
you can extract you can extract the AC response of the power stage and then run any macros you want to stabilize the loop for let's say a crossover of of a few of a few hertz. It's very very
efficient.
Okay. Something popular we see in the high power field is multi-level PFCs.
And here it's a twole it's a three-le PFC. So what people do is they stack up
PFC. So what people do is they stack up DCDC converters and then they run them either in series or in parallel here.
And it helps reducing the stress on this upper and lower stages by having two different let's say stacked voltages let's say from zero to 200 and 200 to
400 and it helps reducing the stress.
It's very popular in EV charging for high power power supplies. uh the VNR identifier for instance is is a three-le type of circuit and simplist can
simulate that and you can see here that's a three-le type of circuit and I'm using in this case it's no longer a predictive type of approach I'm using a multiplier and you'll see again how
quickly it can actually simulate so this one is let's see boost PFC one phase three level boost [Music]
PFC where is want phase three level. I think it's this one. So, let's go. And here I'm
this one. So, let's go. And here I'm going to run the pop using the AC source. So, it's only the pop. I don't
source. So, it's only the pop. I don't
want any AC. So, you see 21 vari. And if
I go run again, such a complexity would require a tremendous amount of time using a spice simulation. You will see how okay it's absolutely impossible to
beat in terms of simulation speed. And
once I have this guy, I can explore the various RMS components going through the output capacitor. I can use at the
output capacitor. I can use at the conduction losses on the switches. And
then I can look at let's say if I do in and press F3, I can lose I can look at the harmonic distortion of the current.
And I have 3.4% as harmonic distortion.
Again, it's automated. I could explore different crossover frequency and see that if I push crossover then I may have more ripple coming in and then it's going to affect the distortion. So as
usual it's a trade-off between trans response and the distortion you want to look at. Okay, let's try to see that's
look at. Okay, let's try to see that's the way I'm I've built the multiplier.
Okay, there are different techniques but the one I'm using here and I'm using the nepirian logarithm if I pronounce this
correctly and then I transform a and b my input v in and vin vin one and vin 2 into logarithm that I'm going to sum and then I take the exponential of the
result to create the multiplication. The
only difficulty here is of of course you would like to have the best granularity but the more steps you're going to have the the more time consuming is going to be and the more burden on on the
computer. So you have to reduce the
computer. So you have to reduce the dynamics and also the precision of course on the on the on the multiplier and when you go there you can see what
we have seen before the boost TPPC there is one also here that has that is going that has that has been simulated and it's the same structure you have a fast
leg here the slow leg is non-synchronous and I'm not going to simulate it because it's going to take a little bit of time but it's also basically available as as as a template and something I would like
to you to look cut and I think it's starting here.
First of all, it's a small ACAC type of circuit. I've seen that quite often in
circuit. I've seen that quite often in the field right now. It's used a lot in solar application. It means if you have
solar application. It means if you have excess energy from your solar system, you would like you would like to store this excess energy into a boiler, a hot water boiler. So what this type of
water boiler. So what this type of circuit do is that it exactly size the amount of voltage that is going to be applied to the AC load to exactly absorb
50 watt 100 watts 2 kilowatts depending on the excess of energy. And if you run the simulation here going to look at this very quickly at uh let me see what
buck AC converter it's part of the template buck AC converter full version it's here and if you run it's an openloop circuit very simple in this
one okay and here you can see the nice it's an AC toac converter it's actually a buck converter which is birectional so
either once Once one of the switches here, let's let's reduce a little bit.
One of the switches here is permanently closed for treating the positive cycle.
And once the main polarity changes here, then the the one that was permanently closed is switching and the other one is switching while the old one is permanently closed. And you can see how
permanently closed. And you can see how you have a nice cinosidal waveform over here. Then the last one I think I'm
here. Then the last one I think I'm going to show. Okay. So in this circuit
show. Okay. So in this circuit here what we see it's something that I published a paper a few a few years ago
into how to power I wanted to show that the instability in a kernel power supply and that's something that has been showed by reidle in his studies but I wanted to simulate it actually the
instability and the superhommonic poles you can see in in the control output transfer function of the voltage loop of a power supply is linked to the lack of
phase margin you have in the inner current loop. Okay. So, and the inner
current loop. Okay. So, and the inner current loop is and the inner current loop is actually the peak current and current controlled by the duty ratio.
So, it's IIL over D. And these values are discrete values. Okay, there's no way you could simulate that using an average model for instance because these are these are discrete values. And what
I wanted to show is how we could use simplist for reproducing what we has has shown in his studies this in 1990 uh using what I what I've called a digital
modulator. So we we will see what it
modulator. So we we will see what it what it means here but you can see that here that quality factor of the double pole here depends on an artificial ramp level and the on on slope of the
inductor. So here it's a b converter and
inductor. So here it's a b converter and it's running open loop. However, the
current loop is closed here. So you see that by changing the amount of slope compensation, you change the control to output transfer function and the
subharmonic poles which are located here at alpha the switching frequency are more damped as you improve or inject more slope compensation. So how can we
let's say first of all where does this instability come from? I say it's coming from the inner loop. But how could we visualize that? And actually in there
visualize that? And actually in there there has been a paper in 1986 where some folks from from Vinia Tech were showing how to implement what we call a
digital modulator which allows to cut the loop between the drive output here which is a square wave signal and the
the the drive signal driving the switch.
So this is truly we want to interrupt the pass here and slightly modulate the duty ratio with to inject the perturbation. Why can't we go through
perturbation. Why can't we go through the classical AC modulation? Because
these are discrete uh signals. Okay, we
cannot just cut the loop and and insert AC modulation. It wouldn't it wouldn't
AC modulation. It wouldn't it wouldn't work properly. So what I've done here uh
work properly. So what I've done here uh I've actually modeled a digital uh modulator very simply. So when this when this guy
very simply. So when this when this guy goes goes high then DX immediately follows but then when this guy goes down then I start let's say a capacitor
charge which is here whose threshold of this comparator is going to be AC modulated by my AC signal and by doing that I'm slightly delaying the reset signal which is going to bring DX down.
Okay. And this this has been published in in how to power I think since 2021. And if that's the way you would
2021. And if that's the way you would insert uh the modulator. So let's have a look at it. So we go to that's not in the templates but I'm
going to make it available. So it's in buck box cm or sample analysis. Sorry. And that's
this guy over here. So you can see it's a fairly simple a fairly simple switching circuit. It works on the demo
switching circuit. It works on the demo version. And here I'm going to put a
version. And here I'm going to put a compensation rate equal to zero. When
you put MC equals 1 it means there is no slope composition. Right? You can see
slope composition. Right? You can see external slope MC minus one. So if MC equals to one there is no slope composition. If I run this circuit. So
composition. If I run this circuit. So
first of all the operating point is 5 volt as I expect. And then let's see. There you go. This is what we have
see. There you go. This is what we have here is the peak inductor current to the duty ratio control. That's the what the
the modulator here is giving to me. And
this is what the body body here is going to extract. And you see that the coer
to extract. And you see that the coer frequency is fairly high. It's about
here we are about something like 47 kHz.
And almost we are we have a very very small phase margin right from 0 minus to minus 360° almost no phase margin. So if
we run this circuit, we may end up into an instability. Now if I improve let's
an instability. Now if I improve let's say and add something like 20% or let's say directly 50% phase margin. What I'm
going to do there you go I've slightly reduced the output voltage of course because I have less peak current. You can see what I've done the phase response is the
same. However, I'm pushing the the curve
same. However, I'm pushing the the curve gain down, forcing a crossover value here around 20 kHz where the phase margin is more favorable. So by by
injecting slope composition I'm actually cheating the current loop making it believe that the s that the sense resistance has increased and because the
gain of the loop is one over our sense then by injecting more slope compensation I'm actually pushing down the gain curve forcing a crossover frequency at a more favorable point
where the phase margin is better and by doing that I am stabilizing my switching motor and you can see here exactly how it goes. Actually here if we go through
it goes. Actually here if we go through the analysis we see that the two zeros are going up here. There is a bunch of a pair of right half plane zeros which are
located at alph of the switching frequencies. And these two right half
frequencies. And these two right half plane zero when you close the loop around the inner loop featuring these two zeros. These two zeros turn into two
two zeros. These two zeros turn into two subharmonic poles located at alpha the switching frequency in the control to output transfer function. when you
change the oil voltage and you look at the output voltage. Okay. So by
injecting slope composition and using a digital modulator you see actually the effect of the slope composition on overall stability especially the inner
current loop and that's all I have to show and I thank you very much for your audience ladies and gentlemen. Oh wow
that was amazing. Thank you very much.
So that was a little sip from the fire hose, but can see that there's a lot of great work available There.
Loading video analysis...