**2. Materials and methods**

In this study, 40 volunteers were used to record brain signals and MRI images in healthy, mild, and severely ill groups. The number of subjects is 19 in the healthy group, 11 in the mild patient group, and 10 in the severely ill group. Forty volunteers with an age range of 60 to 88 years have been used to record brain signals. All participants in all groups were right-handed. Nineteen participants in the Mini-Mental State Exam (MMSE) test scored between 23 and 30 and were included in the group of

### *EEG and MRI Processing for Alzheimer's Diseases DOI: http://dx.doi.org/10.5772/intechopen.107162*

healthy people. Eleven participants with an MMSE score of 19 to 22 were classified as mild-Alzheimer's patients, and finally, 10 participants with an MMSE score between 3 and 18 were included in the group of severe Alzheimer's patients.

The Powerlab SP device with two amplifiers was used to record the brain signal. In this device, three channels for recording the brain signal and one channel for recording the EOG signal, and the other channel for the external audio signal for stimulation have been used so that the stimulation signal and ERP do not occur simultaneously. The signal was recorded in 4-channel mode according to the standard 10–20. The sampling rate of the device is 1 kHz and 16 bits for each sample. Recording the brain signal in the form of subject training, recording the closed eye for 1 minute, recording the open eye for 1 minute, and recording while performing the task assigned to the subject, which includes A. Remembering the displayed shapes; B. The counting of target and non-target sounds in an oddball auditory test. After proper labeling by the physician in segregation of healthy individuals, and mild and severe Alzheimer's patients by MMSE test in the first part, how to record the brain signal in four steps is explained to people and they are asked to relax during Keep records to prevent the formation of motion artifacts and other unwanted factors, and this method of registration does not cause harm to the person. After preparing the subject, we perform the second step. In the closed eye mode, we record the signal for 1 minute. Then in the third step, the subject will be asked to open the eyes and record the signal for 1 minute. At the end of the third stage, the displayed images have no color so that the color feature does not have a different effect on different subjects. These images are displayed for 1 minute and after this time, the subject will be asked to close the eyes and recall the images (review the images) in the mind. Meanwhile, brain signals will be recorded for 1 minute. Participants will then be asked to open their eyes and express the shapes one by one aloud. In the last part, a sound with a frequency of 1 kHz called non-target sound and 1.5 kHz sound called target sound will be given to the subject. Before playing these two categories of sound, this step has been taught to the subject. In the fourth part of section (b), these sounds are played, and the subject is asked to press the right key as soon as hearing the target sound and the left key as soon as hearing the non-target sound. The interval between stimuli (sound playback) is 2 seconds and the sounds will be played randomly. The only important point is that 75% of the number of stimuli is non-target sound and 25% of the number of stimuli is target sound. If we assume the total number of stimuli to be 120, we will have a total of 30 target stimuli and 90 non-target stimuli, which can be randomly distributed between the non-target stimuli at 2-second intervals. The playing time of each sound (target and non-target) will be 300 milliseconds. This recording section is 276 seconds with the assumption of 120 excitations and the total signal recording time for each subject is approximately 10 minutes. A sample image of recording brain signals is shown in **Figure 1**.

The first step in processing brain signals is to eliminate high- and low-frequency noise and interference and to remove motion artifacts. It is clear that the removal of unwanted factors such as motion artifacts, signal deviation from the baseline, high- and low-frequency noise, and reduction of sampling rate is necessary for proper processing of brain signals and extraction of optimal features, and this increases the accuracy of brain signal processing [11]. The motion artifacts in the brain signal are caused by contractions of the muscles of the head and neck as well as the movement of the electrode. On the other hand, transpiration also causes frequency interference. To eliminate these artifacts and noise from the city, a pass filter with cutoff frequencies of 0.5 to 45 Hz was used [12].

**Figure 1.** *A sample research participant during brain signal recording.*

Neuroimaging techniques, physiological signs, and genetic analysis are methods used to diagnose Alzheimer's disease [13]. To detect Alzheimer's disease in its early stages, neuroimaging methods are used, which include SPECT, PET, and magnetic resonance imaging. The problem with SPECT and PET is the risks of radiation and its very high cost, time-consuming, and inconvenient. Therefore, apart from all these neuroimaging methods, MRI imaging is one of the standard methods used to diagnose Alzheimer's disease. The advantage of this method is the ease of registration and economic cost over the above methods. MRI images should be at least 3 Tesla and the slices should be 3 mm thick so that acceptable images can be seen to examine the lesions of aging coils and spiral plaques. The MRI image is displayed in three different directions in **Figure 2**. Then, the appropriate image segmentation, mask, and sharp filter are used for pre-processing.

