- Basics of electronic circuits
- What is a voltage regulator

- An introduction to inductors and capacitors
- The transistor does not dissipate energy, like in the linear regulators
- Ripple
- Duty cycle
- Efficiency
- Control
- Topologies

As we have seen in the voltage regulators section, regulators can be roughly divided in linear or switched-mode. Switched-mode regulators do not waste energy like linear regulators. Instead, they transfer and store energy from the input to the output periodically and release the stored energy continuously to the load. Some internal components of the switched-mode regulators work as buffers of energy and the load gets a constant flow of current.

Say we have a load that consumes 1A at 5V. The power is 5W, right? What other ways could this power be delivered to the load? We could divide the time in periods and deliver twice the power in half the period, and nothing in the other half, or 4 times the power in 1/4 of the period and nothing in the remaining period, and so on.

In the same way, we have meals in specific periods, but we spend the energy from the food throughout the day, because we can store it. That begs the question: what type of components can store electric energy? Inductors store energy in the form of current and capacitors in the form of voltage, but we will talk about that in the next section. As of now, you know that **switch-mode regulators do not waste energy and it is stored temporarily in inductors and capacitors**.

To understand how switching regulators work, you should know the basic principles of inductors and capacitors. Unlike resistances, the current flowing through inductors and capacitors may not be proportional to the voltage at their terminals. A current in an inductor can only change gradually, even if its voltage changes abruptly. The rate of change of the inductor current is proportional to the voltage across its terminals and inversely proportional to the inductor value $L$. In math, $$\frac{dI}{dt}=\frac{V}{L}$$ If the voltage could suddenly drop to zero (ideal short circuit), the current in the inductor would remain the same.

A voltage in a capacitor can only change gradually, even if its current changes abruptly. The rate of change of the capacitor voltage is proportional to the current flowing through it and inversely proportional to the capacitor value $C$., i.e., $$\frac{dV}{dt}=\frac{I}{C}$$ If the current flow stops (ideal open circuit), the voltage at the capacitor terminals remains constant. You can now see that these two components can store energy: the energy stored in an inductor is: $$E = \int_0^T i\cdot v\,dt = \int_0^T i L\frac{di}{dt}\,dt = L\int_0^{I} i\,di = \frac{1}{2}LI^2$$ and the energy stored in a capacitor: $$E = \int_0^T i\cdot v\,dt = \int_0^T C\frac{dv}{dt} v\,dt = C\int_0^{V} v\,dv = \frac{1}{2}CV^2$$

The connection between input and output is done by active devices, such as bipolar or MOS transistors. A transistor can work as a switch, it can be on or off. Both states have low dissipation, off there is no current, on its resistance is very low. In between states, the transistor has high dissipation.

In linear regulators, the transistor is controlled in the high dissipation region, because the regulator creates a controlled voltage drop at the terminals of the transistor. Switched-mode regulators send bursts of energy when the transistor is on, and cut the transfer of energy when the transistor is off. This way, the dissipation in the transistor is always low, except in the very short transition periods. But you might be wondering, how can an output voltage remain fixed with these bursts of energy?

In reality, the output voltage is not exactly fixed, but ripples around the desired value instead. When the energy is bursted to inside the regulator, the inductor current increases. When the energy flow is cutoff, the load takes charge from the inductor and its current decreases. The same happens with the voltage of the capacitors in the regulator.

The inductors/capacitors have a value large enough so that their currents/voltages remain close to the desired value during normal operation. The ripple term is commonly referred as the amplitude of the current/voltage around the average value, i.e., how much the current/voltage ripples around the average value, in a complete cycle in steady-state. The period controls the amplitude of the ripple: if you eat more times during the day, you will have smaller oscillations of the energy stored in your body.

The fraction of the period the transistor is on controls the output voltage, which also depends on the input voltage and the load current. This term is known as duty cycle. In analogy, if you spend more time eating (the duration of the on state), you get more energy and if you spend more energy (the load current), the energy decreases faster.

Efficiency is the ratio of output and input powers. In switched-mode regulators, power is lost in parasitic resistances, such as winding resistance of the inductors, equivalent series resistance in capacitors and on resistance of the transistors. Regulators of this type have efficiencies in the order of 90%.

We could regulate the output voltage by blindly setting the duty-cycle according to expressions that relate the input voltage, the output voltage and duty-cycle. However, most expressions are crude approximations and the error therein would be considerable. A much better way to make the control is by sensing the output voltage, comparing it against a reference voltage and using the error to set the duty-cyle.

Control of voltage regulator |
PWM control of switch-mode regulators |

The left diagram represents any type of voltage regulator. The *control block* pushes the output voltage to a value that minimizes the error between the sensed and reference voltages. In the limit, $V_{s} = V_{ref}$:
$$\frac{R_2}{R_1+R_2}V_{out} = V_{ref}$$
$$V_{out} = \left(\frac{R_1}{R_2} + 1\right)V_{ref}$$
These resistances are inside the integrated circuit for fixed output voltage regulators. The right diagram represents the *control block* for the particular case of switched-mode regulators. A ramp signal is compared to an amplified version of the error. Every time the error is greater than the ramp, $\Phi$ is on, otherwise it is off. The ramp signal is periodic and its frequency is the switching frequency. The portion of the period the error is above the ramp is the duty-cycle. Since the output voltage is related to the duty-cycle, a feedback loop is formed that finds a balance when the sensed signal is equal to the reference voltage.

The switched-mode concept can be implemented in different topologies. They often have their own pros and cons, and their choice depends on the application. They can be separated on isolated or non-isolated, depending if the output is electrically isolated from the input or not. Further details depend on the topology used. The most well known are:

- Buck (step down) - input voltage greater than output voltage
- Boost - output voltage greater than input voltage
- Buck-boost
- Boost-buck (or Split-pi)
- Ćuk
- SEPIC
- Zeta
- Charge pump

- Flyback
- Ringing choke converter
- Half forward
- Forward
- Resonant forward
- Push-pull
- Half-bridge
- Full-bridge
- Resonant zero-voltage switched
- Isolated Ćuk