YTread Logo
YTread Logo

LTspice #7: Closed-Loop Frequency Response of DC-DC converters

Apr 04, 2024
hello everyone welcome to this presentation in this video we are going to see how to obtain the

closed

loop

response

of a dc-dc converter we are going to use as an example the later converter that we have been working with in the last video of this series in the series lte spices and we can see that this is a converter with an input voltage of 10 volts and an output voltage of 5 volts also we have seen in the last video the answer of this converter which is made by these two blocks here one is the answer of the pwm modulator which behaves as a constant given by one over v pp then bpp the peak to peak voltage of the sawtooth waveform that is used in the pwm modulator and then we have the

response

of the post converter with the input which is the duty cycle and then the output voltage, okay and we know that this converter behaves like a second order circuit and we have a gain of around zero dB, this again and then we have a double pole here because of the effect of the inductance and capacitance, so the

frequency

of this pole is 7.1 kilohertz in this case and we also have the zero coming from the equivalent series resistance of the capacitor and in this case the value of this zero is 106.1 kilohertz, for what this is the open

loop

response of our DC-DC back converter what we're going to do in this video is we're going to close the loop of our DC-DC converter to regulate the output voltage here and the output to five volts okay for this. we are going to use a pi compensator like this, it is well implemented using an op amp with an input and resistor r1 and this resistor r2 and capacitance c2 doing the feedback of the op amp, okay and then with this we are going to compare the output voltage with the reference voltage and generate the compensator output signal to control the duty cycle.
ltspice 7 closed loop frequency response of dc dc converters
Well, inject the signal into the pwm modulator and then generate the square waveform to control the switch state. Okay, so we know that a pi compensator behaves like this. we have this cs response is given by this expression here in which we have a zero and we have a pole at the origin, so the

frequency

response of our pi compensator could be like this, we have a pole at the origin, so we have a slope here coming from the origin with um minus 20 dbs per decade and then when we reach zero which is given by this frequency one over two pi r2 c2 then we get this flat response here for the compensator at high frequencies and the gain in this plane part is equal at this value here is given by the ratio between r2 and r1, okay, so this is the ideal answer, of course, any op amp also has some poles at high frequency, okay, but we are neglecting this because we are going to use a operational amplifier. amplifier with a cutoff frequency at high frequency, so we are not going to consider the effect of the op amp here, so this is the block diagram of our converter operating in

closed

loop, okay with our compensator, the response of the modulator pwm, the response of the subsequent converter and then the response of our sensor h and in this case our sensor again is equal to one.
ltspice 7 closed loop frequency response of dc dc converters

More Interesting Facts About,

ltspice 7 closed loop frequency response of dc dc converters...

