I am calculating the power spectrum of a heart rate variability via FFT and a Welch window.
I have a sample of 500 points as the input signal. The signal was broken up into two 128 point segments. For each segment the multiplication with a window, FFT and scaling was performed. Results from segment 1 and segment 2 were analyzed.
These data were compared to the same analysis with one larger segment of 256 point.
As a result the input data from values 1-128 and 128-256 are compared the values from 1-256.
I would have expected that the averaged result for two samples 1-128 points and 128-256 points would be the same than the result for one sample with 1-256 points. However, this is not the case.
The value of the spectral frequency bands with high frequencies is much larger for each of the two samples than for the one sample (factor 1.7 larger). Lower frequencies are better fitting, but not exactly. (Smaller Segment 1: power 3500 ms^2, Smaller segment 2: 2700 ms^2, Larger Segment: power 1700 ms^2).
I compared my self-made calculation with a commercial calculation and the one sample variant produces correct values.
Does anyone has an idea what could be the reason for this phenomenon? What could be the error? How should it normally look like?
It is also not so clear how the add or average the two smaller spectra.
The scaling and binning seems to be correct in each case.