MPPT Algorithm Notes and Ideas

MPPT Algorithm Notes and Ideas

MPPT Algorithms

Conventional (simple, uniform irradiance strengths)

  • P&O / Hill-Climb: low compute; oscillates near MPP; can lock on a local peak under partial shading (PSC).

  • Incremental Conductance (IncCond): better steady-state accuracy; still local-peak risk in PSC.

  • Voc/Isc fraction, Ripple Correlation: useful for seeding/diagnostics; limited as a main tracker.

Intelligent / Metaheuristics (global search strengths)

  • PSO / GA / ACO / Firefly: explore multi-peak P–V to find the global MPP; higher compute/tuning; convergence depends on parameters/initialization.

  • Fuzzy Logic (FLC): model-free and robust; rule/membership design effort.

  • ANN: fast once trained; requires representative training data and upkeep.

Modern Variants / Control

  • MEPO (Modified Enhanced P&O): variable step ∝ power delta; fast far, gentle near MPP.

  • RUCA (Robust Unified Control Algorithm): sliding-mode–inspired; unified voltage/current updates; efficient at lower update rates.

  • NL-ESC (Newton-Like Extremum Seeking Control): dither + demodulation; smooth, low-ripple convergence; more complex.

Key takeaway: Conventional is best for uniform conditions; metaheuristics excel for PSC; RUCA/MEPO/NL-ESC improve convergence/smoothness.

 

Recommended Strategy (Hybrid, Condition-Aware)

  • Default (most of the time): Adaptive IncCond (or RUCA/MEPO upgrade) for fast, lightweight tracking.

  • Partial Shading Detector (PSD): cheap heuristics + optional coarse probe to decide if multi-peak search is needed.

  • Global Search (only when PSD triggers): windowed PSO (or Firefly/GA/ACO) to locate the global MPP.

  • Lock/Hold: hand back to IncCond with small step or NL-ESC for very low ripple.

  • Safety: centralized limit handling (OVP/UVP/OCP/OTP, sensor faults, saturation).

Why this mix: efficient most of the time and smart when it matters; avoids constant heavy compute; minimizes oscillation.

 

State Machine

S0 INIT

  • Sensor/PWM checks; optional 5–8 point coarse sweep to seed Vmp_guess.

S1 NORMAL (IncCond / RUCA / MEPO)

  • Variable step; micro-dither at lock; maintain Vmp_hat(T, Gbin) and P_hist.

  • Exit → S2 (PSD) on triggers; → S5 on faults.

S2 PSD_VERIFY

  • Tiny, rate-limited nudges to sanity-check PSC; optional small coarse scan.

  • Exit → S3 if ≥2 indicators positive; else back to S1 with cooldown.

S3 GLOBAL_SEARCH (PSO/Firefly/GA/ACO)

  • Windowed search around Vmp_guess ± 15–25%; early-stop on small ΔP_best.

  • Output best V*S4.

S4 LOCK_HOLD (NL-ESC or fine IncCond)

  • Hold near V* with reduced step/dither; add hysteresis; update models.

  • Exit → S1 when stable; → S3 if PSC persists.

S5 SAFETY

  • Back-off or limp mode; auto-recover to S1 when cleared.

ASCII map:

S0 INIT → S1 NORMAL → S2 PSD_VERIFY → S3 GLOBAL_SEARCH → S4 LOCK_HOLD → S1 ↘────────────── S5 SAFETY (from any state) ─────────────↗

Where Each Algo Fits

  • S1 NORMAL: IncCond / MEPO / RUCA (uniform or mildly dynamic conditions).

  • S2 PSD_VERIFY: heuristics/probes only (don’t switch controllers yet).

  • S3 GLOBAL_SEARCH: PSO / Firefly / GA / ACO (multi-peak/global MPP).

  • S4 LOCK_HOLD: NL-ESC (very low ripple) or fine-step IncCond; Fuzzy also viable.

 

Conditions / Preconditions (When to Use)

  • P&O / IncCond / MEPO / RUCA: uniform irradiance; desire fast convergence with low compute.

  • Metaheuristics (PSO/FA/GA/ACO): suspected PSC; accept higher compute for global search; use bounded voltage/duty window.

  • Fuzzy: need model-free robustness; OK with rule/membership tuning.

  • ANN: have representative training data; want fast inference.

  • NL-ESC: can inject small dither and implement demodulation; want low ripple hold.

 