Various diagnostic tools from the clinical and processing areas for early diagnosis of Alzheimer's disease have been reviewed. Methods of blood tests, speech therapy, physical function, and hearing status were first examined by a physician and then diagnosed with mild Alzheimer's disease by recording an electroencephalogram and combining it with medical images [14]. First, the EEG signal is recorded from three channels Fz, Cz, Pz as unipolar and then MRI images from the peritoneal area. Combining MRI images and EEG signals can be a way to diagnose mild Alzheimer's disease. Medial temporal lobe atrophy, cerebrospinal fluid, white and gray matter volume, and asymmetry between the two hemispheres are effective features in MRI images to diagnose Alzheimer's disease. Another approach to EEG signal analysis is nonlinear and dynamic signal methods. The parameters that express nonlinear behavior are dual. The first category is parameters that emphasize the dynamics of signal behaviors such as entropy and Lyapunov's exponent. These parameters describe how the system behaves over time. The second category emphasizes the geometric nature of motion paths in state space, such as the correlation dimension. In this view, the system is allowed to move in the adsorption bed at the appropriate time and then, the geometric dimension of the adsorption bed is obtained. One of the most important tools used to understand the behavior and dynamics of time series of vital signals, which are mainly extracted from nonlinear systems, is the phase diagram.

Using this tool, the behavioral characteristics and chaotic nature of the data can be demonstrated appropriately and qualitatively, as well as important parameters such as the path of the system in the state space [15]. In order to draw this diagram using the recorded time series, it is enough to draw each sample at any time in terms of another sample in the previous time. **Figure 3** shows the two-dimensional phase curve, and **Figure 4** shows the three-dimensional phase curve of the Fz, Cz, and Pz channels of the EEG signal from a healthy person with the eyes closed.

Lyapanov's exponent shows the average convergence or divergence of the trajectory path in the phase space. The correlation dimension shows the number of

**Figure 3.** *Two-dimensional phase curve of Fz, Cz, Pz channels EEG signal in closed eye.*

**Figure 4.** *Three-dimensional phase curve of Fz, Cz, Pz channels EEG signal in closed eye.*

independent variables needed to describe the dynamics of the system and is another way to examine the chaotic signal. If the correlation dimension of a path is zero, it represents a steady state of the system, and if the value is equal to one, it represents prodigal behavior. The value of this variable is incorrect when chaotic behavior occurs. The higher the value of this parameter, the more complex the nonlinear system. Therefore, it can be said that the correlation dimension is the degree of complexity of the distribution of points in the phase space. **Figure 5** compares the correlation dimension of Pz channels between 3 groups of healthy people, mild patients, and severe patients. The amount of this feature decreases with the severity of the disease, which is evident in the Pz channel.

In patients with a clinical diagnosis of Alzheimer's disease, atrophy of the inner part of the temporal lobe is evident [16]. In the autosomal dominant form of Alzheimer's disease, atrophy of the inner part of the temporal lobe in patients, compared with controls, can be detected up to 3 years before the onset of clinical signs of cognitive impairment. In patients with Alzheimer's disease, hippocampal atrophy was reduced (10–50%), the amygdala was reduced to 40%, and parahippocampus was reduced to 40% compared with the control group, which was standardized for age. There is compelling evidence that atrophy of the internal structures of the temporal lobe, especially the hippocampus and entorhinal cortex, occurs early in the course of the disease and even before the onset of clinical symptoms [17]. The severity of changes in imaging of healthy elderly people makes it difficult to use MRI

#### **Figure 5.**

*Dimensional comparison of Pz channel correlation for three groups of healthy subjects, mild patient and severe patient.*

as a definitive diagnostic method. By the time mild symptoms appear, the volume of the hippocampus may have decreased by more than 25%. Clinically, a reduction in hippocampal volume is associated with the severity of clinical signs and symptoms of memory loss, the patient's score on cognitive evaluation tests, and pathological findings. **Figure 6** shows the determination of spinal atrophy and asymmetry. However, another group believes that there is no clear association between lesions in the course of dementia, including lesions of hyperexcitability of white matter on MRI, and the severity of the symptoms of post-adjustment cognitive impairment for age. They believe that due to the high sensitivity of MRI in the diagnosis of hyperexcitability lesions in T2 view and on the other hand the low specificity of these lesions in the diagnosis of the disease, there is a weak relationship between MRI findings and clinical and neuropathological symptoms. Eq. (1) shows how to determine medial temporal lobe atrophy (MTA):

