A digital PWM control loop replaces the conventional compensation and PWM modulator used in analog with an ADC and a digital PID. Since the output from this system is a digital word, the PWM must now be a digital PWM (or DPWM). The output driver to the MOSFETs are the same as any conventional switching controller. The control loop gain and phase are determined by 4 elements, where GC is the gain of the PID known as the Compensator. The gain of the power stage shown here as Gbuck is the same as an analog implementation.