# RMS of signal vs average amplitude

I am trying to estimate the average amplitude of some signal with frequency 6 Hz, sampled at ~300 Hz. See figures for a part of the signal and its dft calculated using matlab.

I estimate the average amplitude of the signal by calculating its root mean square,

>> rms(signal)

ans =

5.1651


However, when looking at the signal (see first figure), it is very clear the mean amplitude is slightly greater than ~5, and is probably closer to ~8. Summing the peak amplitude in the frequency domain and its first few aliases results in the same value (~5).

What am I doing wrong here? How to properly estimate the signal average amplitude from its dft?

• As a rough comparison, the RMS of a pure tone is 0.707 of its amplitude. So, divide your 5 by it and you get 7.07. (Challenge: Where does the 707 come from and why does it repeat?) Likewise, double your DFT magnitude for that bin and you get roughly the same answer. – Cedron Dawg Jun 28 '20 at 2:04
• Nah, that's all there is to it. $$0.707 \approx \frac{1}{\sqrt{2}}$$ $$\frac{5}{0.707} \approx \frac{ \frac{10}{2} }{ \frac{1}{\sqrt{2}}} = 10 \frac{1}{\sqrt{2}}$$ 10 times makes the repeat. – Cedron Dawg Jun 28 '20 at 2:15
• Yeah, I was trying to make a few guesses but realized they don't make sense. Thanks again! – liorr Jun 28 '20 at 2:16
• You are most welcome. You seem to have a good attitude about this stuff so keep up the good work. – Cedron Dawg Jun 28 '20 at 2:18
• In case you didn't know, doubling the magnitude of the bin to get the amplitude only works if your tone has a whole number of cycles in the frame. If not, a good approach is this dsprelated.com/showarticle/787.php, but it is a lot easier just to frame a whole number of cycles (at least five). If you try the approach in the article, I recommend that you "unfurl" the vectors like I do here: dsprelated.com/showarticle/1284.php. – Cedron Dawg Jun 28 '20 at 2:30