Dear community, at the moment I am reading the values of voltage curves using NI 9242 module. The whole system is a test bed for synchronous generator which works in the island mode, but it also should be able to connect to a stiff grid (for the sake of experiment). The 9242 is working really good, so I can see frequency fluctuations in the grid - the actual value of voltage frequency is deviating between (approximately) 49.97 and 50.02 Hz (that is in Munich, if you are interested). Because frequency is varying the phase of the signal also varies. So my question is:
what technique should I use to receive a mean value of sine wave curve, and so to have a stable phase and frequency of the grid? Should it be some filter, or smth else? I am a complete rookie in signal processing, so any ideas would help me.
Let's first review some of the terminology and concepts.
1 - When you say you want to measure the mean value of your sine curve you probably mean the 'amplitude' in V or 'level´ in Vrms. The mean value (Vdc) is probably 0 or negligible
2 - Phase is always a relative number. You measure your phase relative to a specific reference that you need to specify. It could for example be the phase of an ideal 50.00 Hz signal at a given time
But I think what you are asking is a VI that can measure the actual average frequency (over a few periods) and the amplitude or level of your signal.
Try to use the Extract Single Tone Information VI in your Signal Processing>>Wfm Measure palette. The VI returns the frequency of the fundamental signal (approx 50 Hz) the amplitude of that fundamental and the phase relative to the beginning of your input signal.
From there you can derive different values of interest. Note that the amplitude is for the fundamental tone of 50 Hz only.
- If you need the RMS value of the fundamental only just divide the amplitude value by SQRT(2)
- If you need the amplitude of your entire waveform the simpleste is to find the min and max value in your data and calculate (Vmax-Vmin)/2. This may be sensitive to noise in your signal. You may consider adding low-pass filtering to remove part of the noise.
- If you need the RMS value of the entire signal (not just the 50 Hz fundamental) you should use the Basic DC-RMS VI in the same palette. Select Hanning window to get a stable result.
The length of the signal you analyze should be long enough to return stable values (except for phase that likely will jump around) but short enough to not be affected by frequency drift. I expect record lengths of 100 ms to 1 s would work fine.