Help on MPPT algorithm
The MPPT algorithm that is implemented in your flow chart is the typical known as "Hill Climbing" or P&amp;O (Perturb and Observe) .

It consists basically of the following (more or less)


Start at Duty cycle 0:


no current is being consumed, PV_V = Open circuit voltage.

increase the duty cycle which perturbs the PV current and consequently the PV voltage.
Calculate the current power PV_P(n) in your case
Compare the current power to the previously generated power PV_P(n-1) in your case


If the power is higher I am going in the right direction ---> keep increasing PWM
Goto 3.
If not, change direction --> decrease the duty cycle, Goto 5.

Calculate the current power
Compare the current power to the previously generated power 


If the power is higher I am going in the right direction ---> keep decreasing PWM
Goto 5.
If not, change direction --> increase the duty cycle, Goto 3.



Here is a small animation showing how it works:



notice how your step size and the step frequency will define the tracking precision , stability, speed,...

Cheers