S
server
Guest
On Sat, 17 Oct 2020 07:28:55 -0700 (PDT), Gold_Spark
<bluelectronx@gmail.com> wrote:
Why not sample at your 6 KHz and software lowpass filter? Output a new
smoothed value every ADC sample, 6K times a second. That may well be
more representative of whatever process you have that matters. It\'s
easy, too.
--
John Larkin Highland Technology, Inc
Science teaches us to doubt.
Claude Bernard
<bluelectronx@gmail.com> wrote:
On Thursday, October 15, 2020 at 11:01:02 PM UTC-4, Gold_Spark wrote:
My question is based on this paper: http://www.eletrica.ufpr.br/edu/artigos/CIL22-012_final_gerson.pdf
They claim to calculate RMS with non-integer number of samples to improve accuracy over half cycle or one cycle RMS.
In my case for one cycle I can\'t have an integer N that matches both 50 and 60 Hz and possible fluctuations. In the microcontroller, the plan I have is to set an ADC triggered by a timer for a fixed sampling frequency, say 6 kHz.. I can also use DMA or double buffer approach if needed.
What do you think of the approach of the paper? I\'m open to other suggestions regarding the proper way to sample the signal for a one cycle RMS. I know that if I increase the number of cycles I can find an integer sample time period that matches both 50/60 Hz, but the point is that I need RMS per one cycle. Does not need to be so precise, even integer RMS is Ok.
Some caveat:
1. In the hardware, the signal is shifted with a DC value to match the ADC positive values. For example, my ADC reads 0-3.3V, then the signal swings around 3.3/2. This DC value is pretty stable so averaging it and subtract from the reading works.
I didn\'t provide much details, but basically my application is to detect leakage currents (earth) in the order of mAs, that\'s why I wanted fast detection. I\'ve seen some methods that use peak detection. It is right that peak detection offers the quickest response, but not necessarily a reliable one. I don\'t know how distorted my current waveforms are, but I certainly would not want to assume they are perfect sine waves in which peak values may not be easy to find. Maybe an average point by point could help get better peak approximation. At the end, that is why I thought of finding RMS per cycle since it could yield a more reliable result.
Why not sample at your 6 KHz and software lowpass filter? Output a new
smoothed value every ADC sample, 6K times a second. That may well be
more representative of whatever process you have that matters. It\'s
easy, too.
--
John Larkin Highland Technology, Inc
Science teaches us to doubt.
Claude Bernard