The main driver for the issue is because the PV models become unstable when connected in series and discretized. The problem is also apparent in the offline CodeGen simulation, which I used to analyze this.
There are a few drivers:
- The PV model is very numerically sensitive to the terminal conditions of the PV panel due to its exponential nature.
- The electrical model of the PV panel has no states (i.e. no capacitors/inductors). This means that the voltage at the PV panel terminals and diodes can “jump”.
- The series connected PV panel immediately influences the voltage of the adjacent panel.
- The PV panel filter time constant is 1e-5 which is very close to your model discretization step size, meaning the filter has a limited effect. You would want this to be larger.
A solution to the interfacing issue is include a snubber component, typically a capacitor, such that a jump current injection won’t force an instantaneous jump in the output voltage. In practice the snubber can represent the PV panel capacitance. The PV panel voltage is then well defined.
Some other suggestions would be to model the series connection of PV panels in one component (if you aren't interested in partial shading). Also your P&O algorithm runs quite fast and without any numerical filtering, so it will be quite noise sensitive.
Lastly, it might be beneficial