Switched-mode power supplies may be designed to convert from alternating current or direct current, or both. They generally output direct current, although an inverter is technically a switched-mode power supply.
Switched-mode power supplies operate by using an inverter to convert the input direct current supply to alternating current, usually at around 20 kHz. If the input is alternating current but at a lower frequency (such as 50 Hz or 60 Hz line power) then an inverter is still used to bump the frequency up.
This high frequency means that the output transformer of the inverter will operate more efficiently than if it were run at 50 Hz or 60 Hz, due to hysteresis in the transformer core, and the transformer will not need to be as large or heavy. This high-frequency output is then fed through a rectifier to produce the output direct current.
Regulation is achieved through feedback. The output voltage is compared to a reference voltage and the result used to alter the switching frequency or duty cycle of the inverter oscillator, which affects its output voltage.
Switched-mode PSUs in domestic products such as personal computers often have universal inputs, meaning that they can accept power from most mains supplies throughout the world, with frequencies from 50 Hz to 60 Hz and voltages from 100 V to 240 V.
Unlike most other appliances, switched mode power supplies tend to be constant power devices, drawing more current as the line voltage reduces. Also, in common with many static rectifiers, maximum energy draw occurs at the peaks of the waveform cycle. This means that switched mode power supplies tend to produce more harmonics and have a worse power factor than other types of appliances. This may cause stability problems in some situations such as emergency generator systems.
A less efficient but simpler and more compact way to get a regulated output voltage is to use a linear regulator.