Forward Model of Rat Electroencephalogram: Comparative Study of Numerical Simulations With Measurements on Rat Head Phantoms

In the paper, we propose a procedure to be used for the validation of software for forward modeling of rat electroencephalogram with scalp potentials measured on rat head phantoms. Measurements are performed on a cuboidal phantom, a simplified shape of a rat brain, and an anatomically realistic, computed tomography (CT)-based phantom considering the brain and the skull. The physical phantoms are composed of an agar mixture to mimic the rat brain, excitation dipoles for modeling the neural activity of the brain, electrodes for monitoring the surface electric potential and a 3D printed skull. To ensure correct positions of dipoles and electrodes for numerical simulations, the phantoms are scanned by a computed tomography. After that, reconstructed 3D models are simulated in three EM solvers and results are compared with EEG measurements. Differences between simulations and measurements are further analyzed by parametric simulations and discussed. Obtained results provide the software validation method for rat brain forward modeling. Properly validated computation of electric potentials is essential for development of electrical brain stimulation protocols as well as in optimization of electrode placement.


I. INTRODUCTION
Localization of neural activity is crucial for understanding the basic brain functions [1], [2]. Such a localization can be realized by the electroencephalogram (EEG) source analysis that consists of the forward and inverse problems [1], [3].
The first problem is the forward problem that computes the scalp potentials originating from neural sources located inside a volume conductor model [3], [4], [4], [5], [6], [7], [8], [9]. The neural sources are generally modeled as dipoles with given locations, orientations, and dipole moments [3]. The volume conductor model represents head tissues with different electric conductivity. In human, four compartments The associate editor coordinating the review of this manuscript and approving it for publication was Su Yan . are considered: the brain (grey and white matter), the skull, the cerebrospinal fluid (CSF), and the scalp. In case of human forward problem, the four-layer homogeneous sphere can be used as a volume conductor model that is the most computationally efficient and allows using analytical solution [10]. In case of rat forward problem, a precise geometrical description is lacking in comparison with a real human head [3], [4], [4], [5], [6], [7], [8], [9].
More accurate forward models are based on numerical methods, such as the boundary element method (BEM) [6], [12], the finite difference method (FDM) [6], [13], and the finite-element method (FEM) [6], [14]. Numerical methods allow to include anatomically precise head models based on magnetic resonance images (MRI) to forward modelling. Since frequencies of brain waves are low and brain distances VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ are short, the forward problem of EEG is given by the quasistatic approximation of Maxwell's equations. Thus, the forward model can be based on Poisson's equation [1], [3]. The second problem of the EEG source analysis is the inverse problem [1], [11] that uses the electric potentials from the forward model to reconstruct brain wave sources based on the measured EEG. Despite of the forward model, the inverse problem specifies the assumed limitation of brain sources generating EEG such as noise characteristics and a temporal behavior [1], [5], [11].
Historically, the effort has been devoted to increase the accuracy of solving both problems in different ways. The influence of the volume conductor model was studied in [6], [9], [15], and [16] and showed that the forward model defined with a realistic head model results in a better localization than simplified shapes such as spherical models, since volume currents are described more precisely. To incorporate realistic head models, the numerical methods are necessary to be applied. At present, FEM is dominantly used for forward modeling, since more complex geometries and anisotropy of tissues can be involved [1], [3]. Moreover, the high accuracy of FEM in forward models was shown in [17] and [18].
The accuracy of the source analysis further depends on considered head tissues [4], [5]. Papers [9] and [19] showed that neglecting the CSF and the distinction of white and gray matter leads to considerable errors in the source analysis. Nevertheless, the difference between the spongy bone and the compact bone results in a minor error. The approximation of a spongy layer by a compact layer is recommended in [20]. On the other hand, the importance of a precise geometry of a skull is highlighted. The importance of inclusion of skull holes to the forward model was shown in [19], [21], and [22].
Another source of errors in source analysis is related to conductivities of head tissues, especially various conductivities of the skull. In the past, the skull conductivity was estimated by several methods, such as electrical impedance tomography (EIT) [23], directly applied current (DAC) [24], or magnetic resonance EIT (MREIT) [25]. Authors in [23] estimated the skull conductivity of five patients with EIT and reported a varying skull conductivity from 0.040 to 0.102 S/m. Moreover, an inconsistent skull conductivity was estimated in [26] from somatosensory evoked potentials.
Recently, the inter-subject variability of the skull conductivity (8.44 ± 4.84 mS/m) was reported in [27]. The effect of skull conductivity uncertainties to the source analysis was studied in [28] and authors reported a potential error up to 20 mm.
At present, the influence of the anisotropy of head tissues is discussed in field of source analysis. In papers [29], [30], [31], and [32], the anisotropy of white matter was investigated, and authors proved a higher accuracy of source analysis when anisotropy was considered. Moreover, the paper [31] concluded that the influence of anisotropy is significant when the dipoles are orientated in the same direction as the anisotropic white matter. Nevertheless, papers [19], [33] reported that the accuracy of the EEG source analysis is not improved when an anisotropic white matter is considered. Similarly, our last paper [34] showed rather weak effect of anisotropy on EEG source analysis for single testing dipole.
The potential improvements of the source analysis are mostly focused on parameters, which directly influence the accuracy of the forward problem. However, a direct comparison of a solved forward problem with experimental measurements is lacking. Since the simulations cannot mimic an entire reality, new sources of errors in a forward model can be revealed.
A similarity can be found in studies related to an electrical brain stimulation (EBS). Nevertheless, EBS studies use an anode and a cathode as an exciter on a head surface, while the forward model is excited by dipoles inside the brain. Moreover, the EBS studies are focused on stimulation parameters, such as an electrode position, amplitude, duration of an injected current or the waveform of a stimulating signal.
Electric potentials originating from two stimulating electrodes have been investigated in [35]. Authors compared numerical simulations with measurements on human phantoms and obtained the average relative difference of 5.4% for a spherical phantom and 10.3% for an MRI-based one.
In [36], the numerical simulation with a subject undergoing a transcranial electric stimulation (TES) was compared. The measurement was performed for four stimulating electrode configurations, and authors reported an error up to 20%. A validation study of a sphere [37] showed that an analytical solution and a FEM model differ by 1% in a TES and 0.1% in a transcranial magnetic stimulation (TMS).
The present paper is aimed to compare the EEG measured on rat head phantoms with computed forward models developed in three different electromagnetics software packages. First, we evaluate the developed forward models on a simplified shape of a rat head phantom. Second, we construct an anatomical phantom based on computed tomography (CT). After EEG measurements, the phantoms were scanned by CT to acquire the 3D model and true positions of dipoles for numerical simulations in three electromagnetic software tools based on finite techniques.
The organization of the paper is the following. Section II describes the fabrication of phantoms and modeling of a neural activity by dipoles. Moreover, the settings for EEG measurements are presented here. Section III deals with the development of 3D numerical models from CT and with the simulation setup for a subsequent computation of forward models in three EM software packages. In Section IV, the comparison of the measured EEG and computed electric potentials is shown. Moreover, the differences between measurements and simulations are discussed based on parametric simulations. Section V concludes the paper formulating the procedure for the validation of forward models.

