Other Parts Discussed in Thread: TIDM-THDREADING
Tool/software: TI C/C++ Compiler
Dear all,
We are using EVM430-F6779 for power metering applications. Although we are getting correct values for Voltage, Current and power, we are facing issues with the VTHD and ITHD measurements. The raw value we are getting for ITHD measurements are 12217. We are unable to interpret the value. Could you please provide support in interpreting this value. Below are the details we are using for the code and application.
Code: TIDM-THDREADING
THD Measurement: IEC_THD_F_SUPPORT
Appliance: Variable Frequency Drives
Code snippet for the THD calculation (Using the default code and no changes were made, File name: metrology-foreground.c)
x = (int64_t) phase->readings.fundamental_V_rms*phase->readings.fundamental_V_rms; y = (int64_t) phase->readings.V_rms*phase->readings.V_rms; /* Prevent tiny errors in x and y from leading to tiny negative values for THD */ if (x >= y) return 0; z = y - x; #if defined(IEC_THD_F_SUPPORT) z = isqrt64(z); z /= phase->readings.fundamental_V_rms; z *= 10000; y = z >> 32; #endif
Kindly let us know if any information is needed.