DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
dss::obj::ExpControl Class Reference
Inheritance diagram for dss::obj::ExpControl:
[legend]
Collaboration diagram for dss::obj::ExpControl:
[legend]

Classes

struct  Properties
 

Public Member Functions

 ExpControl (APIUtil *util=nullptr, void *ptr_=nullptr)
 Create wrapper directly by a given object handle/pointer.
 
 ExpControl (APIUtil *util, int32_t idx)
 Create a wrapper for an element given by the integer index "idx".
 
 ExpControl (APIUtil *util, char *name)
 Create a wrapper for an element given its name.
 
const char * name ()
 Returns the object's name.
 
ExpControlbegin_edit ()
 Marks an object for edition. More...
 
ExpControlend_edit (int32_t num_edits=1)
 Finalizes an object edition. More...
 
strings PVSystemList ()
 Array list of PVSystems to be controlled. More...
 
ExpControlPVSystemList (strings &value)
 
double Vreg ()
 Per-unit voltage at which reactive power is zero; defaults to 1.0. More...
 
ExpControlVreg (double value)
 
double Slope ()
 Per-unit reactive power injection / per-unit voltage deviation from Vreg; defaults to 50. More...
 
ExpControlSlope (double value)
 
double VregTau ()
 Time constant for adaptive Vreg. More...
 
ExpControlVregTau (double value)
 
double Qbias ()
 Equilibrium per-unit reactive power when V=Vreg; defaults to 0. More...
 
ExpControlQbias (double value)
 
double VregMin ()
 Lower limit on adaptive Vreg; defaults to 0.95 per-unit. More...
 
ExpControlVregMin (double value)
 
double VregMax ()
 Upper limit on adaptive Vreg; defaults to 1.05 per-unit. More...
 
ExpControlVregMax (double value)
 
double QmaxLead ()
 Limit on leading (inductive) reactive power injection, in per-unit of base kva; defaults to 0.44.For Category A inverters per P1547/D7, set this value to 0.25. More...
 
ExpControlQmaxLead (double value)
 
double QmaxLag ()
 Limit on lagging (capacitive) reactive power injection, in per-unit of base kva; defaults to 0.44. More...
 
ExpControlQmaxLag (double value)
 
bool EventLog ()
 {Yes/True* | No/False} Default is No for ExpControl. More...
 
ExpControlEventLog (bool value)
 
double DeltaQ_factor ()
 Convergence parameter; Defaults to 0.7. More...
 
ExpControlDeltaQ_factor (double value)
 
bool PreferQ ()
 {Yes/True* | No/False} Default is No for ExpControl. More...
 
ExpControlPreferQ (bool value)
 
double Tresponse ()
 Open-loop response time for changes in Q. More...
 
ExpControlTresponse (double value)
 
strings DERList ()
 Alternative to PVSystemList for CIM export and import. More...
 
ExpControlDERList (strings &value)
 
double basefreq ()
 Base Frequency for ratings. More...
 
ExpControlbasefreq (double value)
 
bool enabled ()
 {Yes|No or True|False} Indicates whether this element is enabled. More...
 
ExpControlenabled (bool value)
 
ExpControllike (const string &value)
 Make like another object, e.g. More...
 
ExpControllike (const char *value)
 Make like another object, e.g. More...
 
- Public Member Functions inherited from dss::obj::DSSObj
 DSSObj (APIUtil *util=nullptr, void *ptr_=nullptr)
 

Static Public Attributes

static const char dss_cls_name [] = "ExpControl"
 
static const int32_t dss_cls_idx = 42
 

Additional Inherited Members

- Public Attributes inherited from dss::obj::DSSObj
APIUtilapi_util
 
void * ptr
 
- Protected Member Functions inherited from dss::obj::DSSObj
void check_for_error ()
 
void set_string (int32_t index, const string &value)
 
void set_string (int32_t index, const char *value)
 
string get_prop_string (int32_t index)
 
complex get_complex (int32_t index)
 
void set_complex (int32_t index, complex value)
 
void set_string_array (int32_t index, strings &value)
 
void set_obj (int32_t index, DSSObj &value)
 
template<typename T >
get_obj (int32_t index)
 
template<typename T = VectorXd>
get_array (int32_t index)
 
template<typename T = VectorXd>
void set_array (int32_t index, T value)
 
- Static Protected Member Functions inherited from dss::obj::DSSObj
template<typename T = VectorXd>
static void set_array (void *ptr, int32_t index, T value)
 
- Protected Attributes inherited from dss::obj::DSSObj
friend DSSBatch
 

Member Function Documentation

◆ basefreq()

double dss::obj::ExpControl::basefreq ( )
inline

Base Frequency for ratings.

DSS property name: basefreq, DSS property index: 15

◆ begin_edit()

ExpControl & dss::obj::ExpControl::begin_edit ( )
inline

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ DeltaQ_factor()

double dss::obj::ExpControl::DeltaQ_factor ( )
inline

Convergence parameter; Defaults to 0.7.

Sets the maximum change (in per unit) from the prior var output level to the desired var output level during each control iteration. If numerical instability is noticed in solutions such as var sign changing from one control iteration to the next and voltages oscillating between two values with some separation, this is an indication of numerical instability (use the EventLog to diagnose). If the maximum control iterations are exceeded, and no numerical instability is seen in the EventLog of via monitors, then try increasing the value of this parameter to reduce the number of control iterations needed to achieve the control criteria, and move to the power flow solution.

