## 3 Methodology
### Local Mean Decomposition (LMD) for Accurately-Solved Non-Stationary Problems in EEG Signals  
LMD is considered a data-dependent time-frequency decomposition approach with superior self-adaptive ability [5; 26; 29; 35; 45]. Our team previously completed a preliminary study on feature extraction based on LMD [5]. Following that study, LMD can be regarded as the most effective method based on time-frequency analysis from the highest frequency oscillation to the lowest frequency oscillation for non-stationary and nonlinear signals. Furthermore, the LMD method can be used to decompose EEG signals into a series of product functions (PFs). Then, the stationary statistical  
Figure 2: The architecture of the automated epileptic seizure detection approach. features of PFs can be obtained [26; 45]. Figure 2 illustrates the first step of epileptic seizure detection, by decomposing the original EEG signals into several subcomponent signals to solve the non-stationary problem [5; 26]. Generally, EEG signals can be demodulated into PFs, and each PF can be considered as the product of the multiplication of an envelope signal by a frequency modulated (FM) signal. The LMD procedure involves iteratively extracting subcomponents from the highest to the lowest frequency oscillations, with low computational complexity and high processing speed [5; 26]. For an arbitrary signal \(x(t)\), the iterative decomposition can be briefly described as follows [5; 26]:  
* Step 1. All the local extreme points \(n\) being determined, then the \(i\)-th local mean value \(m_{i}\) of two adjacent extreme data points (\(n_{i}\) and \(n_{i+1}\)) can be calculated as follows. \[m_{i}=\frac{(n_{i}+n_{i+1})}{2}.\] (1) From Equation (1), all the local means are straight lines extending between successive extremes. Then, an averaging operation can be carried out to smooth the block straight-lines. A smoothed local mean function \(m_{11}(t)\) is therefore generated. * Step 2. According to the above mentioned scenario, the local magnitude \(a_{i}\) of two adjacent extremes (\(n_{i}\) and \(n_{i+1}\)) can be calculated as follows: \[a_{i}=\frac{|n_{i}-n_{i+1}|}{2}.\] (2) Then, all local magnitudes can be plotted as straight lines extending as stated in Step 1, and an estimated envelope \(a_{11}(t)\) can be derived. * Step 3. The local mean function \(m_{11}(t)\) is subtracted from the original signal \(x(t)\), and can be described as follows, mathematically: \[h_{11}(t)=x(t)-m_{11}(t).\] (3) \(h_{11}(t)\) is then divided by the estimated envelope \(a_{11}(t)\) and the demodulated component \(s_{11}(t)\), which can be calculated as follows: \[s_{11}(t)=\frac{x(t)-m_{11}(t)}{a_{11}(t)}=\frac{h_{11}(t)}{a_{11}(t)}.\] (4)
* Step 4. Steps 1-3 are performed on the demodulated component for \(n\) times until a purely FM element \(s_{1n}(t)\) is acquired. Under these circumstances, a series of recursive equations can be obtained as follows: \[\left\{ \begin{array}{l}h_{11}(t)=x(t)-m_{11}(t),\\ h_{12}(t)=s_{11}(t)-m_{12}(t),\\...\\ h_{1n}(t)=s_{1(n-1)}(t)-m_{1n}(t),\end{array} \right.\] (5) where \[\left\{ \begin{array}{l}s_{11}(t)=h_{11}(t)/a_{11}(t),\\ s_{12}(t)=h_{12}(t)/a_{12}(t),\\...\\ s_{1n}(t)=h_{1n}(t)/a_{1n}(t).\end{array} \right.\] (6)
* Step 5. The estimated sub-envelopes \(a_{11}(t),a_{12}(t),...,a_{1n}(t)\) are multiplied, and their integrated envelopes can be calculated as follows:\[a_{1}(t)=a_{11}(t)a_{12}(t)...a_{1n}(t)=\prod_{q=1}^{n}a_{1q}(t),\] (7) where the ultimate objective can be described as follows: \[\lim_{n\rightarrow\infty}a_{1n}(t)=1.\] (8) Generally, the first PF, named PF1, can be subsequently defined as the product of the multiplication of \(s_{1n}(t)\) by \(a_{1}(t)\): \[PF_{1}(t)=a_{1}(t)s_{1n}(t). \tag{9}\]
* Step 6. PF1 is subtracted from the original signal \(x(t)\), which turns into a new signal \(u_{1}(t)\).