In this lecture, we will illustrate the design of the voltage control loop around an average current mode controlled converter using an example. The example will be the same boost converter we have already designed the current control loop for, the boost converter taking 170 volt input DC voltage delivering 2 kilowatts of power at 400 volts to a load, and the current control loop is designed to have a cross-over frequency of 10 kilohertz with the current loop compensator that is shown right here. For the current control loop, as a reminder, here is the closed-loop control-to-inductor current response, which for a wide range of frequencies follows the ideal response of just 1/Rf. So in the design of the voltage control loop we rely on the loop gain that's based on the simple approximation that the current loop operates perfectly. And the first step in the design of the voltage control loop is to determine the control to voltage transfer function. In the previous lecture, we have explained how that control to voltage transfer function can be obtained in the form of 1/Rf times the ratio of Gvd over Gid. Where Gvd and Gid are duty-cycle to voltage and duty-cycle to current transfer functions for the converter. Let's do that for the boost converter example. So here is the control loop that we have in mind and here are Gvd and Gid for the duty-cycle controlled boost converter. These transfer functions can be obtained by circuit analysis of the small signal model of the boost converter, and that's the material that we studied in Course 3 of this Specialization. So plugging in Gvd and Gid into the expression for the control-to-voltage transfer function and computing the loop gain, we have an expression for the loop gain shown down here. That loop gain includes a low frequency gain in front, a right half plane zero in the numerator, and a pole in the denominator. For the numerical values that we have for the boost converter example, the right half plane zero is at relatively high frequency around 9.2 kHz. The pole frequency is at 121 Hertz. In the loop gain, we will need to know the value of the sensing gain H. As a practical choice, we would have the reference voltage of 3 volts. And then, the sensing gain H is set to 0.0075, so that when the voltage loop is operating perfectly, the output voltage is regulated at 400 volts, as desired. The summary of the numerical values that we have in the example is shown right here. So let's now plot the magnitude and phase responses of the uncompensated voltage loop gain. In fact we'll only plot the magnitude response because the phase response can easily be inferred from the magnitude response. We have low frequency gain, a low frequency pole at 121 Hz a roll off of minus 20 dB per decade followed by a right half plane zero at 9.2 kHz. Our desire is to set the voltage loop crossover frequency to 1 kHz. Why 1 kHz? Well remember, the crossover frequency for the current control loop was set to 10 kHz, and our objective is to take advantage of the current control loop operating very close to ideal which means that it behaves as 1 over Rf gain at frequencies of interest. And so the voltage-loop is typically closed at frequencies that are well below the cross-over frequency of the inner current-loop. And this is a practical example. So with 10 kHz being the crossover frequency of the current control loop, one-tenth of that is the crossover frequency target for the voltage control loop. Around that frequency, it is good to notice that the uncompensated loop gain has minus 20 dB per decade roll off, and in fact behaves asymptotically as a constant over s transfer function. What is that transfer function? Well, in the complete expression for the uncompensated loop gain, we notice that the desired crossover frequency is above the low frequency pole, which means that we can neglect 1 right here and it's well below the right half plain zero frequency, which means that we can neglect the term right here with s. And so, the asymptotic behavior of T sub vu, around the cross-over frequency can be then simplified in the form of what is shown right here, and, as expected, it behaves as constant over s. This is very convenient because this will allow in the next step to easily find out what gain we need in the compensator to set the cross-over frequency at the desired value of 1 kHz. That is the next step so lets find out the compensators' transfer function so that the desired cross-over frequency is 1 kHz and so that we have adequate stability margins. As in many cases that we have examined in this course, a simple PI compensator is sufficient. In fact in this case here we just say it's a gain and inverted zero, and that's it. We don't even bother explicitly placing the high frequency pole in the transfer function. We will, as a matter of practice, put a high frequency pole to attenuate noise from the loop. But in the design we can stick to just the simplest expression for the PI or lag compensator in the form that is shown right here. So the first step is to determine the value of the gain at the cross-over frequency, to set to the cross-over frequency to 1 kHz. The cross-over frequency is going to be above the zero frequency which means that we can neglect this term here in the asymptotic behavior around the crossover frequency. And so the calculation of gain is again very simple. The asymptotic behavior of the uncompensated loop gain times G sub vm should be equal to 1 at the frequency equal to the target crossover frequency. This gives us the value of the gain in analytical closed form as shown right here G sub vm = 16.4. Now, the choice of the zero or the inverted zero in the PI compensator is somewhat arbitrary. A lower frequency of the zero will result in higher phase margin, but will also result in a lower value of the loop gain at low frequencies. So we choose in this example the zero frequency to be one-third of the crossover frequency which gives us the phase margin of around 70 degrees, which is considered practical choice. To verify the design, we construct average circuit model and that average circuit model is really an extension of the average circuit model that we have previously used to verify operation of the inner current control loop. So you may refer back to the lecture where we talked about the verification of the inner current control loop using average circuit simulation. The only additional part here is the implementation of the voltage loop compensator and the sensing gain that we have in front of it as shown right here. We have a voltage divider Ra and Rb that sets the sensing gain to approximately the value that will result in 400 volts at the output given the voltage reference of 3 volts. And then the component values in the compensator circuit are selected to have the desired value of the gain and the location of the zero frequency in the PI, or lag, compensator. Notice that we have added a parallel capacitor on top of the network around the op-amp here, simply for the purposes of having some additional attenuation of the high frequency noise from the voltage control loop. The simulation is set up first to verify the loop gain. And in fact in practice that's what you would do first. Once you design the compensator you use average circuit simulation to examine whether your loop gain is indeed verified compared to the analysis, and the design that you have performed. So, we are placing a voltage injection v sub z between the output of the voltage loop compensator, and the input, the control input for the inner current control loop. Library used in simulation is average.lib because we are relying on the averaged switch model. We are sweeping the frequencies from 10 Hz to 100 kHz with 300 points per decade and we are again using the measurement line to determine the value of the cross-over frequency is an alternative to simply using a cursor on results from simulation. And here is the result for the loop gain magnitude and phase responses. Cross-over frequency is verified to be very close to the design value of 1 kHz, and the phase margin is close to 70 degrees as we have done in the analysis. Next, you can do other types of simulations to verify the design further. For example, we can use the average circuit model to verify a step-load transient response with respect to the output voltage when the load changes from one value to another. In this example here you will notice that you have a load of 160 ohms placed at the output and another load of 160 ohms is placed in parallel with the switch in series. And depending on the position of the switch, we have a load that corresponds to 50% of output power of around 1 kW, or 100% of output power or 2 kW. So, we will have a load transient that examines what happens with the output voltage when the load steps from 1 kW, or 50% to 2 kW, or 100%. The transient simulation is performed right now, which means that the transient simulation line is now active. And of course you're still using the average.lib library with the averaged switch model in the circuit model of the converter. Here is the transient response to that 50% to 100% step load transient right here and back from 100% to 50% step load transient right here. The output voltage, which is well regulated very close to 400 volts, dips slightly by less than 10 volts and then recovers back to regulation in a couple of milliseconds, as one would expect from a control loop that has a cross-over frequency of about one kilohertz. The opposite transient has similarly nice behavior with a slight overshoot of less than 10 volts up and then returning back to regulation within a couple of milliseconds. The bottom waveform shows the behavior of the average value of the current. Remember this is a simulation on the average circuit model and so there are no ripples shown in this simulation. So the average current goes from the 50% load, to 100% load, in a step load transient, up and then down, as one would expect. Once you're satisfied with verification performed on the average circuit model, you may go one step further and construct a switching circuit model for the converter as a final step in the verification. Here is the switching circuit model for that boost converter example with all details included. Instead of the average switch model, now we have real devices that are switching, a MOSFET and a diode. The MOSFET is driven by gate driver and the gate driver receives the control signal from a pulse-width modulator, which operates at 100 kHz and with VM equal to 4 volts. Other than that, the rest of the model is really the same as in the average circuit model, and that includes the step load, compensator in the voltage loop, and the compensator in the current loop. Now, this is a circuit model that is obviously best suited for transient simulations and that's exactly what we will do. We will re-verify step-load transient using now switching circuit model. The results are shown right here, and you can see remarkable similarity between the output voltage transient waveform, and the inductor current transient waveform compared to the average circuit simulations. Of course, now ripples are included. And so you see the value of the ripple in the output voltage right here, and the value of the ripple current in the inductor current waveform obtained from the switching circuit model of the boost converter example. To summarize the design of control loops in average current model controlled DC-DC converters, the main point to note is that we’re talking about a two loop system where the inner current loop has a crossover frequency that is typically much higher than the cross-over frequency of the outer voltage control loop. The design of the inner average current control loop is based on the converter duty cycle to current transfer function. The design of the outer voltage control loop is based on the closed-loop control to current response taking into account that the inner current control loop is operating. A simple approximation is usually sufficient, which assumes the inner current control loop is operating perfectly or ideally at frequencies around the cross-over frequency of the voltage control loop. Simple PI or lag compensators are usually sufficient in both control loops, and they're relatively simple and easy to design. A summary for the average current mode control overall is that the key point being that the average current rather than peak is controlled to follow a reference. Advantages compared to peak current mode control include better noise immunity, and the fact that the average current can be precisely controlled even in cases where that current could be in discontinuous conduction mode, or be pulsating or have significant ripple. Disadvantages include the fact that we don't have immediate peak transistor current limit, and the control approach does not mitigate transformer saturation problems in push-pull type converters. Applications of average current mode control are very broad and include DC-DC converters as we have illustrated in a simple boost converter example, nut they also include significant application cases in AC to DC rectifiers, and DC to AC inverters. And in the rest of the lectures in this segment of the course we will in fact look briefly into these two different application areas.