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

  • Electrical Engineering
Replies
11
Views
3K
  • Electrical Engineering
Replies
18
Views
4K
  • Electrical Engineering
Replies
11
Views
1K
Replies
2
Views
1K
  • Electrical Engineering
Replies
4
Views
789
  • Electrical Engineering
Replies
5
Views
2K
Replies
6
Views
3K
  • Electrical Engineering
2
Replies
63
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
6K
  • Electrical Engineering
Replies
4
Views
287
Back
Top