# Why the RMS of a PSD curve is the root of the area below

I will try to explain what is my level of understanding of this problem, please correct me if I'm wrong:

1. RMS is the Root Mean Square, it represent the mean value of the input signal.
2. PSD is the measurement of the responses that shows me at which frequencies most of the energy is concentrated.
3. The area below a curve is the integration of that function.

My situation is that several random vibration tests are performed. These tests are called random tests because of the input signal. In contrast to a sine test where the structure is excited with a sinusoidal input, only one frequency is excited at a time, here 'all' frequencies are excited at the same time.

In this case PSD is measured in ${{g^2}/{Hz}}$ and RMS in ${g_{RMS}}$. Armed with that it easy to see that if you multiply PSD per the frequency range and you take the root of the result you will get something in ${g}$'s, but I don't know how exactly derive the famous relation:

$${g_{RMS}=\sqrt{\int_{f_1}^{f_2}PSD(f)df}}$$

The understanding that I have is very basic and it would be great if someone give me a clear idea of the relations among the RMS, PSD and the real signal. Thank you very much.

In the figure I have plotted a standard random signal.

• Can you point to a paper or book you're referencing? Some of these definitions seem a bit odd. Oct 21, 2013 at 22:07
• It would be nice to have a paper or some basics of this subject! I know that relation only because of the software that we are using, but I can't understand why is that. That's why I need a bit of help. Oct 21, 2013 at 23:23
• the basics, single carrier, are concisely explained here ab4oj.com/test/pwrmeas.html Nov 26, 2022 at 18:36
• this one too is well explained blog.minicircuits.com/… Nov 26, 2022 at 18:41

I think this is simply an aspect of Parseval's Theorem (e.g. click me)

It simply says: sum of squares in the discrete (digital) time domain equals sum of squares in the discrete frequency domain. Substitute "sum" for "integral" if using the continuous (analog) domain. In other words: total energy in the time domain equals total energy in the frequency domain.

This can easily reproduce your formula, $$g_{RMS}$$ represents the time domain energy and the integral on the right represents the energy in the frequency domain. The exact scaling depends on the details like length of the signal, periodicity, sample rate, etc.

• Beat me to the punch! :-)
– Peter K.
Oct 21, 2013 at 23:34
• @Jazzmaniac I'm curious if you still deem it applicable (can screenshot) Feb 24, 2023 at 16:56
• @OverLordGoldDragon My contribution to this question has been deleted after it was rectified in the original question. So I'm not sure what you're referring to. Feb 25, 2023 at 17:09

Let's just visualise what we get from the fourier transform of a real signal consisting of real cos frequencies only, in this case $$A_c\cos(ct)$$, within a centred rect window of length $$T$$. $$A_{\omega}$$ is the amplitude of the frequency component $$\cos(\omega t)$$, which is equal to $$A_c$$ at $$\omega = c$$ and $$0$$ everywhere else.

$$X(\omega) = rA_{\omega}T + |\text{sgn}(\omega-c)|A_c\int_{-\frac{T}{2}}^{\frac{T}{2}} \cos(ct)\cos(\omega t) dt$$ $$=rA_{\omega}T + A_c|\text{sgn}(\omega-c)|\left(\frac{\sin(\frac{T}{2}(\omega-c))}{\omega-c}+\frac{\sin(\frac{T}{2}(\omega+c))}{\omega+c}\right)$$ $$= A_c \left(\frac{\sin(\frac{T}{2}(\omega-c))}{\omega-c} + \frac{\sin(\frac{T}{2}(\omega+c))}{\omega+c}\right)$$

At an orthogonal frequency, the amplitude of the sinc can be simplified to $$\frac{A_{\omega}T}{2}$$ i.e. $$r=\frac{1}{2}$$ for nonzero frequencies and $$A_{\omega}T$$ i.e. $$r=1$$ for 0 frequency, because there is no interference from the negative frequency domain or another sinc from another frequency component, i.e. it is orthogonal to itself and other frequency components (sincs).

The area under this is clearly $$2\pi A_c$$ as the area under each sinc is $$\pi A_c$$

The fourier transform:

$$\int_{-\infty}^{\infty}X(\omega) e^{i\omega t'}~d\omega = 2\pi x(t')$$

The magnitude of the continuous periodogram (PSD) of a single frequency domain component is:

$$P_{xx}(\omega) = \frac{1}{T}\left|rA_{\omega}T + A_c|\text{sgn}(\omega-c)|\left(\frac{\sin(\frac{T}{2}(\omega-c))}{\omega-c}+\frac{\sin(\frac{T}{2}(\omega+c))}{\omega+c}\right)\right|^2$$

At an orthogonal frequency, this can be simplifed to:

$$\frac{1}{T}\left|rA_{\omega}T +0\right|^2$$ $$={r^2|A_{\omega}}|^2T$$ $$=rP_{\omega}T$$ $$=rE_{\omega}$$

And similarly the ESD can be simplified to $$rE_{\omega}T$$.

The area under the continuous periodogram is:

$$\int_{-\infty}^{\infty}P_{xx}(\omega)~d\omega = 2\pi{P_{\omega}}$$

The introduction of the $$2\pi$$ factor is explained here. Remember with the real signal, the negative frequency domain is a mirror image as there is an identical sinc at the negative frequency, and what crosses the origin from the positive frequency domain is identical to what crosses the origin from the negative frequency domain.

The fourier transform of a rect window $$R(\omega)$$ of amplitude $$A$$ is:

$$AR(\omega) = \int_{a}^{b} A e^{-i\omega t} dt = A\left(\frac{\sin (b\omega) - \sin (a\omega)}{\omega} + \frac{i(\cos (b\omega) - \cos (a\omega))}{\omega} \right)$$

The fourier transform of a cos wave within a rect window is:

$$\int_{a}^{b} A\cos(t) e^{-i\omega t} dt = \frac{1}{2\pi}\left(R(\omega) \star \frac{A}{2} (\delta (\omega-c) + \delta (\omega+c))\right)$$

$$=\frac{1}{2\pi}R(\omega)\star \frac{A}{2} (\delta (\omega-c) + \delta (\omega+c))$$

$$=\frac{1}{2\pi}\frac{A}{2} (R(\omega-c) + R(\omega+c))$$

The $$\frac{1}{2\pi}$$ factor here is to remove the $$2\pi$$ from one of the fourier transforms to make the identity hold, because the convolution will be off by a factor of $$4\pi^2$$ from the time domain, when it should only be $$2\pi$$

The fourier transform of a sin wave within a rect window is:

$$\int_{a}^{b} A\sin(t) e^{-i\omega t} dt = \frac{1}{2\pi}\frac{Ai}{2} (-R(\omega-c) + R(\omega+c))$$

If $$a=-b$$ then:

$$\int_{a}^{b} A\cos(t) e^{-i\omega t} dt =\frac{2\sin(a\omega)}{\omega} \star \frac{A}{2} (\delta (\omega-c) + \delta (\omega+c))$$

When the rect window is centred ($$a=-b$$) i.e. an even function, then all the maths in the first part of the answer holds, and the area under each sinc is clearly $$A\pi$$ for $$c\neq 0$$, and $$2A\pi$$ for $$c=0$$.

If $$a=0$$

$$\int_{a}^{b} A\cos(t) e^{-i\omega t} dt =\left(\frac{\sin(b\omega)}{\omega} +\frac{i(\cos (b\omega) - 1)}{\omega}\right) \star \frac{A}{2} (\delta (\omega-c) + \delta (\omega+c))$$

The rect window is not centred meaning an imaginary component appears. This is because the area under the $$-i\sin(\omega t)$$ in $$e^{-\omega t}$$ is no longer 0 at every frequency within every rect window width. The area under the real sinc is now is $$\frac{A\pi}{2}$$ for $$c\neq 0$$ and $$A\pi$$ for $$c=0$$. The area under the imaginary cosc convolved at the frequency of the cos or sin wave within the window is 0. For the case of $$a\neq b \neq 0$$, the total area under the 2 negated sincs is 0 ($$A\pi - A\pi$$), and the total area under the 2 negated coscs is 0 ($$0-0$$)

For a rect window of width $$T$$ and a signal $$x(t)$$ of period $$P(x)$$ (period of the minimum frequency component):

