Skip to content

Smart meter analytics and meter data management on your own infrastructure.

Meter reads validated every night, outages from last gasps, reliability indices, losses and transformer health. Spark jobs and SQL over tables you own, on a Kubernetes cluster you operate.

9,888 quarter-hours.
44 changed at 02:00.

silver_interval_reads of FDR-0202 for 16 Nov 2026, the 12 meters utilities-nightly-vee changed, by quarter-hour

MTR-…1103

MTR-…1104

MTR-…1105

MTR-…1106

MTR-…1062

MTR-…1066

MTR-…1081

MTR-…1116

MTR-…1122

MTR-…1125

MTR-…1128

MTR-…1133

91 more meters of FDR-0202: 96 actual reads each

One feeder’s day, after the 02:00 job

At 02:00 utilities-nightly-vee gives each of the 103 meters of FDR-0202 all 96 quarter-hours of 16 November in silver_interval_reads and adds them up into gold_feeder_load_15min. A lane is a meter whose day it changed. Pick one to see what the head-end sent against what the job wrote, or pick a quarter-hour.

FDR-0202kW

Meters

91 more meters of FDR-0202: 96 actual reads each

02:00utilities-nightly-vee

silver_outage_events OUT-20261116-0202-01 TRANSFORMER TX-0202-008, first last gasp 04:10:05, last meter back 06:11:07: 4 customers, 483.5 customer minutes. Cause EQUIPMENT_FAILURE from OMS-261116-0004, opened 14.2 minutes after the first last gasp.

gold_reliability_daily 103 customers served, 4 interrupted, 483.5 customer minutes: 4.69 minutes of SAIDI and 0.0388 of SAIFI for the feeder that day.

gold_energy_balance_daily 4,091.7 kWh into the feeder from SCADA, 3,805.5 kWh through its meters: 6.99% lost, against 6.97% of expected technical losses.

03:00 utilities-data-quality writes data_quality_report

  1. daily_count_nonzero143900PASS
  2. orphan_meter_reads0PASS
  3. reads_off_interval_grid0PASS
  4. read_completeness99.55%PASS
  5. duplicate_reads546WARN
  6. negative_reads1WARN
  7. reads_over_capacity10WARN
  8. silver_complete_grid144000 vs 144000PASS
  9. silver_null_or_negative_kwh0PASS
  10. silver_duplicate_intervals0PASS
  11. estimated_share0.44%PASS
  12. gold_matches_silver92718.8 vs 92718.8PASS
  13. feeder_loss_out_of_range0PASS
  14. outage_without_restore0PASS

Meter data validation and estimation (VEE) with Spark

A head-end delivers most of a night’s 15-minute reads and gets some wrong: gaps, the same read twice, a spike no service could carry. On Ilum a Spark job at 02:00 gives every meter all 96 quarter-hours in silver_interval_reads, each ACTUAL, ESTIMATED, EDITED or OUTAGE with the rule that set it.

  • Interpolation up to an hour

    A gap of up to four quarter-hours becomes a straight line between the nearest actual reads. A longer one takes the meter’s own average for the same quarter-hour over its previous seven days, or the average of its class on the feeder.

  • Spikes edited, the raw value kept

    A read above a quarter of the service capacity in kW cannot happen in 15 minutes. The job replaces it and keeps what the head-end sent in kwh_raw, beside the value it bills.

  • No estimate inside an outage

    A meter without power records nothing. The job writes 0 for the quarter-hours of the meter’s own interruption, so nobody is billed for energy they never received.

  • Fourteen checks at 03:00

    Checks on the bronze layer of the medallion architecture warn about what the head-end sent. Silver and gold checks are errors: every meter has 96 intervals, nothing is null, the feeder totals equal the meters. An error ends the job with exit code 1 and Ilum retries it. How a schedule fires.

silver_interval_readsMTR-000121625 November
One meter’s gap, filled from its own week

The head-end sent nothing for MTR-0001216 from 04:30 to 10:30: 24 quarter-hours in a row, too many for a straight line.

So the job reads the same quarter-hours of the meter’s seven days before, 18 November to 24 November, at least three valid reads each.

And writes their average, ESTIMATED by HISTORICAL_AVERAGE: 2.920 kWh for the 6 hours.

The code
daily_transaction_etl.py, the estimation method of a quarter-hour
in_outage = (F.col("check") == "MISSING_READ") & F.col("outage_id").isNotNull()
use_linear = (F.col("run_len") <= MAX_LINEAR_INTERVALS) & (F.col("_pi").isNotNull() | F.col("_ni").isNotNull())
use_hist = F.coalesce(F.col("hist_days"), F.lit(0)) >= MIN_HISTORY_DAYS
method = (F.when(F.col("_ok"), F.lit("NONE")).when(in_outage, F.lit("ZERO_FOR_OUTAGE"))
          .when(use_linear, F.lit("LINEAR_INTERPOLATION")).when(use_hist, F.lit("HISTORICAL_AVERAGE"))
          .when(F.col("class_kwh").isNotNull(), F.lit("CLASS_PROFILE")).otherwise(F.lit("LAST_KNOWN")))

