PSCAD Scripter

Write PSCAD Python automation scripts in minutes, not days.

Open Builder

or read the PSCAD Python guides

The PSCAD Workflow Builder: a fault ride through study where, on each pass of Fault duration, Run simulation feeds Speed nadir and Voltage dip into Add row to results table. A Harmonic distortion (THD) block is dragged in from the Blocks panel, renamed Voltage THD, wired after the simulation and into the results table, and the workflow downloads as a Python script. ↻ Each pass · Fault duration ⠿Blocks▾Power system checksRMS of a waveformSequence componentHarmonic distortion (THD)Overshoot and rise time Fault duration (s)1Each number from 0.08to 0.24, step 0.04Each passAfter all passesStepValue+3 more Run simulation25 s, 50 us stepReached the endStopped early+7 more Speed nadir3Frequency nadir of(machine speed)Frequency= SpeedNadir+9 more Voltage dip4Lowest value of(bus voltage)Curve= VpccPeak+3 more Add row to results tablegoes on to the next pass of Fault durationInto "FRT", saved at the endautomaticallySpeed nadir (Hz)Lowest voltage (kV)Voltage THD (%)+ drop a value+ drop a value56 ends the workflowTotal harmonic distortion,up to harmonic 50Waveform= not setTHD+7 moreHarmonic distortionVoltage THDVoltage THDup to harmonic 50, at 4.9 s(bus voltage)Waveform= VpccWorstTHD+6 more5 ⬇ Download Python script downloaded

What it does

  • Automate many EMT runs at once

    Loop over fault durations, parameter values, snapshots or whole cases. One run of the script does them all, reads the output channels and collects the results in one table.

  • Simplify PSCAD studies

    Each step is one block that asks only for the settings it needs, with every Master Library component in the picker:

    • Build the case
    • Run the simulation
    • Set a fault
    • Save a snapshot
    • Run a simulation set
  • EMT waveform calculations, ready made

    Wire an output channel into a check and get the number, per run:

    • RMS
    • Harmonic distortion (THD)
    • Sequence component
    • Unbalance factor
    • Overshoot and rise time
    • Damping of a ringdown
  • Optimisation and limit finding, ready made

    Optimise searches the best value of one or more settings (differential evolution, Nelder-Mead, Bayesian or a grid). Find limit halves the gap to the largest value that still passes, such as a critical clearing time.

Learn PSCAD scripting