Sei sulla pagina 1di 5

IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 51, NO.

2, FEBRUARY 2004

385

A Robust DSP Integrator for Accelerometer Signals


Yan Wu and Dale H. Mugler*
AbstractThe need for an accepted method for determining position data from digital accelerometer readings with known frequency range is very important. The method of this paper uses spectral information and provides more stability and accuracy than classic methods for the DSP case. It even reduces to a classic method for the nonoscillatory case. Examples show the robustness of the method, overcoming the instability apparent with other integration methods. Index TermsAccelerometer, band-limited signal, DSP integrator, Newton-Cotes integration.

I. INTRODUCTION Classical methods used to estimate position from digital accelerometer data have not employed information about the spectral content of the signal and are thus not the best possible for many digital signal processing (DSP) signals. For example, in an article [1] concerning chest compression for cardio-pulmonary resuscitation (CPR), the authors of that article applied accelerometers to a mannequin in order to estimate chest movement using DSP on accelerometer signals. They remarked that they wanted a practical, robust, and reliable solution for estimating chest compression depth. The method of estimating position from digital accelerometer data in [1] turned out to be unstable. The authors in that paper first estimate the digital velocity by using the trapezoidal rule, a classic Newton-Cotes numerical integration technique derived for accuracy for polynomials, on the integral of accelerometer readings a(t) in
t

Although difference equation (2) could be implemented on a digital signal processor, it is based on an integration rule (the trapezoidal rule) that was developed for polynomials, not oscillatory signals. In this paper, we develop a method for determining position from digital accelerometer readings that employs the information about the spectrum of the accelerometer signal. Methods derived for accuracy for polynomials essentially ignore that information, but this method does not. A search of the literature has not revealed other integration methods that have been derived using the additional information of the spectral range of the acceleration signal or specific methods developed for oscillatory signals only. Some papers, such as [2], employ an error functional when determining digital coefficients, but not one, such as we give below, appropriate for DSP that is based on spectral range. Although [3] and [4] present methods which minimize an error integral, those are not related to spectral content. Also, they do not provide a simple, computable method of calculating the integration coefficients. An applied Gaussian method [5] that generalizes the trapezoidal rule, as is done in this paper, uses nonuniform samples and does not use spectral content. That kind of approach is not applicable to uniformly sampled digital data, as is assumed for data in this paper. Although the method of this paper is general, it is illustrated for the type of data as needed for the difference equation (2) from the CPR problem, where current position is determined using two past position samples and the current and two or more past acceleration samples. Although we will illustrate that this method reduces to the polynomial-based method for nonoscillatory functions, it is a DSP method for oscillatory signals whose spectrum is contained in some known frequency band. We show that inclusion of this information leads to a more accurate and stable technique, particularly for the above-mentioned study of the accelerometer readings for CPR chest compression estimation. II. DETERMINING
THE

v ( t) =
t

a( )d + v (t0 ):

(1) DIFFERENCE EQUATION MINIMIZATION


VIA

ERROR

With t = nT and t0 = (n 0 1)T , where T is the sampling interval, the trapezoidal rule applied to (1) produces
v [n ] = T
2 ( a [n ] + a [n

0 1]) + v[n 0 1]:

Using a DSP approach and the z -transform, this can be viewed as a digital filtering operation with transfer function
H (z ) = T 1 + z 01 : 2 1 z 01

The authors simply apply the filter with this transfer function again, producing a position z -transform X (z ) related to the acceleration z -tranform A(z ) by X (z ) = (H (z ))2 A(z ). Expressed in the digital time domain, this becomes
x [n ] = 2 x [n

0 1] 0 x[n 0 2] + T 2 2 (a[n] + 2a[n 0 1] + a[n 0 2]) :

(2):

Manuscript received January 13, 2003; revised June 8, 2003. Asterisk indicates corresponding author. Y. Wu is with the Department of Mathematical Sciences, Georgia Southern University, Statesboro, GA 30460-8093 USA (e-mail: yan@eagle4.cc.gasou.edu). *D. H. Mugler is with the Department of Biomedical Engineering and the Department of Theoretical and Applied Mathematics, The University of Akron, OH 44325-1803 USA (e-mail: dmugler@uakron.edu). Digital Object Identifier 10.1109/TBME.2003.820372

