Skip to content

Dynamic simulation related APIs

Changgang Li edited this page Feb 8, 2021 · 1 revision

get_dynamic_simulator_parameter

Format: get_dynamic_simulator_parameter(par_type, par_name)
Description: Get dynamic simulator configuration parameter.
Args:

(1) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(2) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

set_dynamic_simulator_parameter

Format: set_dynamic_simulator_parameter(par_type, par_name, value)
Description: Set dynamic simulator configuration parameter.
Args:

(1) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(2) par_name: String of parameter name.
(3) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be changed

Example: N/A

get_dynamic_simulator_output_file

Format: get_dynamic_simulator_output_file()
Description: Get dynamic simulator output file name.
Args: N/A

Rets:

(1) String of output file name.

Example: N/A

set_dynamic_simulator_output_file

Format: set_dynamic_simulator_output_file(file)
Description: Set dynamic simulator output file name.
Args:

(1) file: String of output file name.

Rets: N/A

Example: N/A

get_dynamic_simulation_time_step

Format: get_dynamic_simulation_time_step()
Description: Get dynamic simulation time step.
Args: N/A

Rets:

(1) Value of dynamic simulation time step in seconds.

Example: N/A

set_dynamic_simulation_time_step

Format: set_dynamic_simulation_time_step(step)
Description: Set dynamic simulation time step.
Args:

(1) step: Dynamic simulation time step in seconds.

Rets: N/A

Tips:

The time step MUST be less than 1/2 of the least time constant of all dynamic models. It is general practice to set time step to 1/4 of the least time constant.
Run check_least_dynamic_time_constants() to report the least time constants.

Example: N/A

show_dynamic_simulation_configuration

Format: show_dynamic_simulation_configuration()
Description: Show dynamic simulation configuration. Report is sent to log.
Args: N/A

Rets: N/A

Example: N/A

get_dynamic_simulation_time

Format: get_dynamic_simulation_time()
Description: Get current dynamic simulation time.
Args: N/A

Rets:

(1) Value of dynamic simulation time in seconds.

Tips:

In STEPS, the minimum simulation time is -2*simulation time step.

Example: N/A

clear_meters

Format: clear_meters()
Description: Clear all meters in the current simulator.
Args: N/A

Rets: N/A

Tips:

If STEPS() is created with is_default=True, this api can help to clear all meters to avoid adding duplicate meters.

Example: N/A

prepare_meters

Format: prepare_meters(device_type)
Description: Automatically prepare general meters of all devices of specific device type.
Args:

(1) device_type: String of device type.

Rets: N/A

Tips:

The device type should be one of {"ALL", "BUS", "GENERATOR", "WT GENERATOR", "PV UNIT", "ENERGY STORAGE", "LOAD", "LINE", "TRANSFORMER", "HVDC", "EQUIVALENT DEVICE"}.
If "ALL" is set, all general meters of {"BUS", "GENERATOR", "WT GENERATOR", "PV UNIT", "ENERGY STORAGE", "LOAD", "LINE", "TRANSFORMER", "HVDC", "EQUIVALENT DEVICE"} are set.
For the supported general meters, see implementation of the following functions of STEPS:
DYNAMIC_SIMULATOR::prepare_bus_related_meters()
DYNAMIC_SIMULATOR::prepare_generator_related_meters()
DYNAMIC_SIMULATOR::prepare_wt_generator_related_meters()
DYNAMIC_SIMULATOR::prepare_pv_unit_related_meters()
DYNAMIC_SIMULATOR::prepare_energy_storage_related_meters()
DYNAMIC_SIMULATOR::prepare_load_related_meters()
DYNAMIC_SIMULATOR::prepare_line_related_meters()
DYNAMIC_SIMULATOR::prepare_transformer_related_meters()
DYNAMIC_SIMULATOR::prepare_hvdc_related_meters()
DYNAMIC_SIMULATOR::prepare_equivalent_device_related_meters()

Example: N/A

prepare_bus_meter

Format: prepare_bus_meter(bus, meter_type)
Description: Prepare specific bus meter.
Args:

(1) bus: Bus number.
(2) meter_type: String of bus type.

Rets: N/A

Tips:

For the supported meter types, see implementation of the following function of STEPS:
DYNAMIC_SIMULATOR::prepare_bus_related_meter()

