Power spectral density of IMF's for EMD and VMD

11 visualizaciones (últimos 30 días)
Fatih
Fatih el 22 de Sept. de 2022
Respondida: Balavignesh el 3 de Oct. de 2023
Hello everyone,
I am using EMD and VMD for my signals. I have plotted the IMF's graphics. Also, I want to plot individually PSD depends on frequencies. How can I plot it?
Regards
  1 comentario
Jiayi
Jiayi el 22 de Mzo. de 2023
Hello, have you solved the problem? I have the same issue that needs to be solved. If you have solved it, I hope to help me solve it, good luck.

Iniciar sesión para comentar.

Respuestas (1)

Balavignesh
Balavignesh el 3 de Oct. de 2023
Hi Fatih,
As per my understanding, you would like to plot Power Spectral Densities (PSD) of each Intrinsic Mode Function (IMF) obtained from Empirical Mode Decomposition (EMD) or Variational Mode Decomposition (VMD).
I am assuming you have already obtained the IMF's from EMD or VMD.
I suggest you to use the MATLAB function 'pwelch' to calculate the PSD.
In that case, the following example code may help you understand this:
% Sample IMF's. Input the calculated IMF
imf1 = sin(2*pi*10*(0:0.01:1))';% A sinusoidal signal with frequency 10 Hz
imf2 = randn(1, 101)'; % Random noise signal
imf3 = chirp(0:0.01:1, 5, 1, 20)'; % A linearly frequency-modulated (chirp) signal
% Sample value for segment length
segmentLength = 101; % Choose an appropriate segment length based on your signal characteristics and desired frequency resolution
imfs = [imf1 , imf2 , imf3];
% Set the sampling frequency and segment length for PSD calculation
fs = 50; % Sampling frequency of the signal
% Calculate and plot the PSD for each IMF
numIMFs = size(imfs, 2);
for i = 1:numIMFs
% Calculate the PSD using Welch's method
[psd, freq] = pwelch(imfs(:, i)', hamming
(segmentLength) ,[] ,[], fs);
% Plot the PSD
subplot(numIMFs, 1, i);
plot(freq, 10*log10(psd));
xlabel('Frequency (Hz)');
ylabel('Power Spectral Density (dB/Hz)');
title(['PSD of IMF ', num2str(i)]);
end
Please refer to the following documentation links to have more information on:

Categorías

Más información sobre Parametric Spectral Estimation en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by