Power spectral density of IMF's for EMD and VMD

11 ビュー (過去 30 日間)
Fatih
Fatih 2022 年 9 月 22 日
回答済み: Balavignesh 2023 年 10 月 3 日
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 Center および File ExchangeParametric Spectral Estimation についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by