Eeg/erp analytic Tools Management System

Download 82.45 Kb.
Size82.45 Kb.

EEG/ERP Analytic Tools Management System
Jan Štěbeták, Tomáš Řondík, Roman Mouček, Department of Computer Science and Engineering, Faculty of Applied Science, University of West Bohemia, Pilsen, Czech Republic.
Jan Štěbeták

University of West Bohemia

Department of Computer Science and Engineering

Univerzitní 22,

Pilsen, 30614, Czech Republic


Neuroinfomatics laboratories produce a lot of experimental data, which has to be stored and further processed. This paper introduces a management system for signal processing and sharing analytic tools. Although several systems for signal processing exist, their sharing is not satisfactorily solved. Authors present a server-side approach, which provides processing signal via analytic tools. Since the implemented methods are accessible via the SOAP Web Service, integration with system providing data storage is implemented. Integration and sharing signal processing methods with other systems is available. The set of methods is implemented and presented. The design of workflows is also presented.

Keywords: Electroencephalography; Event-related potential; Analytic tools, Web Services; Integration; Workflows


In our research group we specialize of research of a brain activity. During our experiments we widely use the methods of Electroencephalography (EEG) with its subset Event-Related Potentials (ERP). Experiments are performed in a neuropsychological laboratory including recording devices or a car simulator. When experiments are performed experimental data and metadata are collected for future processing. Since neuroscience community is facing problems with the long-term storage of data and metadata, raw data analysis, or sharing data and analytic methods, International Neuroinformatics Coordinating Facility (INCF, 2012) released recommendations (Van Pelt and van Horn, 2007) for handling neurophysiologic data.
As members of the Czech National Node of International Neuroinformatics Coordinating Facility (INCF) we cooperated one the definition of data and metadata format for electrophysiology research. Our efforts resulted in a custom solution – the EEG/ERP Portal (Jezek and Moucek, 2010). Data are stored within the EEG/ERP Portal and are accessible via a web browser.
Because data from stored experiments are usually further processed using various signal processing methods, the EEG Data Processor (Jezek and Moucek, 2013) is presented.
This paper describes methods for obtaining ERP components from EEG records and analytic tools for detection ERPs. Since scientists appreciate the possibility to have experimental data and processing methods on the same place, we presented integration of analytic tools to the EEG/ERP Portal. The last part of this paper deals with a design of workflows.

2Materials and methods

This section briefly describes the development of neuroinformatics infrastructures, methods of detection ERP components, development of methods for EEG/ERP signal analysis, and system integration.

2.1Neuroinformatics infrastructures

The neuroinformatics infrastructure is being built in several INCF national nodes in parallel. The INCF portal includes e.g. a software center for easy storage and sharing of neuroinformatics software tools, a content management system for national nodes presentation and provides access to supercomputing resources for the neuroinformatics community.
Modular Toolkit for Data Processing (MDP) (Zito et al., 2008) is a data processing framework written in Python. MDP is a modular framework that Python programmers can extend by additional modules. Common users can call implemented modules locally.
The British CARMEN system (Watson et al., 2007) has been designed to allow neuroscientists to share data and programs (services) from neurophysiological experiments. The ‘Portal’ is a web interface onto the CARMEN system, and provides end‐users with access to the computer and data storage resources which are at the core of the system.
The portal provides following set of features

  • Search across archived data set

  • Upload, annotate, and store experimental data

  • Run processes and routines on the stored data on the CARMEN computers

The analysis services are implemented as ‘web‐services’ on the CARMEN system.

2.2ERP components and methods

P300 component (Fig. 1) is a component obtained from an EEG signal which correlates with the specific brain activity. This component appears as a brain response to an unexpected external stimulus. The normal delay of the occurrence is approximately 300 ms after the appearance of the stimulus.

Fig. 1 Example of P300 component

The methods (Luck 2005) for analyzing a pure EEG signal are used especially in medicine for detecting epileptic waveforms and sleep disorders, or for indicating brain death. The cluster analysis and adaptable neural network are widely used. The fundamental method for obtaining ERP components from the EEG signal is averaging.
A stimulus is repeated during an experiment and brain responses are averaged into one response. Many subjects can be measured using one experimental scenario and these subjects can be associated into subject groups depending on their age, gender, or disease. The grand average is one representative brain response to an external stimulus in the whole group

