How would you manage that?

On a MPPT controller an oscillation happens only when a part of the panel is shaded and the other one gets full irradiance. (mainly in the morning when getting out of shade)

The solution is to set the input voltage set-point just above the collapse voltage.
How would you program that?:
a) detecting a periodic collapse
b) recording the collapse voltage
c) setting the set-point just above (that's easy)
d) returning to normal MPPT operation once the partial shading is over.
Appreciating any ideas...

you could monitor the variance of the signal over a rolling window. High variance should indicates oscillation. choosing the right length for your rolling window (30 to 45s it would seem to get 3 oscillations) will be part of the fine tuning. having the right sampling period is also important.

MPPT 'maximum power point tracking’ solar charge controller (I had to look it up)
The period appears to be 45 seconds from the graph. I don't see what is being measured, though.
Is something physically moving (panels orientations changing) or is this simply an electrical effect on the power supplied by this device.

Oh sorry:
Yellow is the inpout voltage (from the panel)
Green is the output voltage (to the battery)
Blue is the power flowing.

Nothing is moving, the radiance is not basically changing, the oscillation is only the feedback effect of the control loop.

Yes, I just wondered if there is any known library or algorithm to measure the variance, other than by managing a long backlogging buffer.

The oscillation period is variable: the closer the set point is to the stability value, the longer the period.

Additionally on casted cloudy weather, normal collapses (not feed-back artifacts) do happen as well, but they are not periodical, so one should be able to discriminate both situations.

Rob Tillaart has created this library. May be worth exploring

Thank you,
I would like to avoid using large arrays.
I don't need mathematically exact figures neither.
I might use a low-pass filter with a long time constant as a reference value and count the number of major deviations (-3V, +1V) in both directions in a minute...

I think that library is not keeping an array around

Of course it does!
stats[]
is that array.

I went back to check :slight_smile:

I don't think so. Are you confused by this examples? (Rob T. is just using 4 instances to compute stats for 4 different sets of data)

here is an example taking in 10,000 samples (and I'm not allocating an array of 10,000 samples anywhere!)

#include <Statistic.h>
Statistic stats(true); // true to use variance

const size_t sampleCount = 10000;

void setup() {
  Serial.begin(115200);
  stats.clear(); // clean slate
  // get
  for (size_t n = 0; n < sampleCount; n++) {
    stats.add(random(0, 101) / 100.0);
  }
  Serial.print(F("Count: ")); Serial.println(stats.count());
  Serial.print("Min: ");      Serial.println(stats.minimum(), 4);
  Serial.print("Max: ");      Serial.println(stats.maximum(), 4);
  Serial.print("Average: ");  Serial.println(stats.average(), 4);
  Serial.print("Variance: "); Serial.println(stats.variance(), 4);
  Serial.print("Standard Deviation: "); Serial.println(stats.unbiased_stdev(), 4);
  Serial.print("Population standard Deviation: "); Serial.println(stats.pop_stdev(), 4);
}

void loop() {}

Serial Monitor (@ 115200 bauds) will show

Count: 10000
Min: 0.0000
Max: 1.0000
Average: 0.5011
Variance: 0.0832
Standard Deviation: 0.2884
Population standard Deviation: 0.2884

It looks like the MPPT is increasing the power draw and when the panel voltage drops below the '30' line on the scope, the panel shuts down. Perhaps the MPPT should stop trying to draw more power when the panel voltage reaches the '30' line. It looks like the system behaves well when the voltage is above that level.

Hi,
If one panel is in shade, then it is acting like a series resistor, so the PV characteristic is not as it would when both fully illuminated.

The MPPT assumes a fully radiated set of PV.

You could , if possible, re orient the PVs so that the shadow covers half of each PV panel instead of one complete panel.
Not sure if this would be of benefit as each panel is a series array of PV cells.

I hope your PV have the full compliment of diodes on their respective terminals.
articles-solar3

Tom... :grinning: :+1: :coffee: :australia:

If one panel is in shade, then it is acting like a series resistor, so the PV characteristic is not as it would when both fully illuminated.

The shade is what it is, the software must deal better with it.

The problem occurs when some cells of one half of the panel are hard shaded, typically with bright sun, when the panel gets partly illuminated for half an hour.

Of course if you elevate the set-point you get it fixed, but less power also. But that is exactly the opposite of what a MPPT is supposed to do.

You get less power when the blue (power) line is near its peak than when the blue line is near zero? Could you explain your reasoning in more detail?

Hi,
If the shade is from a neighbour's tree next door.
Get a chainsaw out when they go shopping. :grinning_face_with_smiling_eyes:

Tom... :smiley: :+1: :coffee: :australia:

You get the most power when the yellow line is close to the collapse voltage.
If I set the input voltage set-point well above that value, I get immediately stability, but far less power.
There isn't a fixed relation between input voltage and power, it is like a Carnot-cycle, once collapsed you need to reduce dramatically the drawn current and progressively ramp up to get to the MPP again.

The shade is from neighbor's building, do you suggest to use a Caterpillar or TNT?
:crazy_face:

Can you pick a point in-between? Stable with pretty good power.

Don't make "better" the enemy of "good enough".

That is the point: find the algorithm to detect the instability and set the point just above, then get out of that safe zone as soon as possible to tease the MPPT again when the partial shade is gone.
Letting things oscillate might be good enough, but I am a German engineer.
We wouldn't build such good cars with an American "don't fix what is not broken" mentality.