Introduction

Some power sources present power characteristics that strongly depend on the operating conditions. As such, maximizing the extracted power requires identifying - and tracking - the operating point that provides the highest power level. Maximum Power Point Tracking (MPPT) is often applied in renewable energy systems - e.g. photovoltaic plants or wind turbines - as their power delivery capability varies significantly and in an unpredictable manner.

Other points may be interesting to track, such as the maximum efficiency point tracking (MEPT), or other optimum, e.g. related to operating costs.


Software resources

  File Modified
File MPPT.slx May 14, 2020 by Nicolas Cherix
ZIP Archive PV_inverter.zip May 14, 2020 by Nicolas Cherix

Principle of operation

For practically all real power sources, the power that can be extracted varies with the operating point. While electrical sources are related to the voltage/current pair, the same principle also applies to force/speed, flux/surface, etc. In all cases, the inevitable internal resistance (or equivalent quantity) limits the maximum possible output power. Non-linear or more complex characteristics also exist, but with the same result: the maximum power point is not located at the [max. voltage · max. current] point (or equivalent quantity).

Example: photovoltaic panel

For instance, photovoltaic panels possess a well-know output characteristic, featuring an internal resistance that quickly decreases close to the open-circuit voltage (assuming a current source model).

This results in a bump-shaped power-voltage characteristic, whose top is typically located between 60-80% of the open-circuit voltage. This point is however not fixed but varies with the output current, which depends itself on the temperature and irradiance, i.e. the operating conditions of the PV cells themselves.

In some cases (such as to some extend photovoltaic systems), the output characteristics (here I-V) are relatively well-known and precise, such that they can be used to locate the maximum power point using look-up tables. This is however not the case for all systems, motivating the use of more empirical approaches.

MPPT techniques

To date, numerous MPP tracking techniques have been proposed, with various trade-offs between performance (tracking speed, accuracy) and complexity (need for sensors, mathematical modeling, computation burden, etc.). The table below summarizes some of the most well-known approaches, highlighting their key benefits and drawbacks.

Perturb and observe

Incremental conductance

Current sweep

Temperature method

t.b.c.








Academic references

[1] T. Esram and P. L. Chapman, "Comparison of Photovoltaic Array Maximum Power Point Tracking Techniques," in IEEE Transactions on Energy Conversion, June 2007.

B-Box / B-Board implementation

This note presents a possible implementation for a Perturb&Observe tracking algorithm, which perturbates the current setpoint and observes the corresponding impact on the output power. Essentially, the algorithm operates as follows:

If adding a small ΔI to the current setpoint increases the resulting output power, then the subsequent current setpoint is further increased. Reciprocally, if a positive ΔI tends to reduce the output power, then the subsequent current reference is reduced by ΔI.

This entirely empirical approach requires that:

  • The requested setpoint is correctly followed, meaning that the current control (if any) is not saturated and can reach steady-state before the result is evaluated.

  • There is only one global maximum power point.

As such, this algorithm is designed for use as part of a discretized process that is slower than the current control dynamics. This can typically be implemented using a multi-rate approach, where the current control is executed within a main control interrupt (fast control loop) and the MPPT algorithm executing within a secondary control interrupt (slow control loop).

The proposed MPPT algorithm can be implemented as shown below. It requires the introduction of a slower control rate for the MPPT itself. The management of multiple control rates within Simulink is further explained in PN145: Multi-rate control with Simulink.

The corresponding mask requires the following parameters:

  • Upper saturation threshold: Maximum output value.

  • Lower saturation threshold: Minimum output value.

  • Current reference step (delta): Current increment added (or subtracted) for the previous setpoint.

  • Initial current reference: Initial value at startup.

  • MPP Tracking rate: The control period used for the execution of the MPPT algorithm (here 10x slower than the main control interrupt rate).

PLECS

The proposed MPPT algorithm can be implemented as shown below. As in Simulink, it requires the introduction of a slower control rate for the MPPT itself. The management of multiple control rate within PLECS is further explained in PN155: Multi-rate control with PLECS.

The corresponding mask requires the following parameters:

  • Upper saturation threshold: Maximum output value.

  • Lower saturation threshold: Minimum output value.

  • Current reference step (delta): Current increment added (or subtracted) for the previous setpoint.

  • Initial current reference: Initial value at startup.

  • MPP Tracking rate: The control period used for the execution of the MPPT algorithm (here 10x slower than the main control interrupt rate).

  • Low pass filter sample time: The sample time used for the average of the PV voltage and current. It should be the interruption period.


C/C++

The imperix CPP SDK provides pre-written routines for MPP tracking. As for control-related routines, the MPP tracker is based on:

  • A pseudo-object MPPTracker, which contains pre-computed parameters as well as state variables.

  • A configuration function, meant to be called during UserInit(), named ConfigMPPTracker().

  • A run-time function, meant to be called during a slow routine, such as SlowSubTask(), named RunMPPTracker().

The necessary parameters are documented within the controller.h header file.


Implementation example

#include "user.h"
#include "../API/controllers.h"         // Discrete-time controllers

MPPTracker string1_mppt, string2_mppt;  // Maximum Point Point Trackers
PIDController Ipv_reg;                  // Controller for the PV current

tUserSafe UserBackground();
void SlowSubTask();
float SubTaskTimer = 0.0;
bool SubTaskFlag = false;

USER_SAFE UserInit(void)
{
  // Configure the main timebases on CLOCK_0:
  Clock_SetPeriod(CLOCK_0, (int)(SWITCHING_FREQUENCY));

  // Configure the interrupts:
  ConfigureMainInterrupt(UserInterrupt, CLOCK_0, 0.5);
  RegisterBackgroundCallback(UserBackground);

  // Configure the PI controllers:
  ConfigPIDController(&Ipv1_reg, 12.0, 0.3, 0.0, 60, -60, SAMPLING_PERIOD, 10);

  // Configure and initialize the MPP-trackers:
  #define increment 0.01
  ConfigMPPTracker(&mymppt, increment, 7.0, 16.0, 1.5, 0.01);

  return SAFE;
}
tUserSafeUserInterrupt(void)
{
  // Measure all the necessary quantities:
  Upv = Adc_GetValue(8); // Voltage on the PV string
  Ipv = -Adc_GetValue(0); // PV current
    
  // Execute the current controllers on the MPPT string:
  Epv = Upv - RunPIController(&Ipv_reg, Ipv_ref - Ipv);
  CbPwm_SetDutyCycle(PWM_CHANNEL_3, Epv/Udc);

  // Compute the power drawn from the PV panel:
  #define k_iir_lpf 0.05
  Ppv = k_iir_lpf* (Upv*Ipv) + (1.0-k_iir_lpf)* Ppv;

  float SubTaskTimer = 0.0;
  bool SubTaskFlag = false;
    
  SubTaskTimer += SWITCHING_PERIOD;
  if(SubTaskTimer >= MPPTPERIOD){
    SubTaskTimer = SubTaskTimer - MPPTPERIOD;
    SubTaskFlag  = true;
  }
  
  return SAFE;
}
tUserSafe UserBackground()
{
  if(SubTaskFlag)
  {
	SlowSubTask();
    SubTaskFlag = false;
  }
  return SAFE;
}
void SlowSubTask()
{
  // When appropriate, execute the MPPT algorithm:
  if (enable_MPPT==1){
    // Run the Maximum Power Point Tracking (MPPT) algorithm:
    Ipv_ref = RunMPPTracking(&string_mppt, Ipv, Ppv);
  }
  else{
    // Leave the setpoints unaltered
  }
}
  • No labels