Genetic Algorithm for parameter estimation in EEMD (Ensemble Empirical Mode Decomposition)
Mostrar comentarios más antiguos
Hello, I have problem how to implement code changes. I have good working EEMD program on a some data. But in the program I have prameter Nstd = 0.3; % param to white noise. which is fixed and it must be adjusting by genetic algorithm (in range 0-1). The EEMD code is bellow:
y=xlsread('some.data'); % load a signal.
aim = 5; % numbers of IMF
NR = 10; % value of ensemble
Nstd = 0.3; % param to white noise
IMF1=eemd(y,aim,NR,Nstd);
and the eemd.m
function [modes] = eemd(y, aim, NR, Nstd)
stdy = std(y);
if stdy < 0.01
stdy = 1;
end
y = y ./ stdy;
siz = length(y);
modes = zeros(aim+1, siz);
for k = 1:NR
disp(['Ensemble number #' num2str(k)]);
wn = randn(1, siz) .* Nstd;
y1 = y + wn;
y2 = y - wn;
modes = modes + emd(y1, aim);
if Nstd > 0 && NR > 1
modes = modes + emd(y2, aim);
end
end
modes = modes .* stdy ./ (NR);
if Nstd > 0 && NR > 1
modes = modes ./ 2;
end
end
from emd.m in eemd.m I get the IMF's - as much as is "aim"
3 comentarios
Manal CHOUBI
el 24 de Abr. de 2020
Please i would like to have an explication about the two parameters NR and Nstd i dont quiet understand the meaning and the purpose of these parameters , thanks.
Arpana Singh
el 19 de Ag. de 2020
could u plz help me with EEMD . . i m not able to run this code evn . ..if possible mail me at apsingh014@gmail.com
Atik Faysal
el 3 de Sept. de 2020
@ Arpana Singh, what version of MATLAB are you using? The emd fuction is available from version 2017b and above.
Respuestas (1)
Kalpesh Prajapati
el 19 de Jul. de 2017
Editada: Kalpesh Prajapati
el 19 de Jul. de 2017
1 voto
Hello, You have to define some objective function such as quality of algorithm (PSNR,MSE etc) as output argument and make standard deviation of noise as input argument as input parameter. Then just apply genetic algorithm on it. For more detail of how to use genetic algorithm, see some example. You can understand it easily.
6 comentarios
Nishtha Rath
el 1 de En. de 2019
I am doing a project on ensemble empirical mode decomposition, for which I found this MATLAB CODE. I have to use a .wav file as the input. So I converted the .wav into a .mat file. But Here, xlsread() function is used in which I converted my .mat file into its correspondent .xlsx file and tried to run my code with the main function(eemd_test) as:
y=xlsread('Anger.xlsx'); % load a signal.
aim = 5; % numbers of IMF
NR = 10; % value of ensemble
Nstd = 0.3; % param to white noise
IMF1=eemd(y,aim,NR,Nstd);
where, Anger.xlsx is the file name of the .xlsx file I have used in this code. But I couldn't get any output and I get these errors:
Error in eemd (line 14)
modes = modes + emd(y1, aim);
Error in eemd_test (line 5)
IMF1=eemd(y,aim,NR,Nstd);
Please have a look at this and tell me the corrected code in this code.
Thank you!
ADITYA SHARMA
el 18 de Feb. de 2019
I am also getting the same problem.
Ajeet Patil
el 18 de Ag. de 2019
Use below given eend code (Above given code is changed a little bit)
function [modes] = eemd(y, aim, NR, Nstd)
stdy = std(y);
if stdy < 0.01
stdy = 1;
end
y = y ./ stdy;
siz = length(y);
modes = zeros(siz,aim);
for k = 1:NR
disp(['Ensemble number #' num2str(k)]);
wn = (randn(1,siz).*Nstd)';
y1 = y + wn;
y2 = y - wn;
modes = modes + emd(y1,'MaxNumIMF',aim);
if Nstd > 0 && NR > 1
modes = modes + emd(y2,'MaxNumIMF',aim);
end
end
modes = modes .* stdy ./ (NR);
if Nstd > 0 && NR > 1
modes = modes ./ 2;
end
end
Manal CHOUBI
el 24 de Abr. de 2020
Please i would like to have an explication about the two parameters NR and Nstd i dont quiet understand the meaning and the purpose of these parameters , thanks.
Atik Faysal
el 3 de Sept. de 2020
Editada: Atik Faysal
el 3 de Sept. de 2020
@ Manal Choubi, the NR represents the number of ensembles of EEMD. For each ensemble different white noise is added with the signal. The Nstd represents the white noise that is added. Here 0.3 means the randomly generated white noise has a std of 0.3.
Do some study on the theory of EEMD.
If you are still confused reach me out at faisal.atik@gmail.com
Jan Ali
el 14 de Mzo. de 2021
@Ajeet Patil, Could you/anyone please explain what the difference between zeros(siz,aim) and zeros(aim+1, siz) is, why did you put 'MaxNumIMF' in emd(y2,'MaxNumIMF',aim)?
Thanks in advance,
Categorías
Más información sobre Audio I/O and Waveform Generation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!