Adaptive, autoregressive spectral estimation for analysis of electrical signals of gastric origin

16
INSTITUTE OF PHYSICS PUBLISHING PHYSIOLOGICAL MEASUREMENT Physiol. Meas. 24 (2003) 91–106 PII: S0967-3334(03)52842-8 Adaptive, autoregressive spectral estimation for analysis of electrical signals of gastric origin Eder R Moraes 1,4 , Luiz E A Troncon 2 , Oswaldo Baffa 1 , Aline S Oba-Kunyioshi 2 , Ronald Wakai 3 and Arthur Leuthold 3 1 Departamento de F´ ısica e Matem´ atica, Faculdade de Filosofia, Ciˆ encias e Letras de Ribeir˜ ao Preto, Universidade de S˜ ao Paulo, Av. Bandeirantes, 3900, 14040-901 Ribeir˜ ao Preto, SP, Brazil 2 Departamento de Cl´ ınica M´ edica, Faculdade de Medicina de Ribeir˜ ao Preto, Universidade de ao Paulo, Av. Bandeirantes, 3900, 14049-900 Ribeir˜ ao Preto, SP, Brazil 3 Medical Physics Department, Medical School, University of Wisconsin Madison, WI 53706, USA E-mail: eder@fisicamedica.com.br Received 28 August 2002, in final form 26 November 2002 Published 9 January 2003 Online at stacks.iop.org/PM/24/91 Abstract The electrical activity of the human stomach, which normally shows a frequency of about 0.05 Hz, may be studied non-invasively by either cutaneous electrogastrography (EGG) or surface magnetogastrography(MGG). Detection of changes in frequency with time may be useful to characterize gastric disorders. The fast Fourier transform (FFT) has been the most commonly used method for the automated spectral analysis of the signals obtained from the EGG or the MGG. We have used an autoregressive (AR) parametric spectrum estimator to analyse simulated signals of gastric electrical activity, and to evaluate the results of human studies using EGG and MGG. In comparison with the FFT, our results showed that the AR spectrum estimator provided more detailed qualitative information about frequency variations of short duration simulated signals than the FFT. In the human studies, the AR estimator was as good as the conventional FFT methods in detecting physiological changes in frequency and in identifying abnormal recordings. We conclude that the AR spectral estimator may provide a better qualitative analysis of frequency variations in small portions of the signal, and is as useful as the FFT to analyse human EGG or MGG studies. Keywords: gastric myoelectric activity, electrogastrography, magnetogastrography, running spectral analysis, adaptative, autoregressive methods, fast Fourier transform (Some figures in this article are in colour only in the electronic version) 4 Present address: Universidade do Vale do Para´ ıba, Instituto de Pesquisa e Desenvolvimento, Av. Shishima Hifumi, 2911, 12244-000 S˜ ao Jos´ e dos Campos, SP, Brazil. 0967-3334/03/010091+16$30.00 © 2003 IOP Publishing Ltd Printed in the UK 91

Transcript of Adaptive, autoregressive spectral estimation for analysis of electrical signals of gastric origin

INSTITUTE OF PHYSICS PUBLISHING PHYSIOLOGICAL MEASUREMENT

Physiol. Meas. 24 (2003) 91–106 PII: S0967-3334(03)52842-8

Adaptive, autoregressive spectral estimation foranalysis of electrical signals of gastric origin

Eder R Moraes1,4, Luiz E A Troncon2, Oswaldo Baffa1,Aline S Oba-Kunyioshi2, Ronald Wakai3 and Arthur Leuthold3

1 Departamento de Fısica e Matematica, Faculdade de Filosofia, Ciencias e Letras de RibeiraoPreto, Universidade de Sao Paulo, Av. Bandeirantes, 3900, 14040-901 Ribeirao Preto, SP, Brazil2 Departamento de Clınica Medica, Faculdade de Medicina de Ribeirao Preto, Universidade deSao Paulo, Av. Bandeirantes, 3900, 14049-900 Ribeirao Preto, SP, Brazil3 Medical Physics Department, Medical School, University of Wisconsin Madison, WI 53706,USA

E-mail: [email protected]

Received 28 August 2002, in final form 26 November 2002Published 9 January 2003Online at stacks.iop.org/PM/24/91

AbstractThe electrical activity of the human stomach, which normally shows afrequency of about 0.05 Hz, may be studied non-invasively by either cutaneouselectrogastrography(EGG) or surface magnetogastrography(MGG). Detectionof changes in frequency with time may be useful to characterize gastricdisorders. The fast Fourier transform (FFT) has been the most commonly usedmethod for the automated spectral analysis of the signals obtained from theEGG or the MGG. We have used an autoregressive (AR) parametric spectrumestimator to analyse simulated signals of gastric electrical activity, and toevaluate the results of human studies using EGG and MGG. In comparisonwith the FFT, our results showed that the AR spectrum estimator provided moredetailed qualitative information about frequency variations of short durationsimulated signals than the FFT. In the human studies, the AR estimator wasas good as the conventional FFT methods in detecting physiological changesin frequency and in identifying abnormal recordings. We conclude that theAR spectral estimator may provide a better qualitative analysis of frequencyvariations in small portions of the signal, and is as useful as the FFT to analysehuman EGG or MGG studies.

