Level 7 Expert workshop: qualify, audit, secure

Level 6 teaches how to describe and simulate the functions of a smart grid. This level puts the learner in the position of the expert or consultant asked for a reasoned opinion: does the microgrid controller comply?, where do the unbilled kilowatt-hours go?, does the virtual power plant deliver its demand response commitment?, is the control system protected well enough? Each section links the standard, a hand calculation, an NRJXpert calculation and a report.
Tutorial Version 2.0.0 November 2026 EN / FR Click for the French version
Level 7 — Expert workshop: qualify, audit, secure
NRJXpert 2.0.0 · November 2026

📘Introduction

Objectives

  • Define an IEEE 2030.8 test campaign (transition and dispatch), set acceptance criteria and write the test report.
  • Draw up the energy balance of a distribution network, separate technical and non-technical losses, assess a detection method (precision, recall) and size a DLMS/COSEM data collection system.
  • Specify an OpenADR 2.0b event, compute a baseline and the settlement of a demand response.
  • Carry out an IEC 62443-3-2 risk assessment (zones, conduits, SL-T) and propose an IEC 62443-3-3 / IEC 62351 action plan.

Prerequisites: level 5 (dynamics, economic dispatch) and level 6 (SGAM, VPP, microgrids, protocols). Duration: 24 to 30 h. The software interface is available in English (Options › Language); the example results below were obtained with the server.

↑ Back to top

🔋7.1 Microgrid controller tests (IEEE 2030.7 / IEEE 2030.8)

IEEE 2030.7-2017 reduces the microgrid controller to two core functions: transition (from grid-connected to islanded mode, planned or unplanned, and back through resynchronisation) and dispatch (set-points of the internal resources, islanded as well as connected). IEEE 2030.8-2018 describes how to test them — in simulation, in real time with hardware in the loop (HIL), then on site — and which indicators to record. Voltage and frequency ranges come from the interconnection rules (IEEE 1547-2018, EN 50549-1/-2) and IEC 62898.

NRJXpert testIEEE 2030.7 functionSimulated scenarioWhat is judged
T1 unplanned islandingunplanned transitionopening of the point of common coupling (PCC) at 1 s, without preparationnadir, RoCoF, island voltage, settling
T2 planned islandingplanned transitionthe controller cancels the PCC exchange (set-point ramp from 0.2 to 1.8 s), then opens at 2 sbumpless islanding
T3 resynchronisationreconnectionunplanned islanding, reconnection request at 5 s: synchroniser + synchro-checkduration, Δf / ΔV / Δφ at closing, return to nominal
T4 load stepisland dispatch (primary control)+20 % of the island load at the most loaded bus at 5 snadir, steady-state frequency (droop)
T5 loss of generationisland dispatch (reserve)loss of the largest grid-following generation (PV, wind) at 5 snadir, RoCoF, island survival
T6 dispatch functioneconomic dispatch24 h economic dispatch, connected then islanded (MILP)energy not supplied, SOC, cost
Initial RoCoF ≈ ΔP·f₀ / (2·H·ΣSn); steady-state droop deviation Δf ≈ R·ΔP/ΣSn·f₀; synchro-check (IEEE 1547 table 39): 0.3 Hz / 10 % / 20° up to 500 kVA, 0.2 Hz / 5 % / 15° up to 1.5 MVA, 0.1 Hz / 3 % / 10° above.

Default acceptance criteria (Simulation › DER study settings › Microgrid tests): frequency within 47.5–51.5 Hz (EN 50549 withstand range at 50 Hz), RoCoF ≤ 2 Hz/s over 500 ms, final frequency within ± 0.5 Hz, settling (± 0.1 Hz) in less than 5 s, island voltage between 0.88 and 1.10 pu after 200 ms, resynchronisation in less than 10 s, energy not supplied in island mode ≤ 0.1 %. In a real specification these values are negotiated: they depend on the loads (process sensitivity), the interface protection and the operator.

Example 7.1 — 0.9 MW site: 1 MVA battery (VSM), 0.8 MVA genset, 0.6 MVA PV (exemples/banc_essai_microreseau.xml)

Test bench results

Exchange at the PCC before islanding: 0.10 MW. T1: nadir 49.93 Hz, steady-state frequency 49.94 Hz (droop). T2: as the exchange is taken over before opening, the nadir is only 49.99 Hz (RoCoF ÷ 9). T3: reconnection at 6.36 s, i.e. 1.36 s after the request (Δf = 0.10 Hz, ΔV = 0.08 %, Δφ = 6.4°; 2.4 MVA island, hence limits 0.1 Hz / 3 % / 10°, met — just — in frequency), back to 50 Hz. T4: nadir 49.83 Hz. T5 (loss of the PV, 0.5 MW): nadir 49.58 Hz, RoCoF 0.71 Hz/s. T6: 79 F/kWh connected, 235 F/kWh islanded (3 917 L of diesel per day), 4.5 kWh not supplied (0.03 %). Compliance: 6 / 6.