Outage detection and restoration analytics from smart meter events

A smart meter that loses power sends a last gasp, and a power-restore message when it is back. The nightly job turns those messages into outages with each customer’s own minutes, and takes the cause from the outage ticket that opened nearest.

  • Ahead of the first call

    detection_lead_min is the time from the first last gasp to the ticket. AMI Detection Ahead of OMS reports it by scope, beside the customers each side counted.

  • Lost messages inferred

    A meter whose last gasp never arrived starts at the burst’s start, one whose restore never arrived ends at its transformer’s median restore. Both are marked INFERRED.

  • Crew times from work orders

    Crew Response Times sets each ticket against the dispatch, the arrival on site and the restoration of its emergency work order, by feeder type.

  • Alerts while it happens

    A Structured Streaming job reads the event feed and writes OUTAGE_SUSPECTED when three or more meters of one transformer send POWER_FAIL within ten seconds.

silver_outage_eventsOUT-20261116-0202-01TX-0202-008
An outage, minute by minute

04:10: the meters behind TX-0202-008 send their last gasps. 4 customers without power.

04:24: the outage management system opens OMS-261116-0004, 14.2 minutes after the first last gasp. 56.8 customer minutes so far.

04:33: a crew is sent. 4 customers still out, 94.5 customer minutes.

05:43: the crew is on site. 375.0 customer minutes.

06:11: the last meter sends its power restore. 483.5 customer minutes in all, the figure the job writes.

06:17: the crew closes the ticket, 6 minutes after the meters said power was back.

The code
daily_transaction_etl.py, a transformer is out
tx_size = m.groupBy("transformer_id").agg(F.count("*").alias("tx_meters"))
tx_hit = (fails.groupBy("feeder_id", "burst", "transformer_id")
    .agg(F.countDistinct("meter_id").alias("gasps"), F.min("fail_ts").alias("tx_start"))
    .join(tx_size, "transformer_id")
    .filter(F.col("gasps") >= F.greatest(F.lit(1), F.ceil(F.col("tx_meters") * MIN_GASP_SHARE))))

Reliability indices for regulatory reporting: SAIDI, SAIFI, CAIDI

Regulators judge a distribution utility by how long and how often its customers are without power. The nightly job keeps each feeder’s day in gold_reliability_daily, and SAIDI, SAIFI, CAIDI and MAIFI as IEEE 1366 defines them are one saved query over it, and a Monday job per region.

  • Five minutes divides them

    An interruption under five minutes is momentary. It counts in MAIFI and stays out of SAIDI and SAIFI.

  • Planned outages reported apart

    Announced maintenance carries its OMS flag into the outage, and the query reports its minutes as planned_saidi_min.

  • From the report back to the meters

    Ilum adds the OpenLineage listener to every Spark job, so the regional report shows up made from the reliability rows, the outages and the meters’ messages, each dataset with its tags. Follow one column.

  • An auditor who reads every log

    A REGULATORY_REPORTING role may run SQL and read every lineage view and the event log of all users, and can create nothing.

gold_reliability_dailyNovember, 26 nights
SAIDI and SAIFI of November, feeder by feeder

8.86 minutes of SAIDI: 912.9 customer minutes over 103 customers served. SAIFI 0.0680, CAIDI 130.4 minutes.

104.53 minutes of SAIDI: 27,072.3 customer minutes over 259 customers served. SAIFI 1.1853, CAIDI 88.2 minutes. Momentary interruptions apart: MAIFI 1.0000.

No sustained unplanned interruption on FDR-0103 in 26 nights: SAIDI and SAIFI are 0.

7.62 minutes of SAIDI: 1,973.0 customer minutes over 259 customers served. SAIFI 0.1274, CAIDI 59.8 minutes.

No sustained unplanned interruption on FDR-0201 in 26 nights: SAIDI and SAIFI are 0.

15.65 minutes of SAIDI: 1,611.8 customer minutes over 103 customers served. SAIFI 0.1359, CAIDI 115.1 minutes. Planned ones apart: 5.08 minutes.

9.91 minutes of SAIDI: 1,705.4 customer minutes over 172 customers served. SAIFI 0.1163, CAIDI 85.3 minutes.

No sustained unplanned interruption on FDR-0204 in 26 nights: SAIDI and SAIFI are 0.

22.18 minutes of SAIDI: 33,275.4 customer minutes over 1,500 customers served. SAIFI 0.2540, CAIDI 87.3 minutes. Momentary interruptions apart: MAIFI 0.1727. Planned ones apart: 0.35 minutes.

