Hi Treez,
I am controlling the PWM with a micro controller that tracks the voltage of the battery via a voltage divider (not shown in the circuit diagram)
Also, the voltage and and current of the panel is monitored via a voltage divider and a current sensor (also not shown in the circuit diagram)
When the voltage of the battery is below 14 V, the PWM is at maximum duty cycle which charges the battery at Vmp of the panel. When the battery voltage rises upto 14 V, the duty cycle is reduced so as to keep the battery at trickle charge.
At the same time, a P&O algorithm monitors the panel power and if the panel is being loaded, it adjusts the duty cycle to keep the panel at Vmp.