Keywords: gastric myoelectric activity, electrogastrography,magnetogastrography, running spectral analysis, adaptative, autoregressivemethods, fast Fourier transform

(Some figures in this article are in colour only in the electronic version)

4 Present address: Universidade do Vale do Paraıba, Instituto de Pesquisa e Desenvolvimento, Av. Shishima Hifumi,2911, 12244-000 Sao Jose dos Campos, SP, Brazil.

0967-3334/03/010091+16$30.00 © 2003 IOP Publishing Ltd Printed in the UK 91

92 E R Moraes et al

1. Introduction

Alvarez made the first non-invasive measurement of the electrical activity of the stomach in1922 (Alvarez 1922), but only in the last two decades has the importance of such measurementbeen recognized in both research and diagnostic areas (Hinder et al 1977, Smout et al 1980,Mirizzi et al 1983, Chen et al 1990, 1994). Investigation in this field has grown considerablydue to the extensive exploration of information from electrogastrography (EGG), whichconsists of obtaining a signal with cutaneous electrodes positioned on the upper abdomen(Alvarez 1922). Modelling this signal (Sarna et al 1972, Smout et al 1980, Mirizzi et al 1985,1986, Mintchev et al 1995) has also contributed to a better understanding of gastric electricalactivity. More recently, a number of studies has been published (Comani et al 1991, 1996,Moraes et al 1996, Baffa et al 1997, Allescher et al 1998) on the magnetic fields generatedby the electrical activity of the stomach, i.e. the magnetogastrogram (MGG). Among thesestudies, Moraes et al (1999) is the one that describes a source model for the MGG.

It is now well established that the electrical activity of the stomach emanates from thegastric smooth muscle and, as in the heart, is omnipresent and controls muscle contraction(Hinder et al 1977, Familoni et al 1991, Chen et al 1994). This gastric myoelectrical activity(GMA) is periodic with a period of 20 s, thus originating a signal with frequency 50 mHz,or three cycles per minute (cpm), and generating an electric potential at the skin surface ofapproximate amplitude 0.1 mV (Smout et al 1980, Abell et al 1988). GMA also generates amagnetic field surrounding the abdomen on the order of a few pT, and modelling of this fieldsuggests a current density of about 50 mA m−2 (Moraes et al 1999) on the gastric smoothmuscles.

Analysis of signals from both the EGG and the MGG, which have similar morphology,has been performed mostly in the frequency domain by using the fast Fourier transform(Smout et al 1980, Abell et al 1988, Comani et al 1991, 1996, Moraes et al 1996, 1999,Baffa et al 1997, Allescher et al 1998) or adaptive spectral analysis (Linkens et al 1978,Smallwood et al 1980, Chen et al 1990). This is appropriate because many of thephysiologically or clinically relevant disturbances of GMA consist of abnormally high(‘tachygastria’) or low (‘bradygastria’) frequencies (Abell and Malgelada 1988). Theautomated spectral analysis of the signals obtained from the EGG or the MGG using thefast Fourier transform (FFT) has been the most commonly used method (Smout et al 1980,Abell et al 1988). However, FFT analysis requires a signal of long duration and may yieldinaccurate results at low frequency due to movement artefact and at tachygastria frequency dueto harmonics of non-sinusoidal signals (Verhagen et al 1999). In contrast, parametric methodsof frequency analysis, such as adaptive, autoregressive (AR) estimation, may provide moreprecise frequency determinations since, at least theoretically, they do not depend on signalduration (Madisetti et al 1998).

The aim of this study was to compare the FFT and AR methods for determining frequencyspectra, in terms of their accuracy in the analysis of electrical signals obtained by EGG andMGG. We have also proposed an approach aiming at avoiding the appearance of spuriouspeaks on spectral estimation by using high order AR adaptive modelling.

2. Methods

2.1. Study design

This study comprises both qualitative analysis of artificially generated signals and comparisonsbetween AR and FFT concerning quantitative data from estimations made on EEG and MGG

Autoregressive spectral analysis of gastric electrical signals 93

recordings obtained in humans. For the qualitative analysis, signals were generated underconditions that were considered to be appropriate for the assessment of frequency resolutionof human EGG or MGG recordings. Results from the two methods of spectral estimation werecompared. All data were processed using programs written in the Matlab 5.2 environment andtoolboxes (MathWorks-Massachusetts USA).

