# Considering the inductor in a buck DC-DC converter, how to compute the current through it?

I've been stuck for a few days to the very first point of a lab in which we analyse the behaviour of buck and boost converters. The circuit is built by the university I study in, so there is no acutal "serial number". Anyways, the switching works by providing a 2-phase PWM signal with a given deadtime. I managed to produce the two signals requested for the circuit, then powered the circuit up, and I set as input a 10V DC constant signal. According to the assignment, adding an external resistance of 30 ohm should output about 5 volts (added to protection power resistors), and it appears I managed to do so, but only for specific amplitudes of the MOSFET-gate PWM signals stated above. I believe this is due to the charging capacitors providing a different duty cycle (I used 350pF ceramic capacitors in order to introduce the "dead time" between waveforms; see the pictures below).

While the above is the wanted result, I think I was able to kind of replicate it, and since the circuit actually outputs a signal with the wanted voltage, I think the steps I made are right for now (yeah, the effect of the capacitors is quite evident):

I am then asked to measure the output voltage ripple - which should be measured from a pin called $$\V_{21}\$$, that is the "true" output of the buck converter due to the voltage divider induced by the load and the protection resistors. I was not sure on how to do so (unfortunately, I'm doing all this on my own and with limited tools because I was sick during the actual laboratory session), so I connected $$\V_{21}\$$ to the oscilloscope after setting the attenuating probe to 1X (and setting on the oscilloscope "AC" to remove the DC component), obtaining the following waveform in CH2 (CH1 is the PWM "high" signal): It's very noisy, but I seem to get a maximum ripple of about 30mV. I have no idea on whether this is a reasonable waveform (or if even the value is reasonable, over the "average" of about 5V), but I kept going on. I am now totally stuck on a point where it asks for the inductor current. In particular, I have to compute its maximum and minimum values according to the output capacitor's data included in the datasheet, and then compare such result to the theory. Now, from the theory I've understood, during the ON state the current through the inductor should be the same as the switch current, and the output capacitor absorbs the variable component of such current while the load absorbs the average, therefore I should be able to evaluate the current through the inductor by combining the two. However, to me, this sounds like a theoretical result, rather than a measured one, especially since I am then asked to compare the result to the theory - so I wonder, what theory? Maybe the theory should indeed be the fact that I get the average on one output and the variable component on the capacitor - but then, I must assume there is a different, more practical method to measure the current by considering capacitor values.

Which is why I wrote so far: is there a practical method to measure the current of the inductor, and is my reasoning correct or I am messing up some other parts of theory? (I ask because, having 2 synchronous and complementary signals, I have no idea of when the switch should be open or closed). I'd like to ask for more clarifications to my professor, but unfortunately I am not able to reach to him so I'm wondering if you could help me - any kind of help would be very appreciated.

For now, I tried measuring the current through the capacitor by focusing on the simplified schematic of the circuit:

From this schematic, I noticed how the output $$\V_{21}\$$ is directly connected to ground through the output capacitor $$\C_{p2}\$$, therefore the entire drop happens there. I already had the waveform of the ripple of $$\V_{21}\$$, hence computing its derivative (or at least, its positive part) seemed the easiest method to me. I thus far obtained $$\\frac{dV_c}{dt}\approx 5.4\times 10^3V/s\implies I_{Cp2}=C_{p2}\frac{dV_c}{dt}\approx 5.4\times 10^3V/s\times 33\times 10^{-5}F=5.4\times 33 \times 10^{-2}A=1.782A,\$$ which looks simply illogical to me. I'm not an expert but the capacitors used are electrolytic and almost 2A through an electrolytic capacitor seems a bit too much to me. Could this still be a reasonable value (and procedure)? And in case, I think I am missing the "does this agree with theory?" part... I am so confused.

By the way, the professor provided us the following specs for the input/output capacitors, labeled CP1 and CP2 in footprints of the PCB: $$\C=330\mu F\$$, ESR=0.4 ohm, $$\V_{rated}=50V\$$, $$\I^{rms}_{max ripple}=480mA\$$ (I wonder if that ESR could be exploitable somehow; it should be noted that I bypassed the input protection resistor $$\R_{L1}\$$ by shortcircuiting the pins JM1 (those two first 2 pins in the schematics) in order to have a direct input connection, yet I did not bypass the output resistors).

If anyone could help, I'd be very grateful, so thanks in advice! And sorry if I made silly mistakes... I'm still a newbie

• The current in the inductor can be measured by inserting a wire in series with it and clip a current probe around it. That current is made of an ac ripple (triangular waveshape) and a dc value. It is usually approximated that all the ripple goes into the capacitor while the dc goes to the load. So your inductor current measurement should show a triangular waveform centered around the current you deliver and affected by some ripple. The peak-to-peak ripple $\Delta I_L$ is either $\frac{V_{out}-V_{in}}{L}DT_{sw}$ or $\frac{V_{out}}{L}(1-D)T_{sw}$. – Verbal Kint Jan 11 '20 at 9:25
• @VerbalKint Thank you a lot for your answer! Trying to measure the actual current thru the inductor will surely help me to check the result. The fact is, the assignment asks to compute it knowing the capacitor values, and then, compare it to theory. I imagine that ripple formula you showed me in the end is indeed the theory, so that surely helps me. I'm kind of stuck due to capacitor values though - it's like I get 1.7V through a capacitor... I'm not sure if that is a reasonable result, but I'll check soon with the formulas you mentioned. By the way, is the voltage ripple I got ok? – Maurizio Carcassona Jan 11 '20 at 17:00
• I mean, I got a triangular waveform as output voltage ripple, but usually books show a "semi-curve" waveform, which I get instead if I use the PWM signals as triangular or sinusoidal waveforms – Maurizio Carcassona Jan 11 '20 at 17:02
• The "real" ripple across the output capacitor is actually a combination of the voltage drop across $r_C$ (a triangular shape), the capacitor equivalent series resistance or ESR and the capacitive drop (a quasi sinusoidal shape) which is obtained by integrating the capacitor current. When you sum up these instantaneous waveforms, you have the total ripple. If you have the voltage across the capacitor and it looks triangular, then the capacitive contribution is negligible and the voltage you collect is $i_L(t)r_C$. If you know or measure $r_C$, you know the inductor ripple. – Verbal Kint Jan 11 '20 at 17:54
• @VerbalKint now that's very interesting, thanks! I'll try that out – Maurizio Carcassona Jan 11 '20 at 17:56