# Frequency resolution using pwelch

47 views (last 30 days)

Show older comments

Hi everyone,

i want to analyze the frequency domain of accelerometer data sets sampled at 500 kHz.

(figure: comparing different window-functions using pwelch with (in this case) windowlength=1024, nfft=1024, fs=500.000Hz, data length=100.000 samples)

When using the pwelch function in MATLAB i can use the windowlength (and a certain windowfunction of course) and the FFT-length as parameters affecting the frequency resolution. Looking at the figure above i'm facing two problems:

1) When changing these parameters in such way, that the frequency resolution is high i feel like it comes with high spectral leakage and therefore automatically becomes obsolete.

2) The system monitored with the accelerometer is a metal-to-metal contact, excited by a shock using a hammer. I am wondering why there is a peak at 0 Hz. In such systems i would expect high-frequency components rather than the spectrum seen in the figure.

Appreciate every help or idea on how to handle any of the two problems mentioned above!

Thanks in advance!

##### 17 Comments

Mathieu NOE
on 23 Jun 2023

my pleasure

do no hesitate to come back when you have new data to share !

### Answers (1)

Gokul Nath S J
on 23 May 2023

Hi Oskar,

Changing the window length and FFT length in the pwelch function can impact the frequency resolution and spectral leakage of the resulting power spectral density (PSD) estimate. It is often a trade-off between these two factors, where increasing the window length improves the frequency resolution but also increases spectral leakage, and vice versa.

To minimize spectral leakage, it is important to choose an appropriate window function that can reduce the sidelobe levels of the FFT. Common window functions include the Hamming, Blackman, and Kaiser windows, among others. Choosing an appropriate window function and applying it properly can help you achieve a good balance between frequency resolution and spectral leakage.

Regarding the presence of a peak at 0 Hz in the spectrum, it is possible that this peak is due to the baseline, DC offset, or bias in the signal caused by some extraneous factors such as instrument noise, bias voltage, or other disturbances. This peak can also be related to the displacement or other non-linear properties of the system being monitored, especially if it is a mechanical or vibrational system.

To resolve this issue, you may want to consider subtracting the baseline or DC offset from the signal before performing the PSD estimation, or use high-pass filtering or other techniques to remove the low frequency components. You may also want to investigate the properties and behavior of the system being monitored, including its input-output relationship, the effects of boundary conditions, and other factors that may contribute to the observed low-frequency peak in the spectrum.

with regards,

Gokul Nath S J

##### 3 Comments

Mathieu NOE
on 26 May 2023

### See Also

### Categories

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!