2.2. The adaptive autoregressive model for spectrum estimation

We used an autoregressive (AR) spectrum estimator, which consists of modelling the nthsample of the signal, x(n), by the previous samples, x[n − k], 1 < k < p and p < n, wherek and p are integer numbers. This can be expressed as follows (Madisetti et al 1998):

x(n) = x(n) + e(n) where x(n) = −p∑

k=1

akx(n − k)

where x(n) is the signal, ak are linear coefficients, e(n) represents the measurement noise andx(n) is the estimated signal. The noise is assumed to be zero mean with unknown varianceσ 2; p is the order of the system. This model is usually abbreviated by AR( p). The x(n)

is assumed to be the output of a filter which the input, the signal acquired x(n), is a whitenoise. The parameters ak are calculated minimizing the error, or residuals e(n), which is thedifference between the input x(n) and the output x(n) of the filter.

The power spectrum density (PSD) of the process modelled by an AR( p) model is givenby (Madisetti et al 1998):

Pm(ω) = σ 2

∣∣∣∣∣1 +p∑

k=1

amk exp(−iωk)

∣∣∣∣∣

−2

where Pm(ω) is the PSD at the angular frequency ω of the point x(m), amk are the ARcoefficients of AR( p) and σ 2 is the variance of noise.

We have used the function lpc (linear predictor corrector) of the Matlab 5.2 (MathWorks) tocalculate the AR coefficients, since the linear prediction coefficients are just the AR parametersfor the same order of AR process and linear predictor (Kay 1996a) so as to obtain σ 2.

2.3. Generation of artificial signals

In order to assess resolution in the frequency domain for spectra estimated by the AR process,a simulated signal of constant amplitude containing frequencies 0.05 Hz, 0.20 Hz, 0.30 Hzand 0.35 Hz was generated. An analysis of this signal was carried out for different estimationorders and, for each order, for different numbers of frequency points (figures 1(a)–(c)).

To compare the frequency resolution of the AR method versus FFT, the spectra for the ARand FFT methods were calculated for a simulated signal containing frequencies 0.05, 0.055,0.20 and 0.21 Hz. The signal amplitude was held constant (figures 2(a), (b)).

In order to compare the results obtained for AR and FFT methods we generated twosignals, the first one with an abrupt change in frequency from 3 to 4 cpm, maintained for2 min and returning to 3 cpm. The second one is a signal of a steady frequency of 3 cpmwith a linear and slow increase in amplitude. The main frequency was obtained in both cases(figure 3), the higher normalized amplitude (figure 4) of the spectra also being found from AR

94 E R Moraes et al

(a)

(b)

Figure 1. Power spectrum density (PSD) determined by autoregressive analysis for differentnumbers of frequency points and AR order: (a) 1024 points, 32th order, (b) 128 points, 64th orderand (c) 256 points, 256th order. The vertical axis is in arbitrary units representing the amplitude ofthe signal normalized by the square root of the frequency. For the extremely high resolution (a),the four frequency components were verified, but the values do not have good agreement with realfrequency values (0.05, 0.2, 0.3 and 0.35 Hz). Increasing the frequency order the four frequencycomponents are in better agreement with real values but spurious peaks appear (b) on the spectrum;(c) finally using high AR order and the same number of order for frequency points, it is possibleto obtain good agreement with the real frequency simulated and no existence of spurious peaks.

and FFT simulated signals. In all the artificial signals, a random noise was added to complywith the assumptions of the model regarding the input signal on the AR filter.

Autoregressive spectral analysis of gastric electrical signals 95

(c)

Figure 1. (Continued.)

2.4. Electrogastrography (EGG)

EGG recordings were obtained in 13 control subjects and 14 patients with functional dyspepsia(Heading 1991), who did not differ significantly regarding composition by gender, age andbody size. All patients complained of chronic, persistent or recurrent non-painful discomfortin the upper abdomen after meals, as the predominant symptom and fulfilled Rome II criteriafor dysmotility-like functional dyspepsia (Talley et al 1999). Recordings were carried outfor 30 min in the fasting state and for another 30 min after the ingestion of a standard testmeal consisting of 150 g of plain yogurt (150 kcal) followed by 150 ml of water, at roomtemperature. Subjects were placed in a comfortable recumbent position and were instructedto remain as quiet as possible for the entire study. Abdominal skin was cleaned with waterand ordinary soap and shaved when necessary, after which gentle skin abrasion was carriedout using an appropriate gel (Omni-Prep, D O Weaver & Co., Aurora Co., USA). Thereafter,a conductive cream (Parker Laboratories, Inc., Orange, NJ, USA) was applied on the skinand three Ag–AgCl electrodes (Anamed Medical Instruments, Sao Paulo, Brazil) were affixedto the abdomen in standard fashion. A first electrode, connected to one of the active leads,was positioned on the midline, halfway between the xyphoid and the umbilicus. The secondelectrode was placed on the patient’s left side,nearly 1 cm below the bottom rib,and 5 cm abovethe first electrode at a 45◦ angle. A third electrode, which was connected to the reference lead,was positioned below the right bottom rib, so as to form with the other electrodes a trianglewith three equal sides.

