# How do I perform the sifting process in empirical mode decomposition?

I am programming a voice activity detection algorithm and I found a paper that recommends the use of HHT. I have been trying to program it and understand how to calculate $m1(x)$, but the shifting process confuses me.

Could someone explain what exactly I need to do after I calculate the mean value between the two splines of the original data?

Here is what I found at this website: https://www.clear.rice.edu/elec301/Projects02/empiricalMode/process.html

The first component h1 is computed: $h_1=X(t)-m_1$ In the second sifting process, $h_1$ is treated as the data, and m11 is the mean of $h_1$'s upper and lower envelopes: $h_{11}=h_1-m_{11}$ This sifting procedure is repeated $k$ times, until $h_{1k}$ is an IMF, that is: $h_{1(k-1)}-m_{1k}=h_{1k}$

Why does it go from $h_1$ to $h_{11}$? I am really confused by this.

It's not shifting, it's sifting. After you find the $m_1$ curve, your subtract it from your signal $X$ to get $h_1= X(t) - m_1$. You're essentially taking away that signal component and are left with $h_1$, which is your new starting point of your next iteration. I assume you were confused by the terminology.

Sifting is a general term in signal processing related to separating out components of a signal one at a time. It is frequently used in context of wavelet decomposition since this process is very similar in this respect.

The reason the next function is $h_{11}$ and not $h_2$ is because you have to keep going with this process until the resulting $h_{1k}$ is an IMF function (criteria given on the top of the page). Once you've reached that point, you get your first IMF basis function $c_1$. Only at this point have you reached your first empirical mode.

Then you start over by finding $m_2$ and so on.

• Is the m1 a curve or a specific value? I read the locality doesn't matter. Does that mean you interpolate at a random point and the subtract the mean from the double[] to produce the new curve? – Skylion Oct 27 '13 at 3:08
• $m_1$ is a curve. You find upped and lower envelopes (which are curves) and take their average, which gives you m_1. I suggest that you find an implementation of this method, somewhere, it may be more informative than this page alone. – Phonon Oct 27 '13 at 3:38
• I have tried to find an implementation in a language I am familiar with without avail. How do you average two splines? Do you interpolate at certain interval and the average the two arrays? Or you do add mX, mY, and mM and then average? – Skylion Oct 27 '13 at 3:56
• Here are EMD implementation for MATLAB and SciLab. The MATLAB one requires that you have the spline toolbox, but you should still be able to read the code nevertheless. – Phonon Oct 27 '13 at 3:59

Starting with your original signal $s(t)$, we designate $u(t)$ and $l(t)$ as the curves for the upper and lower portions of the envelope respectively.

You find the upper curve of the envelope, $u(t)$, by picking out the local maximums of $s(t)$ and then connect them using splines to get a continuous representation of the curve. You find the lower curve of the envelope, $l(t)$, by picking out the local minimums of $s(t)$ and connecting these points via splines to get a representation of the lower portion of the envelope.

The curve $m(t)$ comes from averaging the upper and lower portions of the envelope i.e. $m(t)=\frac{l(t)+u(t)}{2}$.

Handling the end points and how the splines fit these points is problematic. There are several papers trying to address this issue and the results of the EMD are very dependent on how the end points are handled. So if you are trying to duplicate the results of a specific paper - you'll need the exact code that they used (to handle the end points in the same manner).