$$\left|\int_{b}^{b+aP(x)} x(t) e^{-i\omega t} dt\right| \equiv \left|\int_{-\frac{aP(x)}{2}}^{\frac{aP(x)}{2}} x(t) e^{-i\omega t} dt\right|, \forall a\in \mathbb{Z}, \forall b\in \mathbb{R}$$

The complex modulus of the fourier transform of the signal is the same for any window of the same length if the length is an integer multiple of the period of all frequency components in the signal. Therefore, the periodograms, $$\frac{|X(\omega)|^2}{T}$$, are also equal. Only equations for the amplitude of the periodogram and the area under the periodogram still hold when the window isn't centred.

If the window is not an integer multiple of the period of the signal then the complex modulus is different, and in order for it to be the same, the signal needs to be shifted along with the window, to the start of the window:

$$\left|\int_{b}^{b+T} x(t-b) e^{-i\omega t} dt\right| \equiv \left|\int_{0}^{T} x(t) e^{-i\omega t} dt\right|, \forall T\in \mathbb{R}, \forall b\in \mathbb{R}$$

For OFDM, the window begins at $$t=0$$, which means amplitude of a sinc in the frequency domain is half that of what it would be in a centred window, except the rightmost bound of the window is now double, meaning the sinc is double in amplitude, so the amplitude remains the same, and there is an imaginary cosc component which is 0 at the peak of the sinc. Both sinc and cosc are orthogonal to other sincs at $$\frac{2\pi}{T}$$ spacing in the $$\omega$$ frequency domain, where $$T$$ is the window width, the baud rate, regardless of where the window starts. When the window is centered or starts at 0, there is not another sinc component negating the amplitude. The sinc is always orthogonal at $$2\pi$$ divided by the full length of the window, but the window starting at 0 is additionally orthogonal $$2\pi$$ divided by double the full length of the window, when that is not the case with the centred window, but the cosc of a window starting at 0 is orthogonal at $$2\pi$$ divided by the full length of the window at the minimum. The window will always contain an integer multiple of the period of all frequencies in the signal so the periodogram will be the same. Because OFDM uses DFT, the exponential contains $$\frac{2\pi}{N}$$, which is $$\frac{2\pi T_s}{T}$$, i.e. $$\frac{2\pi}{T}$$ frequency domain spacing with $$T_s$$ time domain spacing.

$$X_k = \sum_{n=0}^{N-1} x_n e^{-i\frac{2\pi kn} {N}}$$

Frequency domain samples are at an angular frequency of $$\frac{2\pi kn}{N}$$ i.e. $$(k\frac{2\pi}{T})(nT_s)$$ i.e. $$k\frac{2\pi}{T}t$$ i.e. $$k\frac{2\pi}{T}$$ (removing the index of the time domain summation that produces the component at that frequency), therefore frequency domain intervals of $$\frac{2\pi}{T}$$ and time domain intervals of $$T_s$$.

The periodogram is the name of the PSD when $$T$$ is not infinite, i.e. the signal in the time domain is aperiodic and not a power signal, and is a single record in a WSS process (the PSD of the non-infinite signal is therefore the expected value of the periodogram). In the PSD of an infinite signal, $$T$$ is infinite and therefore the limit to infinity is used instead of the expected value. For a window of width $$2T$$, the PSD is:

$$P_{xx}(\omega) = \lim_{T\to\infty} \frac{1}{2T}|X_T(\omega)|^2$$

The discrete-time finite sample periodogram of a window of width $$T$$ is:

$$S_{xx}(k) = \frac{1}{N}\left|\sum_{n=0}^{N-1} x_n e^{-i\frac{2\pi kn} {N}}\right|^2$$ $$= \frac{1}{N}|X_k|^2$$

Where angular frequency is $$\frac{2\pi k}{T}$$.

Energy is the area under the square of the dirac deltas in the time domain but the core difference is that the average power is not the area under the square of the dirac deltas divided by the length of the signal but the area divided by the number of samples because samples are discrete numbers therefore the average power is the average of the discrete numbers. The space in between them is irrelevant and if it were filled out to rect pulses the width of the sampling period, it then would indeed have that average power.