Example: N/A

prepare_generator_meter

Format: prepare_generator_meter(generator, meter_type, var_name="")
Description: Prepare specific generator meter.
Args:

(1) generator: Generator device id in format of (bus, ickt).
(2) meter_type: String of bus type.
(3) var_name: String of internal variable name. Only valid when meter type is internal variable of dynamic models.

Rets: N/A

Tips:

For the supported meter types, see implementation of the following function of STEPS:
DYNAMIC_SIMULATOR::prepare_generator_related_meter()

Example: N/A

prepare_wt_generator_meter

Format: prepare_wt_generator_meter(generator, meter_type, var_name="")
Description: Prepare specific wind turbine generator meter.
Args:

(1) generator: Wind turbine generator device id in format of (bus, ickt).
(2) meter_type: String of bus type.
(3) var_name: String of internal variable name. Only valid when meter type is internal variable of dynamic models.

Rets: N/A

Tips:

For the supported meter types, see implementation of the following function of STEPS:
DYNAMIC_SIMULATOR::prepare_wt_generator_related_meter()

Example: N/A

prepare_pv_unit_meter

Format: prepare_pv_unit_meter(pvunit, meter_type, var_name="")
Description: Prepare specific PV unit meter.
Args:

(1) pvunit: PV unit device id in format of (bus, ickt).
(2) meter_type: String of bus type.
(3) var_name: String of internal variable name. Only valid when meter type is internal variable of dynamic models.

Rets: N/A

Tips:

For the supported meter types, see implementation of the following function of STEPS:
DYNAMIC_SIMULATOR::prepare_pv_unit_related_meter()

Example: N/A

prepare_energy_storage_meter

Format: prepare_energy_storage_meter(estorage, meter_type, var_name="")
Description: Prepare specific energy storage meter.
Args:

(1) estorage: Energy storage device id in format of (bus, ickt).
(2) meter_type: String of bus type.
(3) var_name: String of internal variable name. Only valid when meter type is internal variable of dynamic models.

Rets: N/A

Tips:

For the supported meter types, see implementation of the following function of STEPS:
DYNAMIC_SIMULATOR::prepare_energy_storage_related_meter()

Example: N/A

prepare_load_meter

Format: prepare_load_meter(load, meter_type, var_name="")
Description: Prepare specific load meter.
Args:

(1) load: Load device id in format of (bus, ickt).
(2) meter_type: String of bus type.
(3) var_name: String of internal variable name. Only valid when meter type is internal variable of dynamic models.

Rets: N/A

Tips:

For the supported meter types, see implementation of the following function of STEPS:
DYNAMIC_SIMULATOR::prepare_load_related_meter()

Example: N/A

prepare_line_meter

Format: prepare_line_meter(line, meter_type, side, var_name="")
Description: Prepare specific transmission line meter.
Args:

(1) line: Transmission line device id in format of (ibus, jbus, ickt).
(2) meter_type: String of bus type.
(3) side: String of line side. One of {"SENDING", "RECEIVING"} or {"S", "R"}.
(4) var_name: String of internal variable name. Only valid when meter type is internal variable of dynamic models.

Rets: N/A

Tips:

For the supported meter types, see implementation of the following function of STEPS:
DYNAMIC_SIMULATOR::prepare_line_related_meter()

Example: N/A

prepare_transformer_meter

Format: prepare_transformer_meter(trans, meter_type, side, var_name="")
Description: Prepare specific transformer meter.
Args:

(1) trans: Transformer device id in format of (ibus, jbus, ickt) or (ibus, jbus, kbus, ickt).
(2) meter_type: String of bus type.
(3) side: String of transformer side. One of {"PRIMARY", "SECONDARY", "TERTIARY"} or {"P", "S", "T"}.
(4) var_name: String of internal variable name. Only valid when meter type is internal variable of dynamic models.

Rets: N/A

Tips:

kbus can be omitted if kbus=0, a.k.a., (ibus, jbus, 0, ickt) can be simplified as (ibus, jbus, ickt).
For the supported meter types, see implementation of the following function of STEPS:
DYNAMIC_SIMULATOR::prepare_transformer_related_meter()

Example: N/A

prepare_hvdc_meter