Without damping of the genset (tag <D> removed), the frequency still oscillates by ± 0.2 Hz 3.5 s after reconnection: T3 fails on the settling time. This is exactly the kind of defect a 2030.8 campaign must reveal before commissioning.

Lab 7.1 — Test campaign and test report

  1. Open the example (Help › Open a tutorial example › banc_essai_microreseau.xml) and run it. Open the Report…: it is the test report (summary, criteria, sequence of events, measured values).
  2. Check by hand the RoCoF and steady-state frequency of T5 with the calculator above (ΔP = 0.5 MW). Explain the difference with the value measured over 500 ms.
  3. Replace the VSM battery (gfmMode vsm) by pure droop, then reduce H to 0.5 s: which tests fail? Why does planned islanding (T2) remain compliant?
  4. On your own diagram (« Smart grid » palette): place a breaker between the substation and the site, choose Microgrid controller test bench in Calculation, select the PCC in the Microgrid tests tab, and write acceptance criteria suited to the client (hospital, factory, campus).
↑ Back to top

📟7.2 Smart metering (AMI): balance, technical and non-technical losses

Smart metering gives the utility the data it was missing: the consumption of every customer, every 15 or 30 min. Together with the supervision meter of each MV/LV substation and the load flow, it allows a balance per substation:

Einjected = Emetered + technical losses + non-technical losses; substation gap = (Esubstation − Σ Emeters) / Esubstation.

Technical losses (Joule effect, iron losses) are calculated; non-technical losses (theft, faulty meters, unregistered customers, billing errors) are deduced. In many West African networks they weigh as much as or more than technical losses: this is often the first business argument of an AMI project.

The NRJXpert Smart metering (AMI) calculation rebuilds, for every load bus (a substation) and each of its « customers », one week of real and recorded load profiles; some customers steal (some since always, others from a given day), others honestly reduce their consumption (absence, efficient appliance). Three detection methods are compared with the simulated truth:

MethodPrincipleStrengths / weaknesses
Consumption droprecent / historical consumption, relative to the trend of the neighbours on the same substationblind to old frauds; false alarms (holidays)
Drop + substation balanceonly the drops in substations in alarm are keptfar fewer false alarms, low recall
Substation balance + targeted inspectionon-site check of the customers of substations in alarmalso finds old frauds; cost of the field visits
Precision = TP / (TP + FP) (share of correct alarms); recall = TP / (TP + FN) (share of frauds found).

Example 7.2 — IEEE 33-bus, 1 857 customers, two high-risk districts (exemples/ami_ieee33.xml)

Results (7 days, 15 min interval)

Energy supplied 402.7 MWh, technical losses 3.04 %, non-technical losses 1.81 % (7.3 MWh in one week). 5 substations in alarm (3 % threshold), including B18 (13.5 %) and B19 (15.9 %), where a quarter of the customers steal. Detection by drop: precision 50 %, recall 55 %; balance + targeted inspection: precision 77 %, recall 27 %. The substation balance says where to look, the load-profile analytics whom to check: in practice both are combined and iterated.

↑ Back to top

📗7.3 Data collection: DLMS/COSEM (IEC 62056) over G3-PLC or cellular

COSEM is the object model of the meter, each data item being identified by an OBIS code (A-B:C.D.E*F); DLMS provides the services (GET, SET, ACTION, notifications) and the security (suites 0 to 2: AES-GCM-128, ECDSA, ECDH). The load profile (class 7, OBIS 1.0.99.1.0.255) records at each period: clock (0.0.1.0.0.255), status (0.0.96.10.1.255), A+ register (1.0.1.8.0.255) and A− register (1.0.2.8.0.255), voltage (1.0.32.7.0.255).

G3-PLC (ITU-T G.9903, CENELEC A band 35–91 kHz, OFDM) carries IPv6 (6LoWPAN) in a mesh: a meter far from the concentrator relays through its neighbours. Each hop may fail (noise, LV network impedance); retries compensate. Cellular (NB-IoT, LTE-M) suits sparse areas and large customers.

Frame success: 1 − (1 − pⁿ)^(r+1) (p: one hop, n: hops, r: retries); daily completeness = (frame success)^(frames per day).

In example 7.2: 1.56 hops on average, daily completeness 99.88 %, 3.24 kB per meter and per day, 20.7 min to collect the largest substation (210 meters).

