The MPPT Algorithm - opensolarproject/OSPController GitHub Wiki

MPPT: Perturb and Observe

The classic method for following a panels' point of maximum power, Vmpp, is know as the perturb and observe method. It is specifically applicable to a standard MPPT system that uses a DC-DC duty cycle to adjust output power draw. A simple standard MPPT Perturb and Observe algorithm:

  1. Increases the duty cycle and watches the increasing output current

  2. The increasing current plateaus, eventually dropping with increasing duty cycle. It's found the maximum power point.

  3. The controller periodically increases and decreases the duty cycle, perturbing the system, and observes the output change.

  4. React:

    • Increased duty cycle and output power increased? Keep going until it decreases.
    • Increased duty cycle and output power decreased? back off duty cycle.
    • Decreased duty cycle and output power increased? Keep going until it decreases.
    • Decreased duty cycle and output power decreases? Start increasing.

    This is the tracking part, and it allows the duty cycle to change with changes in the incident solar available.

MPPT != CC-CV Power Supply and Cascade Collapse

A CC-CV (constant current constant voltage) adjustable power supply is not a MPPT. It adjusts the output power based on what the user requests and not, as the MPPT does, based on what the input can sustain. An MPPT acts as an input following device, a power supply is an output following device.

Crucially Step 2 in the above MPPT steps won't work. Changing the output current setpoint on a power supply does not directly change the DC-DC duty cycle. Increasing that current past the Vmpp of the panel will create a runaway/cascade situation: going past the panel's Vmpp the duty cycle increases, output power decreases, the power supply increases the duty cycle even more and the panel voltage drops to the minimum. (minimum in a buck down-converter will be roughly battery voltage) I call this a collapse, and it's central to how my solution characterizes the system.

My Solution: Feedback!

Okay now: a power supply is different than a MPPT because a power supply has a control system adjusting the DC-DC conversion duty cycle based on the output value rather than an MPPT adjusting the duty cycle based on the input value (solar panel voltage).

But. What if we add input measurement (solar voltage) and control the power supply's current setpoint? Yep! With that we can accurately hold the input voltage constant at its Vmpp! We can control the duty cycle indirectly via the current setpoint and use feedback from the input/panel voltage.

DC-DC OSP DC-DC
A DC-DC CC-CV power supply The OSPController controlling a power supply

"Characterize and Hold" algorithm

You don't have to manually enter the Vmpp of your panel either! Depending on shading that may change, plus the ESP32's ADCs aren't very accurate anyhow. Every 10 minutes, by default, the OSPController runs a sweep. That increases the power supply's current setpoint until that cascading collapse happens and the panel voltage drops to the battery voltage. This characterizes the system and now it can know a reasonable Vmpp setpoint goal! Hence my algorithm name: Characterize and Hold.