how to plot pressure spectrum for a point in turbulent flow

5 views (last 30 days)
I have pressure data for a point in turbulent flow,the data are not sampled at constant time step
The data are sampled from time=0.0616086-0.0928762 second, the time step is not constant cahnging between 6*10^-7 tp 9*10^-7 seconds
the pressure data are shown below
I was trying to use pwelch function to get the pressure spectra but i should have constant sampling frequency so i make interpolation for the data to have constant time step of 1*10^-7
then i tried to apply pwelch function
%____interpolatd data_____________________
tq=t(x1):1*10^-7:t(x2);
p0q=interp1(t1,p01,tq,'linear');
%_____________pwelch func________________
fs=1*10^7;
[pxx0,f] = pwelch(p0-mean(p0),[],[],[],fs);
pxx0=10*log10(pxx0);
figure(1)
semilogx(f,pxx0)
this is the data in frequency domain, the figure does not seems resonable
does anyone have tried to use pwelch for pressure spectra to help me in fuction implementation?

Answers (0)

Community Treasure Hunt

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

Start Hunting!