2.3Levels of System Integration

2.3.1Data Layer Integration

Data integration involves combining data residing in different data repositories and providing business users with a unified view of this data.  The top batch-oriented technique that companies utilize is known as ETL (Extract – Transform – Loading, Fig. 2) (ETL, 2011).

Fig. 2 Principle of ETL

ETL enables physical movement of data from source to target data repository. The first step, extraction, is to collect or grab data from its source(s).  The second step, transformation, is to convert, reformat, cleanse data into format that can be used be the target database.  Finally the last step, loading, is import the transformed data into a target database, data warehouse, or a data mart.
ETL tool providers:

Commercial ETL Tools:

  • IBM Infosphere DataStage

  • Informatica PowerCenter

  • SAP Business Objects Data Integrator (BODI)

  • SAP Business Objects Data Services

  • Oracle Warehouse Builder (OWB)

  • Oracle Data Integrator (ODI)

  • Data Integration Studio

  • Microsoft SQL Server Integration Services (SSIS)

  • Ab Initio

  • SyncSort DMExpress

  • iWay DataMigrator

  • Pervasive Data Integrator

Freeware, Open Source ETL tools:

  • Pentaho Data Integration (Kettle)

  • Talend Integrator Suite

  • CloverETL

  • Jasper ETL

2.3.2Application Layer Integration

Remote Procedure Call (RPC) is widely used for constructing distributed, client-server based applications. A client application calls a remote procedure (method), transfers data to a server application, and waits for a result. For web applications there is used Web Services technology (Jie Liu et al., 2006).
Web Services uses XML messages and HTTP protocol (HyperText Transfer Protocol). Web Services use XML Schema for data type definition and XML Namespaces for objects identification. Web Services includes three cores:

  • SOAP (Simple Object Access Protocol)

  • WSDL (Web Services Definition Language)

  • UDDI (Universal Description Discovery and Integration)

SOAP is a simple XML-based protocol that allows to communicate applications information over HTTP without the dependency of OS platform. SOAP uses HTTP and XML as the mechanisms for information exchange.

Current free and commercial implementations available for Web Services:

  • Apache SOAP, Axis 1 and Axis 2. SOAP and Axis 1 are now obsolete; use Axis 2 instead.

  • JAX-WS Reference Implementation

  • JAX-RS Reference Implementation

  • Metro (includes the JAX-WS reference implementation)

  • Apache CXF (formerly called XFire)

  • MS.NET

  • Java 6 includes the JAX-WS reference implementation (and a minimal server for it)

Cloud computing is the use of computing resources (hardware and software) that are delivered as a service over a network (typically the Internet). The name comes from the use of a cloud-shaped symbol as an abstraction for the complex infrastructure it contains in system diagrams. Cloud computing entrusts remote services with a user's data, software and computation.

2.3.3Presentation Layer Integration

Web portals (Ingyin, 2006) are a means for presentation level integration of enterprise application and services. Web portals allow the users to select the links they would like on their personal page. A portal is built upon layers of services and component modules. Portlets are used by portals as pluggable user interface components that provide a presentation layer to information systems. Portal provides Web based personalizable and integrated system to access internal and external application which support user process and implement front-end integration.

3EEG/ERP Portal

Our research group has developed an EEG/ERP Portal (fig. 3) because of a need for storage of EEG/ERP experiments gained from encephalography research. This portal enables research groups to store, manage and download their experimental data and metadata. Portal is developed as a standalone product running on servers in our department. The usage of the Portal does not require any special software installation, only a web browser.
The portal application is based on Spring MVC (Spring, 2011) technology (Model – View – Controller). Access to the EEG database is ensured by framework Hibernate (Hibernate, 2011). This framework is used for object-relational mapping. It also protects our portal against SQL injection attack among other things. The portal uses JSP technology (Java Server Pages) including JSTL for displaying HTML pages into user´s browser. The Portal provides:

  • Management of EEG/ERP data and metadata

  • Management of EEG/ERP experimental design (experimental scenarios)

  • Management of data related to tested subjects

  • Sharing of knowledge and working within groups

  • Content management system

  • Full-text and advanced search

