Validating and Parameterising a CCGT plant
AI Model Validation and Machine Parameterisation
I have a slight love hate relationship with PSCAD - I suspect like a lot of engineers. I love its power and capability, but its user interface and
As it is a pure time-domain analysis program and does not have a loadflow solver problem, it has an inability to easily setup and configure the active and reactive power dispatch in a model. This can sometimes be frustrating when there are multiple synchronous machines present.
1. Validating a Model
Although PSCAD (and most EMT software) was originally intended for modelling a small system in lots of detail, it is increasingly used to model much larger and more complex systems. Unfortunately its UI for this can sometimes be a little bit difficult and manually entering equipment data and checking that all the parameters are set correctly can be tedious.
In this particular scenario I had modelled a CCGT plant (2x GTG and 1x STG), with each generator having an AVR, OEL, UEL, SCL, V/Hz limiter and machine governor (all custom models).
With three very similar synchronous generators and a lot of study cases to run it is important to make sure all the machine parameters and controller settings aligned with the provided information. Data entry and setting of variables is very easy to get wrong and can lead to a lot of rework. The solution was fairly simple, hook up Claude to PSCAD via the MCP server and tools I have developed then give Claude all the generator datasheets and controller models and settings and get it to cross check.
This worked like an absolute dream. Claude ran through everything, picked up a handful of bugs - some obvious, others much less so and got the model checked prior to starting the real study work.
2. Parameterising Synchronous Machines for Initial Loadflow
One of the real headaches in PSCAD when modelling a synchronous machine is that you can just set a MW and MVAr point, instead you have to work out the machine angle and terminal voltage needed to get the required active and reactive power flows. Sometimes on a simple SMIB network this is easy, but in most cases its a pain and needs a bit of manual iteration, or an import from a steady state loadflow solution program like DIgSILENT or PSS/E.
•If you cannot remember the math, the (simplified) formulas are below:
$P = \frac{V_1 V_2}{X} \sin\delta$
$Q = \frac{V_1 V_2}{X} \cos\delta - \frac{V_2^2}{X}$
I set this a problem for Claude, and I was not entirely sure how it was going to tackle the problem. I did tell it to control the voltage through the transformer tap controllers rather than the machine voltage though. It produced a clever idea:
-
Step 1 - Extract the network from the model itself. Rather than running through the GUI with an MCP interface, the .pscx project XML was parsed directly. MCP was used to cross check.
-
Step 2 - Build a first-principles phasor model. It created a ~100-line positive-sequence solver in python
-
Step 3 - Calibration. It ran a number of flat simulations with no events to check the machine output and the overall output matched expectations to <0.1%.
3. Summary
It is applications like this where AI is perhaps not the most exciting or sexy, but using it to inspect a very detailed model against a set of PDF datasheets is exactly the sort of things that AI is great at. It takes minutes and is accurate and saves a huge amount of time, before committing to the run.
Using Claude to build a simple first principles phasor model of the system to estimate the machine voltage and angle, was a bit of test and I was not sure what to expect. The really interesting point was the fact that Claude managed to build a phasor domain model to solve and estimate the parameters from first principles. The obvious issue here is that it doesn’t scale up well onto more difficult and complex systems
For future work I am going to explore using PSCAD and Pandapower in parallel to see what we can do for more complex loadflow interface and solvers. Initial trials look promising!
Download Technical Note 003 - Validation and Parameterisation in CCGT (PDF)