DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
|
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. | |
ExpControl & | begin_edit () |
Marks an object for edition. More... | |
ExpControl & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
strings | PVSystemList () |
Array list of PVSystems to be controlled. More... | |
ExpControl & | PVSystemList (strings &value) |
double | Vreg () |
Per-unit voltage at which reactive power is zero; defaults to 1.0. More... | |
ExpControl & | Vreg (double value) |
double | Slope () |
Per-unit reactive power injection / per-unit voltage deviation from Vreg; defaults to 50. More... | |
ExpControl & | Slope (double value) |
double | VregTau () |
Time constant for adaptive Vreg. More... | |
ExpControl & | VregTau (double value) |
double | Qbias () |
Equilibrium per-unit reactive power when V=Vreg; defaults to 0. More... | |
ExpControl & | Qbias (double value) |
double | VregMin () |
Lower limit on adaptive Vreg; defaults to 0.95 per-unit. More... | |
ExpControl & | VregMin (double value) |
double | VregMax () |
Upper limit on adaptive Vreg; defaults to 1.05 per-unit. More... | |
ExpControl & | VregMax (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... | |
ExpControl & | QmaxLead (double value) |
double | QmaxLag () |
Limit on lagging (capacitive) reactive power injection, in per-unit of base kva; defaults to 0.44. More... | |
ExpControl & | QmaxLag (double value) |
bool | EventLog () |
{Yes/True* | No/False} Default is No for ExpControl. More... | |
ExpControl & | EventLog (bool value) |
double | DeltaQ_factor () |
Convergence parameter; Defaults to 0.7. More... | |
ExpControl & | DeltaQ_factor (double value) |
bool | PreferQ () |
{Yes/True* | No/False} Default is No for ExpControl. More... | |
ExpControl & | PreferQ (bool value) |
double | Tresponse () |
Open-loop response time for changes in Q. More... | |
ExpControl & | Tresponse (double value) |
strings | DERList () |
Alternative to PVSystemList for CIM export and import. More... | |
ExpControl & | DERList (strings &value) |
double | basefreq () |
Base Frequency for ratings. More... | |
ExpControl & | basefreq (double value) |
bool | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
ExpControl & | enabled (bool value) |
ExpControl & | like (const string &value) |
Make like another object, e.g. More... | |
ExpControl & | like (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 | |
APIUtil * | api_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 > | |
T | get_obj (int32_t index) |
template<typename T = VectorXd> | |
T | 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 |
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 15
|
inline |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
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
|
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
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 16
|
inline |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
inline |
{Yes/True* | No/False} Default is No for ExpControl.
Log control actions to Eventlog.
DSS property name: EventLog, DSS property index: 10
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 17
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 17
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
inline |
Upper limit on adaptive Vreg; defaults to 1.05 per-unit.
DSS property name: VregMax, DSS property index: 7
|
inline |
Lower limit on adaptive Vreg; defaults to 0.95 per-unit.
DSS property name: VregMin, DSS property index: 6
|
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