I'm looking for advice or references on how to implement a "type I" compensation network of digitally. An analog example is shown in the following diagram:
I am familiar with the basics of digital signal processing, and have read about digital integrators. Would it be possible to use something like a first order IIR digital integrator, and just flip the sign of the output depending upon whether the input is above or below VREF? The goal is to drive a PWM output of a microprocessor, so there may be a better way to do this in the digital domain than attempting to copy the analog implementation. Any advice would be appreciated.