In this section, we outline the general method for determining the best coefficients to choose in a difference equation to obtain current position from past position and current and past acceleration samples. We develop and illustrate this method for the example discussed in Section I, but this is not difficult to adjust to other combinations of samples. We will show that the particular difference equation (2) is not optimal, and that the one derived from error minimization is stable and that it even reduces to the best polynomial approximation for the case of non-DSP signals. The error minimization method discussed in this section uses the spectral information about the DSP accelerometer readings and the corresponding Fourier representation of position. This leads to a linear system (9) for the optimal coefficients in the difference equation. For the case of the CPR compression depth estimation in [1], the accelerometer signal was sampled at 1000 Hz and filtered with an anti-aliasing RC filter. This is the type of data considered typical for the error minimization method, and thus generally assume that the signal of acceleration readings is band-limited with cutoff frequency W . The resulting linear system involves sinc functions and derivatives of sinc functions. If the underlying spectrum of the acceleration signal made it a bandpass signal, the resulting system would involve sinc functions adjusted by a modulating factor. Many applications involve processing signals after low-pass or bandpass filtering, in which case the cutoff frequency W is automatically determined. That situation is the optimal case for application of this method, even though the method using error minimization is still appropriate when W is an estimate of a spectral upper bound. In that case, care should simply

0018-9294/04$20.00 2004 IEEE

386

IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 51, NO. 2, FEBRUARY 2004

be given to insure that W is larger than the highest frequency in the signal. For illustration of the method, we take the following general difference equation based on the same samples as in (2) and determine the best coefficients by error minimization. In the following difference (0) (2) equation, the coefficients ck and ck are to be determined:
x [ n ] = c 1 x [n +T
2 (0)

derivatives are important in the process. The actual calculations are not difficult, and lead to a linear system. Written out as a matrix system, the difference equation coefficients are the solution of the system
s(0) s ( ) s 2 ( ) s2 (0) s 2 ( ) s ( ) s(0) s2 (2 ) s2 ( ) s2 (0) s2 (  ) s2 (2 ) s4 (0) s 4 ( ) s4 (2 ) c1
(0) (0) (2) (2) (2)

s2 (0) s2 ( ) s4 ( ) s4 (0) s4 ( )

s2 ( ) s2 (0) s4 (2 ) s4 ( ) s4 (0) s ( ) s(2 )

0 1] + c
(2) c0 a[n]

(0) 2 x [n

(2) c1 a[n

0 2] 0 1] + c 0 2T ) + T

(2) 2 a [n

0 2]
(2)

(3)

Writing the samples in a continuous-time fashion, (3) becomes