RUCA, MEPO, NL-ESC — Short Explainers

  • MEPO: Vref(k) = V(k) + α·ΔP(k)·sign(ΔV(k)) → adaptive step based on power change; improves speed vs fixed-step P&O and reduces oscillation near MPP.

  • RUCA: sliding-mode–like unified control; either update via voltage branch (MEPO-like using ΔP·ΔV) or current branch (ME-IncCond-like using ΔP·ΔI), optionally alternating each loop; robust and efficient at lower update rates.

  • NL-ESC: add a small sinusoidal perturbation; demodulate power ripple to estimate gradient; integrate (Newton-like gain) toward extremum; very smooth steady-state behavior.

 

PSC Detector (PSD) — Signals & Thresholds (starter values)

  • Large power drop at ~constant V: |ΔP| > 3–5% of P_rated while |ΔV| < 1% for K=3 samples.

  • Inconsistent dP/dV sign under ±ΔV test nudges near the supposed MPP.

  • Underperformance vs expected: P_meas < P_expected(T,Gbin) by >6–8% for K samples.

  • Optional coarse probe: 5–8 equally spaced points in a window; detect multiple local maxima.

  • Debounce & cooldown: require M positive cycles to enter S3; C cycles quiet to return to S1.

Global Search Design (S3)

  • Windowing: V ∈ clamp(Vmp_guess ± 15–25%, limits) to reduce time and protect hardware.

  • PSO/Firefly config (start): 5–8 particles; 8–15 iterations; early-stop if ΔP_best < ε (0.3–0.7% P_rated) for R=3 consecutive iterations.

  • Safety: dv/dt and di/dt rate limits; abort to S5 on faults.

  • Handoff: return the best V* to S4 for fine hold.

Lock/Hold (S4)

  • NL-ESC: enable after big moves settle; small dither amplitude; adaptive/NL gain for quick, smooth convergence.

  • Fine IncCond: tiny step with micro-dither for low ripple if ESC is not used.

  • Hysteresis: require J quiet cycles (e.g., 3–5) before returning to S1 to prevent flapping.

 

Harness & Telemetry

  • Ground truth: compute ideal MPP from the I–V model each timestep; integrate energy.

  • Parity controls: identical PWM rate, filters, rate-limits across algorithms; fixed seeds for swarms.

  • Log columns: t, V, I, P, G, Tmod, state_id, Vset, dP/dV, MPP_ideal, MPP_error, settled?, mistrack_flag, cpu_us, dvdt, didt.

  • Plots: Energy vs ideal; instantaneous MPP error; state timeline; PSC hit-rate; stress (dv/dt, di/dt) time-series.

 

Starter Parameters (Tune Later)

  • IncCond: base step 0.5–1.0% duty; halve as |dP/dV|→0; micro-dither ~0.1% at lock.

  • PSD: thresholds per Section 8; debounce M=3; cooldown C=2–3 cycles.

  • PSO/Firefly: 5–8 particles; 8–15 iterations; ε=0.3–0.7% P_rated; R=3.

  • Hysteresis: J=3–5 quiet cycles before S4→S1; require PSD clear for J cycles.

  • Safety: shared dv/dt and di/dt rate limits; plausibility checks on sensors.

 

Safety & Limits

  • Hard limits: OVP/UVP, OCP, over-temp, converter saturation.

  • Rate limits: clamp dv/dt, di/dt at setpoint layer; protects hardware and reduces EMI.

  • Watchdogs: max dwell timers for S3/S4; debounce to prevent S1↔S2 flapping.

 

Implementation Plan (Minimal Viable Path)

  1. Implement S0–S5 skeleton + safety wrappers + telemetry (Section 12).

  2. Add IncCond baseline in S1; seed Vmp in S0.

  3. Implement PSD_VERIFY heuristics (Section 8).

  4. Add PSO (windowed) for S3; early-stop + best-point return.

  5. Add S4 using fine IncCond; (optionally add NL-ESC in v2).

  6. Build ScenarioRunner (uniform/dynamic/PSC) + scorecard (Section 11).

  7. Tune parameters in sim; then validate on bench with dv/dt, di/dt limits.

 

Open Questions / TODOs

  • Choose final PSD thresholds and debounce constants from sim data.

  • Decide between PSO vs Firefly for S3 (compute budget vs convergence).

  • Whether to include Fuzzy as a low-compute S3 fallback.

  • Assess viability of ANN (training data availability and maintenance).

  • Finalize NL-ESC gains and dither amplitude if we adopt it for S4.

  • Pick scoring weights/prior π from expected field profiles.

 