II. PHANTOMS AND EEG MEASUREMENT SETTINGS
The following section reviews manufacturing of phantoms used for EEG measurements. We also describe electronic simulation of neural activity originating from dipoles that produce electric potential which can be measured by electrodes on a brain surface.

A. RAT HEAD PHANTOMS
We constructed two phantoms: 1) The simplified shape of a rat head (see Fig. 1a). Since the shape and the size of the rat head significantly differs from the human head, we used the shape of a block instead of a one-layer sphere [15], [16]. The dimensions 120 mm × 60 mm × 60 mm correspond to 4× scaled up size of a rat head. 2) CT-based rat head originating from images [38], [39] (see Fig. 1b). The phantom was of 1.8× scaled up size of a rat head. Scaling improves the linear behavior of the phantom and decreases the influence of feeding.
Both phantoms were composed from a shell representing the skull and an agar-sodium chloride (NaCl) mixture simulating the brain. Shells for both phantoms were printed on a 3D printer. The shell of a simplified phantom was printed by an Original Prusa i3 MK3S based on the fused filament fabrication (FFF) technology and the polyethylene terephthalate glycol (PETG) filament [40] was used as the printing material. The 3D printing stereolithography (SLA) technology and the Formlab standard resin [41] were exploited for manufacturing the CT phantom.
The agar-based mixture was composed from deionized water, NaCl, and agar [35], [42]. The development of the agarbased mixture and the measurement of electric properties followed the way described in [43].
Electric conductivity and relative permittivity of rat head phantoms were set to 0.33 S/m and 1.35·10 5 , respectively. Parameters correspond to the typical values used in the EEG source analysis [1], [3], [4], [5], [6], [7], [8], [9], [10]. The measurement of electric properties resulted in the electric conductivity 0.325 S/m and relative permittivity 1.35·10 5 that is approximately consistent with target values. Note that the agar-NaCl mixture is homogeneous and isotropic. Ultimately, both phantoms were filled by the same Agar-NaCl mixture to ensure consistent properties.

