Why not modify gain coefficients to optimize ripple? (or play with them until you see some improvements) Sometimes you may need to tune the PID controller. PID design is generally far from perfect, where cookbook design is used, and even further when you go from your analog plant of a voltage...