Predefined disturbances at specified time can be created by adding the corresponding devices. Three types of predefined disturbances are supported:
Three-phase-to-ground fault on buses. See Fault for details.
Connectivity status toggling. Disconnecting, connecting, or reconnecting any device, including lines, generators and motors can be implemented by Toggle.
Alteration of values. See Alter for details.
To use these devices, the time of disturbance needs to be known ahead of the simulation. The simulation program by default checks the network connectivity status after any disturbance.
One can implement any custom disturbance using a perturbation file as discussed
in [Milano2010]. The perturbation file is a Python script with a function named
pert. The example for the perturbation file can be found in
- andes.cases.ieee14.pert.pert(t, system)
Perturbation function called at each step.
The function needs to be named
pertand takes two positional arguments:
tfor the simulation time, and
systemfor the system object. Arbitrary logic and calculations can be applied in this function to
If the perturbation event involves switching, such as disconnecting a line, one will need to set the
Trueto trigger a system connectivity checking, and Jacobian rebuilding and refactorization. To implement, add the following line to the scope where the event is triggered:
system.TDS.custom_event = True
In other scopes of the code where events are not triggered, do not add the above line as it may cause significant slow-down.
The perturbation file can be supplied to the CLI using the
--pertargument or supplied to
System object supplied by the simulator.
F. Milano, “Power System Modelling and Scripting,” in Power Modelling and Scripting, F. Milano, Ed. Berlin, Heidelberg: Springer, pp. 202-204, 2010.