MycilaJSY 13.0.0
Arduino / ESP32 library for the JSY1031, JSY-MK-163, JSY-MK-193, JSY-MK-194, JSY-MK-227, JSY-MK-229, JSY-MK-333 families single-phase and three-phase AC bidirectional meters from Shenzhen Jiansiyan Technologies Co, Ltd.
Loading...
Searching...
No Matches
Mycila::JSY::Metrics Class Reference

Public Member Functions

float thdi (float phi=1) const
 Compute the total harmonic distortion of current (THDi). See: https://fr.electrical-installation.org/frwiki/Indicateur_de_distorsion_harmonique_:_facteur_de_puissance.
 
float resistance () const
 Compute the resistance of the load in ohms (R = P / I^2).
 
float dimmedVoltage () const
 Compute the dimmed voltage (V = P / I).
 
float nominalPower () const
 Compute the nominal power of the load in watts (P = V^2 / R).
 
void clear ()
 
bool operator== (const Metrics &other) const
 
bool operator!= (const Metrics &other) const
 
Metricsoperator+= (const Metrics &other)
 
void operator= (const Metrics &other)
 

Data Fields

float frequency = NAN
 Frequency in hertz (Hz).
 
float voltage = NAN
 Voltage in volts (V).
 
float current = NAN
 Current in amperes (A).
 
float activePower = NAN
 Active power in watts (W).
 
float powerFactor = NAN
 Power factor.
 
float apparentPower = NAN
 Apparent power in volt-amperes (VA).
 
float reactivePower = NAN
 Reactive power in volt-amperes reactive (VAr).
 
float activeEnergy = NAN
 Active energy in kilowatt-hours (kWh).
 
float activeEnergyImported = NAN
 Active energy imported in kilowatt-hours (kWh), going to the load, when activePower > 0.
 
float activeEnergyReturned = NAN
 Active energy returned in kilowatt-hours (kWh), coming from the load, when activePower < 0.
 
float reactiveEnergy = NAN
 Reactive energy in kilovolt-amperes reactive-hours (kVArh).
 
float reactiveEnergyImported = NAN
 Reactive energy imported in kilovolt-amperes reactive-hours (kVArh), going to the load, when reactivePower > 0.
 
float reactiveEnergyReturned = NAN
 Reactive energy returned in kilovolt-amperes reactive-hours (kVArh), coming from the load, when reactivePower < 0.
 
float apparentEnergy = NAN
 Apparent energy in kilovolt-amperes-hours (kVAh).
 

Detailed Description

Definition at line 125 of file MycilaJSY.h.

Member Function Documentation

◆ clear()

void Mycila::JSY::Metrics::clear ( )

Definition at line 20 of file MycilaJSYMetrics.cpp.

◆ dimmedVoltage()

float Mycila::JSY::Metrics::dimmedVoltage ( ) const

Compute the dimmed voltage (V = P / I).

Note
The dimmed voltage is the voltage that would be measured at the output of a TRIAC, SSR or voltage regulator device.

Definition at line 16 of file MycilaJSYMetrics.cpp.

◆ nominalPower()

float Mycila::JSY::Metrics::nominalPower ( ) const

Compute the nominal power of the load in watts (P = V^2 / R).

Note
The voltage is the nominal voltage measured by the JSY and R is the measured resistance of the load, which can be regulated by a TRIAC, SSR or voltage regulator.

Definition at line 18 of file MycilaJSYMetrics.cpp.

◆ operator!=()

bool Mycila::JSY::Metrics::operator!= ( const Metrics & other) const
inline

Definition at line 249 of file MycilaJSY.h.

◆ operator+=()

Mycila::JSY::Metrics & Mycila::JSY::Metrics::operator+= ( const Metrics & other)

Definition at line 54 of file MycilaJSYMetrics.cpp.

◆ operator=()

void Mycila::JSY::Metrics::operator= ( const Metrics & other)

Definition at line 71 of file MycilaJSYMetrics.cpp.

◆ operator==()

bool Mycila::JSY::Metrics::operator== ( const Metrics & other) const

Definition at line 37 of file MycilaJSYMetrics.cpp.

◆ resistance()

float Mycila::JSY::Metrics::resistance ( ) const

Compute the resistance of the load in ohms (R = P / I^2).

Definition at line 14 of file MycilaJSYMetrics.cpp.

◆ thdi()

float Mycila::JSY::Metrics::thdi ( float phi = 1) const

Compute the total harmonic distortion of current (THDi). See: https://fr.electrical-installation.org/frwiki/Indicateur_de_distorsion_harmonique_:_facteur_de_puissance.

Parameters
phiThe phase shift angle in radians (1 for resistive load)
Returns
The total harmonic distortion of current (THDi)

Definition at line 7 of file MycilaJSYMetrics.cpp.

Field Documentation

◆ activeEnergy

float Mycila::JSY::Metrics::activeEnergy = NAN

