TExcelTAD
Home › Power Electronics & Motor Drives › PV Interfaces and Maximum Power Point Tracking

PV Interfaces and Maximum Power Point Tracking

A 315 W315\ \text{W} solar module wired straight to a 24 V24\ \text{V} battery gives about 250 W250\ \text{W} in full sun; the same module through a small converter gives 305 W305\ \text{W}. The module is not a voltage source or a current source but something in between, and it delivers its rated power at one point of its curve only, a point that moves with every cloud and every degree of cell temperature. A maximum power point tracker (MPPT) is a converter whose control loop regulates its input voltage and keeps searching for that point. This lesson uses the module model of Solar PV: Cells, Arrays and Inverters, puts a buck converter between it and a battery, and compares the two standard search algorithms, perturb-and-observe and incremental conductance, in Python.

Safety: a single module's open-circuit voltage is 4040 to 50 V50\ \text{V} DC and a string's is hundreds of volts, present whenever light falls on it; DC arcs do not self-extinguish. Rooftop strings and grid inverters are calculation and simulation only. The bench part uses a small panel with an open-circuit voltage below 24 V24\ \text{V}.

The curve and its maximum

010203040module voltage V (V) 5 A10 A 100 W200 W300 W MPP 33.3 V, 314 W400 W/m2: 33.0 V, 125 Wbattery direct: 25 V, 250 W I at 1000 W/m2P at 1000 W/m2P at 400 W/m2

The single-diode model gives the module current I(V)I(V); power is P=VIP = VI. At the maximum power point (MPP)

dPdV=I+VdIdV=0⟺dIdV=−IV\frac{dP}{dV} = I + V \frac{dI}{dV} = 0 \quad \Longleftrightarrow \quad \frac{dI}{dV} = -\frac{I}{V}

so the module's incremental conductance equals minus its static conductance, and the load the module wants to see is Rmpp=Vmpp/ImppR_\text{mpp} = V_\text{mpp}/I_\text{mpp}. Left of the MPP the module behaves almost like a current source (dP/dV>0dP/dV > 0), right of it almost like a voltage source (dP/dV<0dP/dV < 0). Two facts make tracking easy and hard at once:

  • VmppV_\text{mpp} hardly moves with irradiance (32 V32\ \text{V} to 33 V33\ \text{V} from 200200 to 1000 W/m21000\ \text{W/m}^2 for this module) but falls with temperature, by about 0.30.3 to 0.4 %/K0.4\ \%/\text{K} (0.38 %/K0.38\ \%/\text{K} in this model, from 33.333.3 to 28.9 V28.9\ \text{V} between 2525 and 60 ∘C60\,^\circ\text{C}).
  • ImppI_\text{mpp}, and so the power, is nearly proportional to irradiance, which can change by a factor of two in a second at a cloud edge.

The converter as an adjustable load

A converter between the module and a fixed-voltage load transforms resistance. An ideal buck with duty cycle DD feeding a load RR draws Iin=DIoutI_\text{in} = D I_\text{out} at Vin=Vout/DV_\text{in} = V_\text{out}/D, so the module sees

Rin=VinIin=RD2(buck),Rin=R (1−D)2(boost)R_\text{in} = \frac{V_\text{in}}{I_\text{in}} = \frac{R}{D^2} \quad \text{(buck)}, \qquad R_\text{in} = R\,(1 - D)^2 \quad \text{(boost)}

With a battery as the load, the output voltage is fixed by the battery and the duty cycle sets the module voltage, Vpv=Vbat/DV_\text{pv} = V_\text{bat}/D for a buck. MPPT charge controllers for 12, 24 and 48 V48\ \text{V} batteries are bucks; string inverters use a boost stage (or several, one per string) to lift the array to the DC link of the grid inverter (Grid-Tied Inverters). The MPPT loop does not choose DD directly: it chooses a reference voltage Vpv∗V_\text{pv}^*, and an inner voltage loop (often with an inner current loop) moves DD to hold the module there. The input capacitor across the module carries the converter's pulsed input current, so the module sees almost DC.

Worked example: direct connection against MPPT

