Contents
Introduction
Objectives
- Calculate a radial distribution feeder by backward/forward sweep and know its limits.
- Choose an inverter control law (cos φ, Q(V), P(V)) and determine the hosting capacity of a feeder.
- Interpret a dynamic simulation: nadir, RoCoF, grid-forming and grid-following inverters.
- Explain the limited contribution of inverters to short circuits and its consequences for protection.
- Formulate and read an economic dispatch optimisation (MILP), an OPF and a hybrid sizing.
Prerequisites: levels 2 to 4; notions of linear optimisation. Calculations made by the remote server (with SciPy): Internet connection required. Duration: 20 h and a project.
5.1 Load flow of distribution networks
MV and LV feeders are radial, with high R/X, often unbalanced (single-phase loads). Fast decoupled converges poorly on them (level 2); the backward/forward sweep (Kersting) is used:
- Injections: current of each load and each DER at the current voltage (ZIP loads, inverters according to their control law).
- Backward sweep: current of each branch = sum of the downstream currents.
- Forward sweep: voltage of each node = voltage of the upstream node − Z·I of the branch.
- Repeat until the voltages no longer move (10⁻⁶ pu).
Example 5.1 — IEEE 33-bus test network (Baran and Wu)
Results (NRJXpert server, file exemples/ieee33_distribution.xml)
12.66 kV, total load 3.715 MW + 2.300 Mvar. Losses 202.68 kW (published reference: 202.67 kW); minimum voltage 0.9131 pu at node 18; the substation supplies 3.918 MW and 2.435 Mvar; 8 iterations. The server's Newton-Raphson gives the same voltages to within 10⁻⁶ pu.
5.2 Controlled inverters and hosting capacity
Generation at the end of a feeder raises the voltage (ΔU ≈ (R·P + X·Q)/U² changes sign) and may reduce then increase the losses. Inverters have standardised control laws (IEEE 1547-2018):
| Control | Principle | Effect |
|---|---|---|
| Imposed P, Q / fixed cos φ | Q = P·tan φ | simple; does not react to voltage |
| Q(V) (volt-var) | absorbs reactive power when V > 1.02 pu, supplies it when V < 0.98 pu | clips overvoltages, increases losses |
| P(V) (volt-watt) | reduces P above 1.06 pu | last resort: loss of production |
The hosting capacity of a node is the maximum power that can be connected without violating the constraints (V ≤ Vmax, current ratings), at the worst moment: high production and low load.
Example 5.2 — PV at node 18 of the IEEE 33 network
Server results
| PV at node 18 | Losses (kW) | Vmin (pu) | Vmax (pu) |
|---|---|---|---|
| none | 202.7 | 0.913 (18) | 1.000 |
| 0.5 MW, cos φ = 1 | 153.4 | 0.925 (33) | 1.000 |
| 1.0 MW, cos φ = 1 | 145.8 | 0.932 (33) | 1.000 |
| 2.0 MW, cos φ = 1 | 226.7 | 0.944 | 1.045 (18) |
| 2.0 MW, Q(V) | 249.8 | 0.941 | 1.033 (18) |
Losses go through a minimum around 1 MW then rise again: beyond that, the PV « exports » to the substation through the whole feeder. At 2 MW, Q(V) absorbs 0.21 Mvar and brings the overvoltage from 1.045 down to 1.033 pu, at the cost of 23 kW of additional losses. Hosting capacity at node 18 at 30 % load, V ≤ 1.05 pu: 1.14 MW.
Lab 10 — Hosting capacity in NRJXpert
- Draw a feeder, or open
exemples/hostingCapacity_ieee33.xml(Help › Open a tutorial example) and calculate it in the « Calculate a network file (XML) » window. - Place a photovoltaic generator (Distributed resources palette) at the end of the feeder; Q(V) control.
- Simulation › DER study settings, Hosting capacity tab: bus, Vmax = 1.05, load during the test 30 %.
- Calculation PV hosting capacity; then Distribution load flow with this power: check that Vmax = 1.05 pu.
- Repeat in the middle of the feeder: is the hosting capacity larger? Why?
5.3 Time series
A single operating point is not enough: PV production peaks at noon, consumption in the evening. The Time series calculation chains one
load flow per time step (24 h, one week…) with the load and generation profiles, and counts the hours out of range, the energy lost and the energy
curtailed. On the example exemples/timeSeries_ieee33.xml, the minimum voltage drops to 0.918 pu at 19:00 (evening peak), 8 hours are
below 0.95 pu and the losses amount to 1.78 MWh/day for 55.5 MWh supplied (3.2 %).
5.4 Microgrid dynamics
A network supplied by rotating machines has inertia: after a loss of generation, the frequency falls slowly, which gives the governors time to react. Swing equation: 2H·dω/dt = Pm − Pe − D(ω − 1). Inverters have no inertia of their own; two families:
- Grid-following (most PV inverters): current sources synchronised by a PLL; they need a voltage reference.
- Grid-forming (microgrid batteries): voltage sources with P-f and Q-V droop or « virtual synchronous machine » (VSM); they can hold an island alone and provide synthetic inertia.
Example 5.3 — Islanded microgrid
File exemples/dynamics_microreseau.xml: 2 MVA genset DG (synchronous machine), 1 MVA battery BESS (grid-forming), 0.5 MVA PV
(grid-following), loads 0.6 and 0.5 MW. At 0.5 s, a cloud reduces the available PV power to 20 %; at 2.0 s, 100 ms three-phase fault at node Ch2.
Server results (RMS simulation, 4 s)
Genset frequency: nadir 49.79 Hz, RoCoF 1.76 Hz/s, final frequency 49.83 Hz (droop: the battery and the genset share the lost power). The PLL of the PV inverter sees larger excursions during the fault (49.42 to 50.50 Hz): it is the local measurement disturbed by the voltage dip, not the network frequency.
5.5 Short circuit of inverter-based generators
An inverter limits its current (1.1 to 1.5 times rated): IEC 60909-0:2016 represents it as a current source IskPF in the positive-sequence network, absent from the negative- and zero-sequence networks:
Consequences: in an island supplied only by inverters, the fault current is barely higher than the load current; overcurrent protections no longer see the fault. Undervoltage or differential protections, or batteries oversized in current, are needed. NRJXpert illustrates it: 11 kV feeder with PV, wind, battery and genset, three-phase fault → I"k = 1.656 kA of which only 76 A come from the three inverters.
↑ Back to top5.6 Economic dispatch and OPF
Economic dispatch decides, hour by hour, who produces: start-up of the gensets, charging and discharging of the batteries, purchases and sales to the grid, load curtailment. It is a mixed-integer linear programme (MILP): continuous variables (powers, states of charge) and binary ones (genset on or off, charging or discharging).
subject to: power balance at each hour; Pmin·u ≤ P ≤ Pn·u; SOCt = SOCt−1 + (ηcPc − Pd/ηd)Δt; spinning reserve
Example 5.4 — Islanded microgrid over 24 h
File exemples/dispatch_microreseau_ilote.xml: 1.5 MVA genset (diesel 800 F/l), 0.8 MW PV, 0.9 MWh / 0.3 MW battery.
Server results
Energy served 16.6 MWh; fuel 4 664 l; renewable share 36.6 %; no curtailment or load shedding; cost 3.75 MF/day, i.e. 226 F/kWh, 99.5 % of which is fuel. The battery does 0.24 cycle: with this PV size, it mainly serves to avoid genset start-ups.
The OPF (optimal power flow) adds the network constraints: voltages between Vmin and Vmax, currents, losses (DistFlow model
of Baran and Wu, linearised by tangent planes), and also controls the reactive power of the inverters. NRJXpert recalculates each hour with an AC load
flow to check: on exemples/opf_microreseau.xml, the difference between the OPF losses and those of the AC load flow is below 0.1 %.
5.7 Optimal sizing of a hybrid system
Optimal sizing chooses both the sizes (kWp of PV, number of wind turbines, kWh of batteries, number of gensets, grid connection) and the operation over typical days, minimising the annual cost (investments annualised by the CRF + operation), with reliability (energy not supplied) and renewable-share constraints. Demonstration of the server calculation package (run by the administrator): 100 kW peak site in Dakar — genset alone 317 F/kWh; hybrid optimum 360 kWp of PV + 933 kWh of batteries + one back-up genset, 105 F/kWh, 97 % renewable. The prices of the demonstration are indicative: redo the study with current prices.
↑ Back to topProjects
The projects start from the example XML files: Help › Open a tutorial example, then change the values in the « Calculate a network file
(XML) » window (tags <Pgen>, <derControl>, <H>, <Emax>…) and Calculate on the
server; « Save as… » keeps each variant.
Project A — Voltage profile of a rural feeder
From ieee33_distribution.xml, place 3 PV plants of 0.5 MW at nodes 18, 25 and 33. Compare cos φ = 1, Q(V) and P(V) in 24 h time series:
hours of overvoltage, losses, energy curtailed. Propose a connection rule.
Project B — Stability of an island
In dynamics_microreseau.xml, reduce the inertia of the genset (H) then switch the battery from « droop » to « VSM »: plot the nadir and the
RoCoF. What grid-forming battery power is needed to keep a RoCoF below 1 Hz/s?
Project C — Hybridisation of a diesel plant
With dispatch_microreseau_ilote.xml, vary the PV power (0.4; 0.8; 1.2; 1.6 MW) and the battery capacity. Plot the cost of the kWh and the
renewable share; identify when curtailment appears. Complete with the economic analysis of level 4 (investments).
Level 5 quiz
1. Why the backward/forward sweep rather than fast decoupled in distribution?
- it is more accurate in transmission
- it handles meshed networks better
- it converges on radial, high-R/X and unbalanced networks
- it needs no slack node
2. A large PV production at the end of a feeder, at cos φ = 1:
- lowers the voltage
- raises the voltage
- does not change the voltage
- changes the frequency
3. The Q(V) law reduces overvoltages by:
- absorbing reactive power when the voltage is high
- supplying reactive power when the voltage is high
- reducing the frequency
- disconnecting the PV
4. The hosting capacity is calculated at:
- full load, without generation
- full load and full generation
- night time
- low load and high generation
5. A « grid-forming » inverter:
- needs a PLL to synchronise on an existing network in order to operate
- is a current source
- imposes a voltage and can hold an island alone
- does not take part in frequency control
6. The RoCoF is higher when:
- the inertia is large
- the inertia is low and the power loss large
- the droop is small
- the network is in overvoltage
7. In IEC 60909-0:2016, an inverter-based generator is represented in short circuit by:
- a current source in the positive-sequence network only
- an emf behind its subtransient reactance
- an infinite impedance
- an ideal voltage source
8. The economic dispatch of a microgrid uses binary variables for:
- the voltages
- the prices
- the losses
- on/off of the gensets and the charge/discharge exclusion
Author
November 2026