B. SIMULATION OF NEURAL ACTIVITY
A neural activity in forward models is commonly simulated by dipoles [3]. Physically, the dipole consists of two arms separated by a small gap. Here, we constructed the dipole from a coaxial cable. Arms were built from two conductors separated by a dielectric material. To the inner conductor of a coaxial cable, we soldered a small cylinder representing the upper arm of the dipole. When bending the outer conductor, we created the bottom arm of the dipole. Approximately, the diameter of the dipole arm corresponds to 1.4 mm, the length of each arm to 2 mm, and the gap between arms to 0.5 mm. Note that the dimensions of each dipole were measured with a microscope to acquire precise dimensions for FEM simulations.
The EEG was measured by electrodes. Here, we used small conventional pins placed inside the holes drilled into the phantom shell.
A detailed explanation of dipoles and electrodes manufacturing is described in our previous paper [43].

C. COMPOSITION OF PHANTOMS
Both phantoms were composed of: 1) Shell representing the skull. 2) Agar-NaCl mixture simulating the brain.
3) Set of dipoles modeling the neural activity. 4) Set of pins for measuring EEG.
The simplified phantom of the rat head was completed by 19 electrodes (see Fig. 2a). The top part of the shell contained 12 electrodes in two rows, and the side wall of the phantom contained 6 electrodes. Thanks to the side wall electrodes, electric potential was measured in various heights. In total, the EEG was measured by 17 sensing electrodes. The remaining two electrodes were the grounding (GND) electrode and the reference (REF) electrode. Generally, EEG was measured as a voltage on the sensing electrode with respect to the ground electrode. Finally, the electric potential was given by the difference of voltages on the sensing electrode and the reference one.
To attach all electrodes to the phantom, small holes were drilled to the shell. The tips of pins were aligned with the VOLUME 10, 2022 inner surface of the shell ensuring the EEG measurement on the brain surface.
The simplified phantom contained 5 exciting dipoles (D1-D5) implanted into the brain (see Fig. 2b). To ensure the fixed positions of the pins and dipoles, a hot melt glue gun was used. After mounting all electrodes and dipoles, the agar-NaCl mixture was poured into the shell and cooled to a room temperature. Note that the exact locations of dipoles were identified by CT after the EEG measurement.
The CT-based phantom was completed by 14 electrodes (see Fig. 3a). The layout of electrodes is identical with [44]. Similar to the simplified phantom, the 13 th electrode is the reference one (REF), and the last electrode corresponds to the ground (GND). Note that the grounding electrode is located on the interparietal bone.
The neural activity was modeled by 6 excitation dipoles (D1-D6). Since the space inside the phantom is small, the shell was horizontally cut into two pieces. After that, the dipoles were implanted to the bottom part and fixed with the hot melt glue gun. Finally, both parts were jointed together, the agar-NaCl mixture was poured into the shell, and the phantom was cooled to a room temperature.