Given: the 60-cell module of the Solar PV lesson at STC (Isc=10.0 AI_\text{sc} = 10.0\ \text{A}, Voc=41.0 VV_\text{oc} = 41.0\ \text{V}, n=1.2n = 1.2, Rs=0.25 ΩR_s = 0.25\ \Omega); a 24 V24\ \text{V} lead-acid battery between 24.524.5 and 28.5 V28.5\ \text{V}; a series diode of 0.5 V0.5\ \text{V} for direct connection, or a buck MPPT controller of 97 %97\ \% efficiency.

Find: the MPP and RmppR_\text{mpp}, the power delivered by direct connection at three battery voltages, the power with MPPT, and the buck's duty cycle at the MPP with the battery at 24 V24\ \text{V}.

Solve:

Pmpp=33.32 V⋅9.436 A=314.4 W,Rmpp=33.32 V9.436 A=3.531 Ωdirect, module at 25.0 V: 249.8 W (79.5 %),29.0 V: 288.3 W (91.7 %)MPPT: 0.97⋅314.4 W=305.0 W,D=24 V33.32 V=0.72\begin{aligned} P_\text{mpp} &= 33.32\ \text{V} \cdot 9.436\ \text{A} = 314.4\ \text{W}, \qquad R_\text{mpp} = \frac{33.32\ \text{V}}{9.436\ \text{A}} = 3.531\ \Omega \\ \text{direct, module at } 25.0\ \text{V}&: \ 249.8\ \text{W}\ (79.5\ \%), \qquad 29.0\ \text{V}: \ 288.3\ \text{W}\ (91.7\ \%) \\ \text{MPPT}&: \ 0.97 \cdot 314.4\ \text{W} = 305.0\ \text{W}, \qquad D = \frac{24\ \text{V}}{33.32\ \text{V}} = 0.72 \end{aligned}

Check: a fully charged battery at 28.5 V28.5\ \text{V} plus the diode puts the module at 29 V29\ \text{V}, close enough to the MPP to lose only 8 %; a discharged battery loses 20 %. On a hot roof (60 ∘C60\,^\circ\text{C} cells) VmppV_\text{mpp} falls to 28.9 V28.9\ \text{V}, so direct connection then does better, which is why cheap "PWM" controllers for 36-cell modules on 12 V batteries work tolerably. The MPPT controller wins by 1717 to 55 W55\ \text{W} here, and more with a 72-cell module whose MPP is far above the battery.

python · try it yourself
import numpy as np
from scipy.optimize import brentq, minimize_scalar

# the 60-cell module of the Solar PV lesson: Isc 10.0 A, Voc 41.0 V at STC, n = 1.2, Rs = 0.25 ohm
k, q = 1.380649e-23, 1.602176634e-19
Ns, n, Rs, Isc0, Voc0 = 60, 1.2, 0.25, 10.0, 41.0

def module(G, Tc=25.0):
    Vt = n * Ns * k * (Tc + 273.15) / q
    Isc = Isc0 * G / 1000 * (1 + 0.0005 * (Tc - 25))
    Voc = Voc0 * (1 - 0.0030 * (Tc - 25)) + Vt * np.log(G / 1000)
    I0 = Isc / np.expm1(Voc / Vt)
    cur = lambda V: brentq(lambda I: Isc - I0 * np.expm1((V + I * Rs) / Vt) - I, -1, Isc + 1)
    return Voc, cur

def mpp(G, Tc=25.0):
    Voc, cur = module(G, Tc)
    r = minimize_scalar(lambda V: -V * cur(V), bounds=(0.5 * Voc, Voc), method="bounded",
                        options={"xatol": 1e-4})
    return r.x, cur(r.x), Voc

Vm, Im, Voc = mpp(1000)
print(f"STC: MPP {Vm:.2f} V x {Im:.3f} A = {Vm*Im:.1f} W, R_mpp = {Vm/Im:.3f} ohm, Vmpp/Voc = {Vm/Voc:.3f}")
_, cur = module(1000)
for Vbat in (25.0, 27.6, 29.0):                    # 24 V lead-acid battery plus 0.5 V diode drop
    P = Vbat * cur(Vbat)
    print(f"direct to a battery: module at {Vbat:.1f} V -> {P:6.1f} W ({100*P/(Vm*Im):.1f} % of MPP)")
