Artificial Intelligence

Artificial intelligence in solar plants: methods and architecture

An inverter that has failed announces itself. What quietly eats production is the string or inverter that works, but less than it should. This page explains to an engineer which methods NuraNet's AI uses to find exactly that in kilowatt-hours, when it stays silent, and which part runs on the plant computer or the NuraNet Link board and which on the server.

The problem: a fault with no error code

An inverter that has stopped completely announces itself: it gives an error code, its output drops to zero and any system sees it. The real money is lost elsewhere: an inverter that works but produces 8 percent less than its usual share, a string whose fuse has blown while the inverter total still looks "acceptable", or an input disabled in the settings that carries current and is never monitored. None of them has an error code, and no fixed threshold catches them.

NuraNet's AI answers one question: what took how many kilowatt-hours from this plant, and who has to do what? Every sentence it says is either the answer to that question or a fact the device itself reported. This page is written for the engineer who wants to know which methods, with which inputs and which reference for comparison, stand behind that answer; which part runs on the plant computer or the NuraNet Link board and which on the server. The code samples are simplified versions of the very functions that run in the product (Python 3, no external dependencies).

Rule one: silence is better than a wrong statement. The goal is precision, not recall: a finding that sends the operator to the site for nothing also destroys trust in the next correct finding.

The components, by name

The core of the analysis is robust statistics and relative comparison, not a neural network; the reason is in the questions at the bottom of the page. Every decision is made on the plant computer, and the server and the screens show that same decision:

ComponentMethodWhere it runs
The plant's skyAt every moment, the median of "power ÷ kWp ÷ usual share" across the inverters — that is, what the sky gave. A cloud moves all of them; a failure moves one. The plant is its own irradiance sensorEdge
Learned shareEach inverter's usual share by hour and its own noise, learned from its own healthy days; a day with an open problem does not train itEdge
IncidentsEach problem is an object, so the data can tell how it ended: "repaired" (it stayed for days and cleared with a jump) or "faded" (it should not have been said). The strictness of each finding type in each plant tunes itself between 1 and 2Edge
DC analystA rule-based classifier over one full day of each input: current and voltage ratio to its peers, "dead" share, change-point, number of drop-outs, shade window, and conservation of current inside each MPPTEdge + board
Energy ledgerThe loss of each line in kWh per day, from the integral of power; the lines of one inverter are added togetherEdge
Configuration auditCompares the declared wiring and capacity with the measured current, only in strong lightEdge
Robust statisticsMedian, scaled MAD (×1.4826), robust z-score with absolute and relative floors, Theil–Sen estimatorEdge + server
Plane-of-array irradianceGHI from Open-Meteo, direct/diffuse split with the Erbs correlation, transposition to the tilted plane with the isotropic Liu–Jordan modelServer (hourly)
Production forecastThe kWh this same plant gave per kWh/m² of irradiance over the last two weeks, multiplied by the forecast skyEdge
Fleet comparisonPlants that stand out from the rest, monthly and yearly PR decline with the season removed using the fleet medianServer
Language model (optional)Qwen3-4B-Instruct (Q4_K_M quantization, GGUF format, Apache-2.0 licence) on llama.cpp, CPU only; Qwen3-8B on a 16 GB computer. Only to answer the operator's questions from measured factsEdge, offline

The plant's sky: why no irradiance sensor is needed

The inverters of a plant see one sky at one moment. If each inverter's power is divided by its capacity and its usual share, the median of that ratio across the inverters is what the sky gave at that moment. The expectation for each inverter is built from that number, and the loss is the integral of the gap between expectation and reality over the hours of good light:

def sky(units, t):                        # one moment, the whole plant
    return median(u.kw(t) / u.kwp / u.usual_share(t.hour)
                  for u in units if u.answering(t))

def expected_kw(u, units, t):
    return sky(units, t) * u.kwp * u.usual_share(t.hour)

def lost_kwh(u, units, day):              # energy from power, never from
    return integrate(expected_kw(u, units, t) - u.kw(t)   # the daily register
                     for t in good_light(day))

