I'm creating a battery charging model with pv and a buck converter controlled via a P&O mppt algorithm. My charge controller currently disconnects the pv panel from the battery as the latter reaches a certain voltage level. As a result I get massive current oscillations on the input side of the buck and voltage oscillation on the output side. Also, when the panel is reconnected, there is a high current/voltage peak on the output side.
What the charge controller does is admittedly quite rudimentary: it just disconnects and connects the pv panel without altering the mppt algorithm. There are no dummy loads nor diodes preventing negative currents.
Now, I would like to ask what the charge controller should optimally do when the battery reaches its maximum charge. Should the mppt be switched off and the duty ratio of the buck be regulated to zero before disconnecting the panel? Should it be disconnected in the first place? Should I use a dummy load that connects to the buck when the battery is disconnected?
In order to mitigate the oscillations, I set the buck duty ratio D to zero when I disconnect the panel but the oscillations remain.
Clearly I'm just missing some basic knowledge on how a charge controller operates. I tried searching the forum and elsewhere on-line but didn't find what I was looking for. I'd greatly appreciate any insights.