The data are protected by the system of user accounts with defined user roles. Individual users are grouped into self-managed groups. On the basis of activities that the user can perform four user roles are recognized (Reader, Experimenter, Group Administrator, and Supervisor). The user who wants to upload or download experiments has to create an account and to become a member of at least one group.

Fig. 3 EEG/ERP Portal frontend

4 Analytic Tools

This section describes methods that we use for obtaining ERP components, removing artifacts, and detecting the P3 component. Averaging is the fundamental method for obtaining ERP components and removing artifacts. We use the Fast Fourier Transform and Fast ICA algorithm for detecting and removing artifacts. For detecting the P3 component there are used following set of methods: Matching Pursuit, Discrete and Continuous Wavelet Transform, and Hilbert-Huang Transform.
Fourier transform (FT) is the oldest method of signal analysis. This method allows you to convert the signal from time domain to the frequency, which means that it can detect all frequency components occurring in the signal, and level of their representation [9]. Its discrete variant is often used in computer science. We use FFT for detecting frequency in EEG/ERP signal during experiments with steady-state potentials. FFT is also used in implementation of matching pursuit algorithm according to [820]. We implemented two methods for signal spectrum estimation as well – BlackmanTukey.
The matching pursuit (MP) (Vareka, 2012) algorithm decomposes any signal to the sum of so-called atoms, which are selected from the dictionary. The atom that best approximates the input signal is chosen in each iteration. This atom is subtracted from the input signal and the residue enters the next iteration of the algorithm. The total sum of atoms selected successively in algorithm iterations is an approximation of the original signal - more iteration we do, more accurate approximation we get. The algorithm was originally described in [MP]. We decided to implement this method according to [820] where the Gabor dictionary is used.
For displaying results we implemented the time-frequency transformation known as Wigner-Ville transformation. The input of this transformation is the set of chosen atoms. Energy of atoms shows the occurrence of P3 waveform.
Wavelet Transform (WT) (Ciniburk et al., 2010) is a suitable method for analyzing and processing non-stationary signals such as EEG. For EEG signal processing it is possible to use continuous wavelet transform (CWT) or discrete wavelet transform (DWT). Both CWT and DWT were tested during our research focused on automatic ERP detection. WT is a suitable method for ERP detection because it has a good time and frequency localization.
DWT is common in computer science because of high performance caused by its algorithmic complexity. We’ve implemented a lot of wavelets which can be used in DWT. The reason is that for our research in automatic ERPs detection is necessary to have a wavelet which corresponds to detected ERP as much as possible. And there are many ERPs with different waveforms.
Available wavelets: Coiflet6, Coiflet12, Coiflet18, Coiflet24, Coiflet30, Daubechies4, Daubechies4, Daubechies6, Daubechies8, Daubechies10, Daubechies12, Daubechies14, Daubechies16, Daubechies18, Daubechies20, Haar, Symmlet4, Symmlet6, Symmlet8.
CWT is often replaced in computer science by its discrete form because of its algorithmic complexity. However, we decided to make this method accessible for signal processing in EEG Portal. The reason is size of step by shifting a wavelet on original signal and is described in [Souhyho diplomka] in detail.
Available wavelets: ComplexGaussian, ComplexMorlet, Gaussian, MexicanHat, Morlet.
Independent Component Analysis (ICA) (Hyvärinen et al., 2001) is a well-known method for blind signal separation and signal deconvolution. In the EEG/ERP domain, ICA can be used for artifact removal, ERPs detection, and – generally speaking – for detection and separation of every signal which is independent on EEG activity.
We implemented four common filter types: low pass, high pass, band pass, and band reject, which can be parameterized to get a desirable filter. These filters allow us to get rid of undesirable frequencies from input signal. This is typically first step in EEG/ERP processing because we know which frequencies are common in this kind of signal – any other frequency is regarded as noise.


5.1EEG Data Processor

EEG Data Processor is a web based application, which offers analytic tools for EEG/ERP signals. This application does not need any installation, only web browser. The frontend design is on figure 4.

Fig. 4 EEG Data Processor frontend

This application is written in Java language. We use the Spring Framework and AJAX technology for processing HTTP requests. For connection to the database we use the Hibernate framework. To the database there are stored registered users, which are permission to use the EEG Data Processor. The authentication process is ensured by Spring Security. The application design is on figure 5.

Fig. 5 EEG Data Processor architecture

