#include <ElectricalModelEqns.h>
Classes | |
class | SensorInterface |
Public Member Functions | |
ElectricalModelEqns (ElectricalData *data, std::list< Sensor * > &sensors, bool no_events=false) | |
ElectricalModelEqns (ElectricalData *data, bool no_events=false) | |
~ElectricalModelEqns () | |
Destructor. | |
void | init (double *q, double *a) |
Adevs methods below. | |
void | alg_func (const double *q, const double *a, double *af) |
void | der_func (const double *q, const double *a, double *dq) |
void | state_event_func (const double *q, const double *a, double *z) |
double | time_event_func (const double *q, const double *a) |
void | internal_event (double *q, double *a, const bool *state_event) |
void | external_event (double *q, double *a, double e, const adevs::Bag< adevs::PortValue< BasicEvent * > > &xb) |
void | confluent_event (double *q, double *a, const bool *state_event, const adevs::Bag< adevs::PortValue< BasicEvent * > > &xb) |
void | output_func (const double *q, const double *a, const bool *state_event, adevs::Bag< adevs::PortValue< BasicEvent * > > &yb) |
void | postStep (double *q, double *a) |
void | gc_output (adevs::Bag< adevs::PortValue< BasicEvent * > > &gb) |
Complex | getVoltage (unsigned bus) |
Get the complex voltage at the specified bus. | |
double | getGenrFreq (unsigned genr_number, const double *q) |
Get the frequency in radians at the specified generator. | |
double | getRealGenrPower (unsigned genr_number, const double *q) |
Get the real power output of the specified generator. | |
bool | genrOffLine (unsigned genr_number) |
Is the generator offline? | |
double | getBusFreq (unsigned bus) |
Get the frequency at the specified load bus. | |
double | getVoltageWaveform (const double *q, unsigned bus) |
Complex | getLoadPower (unsigned bus) |
Get the real and reactive power consumed by the load at the bus. | |
ElectricalData * | getElectricalData () |
Get the electrical data associated with this model. | |
Static Public Attributes | |
static const int | LoadAdj = -5 |
static const int | SetLoad = -2 |
static const int | GenrTrip = -4 |
static const int | SensorOutput = -1 |
static const int | ACE = -3 |
static const int | LineAction = -6 |
This class contains the electrical and mechanical dynamics for the simulated power system.
Definition at line 16 of file ElectricalModelEqns.h.
ElectricalModelEqns::ElectricalModelEqns | ( | ElectricalData * | data, | |
std::list< Sensor * > & | sensors, | |||
bool | no_events = false | |||
) |
Create a model from the specified initial data. If the no_events flag is true, then discrete events will be disabled.
void ElectricalModelEqns::alg_func | ( | const double * | q, | |
const double * | a, | |||
double * | af | |||
) |
Calculate current injected at the loads. This model is based on the static load model described in "Standard Load Models for Power Flow and Dynamic Performance Simulation", IEEE Transactions on Power Systems. Vol. 10. No. 3, August 1995 and authored by the IEEE Task Force on Load Representation for Dynamic Performance.
Definition at line 317 of file ElectricalModelEqns.cpp.
References ElectricalData::getLoadParams().
double ElectricalModelEqns::getVoltageWaveform | ( | const double * | q, | |
unsigned | bus | |||
) |
Calculate the time varying voltage at bus b. This tries to approximate a single phase of the time varying voltage waveform at the bus.
BE CAREFUL! This method ASSUMES that the loads to not inject any current and therefore do not contribute to the sensed voltage waveform. If loads do inject current, then the voltage returned here will be very low.
Definition at line 208 of file ElectricalModelEqns.cpp.
References ElectricalData::getGenrParams(), and ElectricalData::getGenrs().
Referenced by ElectricalModel::getVoltageWaveform().
const int ElectricalModelEqns::ACE = -3 [static] |
Events on this port set Pref based on the current phase angle at the generators.
Definition at line 44 of file ElectricalModelEqns.h.
const int ElectricalModelEqns::GenrTrip = -4 [static] |
This input port is used to trip a generator offline. It accepts a GenrFailEvent object. The BusID should be the bus that the generator is attached to.
Definition at line 33 of file ElectricalModelEqns.h.
const int ElectricalModelEqns::LineAction = -6 [static] |
LineEvent objects on this port will add or remove a transmission line.
Definition at line 48 of file ElectricalModelEqns.h.
const int ElectricalModelEqns::LoadAdj = -5 [static] |
Input to the LoadAdj port must be a LoadAdjustEvent
Definition at line 23 of file ElectricalModelEqns.h.
const int ElectricalModelEqns::SensorOutput = -1 [static] |
This output port produce the Sensor object that was tripped. The Sensor is still owned by the ElectricalModel, but can be querried for its sensor reading by any device that receives the sensor as input.
Definition at line 39 of file ElectricalModelEqns.h.
const int ElectricalModelEqns::SetLoad = -2 [static] |
Input to the SetLoad port must be a LoadEvent
Definition at line 27 of file ElectricalModelEqns.h.