Grid-forming inverter microgrid control study
A reduced-order electrical control study comparing droop, virtual synchronous machine, and secondary restoration in a two-inverter islanded microgrid.

Project definition
Problem statement
An islanded microgrid must maintain frequency and voltage after active-power, reactive-power, dispatch, and network changes without relying on an upstream waveform reference.
The engineering problem is to compare primary droop, virtual inertia and damping, secondary restoration, proportional power sharing, and inverter current exposure under the same declared model and disturbances.
Project objectives
- Build a balanced per-unit model of two grid-forming inverters supplying a common islanded load.
- Compare frequency droop, virtual synchronous machine, and secondary-restored virtual synchronous machine control.
- Test load increase, load rejection, dispatch loss, and weaker network coupling.
- Measure frequency nadir, zenith, RoCoF, final error, integral absolute error, voltage, current, and power-sharing error.
- Identify the model assumptions and the validation required before hardware or grid studies.
Project structure
Project components
Microgrid model
Represents active and reactive power transfer, the common bus, internal source states, and exact algebraic power balance.
Controller models
Implements active-power frequency droop, a virtual swing equation, reactive droop, and optional secondary restoration.
Scenario set
Defines four repeatable disturbances with documented loads, references, transitions, and network coupling.
Metrics
Calculates frequency, voltage, current, settling, cumulative error, and final power-sharing results.
Experiment runner
Executes all 12 cases and produces machine-readable evidence and labelled figures.
Methodology
Project workflow
- 01Select a scenario
Choose the prepared load step, load rejection, dispatch loss, or weak-coupling case.
- 02Select a controller
Run droop, VSM, or VSM with secondary restoration under the same network conditions.
- 03Solve the states
The numerical solver calculates angle, frequency, voltage, filtered power, and secondary states.
- 04Measure the response
Frequency, voltage, peak current, and power-sharing metrics are calculated from the complete trajectory.
- 05Compare the evidence
CSV, JSON, and figures show controller differences and the scenarios that exceed the current study limit.
Demonstration scenario
A two-inverter islanded microgrid receives a fast load increase from 1.0 pu to 1.3 pu. Droop, VSM, and secondary VSM responses are compared. Secondary control reduces final frequency and voltage error, while all three cases expose current above the selected 1.2 pu study limit.
Engineering
Tools and method
- Tools
- The project uses Python, NumPy, SciPy, Matplotlib, Jupyter for subject analysis, simulation, and results.
- Numerical model
- Python and NumPy for the balanced per-unit two-inverter network and controller equations.
- ODE solution
- SciPy DOP853 integration with declared tolerances, maximum step, and 500 Hz reporting.
- Analysis
- Deterministic metric functions for frequency, voltage, current, settling, cumulative error, and sharing.
- Figures
- Matplotlib for architecture, time response, sharing, current, RoCoF, and cross-scenario comparisons.
- Verification
- Power-balance invariants, initial equilibrium, input validation, metric behavior, command tests, source checks, and dependency audit.
Testing
Evaluation
Evaluation measures
- Frequency nadir, zenith, maximum absolute RoCoF, final error, IAE, and settling time
- Minimum, maximum, and final bus voltage with final voltage error
- Peak apparent-current estimate normalized to each inverter rating
- Final active-power sharing normalized by inverter rating
- Pass or fail against the selected 49 to 51 Hz, 0.9 to 1.1 pu, and 1.2 pu current study limits
- Sensitivity to load direction, active reference loss, and weaker network coupling
Project boundaries
- The project is a balanced reduced-order electrical control study and not a switching or electromagnetic transient model.
- It does not include a current limiter, protection coordination, DC-link dynamics, PWM, transformer, fault, thermal, or hardware model.
- The prepared limits are transparent study criteria and not grid-code certification thresholds.
- The package runs offline and must not be connected to live electrical equipment or used as inverter settings.
Included
- 01Two-inverter islanded microgrid model
- 02Droop, virtual synchronous machine, and secondary restoration controllers
- 03Load-step, load-rejection, dispatch-loss, and weak-coupling scenarios
- 04CSV and JSON results with eight labelled figures
- 0569 automated tests with 99 percent statement coverage
- 06Complete project files, models, calculations, and analysis material in a private GitHub repository
- 07Complete project documentation in PDF and editable Word formats
- 08Setup and usage guide in PDF and editable Word formats
Project record
No information is collected on this page.
- Permanent project ID
- GP-EE-0UEHS9I
- Catalogued
- 21 Aug 2026
- Completed
- 24 Aug 2026
- Verified
- 24 Aug 2026
- Demonstration
- Included in repository
Handover
After purchase
- 01Payment is confirmed
The project is marked unavailable and cannot be purchased again.
- 02Repository access is granted
The buyer's submitted GitHub account receives access to the private repository.
- 03The purchase record is delivered
The certification sheet is prepared from the reviewed buyer details and sent privately by email.