AI and Power Engineering - Part 3 | PSCAD AVR Modelling & Agentic Flow
PSCAD AVR Model Task
A few weeks ago I asked an AI to read a transfer-function diagram from an exciter datasheet, build a model of it in PSCAD, design a test plan, run the tests, and refine the model where the response did not match. It did all of that in a few hours, with me prodding and poking it a bit. It was fun, and a worthwhile exercise, but fundamentally I could have built it my self in less time. The interesting part of it, was that I got the AI to design its own test plan. This is actually fairly easy for a control system, they are a simple mathematical state-space model, but the principle is still interesting, as it shows an agentic loop and ‘proper’ AI, rather than just simple question-response-question doom loops and rabbit holes that a common occurrence.
Agentic Testing Loop
Think about that for a minute, it did not just build the model in PSCAD and stop, it built the model, tested the wiring and logic / control signals from end-to-end. It thought about what would prove the model was correct. It picked test cases that exercised the easy bits - a small reference step. The harder bits - limiter saturation. The corner cases - the high-value and low-value gate take-overs that interact with the limiter logic. It ran each one, compared the response to the datasheet’s expected behaviour, and where two tests did not match it iterated.
It was also more rigorous than I would have been. If I had built the AVR myself I would have done a small-signal step, a large-signal step, eyeballed the limiter behaviour, and moved on. The AI did seven test cases and caught a wiring fault in the high-value gate that I would probably not have noticed for weeks.
Summary
Overall the task was a worthwhile experiment, what I try and remember on these kind of activities is a sense of realism, but also forward looking perspective. So its not a case of the AI was amazing, or the AI was crap, but how did it perform generally, and how might it perform in the next 3-6 months. Will it shift how I start doing things on a day-to-day basis. Ai,
Where it did less well was on the boring, easy stuff. It did not check that the model initialised cleanly. It did not run a small-signal sweep across the normal operating envelope. It chased the dramatic edge cases and skipped the obvious ones.
On the other hand its visual reasoning with the layout was shocking bad. I had to rewire it, so it was obvious where the signals were going from and to so that I could audit it and check it properly. I suspect this is the issue that a lot of software engineers get upset about. If it is a black box where you cant see and follow what has been done, auditing it and debugging can get very difficult and time consuming.