Format: prepare_hvdc_meter(hvdc, meter_type, side, var_name="")
Description: Prepare specific HVDC link meter.
Args:

(1) hvdc: HVDC link device id in format of (ibus, jbus, ickt).
(2) meter_type: String of bus type.
(3) side: String of converter side. One of {"RECTIFIER", "INVERTER"} or {"R", "I"}.
(4) var_name: String of internal variable name. Only valid when meter type is internal variable of dynamic models.

Rets: N/A

Tips:

For the supported meter types, see implementation of the following function of STEPS:
DYNAMIC_SIMULATOR::prepare_hvdc_related_meter()

Example: N/A

prepare_equivalent_device_meter

Format: prepare_equivalent_device_meter(edevice, meter_type, var_name="")
Description: Prepare specific equivalent device meter.
Args:

(1) edevice: Equivalent device device id in format of (bus, ickt).
(2) meter_type: String of bus type.
(3) var_name: String of internal variable name. Only valid when meter type is internal variable of dynamic models.

Rets: N/A

Tips:

For the supported meter types, see implementation of the following function of STEPS:
DYNAMIC_SIMULATOR::prepare_equivalent_device_related_meter()

Example: N/A

start_dynamic_simulation

Format: start_dynamic_simulation()
Description: Start dynamic simulation. Dynamic initialization is performed.
Args: N/A

Rets: N/A

Example: N/A

stop_dynamic_simulation

Format: stop_dynamic_simulation()
Description: Stop dynamic simulation. No further dynamic simulation should be performed once dynamic simulation is stopped.
Args: N/A

Rets: N/A

Example: N/A

run_dynamic_simulation_to_time

Format: run_dynamic_simulation_to_time(time)
Description: Run dynamic simulation to time.
Args:

(1) time: Time in second.

Rets: N/A

Tips:

The input time is the time when the dynamic simulation is paused. For example, if the current dynamic simulation time returned from get_dynamic_simulation_time() is 1.0s, and the returned time of get_dynamic_simulation_time() will become 1.5s after run_dynamic_simulation_to_time(1.5) is called.

Example: N/A

run_a_step

Format: run_a_step()
Description: Run a dynamic simulation step. The dynamic simulation time is increased by one time step once the function is called.
Args: N/A

Rets: N/A

Example: N/A

is_system_angular_stable

Format: is_system_angular_stable()
Description: Check if the system is angular stable or not. It is only VALID when system rotor angle stability surveillance flag is enabled.
If the surveillance flag is not enabled, True is always returned.
Args: N/A

Rets:

(1) flag: True if system is angular stable, and False if unstable.

Tips:

If the surveillance flag is enabled, False is returned if the maximum rotor angle difference in any island exceeds the threshold.
Other, True is returned.

Example: N/A

get_user_meter_value

Format: get_user_meter_value(index)
Description: Return value of user meter in dynamic simulator.
Args:

(1) index: meter index, starting from 1.

Rets:

(1) value: meter value. If index is invalid, 0 is returned.

Tips:

The meter index can be found in log file when calling start_dynamic_simulation()

Example:

index = 1  
value = simulator.get_user_meter_value(index)  
index = 2  
value = simulator.get_user_meter_value(index)  

get_basic_meter_value

Format: get_basic_meter_value(meter_name)
Description: Return value of basic meter in dynamic simulator.
Args:

(1) meter_name: string, meter name. one of the following:
"DAE ITERATION"
"NETWORK ITERATION"
"POWER MISMATCH IN MVA"
"BUS WITH MAX POWER MISMATCH"
"ELAPSED TIME OF INTEGRATION IN MS"
"ELAPSED TIME OF NETWORK SOLUTION IN MS"
"TOTAL ELAPSED TIME IN MS"

Rets:

(1) value: meter value. If meter name is invalid, 0 is returned.

Tips:

N/A

Example:

value = simulator.get_basic_meter_value("DAE ITERATION")  
value = simulator.get_basic_meter_value("BUS WITH MAX POWER MISMATCH")  

set_bus_fault

Format: set_bus_fault(bus, fault_type, fault_shunt)
Description: Set bus fault.
Args:

(1) bus: Bus number.
(2) fault_type: String of fault type. Currently, only "THREE PHASE FAULT" is supported.
(3) fault_shunt: tuple of complex per unit fault shunt in the form of (g, b). the shunt is g+jb