The usual share is learned from the inverter's own healthy days, so a curved roof, fixed shade or a smaller array does not need to be entered. Energy is summed from instantaneous power, because the daily counter of some inverters holds yesterday's figure until after midnight. So that one broken unit cannot shift the "normal" reference, the reference is the median everywhere and the spread is the MAD:

MAD_TO_SIGMA = 1.4826          # MAD to a normal-equivalent sigma

def mad_spread(values, center=None):
    c = median(values) if center is None else center
    return MAD_TO_SIGMA * median([abs(v - c) for v in values])

def robust_z(value, center, spread, floor=0.0, relative_floor=0.04):
    denominator = max(spread, floor, relative_floor * abs(center))
    return 0.0 if denominator <= 0 else (value - center) / denominator

The same idea is used at three levels: neighbouring string → the rest of the same inverter → the other inverters. If a string drops but its neighbour has dropped just as much, it is shade or cloud; if all strings of an inverter are low together, the problem is the whole array or that inverter's MPPT tracker; and if only one input is low, the problem is that input. Each finding states its own scope: input, inverter or plant.

The DC analyst: one full day of each input, read like a chart

Every wired input gets a verdict built from three merged measurements: the string current (where the inverter reports it), the MPPT current divided by the number of strings, and the MPPT voltage relative to its peers. Only "good light" samples are used:

def classify(day):                     # one input, one day
    cr, vr = day.current_ratio, day.voltage_ratio   # vs sibling median
    if vr is not None and vr <= 0.10 and cr >= 0.5:  return "dc.input_short"
    if day.dead_share >= 0.80:                       return "dc.input_dead"
    if day.step_at is not None:                      return "dc.input_dropped"
    if day.dropouts >= 3:                            return "dc.input_intermittent"
    if parallel_strings(day) and abs(cr - (n - 1) / n) <= 0.08:
        return "dc.string_missing"     # one of n parallel strings is open
    if day.shade_hours:                              return "dc.shading"
    v_low, i_low = vr is not None and vr <= 0.955, cr <= 0.90
    if v_low and i_low:  return "dc.mismatch"        # damaged / heavily shaded
    if v_low:            return "dc.modules_low"     # bypass diode, missing panel
    if i_low:            return "dc.current_low"     # soiling, degradation
    return ""                                        # healthy

What is said, and when

Everything the AI says is in one of these channels, and each channel has its own colour rule. The device's own report always ranks above any diagnosis:

ChannelWhatColour and notification
Device reportThe inverter's own error code and alarm, the power analyzerNever judged or held back; an explanation comes beside it, not instead of it
NowA plant at zero with the sun high, a unit standing still while the others produce, a dead/cut/shorted input, low insulation during working hours and at most half the other invertersAs long as it is true today; insulation from the day after the judgement
Energy ledgerA unit below its own share, a unit below its same-model neighbours, a weak input — in kWh per dayWhen the lines of one inverter together exceed max(30 kWh, 1% of the plant's day), capped at 60 kWh
ConfigurationWhat the measurements contradict: a disabled input carrying current, the number of strings, capacityIts own "Configuration" filter
KnownA problem that has stayed open for two weeksStays on the list, no longer colours anything
def is_said(line, plant_day_kwh):         # nothing is said under its cost
    if line.level == "input":
        floor = 2 if line.dead else max(5, 0.0015 * plant_day_kwh)
    else:
        floor = max(8, 0.0025 * plant_day_kwh)
    return line.kwh_day >= floor

def colours(unit_lines, plant_day_kwh):   # an inverter's lines count together
    return sum(l.kwh_day for l in unit_lines) >= min(max(30, 0.01 * plant_day_kwh), 60)

Configuration audit: a separate "Configuration" category

Each brand's Modbus map holds every MPPT and every string input of the model, whatever the operator has ticked. So the data shows what is really wired. A configuration mistake is not a failure — it is fixed from a desk, not by sending a technician — which is why these findings appear on every screen (desktop, company site, app and web app) in a separate "Configuration" category, and no level filter mixes them with errors.

The strong-light condition: in the morning, at dusk and in cloudy weather currents are small, and inputs facing different directions drift apart. A sample counts only when the sun is at least 25 degrees high and the median current of the strings of that inverter is at least 3 A:

STRONG_A, MIN_SUN_DEG, MIN_MINUTES, AGREE = 3.0, 25.0, 60, 0.80

for r in readings:                         # yesterday + today, archive
    if r.sun_deg is not None and r.sun_deg < MIN_SUN_DEG:
        continue
    per_string = [i / u.strings for i, u in zip(currents(r), inputs) if i > 0.5]
    ref = median(per_string)               # the plant is its own sensor
    if len(per_string) < 2 or ref < STRONG_A:
        continue                           # dawn, dusk, cloud: decide nothing
    strong.append((r, ref))

# an input set inactive that carries current on 80 % of the strong readings
held = mean(i >= max(1.0, 0.25 * ref) for i, ref in samples(unticked_input))
if strong_minutes >= MIN_MINUTES and held >= AGREE:
    report("cfg.input_unconfigured", inverter, mppt, string, mean_a, ref)
CodeMeaningWhy it is not mistaken for a failure
cfg.input_unconfiguredInput (or MPPT) disabled but carrying currentA broken input has no current; current without a tick only means the tick is wrong
cfg.input_silentInput ticked "connected" but never carried current in strong lightOnly if that input's memory has never seen it produce; if it produced and then stopped, it is a failure and the DC analyst says so
cfg.string_countAn MPPT carrying the current of more strings than are tickedA tracker does not deliver more than its strings; "more" is never a failure

The finding's text says exactly which input and what difference, for example: "Inverter 7 · MPPT 2 · String 2: you have disabled string 2 of MPPT 2 of inverter 7 in the settings, but it is active: over 119 minutes of strong light it carried 8.0 A on average (every active string of this inverter: 8.0 A)."

One subject, one finding; and the full address

Every finding, error and alarm — on the desktop, the server, the company site, the app, the web app and phone notifications — is stated with its full address: "Inverter 2 · MPPT 3 · String 1", with the measured difference and the specific action for that type of finding. The address appears both in the sentence and as a structured field (location: {inverter, mppt, string}), so no screen has to extract it from the text.

What it finds

FindingMethodWhy a simple threshold misses it
Plant at zero with the sun highZero output from every responding unit at an hour when the sun is highNight and a monitoring outage are zero too; these are told apart
Inverter stopped or under-producing with no errorThe plant's sky × the learned share of that inverter; and its same-model neighboursThe absolute figure stays within the allowed range
Dead string or input, sudden drop, intermittentDC analyst: share of "dead" samples, change-point, number of drops to zeroThe inverter total is still acceptable
Open parallel stringNormal voltage and input current ≈ (n−1)/n of its peersMany inverters do not report single-string current
Input short circuitOperating voltage below 10% of its peers while carrying currentThe current looks "normal"
Bypass diode, missing modulesMPPT voltage ratio to its peers during good-light hoursThe current barely changes
Fixed shadeHours that are lower every day than the same input's good hoursThe daily average is almost normal
Low insulationInsulation resistance during working hours, against the other inverters on the same dayIn humid weather the whole plant drops together
Wrong configurationThe "Configuration" category: inputs and strings, plant capacityQuietly and steadily spoils every indicator
Inverter clockA daily counter that resets to zero in the middle of the dayLooks like a production drop, but isn't
Power quality and the gridFrom the power analyzer, and only from an inverter that is really exportingSamples at the moment of wake-up are meaningless
Soiling and PR declineFull days and plane-of-array irradiance; dust days separatedThe day-to-day change is tiny

A real example: in a 35-inverter plant, two inverters produced about 360 and 286 kWh per day less than their neighbours, without any error code. The energy ledger shows exactly that, with the figure and the start date.

In a plant that has a NuraNet Link data logger instead of a computer, the same DC analyst runs in C on the board itself: power and currents are kept in 5-minute slots for a day, and each input is measured against the other inputs of the same inverter (one sky) and, after a few days, against its own usual share. The findings carry the same codes and the same format as the plant computer, so the server, the app and the site see no difference. If a power analyzer is on the line, the grid voltage is read from it too.

The language model: where it is in the chain and where it isn't

The language model chooses no figure, ranking or cause. Every sentence of a report is built from a template and measured data, because it is about a plant someone will drive out to. The language model Qwen3-4B-Instruct (or Qwen3-8B on a 16 GB computer) has only one job: answering the operator's question in "Ask the plant".

  1. Deterministic retrieval, not toolsThe program gathers the facts itself — the work list, open findings, alarms, production and forecast — in order of importance and with a size cap so they fit the context window.
  2. Generation bound to the contextThe model answers only from that text, on 127.0.0.1 and in a separate process: if memory runs short or it closes, monitoring carries on.
  3. Numeric verificationEvery figure in the answer must be among the facts and must appear beside the inverter the facts name; otherwise the facts themselves are shown.
def check(answer: str, facts: str) -> bool:
    # every number in the answer must be a number the facts contain
    if not numbers(answer) <= numbers(facts):
        return False      # "about 40" for 42 is computing; refuse
    # and stay with its inverter
    for inverter, number in pairs(answer):
        if (inverter, number) not in pairs(facts):
            return False
    return True

The weekly report is not rewritten by the model. The model is installed with the program's installation key or from a USB stick, its files are verified with SHA-256, it is not installed on a computer with less than 8 GB of memory, and the rest of the program works fully without it.

Architecture: decide on site, display everywhere

The plant computer has every register every few seconds; the server receives a summary every few minutes and in exchange has years of history and every plant. So the decision about each plant is made right there, and the server is the interface and the aggregator.

🖥️
Edge: the plant computer or NuraNet Link

Data quality, the canonical error layer, the plant's sky, learned share, DC analyst, configuration audit, energy ledger, incidents and scorecard, the optional language model. Independent of the internet.

☁️
Server

Plane-of-array irradiance, fleet comparison and monthly and yearly PR decline, message quality control, remote configuration and signed updates.

📱
Display

The app, web app, company site and admin panel. They infer nothing; colour, importance and text are decided once and are the same everywhere.

  1. Plant to serverMQTT over TLS with HMAC signatures. Each finding with its code, importance or category, address, measured loss, cause and remedy; findings are merged by subject (code + address).
  2. The program's own scorecardWith its data, each plant sends what it said and how each one ended. That, together with a replay of the full history of every plant and synthetic failures planted into real days, is the yardstick for every change to the AI: a change is released only if it improves this score.
  3. Owner feedbackWith a maintenance package, the owner marks each finding in the app and web app as "correct / nothing there / fixed", and it is recorded in the plant log; but the AI's accuracy is measured from what became of the finding itself in the data.

Data sovereignty: no plant data leaves the country, and no sanctioned or blocked service is used. The language model runs on the plant computer itself. The only thing that goes out is each plant's coordinates, only from the server, for weather data.

Limitations, frankly

Technical questions

Why not a neural network or deep learning?

Labelled failure data is very scarce for each plant, and failures differ from one plant to the next; a supervised model trained on such data overfits, and an unsupervised one says "abnormal" without a cause. Comparison with the plant's own sky and robust statistics work without labels, run on an ordinary computer and even on the NuraNet Link board, and every finding can be traced back to its measured figure.

How is the usual share learned?

From this inverter's healthy days, hour by hour: its share of the plant's sky and its usual spread. A day with an open incident is not used for training, so a failure never becomes "normal". There is nothing to enter: roof direction, fixed shade or a smaller array show up in the share by themselves.

What happens if a finding is wrong?

An incident that fades quickly without intervention is recorded in the scorecard as "should not have been said", and that type of finding becomes stricter in that plant (up to twice as strict). A problem that stayed for days and cleared with a jump is recorded as "real".

Why is energy not read from the inverter's daily counter?

The daily counter of some models holds yesterday's figure until after midnight and creates a fake "drop" of 15 to 35 percent. The integral of instantaneous power does not have this error.

Read on

More about NuraNet

Want to know what is hidden in your plant?

In the demo session we show the analysis on your own plant's real data.

The same number answers on WhatsApp, Telegram, Eitaa and Bale.