D. EEG MEASUREMENT
The excitation signal was generated by IQ SIGLENT SDF60022X that was gradually connected to dipoles. In addition, we used the AC sine wave with frequency 1 kHz to eliminate an oxidation-reduction reaction which changes the electrode impedance.
The amplitudes of the exciting signal were 20 mV and 40 mV for the simplified rat head phantom and the CT-based one. The exciting voltages were set to ensure a sufficient signal-to-noise ratio and a linear regime of phantoms, since the frequency and the exciting amplitude can affect the electric conductivity [43]. Each dipole produced the electric potential measured by BioSDA09, a 32-channel digital EEG amplifier (MI Ltd., Prague, Czech Republic), via a cable (Data Sciences International, St. Paul, Minnesota, United States). The sampling frequency corresponded to 5 kHz. Workplaces for the EEG measurement for both phantoms are shown in Fig. 4.
First, the EEG was measured for the simplified rat head phantom and resulted in 17 values of a time dependent voltage for each dipole (thus, 85 voltage time series in total). For the CT-based phantom, 12 time series for each dipole were obtained (thus, 72 voltage time series in total). The EEG recording took 60 seconds for each dipole. Nevertheless, only 30 seconds from the center of the time interval were chosen for the post-processing due to the stabilization of the signal. Finally, the Fourier transformation was applied to the measured EEG signal and the absolute value of the component corresponding to the frequency of 1kHz was considered to be the potential difference amplitude due to the dipole excitation.

III. SOLVING THE FORWARD PROBLEM
This section is focused on simulating the forward models in three electromagnetic (EM) software packages. First, we discuss the creation of 3D numerical models of both phantoms using CT. Second, the simulation setup for all the software packages is described. Third, the two criteria to evaluate the difference between the measurements and simulations are proposed. Finally, the potential errors in experiment are introduced.

A. 3D MODELS
To acquire the precise shape of phantoms and exact positions of dipoles, the phantoms were scanned by CT one day after EEG measurements using the CT Siemens Somatom Definition Flash with the kind help of the CT department at the Institute for Clinical and Experimental Medicine in Prague. Three-dimensional images of simplified rat head phantoms were acquired with the slice thickness 0.6 mm, acquisition matrix 512 × 512 × 237, and the voxel size 0.19 × 0.19 × 0.60 mm. Due to the small dimensions of the CT-based phantom, a precise setting of the CT scanner was used: the slice thickness 0.6 mm, the acquisition matrix 512 × 512 × 185, and the voxel size 0.10 × 0.10 × 0.60 mm.
Tissues were segmented in ITK-SNAP software [45] using a combination of semi-automatic and manual tools. Both phantoms were segmented into four compartments: a brain, a skull, dipoles, and electrodes. An example of segmentation in the axial slice for both phantoms is shown in Fig. 5. Obviously, the glue was neglected in the segmentation process. Note that the black color between the dipole arms corresponds to the correct fabrication of the dipoles. Moreover, the drilled holes are visible in the bottom part of the CT-based phantom in Fig. 5(b).
Further, the mesh errors were corrected, and 3D models were prepared for FEM simulations. The FEM model of the simplified rat head phantom (see Fig. 6a) consists of 2 321 309 tetrahedrons (547 484 for the brain, 1 773 825 for the shell). The FEM model of the CT-based rat head phantom (see Fig. 6b) is created by 961 638 tetrahedrons (650 536 for the brain, 311 102 for the shell). The edge length VOLUME 10, 2022 of mesh elements was set to 1 mm for both phantoms. Due to the smaller dimensions of the CT-based phantom, a lower number of tetrahedrons was required. Moreover, the adaptive volume mesh refinement was used to ensure a finer mesh close to exciters. Note that we exploited the segmented data of dipoles and electrodes to determine their true positions in FEM models.