Rets: N/A

Tips:

The fault shunt is represented as conductance and susceptance based on system base power and bus base voltage.
The susceptance is usually set as NEGATIVE to mimic the voltage drop due to fault.
The absolute value of the fault shunt should not be too great. Otherwise, network solution may fail to converge. Typically, |b|<1e6.

Example:

bus = 1  
shunt = (0.0, -2e4)  
simulator.set_bus_fault(bus, "three phase fault", shunt)  

clear_bus_fault

Format: clear_bus_fault(bus, fault_type)
Description: Clear bus fault without tripping bus.
Args:

(1) bus: Bus number.
(2) fault_type: String of fault type. Currently, only "THREE PHASE FAULT" is supported.

Rets: N/A

Example:

bus = 1  
shunt = 0.0+j-2e4  
simulator.set_bus_fault(bus, "three phase fault", shunt)  
simulator.clear_bus_fault(bus, "three pahse fault")  

trip_bus

Format: trip_bus(bus)
Description: Trip bus. All devices connecting to the bus are disconnected.
Args:

(1) bus: Bus number.

Rets: N/A

Example:

bus = 1  
simulator.trip_bus(bus)  

set_line_fault

Format: set_line_fault(line, fault_type, fault_location, fault_shunt)
Description: Set transmission line fault.
Args:

(1) line: Transmission line device id in format of (ibus, jbus, ickt).
(2) fault_type: String of fault type. Currently, only "THREE PHASE FAULT" is supported.
(3) fault_location: Relative fault location to ibus.
(4) fault_shunt: tuple of complex per unit fault shunt in the form of (g, b). the shunt is g+jb

Rets: N/A

Tips:

The fault location should be in the range of [0, 1.0], including 0 and 1.0. It represent the relative location of the fault on the line to the ibus.
For example, 0.5 means the fault is set at the middle of the line. 0 means the fault is set at exactly ibus. 1.0 means the fault is set at exactly jbus.
The fault shunt is represented as conductance and susceptance based on system base power and bus base voltage.
The susceptance is usually set as NEGATIVE to mimic the voltage drop due to fault.
The absolute value of the fault shunt should not be too great. Otherwise, network solution may fail to converge. Typically, |b|<1e6.
Multiple faults are supported on single line at different fault locations.

Example:

line = (1, 2, "1#")  
location = 0.2  
shunt = (0.0, -2e4)  
simulator.set_line_fault(line, "three phase fault", location, shunt)  

clear_line_fault

Format: clear_line_fault(line, fault_type, fault_location)
Description: Clear transmission line fault without tripping the line.
Args:

(1) line: Transmission line device id in format of (ibus, jbus, ickt).
(2) fault_type: String of fault type. Currently, only "THREE PHASE FAULT" is supported.
(3) fault_location: Relative fault location to ibus.

Rets: N/A

Tips:

The fault location should be in the range of [0, 1.0], including 0 and 1.0. It represent the relative location of the fault on the line to the ibus.
For example, 0.5 means the fault at the middle of the line will be cleared. 0 means the fault at ibus will be cleared. 1.0 means the fault at jbus will be cleared.

Example:

line = (1, 2, "1#")  
location = 0.2  
shunt = 0.0+j-2e4  
simulator.set_line_fault(line, "three phase fault", location, shunt)  
simulator.clear_line_fault(line, "three pahse fault", location)  

trip_line

Format: trip_line(line)
Description: Trip transmission line. Breakers at the two sides of the line are both tripped.
Args:

(1) line: Transmission line device id in format of (ibus, jbus, ickt).

Rets: N/A

Example:

line = (1, 2, "1#")  
simulator.trip_line(line)  

trip_line_breaker

Format: trip_line_breaker(line, side)
Description: Trip transmission line breaker at specific side.
Args:

(1) line: Transmission line device id in format of (ibus, jbus, ickt).
(2) side: String of transmission line side. One of {"SENDING", "RECEIVING"} or {"S", "R"}.

Rets: N/A

Tips:

The sending side bus is not necessarily ibus. The receiving bus is not necessarily jbus.
It is up to the user to check which side to trip.

Example:

line = (1, 2, "1#")  
simulator.trip_line_breaker(line, "sending")  
simulator.trip_line_breaker(line, "receiving")  