Glossary

  • MPP/MPPT: Maximum Power Point / Tracking.

  • PSC: Partial Shading Conditions (multi-peak P–V curve).

  • PSO: Partical Swarm Optimization

  • GA: Genetic Algorithm

  • ACO: Ant Colony Optimization

  • FA: Firefly Algorithm

  • IncCond: Incremental Conductance.

  • MEPO: Modified Enhanced Perturb & Observe.

  • RUCA: Robust Unified Control Algorithm.

  • NL-ESC: Newton-Like Extremum Seeking Control.

  • FLC: Fuzzy Logic Control.

  • ANN: Artificial Neural Network.

  • WCET: Worst-Case Execution Time.

  • P_rated: Rated power of the PV system.

 

MPPT Algos Explanations

Quick Selection (At‑a‑Glance)

Condition / Goal

Best Picks

Why

Condition / Goal

Best Picks

Why

Uniform irradiance; fast everyday tracking

MEPO, RUCA (also IncCond/P&O baseline)

Lightweight, fast convergence, low compute

Partial shading (multi‑peak P–V); need global MPP

PSO, Firefly, GA, ACO

Global optimizers handle local maxima

Ultra‑smooth hold near MPP

NL‑ESC (or fine IncCond)

Very low ripple; tracks slow drift

Model‑free robustness; imprecise inputs

Fuzzy Logic

Tolerant to nonlinearity, no PV model

Have representative historical data; want instant inference

ANN

Learns mapping to Vref/duty; fast runtime

 

PSO — Particle Swarm Optimization

What it is: Swarm search where particles explore candidate setpoints (Vref or duty) and are pulled toward personal‑best & global‑best.

Goal: Maximize measured power (P=VI) — find the global MPP on multi‑peak curves.

Best used under: Partial shading / non‑uniform irradiance; when local peaks exist.

Inputs/compute: Needs V & I; medium compute (particles × iterations). Deterministic runtime bounds with early‑stop.

Pros

  • Strong at escaping local maxima → finds global MPP

  • Model‑free; derivative‑free; noise‑tolerant

  • Simple to implement; few hyperparameters

Cons

  • Heavier than fixed‑step methods

  • Convergence depends on init & bounds; needs windowing

  • Can overshoot if step constraints are loose

Starter tips: 5–8 particles, 8–15 iterations; window = Vmp_guess ±15–25%; early‑stop when ΔP_best < ~0.5% P_rated.

 

GA — Genetic Algorithm

What it is: Evolutionary search (selection, crossover, mutation) over candidate setpoints.

Goal: Maximize P; global MPP under multi‑peak P–V.

Best used under: PSC/global search; hardware can tolerate short bursts of exploration.

Inputs/compute: V & I only; compute ~ population × generations.

Pros

  • Robust, model‑free global search

  • Handles noisy measurements

  • Flexible (elitism, re‑init) to avoid stagnation

Cons

  • More compute & time than PSO in many cases

  • Hyperparameter tuning (pop, mutation) matters

  • Non‑deterministic; needs repeat/seed control for testing

Starter tips: Pop 12–20; 8–15 gens; crossover 0.7–0.9; mutation 0.05–0.15; re‑init if no ΔP for 3 gens.

 

ACO — Ant Colony Optimization

What it is: Probabilistic search over discretized setpoints using “pheromone” reinforced by higher power.

Goal: Global MPP via exploration–exploitation balance.

Best used under: PSC; discretized windowed search.

Inputs/compute: V & I; choose bins (N), ants (M), iterations.

Pros

  • Finds global peak on multi‑peak curves

  • Naturally balances exploration vs exploitation

  • Model‑free; robust to noise

Cons

  • Many knobs (α, β, ρ, M, Q) to tune

  • Too little evaporation ⇒ premature convergence

  • Discretization resolution–time trade‑off

Starter tips: 20–40 bins; 6–12 ants; 8–15 iters; α≈1, β≈2, evaporation ρ=0.3–0.6; early‑stop if <0.5% gain.

 

Firefly Algorithm (FA)

What it is: Agents move toward “brighter” (higher‑power) candidates; attractiveness decays with distance.

Goal: Global MPP like PSO/GA, with simple movement rules.

Best used under: PSC / multi‑peak scenarios as a PSO alternative.

Inputs/compute: V & I; tune attractiveness, absorption, randomization.

Pros

  • Conceptually simple; robust to noise

  • Good global search capability

  • Few core equations; easy to code

Cons

  • Newer in PV practice; fewer tuning playbooks

  • Sensitive to parameter scaling & distance metric

Starter tips: 5–8 fireflies; 8–15 steps; shrink randomization over time; window search.

 

Fuzzy Logic (FLC)

What it is: Rule‑based controller (IF–THEN) mapping fuzzified inputs (e.g., ΔP, ΔV or env vars) to duty/Vref.

Goal: Track/hold near MPP without a PV model, handling nonlinearities and uncertainty.

Best used under: When you want robust, model‑free control; acceptable to invest time tuning rules/memberships.

