hi very valuable group members. I wish you all a good day. I ask you to help Hilbert Huan transformation point. I have two different nonlinear signals. I obtained imfs for these signals. I need the matlab code for the hilbert huang transform of these
    2 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
EXAMPLE  SİGNAL 1 CODE 
>> nsamples=10000;
fs=1e3;                                                                                                                                  
time=(1:nsamples-1)/fs;
signal=0.5*time+sin(pi*time)+sin(2*pi*time)+sin(6*pi*time);%
>> plot(signal)
>> 
EXAMPLE SİGNAL  1  RESULT
EXAMPLE SİGNAL 1  İMF  CODE
>> clear all
close all
nsamples=10000;
fs=1e3;
time=(1:nsamples-1)/fs;
signal=0.5*time+sin(pi*time)+sin(2*pi*time)+sin(6*pi*time);%
threshouldSifting=0.1;
monotone=0;
indexIMF=0;
signalmem=signal;
while (not(monotone))
    h=signal;
    SD=1;
    while(SD>threshouldSifting)
        %% upper
        [pksMax,locsMax] = findpeaks(h);
        pksMax=[h(1), pksMax, h(end)];
        locsMax=[1, locsMax, length(h)];
        upperSpline=spline(time(locsMax),pksMax);
        spmax=ppval(upperSpline,time);
        %% lower
        [pksMin,locsMin] = findpeaks(-1*h);
        pksMin=-1*pksMin;
        pksMin=[h(1), pksMin, h(end)];
        locsMin=[1, locsMin, length(h)];
        lowerSpline=spline(time(locsMin),pksMin);
        spmin=ppval(lowerSpline,time);
        %% evaluate the mean
        mspline=(spmax+spmin)/2;
        hprec=h;
        h=h-mspline;
        SD=sum((hprec-h).^2)/sum(hprec.^2);  %criterio di stop proposto da by Huang et al. (1998)
    end
    indexIMF=indexIMF+1;
    IMF(indexIMF,:)=h;
    signal=signal-h;
    monotone=all(diff(signal)>0)||all(diff(signal)<0);
end
subplot(indexIMF+2,1,1), plot(time,signalmem),title('Segnale di ingresso'),xlabel('Tempo [s]');
for index=1:indexIMF
    subplot(indexIMF+2,1,index+1), plot(time,IMF(index,:)),title(['IMF_',num2str(index)]),xlabel('Tempo [s]');
end
subplot(indexIMF+2,1,indexIMF+2), plot(time,signal),title('Residuo'),xlabel('Tempo [s]');
>> 
>> 
EXAMPLE SİGNAL 1  IMF  RESULT
 HELP TOPİC
 WHAT  I  WANT  : HİLBERT HUANG TRANSFORM OF  THİS  SİGNAL  AND  RESULT GRAPHS. SO; FREQUENCY , TİME AND  ENERGY  RESULTS.
MATLAM CODE  AND  GRAPHS ????  
………………………………………………………………………………………………………..
EXAMPLE  SİGNAL 2  CODE
>> Fs= 10000;
Ts=2/Fs;
L=150;
t=(0:L-1);
x=36*sin(2*pi*50*t)+sin(2*pi*120*t);
plot(t,x);
>> 
EXAMPLE  2 SİGNAL  RESULT
EXAMPLE 2  SİGNAL  İMF  CODES 
>> clear all
close all
nsamples=10000;
fs=1e3;
time=(1:nsamples-1)/fs;
signal=36*sin(2*pi*50*time)+sin(2*pi*120*time);
%
threshouldSifting=0.1;
monotone=0;
indexIMF=0;
signalmem=signal;
while (not(monotone))
    h=signal;
    SD=1;
    while(SD>threshouldSifting)
        %% upper
        [pksMax,locsMax] = findpeaks(h);
        pksMax=[h(1), pksMax, h(end)];
        locsMax=[1, locsMax, length(h)];
        upperSpline=spline(time(locsMax),pksMax);
        spmax=ppval(upperSpline,time);
        %% lower
        [pksMin,locsMin] = findpeaks(-1*h);
        pksMin=-1*pksMin;
        pksMin=[h(1), pksMin, h(end)];
        locsMin=[1, locsMin, length(h)];
        lowerSpline=spline(time(locsMin),pksMin);
        spmin=ppval(lowerSpline,time);
        %% evaluate the mean
        mspline=(spmax+spmin)/2;
        hprec=h;
        h=h-mspline;
        SD=sum((hprec-h).^2)/sum(hprec.^2);  %criterio di stop proposto da by Huang et al. (1998)
    end
    indexIMF=indexIMF+1;
    IMF(indexIMF,:)=h;
    signal=signal-h;
    monotone=all(diff(signal)>0)||all(diff(signal)<0);
end
subplot(indexIMF+2,1,1), plot(time,signalmem),title('Segnale di ingresso'),xlabel('Tempo [s]');
for index=1:indexIMF
    subplot(indexIMF+2,1,index+1), plot(time,IMF(index,:)),title(['IMF_',num2str(index)]),xlabel('Tempo [s]');
end
subplot(indexIMF+2,1,indexIMF+2), plot(time,signal),title('Residuo'),xlabel('Tempo [s]');
>> 
>> 
EXAMPLE  2 İMF  RESULTS
 HELP TOPİC
   WHAT  I  WANT  : HİLBERT HUANG TRANSFORM OF  THİS  SİGNAL  AND  RESULT GRAPHS. SO; FREQUENCY , TİME AND  ENERGY  RESULTS.
MATLAM CODE  AND  GRAPHS ????
………………………………………………………………………..
 SAME THİS  ARTİCLE  APPLİCATİON 
MAİL :  sukruozdemir37@gmail.com
27 Kommentare
  Walter Roberson
      
      
 am 8 Nov. 2019
				The imf (intrinsic mode functions) is what you would get as output of HHT, so you would appear to have already done the work.
Is there are reason you did not use edm and hht ?
Antworten (1)
Siehe auch
Kategorien
				Mehr zu Hilbert and Walsh-Hadamard Transforms finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!