DSS property name: DeltaQ_factor, DSS property index: 11

◆ DERList()

strings dss::obj::ExpControl::DERList ( )
inline

Alternative to PVSystemList for CIM export and import.

However, storage is not actually implemented yet. Use fully qualified PVSystem names.

DSS property name: DERList, DSS property index: 14

◆ enabled()

bool dss::obj::ExpControl::enabled ( )
inline

{Yes|No or True|False} Indicates whether this element is enabled.

DSS property name: enabled, DSS property index: 16

◆ end_edit()

ExpControl & dss::obj::ExpControl::end_edit ( int32_t  num_edits = 1)
inline

Finalizes an object edition.

This will result more compelx side-effects like Yprim and other internal data recalculation, for example.

◆ EventLog()

bool dss::obj::ExpControl::EventLog ( )
inline

{Yes/True* | No/False} Default is No for ExpControl.

Log control actions to Eventlog.

DSS property name: EventLog, DSS property index: 10

◆ like() [1/2]

ExpControl & dss::obj::ExpControl::like ( const char *  value)
inline

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 17

◆ like() [2/2]

ExpControl & dss::obj::ExpControl::like ( const string &  value)
inline

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 17

◆ PreferQ()

bool dss::obj::ExpControl::PreferQ ( )
inline

{Yes/True* | No/False} Default is No for ExpControl.

Curtails real power output as needed to meet the reactive power requirement. IEEE1547-2018 requires Yes, but the default is No for backward compatibility of OpenDSS models.

DSS property name: PreferQ, DSS property index: 12

◆ PVSystemList()

strings dss::obj::ExpControl::PVSystemList ( )
inline

Array list of PVSystems to be controlled.

If not specified, all PVSystems in the circuit are assumed to be controlled by this ExpControl.

DSS property name: PVSystemList, DSS property index: 1

◆ Qbias()

double dss::obj::ExpControl::Qbias ( )
inline

Equilibrium per-unit reactive power when V=Vreg; defaults to 0.

Enter > 0 for lagging (capacitive) bias, < 0 for leading (inductive) bias.

DSS property name: Qbias, DSS property index: 5

◆ QmaxLag()

double dss::obj::ExpControl::QmaxLag ( )
inline

Limit on lagging (capacitive) reactive power injection, in per-unit of base kva; defaults to 0.44.

For Category A inverters per P1547/D7, set this value to 0.25.Regardless of QmaxLag, the reactive power injection is still limited by dynamic headroom when actual real power output exceeds 0%

DSS property name: QmaxLag, DSS property index: 9

◆ QmaxLead()

double dss::obj::ExpControl::QmaxLead ( )
inline

Limit on leading (inductive) reactive power injection, in per-unit of base kva; defaults to 0.44.For Category A inverters per P1547/D7, set this value to 0.25.

Regardless of QmaxLead, the reactive power injection is still limited by dynamic headroom when actual real power output exceeds 0%

DSS property name: QmaxLead, DSS property index: 8

◆ Slope()

double dss::obj::ExpControl::Slope ( )
inline

Per-unit reactive power injection / per-unit voltage deviation from Vreg; defaults to 50.

Unlike InvControl, base reactive power is constant at the inverter kva rating.

DSS property name: Slope, DSS property index: 3

◆ Tresponse()

double dss::obj::ExpControl::Tresponse ( )
inline

Open-loop response time for changes in Q.

The value of Q reaches 90% of the target change within Tresponse, which corresponds to a low-pass filter having tau = Tresponse / 2.3026. The behavior is similar to LPFTAU in InvControl, but here the response time is input instead of the time constant. IEEE1547-2018 default is 10s for Catagory A and 5s for Category B, adjustable from 1s to 90s for both categories. However, the default is 0 for backward compatibility of OpenDSS models.

DSS property name: Tresponse, DSS property index: 13

◆ Vreg()

double dss::obj::ExpControl::Vreg ( )
inline

Per-unit voltage at which reactive power is zero; defaults to 1.0.

This may dynamically self-adjust when VregTau > 0, limited by VregMin and VregMax.If imput as 0, Vreg will be initialized from a snapshot solution with no inverter Q.The equilibrium point of reactive power is also affected by Qbias

DSS property name: Vreg, DSS property index: 2

◆ VregMax()

double dss::obj::ExpControl::VregMax ( )
inline

Upper limit on adaptive Vreg; defaults to 1.05 per-unit.

DSS property name: VregMax, DSS property index: 7

◆ VregMin()

double dss::obj::ExpControl::VregMin ( )
inline

Lower limit on adaptive Vreg; defaults to 0.95 per-unit.

DSS property name: VregMin, DSS property index: 6

◆ VregTau()

double dss::obj::ExpControl::VregTau ( )
inline

Time constant for adaptive Vreg.

Defaults to 1200 seconds.

When the control injects or absorbs reactive power due to a voltage deviation from the Q=0 crossing of the volt-var curve, the Q=0 crossing will move toward the actual terminal voltage with this time constant. Over time, the effect is to gradually bring inverter reactive power to zero as the grid voltage changes due to non-solar effects. If zero, then Vreg stays fixed. IEEE1547-2018 requires adjustability from 300s to 5000s

DSS property name: VregTau, DSS property index: 4


The documentation for this class was generated from the following file: