0
$\begingroup$

I am analyzing the welch plot of an acceleration signal (that could be both positive and negative just like a sine wave). The welch plot of the signal is being made for two different cases, say A and B. Case A involves a control system design technique A, and case B involves a control system design technique B. Therefore, I am comparing PSD of acceleration signal between two different techniques.

The welch plot for the acceleration signal shows a lower DC value for case A as compared to case B. What does it indicate with respect to time domain? Does this indicate that some function of mean value of acceleration is lower in case A, or does it show that some function of absolute value of mean of acceleration in time domain is lower for case A as compared to B?

$\endgroup$
1
  • 1
    $\begingroup$ "amplitude at DC" and "mean of the signal" are basically the same thing. Your results show that the magnitude of the mean of signal A is lower than the mean of signal B. "does it show that some function of absolute value of mean of acceleration in time domain is lower for case A as compared to B?": yes. $\endgroup$
    – Hilmar
    Commented Aug 4 at 16:49

1 Answer 1

1
$\begingroup$

The OP's question is about the significance of the level at 0 Hz when the welch algorithm used does not remove the mean value from the signal (see further comments on that at end).

When the spectrum is selected to be two-sided, the level at 0 Hz, just like any other frequency, will be the power spectral density as an average over the resolution bandwidth (RBW, or similarly ENBW as "equivalent noise bandwidth") centered on that frequency. The level therefore is the mean of the squares as a power quantity. If there was a DC offset for example, as a tone centered on DC significantly higher than any other signal level including noise within the bandwidth around DC, the power displayed will be reduced by $10log_{10}(RBW)$ with $RBW$ as determined below. This means the welch functions will not return an accurate estimate for individual tones or signals with bandwidths less than RBW as I detail in DSP.SE #87723.

When the spectrum is selected to be one-sided (the default for real-valued signals), the above detail applies with regards to single tones, but also the value at 0 Hz will be -3 dB lower corresponding to the use of the Fourier Transform and FFT for returning one-sided vs two-sided spectrums (for one-sided spectrums corresponding to real signals, all components are doubled in power to account for both sides not including DC). If the number of samples in each segment is even it will be both the DC and Nyquist bin that are reduced by 3 dB for a one-sided spectrum, and if the number of samples in each segment is odd if will be only the DC bin (the DC bin corresponds to $f=0$ and the Nyquist bin corresponds to $f_s/2$ where $f_s$ is the sampling rate).

The RBW is set by the FFT block size and windowing used in the algorithm.

The RBW for any window is given by:

$$RBW = N \frac{\displaystyle\sum_{n=0}^{N-1} {w[n]^2}}{\left(\displaystyle\sum_{n=0}^{N-1} {w[n]}\right)^2}$$

Where $w[n]$ is the window coefficients, and $N$ is the size of the FFT (the 'nfft' parameter in Matlab's pwelch function).

As far as the automatic removal of the mean value: that depends which tool you are using, but some implementations of welch will remove the mean value. In the Octave documentation for example there is this note:

REMOVING MEAN FROM SIGNAL: If the mean is not removed from the signal there is a large spectral peak at zero frequency and the sidelobes of this peak are likely to swamp the rest of the spectrum. For this reason, the default behavior is to remove the mean. However, the matlab pwelch does not do this. (Python's scipy.signal and Octave have the option of using the parameter 'detrend=False' to not remove the mean)

$\endgroup$
2
  • $\begingroup$ I am using the matlab pwelch function, buy my question is different. Does the pwelch amplitude at 0 Hz depend on function of mean or absolute value of mean? $\endgroup$
    – ShiS
    Commented Aug 4 at 16:41
  • 1
    $\begingroup$ @ShiS see my update- the level is the mean of the square of the magnitudes. $\endgroup$ Commented Aug 6 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.