The internal structure consist of several components:

  • EEG Binary Loading – It loads data from binary files obtained from an analogue-digital converter. We currently suppord data obtained from the Brain Vision Recorder.

  • Processong Resource Pool – Since performance capacity of the hosted server is limited, we have implemented a pool of available resources. The systém can be configured to manage a number of requests simultaneously.

  • EEG Processing Algorithms – This module manages a running of installed plug-ins. It has access to the list of installed plug-ins and calls a method invoker.

  • External Method Invoker – Is responsible for execution of a requested method. It parses the method parameters an takes the method result.

5.1.1Supported Data Format

Since there are not standardized format for EEG/ERP domain, we use data format, which is provided by Brain Vision Recorder. This format includes binary data file .eeg where signal values are encoded. This data format encoding is described in a header file .vhdr. An example of a header file is given below.
[Common Infos]
; Sampling interval in microseconds

[Binary Infos]


[Channel Infos]

According to the header file, we have implemented the reader of the binary file. The output of this reader is a field of double numbers (signal values).
The last type of file produced by Brain Vision Recorder is a marker file .vmrk. This file contains positions of stimuli in the EEG signal. An example of a marker file is given below.

[Common Infos]

[Marker Infos]
Mk1=New Segment,,1,1,0,20100223094409773314
Mk2=Stimulus,S 1,32661,1,0
Mk3=Stimulus,S 2,34481,1,0
Mk4=Stimulus,S 3,36301,1,0
Mk5=Stimulus,S 4,38121,1,0
Mk6=Stimulus,S 5,39941,1,0
The EEG Data Processor is fully prepared for adding support of a new data format.

5.1.2Adding New Methods

Currently, we design a plug-in system for registering and adding new analytic tools. This system allows adding new methods automatically. Nevertheless, we are focused only for methods developed in Java language. These JAR libraries have to follow the criteria:

  • The initialization method must be void type

  • XML description of the output. Because output of individual methods can be different, the XML format ensures its easier future representation

  • To the JAR libraries must be attached a setting file, where the initialization Method have to be described

An example of the setting file is given bellow.

algorithmName=Matching pursuit
The next challenge leads in providing a wrapper for a set of most often used programming languages in signal processing such as Python, C/C++, Pearl, or Matlab.

5.2Integration of Applications

5.2.1Purpose of Integration

The purpose of integration is to enable users of EEG/ERP Portal analyzing their data using analytic methods mentioned in Chapter 4. The second goal is to allow sharing analytic tools using this application as a third party service provider.
Since analytic methods are time-consuming and computationally demanding, EEG Data Processor is running on another server than EEG/ERP Portal. This separation ensures that users of EEG/ERP Portal are not influent by running analytic methods.
Because of sharing methods, the data layer integration has been rejected. This approach only allows sharing data between both applications. However, data stored in EEG/ERP Portal database would be available for EEG Data Processor; users of EEG/ERP Portal would have to open EEG Data Processor in their browser and then analyze their data. We decided for the business layer integration, which is based on remote procedure call. This approach allows using analytic tools via EEG/ERP Portal. It also provides sharing these tools, because remote methods can be called from many applications.


The technology used for remote procedure call is known as Web Services technology. This technology is suitable for point to point integration for web based applications. Currently, we have two web based applications (EEG/ERP Portal and EEG Data Processor). Both applications are based on Spring framework. Apache CXF is frequently used implementation of Web Services technology for such applications.
Apache CXF is an open source services framework that makes web service development easy, simplified, and standard based. This technology is used for client-server based integration of web applications. The client application will prepare an order and send it to the server application through a business method call. The server application will contain a web service that will process the order. For implementation we use code-first approach. It includes three following steps:

  • Create a Service Endpoint Interface (SEI) and define a business method to be used with the web service.

  • Create the implementation class and annotate it as a web service.

  • Create an xml configuration of the service class and a Spring bean using JAX-WS frontend.

The interface below is the Service Endpoint Interface defying methods, which EEG Data Processor provides.



