A capacitor will generate high peak output currents in the PWM output stage which will causing heating, and is not needed. As Mr RB noted, a diode is all you need for a smooth output. At 10-25kHz, the generator field inductance will provide all the filtering you need.
Any ripple you note may very well be due to instablility in your feedback loop. What is its frequency? You may have to adjust the loop response time to eliminate this (are you using a PID loop?). Simply slowing down the loop response time may be sufficent.