EGG recordings were performed with a commercially available recorder (PC Polygraph,Synetics Medical AB, Stockholm, Sweden), containing pre-amplifiers and filters for recordingelectrical oscillations with frequencies ranging from 0.5 to 18 cpm. The EGG signal wascaptured and digitized using a sampling frequency of 8 Hz and stored on the hard disk ofa personal computer. All the recordings were inspected for motion artefacts, which wereremoved before the data analysis.

96 E R Moraes et al

(a)

(b)

Figure 2. Comparison of frequency resolution on spectra performed by autoregressive (AR)estimation (a) and fast Fourier transformer (FFT) (b). A data set comprised of 512 points and512th order polynomial function was used for AR. The frequency components are 0.050, 0.055, 0.20and 0.21 Hz. The AR (a) spectrum distinguishes the 0.050 and 0.055 frequency peaks while FFTdoes not (b).

2.5. Magnetogastrography (MGG)

The MGG signal was acquired in fasting and fed conditions in eight healthy volunteers,using a seven-channel SQUID system (Biomagnetic Technologies 607 NeuroMagnetometer,

Autoregressive spectral analysis of gastric electrical signals 97

Figure 3. The PDF of the simulated signal is shown as a function of time from methods: AR (‘◦’)and FFT (‘+’). The line represents the real frequency of the signal. The AR method first detectsthe frequency change compared with the FFT.

Figure 4. Normalized period dominant power (PDP) of a simulated signal of a constant frequencywith a slowing changing amplitude obtained by AR method (‘◦’) and FFT (‘+’).

San Diego, USA); recordings were carried out for 10 min in the fasted state and for 10 minmore at each position after the ingestion of a cheese and bread sandwich (∼210 kcal) at roomtemperature. The volunteers were placed laid comfortably on a bed and were instructed to liestill during the acquisition period. The sensors were placed over the abdominal surface at twopositions, one with the central channel at the midpoint between the umbilicus and xyphoidand the other with the central channel near the crest of the lower left rib.

98 E R Moraes et al

The MGG was initially filtered with a 10 Hz cut-off low pass filter and digitized at32 samples/s.

2.6. Analysis of data from EGG and MGG

Before analysis, EGG and MGG recordings were filtered digitally, using high- and low-passButterworth filters of orders 2 and 10, cutoff frequencies 0.02 Hz (1.2 cpm) and 0.15 Hz(9 cpm), respectively. Spectral analysis was performed using both FFT and AR estimations.For the FFT, a 256 s sliding window was applied to stretches of the signal with overlappingof 196 s. For the AR estimation, a 120 s sliding window was applied to stretches of the signalwith overlapping of 60 s. For both FFT and AR analyses, the following parameters werecomputed:

(a) dominant frequency (DF), the frequency corresponding to the highest power in runningspectral analysis in the various running spectra;

(b) the percentages of time during which the DF of GMA was recorded in the normal(2–4 cpm), bradygastria (1–2 cpm) or tachygastria (4–9 cpm) ranges;

(c) dominant frequency instability coefficient (DFIC), the ratio between the standard deviationof the mean and the mean of the frequencies with the highest power in the various spectralbands.

2.7. Statistical analysis

Quantitative data were expressed as medians and range. Comparisons between FFT and AR,as well as between dyspepsia and control groups, were performed using two-tailed, Student’st-test for paired data. Correlations between the various FFT and AR measurements wereanalysed by means of the calculation of Pearson’s linear correlation coefficient. Differenceswere regarded as significant for P < 0.05.

3. Results

3.1. Qualitative analysis of simulated and EGG signals

The effect on resolution of the PSD for different numbers of data points and for differentorders of the polynomial function is shown (figures 1(a)–(c)).

It is known that spurious peaks may emerge (Kay 1996b) (figure 1(b)), on AR spectralestimation of high order. Nevertheless, we observed on the AR estimations that spuriouspeaks do not appear for low order estimation (figure 1(a)) and for higher order estimation(figure 1(a)) when the number of frequency points is less than the AR order.

Both AR and FFT provide reliable spectra of the signal containing four differentfrequencies (figures 2(a), (b)). However, with the same number of frequency points, thevalues for the power density spectrum (PSD) estimated by AR were lower than those obtainedby FFT for the lower frequencies, but higher for the frequencies near 0.20 Hz. Nevertheless,AR provided a better resolution than FFT, as evidenced by the discrimination of the twolow-frequency peaks with AR, but not with FFT (figure 2(a)).