public interface ProcessService{

* Returns number of currently available processing units.

* @return available processing units


public int availableProcessingUnits();


* Getter of parameters necessary for method to run.

* @param fileFormat supported file format

* @param methodName name of desired process method

* @return array of parameters


public MethodParameters[] getMethodParameters(SupportedFormat fileFormat, String methodName);


* Returns byte array of processed data

* (will be replaced by output format in time)

* @param data files to be processed

* @param fileFormat one of supported file formats

* @param algorithmName name of processing algorithm

* @param params other parameters

* @return bytes of processed data


public byte[] processData(DataFile[] data, SupportedFormat fileFormat, String algorithmName, String[] params);


* Getter of available algorithm names.

* @return algorithm names


public String[] getAvailableMethods();

The interface and the implementation have been created. It is necessary to configure an endpoint in an xml file. In EEG Data Processor the webservice.xml file is used. Configuration is given below.




Id specifies a unique identifier for a bean, implementor specifies the actual web service implementation class, and address specifies the URL address where the endpoint is published. The URL address must be relative to the web context.

5.3Design of Workflows

Since data processing often requires usage of more methods sequentially, development of specific workflows is required. Apart from sharing the methods described above, we will provide an opportunity to create, use, and share workflows in the EEG/ERP Portal. Workflows will simplify the work with data and methods and offer more comfort to users.
Now we are working on design and technological aspects of workflows. We need to extend the database by the tables for workflows defined by users. There are two types of analytic methods:

  • Signal processing methods such as Matching Pursuit or Wavelet Transformation

  • Signal preprocessing methods such as averaging or filtering

Technically, workflow means to put analytic methods into a pipe, where an output from the previous method becomes an input to the next method. The signal processing methods modify the signal; their input and output have the same format. These methods are compatible and could be put anywhere into the pipe. Signal processing methods provide result in other format.

We consider several approaches, how to deal with the incompatibility of provided output formats. The first idea consisted in putting signal processing methods at the end of the pipe because of the other output format. This approach would allow modifying an EEG/ERP signal using signal preprocessing methods and analyze it as one task. Nevertheless, this approach would not allow further processing of analytic result. There are also methods for visualization of this result. These methods should be put into the pipe after signal processing methods.
Considering this point, we are developing a workflow management system. This system will check the compatibility of input and output parameters. An example of parameters type and explaining of the compatibility is given below.

  • Output parameter type from averaging method is an array of double values (EEG/ERP signal). Input parameter type of Wavelet Transformation is the array of double values as well. These parameters are compatible.

  • Output parameter type from Matching Pursuit method is a two-dimensional array (values of atoms). Input parameter type of scalogram, which is used for visualization of result is a one-dimensional array. Parameters of these methods are not compatible. Scalogram is used for visualization of Wavelet Transformation result.

This management system will solve the issue about further processing of analytic result. However, parameters, which are syntactically compatible, do not have to be semantically compatible as well. It means, one-dimensional arrays match syntactically but in case of averaging, output is an EEG/ERP signal. Output format of Wavelet Transformation is a one-dimensional array as well, but in this case it returns computed coefficients.

As a solution of this issue we will extend our database. It will provide a list of available methods, input and output parameters type, and description of these parameters. This information will be provided to users, who will create their own workflows. A user will decide which method he/she put into the pipe and he/she also decides the order of these methods. The graphic user interface will be developed, which allows creating and saving user´s own workflows.
Workflows are organized as a tree structure (Fig. 6), where each branch of the tree has the same meaning as a pipe in Linux; an output of the method serves as an input of the next method.

Fig. 6 Example of a workflow tree


We did some performance tests to be sure that our encapsulation of discrete signal processing methods and their integration into EEG portal doesn’t have a negative impact on its performance.


We run four test routines for each discrete signal processing method. Each routine with different number of samples in input signal: 256, 512, 1024, and 2048 (we used real EEG/ERP signal, but there is no difference in performance which depends on input signal characteristic). Each routine was repeated one thousand times to minimize measuring error caused by third parties (CPU task planning, asynchronous events, etc.). Our effort was keep the same conditions for all methods as much as possible – we used the same configuration (Win 7 Professional SP1 x86 with Java Runtime Environment 7 on Intel Core 2 Duo 2 GHz, 1066 MHz FSB, 3 MB L2 cache, 3 GB DDR2 RAM – no multithreading was used) and only one application - which was started by user - was our test routine started from terminal.


  • DWT: Haar wavelet, all possible wavelet strengths were computed

  • CWT: Mexican hat wavelet, step 1, wavelet strength set to 60

  • MP: Gabor base was used, decomposition to 10 atoms