Lab 7.2 — Loss audit of a feeder

  1. Run ami_ieee33.xml, open the report: energy balance, substations in alarm, largest drops (with the simulated truth).
  2. Vary the balance alarm threshold (1, 3, 5 %) and the suspicious drop (20, 30, 50 %): plot precision and recall. Which setting would you choose if one inspection costs 15 000 F and one fraud 60 000 F per year?
  3. Switch to cellular, then to G3-PLC with p = 85 % and 5 hops (spread-out district): completeness? Consequence for the substation balance?
  4. With calculator 7.2, estimate the payback of an 8 000-meter roll-out. Write the one-page note to the management.
↑ Back to top

📶7.4 Demand response: OpenADR 2.0b

OpenADR links a VTN (Virtual Top Node: grid operator, aggregator) to VENs (Virtual End Nodes: buildings, charging hubs, virtual power plant). Profile 2.0b exchanges XML messages (EiEvent, EiReport, EiOpt…) over HTTPS or XMPP; an event (oadrDistributeEvent) carries an active period, a notification delay and signals per interval:

SignalValueExpected response
SIMPLElevel 0 to 3reduce according to an agreed plan (NRJXpert: 10 / 20 / 40 % of the baseline import)
LOAD_DISPATCH (x-loadControlCapacity)reduction in MWreduce by the requested value with respect to the baseline
ELECTRICITY_PRICEprice (F/kWh)react to the price (no volume commitment)

The difficult point is the baseline: what the site would have consumed without the event. It is estimated with an « X of Y » rule (mean of the X highest of the last Y comparable days) with a day-of adjustment. NRJXpert optimises the VPP twice, without then with the event: the baseline is therefore the best possible one, and the difference with an « X of Y » rule is discussed in the lab.

Example 7.3 — 0.4 MW reduction from 18:00 to 21:00 (exemples/openadr_effacement.xml)

Response of the virtual power plant (PV, battery, 30 EVs in V2G, 10 % curtailable load)

Requested: 1 200 kWh; delivered 1 076 kWh (89.7 %): 0.4 MW held at 18:00 and 19:00, 0.28 MW at 20:00 (the battery is empty). Payment 269 kF, penalty 12 kF; net gain 203 kF compared with the day without event. The report contains the oadrDistributeEvent message (57 lines) the VTN would send; Simulation › Save the OpenADR 2.0b message exports it.

Lab 7.3 — Negotiating a demand response contract

  1. In the Virtual power plant tab, enable the event; try LOAD_DISPATCH 0.2 / 0.4 / 0.6 MW. From which value does the VPP lose money?
  2. Replace it by an ELECTRICITY_PRICE signal of +400 F/kWh: volume reduced? Which signal does the aggregator prefer, which one the grid operator?
  3. Read the OpenADR message: find eventID, dtstart, duration, x-eiNotification, signalType, the intervals.
  4. With calculator 7.3, show how a site can « inflate » its baseline if the rule is « 10 of 10 » without adjustment.
↑ Back to top

🔒7.5 Cybersecurity of the control system: IEC 62443 and IEC 62351

A smart grid opens command paths to thousands of devices: remote-controlled switches, inverters, chargers, meters able to disconnect a customer. IEC 62443 (industrial automation and control systems) provides the method, IEC 62351 the security of the energy protocols (IEC 60870-5-104, IEC 61850 MMS and GOOSE, DNP3), IEC 62056-5-3 that of DLMS/COSEM.

  1. Zones and conduits (IEC 62443-3-2): group the assets with the same requirements (control centre, substations, producers, chargers, AMI, aggregator, IT) and identify the flows between zones (conduits).
  2. Target security level SL-T of each zone, from 1 (error, casual violation) to 4 (state-level attacker, extended resources).
  3. Achieved level SL-A for each of the seven foundational requirements FR1…FR7 (IEC 62443-3-3): identification and authentication, use control, integrity, confidentiality, restricted data flow, response to events, availability.
  4. Risk = consequence × likelihood; action plan to close SL-T − SL-A, starting with the exposed conduits.

In NRJXpert: Tools › Cybersecurity risk assessment (IEC 62443)…. The assets come from the diagram; set the SL-T, tick the measures in place per zone, qualify the conduits (protection, exposure to the Internet). The Results tab and the HTML report give the risk matrix and the ordered list of missing measures. The settings are saved with the project.

Lab 7.4 — Risk assessment of the synthesis project

  1. Open smartgrid_deux_departs.nxp, run the assessment: how many assets, which zones? What is the risk of the control centre with the initial settings? Why?
  2. Set the « Data collection » conduit to « encryption and authentication » and tick FR4 SL2 for the AMI zone: effect on the matrix?
  3. Draw up a three-batch plan (6, 18, 36 months) that brings all zones to their SL-T; justify the order.
  4. For the VPP of example 7.3, which new risks does the OpenADR conduit introduce (forged price, injected event)? Which measures?