Due to Parseval's theorem, the following is true (explained in the final paragraph) about $$E_s$$ which is the energy of the signal, i.e. the sum of the energy of the different frequencies in the signal:

$$E_s = \sum_{k=0}^{N-1}\left|x_n\right|^2 \equiv \frac{1}{N}\sum_{k=0}^{N-1}\left|\sum_{n=0}^{N-1} x_n e^{-i\frac{2\pi kn} {N}}\right|^2$$

$$= \frac{1}{N}\sum_{k=0}^{N-1}\left|X_k\right|^2$$

$$=\sum_{k=0}^{N-1}S_{xx}(k)$$

Indeed, the DFT of a rect window of height $$A$$ and width from $$t=0$$ to $$t=2$$ with $$T_s = 1$$ therefore $$N=3$$ samples at $$t=0$$, $$t=1$$ and $$t=2$$ is:

The sum of $$3A$$ and the 2 nulls is $$3A$$, squared is $$9A^2$$, divided by $$N=3$$ is $$3A^2$$, which is the same that you get from the sum of square of the 3 samples of the amplitude $$A$$ rect window in the time domain $$A^2$$ + $$A^2$$ + $$A^2$$ = $$3A^2$$.

The nulls occur at $$\frac{2\pi k}{T}$$ from $$k=0$$ to $$k=2$$, except there is a frequency component at 0 so it is the only non null; only 3 orthogonal frequency components can be present when you have only 3 samples. The sampling frequency is still $$\frac{2\pi}{T_s}$$. Therefore with $$T_s = 1$$, you can only sample angular frequencies of $$0$$, $$\frac{2\pi}{3}$$ and $$\frac{4\pi}{3}$$. In this instance $$\frac{2\pi}{N} = \frac{2\pi T_s}{T} (\frac {N-1}{N})$$, i.e. orthogonality is $$\frac{2\pi}{(N-1)T_s}$$ because $$\frac{T_s}{T} = \frac{1}{N-1}$$ in this instance, because the final sample in the window is used. In a continuous stream of symbols, the final sample in the window would form part of the next window (would be the first sample in the next symbol), and therefore this window only contains 2 samples, one at frequency 0 and the other at $$\frac{2\pi}{2}$$. Hence, in 802.11a, the window is 65 samples long, but only 64 are used, and the width of the window is $$64T_s$$, therefore $$\frac{2\pi}{N} = \frac{2\pi T_s}{T}$$. If the 65th sample were used then the DFT would be different to the CFT by $$\frac {N-1}{N}$$. The diagram above includes the final sample of the window, and the effect (result of the DFT) is as if the window is $$T+T_s$$ in length instead of $$T$$.

When you exclude the final sample of the window, the amplitude of the peak of the sinc in the frequency domain is $$\frac{AT}{T_s}$$ ($$T$$ coming from $$\sin(Tx)$$), which is therefore $$AN$$, when you do DFT/CFT, and the orthogonality is $$\frac{2\pi}{NT_s}$$. If you include the final sample in $$N$$, it is still $$AN$$, but if you did the CFT it would instead be equivalent to $$A(N-1)$$, with $$\frac{2\pi}{T_s(N-1)}$$ orthogonality.

The time domain spacing ($$T_s$$, sampling period) and frequency domain window ($$\frac{2\pi}{T_s}$$, sampling rate) detail can be abstracted away from the set of samples, such that in terms of the discrete samples, the spacing becomes $$1$$ in the time domain and $$N$$ in the frequency domain, and orthogonality becomes $$\frac{2\pi}{NT_s} = \frac{N}{N} = 1$$.

Because you use complex exponentials, the negative frequency component cancels out, and results in a single side lobe in the time domain, I.e. the window starting at $$t=0$$. There is no negative reflection that is convolved with it. When you perform the DFT, the time domain representation of the frequency domain samples is a convolution of the time domain origin at $$T$$ intervals and because there is no reflection at $$t=-T$$ to $$t=0$$ due to using complex exponentials, no destructive overlap occurs. The time samples are only a mirror image about the origin when there are less than 3 samples. When there are an even number of samples, the $$frac{N}{2}th$$ sample (index starting at 0) is always mirrored in the origin, because it is in the middle of the convolution interval of $$\frac{2\pi}{T_s}$$, and represented by the fact that all the samples of the $$i\sin$$ component at that frequency fall at $$0$$ amplitude in the time domain, meaning that the component at the negative frequency is not negated.

