In this lecture, you will learn how to design the current loop compensator in the average current mode control loop around a switching power converter. We will use a boost converter as an example. In this boost converter the input DC voltage is set to 170 volts, and the converter is operated to produce an output voltage of 400 volts with 2 kilowatts of output power. The inductance is 250 microhenries. The output filter capacitance is 33 microfarads. We operate a converter at 100 kilohertz, with a pulse width modulator, that is assumed to have VM of four volts. The equivalent current sensing resistance is assumed to be 0.25 ohms. The objective is to resign the current control compensator, Gci(s), so that the cross-over frequency for the current control loop is equal to 10 kilohertz. And so that we have at least 45 degrees of phase margin. Notice the switching frequency is 100 kilohertz and now the goal is to design the cross-over frequency to be 1/10 of the switching frequency. First, let's see the steady-state solution. Assuming our current control loop works perfectly, meaning the input current is exactly equal to the reference value, given the specified input voltage and output voltage, we find that the duty cycle of the converter should be equal to 0.575. The DC input current, which is equal to the DC value of the inductor current, is, neglecting losses, equal to 11.8 amps. And assuming the control input equals the sensed value of the current, in DC sense, the control input would need to be equal to 0.25 ohms, the assumed value for the equivalent current sensing resistance Rf, and the DC value of the current 11.8 amps, which gives us the control input of around 3 volts. Now at this point here you may be concerned about one particular detail. If the sensing resistance of Rf, we use to sense the inductor current of 11.8 amps, the power loss on that sense resistor would be Rf IL squared, in the order of 35 watts. Well, that's clearly a lot, and would be considered unacceptable, not practical. So how is this current sensing in fact actually done? Certainly, it's not done by placing 0.25 ohm resistor in series with 11.8 amps of current. Instead we employ any one of other methods for sensing current that do not involve significant amount of power loss. One practical approach is illustrated here, where a relatively small value of the sense resistance is placed in series with the current we're interested in. In this case, the inductor current which flows also in this branch right here. The circuit ground is assumed to be placed at the source of the power transistor. And then the current iL is observed as the voltage drop across the current sense resistance Rs. The voltage drop is then amplified by a simple inverting op-amp configuration with a gain equal to the ratio of the two resistors, Rs2 over Rs1. So as an example, if we choose 10 milliohms for the current sensing resistance, the power dissipation on that current sense resistance would be around 1.4 watts, which can be considered acceptable and practical. It is a very small fraction of the output power of 2 kilowatts in this converter. But to reach the desired value of the equivalent current sense resistance, we could employ a gain in the sensing path of Rs2 over Rs1 = 25. So 25 times 10 milliohms then gives us this assumed value of 0.25 ohms for the equivalent current sense resistance. This is just one possible way of sensing current. There are a number of other ways that are used in practice. But in any case, it is certainly important to understand that the equivalent current sense resistance represents the total value of the gain between the sensed current and the voltage value that shows up in the control loop. And it doesn't mean that that resistance is inserted in series with the current flowing in the power converter. Now that we have current sensing and steady-state solution out of the way, let's proceed with the design of the current control loop. Remember that the design is based on our expression for the current control loop gain. The product of Rf, Gci, which is really what we want to determine, a gain of the pulse width modulator and the control to output transfer function Gid. The first step is really to determine that control to output transfer function Gid. We would typically do that by circuit analysis of an equivalent small signal circuit model that we already know we have for the converter. For the boost example, here is the boost small signal equivalent circuit model. And by circuit analysis you can find out the Gid(s) which is really the ratio of iL hat over d hat when all other independent inputs are set to 0, is equal to a low frequency gain times a transfer function that has a 0 in the numerator and a pair of poles in the denominator. We have analytical expressions for the low frequency gain, and we can plug in numerical values to find what that low frequency gain is. And similarly, we can find analytical expressions for the corner frequencies f0 and the zero frequency fzi, and evaluate those values given the parameter values for the example. The zero frequency comes out to be around 120 Hertz, and the center frequency of the pair of poles is 745 Hertz. The Q factor of the pair of poles is relatively large, 12.4. So now that we have the duty cycle to current transfer function, we are in position to sketch the magnitude and phase responses of the uncompensated current loop gain. Let's do that. So here is the expression for the uncompensated current loop gain. You will notice immediately that this is simply a scale factor, Rf times 1 over Vm times the expression we had found for the duty cycle to current transfer function. So we have zero in the numerator, a pair of poles in the denominator, and a low frequency gain in front, which now includes the factors associated with the current sensing resistance Rf and the gain of the pulse width modulator. The low frequency gain of the un- compensated current-loop gain comes out to be 10.8 dB. So, here's a sketch of the magnitude response of the uncompensated current-loop gain. We have a low frequency gain, zero at 120 hertz, followed by a pair of polls at 745 Hz with relatively high Q factor, then magnitude response rolling off at -20 dB per decade. And we see that at the frequency that is the desired cross-over frequency, the magnitude response is well below zero dB, which really means that our current-loop compensator will have to provide an additional gain in the loop, so that we can bring cross-over frequency to ten kilohertz. The amount of gain needed to do so can be found very simply by noting that around the cross-over frequency, which is well above the zero frequency and well above the frequency of the poles, we have a simple asymptotic behavior of the uncompensated current-loop gain that can be found as follows. You see in the expression for uncompensated current control loop, we have a low frequency gain, zero and a pair of poles. In the range of frequencies around the crossover frequency, we are well pass the zero frequency, so that we can approximate the numerator with just s over w zi. We are well pass the frequency of the pair of poles. So in the denominator, we can approximate the transfer function with just s square over omega_0 square. So that in this range of frequencies, Ti(s) is going to behave as Tiu0 times s over omega_zi over s squared over omega_0 squared and you see that the result is equal to Tiu0 omega_0 squared over omega_zi over s or a constant over s. And indeed, we see that in the part of the magnitude response, we have a rolloff at minus 20 dB per decade in that range of frequencies. And we have indeed, a simple expression, a constant over s, that represents the behavior of the uncompensated current-loop gain around the cross-over frequency. This is summarized right here. So, asymptotic behavior of the uncompensated loop gain around the cross-over frequency can be represented as a constant over s. When we plugin analytical expressions for these three values that we have in the numerator, we obtain a very simple expression for that constant, which depends only on the gain and the pulse-width modulator, the equivalent current sensing resistance Rf, the dc value of the output voltage, and the value of the inductance L. Let's look at this result here from an intuitive point of view. It is in fact possible to come up with this asymptotic behavior of the uncompensated current control loop gain simply by observing the behavior of the equivalent circuit model of the boost converter. At frequencies around the cross-over frequency, which is a relatively high frequency compared to the corner frequencies of the converter, we can approximate the behavior of the equivalent circuit model, as follows. The frequency is relatively high, which really means that the output filter capacitor here behaves as approximately a short circuit. The output voltage perturbation can be assumed to be essentially 0 at such high frequencies. What that really means is that when you look at the iL_hat response on the input side. And of course, in the process here, we assume that vg_hat =0. All independent inputs other than d_hat are set to 0. You can solve the circuit here by noting that this voltage here is approximately 0, which means that the primary side of this transformer is approximately 0. And so the equivalent circuit model behaves simply, as a controlled voltage source V d_hat in series with inductor L and the current of interest is iL_hat. So you see here immediately that iL_hat over d hat is going to be equal to V, which is equal to the output voltage capital V=Vout. So Vout over sL, the impedance of the inductor in series with that voltage source. In the control loop, we have additional gains. Rf and 1 over Vm, which is why we can say that the asymptotic behavior of the uncompensated loop gain around the cross-over frequency can be approximated as a simple expression as shown right here. So now that we have the expression and the plot for the magnitude and phase responses of the uncompensated current loop gain, we're in position to determine the current-loop compensator transfer function to achieve the desired cross-over frequency and phase margin. Let's do that. Around the cross-over frequency, the behavior is going to depend on the type of the current-loop compensator we select. Remember, we have found that the uncompensated loop gain has a roll off of minus 20 dB per decade around the cross-over frequency. This is what makes it very easy to design a compensator around that response, which is a simple PI or lag compensator shown right here. In fact, we could go even for a simple just proportional compensator if we wanted to do so. But typically, we do employ a PI compensator with an inverted zero in the numerator, because we want to make sure that the DC error in the control loop is going to go to zero when the loop is well designed. In addition to this inverted zero, we also typically place a high-frequency pole in the response of the compensator. And that pole is what brings in the low-pass nature to the current-loop compensator and filters out switching ripple or any noise associated with sensing the current in the switching power converter. So, a most typical compensator in the current control loop is of this type. Again, Gcm, this gain is going to be selected, so that we position the cross-over frequency where we want. And then the zero and the pole, inverted zero and the pole, those are placed around the cross-over frequency to obtain an adequate amount of phase margin and to make sure that our loop is stable and well behaved. Remember that around the cross-over frequency the loop gain has an asymptotic behavior uncompensated, that is a simple constant over s. Around the crossover frequency, similarly, since we're now beyond the zero frequency and before the pole frequency, the asymptotic behavior of the PI compensator reduces to simply the gain Gcm. And so we can conclude that around the cross-over frequency, importantly, the loop gain is a simple constant over s, and that constant can be moved up and down by the choice of G sub cm in order to position the crossover frequency or the frequency where the magnitude of Ti is equal to 0db wherever we like. And that's exactly how we choose Gcm. So we set crossover frequency to a desired value and we choose Gcm, so that at the crossover frequency the magnitude response of the compensated loop gain has a value equal to 1 or 0 dB. Here's a solution for the gain required to do so. Plug in numerical values, and you obtain the gain equal to 0.63. Then we make a choice of where to position the inverted zero and the pole. The inverted zero is placed well before the cross-over frequency and the pole is placed well above the cross-over frequency and there is some tradeoff here in the choice of where to position f sub z and f sub p. Positioning fz lower and fp higher will result in a higher, or larger amount of phase margin but the filtering of the high frequency noise would then be compromised on the high frequency end and we would have a narrower range of frequencies where our loop gain is very large on the lower frequency end. So as a compromise we choose this factor of 2.5. Typically you can choose that factor to be anywhere between, let's say, 2 and 5 for where to place the zero frequency below the crossover frequency and where to place the pole frequency above the desired crossover frequency. With this particular choice, we get a phase margin of about 46 degrees which meets the objective. The last step is to implement the PI (lag) compensator and the typical op-amp based implementation is shown right here. It is quite simple. The reference value for the control input is brought to the plus input of the op-amp, around the op-amp a circuit is constructed by having a resistance of R1 in front from the sensed value of the current of interest to the negative input of the op-amp and in the feedback circuit, we have an RC network that gives us the ability to position the inverted zero and the additional high frequency pole. The high frequency pole is much higher than the inverted zero which makes it very simple to determine what the frequencies are in relationship to the component values. So at frequencies around the crossover frequency which is pass the inverted zero, the gain is simply equal to the ratio of these two resistors R2 over R1 so that's Gcm. The zero frequency is determined by the values of R2 and C2, it's right here and the pole frequency is determined by the values of C3 and R2 and that is the expression that we have right here. And you can verify that with these numerical values that are shown right here we get the zero, pole and the gain values that are very close to the values that we have computed. The values are rounded to the nearest standard values, and so these are not exactly the values that would result in the exact values of the frequencies and the gain but instead are practical rounded values that correspond to standard component values that we can employ. Next we are going to verify our design using average circuit simulations.