close_line

Format: close_line(line)
Description: Close transmission line. Breakers at the two sides of the line are both closed.
Args:

(1) line: Transmission line device id in format of (ibus, jbus, ickt).

Rets: N/A

Example:

line = (1, 2, "1#")  
simulator.close_line(line)  

close_line_breaker

Format: close_line_breaker(line, side)
Description: Close transmission line breaker at specific side.
Args:

(1) line: Transmission line device id in format of (ibus, jbus, ickt).
(2) side: String of transmission line side. One of {"SENDING", "RECEIVING"} or {"S", "R"}.

Rets: N/A

Tips:

The sending side bus is not necessarily ibus. The receiving bus is not necessarily jbus.
It is up to the user to check which side to close.

Example:

line = (1, 2, "1#")  
simulator.close_line_breaker(line, "sending")  
simulator.close_line_breaker(line, "receiving")  

trip_transformer

Format: trip_transformer(transformer)
Description: Trip transformer. Breakers at the two or three winding sides of the transformer are all tripped.
Args:

(1) transformer: Transformer device id in format of (ibus, jbus, ickt) or (ibus, jbus, kbus, ickt).

Rets: N/A

Tips:

kbus can be omitted if kbus=0, a.k.a., (ibus, jbus, 0, ickt) can be simplified as (ibus, jbus, ickt).

Example:

trans = (1, 2, 3, "1#")  
simulator.trip_transformer(trans)  
trans = (4, 5, 0, "1#")  
simulator.trip_transformer(trans)  

trip_transformer_breaker

Format: trip_transformer_breaker(transformer, side)
Description: Trip transformer breaker at specific side.
Args:

(1) transformer: Transformer device id in format of (ibus, jbus, ickt) or (ibus, jbus, kbus, ickt).
(2) side: String of transformer winding side. One of {"PRIMARY", "SECONDARY", "TERTIARY"} or {"P", "S", "T"}.

Rets: N/A

Tips:

kbus can be omitted if kbus=0, a.k.a., (ibus, jbus, 0, ickt) can be simplified as (ibus, jbus, ickt).
The primary side bus is not necessarily ibus. The secondary bus is not necessarily jbus. The tertiary bus is not necessarily kbus.
It is up to the user to check which side to trip.

Example:

trans = (1, 2, 3, "1#")  
simulator.trip_transformer_breaker(trans, "primary")  
simulator.trip_transformer_breaker(trans, "secondary")  
simulator.trip_transformer_breaker(trans, "tertiary")  
trans = (4, 5, 0, "1#")  
simulator.trip_transformer_breaker(trans, "primary")  
simulator.trip_transformer_breaker(trans, "secondary")  

close_transformer

Format: close_transformer(transformer)
Description: Close transformer. Breakers at the two or three winding sides of the transformer are all closed.
Args:

(1) transformer: Transformer device id in format of (ibus, jbus, ickt) or (ibus, jbus, kbus, ickt).

Rets: N/A

Tips:

kbus can be omitted if kbus=0, a.k.a., (ibus, jbus, 0, ickt) can be simplified as (ibus, jbus, ickt).

Example:

trans = (1, 2, 3, "1#")  
simulator.close_transformer(trans)  
trans = (4, 5, 0, "1#")  
simulator.close_transformer(trans)  

close_transformer_breaker

Format: close_transformer_breaker(transformer, side)
Description: Close transformer breaker at specific side.
Args:

(1) transformer: Transformer device id in format of (ibus, jbus, ickt) or (ibus, jbus, kbus, ickt).
(2) side: String of transformer winding side. One of {"PRIMARY", "SECONDARY", "TERTIARY"} or {"P", "S", "T"}.

Rets: N/A

Tips:

kbus can be omitted if kbus=0, a.k.a., (ibus, jbus, 0, ickt) can be simplified as (ibus, jbus, ickt).
The primary side bus is not necessarily ibus. The secondary bus is not necessarily jbus. The tertiary bus is not necessarily kbus.
It is up to the user to check which side to close.

Example:

trans = (1, 2, 3, "1#")  
simulator.close_transformer_breaker(trans, "primary")  
simulator.close_transformer_breaker(trans, "secondary")  
simulator.close_transformer_breaker(trans, "tertiary")  
trans = (4, 5, 0, "1#")  
simulator.close_transformer_breaker(trans, "primary")  
simulator.close_transformer_breaker(trans, "secondary")  

trip_generator

Format: trip_generator(generator)
Description: Trip generator.
Args:

(1) generator: Generator device id in format of (bus, ickt).

Rets: N/A

Example:

gen = (1, "#1")  
simulator.trip_generator(gen)  

shed_generator

Format: shed_generator(generator, percent)
Description: Shed generator by percent.
Args:

(1) generator: Generator device id in format of (bus, ickt).
(2) percent: Per unit percent of the generator to shed.

Rets: N/A

Tips:

The percent is USUALLY in range [0, 1.0] including 0 and 1.0. If percent=0.0, generator is not shed at all. If percent=1.0, the generator will be tripped.
The percent CAN be set as negative to mimic increase of generation. But it is rarely used.
If a generator with MBASE=100MVA is shed by 0.2, its MBASE becomes 80MVA. If it is then shed by 0.3, its MBASE becomes 56MVA.

Example:

gen = (1, "#1")  
percent = 0.1  
simulator.shed_generator(gen, percent)  

trip_wt_generator

Format: trip_wt_generator(generator, n)
Description: Trip wind turbine generator.
Args:

(1) generator: Wind turbine generator device id in format of (bus, ickt).
(2) n: Number of lumped wind turbine generators to trip.

Rets: N/A

Tips:

The number of lunmped wind turbine generators should be less than the available lumped wind turbine generators.

Example:

gen = (1, "#1")  
n = 2  
simulator.trip_wt_generator(gen, n)  

shed_wt_generator

Format: shed_wt_generator(generator, percent)
Description: Shed wind turbine generator by percent.
Args:

(1) generator: Wind turbine generator device id in format of (bus, ickt).
(2) percent: Per unit percent of the wind turbine generator to shed.

Rets: N/A

Tips:

The percent is USUALLY in range [0, 1.0] including 0 and 1.0. If percent=0.0, wind turbine generator is not shed at all. If percent=1.0, the wind turbine generator will be totally tripped.
The percent CAN be set as negative to mimic increase of wind turbine generation. But it is rarely used.
If a wind turbine generator with MBASE=100MVA is shed by 0.2, its MBASE becomes 80MVA. If it is then shed by 0.3, its MBASE becomes 56MVA.

Example:

gen = (1, "#1")  
percent = 0.1  
simulator.shed_wt_generator(gen, percent)  

trip_load

Format: trip_load(load)
Description: Trip load.
Args:

(1) load: Load device id in format of (bus, ickt).

Rets: N/A

Example:

load = (1, "#1")  
simulator.trip_load(load)  

close_load

Format: close_load(load)
Description: Close load.
Args:

(1) load: Load device id in format of (bus, ickt).

Rets: N/A

Example:

load = (1, "#1")  
simulator.close_load(load)  

scale_load

Format: scale_load(load, percent)
Description: Scale load by percent.
Args:

(1) load: Load device id in format of (bus, ickt).
(2) percent: Per unit percent of the load to scale. Positve for scaling up, and Negative for scaling down.

Rets: N/A

Example:

load = (1, "#1")  
percent = 0.1  
simulator.scale_load(load, percent)  

scale_all_loads

Format: scale_all_loads(percent)
Description: Scale all loads by percent.
Args:

(1) percent: Per unit percent of all loads to scale. Positve for scaling up, and Negative for scaling down.

Rets: N/A

Example:

percent = 0.1  
simulator.scale_all_loads(percent)  

trip_fixed_shunt

Format: trip_fixed_shunt(shunt)
Description: Trip fixed shunt.
Args:

(1) shunt: Fixed shunt device id in format of (bus, ickt).

Rets: N/A

Example:

shunt = (1, "#1")  
simulator.trip_fixed_shunt(shunt)  

close_fixed_shunt

Format: close_fixed_shunt(shunt)
Description: Close fixed shunt.
Args:

(1) shunt: Fixed shunt device id in format of (bus, ickt).

Rets: N/A

Example:

shunt = (1, "#1")  
simulator.close_fixed_shunt(shunt)  

manually_bypass_hvdc

