Power spectral density of IMF's for EMD and VMD

11 次查看(过去 30 天)
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 个评论
Jiayi
Jiayi 2023-3-22
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.

请先登录,再进行评论。

回答(1 个)

Balavignesh
Balavignesh 2023-10-3
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:

类别

Help CenterFile Exchange 中查找有关 Parametric Spectral Estimation 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by