A discrete orthogonal frequency has a frequency domain amplitude of $$AN = \frac{AT}{T_s}$$ (if complex exponentials are not used in the signal then 0 frequency is $$AN$$ and the other orthogonal frequencies are $$\frac{AN}{2}$$), and a continuous frequency has a frequency domain amplitude of $$AT$$ at frequency 0 or if it is a complex exponential otherwise $$\frac{AT}{2}$$. A sinc at 0 frequency is orthogonal at 0 because the area underneath the time domain rect window that produces it multiplied by the unit rect window is obviously $$AT$$, and it is only orthogonal when the area under a frequency multiplied by the unit frequency within the window is equal to $$AT$$. The amplitude of the ESD is $$r|A|^2N^2 = rE_{\omega}N$$ and $$r|A|^2T^2 = rE_{\omega}T$$ respectively. The amplitude of the periodogram is $$r|A|^2N = rE_{\omega}$$ and $$r|A|^2T = rE_{\omega}$$. The area underneath the continuous periodogram is the average power of the signal even though it appears to be the continuous sum of the energies at each frequency giving the total energy. It instead gives the total power as it is not actually the sum of the energy at each frequency because it is only equal to energy at the orthogonal points, and at the rest of the frequencies it deviates from the energy of the frequency -- the area underneath just ends up being the average power of the signal. In the discrete periodogram case, because every frequency domain sample is orthogonal, when you perform the sum, you have a sum of energies at different frequencies, which actually does give the total energy and not average power. Therefore, to get power, you must divide by $$N$$ again, to get the power, which is why $$E_s$$ is the area under the discrete periodogram.

$$P_s = \frac{1}{N^2}\sum_{k=0}^{N-1}\left|X_k\right|^2$$

When you do a DFT of a real signal, you still get $$E_s$$ even though the frequency domain amplitude of the fourier transform is only $$\frac{AN}{2}$$ (except for the 0th sample, and the $$\frac{N}{2} th$$ sample (because it overlaps itself)). This is because the samples overlap, because you're convolving $$2N - 1$$ samples every $$N$$ samples, whereas with a exponential signal, you convolve $$N$$ samples every $$N$$ samples. The negative samples therefore overlap and are added to the posititve ones, for instance, for $$N=4$$ and $$T_s = 1$$, $$\cos(\frac{2\pi}{4})\cos(\frac{2\pi}{4}) = 2$$ but $$(\cos(\frac{2\pi}{4}) + \cos(\frac{6\pi}{4})) \cos(\frac{2\pi}{4}) = 4$$. This is of course useless though because this aliasing is destructive (except for a cos signal at the sample $$\frac{N}{2}$$ where it's exactly double rather than the sum of 2 different frequency components), so you need to double the sample rate for it to be useful. If you use only $$sin$$ instead of a cos or comple exponential, then as the negative frequency component is subtractive, you cannot recover $$E_s$$. In this case you'd have to double the sampling rate retaining the same frequency components to get a correct $$E_s$$ value, which is fine as the sampling rate needs to be doubled for the data to be useful anyway when it is not a complex exponential.

The frequency component is always the amplitude of the time domain complex exponential that would produce it, multiplied by $$N$$, which is why the IDFT needs a $$\frac{1}{N}$$ factor. A frequency domain amplitude of $$A_c N$$ corresponds to a complex exponential $$A_ce^{ict}$$, as $$A_ce^{ict}e^{-ict} = A_c\cos^2(ct)-A_ci^2\sin^2(ct) = A_c\cos^2(ct) + A_c\sin^2(ct)$$ produces $$\frac{A_cN}{2} + \frac{A_cN}{2} = A_cN$$ at $$\omega = c$$. $$A_c$$ can be any complex number. $$2A_c\cos(ct)$$ would also produce that amplitude at $$\omega = c$$.