FILDIG: A program to filter brain electrical signals in the frequency domain

https://doi.org/10.1016/j.cmpb.2005.07.002Get rights and content

Summary

A software program to filter brain electrical signals in the frequency domain has been developed and is presently reported. Many other filters are commercially available; however, most of them are linked to data acquisition and/or analysis programs rendering them costly. Depending on the experimental field, the full programs are not always needed. To overcome the need to obtain narrow bands in EEG research and other biological signals in an easy, fast and cheap way, we developed a computer program (FILDIG) that renders an almost ideal in-phase filter in the frequency domain and can be used in all types of personal microcomputers (PC and Mac's) and with few resources. The system uses an interactive graphic display and, with a minimum interface, it is capable of filtering multiple channels and simultaneously obtaining electrical signals (EEG, EMG, EOG, etc.) without noise or specific frequency bands.

Introduction

Current research on brain electrical activity and brain function is increasingly based on quantitative computerized analysis. The vast results thus obtained have demonstrated that there are many oscillations at specific frequencies in the brain showing functional relations to specific cognitive functions and physiological states [1], [2], [3], [4], [5]. The need to obtain and analyze specific oscillatory activities is not restricted to EEG analysis. Other research areas involving electrical signals such as the accelerometric signals of pelvic thrusting during copulatory movements of male rats [6] require the extraction of specific frequencies.

The increasing interest in specific frequencies, not only in traditional broad bands but also in very narrow bands, requires mathematical tools and computations to filter not only noise but also undesirable frequencies and to work with certain narrow bands. This can be achieved at the analogic and/or digital stage of EEG recording and analysis. Several digital filters have been developed in time and frequency domains. Time domain digital filters can be recursive and non-recursive. Non-recursive filters only use values of the time series and directly eliminate the values of the non-desired frequencies such as the finite impulse response filter and moving average filter, while recursive filters use their own output to generate a new filtrate time series, such as the infinite pulse response and autoregressive moving average filters [7]. Although digital filters in the time domain are easier to understand, to design and to program in digital computers because they do not include complex transformations, they do involve vast time-consuming computations on time series values that, even now with the new and powerful computers, make it almost impossible to obtain an ideal filter by these methods [7], [8].

To cope with this disadvantage, digital filters in the frequency domain are frequently used. These filters generally involve the multiplication of the spectral value of the desired frequencies by the values of one window. The in-phase filters preserve the phase of the chosen frequencies, while in the in-quadrature filters, the phase of the chosen frequencies is moved one-quarter of their period, that is, 90°. In-phase filters are used to separate the periodic components of a time series, while in-quadrature filters and combined (in-phase/in-quadrature) filters may be used to detect brief oscillations (possibly artifacts) [9].

Many filters are commercially available; however, most of them are linked to data acquisition and/or analysis programs, which make them costly. Depending on the experimental field, the full programs are not always needed. To overcome the need to obtain narrow bands in EEG research and other biological signals in an easy, fast and cheap way, we developed a computational program (FILDIG), which renders an almost ideal in-phase filter in the frequency domain and can be used in all types of personal microcomputers (PC and Mac's) and with few resources.

The program takes advantage of the Fourier transform [8], [10]. The program consists of three basic steps: first, the time series data are transformed by the mean of the discrete Fourier transform (DFT); second, the spectral values of desired frequencies are multiplied by values of a certain window, which is equivalent to rescaling the spectral values; third, the inverse Fourier transform is applied to the series to return the filtered signal to the time domain.

Section snippets

Computational methods and theory

FILDIG calculates the discrete Fourier transform (Eqs. (1)–(3)) to transform the bioelectrical signal from the time domain to the frequency domain. However, if the number of values of the time series is a multiple of 2, then the program uses the fast Fourier transform (FFT) [8], [9], [10] for all epochs to be filtered.Fre(x)=n=0N1f(n)cos2πnxNFim(x)=n=0N1f(n)sin2πnxNPot(x)={Fre(x)}2+{Fim(x)}2

f(n), n = 0, 1, 2, …, N  1N points that represent the signal segment along time.
Fre(x), x = 0, 1, 2, …, N

Program description

The use of the program is very simple. It requires a main file in ASCII format containing the names of the individual files to be filtered, which opens the possibility of filtering many files in one run. As shown in Fig. 2, the user must enter the name of the main file, the number of values (points) that correspond to each epoch and the sample rate in Hertz. The upper value of 8192 points has been used in our studies but it can be easily modified. There are two additional preprocessing options,

System performance and examples

The use of the program and the results of using the Gaussian or the rectangular windows are presently illustrated with a main file 10ESEV.DIR containing the name of two data files 10ESEVCI.DMC and 10ESEVCD.DMC with 2-s epochs of EEG from left and right rat prefrontal cortex, respectively. These EEG signals were captured by one of our programs, CAPTUSEN [11]. The signals were digitized at 256 Hz and thus have 512 points. To eliminate frequencies lower than 4 Hz (place 8 in the spectrum) and higher

Hardware and software specifications

The program was written in Delphi (Inprise Corporation) [12] and runs in a Windows environment in any PC compatible computer with the following minimal requirements: a 386DX processor and 64 Mb RAM. Although FILDIG was written in Delphi Pascal language for Windows, this program is compatible with Delphi for Linux, and by means of an emulator, can be run in other computer systems, e.g. in an Apple Macintosh. The flexibility of this program allows it to be adapted to portable computers, and this

Advantages and availability

The described program, FILDIG, offers a simple method to obtain electrical signals (EEG, EMG, EOG, etc.) without noise or specific frequency bands, which offers many advantages. It does not require complex equipment, it runs on any PC and the output is stored in independent ASCII files, facilitating data processing and analysis by specific computer programs or graphic representation.

We are aware of other commercially available filters that address similar problems in EEG signal analysis, for

Recommendations

FILDIG was designed with the aim of obtaining noise-free signals or bands of specific frequencies in a simple way. However, if there is noise to be eliminated, it should be outside the relevant frequency band, i.e. it should be incoherent noise; otherwise, if it is coherent, the program will eliminate frequencies with important information. To obtain better performance of the program, we recommend that the signal segments to be filtered are of such duration that they allow each element of the

References (15)

There are more references available in the full text version of this article.

Cited by (2)

View full text