If you put, lets say 16V on a capacitor that needs to be charged then it would start to charge very fast and then slow down the closer it gets to 16V (look at a capacitors charging curve).The last 2 to 3 volts can take 75% longer than the first 13 to 14 volts. To overcome this slow down effect we need a more constant current and it's done by increasing the voltage to +- 36VDC (rectified 24VAC). This DC voltage is used to charge the cap and the processor turns the charging mosfet off within 4uS when it reached it's set point (max 20V).
If the set point is lower than the capacitor volts, the processor will turns a mosfet on that connects a resistor bank to discharge the capacitor. EASY HUH?
The photos shows the LCD display with a 1 Farad Pro Ice capacitor that has been charged to 19.1VDC with a switching (processor controlled) rectified 24VAC.