IBR Dynamic Modeling and Simulation
Parallel GFL–GFM Hybrid Models
C1-07 · Lesson + simulation + practice · Allow 90 minutes
Model simultaneous voltage-source and current-source branches at a common terminal.
Learning objectives
- Explain the REGFM_C1 parallel architecture.
- Keep the positive-sequence lane separate from its detailed-average lift.
From structure to model
Couple branches through a shared terminal
The lab connects one GFL current-actuator branch and one droop-GFM voltage-source branch to a single PCC. They are simultaneously active. Each receives half of the total P-command increment. Their outputs are coupled through the same grid impedance; combining two separately simulated single-inverter traces would miss this interaction.
The total system base remains 10 kVA. Both branches use that common base, each starts at P = 0.3 pu and Q = 0, and the total starts at 0.6 pu. When using different individual device bases, convert currents, powers and impedances before applying the shared network equations.
Solve the network once
For grid impedance Z_g, GFL current I_c and GFM source U = E exp(jδ) behind Z_f, KCL gives I_grid = I_c + (U − V)/Z_f. Combined with V = V_g + Z_g I_grid, this produces the explicit PCC expression below. This equation must be solved before evaluating either branch’s power feedback.
The state count is 4 + 3 = 7. State concatenation alone is insufficient: both controllers must see the same physical PCC voltage, expressed in their own local frames. Compute each branch power as V Iₖ* and total power as V(I_c + I_v)*.
Branch power is not a weighted output guess
The default command step is split equally, but the two branch transients need not be equal because their controller dynamics differ. The “branch power” plot shows the GFL and GFM contributions together with the total. Their instantaneous sum must equal total PCC power.
Relation to REGFM_C1
This is a shared-PCC parallel teaching model, not the official REGFM_C1 implementation. The source notebook distinguishes its positive-sequence A11 formulation from a detailed-average F21 research lift. A virtual R + jX relation and a physical LCL circuit have different retained dynamics. Use the source notebook when reproducing those exact controller equations and parameter definitions.
Decrease SCR and inspect both branch powers and total power. Any observed interaction is specific to this current-source/voltage-source realization, common-base convention and power-sharing policy. It is not a general ranking of hybrid controller architectures.
Core equations
I_g=I_c+\frac{U-V}{Z_f},\qquad V=V_g+Z_gI_gV=\frac{V_g+Z_g I_c+(Z_g/Z_f)U}{1+Z_g/Z_f}S_{PCC}=V(I_c+I_v)^*=S_c+S_vSimulation experiment
- Select branch power and compare the two contributions during the +0.03 pu total step.
- Check that the branch powers sum to the total at the event and at the final time.
- Reduce SCR to 2, rerun, and describe which branch response changes more.
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.
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.
Python result
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
Explain why the two fidelity lanes require separate interpretations.
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.
Coding/Modeling/Single-IBR-Infinite-Bus/08_REGFM_C1_Hybrid_Infinite_Bus.ipynbResearch-Xirui-Zhang/Coding/xirui_low_frequency/model.py