A transient increase in the signal frequency is rapidly reflected in the instantaneousfrequency, which was detected similarly by FFT and AR (figure 3). However, it was detectedby AR earlier than by FFT.

Both FFT and AR produce an equally accurate estimation of frequency of a regular signalwith a constant frequency of 3 cpm. An increase in the amplitude of this simulated signal is

Autoregressive spectral analysis of gastric electrical signals 99

Table 1. Comparison of data provided by two different methods of frequency analysis—fastFourier transform (FFT) and adaptative, autoregressive (AAR) estimation. The two methods wereapplied on electrogastrography (EGG) recordings of gastric myoelectrical activity obtained for30 min in both fasting and postcibal states in control subjects and patients with functional dyspepsia.Statistical analysis was carried out using Student’s t-test. Pearson’s correlation coefficient (R) andits significance (P value in brackets) were also calculated. Significance level was set at P < 0.05.

FFT AAR P value R

Controls (n = 13)Fasting

DF (cpm) 2.92 ± 0.31 2.9 ± 0.25 0.84 0.97 (0.0001)DF in normal range (%) 91.7 ± 12.7 87.6 ± 12.0 0.40 0.83 (0.0002)DFIC (%) 17.6 ± 13.3 23.1 ± 13.7 0.30 0.93 (0.0001)

PostcibalDF (cpm) 2.92 ± 0.4 2.76 ± 0.9 0.56 0.50 (0.03)DF in normal range (%) 80.6 ± 16.3 80.4 ± 15.8 0.87 0.92 (0.001)DFIC (%) 27.1 ± 11.0 28.9 ± 11.8 0.69 0.92 (0.001)

Patients (n = 14)Fasting

DF (cpm) 2.94 ± 0.35 2.82 ± 0.33 0.35 0.80 (0.003)DF in normal range (%) 78.14 ± 21.7 78.14 ± 19.6 0.99 0.96 (0.0001)DFIC (%) 24.5 ± 15.1 26.5 ± 14.1 0.72 0.96 (0.0001)

PostcibalDF (cpm) 2.86 ± 0.45 2.89 ± 0.38 0.85 0.84 (0.0001)DF in normal range (%) 85.7 ± 14.1 89.1 ± 10.9 0.48 0.84 (0.0001)DFIC (%) 22.3 ± 11.6 23.2 ± 10.2 0.82 0.96 (0.0001)

DF: dominant frequency, the frequency corresponding to the highest power in running spectralanalysis, was expressed in cycles per minute (cpm); normal range for DF was 2–4 cpm; DFIC:DF instability coefficient, the ratio between values for the standard deviation and the mean of thefrequencies with the highest power in the various spectrum lines.

associated with an increase in PDP, which is detected clearly and in a similar manner by FFTand AR (figure 4).

Comparing the capability of the AR spectral estimator to get the frequencies of shorttime length recordings, we obtained spectra of an EGG recording using each 4 s length of thesignal, generating 450 spectra, by AR and FFT methods from a recording length of 30 minwith two samples per second, after decimation.

Each spectrum was obtained from eight points for AR and FFT methods, but for FFT zeropadding of 248 points was done, completing 256 points.

The percentages of dominant frequency in the range 2–4 cpm were 44.6% and 1.1%for AR and FFT methods (figures 5(a), (b)), respectively, showing the better capacity to getthe frequencies by the AR method. The frequencies below 1 cpm were discarded on thesecomputations. The frequency components of the spectrum of the whole EGG are in the2–4 cpm range (figures 5(c), (d)).

3.2. Quantitative analysis of data from EGG and MGG

Table 1 shows that EGG data analysed by AR were very similar to those obtained by FFT.There were no significant differences between patients and controls among the various EGGparameters for either FFT or AR. Values for fasting DF in both control and dyspepsia groups

100 E R Moraes et al

(a)

(b)

(c)

(d)

Figure 5. Spectra of short segments of an EGG signal. Analysing the histogram of PDF weobserved that the frequency of the signal is better detected on AR (a) than by FFT (b), as can beobserved on the whole spectra by AR (a) and FFT (b) methods.

Autoregressive spectral analysis of gastric electrical signals 101

Table 2. Comparison of data provided by two different methods of frequency analysis—fastFourier transform (FFT) and adaptative, autoregressive (AR) estimation. The two methods wereapplied on magnetogastrography (MGG) recordings of gastric myoelectrical activity obtained for30 min in both fasting and postcibal states in eight healthy volunteers. Statistical analysis wascarried out using two-tailed Student’s t-test for paired data. Pearson’s correlation coefficient (R)and its significance were also calculated. Significance level was set at P < 0.05.