↑ Back to top

🎯7.6 Expert assignment (synthesis)

Subject — Microgrid of a university campus

A campus with a 2 MW peak, supplied by a 30 kV feeder, wants a microgrid (1.5 MWp PV, 1 MW / 2 MWh battery, existing 1 MVA genset), smart metering of its 40 buildings, and to take part in the national aggregator's demand response programme. You are the owner's engineer (AMOA).

  1. Draw the network and write the IEC 62559 use case « planned islanding » (level 6).
  2. Define the IEEE 2030.8 test campaign and its criteria; simulate it; attach the test report.
  3. Draw up the loss balance from the AMI calculation and estimate the value of metering.
  4. Propose the demand response contract (signal, power, window, payment) with the profitability calculation.
  5. Hand over the IEC 62443 assessment and the action plan.

Indicative marking: model and use case 20 %, tests 25 %, AMI 15 %, demand response 15 %, cybersecurity 15 %, report quality 10 %.

↑ Back to top

📋Level 7 quiz

1. According to IEEE 2030.7, the two core functions of a microgrid controller are:

  1. protection and metering
  2. forecasting and billing
  3. transition and dispatch
  4. SCADA and DMS
Transition (islanding, reconnection) and dispatch (set-points of the resources); IEEE 2030.8 describes their tests.

2. Planned islanding is smoother than unplanned islanding because:

  1. the battery has more inertia
  2. the exchange at the PCC is cancelled before opening
  3. the synchro-check is disabled
  4. loads are shed
At opening, ΔP ≈ 0: no frequency jump, no RoCoF (example 7.1: nadir 49.99 Hz instead of 49.93 Hz).

3. For a 2.4 MVA island, closing the coupling breaker requires (IEEE 1547):

  1. Δf ≤ 0.3 Hz, ΔV ≤ 10 %, Δφ ≤ 20°
  2. Δf ≤ 0.2 Hz, ΔV ≤ 5 %, Δφ ≤ 15°
  3. exactly Δf = 0
  4. Δf ≤ 0.1 Hz, ΔV ≤ 3 %, Δφ ≤ 10°
Above 1.5 MVA the limits are the strictest.

4. Non-technical losses are obtained:

  1. by difference: injected energy − metered energy − technical losses
  2. by the load flow
  3. by measuring the neutral current
  4. with R·I²
Only technical losses are calculated; non-technical losses are deduced from the balance.

5. A fraud detection method has a precision of 77 % and a recall of 27 %. This means:

  1. 77 % of frauds are found
  2. 27 % of the alarms are false
  3. 77 % of the alarms are correct but 73 % of frauds are missed
  4. the method is useless
Precision = share of correct alarms, recall = share of frauds found. A precise but insensitive method is used to target field visits.

6. OBIS code 1.0.1.8.0.255 is:

  1. the voltage of phase 1
  2. the imported active energy register (A+)
  3. the meter clock
  4. the load profile
Load profile 1.0.99.1.0.255, clock 0.0.1.0.0.255, voltage L1 1.0.32.7.0.255.

7. With 3 G3-PLC hops at 90 % and 2 retries, a frame gets through with a probability of about:

  1. 73 %
  2. 90 %
  3. 95 %
  4. 98 %
pⁿ = 0.729; 1 − (1 − 0.729)³ = 0.980.

8. In OpenADR 2.0b, the grid operator or aggregator that issues the events is:

  1. the VTN
  2. the VEN
  3. the CPO
  4. the EVSE
Virtual Top Node → Virtual End Nodes (sites, VPP, charging hubs).

9. In IEC 62443, the achieved level SL-A of a zone for a foundational requirement is:

  1. the mean of the ticked measures
  2. the level of the best measure
  3. the highest level whose measures up to that level are all in place
  4. set by the vendor
An SL3 measure without the SL2 one does not raise the level.

10. The security of IEC 60870-5-104 and IEC 61850 (TLS, GOOSE authentication) is covered by:

  1. IEC 62056
  2. IEC 62351
  3. IEC 62559
  4. IEEE 2030.8
IEC 62351-3 (TLS), -5 (104/DNP3), -6 (GOOSE/SV), -9 (keys); IEC 62056-5-3 covers DLMS/COSEM.
↑ Back to top

👤Author

LT
Prof. Lamine THIAW
Department of Electrical Engineering
École Supérieure Polytechnique
Cheikh Anta Diop University, Dakar
lamine.thiaw@ucad.edu.sn
lamine.thiaw@esp.sn

November 2026