x(t) =
(0) c1 x(t

(0) T ) + c2 x(t

N n=0

cn

00 x (t 0 nT )

(4)

c2 c0 c1 c2

s2 (0) s2 ( ) s2 (2 )

(9)

with N to time. To determine a bound on the error in the approximation, substitute the integral representation of the signal
W
x ( t) = X (f )e
2itf

00 = 2 and where x (t) is the second derivative of x with respect

0W

d f

in (4). Note that this makes use of the band-limited assumption on the signal as discussed above. Next, using the CauchySchwarz inequality, see [6], it can be shown that the error
c = x ( t)

k=1

ck x(t
2 2

(0)

0 kt) + T


N n=0

cn x (t

(2)

00

0 nT )

is bounded by 

 kxk 1 I where
l = 1 2T

0

jS (u)j
N

du

(5)

with  = 2T W and
S (u ) = 1

k=1

ck e

(0)

0iku + 2

n=0

cn ( u )e

(2)

0inu

(6)

The error minimization method of this paper is to minimize the error integral (5). The kernel of this expression (6) would vary depending on the particular samples involved in the difference equation, but it would not be difficult to determine the form of this expression for a set of samples taken at different locations than the one illustrated here. Minimizing the integral error I in (5) with respect to the unknowns (the cs) leads to a set of equations that the optimal coefficients in the difference equation (3) must satisfy. In particular, define s(t) := sinc(t), and
s2 (t) :=

The system matrix in (9) is not close to singular, except for values of extremely close to zero, so that the system may be solved for the coefficients in (3) by standard matrix methods. In this system the s refers to the sinc function, and s2 , s4 are normalized second and fourth sinc derivatives, as defined in (7) and (8), respectively. See [7][9] for related work. Note that the difference equation coefficients are independent of the particular signal, and depend only on the spectrum. The cs for the difference equation (3) are determined from the above matrix system based primarily on the value of  , which is determined once the interval spacing T is chosen and a bound for the highest frequency W is known. Just as in applying the Nyquist criterion for signal reconstruction, choosing T so that aliasing will not occur is important in an application of (3). For many applications, that highest frequency is easily determined when using data that has been low-pass filtered, but in other cases it is not necessary to have an exact value but only necessary that the frequency interval [0, W ] contains the actual spectrum. For example, in Fig. 5, we have used W = 6 even though the highest frequency in the signal is 5.5. The matrix in (9) is nonsingular for values of  bounded away from zero, so that the solution of the system in (9) can be done by standard matrix methods. For very small values of  , where the underlying signal is a polynomial, care must be taken in solving the system, as the system matrix becomes singular. It is not difficult to determine the linear system for the difference equation coefficients based on different locations of the samples, as a distinct pattern is evident in the linear system in the way that it depends on those samples. Section III will provide some comparisons to illustrate the advantages of using the coefficients determined from (9).


III. COMPARISONS This section provides a discussion of applications, based on the error minimization method to determine position from acceleration samples that is described in the previous section, and includes a comparison to the method of [1] based on the trapezoidal rule. The authors of [1] observed that the method of formula (2) based on the trapezoidal rule was not stable, as is clear from the plot presented here in Fig. 1. Note how the computed position diverges from the actual one. Their solution to this problem was to reset the integration, switching the integration off and restarting it again at specified intervals. Fig. 1 is very similar to a figure in [1]. For comparison, Fig. 2 shows a computation with the same data but using the coefficients in (3) as obtained from formula (9) as specified by the error minimization method. This method always employs the information that the underlying acceleration signal has a known frequency band.

0 0

dt2

sinc(t)

(7)

and
s4 (t) :=
4

dt4

sinc(t)

(8)

under the standard definition of sinc(t) := sin(t)=(t): The minimization procedure is to differentiate the error integral (5) with respect to each of the coefficients and set those derivatives to zero. The re sult of this procedure includes terms such as 0 e0iku du which is a multiple of sinc(k ) and is the reason that the sinc function and its

IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 51, NO. 2, FEBRUARY 2004

387

1.5 1

Integrated data real data

0.5 0.5 0 0 0.5 0.5 1 1.5 2 1.5 2.5 2 Integrated data real data 0 50 100 150 200 250 300 Time (ms) 350 400 450 500 3 3.5 700 750 800 850 900 950 1000 Time (ms) 1050 1100 1150 1200

2.5

Fig. 1. Instability in the computed solution results when using the method based on the trapezoidal rule.

Integrated data real data 1.5 1

0.5 0 0.5

0.5

0 1 0.5 1.5 2 2.5 1.5 Integrated data real data 700 750 800 850 900 950 1000 Time (ms) 1050 1100 1150 1200

2 0

50

100

150

200

250 300 Time (ms)

350

400

450

500

Fig. 3. Extended time interval past the one used in Figs. 1 and 2. The solution computed by the trapezoidal rule method (first) diverges further, while the error minimization method (second) continues to be stable.

Fig. 2. The computed solution is indistinguishable from the actual solution using the coefficients from the error minimization method.

zoidal rule based-formula (2) are quite different. Those are, respectively

The accuracy of the method of this paper is illustrated by Fig. 2, which indicates that there is no need to start and stop the integration at different points, as was done in [1]. The additional accuracy afforded by the new method makes that unnecessary. To test the results illustrated in Figs. 1 and 2 even further, the methods were applied to a more extended time interval, continuing the time period beyond the initial 0  t  500 ms interval that was used in the first two figures. In Fig. 3, the time period is 700  t  1200 ms. It can be seen that the solution computed using error minimization stays stable even during this period, while the trapezoidal rule solution decays further. For the computation for the result in Fig. 2, the coefficients, obtained by the error minimization method, corresponding to the coefficients in the general formula (3) are

2;

0 1;

1 ; 4

1 ; 2

1 4

(11)

which can again be matched to the coefficients in the general formula (0) (0) (2) (2) (2) (3) as c1 , c2 , c0 , c1 , and c2 , respectively. The value of the parameter  used in (9) for the coefficients in (10) was  = 0:032. Inde(2) (2) pendent of the value of  , the values of c0 and c2 seem always to be the same, and the first two coefficients are extremely close to 2 and 01, respectively. As a generaliztion of the trapezoidal rule, the error minimization method produces coefficients which become those of the best polynomial approximation as the parameter  gets close to zero. For example, with  = 0:014, the coefficients are

2:0000;

01:0000;

0:083 388;

0:833 22;

0:083 388: (12)

2:0000;

01:0000; 0:083 724; 0:837 24; 0:832 56; 0:083 724


(0) (0) (2) (2) (2)

(10)

These are listed in the order c1 , c2 , c0 , c1 , and c2 , respectively, and are given to five significant digits. The coefficients in the trape-

In general, the best coefficients for a formula derived for polynomial accuracy are the coefficients that are satisfied for the polynomial of highest degree. One can show that the trapezoidal rule applied twice as in [1] provides a formula of form (3) that is exact for polynomials up

388

IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 51, NO. 2, FEBRUARY 2004

150 T-rule value actual value 100

3.5

3 50 DFT amplitude 2.5

2 Trapezoidal Energy min 2 1/w

1.5

50

1 100 0.5 150

0 0.05

0.1

0.15

0.2

0.25 Hz-s

0.3

0.35

0.4

0.45

0.5

20

40

60

80

100 120 time (ms)

140

160

180

200

500

Fig. 4. This plot compares the magnitude of the frequency response of the error minimization method and the trapezoidal rule approach to a 1=! response.
0.6 0.4 0.2 0 trapezoid rule value actual data

400

new method value actual value

300

200

100 0.2 0.4 0.6 0.8 1 1.2 1.4 1 200 200 250 300 350 time (ms) 400 450 500 0

100

Fig. 6. Sinusoidal wave with a polynomial envelope,


2 3 4 5 6 time (ms) 7 8 9 10

(2 sin(2 2:2t) + sin(2 4:7t)

3.5 3 2.5 2 1.5 1 0.5 0 0.5 1 1.5 50 100 time (ms) 150 200 250 new method value actual value

solution computed by the trapezoidal rule method (top) diverges within the first few time steps, while the error minimization method (bottom) continues to be stable over a long period of time.

sin(2 5:5t)](:5t

y t

= [2 + 5). The

to degree 3, but that is not the best possible. Using the coefficients in (3) as

2;

0 1;

1 ; 12

10 ; 12

1 12

(13)

Sinusoidal wave function data with fractional frequencies, y = 2 sin(2 5:5t)). The solution computed by the trapezoidal rule method (first) diverges within the first few time steps, while the error minimization method (second) continues to be stable over a long period of time. Fig. 5.
(2 sin(2 2:2t) + sin(2 4:7t)

provides a formula of that form that is exact for polynomials up to degree 4. Thus these coefficients are the best for a form of (3) derived for polynomial accuracy. To compare (12) to (13), note that the decimal equivalent of 1/12 is 0.083 333, and the decimal equivalent of 10/12 is 0.833 33, nearly equivalent to the error minimization coefficients when  is near zero. We observed a similar phenomenon for our earlier work [8]. We believe that quadrature based on accuracy for polynomials is the limit case of the proposed method as  approaches zero. The value of  in the error minimization method would be small if the highest frequency of the signal is near zero. As a different kind of comparison, Fig. 4 presents the two different methods compared in Figs. 1 and 2 in terms of the magnitudes of their frequency responses. The magnitude plot of the frequency response of the continuous double integrator, 1=s2 , is 1=! 2 . The quality of a double

IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 51, NO. 2, FEBRUARY 2004

389

integrator can be revealed by comparing it with 1=!2 , see [10] for an overview. The basic form of the transfer function is

Internodal Myelinated Segments: Delay and RGC Time-Domain Green Function Model
Manuel Mara Villapecelln-Cid, Francisco Medina, and Laura Mara Roa

H (z ) = T

2 c0

(2)

01 + c(2) z 02 2 (0) (0) c1 + c2 z 01 + z 02


+ c1 z
(2)

with coefficients as given in (10) and (11). The plot in Fig. 4 shows that the trapezoidal rule methods frequency response only matches that of the 1=! 2 plot for small values. However, the plot of the magnitude of the frequency response of the error minimization method matches the plot of 1=! 2 extremely closely, only diverging from it a little for larger values of ! . Another example involves a signal that is a simple sum of sinusoids with fractional frequencies. Fig. 5 shows again a signal sampling where the trapezoidal rule diverges nearly immediately, but the error minimization method produces a stable solution. The cutoff frequency W used for this example was an integer, illustrating that the W value used need only be a reasonable upper bound on the spectrum, as noted above. Another example using similar data but with the addition of a polynomial envelope leads once again to a stable result, as shown in Fig. 6. This section has shown that the error minimization method is a better technique to use for obtaining position values from low-pass filtered digital accelerometer readings via an equation such as (3). In addition to increased accuracy of the result, actual application is just as fast as for classic methods. The integration coefficients that are needed in (3) may be determined from (9) off-line based on the sampling conditions and spectral range. Speed and simplicity of implementation are just the same as the classic methods. Error bounds can also be given for the energy minimization method, see [8] or [9]. Matlab programs to produce the calculations of (9) may be obtained from the authors.

AbstractThe myelinated axon can be modeled by means of a distributed RGC circuit. The Green function of this model allows for a generic formulation of the internodal segment response to any kind of stimulus, and accounts for the delay of the action potential associated with this segment. The RGC model accuracy is comparable to that of a more complex electromagnetic model, and predicted delay agrees with experimental measurements. Index TermsAttenuation, delay, Green function, inductance, internodal segment, models, myelinated axon, transmission line.

I. INTRODUCTION Neural transmission delay is of great importance in neurophysiology. For the case of myelinated axons, this delay is commonly attributed to Ranvier nodes, assuming that propagation through internodal segments is made with infinite velocity. Resistor models of the internodal segments [1], [2] assume saltatory conduction [3]. However, early experiments [4] show that internodes play a main role in global neural delay. Green functions have been used to determine electrical potential field in the volume conductor problem, leading to complex models [5], [6]. We propose to use the Green function of a simple distributed model of the internode in order to analyze its influence on the action potential delay. This can be better understood in the time domain rather than in the frequency domain [7]. II. METHOD Internodal segments can be modeled as a transmission line, as shown in Fig. 1. The distributed voltage source can model an external stimulus, whereas the current source could represent the current through a Ranvier node. (However, Ranvier nodes are not the object of this paper, so their associated impedance will not be considered [6]). If the current density is uniform, we can adapt the inductance analysis of a coaxial cable found in [8] to determine the internal inductance of the extracellular fluid extending to infinity when an uniform current is present. Assuming the axon radius (a1 ) is 3.1 m and the fiber radius (a2 ) is 5 m, then
L=  2 1 2 + ln a1 a2

REFERENCES
[1] S. O. Aase and H. Myklevust, Compression depth estimation for CPR quality assessment using DSP on accelerometer signals, IEEE Trans. Biomed. Eng., vol. 49, pp. 263268, Mar. 2002. [2] A. Sard, Best approximate integration formulas: best approximation formulas, Amer. J. Math., vol. 71, no. 1, pp. 8091, 1949. [3] R. B. Barrar, H. L. Loeb, and H. Warner, Optimal integration formulas for analytic functions, Bull. Amer. Math. Soc., vol. 79, pp. 12961298, 1973. [4] M. D. Stern, Optimal quadrature formulae, Comput. J., vol. 9, pp. 396403, 1967. [5] S. J. Kim, J. Y. Cho, and W. D. Kim, From the trapezoidal rule to higherorder accurate and unconditionally stable time-integration method for structural dynamics, Comput. Meth. Appl. Mech. Eng., vol. 149, pp. 7388, 1997. [6] D. H. Mugler and Y. Wu, Prediction of band-limited signals from past samples and applications to speech coding, in Nonuniform Sampling: Theory and Practice, F. Marvasti, Ed. New York: Plenum, 2001, ch. 13, pp. 543584. [7] D. H. Mugler, Y. Wu, and W. S. Clary, Linear prediction for bandpass signals based on nonuniform past samples, in Proc. IEEE Int. Conf. Acoustics, Speech, and Signal Processing, ICASSP 2000, vol. VI, Istanbul, Turkey, 2000, pp. 38543857. [8] D. H. Mugler and Y. Wu, An integrator for time-dependent systems with oscillatory behavior, Comput. Meth. Appl. Mech. Eng., vol. 171, pp. 2541, 1999. [9] Y. Wu, Linear prediction of band-limited signals, M.S. thesis, Univ. Akron, 1996. [10] A. Papoulis, Signal Analysis. New York: McGraw-Hill, 1977.

' 0:98 2 100

H/m:

(1)

The coaxial capacitance is given by [9]


C = 2 ln

a a

' 2:97 2 100

F/m

(2)

Manuscript received April 13, 2002; revised June 8, 2003. Asterisk indicates corresponding author. *M. M. Villapecelln-Cid is with Grupo de Ingeniera Biomdica, Escuela Superior de Ingeniera, University of Seville, Avda. de los Descubrimientos s/n, 41092, Seville, Spain (e-mail: mavilla@ieee.org). F. Medina is with Department of Electronics and Electromagnetism, School of Physics, University of Seville, 41012 Seville, Spain. L. M. Roa is with Grupo de Ingeniera Biomdica, Escuela Superior de Ingeniera, University of Seville 41012 Seville, Spain. Digital Object Identifier 10.1109/TBME.2003.820379

0018-9294/04$20.00 2004 IEEE

Potrebbero piacerti anche