Calculating RMS of Fundamental Component for Unknown Periodic Input Signal

In summary, the conversation discusses the calculation of the RMS for the fundamental component of an unknown periodic input signal. The implication is that 50μs sampling is sufficient to accurately represent the waveform. The task is desired to be performed in software every 50μs timestep, with the limitation that the code must be executed to completion within that time frame. The source of the signal could be a simulated circuit or a control system. However, there is a contradiction in trying to calculate the RMS value in real-time for a signal with a longer period. Suggestions are made to redefine "real-time" and to use a low pass filter to calculate the fundamental component. It is also suggested to have the user provide the frequency of their signal for better
Engineering news on Phys.org
  • #37
If you don't know about the noise, then whatever you calculate may be completely meaningless.

Your simulation seems to assume that the signals are sinusoidal and of fixed frequency, which contradicts what you say about lack of knowledge about the signals.

I see don't see in the code where you are taking the mean (average) of the squares of all the samples in one or more whole cycles. RMS means square root of the MEAN of the squares. Did you understand that part?

You also never answered the question about what the application is. Please don't post again until you answer that.

Your earlier answer as to why fundamental component sounds bogus.

I think that you and perhaps the person giving you the requirements are in over your heads. You should hire an engineer to straighten it out. The purpose of this forum is not to read and debug your code.
 

Similar threads

Replies
11
Views
2K
Replies
18
Views
4K
Replies
5
Views
2K
Replies
4
Views
1K
Replies
63
Views
6K
Replies
4
Views
1K
Replies
4
Views
7K
Back
Top