LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Weird behavior of CycleRMSAverage ()

Hello all, I am using CycleRMSAverage () function to calculate some parameters on voltage and current signals on a 50 Hz line.

Specifically, I am using StartTime parameter to calculate the phase shifting between the signals.

This works well most of the times, but in some occasion I get weird results; examining the signals in detail I seem to understand that in these cases the function triggers on a falling slope while function documentation clearly states that the parameter gives "The time of the rising midRefLevel crossing that defines the start of the measurement interval."

 

In this picture I have marked with a purple dot the StartTime point for each curve and you can see that on the blue line (voltage) the dot is on the falling slope:

Screenshot 2023-03-08 16.57.15.png

 

Has anybody already seen this behavior? What can be the reason and how I can correct it?

I am using CVI2017 with a USB-6210 DAQ card.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 1 of 3
(1,024 Views)

Both waveforms look quite smooth for 50Hz electrical signals; is there any smoothing occuring before plotting?

Have you looked for spikes/runt pulses in your analogue input signal? Unless you specifically look for them you will not find them?

 

0 Kudos
Message 2 of 3
(909 Views)

Yes, I have applied a low-pass filter before trying to calculate the phase shifting.

Voltage curve is quite clean, while the current depends on a R-L-C load that gives a very disturbed signal, hence the need for filtering. FYI this is how the original signal appears before any processing:

RLC load.png

It seems strange to me that most of the times the slope fault occurs on the voltage signal which is clean even before filtering.

Anyway I have developed a personal algorithm to address this issue as I had no success in understanding the reason for this anomaly.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 3
(891 Views)