← IBR Dynamic Modeling and Simulation

IBR Dynamic Modeling and Simulation

System Boundaries and Model Representations

C1-01 · Lesson + simulation + practice · Allow 60 minutes

Choose what the model retains before writing its equations.

Learning objectives

  • Distinguish states, inputs, outputs, and algebraic variables.
  • Declare the model boundary and study objective.

From structure to model

Start with the question and the terminal

An inverter-based resource connects a controlled converter to a network. A model must tell us where its boundary is: the average converter voltage, the filter capacitor, the point of connection (PoC), or a plant-level bus. A power measurement at the capacitor differs from a PoC measurement because the intervening branch stores energy and dissipates power.

For this course, draw converter → L₁ → capacitor C → L₂ → PoC → grid impedance → infinite bus. The infinite bus fixes voltage magnitude and frequency. The DC supply is ideal. Positive P and Q denote injection into the network at the declared measurement port. Controls receive reference commands and measurements; they do not directly prescribe every electrical state.

Three representations of the same equipment

RepresentationRetainsUseful question
Switching modelIndividual switching actions and their electrical consequencesWhat ripple does a switching pattern produce?
Averaged dq modelAverage voltage command, plant and controller dynamicsHow do current control and LCL dynamics interact?
Positive-sequence / low-frequency modelSelected envelope, synchronization and power dynamicsHow does a small command change affect synchronization?

Representation and controller family are separate choices. A GFL controller can be represented with either an explicit LCL plant or an ideal current actuator. A low-order GFM voltage source can hide inner voltage and current loops. Removing those loops changes the questions the model can answer.

Write an interface before an equation

Use x for differential states, z for algebraic network variables, u for commands and grid conditions, and y for measured outputs. The network constraint must be solved consistently with the controller. A state is a stored quantity with an evolution law; a current obtained by solving an impedance relation is an algebraic variable.

Worked classification: in the course droop experiment, x = [δ, P_f, Q_f]. The PCC voltage and branch current belong to z, while P*, Q*, V_g and ω_g are inputs. The capacitor voltage is absent from x: this experiment cannot display capacitor resonance. Module 3 adds it explicitly.

What the first experiment establishes

All four traces below start at total PoC P = 0.6 pu and Q = 0. An increase of 0.03 pu at 1 s produces different trajectories because the retained control dynamics differ. Similar endpoints do not prove that two models are interchangeable. Keep the state list, measurement port, parameter set and disturbance with every result.

Core equations

\dot{x}=f(x,z,u),\qquad 0=g(x,z,u),\qquad y=h(x,z,u)

Simulation experiment

  1. Run the default comparison and identify which dynamics are retained in each trace.
  2. Choose a voltage step and explain why these traces cannot establish switching-ripple accuracy.
  3. Write a four-line model contract: boundary, states, inputs, measured outputs.

Laboratory · Python runs in your browser

Predict → run → inspect

Predict the response, then change a parameter and run. The initial plot is a baseline generated by the same solver. The first computation downloads Python; later runs reuse it.

Loading the baseline…

Numerical audit and samples

Low-frequency teaching realization: nominal-frequency algebraic network and ideal current/voltage realization. 50 Hz, 10 kVA, 400 V; initial PCC total P = 0.6, Q = 0; X/R = 10. τᵢ = 0.02 s, τₚ = 0.1 s, τq = 0.05 s, nq = 0.0325; GFM source impedance 0.00625 + j0.1 pu. LCL, inner PI, DC dynamics and current limits are omitted.

Edit the model and reproduce the experiment

The code reads the controls above and plots its own result. Edit the experiment or expand the solver source to test your prediction. Download experiment produces one .py file containing the parameters, full solver and experiment code; local execution needs only Python 3.

case is a snapshot of the controls when you press Run. Call solve(case) and assign the final solution to result to plot it.

Download solver

The first run needs internet access to download Python. Computation stays in your browser; the solver uses only the standard library.

Ready to run.

Output appears here.
Inspect and edit the model source (advanced)

The source contains the transforms, LCL, PLL, droop, VSM, shared PCC and explicit reset. Source edits affect the next Python experiment; the laboratory above retains the original teaching equations.

Check your understanding

In the three-state droop experiment, which quantity is algebraic?

Identify one question that each representation can answer.

Continue in the source repository

Adapted from local PINN-IBR materials reviewed on 2026-10-03. The web code is a separately authored teaching realization. These repository paths contain the detailed models, configurations and research cases.

  • Teaching/Tutorial-IBR/src/tutorial_en.tex
  • Coding/Modeling/Single-IBR-Infinite-Bus/README.md

PINN-IBR repository

All nine modules
  1. System Boundaries and Model Representations
  2. Reference Frames and Per-Unit Conventions
  3. Averaged Converter and LCL Plant
  4. PLL and Grid-Following Control
  5. Droop Grid-Forming Control
  6. VSM and Virtual Inertia
  7. Parallel GFL–GFM Hybrid Models
  8. Mode-Switching Hybrid Models
  9. Equilibrium, Disturbances, and Fair Comparison