**Figure 6.** *How to determine atrophy in MTA images.*


C: Unilateral lateral ventricle.

$$\begin{aligned} \text{MTA} &= (\text{A} - \text{B}) \times 10 \,\text{/C} \\\\ \text{Cleftt:} \,\text{Area} &= 187.3 \,\text{mm} 2, \angle \text{Avg} = 691.1, \text{Dev} = 128.3. \\\\ \text{Crightt:} &\,\text{Area} = 173.1 \,\text{mm} 2, \angle \text{Avg} = 648.2, \text{Dev} = 146.2. \\\\ \text{Aleft:} &\,\text{Area} = 324.7 \,\text{mm} 2, \angle \text{Avg} = 323.9, \text{Dev} = 238.1. \\\\ \text{Aright:} &\,\text{Area} = 325.5 \,\text{mm} 2, \angle \text{Avg} = 245.3, \text{Dev} = 191.3. \\\\ \text{Bleftt:} &\,\text{Area} = 200.3 \,\text{mm} 2, \angle \text{Avg} = 190.8, \text{Dev} = 121.6. \\\\ \text{Rightt:} &\,\text{Area} = 220.1 \,\text{mm} 2, \angle \text{Avg} = 160.4, \angle \text{Dev} = 118.3. \end{aligned}$$

When MTAi is calculated, two values are determined that each corresponds to a hemisphere. According to MTAi, the asymmetry index is calculated as Eq. (2), and the mean values of MTAi and IA for the three groups are given in **Table 1 (Figure 7)**.

$$IA = \left( \text{IMTAi} - \text{dMTAi} \right) / \left( \text{IMTAi} + \text{dMTAi} \right) \times 100 \tag{2}$$

Measurement of cerebrospinal fluid, gray matter, and white matter volumes from MRI images has been used to diagnose mild Alzheimer's disease [18].

In this study, nonlinear property that reflects the dynamic nature of the brain signal, including Lyapunov exponent and correlation dimension, is also determined. On the other hand, in order to determine the optimal characteristics in three classes of healthy people, mild patients, and severe patients, the method of analysis of variance has been used. Brain signals from the three channels Fz, Cz, and Pz are recorded in four modes: closed-eye, open-eye, reminder, and stimulus. Forty-five properties are specified in the excitation mode. **Table 2** shows the results of analysis of variance for three channels of Fz, Cz, and Pz between the group of healthy individuals, and mild and severe patients [19]. This analysis method is used in the classification of three or more classes to determine the optimal and effective characteristics.


**Table 1.**

*Mean values of MTAi and IA for the three groups are given.*

### **Figure 7.** *Cerebrospinal fluid, gray and white matter volume in the image in 18th slice of a participant with mild AD.*


#### **Table 2.**

*Compare the number and types of optimum features between Fz, Cz, Pz channels.*

In this study, the purpose of using the classifier, after extracting the optimal characteristics of brain signals, was to separate the three groups of healthy people, mild and severe patients, and two classifiers such as SVM and the Elman neural network been used, aiming at comparing static and dynamic classifiers [20]. One of the classification methods with the teacher is the backup vector machine method. This view is based on statistical learning theory, but its implementation is similar to the neural network. This method was designed to separate data into two categories. Of course, if you use several SVMs in parallel and with different methods, this method can be used to classify data into more than two categories. SVM claims: It solves the major problem of neural networks, namely overfitting [21]. The results of EEG signal accuracy of different channels in different modes are determined at two levels (mildsevere, mild-healthy, and healthy-severe). Due to the linear separator for three classes containing poor results accuracy, levels are divided into two levels. In this study, a 2-layer Elman neural network was used which has 8 neurons in the latent layer and 1 neuron in the output layer [22]. The number of neural network inputs is equal to the number of features, and the number of hidden layer neurons is equal to the number of optimal features, and to determine the best results, various experiments with

different numbers of neurons in the hidden layer have been performed. In the hidden layer and the output, the Sigmoid activation function is used due to its nonlinear property. There are many training functions for teaching the Elman network, wherein in this study the Levenberg-Marquardt error propagation algorithm was used due to higher convergence than other training functions, and the condition for stopping neural network training is an error coefficient of 0.001.