B. SOFTWARE AND SIMULATION SETUP
To compare measured electric potentials with numerical simulations, both FEM models were analyzed in three EM software packages: CST Studio Suite (Dassault Systems, Illinois, USA), COMSOL Multiphysics 4.3b (COMSOL Inc., Burlington, USA), and FieldTrip toolbox [46] implemented in MATLAB. Note that the cooperation of the Simbio toolbox [7] with FieldTrip is necessary to perform FEM computations.
Generally, the frequency of the excitation signal is neglected in the forward model. Moreover, the dipole is modelled as an analytical point-wise dipole. Here, the EEG was generated by physical dipoles with finite dimensions and frequency 1 kHz. Such parameters are accepted by CST Studio Suite and the EM problem can be conceived as a fullwave simulation.
Since CST allows to define real dimensions of the dipoles, their size was measured by a microscope. Positions of dipoles and electrodes were precisely determined from the CT. Moreover, the electric potential was sensed by point-wise electrodes in all three EM software packages. The electric conductivity and relative permittivity of the agar-NaCl mixture was set according to the values presented in section 2.A.
Software packages COMSOL Multiphysics and FieldTrip consider Poisson's equation, and the frequency of the exciting signal is neglected. Moreover, the analytical point-wise dipoles were used in COMSOL and FieldTrip. Further, the amplitude of the excitation signal cannot be changed in FieldTrip, and the resulting electric potentials have to be recalculated according to the amplitudes used in EEG measurements. Since Poisson's equation is linear and satisfies the superposition principle, the resulting electric potential can be divided by a constant.

C. ERROR EVALUATION
In order to assess the difference between the measured electric potential and the computed one, we used two criteria common in EEG forward modeling [47]. The first one, the relative difference measure (RDM), evaluates the difference in shape between two data sets: Here, ϕ ref corresponds to the measured electric potential, and ϕ num represents the computed electric potential. The second criterium, the magnification factor (MAG), evaluates the error in magnitude: Note that numerical simulations resulting in the same electric potentials as measured ones give RDM = 0 and MAG = 0.

D. INFLUENCE OF INACCURANCIES
Since our experimental measurements with phantoms can include slight inaccuracies in positions, we exploited CST Studio Suite for parametric simulations to study the effect of inaccuracies on the electric potentials. Specifically, we focus on the dipoles and electrodes shifts and dipole rotation. The parametric simulations were done for CT-based rat head phantom and the dipole D1. For clarity, the resulting electric potentials from the parametric simulations are shown for the closest electrode to the dipole (C3) and the furthest electrode from the dipole (T6).
First, we studied the rotation of the dipole causing an increase of electric potential on a group of electrodes and a decrease on a complementary group of electrodes. The parametric simulations were performed for rotation around X and Z axis ranging from -4 • to +4 • with the angular step 1 • , thus the simulations were performed for nine angles. The rotation of dipole in Y axis was neglected due to symmetry of the dipole, thus cannot influence the electric potential. The Fig. 7(a) illustrates the dipole rotation in X and Z axis.
Second, we studied the influence of the dipole shift in all the axes. In our case, the shift of the dipole can be caused by assigning the points to the closest nodes of the mesh or due to the finite resolution of CT that was exploited for the determination of positions of the dipoles and electrodes. The parametric simulation was performed for nine dipole shifts in all the axes ranging from -0.2 mm to +0.2 mm with the shift step 0.05 mm. The negative shifts of dipole D1 is shown in Fig. 7(b).
Lastly, we studied the shift of electrodes equivalent to the shift of the dipole. Similar to the dipole shift, the parametric analysis was performed for nine electrode shifts in all the directions ranging from -0.2 mm to 0.2 mm with the step 0.05 mm. The positive shifts of the electrode C3 is depicted on Fig. 7(b).

IV. RESULTS
The study is aimed to validate the accuracy of FEM forward models by comparing simulation outputs with measured electric potentials. Further, the sensitivity of parameters to the forward model with respect to the measurement is discussed.

