power spectral density of nonstationary data
古いコメントを表示
I am hoping those with seasoned experience with signaling can assist me with two questions. The ultimate goal is to obtain a power spectral density of very nonstationay optical data sampled at 1 kHz (attached). There is a huge DC offset that persists even after detrending or subtracting the mean. For such nonstationary data, pwelch seems most appropriate but a rather odd looking series of deminishing regularly space peaks is outputted across the frequency domain. Is the windowing wrong? Is this the wrong analysis to do?
First, here is the pwelch based code I ran:
T = readtable('time_series_data.csv');
time_series = T.time_series;
x = time_series - mean(time_series);
fs = 1000;
[pxx_smooth, f] = pwelch(x, hann(length(x)/2), [], fs);
figure;
plot(f, 10*log10(pxx_smooth), 'LineWidth', 1.5);
If you run the code on the attached time-series you get no distinct peaks and a huge off wtih a very narrow frequency domain. This makes no sense.
Second, despite supposedly not correct to do since this is non-stationary data, I ran an FFT:
fs = 1000;
%x = detrend(time_series);
x = time_series-mean(time_series);
figure;
L = length(x);
plot(fs/L*(-L/2:L/2-1),abs(fftshift(x)),"LineWidth",2)
With an FFT you get more defined peaks and over a much larger frequency range (see attached jpg), but confused why the asymmetry when using ffshift, where it should be symmetrical about x = 0. Why the asymmetry?
I am convinced I doing something fundamentally wrong with the processing or windowing and odd looking output is not inherently due to the data itself. Any assistance in how to correctly attain a PSD for this data and what is the most valid approach for nonstationary data of this nature would be greatly appreciated.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Modulation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!











