![](https://csdnimg.cn/release/download_crawler_static/18879365/bg4.jpg)
factor is the standard deviation of a good quality EEG
signal, found experimentally using this specific instru-
ment. This number was calculated as K = 20, and this
normalization step created an epoch with a shape identi-
cal to that of the original EEG signal, but transferred
into a uniform scale, with comparable amplitude for
every epoch. Moreover, this normalization step do not
changes the phase correlation among all the EEG chan-
nels. The entire file fully processed as such was saved as
new file in .CSV format, containing all the information
about the start and the end of each stimulus.
Note that it is also possible to pre-process only time-
locked epochs, for example, 3 s long, corresponding to each
stimulus [pre-stimulus + stimulus (1 s) + post-stimulus],
and in general, this procedure gives non-identical results
although very similar to the previous method based on the
filtering and saving of the entire file.
Another common way to pre-process the data for the
ERP calculation is the exclusion of every epoch with an
amplitude above a fixed threshold, for example, 80 μV.
A disadvantage of this technique is that a large number
of epochs could be discard ed and consequently the aver-
age could be calculated on insufficient data. In our soft-
ware, we also used this procedure to eliminate epochs
with strong artifacts above 100 μV still present after the
digital filtration.
In this paper, we will illustrate a new method which is
useful for detecting ERPs even among particularly noisy
signals and with significant latency variations, known as
“latency jitter”.
Our method, called GW6, is less restrictive regarding
the issue of jitter, and allows ERP detection when the
standard approach, based on the average, fails or gives
unsatisfactory results due to several artifacts. However,
the new method does not reproduce the typical biphasic
waveform of the ERP but rather an always positive wave-
form. For this reason, this new procedure is useful if
used together with the classic te chnique of averaging, ra-
ther as an alternative to the latter.
The new method uses Pearson’s correlation extensively
for all EEG signals recorded by a multichannel EEG
device. By using the method of averaging, it is possible
to work with a single EEG channel too, whereas the
GW6 method works only with a multichannel EEG de-
vice, starting from a minimum of about six channels.
Nevertheless, it is also possible to calculate the ERP for
each channel as in the standard method.
In many papers describing a mathematical method to
analyze something, formulas are usually given, which
must be subsequently translated into a computer-
language, for example C, C++, Visual Basic, Java, Python,
Matlab, or other. This step could be difficult and limit
the release and application of some useful methods. In
this paper, we will describe this new algorithm as a ste p-
by-step procedure and also in the simple and well-
known Matlab programming language, in order to ease
its application (see Additional file 1: Appendix).
We describe the basic idea of this new method in
Figs. 1 and 2.
Let us now consider the Fig. 2 and the double data-
window lasting L (about 270 ms, 34 samples) centered
at point X of the signal. We can calculate the linear
Pearson’s correlation between these two data segments,
and the result will be a number r represented by the vec-
tor R(x), which can be calculated for every point X sim-
ply by progressively moving the windows along by one
sample unit at a time (sliding windows). In general, the
averaged value of R(x) will vary from the pre-stimulus
zone to the stimulus zone because the (auditory or/and
visual) stimulus changes the correlation between the two
EEG signals, which represent the activity of different
parts of the brain. An interval about 270 ms long was se-
lected because it represents the typical amount of time
required for a conscious response corresponding to the
P300 wave, but different intervals could be selected for
fast Evoked potentials, or other types of stimulus.
This change of correlation can appear either as an
increase or a d ecrease with respect to the baseline
(i.e., the zone preceding the stimulus). Let us consider
a real example, based on the Emotiv EPOC®, where
the number of channels is N C = 14, the sampling fre-
quency is 128 samples/s , the stimulus l ength is 1 s ,
Fig. 1 The two upper tracks represent the raw signals of two EEG channels in time-locked epochs, whereas the lower track is the average of a
sufficient number (about 100) of epochs for each channel (ERP is not to scale). The figure shows a positive peak about 300 ms after the stimulus’s
onset (P300 wave). The ERP’s typical duration is about 300–500 ms, depending on the kind of stimulus and band-pass filtering of the signal
Giroldini et al. EURASIP Journal on Bioinformatics and Systems Biology (2016) 2016:11 Page 4 of 13