The query
Reliability Indices by Feeder (IEEE 1366)
SELECT
    feeder_id,
    region,
    customers_served,
    ROUND(customer_minutes_interrupted / customers_served, 2) AS saidi_min,
    ROUND(customers_interrupted / customers_served, 4) AS saifi,
    ROUND(customer_minutes_interrupted / NULLIF(customers_interrupted, 0), 1) AS caidi_min,
    ROUND(customers_momentary / customers_served, 4) AS maifi,
    ROUND(planned_customer_minutes / customers_served, 2) AS planned_saidi_min
FROM period
ORDER BY saidi_min DESC

Load forecasting features from smart meter and SCADA data

A load forecast needs each feeder’s demand next to what explains it. The nightly job writes it per quarter-hour into gold_load_forecast_features: the demand SCADA measured, the same quarter-hour an hour, a day and a week earlier, the seven-day mean and the weather.

  • The daily peak against the rating

    Each feeder’s highest quarter-hour of the day is marked, with its demand as a share of the feeder’s rating. Daily Peak Demand per Feeder lists them.

  • Transformers above their nameplate

    A saved query adds up the meters behind each transformer, quarter-hour by quarter-hour, into kVA and keeps those whose peak passed the rating.

  • Train in a session that stays up

    The Python session utilities-load-forecasting reads the feature table without starting Spark again for every try, and pauses when idle. MLflow installs as a module to register what you train. How a session stays warm.

  • DuckDB for the duration curve

    The load duration curve of the territory, demand from highest to lowest, runs on DuckDB over the same gold table, with no Spark session at all.

gold_load_forecast_featuresFDR-020216 November
Which feature forecasts the load

Taken as the forecast of load_kw, lag_1h_kw is off by 11.4% on average over the day (19.4 kW).

Taken as the forecast of load_kw, lag_1d_kw is off by 18.8% on average over the day (32.0 kW).

Taken as the forecast of load_kw, lag_7d_kw is off by 9.5% on average over the day (16.1 kW).

Taken as the forecast of load_kw, mean_7d_kw is off by 8.8% on average over the day (15.0 kW).