  • FastICA: decomposition to 10 independent signals

  • FFT: there is no parameter to be set up

5.4.3Test result

We obtain following results (Table 1):
Table 1. Test results

Average time in milliseconds for each discrete signal processing method

Number of samples






























Results are also displayed in graphs (Fig. 7):

Fig. 7 Test of signal processing methods

The results look like we expected. Performance of DWT, FastICA, and FFT is in normal and we expect that there is no reason to do some performance optimization in future. CWT is implemented as brute-force algorithm so its performance is not a surprise. The performance of matching pursuit algorithm is worse.

6Discussion and conclusion

Although several systems that implement signal processing methods exist, their sharing and remote procedure calling is not satisfactorily solved. We have developed a neuroinformatics infrastructure. This infrastructure is composed of two web based application. Since neuroinformatics research produce lot of data, the EEG/ERP Portal was developed. The EEG/ERP Portal enables research groups to store, manage, and download their experimental data and metadata. The second application, EEG Data Processor enables to analyze experimental data.
Remote procedure call is widely used for business layer integration of application. For web based applications there is used Web service technology. Since both applications are developed using Spring framework, we use Apache CXF implementation of Web services. This integration allows users of EEG/ERP Portal analyzing their data using methods implemented in EEG Data Processor. Since sharing data and tools is very helpful for scientific community, used technology also provides analytic methods of EEG Data Processor to a third-party application. But using of this technology for sharing analytic tools has one disadvantage. A developer of a third-party application, who wants to integrate analytic tools provided by EEG Data Processor, is forced to modify his/her application. It is necessary to implement the Web services client into this application.
Since data processing often requires signal preprocessing before using signal processing method, the purpose of workflows is presented. According to this design we need to extend our database and then we will develop a workflows management system and graphic user interface for creating and running workflows via web browser.
We plan to investigate possibilities in the area of Cloud Computing. The suitable cloud should help us to improve management of system resources. We also plan to investigate and develop plug-in system, which allows users to add new analytic methods written in various programming language, not only in Java.



Ciniburk, J., Mautner, P., Moucek, R., Rondik T., (2010).
ERP components detection using wavelet transform and matching pursuit algorithm, DCII,

ETL (2011), Data Integration Techniques [online]
Hibernate (2011), [online]
Hyvärinen, A., Karhunen, J., and Oja, E. (2001). Independent Component Analysis. Adaptive

and Learning Systems for Signal Processing, Communications and Control. J. Wiley.

INCF (2012), International Neuroinformatic Coordinating Facility, [online]

Ingyin, O., (2006), Presentation Level Integration of Portal Personalization Architecture,

Information and Communication Technologies, 2006. ICTTA '06. 2nd, pages 564-565.
Jezek, P., Moucek, R., (2010). System for storage and management of EEG/ERP experiments

- generation of ontology. In ICEIS 2010, vol. 1 , Databases and Information Systems
Madeira: SciTePress.
Jezek, P., Moucek, R., (2013). Electroencephalography Data Processor. HEALTHINF 2013 -

International Conference on Health Informatics, Barcelona, pages 357-361.

Jie Liu, Er-peng Zhang, Jin-fen Xiong, and Zhi-yong Lv, (2006). Deployment of Web

Services for Enterprise Application Integration (EAI) System, Berlin.
Luck, J. Steven, 2005, An Introduction to the Event-Related Potential Technique.
Cambridge, Mass.: The MIT Press.
Vareka, L. (2012). Matching Pursuit for P300-based Brain Computer Interfaces, Prague.

Spring technology (2011), [online]

Van Pelt, J. and van Horn, J. (2007). 1st incf workshop on sustainability of neuroscience

Databases. Workshop, Stockholm.
Watson, P., Jackson, T., Pitsilis, G., Gibson, F., Austin, J., Fletcher, M., Liang, B., and Lord,

P. (2007). The CARMEN Neuroscience Server. Proceedings of the UK e-Science All hands

Meeting, pages 135-141.
Zito, T., Wilbert, N., Wiskott, L., and Berkes, P. (2008). Modular Toolkit for Data Processing

(MDP): A Python Data Processing Framework. Frontiers in neuroinformatics, 2.
Download 82.45 Kb.

Share with your friends:

The database is protected by copyright © 2024
send message

    Main page