FFT AR P value R (P value)

FastingDF (cpm) 2.25 ± 1.20 2.47 ± 1.29 0.56 0.66 (0.03)DF in normal range (%) 47.9 ± 38.2 51.5 ± 29.4 0.68 0.76 (0.01)DFIC (%) 41.6 ± 33.2 47.7 ± 25.4 0.43 0.78 (0.01)

PostcibalDF (cpm) 3.13 ± 0.27 3.09 ± 0.22 0.35 0.93 (0.01)DF in normal range (%) 91.6 ± 12.6 85.9 ± 21.6 0.41 0.49 (0.10)DFIC (%) 15.1 ± 11.1 22.1 ± 18.6 0.18 0.70 (0.02)

DF: dominant frequency, the frequency corresponding to the highest power in running spectralanalysis, was expressed in cycles per minute (cpm); normal range for DF was 2–4 cpm; DFIC:DF instability coefficient, the ratio between values for the standard deviation and the mean of thefrequencies with the highest power in the various spectrum lines.

tended to be slightly lower for AR, but these differences did not reach statistical significance.There was statistically significant correlation between values provided by the two methods forall EGG variables, with values for Pearson’s correlation coefficient (R) ranging from 0.50 to0.96.

For data from subjects, both FFT and AR detected only one control volunteer and fivedyspepsia patients presenting DF out of the normal 2–4 cpm range for more than 35% ofthe recording time. Similarly, both methods were effective in showing that only one patientmaintained an unstable electrical rhythm (DF in the 2–4 cpm range: 58%) postprandially.

Finally, we compared the AR and FFT analyses concerning the quality of the spectraobtained from two normal EGG recordings, one with good signal-to-noise ratio and the otherwith poor signal-to-noise ratio (figures 6(a), (b)). From the recording with a good signal-to-noise ratio, both AR and FFT produce high quality spectra, with a very good discriminationof a band of peaks around 3 cpm. However, for the noisier recording, this band of peaks wasmore evident with the AR technique.

For the MGG, data obtained with the AR estimation did not differ significantly from thoseprovided by FFT (figures 7(a)–(c)), and there was also significant correlation between the twomethods for all variables, except for postprandial DF in normal range, as shown in table 2.Postprandial values for DF were significantly greater ( p < 0.05) than those obtained in thefasting state.

4. Discussion

Analysis of electrical signals of gastric origin presents a number of difficulties, such as therelatively low frequency of the GMA, lack of prominent features in the signal, as well asthe limitations in resolution of the available methods. Another source of difficulty comesfrom the fact that abnormalities in GMA, such as tachygastria or bradigastria (Abell andMalagelada 1988), may be transient and last for only a limited time. Ideally, the changesin frequency of the GMA would be more clearly demonstrated with methods capable ofproducing a ‘cycle-by-cycle’ estimation of frequency. This is difficult, since the frequency

102 E R Moraes et al

(c) (d)

(e) (f )

(a)

(b)

x 109 x 108

x 109 x 108

Figure 6. Typical EGGs of high (a) and low (b) signal-to-noise ratio were used to compare therunning spectra analyses by AR ((c) and (d)) and FFT ((e) and (f )) methods. The spectra areequivalent, besides the AR spectra show a little more variability on the PDF, which is expectedsince the AR uses shorter segments.

spectra are always calculated using a finite number of samples. Running spectral analysisof EGG recordings, allowing estimation of subtle changes in frequency over time, requires ahigh-resolution method. Therefore, parametric methods of spectral estimation, such as AR,

Autoregressive spectral analysis of gastric electrical signals 103

are in principle more suitable for the analysis of GMA than FFT, a non-parametric method,which is the most widely used technique for EGG analysis (Verhagen et al 1999).

Our data showed that AR is as accurate as the FFT analysis for the study of signalsemanating from GMA, which agrees with previous observations performed by others usingARMA (autoregressive moving average) analysis (Chen et al 1990). The AR method wasalso found to be reliable in the study of colonic myoelectrical activity (Smallwood et al 1980),which, in contrast to GMA, is characterized by the presence of different frequencies, occurringfor variable lengths of time.

It has to be emphasized, however, that it is only possible to use AR estimation on theassumptions that: (a) the signal acquired is a white noise process; and (b) the obtained spectrumis an estimation, rather than an actual one. Nevertheless, these estimated spectra are in closeagreement with the actual spectra, as is indicated by our data.

Our study of simulated GMA signals using AR and FFT showed that the former techniquewas more discriminating than the latter, a finding which is probably due to the higher resolutionof AR. AR was also able to indicate changes in frequency and power spectra earlier than FFT.This can be observed in figures 3 and 4, showing the ability of AR spectrum to detect earlierchanges in both frequency and amplitude of the simulated signals.

