Power spectral density of IMF's for EMD and VMD
12 views (last 30 days)
Show older comments
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 Comment
Jiayi
on 22 Mar 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.
Answers (1)
Balavignesh
on 3 Oct 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:
- 'pwelch' function: https://www.mathworks.com/help/signal/ref/pwelch.html
- 'hamming' function: https://www.mathworks.com/help/signal/ref/hamming.html
0 Comments
See Also
Categories
Find more on Parametric Spectral Estimation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!