Well, it's a constant equal to one because we're directly measuring, as we can see here, we're directly measuring the output voltage and injecting it. in our compensator um okay so the layout of our cs compensator is going to be like this we're going to put the zero of the compensator at the same frequency as the double pole here from our mac conversion okay this way we're going to have a loop again, the loop gain will be the product of all the elements in the loop, okay, so it's equal to 1 over bpp multiplied by yes, multiplied by yes, time hs, okay, remember that hs in this case is 1, okay, so in the end we have the answer here. in red of one about bpp times yes, okay and then we have the response of our compensator, so the sum of these two magnitudes in dbs then with this and the sum we can get the gain response of the loop in green, okay , so we can see what we're going to get a response that has a slope here of minus 20 dbs per decade, then when we get to this point, we're going to have the effect of just this other slope here that's minus 40 dbs per decade and then we have the the slope of them is zero in this case, which is -20 dbs per decade again, okay, so we know that when we get the crossover frequency here, the a phase of the loop gain has to be less than 180 degrees or minus 180 degrees, okay, so we can get the phase of our loop again at this point we can do the sum of the um faces of the response of our back converter and pwm modulator which has a phase here of minus 20 degrees, okay , and then we have the phase corresponding to our compensator which is minus 45 degrees, well, with this in total here for the loop gain we have a phase of minus 135 degrees, well, the sum of these two quantities minus 90 plus minus 45, so the phase margin is the difference of 180 and 135, so we have a phase margin of 45 degrees, and then the bandwidth of our response will be close to seven kilohertz, but it will actually be a little less because we know that these approximations with straight lines is just an approximation to the actual behavior of the frequency response, which is a symmetrical response here, so we have a cure here in these parts, so we're going to have a little bit of bandwidth lower than expected at this value here, okay? so in the end the design will be like this we want to have the flat part of the response of the compensator at 0 dbs so we need to have this condition r2 over r1 equal to one and then we want to have the frequency of our zero of the compensator is equal to 7.1 kilohertz so we have this condition here also so with these two conditions we can design the values ​​of our compensator in the end we have three unknowns and two conditions so that we can set the value of our capacitor for example c2 equal to 10 nano farads and then we get these values ​​uh r2 and r1 equal to 2.24 kilo ohms so with this we have the design of our compensator so now we are going to verify that everything is working well by doing a simulation in For this, I have ready here this file um in this schematic with the post converter okay and then with the compensator here well implemented as we have seen with both resistors and capacitance and this op amp.
ltspice 7 closed loop frequency response of dc dc converters
Well, for this I have used this model the universal amplifier available in the lta space and then here we are using this pwm modulator as we have already seen in the last video and then we have here a sawtooth waveform of 10 volts peak to peak , okay, here what I have done is select a power supply voltage for the op amp of eight volts, okay because in this case I am going to limit the maximum duty cycle value to 2.8, okay, so this is a way to limit the maximum value of the duty cycle because otherwise at the beginning we will have zero voltage here at the output and five volts at the reference, so the difference is very high between the reference and the measurement here of the output voltage , so the op amp will saturate and apply the maximum voltage at the output, this way this maximum voltage will be 8 volts and the maximum duty cycle here at the output will be 0.8, so this is always important because if we apply a maximum voltage or a maximum duty cycle of one, then we can saturate the inductor and then the system cannot achieve steady state operation, so this is a common technique to limit the maximum value of our a and shutdown and output of our compensator, okay, so run the simulation, okay, see that I have selected 500 microseconds for the total simulation time 1.1 microseconds for the step time maximum simulation step time so we can see here the output voltage, okay, so we can see how it increases at first and then we have this kind of second order response and then the output voltage will reach the steady state value of 5 words, okay, we can see, for example, add another window here, we can see in the duty cycle value, okay, so You can see here at the beginning how the duty cycle is the maximum 0.8 okay, it is the maximum because we have a very low voltage at the output and then the duty cycle goes down and down until it reaches the steady state value which is something close to 0.5 well because we have 10 volts at the input and then we want 5 volts at the output okay we can also see if we want we can direct this one, we can see the output of the compensator, it's okay and then we can see how the output of the compensator starts to saturate and then when the output voltage reaches a maximum value, it will go into linear mode and adjust the output and reach the steady state and it will value the value required to get um the five volts to get five volts at the output okay, so we can compare this with the waveform here, okay, this is what we're doing by comparing the output of the compensator in blue with the shape of sawtooth wave to generate the corresponding duty cycle for the switch, so with this we can see that everything is working fine, we are regulating the output of our converter and now we can go ahead and try to get the frequency response of our converter correctly, so what is typically done when measuring the loop gain of a DC-DC?
ltspice 7 closed loop frequency response of dc dc converters
The converter of any power converter in general is to add disturbance in the loop in order to measure the loop again. Okay, remember that we can't open the loop and just inject a signal here, for example, at the input of the sensor and measure the output okay, we can't break the loop because this way it's in the system it can't operate in a stable state at the current DC operating point. Okay, so we have to measure the open loop gain without opening the loop, so this is the reason why we are injecting this signal, this disturbance vi is going to be a sine waveform, okay with different frequencies, so , with this signal, by injecting the signal at this point, then we are going to have this signal here at the output. vv is okay, which is the sum of the output voltage and the injected signal vi is okay, then this signal mvv will go through the entire loop, okay and it will come back here to the output, okay, by comparing these two quantities, these two signals will be a, which is equal to vo and also vb, then we can get the gain magnitude of the loop um in magnitude and also in phase, then we can say that if we analyze the circuit we can say that and then the gain magnitude of the loop is approximately equal to the amplitude of ba divided by the amplitude of b b okay and then the phase of the loop gain is approximately this value is 180 minus the difference between the faces of ba and bb okay why 180 here why do we have to make this correction here because when we are measuring here the loop again, if you look here, you can see that the vv signal goes through the entire loop and it will go through this minus sign here, okay, so we are including here in this measurement this minus sign, so what we are going to measure is the product of cs multiplied by one over vpp multiplied by zs multiplied by hs multiplied by minus one, so this is inevitable because we need to operate our system in this way, so we need to make this correction to have the value correct of the face of the loop again, okay, we can do this very easily in your space in our equations that we have in this correlation and usually it will be fine when we do this type of measurement in our laboratory, in the analyzer of frequency that is used to make this type of measurement and the frequency analyzer is going to measure only yes, an input signal and an output signal and will do the calculations by comparing the amplitudes and the faces, okay, but it will not do any type of correction, so when we do this type of measurement using a frequency analyzer, then we have to consider that we are going to have this quantity well, the difference between the two faces, so this is not exactly the correct value of the face out of the loop again and we have to undo this. correction if we like it, that's fine, but in the end this is very, very simple, so we just need to compare this value with 180 to know what is the value of our phase margin and how to do the loop gain measurement. our converter in Es space, the way to do this is exactly the same as we would do in our laboratory.
Well, now in our lab we will use a frequency analyzer to inject this sinusoidal signal with different frequencies and do the sweep within the frequency range. To do this we need an injection transformer because we want to inject our signal at this point we have no ground available so we use the injection transformer. We also use this resistor at the output of the transformer to allow direct current to flow. easily, then this value of the output resistance is not very important, we generally use 10 ohms, but it could be something like 5 ohms or even 50 ohms, okay, with this we are injecting our signals here, in series with the output, okay so here we have the vo signal and then here we have the vo signal morethe bi signal okay, similar to what we explained here in our block diagram, okay, this is the way to do it, so our frequency analyzer will measure the output signal and also the input signal here and then with these two signals you can calculate the loop gain well as we have seen and also in the phase of the loop gain remember that the frequency analyzer will calculate only this difference between the phases of both signals but in our case we are going to add the correction, so that we are going to have in particular the wrong value of the loop gain phase.
Well, you can see from what I'm writing here that the magnitude of t is approximately equal to this value and the phase of t is approximately equal to this value is not exactly the same well the reason is because there is an interaction between the subsequent converter and the compensator and the circuit to inject our signal into the loop. well, if we study this in detail, we will see that the output impedance of the downstream converter and also the input impedance of our feedback loop in this case the input impedance of our compensator is going to have an effect on our measurement.
Okay, so these equations are good and a good approximation of what we are looking for when these two conditions are met. Okay, so the conditions are that the magnitude of the input impedance here of the compensator has to be much larger than the output impedance of the downstream converter and also the magnitude of the loop gain has to be much larger than the ratio of the impedance output of the post converter and the input impedance of the feedback loop of the compensator is fine, this first condition is easy to check because normally what we have to do is find a good place to inject our signal, fine, and a good place to inject our signal into the loop is this, this place here because the output impedance of a DC-DC converter is usually quite low, it's very low and the input impedance of this compensator will be given by this resistor here r1 and it is on the order of kilo ohms, okay, so we can always keep it high, okay?
So this first condition is easy to meet. The second condition is not so easy to satisfy in or throughout the frequency range. Good, because we know that the loop gain is decreasing. Okay, so at some point it will be less than this value. Okay, sooner or later it will have a certain high frequency and it will be lower than this value. Okay, so we have to pay attention to this ratio and make sure that this ratio is low enough. Okay, then, in the range of interest. that we are measuring the magnitude of t okay and this magnitude of t is much larger than this value okay otherwise this measurement will not be valid okay and this is true if we make a measurement using feet or our lab using frequency analyzer okay then You can find proof of these conditions, for example, in this reference here.
Okay, now let's see how to get this response um from the loop gain using lts bytes. Okay, for this, I'm going to close this and open this other schematic. here and then here we have the scheme to measure the loop gain. Well, you can see that here what I have done is injected an ideal voltage source here in series between the output and the input of the compensator. Well in this case I don't need a resistor because this is just an ideal voltage source so it's going to be a short circuit for the DC component so there's no problem doing this okay so I'll start running the circuit because it is It will take some time and then inside the where, while the entities simulate, I am going to explain all these directives here, okay, now it is working, it is working fine, it has to do a total of 31 simulations and we can see here in The conclusion here is okay and it's going to take some time, so what we're doing, what we're doing, as we've also seen in the last video in this series, is a step analysis, uh, at the frequency , okay, frequency is the frequency that We're injecting this signal here, the amplitude, as you can see, is one volt, and this is the value of the frequency, so what Swift is doing is done with this command step here and it goes from 100 health to 100 kilohertz and with 10. points per decade, okay, so this means that we are going to work with decades, okay and then points within each section, okay, and this is the parameter that we are using, which is the frequency and then for each of these values ​​of the frequency injected here.
At this point we are going to perform a transient simulation. Well, the transient simulations go from zero to this maximum value t zero plus five times the period of the injection signal. Okay, so d0 is a millisecond. Okay, so the total time is one millisecond plus this value. five times the injection signal period. I'm selecting a millisecond here because I'm going to start saving data after this time. It's okay because this way we are assuming that we have reached a stable state that we have seen before and that we reached. steady state at something like 5 microseconds, so I'm using one per millisecond here.
Well, you can see that at first, for the lower frequencies, the simulations take longer because this time is longer. Okay, since we're increasing the frequency. This period is um. a lower value is okay and the total simulation time is less, okay and then the simulation is much faster, so we have or we are also using here a maximum step time of 1 of 0.1 microseconds and then for each one of these values, what we are doing. here it is processing the information that will be stored in our log file, so this is the same as we have seen before, we are getting the average value in the output here, the average value in what we call input, okay to get the loop again so that a refers to the output and b refers to the values ​​at the input, okay, and then the real part and the imaginary part of the corresponding harmonic in the Fourier series as we have seen, see the last video in this series to get more information, then the real part and the imaginary part of the input, okay, then we can calculate the magnitude and the output, the magnitude and the input, okay, the corresponding harmonics, then the phase at the output and the phase at the input , okay, the magnitude of the loop again and the phase of the loop in the game is fine and then with this as we have seen we are saving this information to save space, then with this we select double precision double float so that our data has more precision and then with this we are selecting that no, we are not interested in seeing the proteins while the simulation is running.
Well, this is just a simple setup for our simulation. Okay, to see the results as we know, we can go to our block. file okay to see our log file I think we can go here see and see in the log file okay or we can access it also by pressing ctrl l okay and we can see here all the information these are the different frequencies that we are going to use for do all the different analyzes and here we have the different data, okay, the average values ​​at the output, the average values ​​and the input, okay, we have the real component of the corresponding harmonic at the output, the imaginary component and the output for the input . the same the real part the imaginary part then the magnitude and the output the magnitude at the input the phase at the output the face of the input and the magnitude of the loop gain well calculated with this expression here and the face of the loop again You can see here the correction, so we have the correct value in the loop gain.
Now, to see this represented on the graph, we can right-click and then use, select this option here, select what we want to represent. the complex and the data so say yes here and then we can right click here and then add a trace on this we select the game which is the loop game and with this we are selecting both the magnitude and the face of the loop game, okay and then We get this representation, so in the solid line in red we can see the magnitude in dbs and in the dashed line also in red we can see the phase of the loop gain, so we can see that the slope here is something like 20. dbs per decade and then here the slope increases, okay, so this is something similar to expected, remember that here in green we have the frequency response of the loop, okay, the gain of the loop, so which at the crossover frequency here will be something like seven kilohertz, but we know that the real response is the asymptotic response, so we can do the measurement here of the bat wing in the bandwidth here so we can move to zero dbs, okay, and we can get here for zero db, um, a crossover frequency of 2.3 kilohertz, okay, so this is the value and the phase at this point is 126 degrees, so we have something like 54 degrees of headroom of phase, then the system is quite stable, to check something else, we can check for this point seven, one kilohertz will be something at the point where we reach this value of minus 135 degrees, let's check this, so if we look for the point here with a face, this point of minus 135 okay, we can see that the frequency is similar to this value of 7.7 kilohertz, okay, so the cycle response again is as expected, okay, we can also see how the phase is decreasing, okay, but then we have here, um, the decrease in um is at a slower rate and maybe a little bit of an increase in this part of the phase because we have the effect of the zero corresponding to the equivalent series resistance of the capacitor which was around 100 kilohertz, okay, then at some point a decade below, the zero effect starts to reflect back on the face of the loop, okay, but we also know that at this Because we're getting closer to the switching frequency, we cannot obtain a very accurate measurement.
Good, because we are getting into the nonlinear behavior of our system. Well, this is all in this presentation today. I hope you found this presentation useful. Please allow me. I know if you have any comments or questions, thank you very much for watching this video and see you next time, goodbye now.

If you have any copyright issue, please Contact