However, the higher resolution is sometimes achieved at the expense of the appearance ofspurious peaks, particularly when high order estimations are used (Kay 1996b). Nevertheless,if the AR order is increased to get better precision on frequency and amplitude determination,the frequency resolution becomes �f = 1

2�t, avoiding the appearance of spurious peaks

on the spectrum, where �t is the time length of the signal analysed. Even in this casewe have a better situation on AR than with FFT, since the frequency resolution by FFTspectrum is given by �f = 1

�t(Oppenheim et al 1999), where �t is the time length of the

signal analysed. Therefore, using an AR spectral estimator, we were able to obtain the samefrequency resolution as that provided by the FFT method with half the time length of thesignal.

The short length spectra calculated by the two methods are in agreement as are the wholespectra (figures 5(c), (d)) and the histogram of PDF from the AR method (figure 5(b)). Theextremely low frequencies on the spectra, of less than 1 cpm, are due to the many shortsegments of signal that would present high values of DC level.

Long duration EGG or MGG recordings are more susceptible to undesirable movementartefacts. Thus analytical methods, such as AR, that provide accurate results of short lengthacquisition period are desirable. Although artefacts present in GMA recordings can be digitallyremoved, this always implies loss of information. Nevertheless, as the sliding window requiredfor the FFT analysis (256 s) was in this paper more than twice as large as that required for theAR analysis (120 s), the information occasionally lost when an artefact is present would befar less with the latter method.

The AR method we used is nearly 100 times slower than FFT for the same frequencyresolution. However, this is not necessarily a problem, as personal computers can performthis calculation in seconds. For example, 157 running AR spectra derived from a signal of200 000 points were computed in 10.11 s and 51 running FFT spectra were computed in0.06 s. Nevertheless, the spectra from artefacts present in the segment can be ignored, usingthe AR method the information lost would be less than using FFT, because a small artefact canbe present up to three spectra windows using AR method while it could be up to five spectrawindows, according to the EGG signal stretches used to get the spectra.

AR and FFT analyses of human EGG yielded similar values for the various parameterscomputed and were comparable in identification of abnormal recordings. Although theproportion of dyspepsia patients with EGG abnormalities in the fasting state (5 out of 14)

104 E R Moraes et al

(b)

(a)

x 1011

Figure 7. Typical MGG recording (a) and its running spectral analysis by AR (b) and FFT(c) methods.

was greater than that observed among healthy volunteers (only 1 out of 13), we were notable to show any consistent postprandial EGG abnormality in these patients. This findingdisagrees with those from a number of studies (Chen et al 1996, Pfaffenbach et al 1997,Lin et al 1999), showing that a high proportion of patients with functional dyspepsia haveabnormalities concerning gastric myoelectrical activity. On the other hand, our results are inline with those of Jebbink et al (1995), who did not find any difference between functionaldyspepsia patients and healthy volunteers in the incidence of gastric dysrhythmias. It isconceivable that such discrepancies may be related to differences in either patient selection orthe definition of functional dyspepsia, or both, since there is no biological marker for such acondition.

Autoregressive spectral analysis of gastric electrical signals 105

(c)

x 1011

Figure 7. (Continued.)

Comparison between AR and FFT regarding data analysis for the MGG also showed alack of significant differences between the two methods. However, postcibal values for bothDF and the percentage of DF in the normal (2–4 cpm) range were significantly greater thanthose for the fasting state, which was not verified in the EGG studies. This might be ascribedto either the relatively unstable fasting MGG recordings, characterized by lower values forboth DF and the percentage of the DF in the normal range, or the greater calorie content andmeal particle size of the solid test meal administered for the MGG studies.

5. Conclusions

The parametric, autoregressive spectral estimation seems to perform better than the FFTmethod for the analysis of signals from gastric myoelectrical activity, as increased resolutionmay be achieved, particularly when analysing shorter length signals. Thus, AR may providemore detailed information, especially regarding changes in the frequency of the electricalactivity, which seems to be reflected more promptly on signal spectra. Additionally, by usinghigh order AR spectral estimation, it was possible to remove spurious peaks that are usuallynoted in this kind of analysis.

In the human studies using either EGG or MGG, the AR estimator was as good as theconventional FFT method in detecting physiological changes in frequency and identifyingabnormal recordings.

We therefore conclude that AR spectral estimator may provide more detailed informationthan FFT for the study of frequency variations, particularly in small portions of the signal, andis as useful as the FFT for clinical and investigative analysis of electrical signals of gastricorigin.

It is possible to use high order AR spectral estimation and avoid the spurious peaks thatusually occur in this situation by using a lower number of frequency points than those of theAR order.

106 E R Moraes et al

References

Abell T L and Malagelada J R 1988 Electrogastrography-current assessment and future perspectives Dig. Dis. Sci. 33982–92