Format: manually_bypass_hvdc(hvdc)
Description: Manually bypass HVDC link.
Args:

(1) hvdc: HVDC link device id in format of (ibus, jbus, ickt).

Rets: N/A

Tips:

The HVDC link won't recover unless manually_unbypass_hvdc() is called.

Example:

hvdc = (1, 2, "DC Link 1")  
simulator.manually_bypass_hvdc(hvdc)  

manually_block_hvdc

Format: manually_block_hvdc(hvdc)
Description: Manually block HVDC link.
Args:

(1) hvdc: HVDC link device id in format of (ibus, jbus, ickt).

Rets: N/A

Tips:

The HVDC link won't recover unless manually_unblock_hvdc() is called.

Example:

hvdc = (1, 2, "DC Link 1")  
simulator.manually_block_hvdc(hvdc)  

manually_unbypass_hvdc

Format: manually_unbypass_hvdc(hvdc)
Description: Manually unbypass HVDC link.
Args:

(1) hvdc: HVDC link device id in format of (ibus, jbus, ickt).

Rets: N/A

Example:

hvdc = (1, 2, "DC Link 1")  
simulator.manually_unbypass_hvdc(hvdc)  

manually_unblock_hvdc

Format: manually_unblock_hvdc(hvdc)
Description: Manually unblock HVDC link.
Args:

(1) hvdc: HVDC link device id in format of (ibus, jbus, ickt).

Rets: N/A

Example:

hvdc = (1, 2, "DC Link 1")  
simulator.manually_unblock_hvdc(hvdc)  

get_generator_voltage_reference_in_pu

Format: get_generator_voltage_reference_in_pu(generator)
Description: Get generator voltage reference of exciter model. If there is no exciter model for the generator, 0 will be returned.
Args:

(1) generator: Generator device id in format of (bus, ickt).

Rets:

(1) Voltage reference in pu.

Example:

gen = (1, "#1")  
vref = simulator.get_generator_voltage_reference_in_pu(gen)  

get_generator_mechanical_power_reference_in_pu

Format: get_generator_mechanical_power_reference_in_pu(generator)
Description: Get generator mechanical power reference of turbine governor model. If there is no turbine governor model for the generator, 0 will be returned.
Args:

(1) generator: Generator device id in format of (bus, ickt).

Rets:

(1) Mechanical power reference in pu based on generator MBASE.

Example:

gen = (1, "#1")  
pref = simulator.get_generator_mechanical_power_reference_in_pu(gen)  

get_generator_mechanical_power_reference_in_MW

Format: get_generator_mechanical_power_reference_in_MW(generator)
Description: Get generator mechanical power reference of turbine governor model. If there is no turbine governor model for the generator, 0 will be returned.
Args:

(1) generator: Generator device id in format of (bus, ickt).

Rets:

(1) Mechanical power reference in MW.

Example:

gen = (1, "#1")  
pref = simulator.get_generator_mechanical_power_reference_in_MW(gen)  

set_generator_voltage_reference_in_pu

Format: set_generator_voltage_reference_in_pu(generator, value)
Description: Set generator voltage reference of exciter model. If there is no exciter model for the generator, nothing will be changed.
Args:

(1) generator: Generator device id in format of (bus, ickt).
(2) value: New voltage reference in pu.

Rets: N/A

Example:

gen = (1, "#1")  
vref = simulator.get_generator_voltage_reference_in_pu(gen)  
new_vref = vref + 0.1  
simulator.set_generator_voltage_reference_in_pu(gen, new_vref)  

set_generator_mechanical_power_reference_in_pu

Format: set_generator_mechanical_power_reference_in_pu(generator, value)
Description: Set generator mechanical power reference of turbine governor model. If there is no turbine governor model for the generator, nothing will be changed.
Args:

(1) generator: Generator device id in format of (bus, ickt).
(2) value: New mechanical power reference in pu based on generator MBASE.

Rets: N/A

Example:

gen = (1, "#1")  
pref = simulator.get_generator_mechanical_power_reference_in_pu(gen)  
new_pref = pref + 0.1  
simulator.set_generator_mechanical_power_reference_in_pu(gen, new_pref)  

set_generator_mechanical_power_reference_in_MW

