I'm working on Hilbert Huang Tranform and have a question on computation of instantaneous frequency. I'm using HHT toolbox by Patrick Flandrin for EMD and computing IF manually. Problem is that I am getting negative values in IF.
Signal used: a $10\textrm{ Hz}$ sinusoid
Ts=1/Fs;
t=0:Ts:4;
z= 5.*sin(2*10*pi*t);
Since this is a monocomponent frequency, IMF is the signal itself. I compute analytic signal using MATLAB function hilbert
and then apply the following code to compute IF:
function [f] = inst_freq_manual(analytic_signal,Fs)
factor = Fs/(2*pi);
N= length(analytic_signal);
% Differentiation formula
fin = factor*(angle(analytic_signal(2:N).*conj(analytic_signal(1:N-1))));
% Insert leading 0 in return-vector to maintain size
f = [0 fin];
end
I find that the IF values are negative. Mean of IF values =-9.9975 (correct numerical value but negative sign).
Plot of instantaneous parameters:
As per literature, the IMFs from HHT should have positive instantaneous frequencies.
- Can anyone please tell me where I am going wrong?
- Is using absolute value an option?
hilbert
function, but it's not clear to me what that will produce. $\endgroup$fin=
) that the OP is using looks correct. $\endgroup$