Inputs/compute: V & I (optionally G,T); moderate compute; design effort in membership/rules.

Pros

  • Model‑free and robust across changing conditions

  • Tunable behavior via rules; good with noisy signals

  • Can serve as a light global/trim controller

Cons

  • Rule/membership design is trial‑and‑error

  • Performance depends on expert tuning

  • Not guaranteed to find global MPP under PSC unless augmented

Starter tips: 2 inputs (E, ΔE), 1 output (duty/Vref); Mamdani inference, centroid defuzzification; start with 3×3 or 5×5 rule base.

 

ANN — Artificial Neural Network

What it is: Trained nonlinear mapping from inputs (e.g., V,I,G,T or Voc/Isc) to optimal Vref/duty.

Goal: Fast runtime prediction of near‑MPP setpoint after offline training.

Best used under: When representative training data are available covering expected G,T, and PSC patterns (if desired).

Inputs/compute: Train offline; inference is light. Needs dataset & maintenance.

Pros

  • Very fast at runtime; good generalization if trained well

  • Can implicitly capture multi‑peak behavior

  • Model‑free with enough data

Cons

  • Data collection & labeling cost; drift retraining

  • Performance degrades outside training distribution

  • Opaque decision process (interpretability)

Starter tips: 3‑layer MLP or RBF; inputs {G,T,V,I} or {Voc,Isc}; target Vmp/ duty; add on‑line light calibration.

 

MEPO — Modified Enhanced Perturb & Observe

What it is: P&O variant with adaptive step proportional to the recent power change; often uses sign/commutation functions for robust steps.

Goal: Faster convergence when far from MPP; smaller oscillation near MPP.

Best used under: Uniform or mildly dynamic irradiance; everyday tracking (S1).

Inputs/compute: V & I; still lightweight.

Pros

  • Faster than fixed‑step P&O

  • Reduced limit‑cycle ripple near MPP

  • Simple drop‑in replacement for P&O

Cons

  • Still a local tracker; can miss global MPP under PSC

  • Needs gain tuning for stability vs speed

Starter tips: Step ∝ ΔP·sign(ΔV); clamp step; halve step as |dP/dV|→0; micro‑dither at lock.

 

RUCA — Robust Unified Control Algorithm

What it is: Sliding‑mode–inspired unified MPPT: update via voltage branch (MEPO‑like, using ΔP·ΔV sign) or current branch (IncCond‑like, using ΔP·ΔI), optionally alternating.

Goal: Fast, robust convergence at lower update frequency; unifies P&O/HC/IncCond behaviors.

Best used under: Uniform to moderately dynamic conditions; S1 everyday tracking where compute budget is tight.

Inputs/compute: V & I; lightweight; sign logic is cheap.

Pros

  • Faster and more efficient than basic P&O/IncCond

  • Works well even at lower control frequencies

  • Flexible (voltage/current modes; alternation)

Cons

  • Still a local optimizer; needs PSC guard to avoid local peaks

  • Gains/alternation cadence require tuning

Starter tips: Alternate V‑ and I‑branch updates each loop; clamp steps; add small dither at lock.

 

NL‑ESC — Newton‑Like Extremum Seeking Control

What it is: Inject a small sinusoidal dither around the setpoint, demodulate the resulting power ripple to estimate gradient, then integrate (with Newton‑like gain) toward the maximum.

Goal: Very low‑ripple convergence and smooth hold at MPP; track slow drift without re‑search.

Best used under: S4 LOCK/HOLD after you’re near MPP (e.g., post global search); calm to moderate dynamics.

Inputs/compute: V & I; needs dither + demod + LPFs; moderate complexity.

Pros

  • Minimal steady‑state oscillation → higher net energy

  • Robust, model‑free; tracks slow changes automatically

  • Strong local reconvergence (Newton‑like)

Cons

  • More complex than P&O/MEPO (dither path)

  • Dither may be undesirable in some EMI contexts

  • Not a global search by itself

Starter tips: Small dither (e.g., 0.1–0.3% Vref) at a fixed phase vs PWM; synchronous demod; adaptive gain; fallback to fine IncCond if noise spikes.

 

Practical Placement in Eclipse State Machine

  • S1 NORMAL: MEPO or RUCA (IncCond baseline) for everyday tracking.

  • S3 GLOBAL_SEARCH: PSO / Firefly / GA / ACO only when PSC is detected; windowed search; early‑stop.

  • S4 LOCK/HOLD: NL‑ESC (primary) or fine‑step IncCond; minimal ripple and good drift tracking.

  • Fallbacks: Fuzzy as a low‑compute global/trim option; ANN if trained data are available for fast inference.