how to calculate mean of power spectrum
19 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi all,
Please explain me how to calculate the mean of power spectrum for the below dataset.
My dataset is long having more than 50,000 rows and two columns(time domain and Fx values)
The data set is attached with this question.
In the dataset first clumn indicates time in seconds and second column indicates force in newton.
So, basically its a time domain signal and need to convert to frequency domain for the calculation of Mean of Power Spectrum, Frequency centroid and Mean square frequency.
Can anyone explain me how to get the above values from the dataset.
0 comentarios
Respuestas (1)
Sourav Karmakar
el 27 de En. de 2022
Hey Pramod,
As per my understanding, you want to calculate the mean of power spectrum from the attached dataset.
So, for that first import the data in your MATLAB workspace and then use the following code :
% Calculation of Mean of Power Spectrum
t = Data{:,1}';
Fx = Data{:,2}';
nfft = 2^nextpow2(length(Fx));
Pxx = abs(fft(Fx,nfft)).^2/length(Fx);
Hpsd = dspdata.psd(Pxx(1:length(Pxx)/2));
%plot(Hpsd); %Uncomment it to view the plotting of the power spectrum
meanPSD = mean(Hpsd.Data) %stores the mean of power spectrum
You can refer the documentation of Power spectrum - MATLAB to know more about the other details and functionalities.
These are some useful links to solve the other two:
Hope this helps!
Ver también
Categorías
Más información sobre Spectral Measurements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!