Hey PWM,
The book "The Art of Electronics" covers operational amplifiers in GREAT detail WITHOUT going into absurdly complex math to do so. It expects you to be thoroughly familiar with their operation BEFORE you go on to PWM's.
Anyway, now that I think about it, I want to ask you to energize your brain cells again. What have you stated? You said you have a 180 degree phase shift, right? Well this is equivalent to a complete inversion of the signal. What you really want to do is to have the circuit respond to load changes quickly enough to not affect the powered circuit while preventing it from responfing TOO fast to instantaneous occurrences to prevent overshoot. At the same time, you do not want it to respond too slowly to changes to keep the voltage output within the range required by the powered circuit. In other words, you want an amplifier that "rolls off" to the -3dB point (.707 x Vpeak) at the frequency above which you want to reject. So you want a low-pass filter (integrator).
So at that point, you can use a program you can get from the TI website called "Filter Pro" (for free). All you do is input the circuit parameters you want for the amplifier and you can tell it whether you want Butterworth, Bessel, Chebyshev or whatever transfer function you want it to respond to, select the type of circuit you want (in this case a low-pass filter, the best and simplest being the Sallen-Key configuration), tell it how much gain you want, and it will give you a schematic and a circuit simulation that will work perfectly, complete with plots to show the response. And you can even tell it how many poles you want!
Essentially, there is a response dependence of a PWM circuit on the frequency of the pulse rate. In the standard PWM you want to vary the pulse rate such that the DC output of the entire circuit remains constant throughout the load range, and the pulse start and stop trigger points are on the rising and falling of the ramp. As the voltage would drop, the pulse width would get wider and turn on the MOSFET longer. When you are defining poles and zeroes, poles are easy, but because it is an asymptotic function, zero might not really be zero.
At a company I used to work for, we had a real simple circuit that does exactly what you are looking for. All you need to do is to determine the maximum rate of change you want from the circuit output, change the rate to the frequency domain (1/rate in sec), quadruple it (4 x Nyquist), and this is your PWM frequency. The next step is to make an amplifier for feedback that REJECTS the actual PWM frequency COMPLETELY. That is the point at which you set your zero point. THEN you use the Filter Pro program and it will determine the exact circuit values you need to make an amplifier that will give you the response you want. THEN you do a temperature characterization that will give you the component tolerance and thermal coefficient for those components you must have in order to keep the ouput within the limits required by the powered circuit across the operating temperature range.
All this goes back to my last response where I mentioned the K.I.S.S. principle. Why reinvent the wheel? Basically you pick the response type you want from the amp based on the characteristics of that response type (Butterworth=constant amplitude but varying phase across the domain, etc.) You want to see a LEVEL change at the input of the PWM that is INVERSELY proportional to the change in voltage. In other words, you want it to turn on LONGER as the voltage goes DOWN, and the polarity of that signal is determined by the type of power device you wish to use (N-channel, P-channel, Enhancement, Depletion mode, all dependent on your output polarity with respect to ground.
And at this point I would incorporate the comments by lcsjk (above). Experiment with both modes, current mode AND voltage mode.
What I would do is to get the parts and build ONLY the PWM portion. Then I would place a DC voltage on the input to the PWM while watching a 2-channel scope connected to the ramp and to the pulse output. As the voltage goes down, the width of the pulse should INCREASE and vice-versa. THEN I would build the amplifier using the component values determined by Filter Pro. Make a divider that scales the voltage (or current) down to the level the amp needs and connect the amp to the input of the PWM. Vary the voltage throughout the range you expect to see, and the ramps and pulse widths should change accordingly. NOW attach the rest of the output circuit with a variable load and vary the load. You should see no change at the the output. If you do see a change, then your gain is not correct on the amplifier. You can simulate all this beforehand with Filter-Pro.
I THINK I got all this right. I did it on the fly, so check out the details. I DO know that I have the general process right, though.
I hope this helps in some way. Just remember, in any engineering design, it is just a matter of knowing the parameters within which you need to operate. Think through the process, then plug in the values and then EXPERIMENT. And I cannot repeat myself enough times, K. I. S. S.
Bill