An oscillator is an energy conversion device that converts direct current energy into alternating current energy with a certain frequency, and the circuit it consists of is called an oscillation circuit. There are two main types of oscillators: harmonic oscillators and relaxation oscillators.

