Harmonic Analysis Command

When the Demo Meter application receives an HRR[n] command, it configures the metrology library to enable the harmonics computation and to calculate the data corresponding to the harmonic number n. Then, the metrology driver receives the data from the library and computes the rms currents and voltages of the selected harmonic, and sends the data back to Demo Meter application.

The following example computes the values for the 3rd harmonic:

HRR[3]
Irms_Har_A(A), bitmap: 0x00000004
0.000              0.000              0.057              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Irms_Har_B(A), bitmap: 0x00000004
0.000              0.000              0.029              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Irms_Har_C(A), bitmap: 0x00000004
0.000              0.000              0.028              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Irms_Har_N(A), bitmap: 0x00000004
0.000              0.000              0.004              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Vrms_Har_A(V), bitmap: 0x00000004
0.000              0.000              2.552              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Vrms_Har_B(V), bitmap: 0x00000004
0.000              0.000              1.262              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Vrms_Har_C(V), bitmap: 0x00000004
0.000              0.000              1.298              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000

If the HRR command is invoked without parameters, it calculates data for all available harmonics:

HRR
Irms_Har_A(A), bitmap: 0x7FFFFFFF
0.002              0.000              0.000              0.000
0.000              0.000              0.000              0.001
0.004              0.001              0.001              0.002
0.000              0.000              0.000              0.000
0.002              0.000              0.000              0.000
0.000              0.000              0.006              0.001
0.000              0.002              0.000              0.000
0.000              0.000              0.000
Irms_Har_B(A), bitmap: 0x7FFFFFFF
0.000              0.000              0.000              0.000
0.003              0.005              0.001              0.005
0.000              0.000              0.000              0.000
0.000              0.005              0.001              0.008
0.000              0.000              0.000              0.000
0.004              0.000              0.000              0.000
0.000              0.001              0.005              0.009
0.000              0.000              0.000
Irms_Har_C(A), bitmap: 0x7FFFFFFF
0.000              0.000              0.000              0.000
0.000              0.006              0.007              0.000
0.000              0.000              0.000              0.007
0.000              0.000              0.000              0.000
0.005              0.007              0.008              0.004
0.000              0.000              0.000              0.000
0.000              0.000              0.001              0.000
0.000              0.000              0.000
Irms_Har_N(A), bitmap: 0x7FFFFFFF
0.000              0.000              0.000              0.003
0.007              0.001              0.004              0.000
0.000              0.000              0.000              0.000
0.006              0.000              0.000              0.007
0.000              0.003              0.001              0.000
0.000              0.000              0.000              0.009
0.000              0.004              0.000              0.000
0.000              0.000              0.002
Vrms_Har_A(V), bitmap: 0x7FFFFFFF
0.000              0.000              0.000              0.000
0.000              0.000              0.003              0.009
0.000              0.002              0.000              0.000
0.004              0.000              0.000              0.004
0.000              0.000              0.007              0.000
0.002              0.004              0.000              0.002
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Vrms_Har_B(V), bitmap: 0x7FFFFFFF
0.000              0.000              0.002              0.000
0.000              0.005              0.000              0.000
0.004              0.000              0.007              0.002
0.000              0.000              0.000              0.000
0.000              0.004              0.000              0.002
0.000              0.000              0.000              0.000
0.002              0.005              0.001              0.005
0.000              0.000              0.000
Vrms_Har_C(V), bitmap: 0x7FFFFFFF
0.000              0.000              0.000              0.000
0.000              0.000              0.002              0.006
0.026              0.000              0.000              0.000
0.000              0.006              0.000              0.000
0.000              0.000              0.006              0.008
0.000              0.000              0.000              0.000
0.002              0.008              0.000              0.000
0.000              0.000              0.000
There is an extended version of this command, the HRRX command, which allows 2 new functionalities:
  • Start the analysis and computation of RMS values, and keep updating it on every integration period, until a new HRRX command with a specific parameter is received.
  • Perform the analysis and computation for any group of harmonics through a bitmap where each bit represents one harmonic order, LSb corresponding to the lowest order (first harmonic)

The following example shows the command to Start analysis (parameter ‘1’) for harmonics 3rd and 5th (parameter 00000014):

HRRX[1][00000014]
Irms_Har_A(A), bitmap: 0x00000014
0.000              0.000              0.057              0.000
0.025              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Irms_Har_B(A), bitmap: 0x00000014
0.000              0.000              0.029              0.000
0.013              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Irms_Har_C(A), bitmap: 0x00000014
0.000              0.000              0.028              0.000
0.012              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Irms_Har_N(A), bitmap: 0x00000014
0.000              0.000              0.004              0.000
0.002              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Vrms_Har_A(V), bitmap: 0x00000014
0.000              0.000              2.552              0.000
1.224              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Vrms_Har_B(V), bitmap: 0x00000014
0.000              0.000              1.262              0.000
0.631              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Vrms_Har_C(V), bitmap: 0x00000014
0.000              0.000              1.298              0.000
0.649              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000

To stop the Harmonic Analysis, the command HRRX is sent with parameter ‘0’ (Stop). The last computed values are printed again on the Console:

HRRX[0]
Irms_Har_A(A), bitmap: 0x00000014
0.000              0.000              0.057              0.000
0.025              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Irms_Har_B(A), bitmap: 0x00000014
0.000              0.000              0.029              0.000
0.013              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Irms_Har_C(A), bitmap: 0x00000014
0.000              0.000              0.028              0.000
0.012              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Irms_Har_N(A), bitmap: 0x00000014
0.000              0.000              0.004              0.000
0.002              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Vrms_Har_A(V), bitmap: 0x00000014
0.000              0.000              2.552              0.000
1.224              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Vrms_Har_B(V), bitmap: 0x00000014
0.000              0.000              1.262              0.000
0.631              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Vrms_Har_C(V), bitmap: 0x00000014
0.000              0.000              1.298              0.000
0.649              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000              0.000
0.000              0.000              0.000
Note: Between the HRRX[1][xxxxxxxx] printed output, and the HRRX[0] one, nothing is printed to the Console, all calculations are made by the Driver and sent to application, but no prints are made, to avoid overloads. User may decide to add code to handle every calculation in their own way. In the meantime, the Console can be used for different commands, it is not blocked.