A. SIMPLIFIED RAT HEAD PHANTOM
This section is focused on the comparison of measured and computed electric potentials for the simplified rat head phantom. Electric potentials were measured at 17 positions, and five dipoles were gradually connected to the generator (85 voltage time series in total). The resulting comparison of measured and simulated electric potentials is shown in Fig. 8    CST Studio Suite obtained more accurate average results due to the full-wave formulation of Maxwell's equations and the definition of dipoles by finite dimensions.
The error in electric potential up to 10 µV is obvious on electrodes 01, 02, 13, and 14 when the dipole D3 was connected to the generator. Since all the EM software packages resulted in very similar values of electric potentials on those VOLUME 10, 2022 electrodes, the error source should be probably assigned to measurements.
The worst MAG reached the FieldTrip in case of the dipole D3. The high MAG on electrodes 06 and 08 was probably caused by the fixed dipole orientation. Consequently, the dipole radiated less energy towards electrodes 06 and 08. The influence of the dipole rotation will be further investigated in Section 4.D.
Generally, the highest RDM and MAG was calculated for all software packages in case of the dipole D4. Here, the measured electric potential was increased for 15 µV on all electrodes compared to the electric potential predicted by numerical simulations. Such an error can be associated with the dipole shift from electrodes. Since the phantom is homogeneous, isotropic, and the distribution of electrodes is biased towards the upper part of the phantom, the dipole shift towards the bottom part can cause the decrease of electric potential on all the electrodes. Such phenomena will be further investigated in Section 4.D.

B. CT-BASED RAT HEAD PHANTOM
In this section, the CT-based rat head phantom is used for the validation of computed electric potentials by measurements. Electric potentials were measured at 12 electrodes for each dipole. Since the CT-based rat head phantom contained 6 dipoles that were gradually connected to the generator, 72 values of electric potential were measured in total. The resulting comparison of measured and computed electric potentials for all the dipoles is depicted in Fig. 9 and corresponding RDM and MAG are given in Tab 2.
Similarly to the simplified rat head phantom, the CST Studio Suite resulted in the most consistent electric potentials compared to measured EEG regarding to the lowest average RDM and MAG. Numerical simulations computed by COMSOL Multiphysics resulted in average to RDM = 0.038 and MAG = 0.084 that is almost the same average accuracy as reached by CST Suite Studio. Note that the COMSOL Multiphysics is based on the quasi-static approximation of Maxwell's equations, while the CST Studio Suite computes full-wave equations. On the other hand, FieldTrip showed the least accurate electric potentials, especially in the case of MAG. First, the higher MAG shown by Fieldtrip may be caused by assigning points to the closest node of the mesh (the dipole and the electrode positions can shift). Second, the size of the CT-based phantom is quite small (a small shift of the dipole or the electrode can change electric potentials significantly). Therefore, the influence of the electrode and the dipole position shift will be studied in Section 4.D.
Note that high electric potentials on distant electrodes (P3-T6) in case of dipoles D1 and D2 are caused by the reference electrode since the distance between the dipole and the reference electrode is small. In case of dipoles D1 and D2, FieldTrip shows the error 70 µV on all electrodes, approximately. Since the error in the electric potential is the same on all the electrodes, the shift of the reference electrode (due to assigning it to the closest node of the mesh) might be the most probable reason for this phenomenon.

