A consumer electronic system called a dc power supply produces a fairly constant dc voltage from ac supply voltage. Below figure shows a functional block diagram of the circuits within a power supply.

Block diagram of dc power supply with waveforms at each stage
The ac supply voltage is usually stepped-down by a transformer and its secondary voltage is converted to a pulsating dc by a diode rectifier. By the superposition theorem, this rectifier output can be looked upon as having two different components : a dc voltage (the average value) and an ac voltage (the fluctuating part). The filter circuit smooths out the pulsating dc. It blocks almost all of the ac component and almost all of the dc component is passed on to the load resistor. Figure shows the filtered output for a rectified full-wave dc. The only deviation from a perfect dc voltage is the small ac load voltage called ripple. A well-designed filter circuit minimizes the ripple. In this way, we get an almost perfect dc voltage, one that is almost constant, like the voltage out of a battery.
The regulation of a power supply is its ability to hold the output steady under conditions of changing input or changing load. As power supplies are loaded, the output voltage tends to drop to a lower value. Nowadays, an integrated circuit (Ic) voltage regulator is connected between a filter and the load resistor, especially in low-voltage power supplies. This device not only reduces the ripple, it also holds the output voltage constant under varying load and ac input voltage.