The diagram below is a buck converter with a voltage-feedback control loop. The signal Vout is connected to one of the two inputs of a network built around an op amp. This is the compensator (green box); the other input of this network is the constant value (the reference voltage, Vref), which represents the output voltage we want to get from the overall system.
The two functions performed by the op amp network (green box) are:
- Compute the difference between the signal at its inputs (this signal is the error signal)
- Implement a specific transfer function
The output of the compensator is compared to a sawtooth waveform, so that the output of the comparator will be low when the sawtooth signal is smaller than the error and vice versa. A PWM signal is thus generated. The flip-flops are needed to operate in complimentary mode using two switches in the power section.