The output signal (blue) is compared with the limits (green). The limits (green) correspond to the reference signal (red), offset by a given value. Every time the output signal reaches one of the limits, the PWM signal changes state.