Vibe Coding Power System Software: Can You Trust Load Flow Results Built on Open Source Libraries?
pandapower, OpenDSS, transformer modelling, and the question of who actually vouches for the answer.
اردو میں پڑھیں ←A load flow that converges is not the same as a load flow that is correct. That single sentence is the most important thing I have learned building power system software, and it matters more today than it did five years ago. Open source libraries such as pandapower and OpenDSS have made serious network analysis available to anyone who can write a few lines of Python. At the same time, AI assistants can now write those lines for you, and the style of working that has grown around them, often called vibe coding, lets an engineer describe what they want in plain language and accept whatever code comes back as long as it runs.
For a web page or a small app, that is a reasonable trade. For a load flow, hosting capacity, or battery study that will be submitted to a regulator or used to plan real feeders and transformers, it is a trade that deserves much more scrutiny. In this article I want to set out the genuine benefits of AI assisted coding in our field, the specific ways it can go wrong, why transformer modelling is the sharpest edge of the problem, and who ultimately stands behind a result that came out of a stack of libraries, wrappers and generated code.
1. What Vibe Coding Actually Means for Power System Work
The term was popularised by Andrej Karpathy in early 2025 to describe a way of programming where you lean on an AI model, describe the outcome you want, and largely trust the result rather than reading every line. Many engineers on our own team use AI assistance every day, and I do not want to pretend otherwise or to argue against it. The honest picture is that it helps a great deal in some parts of the work and is dangerous in others.
Where it genuinely helps
- Importing network data from spreadsheets, GIS exports and AMI files into a model
- Looping a 24 hour load flow across hundreds of scenarios for hosting capacity or battery studies
- Plotting, dashboards and automated report generation
- Writing unit tests and documentation
- Explaining unfamiliar library APIs and finding mistakes in existing scripts
- Lowering the barrier for engineers who understand the physics but are not full time programmers
Where it is risky
- Choosing equipment parameters and defaults without being asked
- Hiding wrong units, bases or connections behind code that runs cleanly
- Using outdated or invented function arguments that are silently ignored
- Giving a false sense of validation because the output looks professional
- Encouraging engineers to skip reading the model they are about to rely on
The pattern is consistent. AI is excellent at plumbing, meaning moving data, repeating calculations and presenting results. It is unreliable at physics and judgment, meaning deciding what the model should represent. A useful rule is to let the machine write the plumbing while a qualified engineer owns every physical assumption.
2. The Plausible Wrong Answer
The danger of AI written power system code is rarely a crash. A crash is obvious and gets fixed. The danger is a plausible wrong answer: a model that builds, solves, converges, and produces tidy voltage profiles that are wrong in a way nobody notices until the feeder is built. These are the mistakes we see most often, and how to catch them.
| Typical error | How it shows up | How to catch it |
|---|---|---|
| Wrong units or bases (kV vs V, kVA vs MVA, ohm per km vs ohm per mile) | Voltages or losses off by a large factor, or by a factor of root three | Print the instantiated model, check the power balance, compare against a hand calculation |
| Vector group, phase shift or grounding left out or simplified | Wrong neutral current, unbalance and ground fault levels | Test the zero sequence path on a tiny network with a known answer |
| Hallucinated or deprecated parameters that are silently ignored | The model quietly differs from what you intended | Read the library documentation, pin the version, inspect the created elements |
| Hidden defaults (balanced load, default tap, default load model) | Voltages that look reasonable but hide real unbalance or tap effects | Keep an explicit assumptions register for every study |
| Treating “converged” as proof | Absurd results pass because the solver did not fail | Add automatic sanity checks that stop the run on impossible values |
3. Why the Transformer Is the Sharpest Edge
If I had to name one component where a wrong model does the most hidden damage, it would be the distribution transformer. A transformer is not a single number. It has several personalities, and a model that gets one of them wrong can still look entirely reasonable at the secondary bus.
The zero sequence problem
Take the Dyn11 transformer, the vector group commonly used on 11 kV to 0.415 kV distribution networks. Its delta winding on the high voltage side traps zero sequence current, so an unbalanced low voltage load or a ground fault sees a low impedance path through the grounded neutral, and none of that zero sequence behaviour appears on the high voltage side. A model that treats a Dyn11 like a simple star star transformer will misjudge neutral current, unbalance and ground fault levels.
This matters because low voltage networks are exactly where unbalance lives: single phase household loads, rooftop solar on one phase, and electric vehicle chargers. For the networks our work focuses on, the zero sequence behaviour of the transformer is not a corner case. It is the main case.
The other things a transformer model must get right
- Phase shift and its direction. A Dyn11 introduces a 30 degree shift. The direction matters when transformers run in parallel or the high voltage network is meshed, and a wrong direction produces circulating currents that exist only in the model.
- Core construction. Three limb and five limb cores have different zero sequence magnetising behaviour. Libraries usually need these parameters stated explicitly, and leaving them at defaults means the model is silently assuming something.
- Base voltage and tap. This connects directly to our earlier article on the 415V versus 400V mismatch. Building a model on a 415V secondary instead of a 400V reference shifts every low voltage result by about 3.75 percent, which is enough to flip a compliance verdict against the 380V to 420V band.
- Loss and impedance data. No load and load losses, short circuit voltage and per unit base conversion all sit behind one create function, and a single wrong base conversion contaminates everything downstream.
What the library history teaches us
When we first benchmarked the zero sequence behaviour of a Dyn11 transformer in pandapower, the results did not match what circuit theory said they should. The maintainers later corrected it. I want to be clear that this is not a criticism of pandapower, which is a valuable, actively maintained project. It is exactly how open source is meant to work: problems are found, discussed in public and fixed. But it also means a library is a moving target.
pandapower’s own public changelog shows this pattern over the years. Entries record corrections to how transformers are treated in the zero sequence network, to where zero sequence parameters are placed in the internal model, to the voltage ratio of low side tap changers, and to short circuit results when an external grid and a generator share a bus. The project also includes tests validated against commercial software for parts of its short circuit module, and recent changes move toward reporting missing zero sequence data with a clear error rather than failing quietly.
A recent example shows why vigilance matters. A public issue reported on 5 September 2026 describes the three phase load flow accepting certain unsupported transformer vector groups and still returning a converged result, with bus voltages of roughly a million per unit, a transformer loaded to over 700 percent, and a power imbalance of about 11 MW against a 0.1 MW load, all without a warning. We have not independently reproduced that report and its status may have changed, so please check the current issue before relying on it. As an illustration of the risk, it is hard to improve on: a converged flag sat on top of a physically impossible answer.
4. Who Vouches for the Result?
There is a trend worth naming. More and more load flow products are a friendly front end calling a library through an API. The user sees a clean dashboard. Underneath sit a solver library, a wrapper that builds the network, a model built from equipment data, and sometimes AI written glue code. Each layer can fail, and the user usually cannot see which engine, which version, or which assumptions are in play.
Credibility therefore comes from only a few places: the institution that stewards the engine, the transparency of the model, the evidence of validation, and the accountability of a named engineer. This is where the pedigree of a library legitimately counts. OpenDSS is developed and maintained by EPRI, a long established technical body, and has a long record in distribution and distributed energy studies. pandapower is developed by the University of Kassel and Fraunhofer IEE and is widely used in research and network planning. A library backed by a recognised technical body carries more credibility weight than a one person project, and I think that is fair.
But I want to be precise. Institutional backing raises the credibility of the bottom layer. It does not transfer responsibility for the layers above it. Neither library is good or bad. What matters is how carefully the user models the system in each of them.
5. How We Approach It at Chief Consultant Pakistan
Our Load Flow, Hosting Capacity, BESS analysis and EVCS software is built on OpenDSS, a seasoned and proven engine. We also build the same networks in pandapower, and at present we find the results from both credible when the model is built carefully. That last phrase carries all the weight. The engine is only half of the answer, and how the system is modelled in each tool matters at least as much as which tool is used.
Used with responsibility, these libraries are powerful. The discipline below is what we recommend to ourselves and to anyone building analysis on top of them.
6. A Responsible Use Checklist
- Separate plumbing from physics. Let AI help with data handling and presentation. Keep equipment modelling decisions with a qualified engineer.
- Benchmark before you trust. Run your workflow on networks with published answers, such as the IEEE test feeders, before applying it to a real network.
- Cross check with a second engine. Modelling the same network in two independent tools catches errors that neither tool reveals alone.
- Add automatic sanity checks. Stop the run when the power balance fails, when voltages fall outside a plausible range, or when a transformer is loaded to an impossible level, regardless of the convergence flag.
- Test transformers in isolation. Verify the vector group, phase shift and zero sequence behaviour on a tiny network with a known answer before using the transformer in a large model.
- Pin and record versions. Stamp every report with the library version, model file and assumptions, so any result can be reproduced and re-run if a defect is later found.
- Validate against the field. Wherever measured data exists, such as AMI or SCADA readings, compare the model against it.
- Put a named engineer behind the result. Software does not sign a study. People do.
Key Takeaways
- Convergence is not correctness. A solver that runs successfully has only proved that it solved the equations you gave it.
- Vibe coding is powerful for plumbing and dangerous for physics. Use AI for data handling and automation, and keep equipment modelling under engineering control.
- Transformers are where hidden errors concentrate. Vector group, grounding, zero sequence data and base voltage can each change results without any warning.
- Open source libraries evolve, and that is a feature. It also means every study should record the version and assumptions behind it.
- Credibility is layered. Institutional backing, such as EPRI behind OpenDSS, strengthens the engine, but the model, validation and sign off belong to you.
Questions? Let’s Talk Modelling
If you found this article helpful, please send your queries to muzammil@chiefconsultantpak.com. We will discuss how we modelled our systems and how you can model yours.
If you are interested in the cybersecurity of load flow analysis, including the risks of unvetted dependencies and generated code, please let us know and we will share our approach on that as well.
Frequently Asked Questions
Sources Referenced
- pandapower CHANGELOG, e2nIEE/pandapower on GitHub github.com/e2nIEE/pandapower
- pandapower releases github.com/e2nIEE/pandapower/releases
- Issue 3122, “runpp_3ph: unsupported transformer vector groups can return converged=True,” reported 5 September 2026 github.com/e2nIEE/pandapower/issues/3122
- Pull request 3089, “report missing zero sequence parameters with a descriptive error” github.com/e2nIEE/pandapower/pull/3089
