# Why does the current rise and fall linearly in a DC-DC converter?

I don't understand why the current in a DC-DC converter rises and falls in a triangular waveform pattern. I think it has something to do with the energy in the magnetic field, but I don't know any equation to back this up. When the switch turns on and off, the through the inductor changes in a square waveform between the current through the load and current through the switch. Therefore, where does the linearity come from, as shown in graphs like below? Most real switching supplies will have a capacitor in parallel with the load: simulate this circuit – Schematic created using CircuitLab

It is this capacitor that makes the voltage supplied to the load approximately constant even with the switching. In the periods where the switch is closed and the inductor is not supplying current to the load, the load draws current by discharging C1.

Also keep in mind, there is usually something regulating the duty cycle of the switch to keep the output voltage, and thus the voltage across C1, at some target.

The graph in your question it graphing current and voltage for the inductor, not the load. When the switch is closed, the voltage across the inductor is V1. When the switch is open, the voltage across the inductor is the output voltage, plus a little more to forward-bias D1, minus V1.

Either way, there's a constant voltage across the inductor in either state. A constant voltage across an inductor results in a linearly changing current, according to the definition of inductance:

$$v(t) = L{\mathrm di \over \mathrm dt}$$

• Is there a reason the capacitor is not included in the model in my post (from wikipedia)? It seems like an integral part if the capacitor is needed for correct operation. Or can it still operate without the capacitor? – tgun926 Jan 9 '15 at 4:59
• @tgun926 it's only almost always needed. Sometimes you don't need a steady voltage, for example if the load is an LED you don't even need the load, you can make D1 the LED. Or maybe you are making a current source and not a voltage source, and you'd have some other filter which might involve a series inductor. That, and most real loads will have a lot of power supply decoupling caps, so C1 is effectively there anyway. – Phil Frost Jan 9 '15 at 12:42

The triangular waveform is actually an approximation. It's called the small-ripple approximation, and relies on the following assumptions:

1. The output voltage is constant and any ripple is small.
2. The input voltage is constant and any ripple is small.
3. The diode and switch can be modeled as linear elements with current equal to the average inductor current.
4. The inductor current is always greater than zero. This is called continuous conduction mode (CCM).

When all of these assumptions are met, the inductor voltage is constant in each part of the cycle, which causes the current to change at a constant rate ($\frac{di}{dt} = \frac{V}{L}$). The simplest modes uses an ideal diode and switch. In that case, your inductor voltage will equal the supply voltage (when the switch is on) or the supply voltage minus the load voltage (when the switch is off). The latter voltage is negative, which causes the inductor current to decrease.

Assumptions 1 and 2 mean that the converter is in a steady state. Under normal circumstances, the input and output capacitors maintain this condition. Assumption 3 makes it possible to have simple analytical solutions to the circuit equations.

If assumption 4 is violated, the converter still works but the inductor current is no longer triangular. Instead, for part of the cycle there's no inductor current at all! This condition is called discontinuous conduction mode (DCM), and it happens when the load current is small.

In a synchronous regulator, the diode is replaced with a second switch (transistor). In this case, the inductor current doesn't stop at zero, it goes negative! The waveform is triangular, just like CCM. This condition is called forced continuous conduction mode (FCCM). A big advantage of this is reduced EMI.