3. Biomechonics Vol.22,No.s/9,pp.967-971, 1989. Printedin GreatBritain co21-9290/89 s3.00+ .co C 1989Pergamon Press plc TECHNICAL PADDING NOTE POINT EXTRAPOLATION TECHNIQUES BUTTERWORTH DIGITAL FILTER FOR THE GERALD SMITH Biomechanics Laboratory, Pennsylvania State University, University Park, PA 16802, U.S.A. INTRODUCTION Biomechanical studies of movement kinematics and kinetics often involve the measurement of analog quantities through discrete sampling of the signal at some regular interval. The digital data which result can, in most cases, adequately represent the original signal, providing the sampling frequency is high enough to respond to the high frequency components of that signal (Winter, 1979, p. 28). The ease of computer processing of digital data is a distinct advantage over analog data. However, in either case some signal conditioning is usually required before any quantitative analysis is performed. In the case of digital data, various smoothing routines have been developed for dealing with the random errors which are introduced in the measurement process. The most effective of these methods (spline functions, Fourier series and digital filters) have been described in detail elsewhere (see Wood, 1982 for a general review). The Buttenvorth digital filter is a recursive routine which uses prior data points (both smoothed and raw data) to predict subsequent smoothed data points (Gold and Rader, 1969). For biomechanical application, Winter (1979) suggested the use of a second order filter such as the following: Yi=a,Xi+alXi-l+alX,_2+blYi_1+b,Yi_, , where Xi is the raw data value for time i, Yi is the smoothed data value for time i, and the a and b coefficients are weighting values based on the sampling and cutoff frequencies desired. The recursive nature of the algorithm leads to a problem inherent in this approach to data smoothing. Because each smoothed data point requires two previous points as input into the algorithm, the process cannot be started with the first raw data point. Furthermore, the smoothing process requires several iterations to become effective as prior smoothed points also contribute to the value of each point. Therefore, typical applications of digital filtering minimize these ‘startup’ problems with the filter by beginning the processing at a point well ahead of the true region of interest. These extra ‘padding points’ would be expected to contain more noise than the remainder of the data set. In practice, digital fi!ters are commonly applied to data sets in both a forward and reverse direction. This double filtering removes a time shift which occurs with a single pass through the filter (Winter, 1979, pp. 36-37). As a result, padding points are necessary not only at the beginning but also at the end of the data set. The inclusion of padding points is not a serious problem when collecting data by some electronic means; however, when manual operations such as film digitizing are involved, the extra padding point data may greatly increase the data collection task. As a means of avoiding the extra digitizing required for the creation of genuine raw data to be used as Received in finalfirm 21 November 1988. padding points for a digital filter, several alternatives will be presented in the following analysis. In kinematic and kinetic studies it is often necessary to determine velocities and accelerations from displacement data. This process is somewhat problematic because of the high frequency noise amplification which results. Therefore prior to differentiation of displacement data some smoothing of the raw data is usually required. The acceleration curves which result from double differentiation of displacement-time data are quite sensitive to small displacement differences. Thus, acceleration curves provide a good instrument for comparison of the subtle differences between various data smoothing routines. In particular, acceleration curves will be used to distinguish the differences between the methods for generating padding points. METHODS Several routines were created for generating padding points at the beginning and end of a raw data set. A method which has occasionally been used in digitizing when the appropriate extra frames were not available (subject moved out of the held of view, for example) is to redigitize or duplicate the coordinates from the last available frame. Other methods for artificially calculating padding point values could involve extrapolations from the first (or last) few real raw data points. For example, a linear extrapolation based on the slope between the first (or last) two points could easily be used to calculate the extra points. Alternatively a ‘reflection’ could be made about the end point, determining the (E-i) point value from the (E + i) point value (where E is the end point and i is the number of padding points). Each of these techniques is illustrated in Fig. 1. To assess the effect that each padding method had on the resultant smoothed data produced by a Butterworth second order digital filter (with forward and reverse passes through the filter) a standard data set was used for comparison. Pezzack et al. (1977) reported a comparison of accelerations from several data smoothing methods with an independent analog measure of acceleration. The data set they included was used as the base for this study. However, the Pezzack et al. data are somewhat unrepresentative of real biomechanical data in their relative cleanness or absence of noise. To produce a more realistic data set, random noise was introduced into the Pezzack et al. data (in a manner similar to that used by Hatze, 1981; Lanshammer, 1982; and Wood, 1982). The original data ranged from 0.1517 to 2.2047 rad. At each data point a noise component was added of at maximum _+O.l rad. The actual noise magnitude was determined by computer generated random numbers. This noisy data set was then used as the raw data to be digitally filtered under various conditions. To simulate the situation in actual digitizing, a ‘window’ was taken from the middle of the data set. The original data 967 968 METHODS Technical Note FOR GENERATING PADDING POINTS FROM RAW DATA ANGLE VS TIME: COMPARISON OF ORIGINAL TO NOISY DATA 1 04 0.0 I I 9 I , 0.5 1.0 1.5 2.0 2.5 SAMPLE NUMBER Fig. 1. Padding points were created using three methods. The duplication method simply reproduced the last data point value. The linear extrapolation method used the slope between the last two points to determine the padding points. The reflection method used the E (end point) value as a reference level, determining the E-i padding point value based on the E + i point value. 0 TIME (WC) Fig. 2. Comparison of the Pezzack et al. (1977) angle-time data with the noisy data set used in this study. The noisy data have been shifted upward in the graph for ease of comparison. ANGULAR ACCELERATION VS TIME: COMPARISON OF ORIGINAL AND FILTERED DATA set involved 142 points; a subset of 80 points was designated the region of interest (from point 31 to point 110). The three methods of padding point generation were applied to this 80 point region (with the number of padding points ranging from 0 to 30) and then digitally filtered (cutoff frequency of 4 Hz). From each of the smoothed data sets, velocity vs time and acceleration vs time functions were calculated using first central difference methods (Miller and Nelson, 1976). These acceleration curves were also compared with those obtained in smoothing the corresponding range of points from the noisy data set (as if the padding points were digitized). The original Pezzack et al. (1977) data accelerations (obtained by smoothing and differentiating the ‘clean’ data) were used as an estimate of the ‘actual’ acceleration curve (a cutoff frequency of 9 Hz was used). The acceleration curve obtained in this manner was illustrated in the Pezzack et al. paper and provided an excellent approximation to the accelerometer measurements. The beginning and end region acceleration deviations from the ‘actual’ acceleration were represented by a mean residual over the first (or last) 10 points. This value was defined as the mean of the absolute value of the difference between actual accelerations and the filtered noisy accelerations. 0.0 0.5 1.0 1.5 2.0 2.5 a 0 TIME (sac) Fig. 3. Comparison of the angular accelerations from the original angular data and the acceleration curve from a corresponding smoothed angle-time data set. The fluctuations of the original accelerations suggest that some noise was included in the sample. The solid curve illustrates the acceleration function after smoothing; this was used as an estimate of the ‘actual’ acceleration. RESULTS The original (‘clean’) angle vs time data (Pezzack et al., 1977) describe a smoothly varying angular position. The noisy data set was created by randomly introducing deviations added to the original data. The resulting angular data (Fig. 2) are clearly noisy (probably exceeding the noise levels of typical biomechanical data). The angular accelerations of the original data (Fig. 3) illustrate the fluctuation one normally encounters after differentiating even relatively clean raw displacement data. Differentiating the noisy data would result in velocity and acceleration curves which obscure the actual angular velocity and acceleration values. Signal processing of some type would clearly be a prerequisite to determining angular accelerations from such noisy data. The acceleration vs time curves for several conditions are illustrated in Fig. 4. Except for the immediate vicinity of the end points the curves are nearly identical. However, near the end points, considerable variation in acceleration was observed between padding methods and also the number of padding points included. Tables 1 and 2 summarize the mean residuals observed for the start and end point deviations from the actual acceleration in those regions. The starting region was an area of small negative angular acceleration. The residuals observed were similar for the reflection and the digitize padding point procedures, while the linear extrapolation and duplicate end point methods were consistently more deviant from actual accelerations. The end region was an area of large negative acceleration. The large negative peak acceleration was consistently attenuated by each filtering procedure. The curves returned to closer proximity near the end point. Values in Table 2 suggest a pattern somewhat similar to that observed in the beginning region. The reflection and digitize padding points methods were similar in approximating the actual acceleration; however, the linear extrapolation method was as good an estimator of this acceleration condition. The relationship of mean residual to the number of padding points for each padding method is illustrated in Technical Note ANGULAR ACCELERATION 969 ANGULAR VS TIME -100 i 0.5 1.0 ACCELERATION ANGULAR VS TIME ACCELERATION 2.0 ACCELERATION VS TIME nsrz (SOC) (4 ANGULAR 1.5 VS TIME rlME(sec, @I ANGULAR ACCELERATION VS TIME Fig. 4. Comparison of angular accelerations under various padding point conditions with the actual acceleration. (a) No padding points;(b) duplicating end point (10 points);(c) linear extrapolation (10 points); (d) reflection (10 points) and (e) reflection (30 points). Fig. 5. The curves reach a plateau beyond 10 padding points, with little improvement exhibited. DISCUSSION The data values used in creating padding points around a data set for digital filtering purposes have typically been assumed to derive from actual measurements. In some cases such as film digitizing, the extra digitizing required may substantially increase the data collection time. Furthermore, allowing for the required padding points in field of view may often result in smaller image size from which to digitize and a resulting decrease in coordinate precision. Thus, artificial means of generating padding points which would not severely distort the smoothed data would be desirable. 970 Technical Note Table 1 I MEAN RESIDUALS (ACTUAL POINTS: DUPLICATE LINEAR ACCELERATION): NUMBER OF PADDING POINTS: 0 5 10 15 PADDING METHOD: DIGITIZE - CALCULATED 1ST POINT: EXTRAPOLATION: REFLECTION: FRAMES 1 - 10 20 26 30 9.4 2.3 2.4 2.2 2.2 2.3 2.3 9.4 6.3 6.3 6.3 6.3 6.3 6.3 9.4 3.6 4.5 4.2 4.2 4.2 4.2 9.4 2.4 2.2 2.2 2.2 2.2 2.2 Table 2 MEAN RESIDUALS (ACTUAL PADDING METHOD: DIGITIZE POINTS: DUPLICATE LINEAR 1 ST POINT: EXTRAPOLATION: REFLECTION: - CALCULATED ACCELERATION): NUMBER OF PADDING POINTS: 0 5 10 16 FRAMES 71 - 60 20 25 30 17.4 9.5 7.0 7.2 7.1 7.1 7.1 17.4 11.7 10.7 10.7 10.7 10.7 10.7 17.4 6.7 7.0 6.9 6.6 6.9 6.9 17.4 10.7 7.3 6.6 6.9 7.0 7.0 Each of the methods described above was superior to not padding the filter at all. The simplest method (duplication of the end point) was the least effective procedure tested. Both of the extrapolation procedures (linear and reflection) resulted in acceleration curves closely approximating those obtained from actually digitizing data. However, the reflection method produced slightly better end point accelerations under the conditions of the test. The ease with which either technique could be implemented within a computer program provides little discrimination between methods. The reflection method is perhaps a more aesthetically appealing choice. Its use is somewhat reminiscent of the techniques involved in Fourier analysis of functions over a finite time interval: The function is simply extended through a point order reversal, creating a periodic waveform in the process. In this case a slightly more complex reflection is involved. The reflection method is perhaps more justifiable on theoretical grounds as well. The linear extrapolation and duplication methods create regions of zero acceleration over the padding points. It would be expected that accelerations near the boundary of tHe data set would be influenced by the padding point derivatives even though the padding point values were not used in computing the accelerations. On the other hand, the padding point derivatives for the reflection method would more nearly match the actual boundary accelerations and thus affect them minimally. It is clear that the number of padding points used need not be extended beyond 20 points. If digitized data are to be used for padding, 10 points are probably sufficient. The effort involved in additional digitizing may not improve the accelerations obtained from the smoothed data. With artificially generated padding points there is a marginal improvement in acceleration estimation in going to 15 or 20 points of padding. In either case, there is no real penalty for extending the padding further; the computer processing time for the additional points is usually negligible. The acceleration curves from the Pezzack et al. (1977) data suggest that the end point values are influenced by the nature of the underlying acceleration function. When the acceleration is changing rapidly it appears that a good approximation to the actual acceleration is likely to result from the filtering/differentiating procedure. When the actual acceleration is fluctuating through minor oscillations, the calculated acceleration may not closely follow it, particularly near the end points. Thus some care is advisable in using derived accelerations for the further prediction of kinetic variables, particularly near the boundary values of the digitized interval. CONCLUSIONS The calculation of first and second order derivatives from digital data is a process which selectively amplifies the high frequency noise components over the lower frequency signal components characteristic of biomechanical data. To mini- Technical Note MEAN 04 0 (4 RESIDUALS OF ACCELERATION: FRAMES 1 - 10 I 10 30 20 NUMBER OF PADDIND POINT3 MEAN RESIDUALS OF ACCELERATION: 10 FRAMES 2'0 71- . DUPLCATE . UN- . REREClm4 80 971 mize the et&t of the noise components, smoothing routines have been devised which filter out the high frequency noise. One of the most easily implementable of these filtering procedures is the Butterworth digital filter: a recursive algorithm which uses both raw and smooth data values to determine subsequent smoothed values. The use of this digital tilter is dependent on ‘padding’ a data set with extra points at both the beginning and end of the data. These padding data are used to get the fitter running smoothly before getting to the data in the region of interest. The use of actual raw data for these padding points produces satisfactory filtering results but requires a significant additional effort in measurement. Several artificial means were created for producing padding points. The most effective of these methods (reflection around the boundary point) resulted in acceleration curves which closely matched those produced with digitized padding data. The number of padding points was found to affect the acceleration curves derived from the smoothed data. Between 10 and 20 padding points were found to be sufficient to produce a smooth transition from padding to real data points with good approximation to actual accelerations. REFERENCES 3’0 NUMBER OF PADDING POINT3 Fig. 5. Mean residuals for the beginning (a) and ending (b)portions of the 80 point region analyzed. The mean residual was the average difference between acceleration calculated and actual acceleration (for the first/last 10 points). Gold, B. and Rader, C. M. (1969) Digital Processing of Signals. McGraw-Hill, New York. Hatze, H. (1981) The use of optimally regularized Fourier series for estimating higher-order derivatives of noisy biomechanical data. J. Biomechanics 14, 13-18. Lanshammer, H. (1982) On practical evaluation of differentiation techniques for human gait analysis. J. Biomechanics 15, 99-105. Miller, D. I. and Nelson, R. C. (1976) Biomechanics of Sport. Lea 8r Febiger, Philadelphia. Perzack, J. C., Norman, R. W. and Winter, D. A. (1977) On assessment of derivative determining techniques used for motion analysis. J. Biomechanics 10, 377-382. Winter, D. A. (1979) Biomechanics ofHuman Mooement. John Wiley, New York. Wood, G. A. (1982) Data smoothing and differentiation procedures in biomechanics. Exercise and Sport Science Reviews (Edited by Terjung, R. L.), Vol. 10, pp. 308-362. Franklin Institute Press, Philadelphia, PA.
© Copyright 2026 Paperzz