Format: set_generator_mechanical_power_reference_in_MW(generator, value)
Description: Set generator mechanical power reference of turbine governor model. If there is no turbine governor model for the generator, nothing will be changed.
Args:

(1) generator: Generator device id in format of (bus, ickt).
(2) value: New mechanical power reference in MW.

Rets: N/A

Example:

gen = (1, "#1")  
pref = simulator.get_generator_mechanical_power_reference_in_MW(gen)  
new_pref = pref + 10  
simulator.set_generator_mechanical_power_reference_in_MW(gen, new_pref)  

get_generator_excitation_voltage_in_pu

Format: get_generator_excitation_voltage_in_pu(generator)
Description: Get generator excitation voltage.
Args:

(1) generator: Generator device id in format of (bus, ickt).

Rets:

(1) Excitation voltage in pu.

Example:

gen = (1, "#1")  
efd = simulator.get_generator_excitation_voltage_in_pu(gen)  

get_generator_mechanical_power_in_pu

Format: get_generator_mechanical_power_in_pu(generator)
Description: Get generator mechanical power.
Args:

(1) generator: Generator device id in format of (bus, ickt).

Rets:

(1) Mechanical power in pu based on generator MBASE.

Example:

gen = (1, "#1")  
pmech = simulator.get_generator_mechanical_power_in_pu(gen)  

get_generator_mechanical_power_in_MW

Format: get_generator_mechanical_power_in_MW(generator)
Description: Get generator mechanical power.
Args:

(1) generator: Generator device id in format of (bus, ickt).

Rets:

(1) Mechanical power in MW.

Example:

gen = (1, "#1")  
pmech = simulator.get_generator_mechanical_power_in_MW(gen)  

set_generator_excitation_voltage_in_pu

Format: set_generator_excitation_voltage_in_pu(generator, value)
Description: Set generator excitation voltage. If exciter model exists for the generator, nothing will be changed.
Args:

(1) generator: Generator device id in format of (bus, ickt).
(2) value: New excitation voltage in pu.

Rets: N/A

Example:

gen = (1, "#1")  
efd = simulator.get_generator_excitation_voltage_in_pu(gen)  
new_efd = efd + 0.1  
simulator.set_generator_excitation_voltage_in_pu(gen, new_efd)  

set_generator_mechanical_power_in_pu

Format: set_generator_mechanical_power_in_pu(generator, value)
Description: Set generator mechanical power. If turbine governor model exists for the generator, nothing will be changed.
Args:

(1) generator: Generator device id in format of (bus, ickt).
(2) value: New mechanical power in pu based on generator MBASE.

Rets: N/A

Example:

gen = (1, "#1")  
pmech = simulator.get_generator_mechanical_power_in_pu(gen)  
new_pmech = pmech + 0.05  
simulator.set_generator_mechanical_power_in_pu(gen, new_pmech)  

set_generator_mechanical_power_in_MW

Format: set_generator_mechanical_power_in_MW(generator, value)
Description: Set generator mechanical power. If turbine governor model exists for the generator, nothing will be changed.
Args:

(1) generator: Generator device id in format of (bus, ickt).
(2) value: New mechanical power in MW.

Rets: N/A

Example:

gen = (1, "#1")  
pmech = simulator.get_generator_mechanical_power_in_MW(gen)  
new_pmech = pmech + 10  
simulator.set_generator_mechanical_power_in_MW(gen, new_pmech)  

get_hvdc_power_order_in_MW

Format: get_hvdc_power_order_in_MW(hvdc)
Description: Get HVDC link power order.
Args:

(1) hvdc: HVDC link device id in format of (ibus, jbus, ickt).

Rets:

(1) Power order in MW.

Example:

hvdc = (1,2,"DC link 1")  
order = simulator.get_hvdc_power_order_in_MW(hvdc)  

set_hvdc_power_order_in_MW

Format: set_hvdc_power_order_in_MW(hvdc, value)
Description: Set HVDC link power order.
Args:

(1) hvdc: HVDC link device id in format of (ibus, jbus, ickt).
(2) value: New power order in MW.

Rets: N/A

Example:

hvdc = (1,2,"DC link 1")  
order = simulator.get_hvdc_power_order_in_MW(hvdc)  
new_order = order+100  
simulator.set_hvdc_power_order_in_MW(hvdc, new_order)  
Clone this wiki locally