C. INFLUENCE OF INACCURACIES
Here we reveal the origin of errors causing the difference between measured and simulated electric potentials.
The resulting parametric simulation for the rotation around the X axis is depicted in Fig.10(a) and for the rotation around the Z axis in Fig.10(b). Due to the symmetry of the dipole in the Y axis, the rotation cannot influence the electric potential. Evidently, the rotation of the dipole by 4 • can cause the decrease of electric potential by 40 %.
Note that the electrode C3 is placed above the dipole D1. Thus, the positive or the negative rotation of the dipole around X and Z cause similar errors. Differently, the electrode T6 lies in the longitudinal direction to the X axis. Therefore, the negative rotation results in a higher decrease of electric potential than the positive angles.
In case of the rotation around the Z axis, the decrease of electric potential on the electrode T6 is similar both for positive angles and negative angles due to the dipole rotating in the perpendicular direction. In our case, the best match with the measured electric potential can be reached by rotating the dipole by 1 • around the X and Z axis.
The resulting parametric simulation for the dipole shift in all directions is depicted in Fig. 11. Note that the shift x = 0 mm, y = 0 mm, and z = 0 mm corresponds to the default value presented in Section IV.C. Fig. 11(a) shows that the shift of the dipole by a positive value causes a slight increase of electric potential due to the reduction of the distance between the electrode C3 and the dipole D1. Since the electrode C3 is the closest electrode to   the dipole D1, electric potential reaches the highest value. Similar to the shift in the X axis, the shift in the Z direction (Fig. 11c) results in a slight influence. Here, the shift by the positive value causes an increase of the distance between the electrode C3 and the dipole, thus the decrease in electric potential. Nevertheless, the shift of the dipole along the Y axis results in two times higher variation of electric potential compared to the shift of the dipole in X or Z axes. Note that the Y axis corresponds to the perpendicular direction to the brain surface. Since the electrode T6 is placed on the opposite side compared to the electrode C3, the electric potential increases on the electrode T6, while decreasing on the electrode C3. Nevertheless, the variation of electric potential on the electrode T6 is quite small for dipole shifts in all axes. Comparisons of parametric simulations with measured EEG show that more accurate results cannot be achieved by the dipole shift, since the shift improves electric potential on the electrode C3 but worsens it on the electrode T6.
The results of parametric simulations for the shift of electrodes in all the axes are depicted in Fig. 12. Similar to the dipole shift, the shift of the electrode C3 along the Y axis caused two times higher variation of electric potential compared to the shift in the X axis and the Z axis. Note that the shift of the dipole by the positive value increases electric potential, while the shift of the electrode by the positive value causes the decrease of electric potential. Despite of the dipole shift, the shift of the electrode T6 in all the axes leads to the constant electric potential. When we compare the measured electric potential with the parametric simulation, more accurate results can be obtained by the shift of electrodes, since the effect to the electrodes in a longer distance is negligible.

V. CONCLUSION
In this paper, we validated three EM software packages used for forward modeling of brain waves in rat's brain. The validation compared numerical models with measurements of rat's EEG on two agar-based rat head phantoms. The first phantom represented the simplified shape of rat's head (the block) while the second phantom corresponded to the anatomically precise shape of the head based on CT.
To simulate brain activity, we used dipoles constructed from coaxial cables which were implanted inside the phantom. After EEG measurements, phantoms were scanned by CT to acquire shapes of phantoms and positions of dipoles and electrodes for precise numerical models.
CST Studio Suite computed electric potentials which were the most consistent with measured EEG regarding to the lowest average RDM and MAG. The worst accuracy was obtained in case of FieldTrip for both the phantoms. The COMSOL Multiphysics resulted in similar errors as Fieldtrip in case of the simplified rat head phantom. Nevertheless, almost the same average MAG and RDM values were achieved by COMSOL as CST Studio Suite when the CT-based rat head phantom was simulated.
When the reasons of differences between measured and simulated electric potentials were studied, following grounds were revealed. The rotation of the dipole resulted in significant influence on electric potential for close and far electrodes. For example, the decrease of electric potential by 40 % was shown for the closest electrode to the dipole due to the rotation by 4 • . Therefore, we can conclude that the precise definition of the dipole orientation can play an important role in case of forward modeling. This finding has particular impact on future studies using so called fixed dipoles oriented perpendicularly to the cortex. It should be considered that even small error in estimated dipole direction can cause high error values in the forward and consequently in the inverse solutions.
The parametric simulations of the dipole or electrode shifts showed that the shift in the perpendicular direction to the brain surface can cause two times higher error approximately than the shift in longitudinal directions. Finally, the shift of electrodes far from the dipole can cause negligible effects to the electric potential.