Active energy in kilowatt-hours (kWh).

Note
JSY1031, JSY-MK-227, JSY-MK-229, JSY-MK-333: measured
JSY-MK-163, JSY-MK-193, JSY-MK-194: computed, sum of activeEnergyImported and activeEnergyReturned

Definition at line 176 of file MycilaJSY.h.

◆ activeEnergyImported

float Mycila::JSY::Metrics::activeEnergyImported = NAN

Active energy imported in kilowatt-hours (kWh), going to the load, when activePower > 0.

Note
JSY-MK-163, JSY-MK-193, JSY-MK-194, JSY-MK-227, JSY-MK-229, JSY-MK-333: measured
: For DC boards, matches the positive energy

Definition at line 183 of file MycilaJSY.h.

◆ activeEnergyReturned

float Mycila::JSY::Metrics::activeEnergyReturned = NAN

Active energy returned in kilowatt-hours (kWh), coming from the load, when activePower < 0.

Note
JSY-MK-163, JSY-MK-193, JSY-MK-194, JSY-MK-227, JSY-MK-229, JSY-MK-333: measured
: For DC boards, matches the negative energy

Definition at line 190 of file MycilaJSY.h.

◆ activePower

float Mycila::JSY::Metrics::activePower = NAN

Active power in watts (W).

Note
JSY1031, JSY-MK-163, JSY-MK-193, JSY-MK-194, JSY-MK-227, JSY-MK-229, JSY-MK-333

Definition at line 149 of file MycilaJSY.h.

◆ apparentEnergy

float Mycila::JSY::Metrics::apparentEnergy = NAN

Apparent energy in kilovolt-amperes-hours (kVAh).

Note
JSY-MK-333: measured

Definition at line 216 of file MycilaJSY.h.

◆ apparentPower

float Mycila::JSY::Metrics::apparentPower = NAN

Apparent power in volt-amperes (VA).

Note
JSY1031, JSY-MK-227, JSY-MK-229, JSY-MK-333: measured
JSY-MK-163, JSY-MK-193, JSY-MK-194: computed

Definition at line 162 of file MycilaJSY.h.

◆ current

float Mycila::JSY::Metrics::current = NAN

Current in amperes (A).

Note
JSY1031, JSY-MK-163, JSY-MK-193, JSY-MK-194, JSY-MK-227, JSY-MK-229, JSY-MK-333

Definition at line 143 of file MycilaJSY.h.

◆ frequency

float Mycila::JSY::Metrics::frequency = NAN

Frequency in hertz (Hz).

Note
JSY1031, JSY-MK-163, JSY-MK-193, JSY-MK-194, JSY-MK-227, JSY-MK-229, JSY-MK-333

Definition at line 131 of file MycilaJSY.h.

◆ powerFactor

float Mycila::JSY::Metrics::powerFactor = NAN

Power factor.

Note
JSY1031, JSY-MK-163, JSY-MK-193, JSY-MK-194, JSY-MK-227, JSY-MK-229, JSY-MK-333

Definition at line 155 of file MycilaJSY.h.

◆ reactiveEnergy

float Mycila::JSY::Metrics::reactiveEnergy = NAN

Reactive energy in kilovolt-amperes reactive-hours (kVArh).

Note
JSY-MK-227, JSY-MK-229, JSY-MK-333: measured

Definition at line 196 of file MycilaJSY.h.

◆ reactiveEnergyImported

float Mycila::JSY::Metrics::reactiveEnergyImported = NAN

Reactive energy imported in kilovolt-amperes reactive-hours (kVArh), going to the load, when reactivePower > 0.

Note
JSY-MK-227, JSY-MK-229, JSY-MK-333: measured
: For DC boards, matches the positive energy

Definition at line 203 of file MycilaJSY.h.

◆ reactiveEnergyReturned

float Mycila::JSY::Metrics::reactiveEnergyReturned = NAN

Reactive energy returned in kilovolt-amperes reactive-hours (kVArh), coming from the load, when reactivePower < 0.

Note
JSY-MK-227, JSY-MK-229, JSY-MK-333: measured
: For DC boards, matches the negative energy

Definition at line 210 of file MycilaJSY.h.

◆ reactivePower

float Mycila::JSY::Metrics::reactivePower = NAN

Reactive power in volt-amperes reactive (VAr).

Note
JSY1031, JSY-MK-227, JSY-MK-229, JSY-MK-333: measured
JSY-MK-163, JSY-MK-193, JSY-MK-194: computed and always be positive since we do not know the phase shift angle (inductive or capacitive load)

Definition at line 169 of file MycilaJSY.h.

◆ voltage

float Mycila::JSY::Metrics::voltage = NAN

Voltage in volts (V).

Note
JSY1031, JSY-MK-163, JSY-MK-193, JSY-MK-194, JSY-MK-227, JSY-MK-229, JSY-MK-333

Definition at line 137 of file MycilaJSY.h.


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