print(f"buck MPPT controller, 97 % efficient: {0.97*Vm*Im:.1f} W into the battery")
for G, Tc in ((1000, 60), (500, 25), (200, 25)):
    Vm, Im, Voc = mpp(G, Tc)
    print(f"G = {G:4d} W/m2, {Tc:2d} C: Vmpp = {Vm:5.2f} V = {Vm/Voc:.3f} Voc, Pmpp = {Vm*Im:6.1f} W")
STC: MPP 33.32 V x 9.436 A = 314.4 W, R_mpp = 3.531 ohm, Vmpp/Voc = 0.813
direct to a battery: module at 25.0 V ->  249.8 W (79.5 % of MPP)
direct to a battery: module at 27.6 V ->  275.2 W (87.5 % of MPP)
direct to a battery: module at 29.0 V ->  288.3 W (91.7 % of MPP)
buck MPPT controller, 97 % efficient: 305.0 W into the battery
G = 1000 W/m2, 60 C: Vmpp = 28.90 V = 0.788 Voc, Pmpp =  272.8 W
G =  500 W/m2, 25 C: Vmpp = 33.16 V = 0.835 Voc, Pmpp =  156.7 W
G =  200 W/m2, 25 C: Vmpp = 32.19 V = 0.847 Voc, Pmpp =   60.8 W

The ratio Vmpp/VocV_\text{mpp}/V_\text{oc} stays between 0.790.79 and 0.850.85, which is the basis of the simplest tracker, fractional open-circuit voltage: stop the converter briefly, measure VocV_\text{oc}, and regulate at about 0.8 Voc0.8\,V_\text{oc}. It is cheap and robust but never exactly at the MPP, and it loses energy during each measurement.

Perturb-and-observe and incremental conductance

Perturb-and-observe (P&O, also called hill climbing) changes the voltage reference by a step ΔV\Delta V every update and keeps the direction if the power rose, reverses it if the power fell. In steady light it ends up oscillating over three points around the MPP; a large step tracks quickly but oscillates widely. Incremental conductance (IncCond) compares dI/dVdI/dV with −I/V-I/V from two successive samples: if they are equal (within a tolerance) it stops, otherwise it steps towards the MPP. It can rest at the MPP, and it knows the direction without trial. Both must wait between updates until the converter and the module voltage have settled, typically tens of milliseconds.

The simulation runs both on the module at 25 ∘C25\,^\circ\text{C}, updated every 100 ms100\ \text{ms}: 10 s10\ \text{s} under a cloud at 400 W/m2400\ \text{W/m}^2, the cloud clearing over 5 s5\ \text{s}, then 15 s15\ \text{s} in full sun. The tracking efficiency is the energy harvested divided by the energy available at the MPP.

python · try it yourself
import numpy as np
from scipy.optimize import brentq, minimize_scalar

k, q = 1.380649e-23, 1.602176634e-19
Ns, n, Rs, Isc0, Voc0 = 60, 1.2, 0.25, 10.0, 41.0
def module(G):                                       # cell temperature held at 25 C
    Vt = n * Ns * k * 298.15 / q
    Isc, Voc = Isc0 * G / 1000, Voc0 + Vt * np.log(G / 1000)
    I0 = Isc / np.expm1(Voc / Vt)
    return lambda V: brentq(lambda I: Isc - I0 * np.expm1((V + I * Rs) / Vt) - I, -1, Isc + 1)

# irradiance: 10 s at 400 W/m2 under a cloud, the cloud clears in 5 s, then 15 s at 1000 W/m2
dt = 0.1                                             # MPPT update every 100 ms
t = np.arange(0, 30, dt)
G = np.interp(t, [0, 10, 15, 30], [400, 400, 1000, 1000])
curves = [module(g) for g in G]
P_mpp = np.array([-minimize_scalar(lambda V: -V * c(V), bounds=(20, 41), method="bounded",
                                   options={"xatol": 1e-3}).fun for c in curves])

def perturb_observe(dV):
    V, Vp, Pp, out = 30.0, 29.0, 0.0, []
    for c in curves:
        P = V * c(V)
        step = dV if (P - Pp) * (V - Vp) > 0 else -dV   # same direction if power rose
        out.append((V, P))
        Vp, Pp, V = V, P, V + step
    return np.array(out)

def inc_cond(dV, tol=0.002):
    V, Vp, Ip, out = 30.0, 29.0, curves[0](29.0), []
    for c in curves:
        I = c(V)
        dI, dv = I - Ip, V - Vp
        if dv == 0.0:                                   # parked at the MPP: watch for a current change
            step = 0.0 if abs(dI) < 0.01 else (dV if dI > 0 else -dV)
        else:
            g = dI / dv + I / V                         # (dP/dV)/V: zero at the MPP
            step = 0.0 if abs(g) < tol else (dV if g > 0 else -dV)
        out.append((V, V * I))
        Vp, Ip, V = V, I, V + step
    return np.array(out)

E_mpp = P_mpp.sum() * dt
print(f"available energy {E_mpp/3600:.3f} Wh in 30 s")
print("algorithm   dV     overall    400 W/m2    ramp up   1000 W/m2   V at 15 s")
segments = [(t < 10), (t >= 10) & (t < 15), (t >= 15)]
for name, f in (("P&O", perturb_observe), ("IncCond", inc_cond)):
    for dV in (0.2, 0.5, 1.0):
        V, P = f(dV).T
        eff = [100 * P[m].sum() / P_mpp[m].sum() for m in segments]
        print(f"{name:8s} {dV:4.1f} V  {100*P.sum()/P_mpp.sum():7.2f} %   "
              f"{eff[0]:6.2f} %   {eff[1]:6.2f} %   {eff[2]:6.2f} %   {V[150]:5.1f} V")
available energy 1.960 Wh in 30 s
algorithm   dV     overall    400 W/m2    ramp up   1000 W/m2   V at 15 s
P&O       0.2 V    95.09 %    99.69 %    86.90 %    95.77 %    23.2 V
P&O       0.5 V    98.75 %    99.76 %    92.92 %    99.83 %    31.0 V
P&O       1.0 V    99.39 %    99.49 %    98.49 %    99.57 %    32.0 V
IncCond   0.2 V    95.10 %    99.69 %    86.90 %    95.78 %    23.2 V
IncCond   0.5 V    98.87 %    99.76 %    93.66 %    99.84 %    31.5 V
IncCond   1.0 V    99.40 %    99.49 %    98.56 %    99.58 %    33.0 V

Under the steady cloud every version harvests more than 99.4 %99.4\ \%; the differences come from the ramp and the recovery after it. While the irradiance rises, every step sees the power rise because of the sun, whatever the step did, so P&O keeps walking in the direction it last moved: with 0.2 V0.2\ \text{V} steps it drifted down to 23.2 V23.2\ \text{V} by the end of the ramp, harvested 86.9 %86.9\ \% during it, and needed seconds of full sun to climb back. Incremental conductance is fooled in the same way here, because its dI/dVdI/dV compares samples taken on two different curves. Larger steps make the algorithm's own power change larger than the sun's, so it drifts less: at 1.0 V1.0\ \text{V} the ramp costs only 1.5 %1.5\ \%. Commercial trackers use variable step sizes (large far from the MPP, small near it), check the power change at a mid-step sample to separate irradiance from perturbation ("dP-P&O"), and periodically sweep the whole curve to find the global maximum when partial shading and bypass diodes give the P–V curve several peaks.

Interactive: the MPPT charge controller's power stage

The buck lab with the module at its MPP (Vin=33.3 VV_\text{in} = 33.3\ \text{V}), D=0.72D = 0.72 and the battery represented by the resistance it presents, R=1.83 ΩR = 1.83\ \Omega (24 V24\ \text{V} at 13.1 A13.1\ \text{A}): it reads Vout=23.98 VV_\text{out} = 23.98\ \text{V}, Iout=13.10 AI_\text{out} = 13.10\ \text{A} and ΔIL=671.3 mA\Delta I_L = 671.3\ \text{mA}. The input current is DIout=9.43 AD I_\text{out} = 9.43\ \text{A} and the module sees R/D2=3.53 ΩR/D^2 = 3.53\ \Omega, its RmppR_\text{mpp}. Move DD and watch the output: with a real battery the output would stay at the battery voltage and the module voltage would move instead.

gateonoff05 A10 A15 AiLIL avg 13.1 Aripple dIL = 671 mA p-p-4.2 mV04.2 mV0 s5.0 us10 us15 us20 ustoutput rippleCCM: Vout = D Vin = 24.0 V; R = 1.83 Ohm < Rcrit = 71.4 Ohminductor currentoutput ripple

Guided lab: tracking a small panel by hand

Hand calculation. For a 6 V6\ \text{V}, 2 W2\ \text{W} hobby panel with Voc=7.2 VV_\text{oc} = 7.2\ \text{V} and Isc=0.37 AI_\text{sc} = 0.37\ \text{A} in full sun, the fractional estimate is Vmpp≈0.8⋅7.2=5.8 VV_\text{mpp} \approx 0.8 \cdot 7.2 = 5.8\ \text{V}, and Rmpp≈5.8/0.33=18 ΩR_\text{mpp} \approx 5.8/0.33 = 18\ \Omega.

Simulation. Change the first cell to Ns = 12, Isc0 = 0.37, Voc0 = 7.2, Rs = 1.0 and the voltage list to values near 55 to 6 V6\ \text{V}, and compare its MPP and RmppR_\text{mpp} with your estimate.

What you would measure. In steady sun, or under a lamp, load the panel with a decade resistance box and read voltage and current with two DMMs. Be the tracker: start at 47 Ω47\ \Omega, step the resistance down in about 10 %10\ \% steps, compute PP after each step, and reverse when it falls (P&O); then repeat by comparing ΔI/ΔV\Delta I/\Delta V with −I/V-I/V (IncCond). Expect to settle within one or two steps of RmppR_\text{mpp} (within about 10 % of the simulated value), and to see the "MPP" move if a cloud passes during the search, exactly the drift of the simulation. A commercial low-voltage MPPT evaluation board feeding a resistive or LED load, never a battery, shows the same search on a scope as small steps of the panel voltage.

Hazards and safe setup. A small panel only (VocV_\text{oc} well below 24 V24\ \text{V}). Halogen lamps are hot; keep them away from plastic and hands, and never look at the Sun. Do not connect an MPPT board to a lithium battery. Rooftop strings and inverters are calculation and simulation only.

Pitfalls

  • Updating faster than the converter settles. The algorithm then reacts to its own transient, not to the panel.
  • Too small a step. It oscillates gently in steady light but is easily fooled by changing irradiance.
  • Assuming a single peak. With partial shading, the bypass diodes make several maxima; a hill-climber stops on the nearest.
  • Forgetting the input capacitor. Without it the module sees the converter's pulsed current, and its average operating point moves off the MPP.

Practice

  1. A buck MPPT controller feeds a 12.8 V12.8\ \text{V} battery from a module whose MPP is 18.0 V18.0\ \text{V}, 5.5 A5.5\ \text{A}. Find DD, RmppR_\text{mpp} and the battery current at 96 %96\ \% efficiency.
  2. A boost stage raises a 33.3 V33.3\ \text{V} module to a 48 V48\ \text{V} DC link. What duty cycle holds it at the MPP?
  3. Why does P&O drift during rising irradiance, and in which direction?
Answer
  1. D=12.8/18.0=0.711D = 12.8/18.0 = 0.711; Rmpp=3.27 ΩR_\text{mpp} = 3.27\ \Omega; Ibat=0.96⋅99.0 W/12.8 V=7.43 AI_\text{bat} = 0.96 \cdot 99.0\ \text{W}/12.8\ \text{V} = 7.43\ \text{A}.
  2. D=1−33.3/48=0.306D = 1 - 33.3/48 = 0.306.
  3. Every step sees the power rise, which P&O reads as "this direction is right", so it keeps stepping the way it last went, up or down, until the irradiance stops rising.

Test yourself

At the maximum power point of a PV module…

  1. dI/dV=0dI/dV = 0
  2. dI/dV=−I/VdI/dV = -I/V
  3. V=VocV = V_\text{oc}
  4. I=IscI = I_\text{sc}

In an MPPT buck charge controller with a battery on its output, the duty cycle sets…

  1. the battery voltage
  2. the module's operating voltage, Vpv=Vbat/DV_\text{pv} = V_\text{bat}/D
  3. the irradiance
  4. the switching frequency

Which change moves a module's MPP voltage the most?

  1. irradiance from 1000 to 500 W/m2
  2. cell temperature from 25 to 60 C
  3. the time of day at constant sun
  4. the cable colour

Why do some trackers sweep the whole P–V curve every few minutes?

  1. to measure the temperature
  2. to find the global maximum when partial shading creates several peaks
  3. to discharge the input capacitor
  4. because IEEE 1547 requires it