The code
daily_transaction_etl.py, the lags of a quarter-hour
wl = Window.partitionBy("feeder_id").orderBy("interval_start")
same_q = Window.partitionBy("feeder_id", "interval_index").orderBy("read_date")
feats = (hist
    .withColumn("lag_1h_kw", F.lag("load_kw", 4).over(wl))
    .withColumn("lag_1d_kw", F.lag("load_kw", 1).over(same_q))
    .withColumn("_d1", F.lag("read_date", 1).over(same_q))
    .withColumn("lag_7d_kw", F.lag("load_kw", 7).over(same_q))
    .withColumn("_d7", F.lag("read_date", 7).over(same_q))
    .withColumn("mean_7d_kw", F.avg(F.col("load_kw").cast("decimal(24,6)")).over(same_q.rowsBetween(-7, -1)).cast("double"))

Revenue protection: energy theft and non-technical loss detection

Losses show first at the feeder: gold_energy_balance_daily sets what SCADA measured going in against what the meters counted. Once a month the scoring job ranks the meters behind it by a fall their neighbours did not have, tamper events and days at zero with voltage on the line.

  • A drop against the peers

    A meter whose average day of the last two weeks fell by 30% against the two before, while its transformer’s median stayed above minus 10%, scores 0.35, and 0.15 more past minus 50%.

  • Tamper and reverse energy

    A terminal cover opened or a magnet in 30 days adds 0.20, energy flowing backwards through the meter 0.15.

  • A site visit from 0.5

    Inspection Candidates lists the meters at 0.5 or more without a confirmed tamper on record. The crew’s inspection is a work order, and its outcome is on the next month’s score.

  • Analysts who query and nothing more

    A REVENUE_PROTECTION_ANALYST may run, save and edit SQL and read lineage, without JOB_CREATE or SCHEDULE_CREATE. Row filters and column masks per role are Enterprise, with Apache Ranger.

gold_revenue_protection_scoresNovember
A meter against its neighbours

MTR-0000113: -69.1% against 5.8% for its 58 neighbours on TX-0102-001. Score 0.75. A crew went on 18 November: CONFIRMED_TAMPER.

  • +0.05 base
  • +0.35 down 30% while the neighbours are not
  • +0.15 down 50%
  • +0.20 a tamper event

MTR-0000469: 3.5% against 6.5% for its 20 neighbours on TX-0103-007. Score 0.25. Under the 0.5 that sends a crew.

  • +0.05 base
  • +0.20 a tamper event
The code
monthly_risk_scoring.py, the revenue protection score
drop = (F.col("consumption_change_pct") <= -30) & (F.coalesce("peer_change_pct", F.lit(0.0)) > -10)
.withColumn("risk_score", F.round(F.least(F.lit(1.0),
    F.lit(0.05)
    + F.when(drop, 0.35).otherwise(0.0)
    + F.when(drop & (F.col("consumption_change_pct") <= -50), 0.15).otherwise(0.0)
    + F.when(F.col("tamper_events_30d") >= 1, 0.20).otherwise(0.0)
    + F.when(F.col("reverse_energy_events_30d") >= 1, 0.15).otherwise(0.0)
    + F.when(F.col("zero_days_with_voltage") >= 3, 0.10).otherwise(0.0)
    + F.when(F.coalesce("feeder_unexplained_loss_pct", F.lit(0.0)) > 1.0, 0.05).otherwise(0.0)), 2))

Grid asset health: distribution transformer loading and risk scores

Distribution transformers fail from heat, and heat comes from load. Once a month the scoring job adds up each transformer’s meters into kVA, sets the peak against the nameplate and scores the unit from 0 to 100 with its outages, open work, age and last inspection.

  • Points off, written down

    A peak over the rating costs 25 points and over 120% 15 more, every four quarter-hours over the rating one more, up to 20. LOW risk from 80, then MEDIUM, HIGH and CRITICAL below 40.

  • Outages of the unit itself

    Only the transformer’s own outages count, and only those its ticket put down to equipment failure or overload, 10 points each over 90 days.

  • The work left open

    Every open or unfinished work order on the transformer costs 8 points, so a replacement waiting after a repair shows up in the score until it is done. Work Order Backlog lists them by type and priority.

  • One schedule a month, three retries

    The scoring runs at 06:00 on the 1st for the month before, with up to three retries, and replaces only its own month when run again.

gold_transformer_healthNovember
A transformer’s peak against its rating

TX-0104-008: peak 59.1 kVA on 20 November, 118.2% of its 50 kVA. Score 34.3, CRITICAL.

  • −25 peak over the rating
  • −15.75 quarter-hours over the rating
  • −20 age
  • −5 inspection over 3 years ago

TX-0204-004: peak 137.1 kVA on 20 November, 137.1% of its 100 kVA. Score 40.0, HIGH.

  • −25 peak over the rating
  • −15 peak over 120%
  • −20 quarter-hours over the rating

TX-0103-008: peak 209.7 kVA on 26 November, 52.4% of its 400 kVA. Score 100.0, LOW.

    The code
    monthly_risk_scoring.py, the health score
    .withColumn("health_score", F.greatest(F.lit(0.0), F.least(F.lit(100.0),
        F.lit(100.0)
        - F.when(F.col("peak_loading_pct") > 100, 25).otherwise(0)
        - F.when(F.col("peak_loading_pct") > 120, 15).otherwise(0)
        - F.least(F.lit(20.0), F.col("intervals_over_100pct") / 4.0)
        - F.col("equipment_outages_90d") * 10
        - F.col("open_work_orders") * 8
        - F.when(F.col("age_years") > 40, 20).when(F.col("age_years") > 30, 10).otherwise(0)
        - F.when(F.col("days_since_inspection") > 1095, 5).otherwise(0))))

    Questions and answers

    What is VEE in meter data management?

    Validation, estimation and editing: the checks a meter data management system applies to interval reads before they are billed or reported. Missing reads are estimated, impossible ones replaced, and every interval keeps its status and the rule that set it. Here it is one scheduled Spark job over tables in your object storage.

    How do you calculate SAIDI and SAIFI from smart meter data?

    Add up each customer’s minutes without power, from their meter’s last gasp to its restore, over sustained unplanned interruptions of five minutes or more. SAIDI divides those minutes by the customers served, SAIFI divides the customers interrupted by the same number, and CAIDI is SAIDI over SAIFI.

    Can meter data analytics run on our own infrastructure?

    Yes. Ilum installs with Helm on any CNCF-compliant Kubernetes, managed in a cloud or on bare metal, OpenShift or Rancher, and keeps the tables in your own storage: S3, GCS, Azure Blob or HDFS.

    How can smart meter data detect energy theft?

    Compare the energy that enters a feeder with what its meters record, then look for meters whose consumption fell while their neighbours’ did not, with a tamper or reverse-energy event close by. Score them every month and send a crew to the highest.

    Which engine should query 15-minute interval data?

    The nightly validation of millions of reads is a Spark job. Saved queries pick Spark SQL, Trino or DuckDB one by one over the same tables in the Hive Metastore, DuckDB for small questions over gold tables. How the three engines differ.

    Is Ilum open source?

    No. Ilum Community is free to run under a license from Ilum. It is built on open-source engines such as Apache Spark, Trino and DuckDB.

    Contact

    Tell us about your cluster.

    Name one workload you want to move.

    Tell us where it runs today.

    We answer with a plan, not a deck.

    [email protected]

    We reply within two working days.