Alvarez W C 1922 The electrogastrogram and what it shows J. Am. Med. Assoc. 78 1116–9Allescher H D, Abraham-Fuchs K, Dunkel R E and Clanssen M 1998 Biomagnetic 3-dimensional spatial and temporal

characterization of electrical activity of human stomach Dig. Dis. Sci. 43 683–93Baffa O, Wakai R, Leuthold A and Moraes E R 1997 Studies in magnetogastrography in the fasted and fed state Med.

Biol. Eng. Comput. 35 Suppl I 18Chen J D Z, Richards R D and McCallum R W 1994 Identification of gastric contractions from the cutaneous

electrogastrogram Am. J. Gastroenterol. 89 79–85Chen J, Vandewalle J, Sansen W, Vantrappen G and Janssens J 1990 Adaptative spectral analysis of cutaneous

autoregressive moving average modelling Med. Biol. Eng. Comput. 28 531–6Comani S, Conforto S, Di Nuzzo D, Basile M, Di Luzio S, Erne S N and Romani G L 1996 Non-invasive detection

of gastric myolectrical activity: comparison between results of magnetogastrography and electrogastrographyin normal subjects Phys. Med. 12 25–32

Comani S, Erne S N and Romani G L 1991 Biomagnetism: clinical aspects Proc. 8th Int. Conf. on Biomagnetismpp 639–42

Familoni B O, Kingma Y J and Bowes K L 1991 Noninvasive assessment of human gastric motor function Gut 32141–6

Hamilton J W, Bellahsene E B, Reichelderfer M, Webster J G and Bass P 1986 Human electrogastrograms—comparison of surface and mucosal recordings Dig. Dis. Sci. 31 33–9

Heading R C 1991 Definitions of dyspepsia Scand. J. Gastroenterol. 26 1–6Hinder R A and Kelly K A 1977 Human gastric pacesetter potential Am. J. Surg. 133 29–33Kay S M 1996a Modern Spectral Estimation: Theory and Application (Englewood Cliffs, NJ: Prentice-Hall) p 157Kay S M 1996b Modern Spectral Estimation: Theory and Application (Englewood Cliffs, NJ: Prentice-Hall) p 240Kay S M 1996c Modern Spectral Estimation: Theory and Application (Englewood Cliffs, NJ: Prentice-Hall) p 197Linkens D A and Datardina S P 1978 Estimation of frequencies of gastrointestinal electrical rhythms using

autoregressive modelling Med. Biol. Eng. Comput. 16 262–8Madisetti V K and Williams D B 1998 The Digital Signal Processing Handbook (Boca Raton, FL/Piscataway, NJ:

CRC Press/IEEE) ch 14Mintchev M P and Bowes K L 1995 Conoidal dipole model of electrical field produced by the human stomach Med.

Biol. Eng. Comput. 33 179–84Mirizzi N and Scafoglieri U 1983 Optimal direction of the electrogastrographic signal in man Med. Biol. Eng. Comput.

21 385–9Mirrizi N, Stella R and Scafoglieri U 1985 A model for extracellular waveshape of the gastric electrical activity Med.

Biol. Eng. Comput. 23 33–7Mirrizi N, Stella R and Scafoglieri U 1986 Model to simulate the gastric electrical control and response activity on

the stomach wall and on the abdominal surface Med. Biol. Eng. Comput. 24 157–63Moraes E R and Baffa O 1999 Modelling of magnetogastrogram Recent Advances in Biomagnetism (Sendai: Tohoku

University Press) pp 262–5Moraes E R, Baffa O, Miranda J R A and Oliveira R B 1996 Studies of the stomach activity by magnetogastrophy

Vth Int. Conf. Applications on Physics on Medicine and Biology (Trieste, Italy), Phys. Med. 12 186Oppeinheim A V, Schafer R W and Buck J R 1999 Discrete-Time Signal Processing (Upper Sadle River, NJ:

Prentice-Hall) p 703Sarna S K, Daniel E E and Kingma Y J 1972 Simulation of the electric-control activity of the stomach by an array of

relation oscillators Dig. Dis. 17 299–310Smallwood R H, Linkens D A, Kwok H L and Stoddard C J 1980 Use of autoregressive-modelling techniques for the

analysis of colonic myoelectrical activity in man Med. Biol. Eng. Comput. 18 591–600Smout A J P M, Van Der Schee E J and Grashuis J L 1980 What is measured in electrogastrography? Dig. Dis. Sci.

25 179–87Talley N J, Stanghellini V and Heading R C et al 1999 Functional gastroduodenal disorders Gut 45 II37–II42Verhagen M A M T, Schelven L J V, Samsom M and Smout A J P M 1999 Pitfalls in the analysis of electrogastrographic

recordings Gastroenterology 117 453–60