{'fraction_non_alphanumeric': 0.0311284046692607, 'fraction_numerical': 0.0071284046692607, 'mean_word_length': 4.757347670250896, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Comprehensive feature extraction for objective Dynamic Gait Index assessment of risk of falls in the elderly

The evaluation and understanding of human balance and risk of falls, particularly in the elderly, is a growing field of study. Complementeing classic clinical tests (relying on comprehensive, although mostly qualitative assessments) with new devices that acquire precise patterns associated to the balance process, appears as a great oportunity in this area. Objective features can be obtained from these patterns, summarizing relevant data about balance and gait processes. This work presents results from the Dynamic Gait Index assessment over 42 subjects, while wearing a specially designed 3D-linear acceleration sensing device. With knowledge about the test, features related to step frequency, energy expenditure and changes in signal shape were defined and obtained from the three acceleration signals. The evolution of these features over time is of interest, so a moving-window strategy was implemented. Signal processing strategies were tested and improved, and results were correlated with the clinical scores given by the physicians to better understand them, initially test their reliability and select the most suitable ones. Results showed promise for this strategy in providing uniform, meaningful and new interpretations about different processes involved in the stages of the test, opening the possibility to develop custom user interfaces for clinical use.


Introduction
Balance is a complex phenomenon, central to the field of human biomechanics. No matter its cause, the loss of capabilities associated with motor control translates into significant reductions in the ability to perform daily tasks. In particular, the elderly population is subject to a higher risk of falls, which is associated to disabilities, the development of chronic degenerative diseases, and a consequent higher risk of death or a worsening quality of life. The fact that the global population is ageing "at unprecedented rates" [1], stresses the potential impact of these links between age and falls, so the possibility of assessing this risk results of great importance for public health [2]. There is a number of well-known clinical assessments in this field, such as the Tinetti scale or the Dynamic Gait Index assessment of risk of falls (DGI) [3]. While these tests rely on the expertise of specialized physicians, which perform comprehensive evaluations and score subjects (factoring step frequency, symmetry, continuity, deviations and need of assistance, etc.), the possibility of quantifying balance patterns through objective indexes can help provide access to new, more uniform assessments. Recent technologies have opened the possibility to acquire and process balance patterns in innovative ways. Activity monitors involving accelerometers [4] are of special interest as low-cost alternatives to equipments like force platforms or high-speed video motion tracking systems, and the possibilities for complementing current clinical tests with information from these new sensors are considered of great value [5] [6]. In order to approach this task, a wireless portable system was developed, which records linear accelerations in three axes [7]. This work is based on results from the evaluation of 42 subjects, over 60 years of age, through the DGI test, which will be detailed in following sections. Physicians performed the assessments while subjects were equipped with the new sensing device. The proposed line of work attempts to associate scores from the clinical examinations with experimental registers acquired through this system. This work presents and tests three new features and their evolution trough the stages of the DGI test, conceived as objective measures of factors that are taken into consideration in the clinical assessment (walking speed or changes in balance, etc.), aiming to give access to superior DGI evaluations, based on precise, uniform data with biomechanical meaning. Features were tested, and correlated to clinical scores, in order to prove and understand their meaning and scope. Finally, conclusions, further improvements and future lines of work are proposed.

Portable and programmable wireless system for gait and balance assessment
In order to acquire relevant, objective measurements during classic clinical balance tests, a portable, wireless system for linear acceleration recording in three axes was developed [7]. This system (hardware shown in figure 1) includes a battery-powered sensing device that was conceived as a belt with an attached, small case, containing a Micro ElectroMechanical System, triaxial capacitive accelerometer, a USB-powered terminal connected to a personal computer, and a dedicated graphical user interface, through which the device is controlled. The sensing device is intended to be fitted tightly around the trunk of the subject, and its selected placement for its subsequent implementations is an approximation of the whole body's center of mass (CM), having the sensor fixed at the widest part of the hips and at the middle of the back, a common choice for similar applications [5] [6]. The device will respond to the motion of the CM. Two alternative representations for the 3D-acceleration vector are shown in figure 2: three components -AnteroPosterior (AP), MedioLateral (ML) and Vertical (VE)-, or the magnitude of the vector (A MOD ) and two angles, θ AP and θ ML . The resulting system is a versatile and programmable wearable data logger and signal processor for 3D-acceleration signals, with a sampling rate of 100 Hz, sensing ranges of ±1.5 A unit , ±2 A unit , ±4 A unit ±6 A unit (A unit = 9.8 m/s 2 ), and a top resolution of 0.001 A unit . The high sampling rate and wide, programmable sensing range, combined with the good sensing resolution, are the main qualities of this system, suitable for both dynamic and static balance measurements, and with possible, further applications in sports, as well as its current implementation in normal and dysfunctional human balance analysis.

Dynamic Gait Index assessment of risk of falls
The Dynamic Gait Index (DGI) for gait assessment and risk of falls evaluation for the elderly consists of serveral excercises, mainly involving a normal, straight walk over relatively long distances (two 5 meters walks, in this case), with the addition of obstacles or commands given by a physician [3]. A detailed description for this particular implementation of this test is divided in stages as follows: The aim of these stages is to evaluate each subject's ability to respond to slight changes during a normal walk, with the physician assigning a score between 0 and 3 points for each activity. A score of 0 indicates severe changes or the impossibility to perform the activity, and a score of 3 means little to no difficulty in making such changes. Each particular activity has some specific parameters that need to be accounted for in order to determine the score, for every subject. In particular, activities 1 through 4 have certain properties that make them better suited for a joint evaluation. The highest possible score is 24, and scores of 19 or less have been related to a greater incidence of falls in the elderly.
As described, these evaluations, performed by qualified physicians, result in a comprehensive, although qualitative estimation for each subjet's abilities, balance quality and risk of falling, so a unified standard would be needed, for example, if results from many subjects and/or evaluated by different physicians were to be compared (unless those physicians had previously discussed some basic guidelines for their scoring procedure). The actual description of the test gives some notions about what qualifies as each score, but the final decision as to what makes a "slight", "moderate" or "severe" change falls on each specialist. Another scenario in which a unified standard would be useful could be the study of one single subject over time, as this subject excercises in order to correct certain habits or patterns that affect its balance capabilities, therefore allowing to determine how much that subject has improved in that time. In any case, it could be noted that a quantitative, reliable and uniform source of information could be of value for the work of the physicians, not only for the analysis of each subject, but also for possible broader, statistical studies over larger populations. Furthermore, for cases where changes are not too evident or difficulties are not severe, a quantitative source of information could be able to precisely detrmine how severe these difficulties are or how stable certain features remain during the excercies, allowing for a more precise scoring system. On the other hand, this does not mean that such examinations should be completely replaced by new, automated methods. Given the complexity of the human balance process, a comprehensive, justified analysis covering many different factors is needed for these examinations to take place. The goal of adding new data to these factors would be to give an additional, reliable and unified source of information that physicians could take into account while evaluating patients, combining their knowledge with new sources of information.

Experimental setup
The studies presented in this work correspond to evaluations made by specialised physicians over 42 subjects (31 women and 11 men), with an average age of (77 ± 8) years, which manifested a level of risk of falls. Every evaluated subject gave informed, written consent, before performing the tests, which were previously authorized by the Ethics Committee of the medical institution where the evaluations took place (Unidad Asistencial Dr. César Milstein), and described to the subjects before taking place. Subjects are patients of the neurology service of the instiution, and they performed three classic evaluations of gait and balance: the Tinetti Test for gait and balance assessment, the DGI evaluation, and a Get Up and Go test, while wearing the new sensing device, placed at the desired position (estimation of the center of mass). This work focuses on the DGI assessment. The setting for the experiments involved marking the straight path that would be followed by the subjects (indicating start and stop marks, and with intermediate marks), calibrating the measuring devices and positioning cameras for image acquisition. High-speed videos were recorded with two Casio EXFH25 cameras, at 120 frames-per-second, with one camera recording the sagital plane and the other on the frontal plane. Regular videos were also recorded. Before the beginning of the tests, several anthropometric measurements were taken for each subject (height, weight, foot length, a stride record and leg lengths with and without footwear). Both the weight and single stride records were taken with a Vernier force platform (range: -800 N to 3500 N, accuracy: ±1.2 N), and acquired through a Logger Pro 3 data collector, by the Logger Pro software. A portable height meter (±1 mm), and tape measure (±1 mm) was used for height and leg measurements. While performing the tests, patients wore their usual footwear and viewing aids. Test scales were agreed upon and scored, simultaneously and independently, by a neurologist and a specialist in kinesiology, for a better control of the scoring procedure. A chronometer and mechanical step counter were also used for specific gait assessments. Subjects were finally equipped with the accelerometry sensing device (calibration strategy detailed in [7]), and its distance from the ground was also measured. From this point on, the clinical evaluations took their normal course, with the sensing device and the cameras recording the procedure.

Feature definition -Signal Processing
The stages for the DGI assessment involve a subject performing normal tasks, sometimes with the addition of obstacles or responding to commands. In general, a low-risk subject should be able to perform these activities making fast but steady changes as needed, without showing disturbances or great discomfort. In this section, a quantitative approach to the evaluation of such changes is presented, taking the form of a moving-window feature extraction process, so that its user is able to see how much these features change over time, during each stage.

Main factors involved in first DGI stages
When physicians evaluate a subject while performing the DGI assessment, they follow a series of general guidelines that point out what could be related to a specific score, from 0 to 3 [3]. Evaluations for stages 1 through 4 rely mainly on factors related to changes in speed or balance patterns, as well as to each subject's ability to continue performing the tasks. Quantifying these factors would be useful then for a joint analysis of all of these stages, since the scoring process relies heavily on the physicians defining what is to be considered severe, minor, good or bad, so their evaluation becomes subjective.

Feature definition
With the main factors involved in the evaluation of stages 1 through 4 in mind, the following quantitative features were proposed as a potential supplement for the clinical assessment: I. Changes in speed Subjects can walk shorter distances over a constant period of time (resulting in lower speeds) for two reasons: a lower average step frequency at a constant stride length, or a reduced energy expenditure per step at a constant step frequency. The opposite would occur when increasing the speed. Considering the charactristics of the acquired acceleration signals, this translates into two features that can be calculated to factor speed changes, and other features: an average step frequency estimate (F avg ), and an average energy expenditure per step factor (E step ).

II. Changes in balance patterns, deviations, imbalance
When the two previous features are removed from the acceleration signals, what is left is the actual "shape" of the acceleration pattern on each axis. The absolute value of a Fast Fourier Transform for the windowed signals ( |FFT| ), normalized by F avg in the x-axis and by a factor related to E step in the y-axis, would carry this information about the windowed signals. If this information is compared to an average pattern for a normal walk by the same subject, it would indicate how much that shape changed ( FFT evol ).

III. Subject's ability to continue walking
Physicians can easily detect this event without the need for an automated source of information, so it will not be accounted for in the following sections. • Average step frequency estimate (F avg ) Previous work related to the sensing device and acquired balance and gait acceleration signals [8] has shown that information given by the sensor in the AP axis is the most reliable individual source for average step frequency estimation on normal gait evaluations. These signals are the most consistent, and their |FFT| have a peak at a fundamental frequency component (F max {|FFT AP |}) that can be directly linked to the actual mean frequency of the steps. Only when a very significant asymmetry between left and right steps occurs, that peak will take place at approximately one half of the actual mean step frequency, and those particular cases can be detected and compensated by comparing the three axes [8].Considering that the relevant information for these tests is the change in the average step frequency estimate, and not its absolute value, the proposed calculations of F avg will be obtained by this method. When further analyzing this feature, this can be compensated, and relative indexes will be defined (F avg /mean{F avg }, for example) in order to overcome the possible difference between the real mean step frequency and the estimated F avg .
F avg = F max {|FFT AP |} (1) • Average energy expenditure per step factor (E step ) An average energy expenditure factor E avg for an acceleration signal x[n], from sample n 0 to n 0 + W, is defined in (2). Finally, the proposed average energy expenditure per step factor (E step ) is detailed in (3).
• Signal shape evolution factor (FFT evol ) The first step in order to obtain this feature is to calculate the FFT for the three signals provided by the accelerometer (mean values are subtracted in order to consider the dynamics, and a Hanning window is applied for better results). The results are then normalized by re-scaling both axes: the x-axis (f) is re-scaled dividing it by F avg , (f N = f/F avg ) and the y-axis is re-scaled by avg E . The normalized spectrum for a signal is defined as follows: Once a normalized, new spectrum is obtained, it can be compared with other results. In particular, it is desired to compare the average |FFT N | of a normal walk with the |FFT N | of other stages, for the same subject, allowing to see how different the registers are. In order to determine this difference between two signals, named |FFT1 N |(f N ) and |FFT2 N |(f N ), a mean square error is obtained: where N bins is the number of bins for the normalized FFT (in this case 10000). FFT evol will be calculated for the three acceleration signals, comparing each FFT N spectrum to its mean counterpart for a normal walk. A higher FFT evol implies a greater difference between signals. For a sampling rate of 100 Hz, fmax will be less than 50 Hz. As part of the process, bins over f N max = 10 (fmax = 10 F avg ) are discarded, as they do not hold significant information compared to the lower frequencies.

3.3.2.
Moving-window signal processing strategy Subjects were equipped with the accelerometer sensing device while performing the DGI assessment. Registers from stages 1-4 should be cut to remove initial and final transients. With the isolated relevant sections of the registers, three signals of variable length are left, as the duration of each stage depends on how fast the subjects can perform the activity. The goal of this work is to analyze the evolution of the proposed features while each stage is performed. In order to do so, a moving-window strategy was selected ( figure 3). A window of size W size (in seconds) was defined to select smaller segments of the signals, under which each feature would be calculated (for either one or the three signals). By moving the window one sample at a time (or 0.01s for a 100 Hz sampling rate), and recalculating the features within that new segment, the end result for each feature will be a plot showing its evolution over time, i.e. F avg (t). With this information, physicians will have access to accurate data indicating which changes have occurred, when they took place, and how severe they have been, adding relevant and objective information to their assessment.

Figure 3.
Moving-window feature extraction strategy for a signal. As the window is moved, a time chart for the feature (Feature(t)) is created.
The selected window size was defined as four times the average step period estimate of the normal walk (or 4/F avg0 ). Information obtained from the Tinetti test for the subjects involved in the DGI assessment showed that their average step frequency was above 1 Hz for a normal walk [8]. With this information in mind, this window size was selected because W size needs to be large enough to contain at least a few steps (more than two consecutive steps) so that features preserve their meaning for the three axes, and also short enough to be sensitive to changes in the features. This W size should also be compatible with the estimation of an average time between commands given by the physicians. The complete feature extraction process through this moving-window approach requires at least one normal walk register, as it is the basis against which the other stages are compared. The following are simplified signal processing stages required for the final feature extraction process: 1. Calculate mean F avg and mean normalized spectrum FFT N (f N ) for a normal straight walk record (stage 1). Results are 1: F avg0 and 2: FFT N0 (f N ) for each signal. 2. Define W size . 3. Use the moving window to calculate the evolution of F avg and E avg over time (for registers from stages 1-4), results are 1: F avg (t), and 2: E avg (t) and E step (t) for each signal 4. Normalize |FFT| on each sample with F avg (t) and E avg (t), to calculate FFT N1 (f N ), for each signal 5. Get FFT evol (t) for each component with FFT N1 (f N ) and FFT N0 (f N ).
It should be noted that step 1 actually requires to perform a variation of steps 2 through 5 on the normal walk signals, in order to get the three mean normalized |FFT| for that stage. Since E step , as defined in (3), is not filtered, its evaluation through the moving-window process can lead to a feature that, while accurate, is sensitive to sudden peaks, which are expected for gait registers, especially for VE and ML or A MOD and θ ML signals. A filtered version of this feature (E step ') was developed, taking advantage of the FFT and the Hanning window relation to the signal energy, resulting in a smoother estimate (figure 5) that focuses on the energy expenditure in the central portion of the windowed signal. However, E avg and E step should not be discarded, and E avg is needed to calculate FFT evol .

Figure 4 is a hystogram for the final scores of the DGI test.
In can be seen that only 5 out of 42 subjects were diagnosed with a lower risk of falls. Considering the results of this test, most subjects would have a high risk of falling, and less than a 11.9% of them would be in better conditions. A more specific analysis, divided in stages, would point to particular conditions or difficulties for each subject. Some subjects could not perform all stages. A minimum of 40 registers per stage were obtained. A total of 165 registers from stages 1-4 of the DGI assessment were pre-processed in order to satisfy the requirements set in section 3.3.2. Both linear coordinates and magnitude and angular components were obtained from each acceleration register, and the proposed features were calculated from these signals. Register length was variable, with a mean of (8.94 ± 3.79) seconds, a minimum of 4 seconds and a maximum of 26 seconds. W size resulted in values of (2.63 ± 0.49) seconds. Window sizes remained adequately inferior to register lengths, as a lower F avg0 implies a larger W size , but also that subjects will take longer to perform the tasks, resulting in longer registers.
• The proposed set of features is an attempt at isolating three characteristics of a gait signal: its fundamental frequency, and its intensity and shape on each axis. As described, these parameters should be independent, and this has been proved in some cases, (shown in figure 5 for θ AP ). However, this does not mean that features will be independent for every case and stage (i.e.: attempting to walk faster can lead to an increased energy expenditure, as well as a faster step rate). Subjects' ability to change these features independently is what will determine how related they are in practice.  • F avg0 responded as expected for every normal walk assessment. One way to test this was to divide the number of steps in the registers (with previous, combined knowledge about the three normal walk signals for better accuracy) by the register time. Additionally, F avg (t) has shown good response to speed changes in the other excercises. However, for some cases where subjects drastically changed their gait patterns, this feature has shown jumps to lower frequencies on those periods (22 cases, for stages 2-4). If this occurred in response to a sudden change in the actual step frequency, it would not be considered an issue. In these cases, however, it could be seen that the highest frequency component of the signal was lower than any detected or observable step rate, and that it no longer reflected the fundamental step frequency, but a lower drift, possibly due to changes in posture, or sudden imbalances. This implied that the biomechanical meaning of the parameter was lost for these cases, affecting the subsequent calculation of E step and FFT evol . Both an example of this and the proposed solution are shown in figure 6. Two additional frequency estimators have been calculated to solve this: one is a filtered version of F avg (t), limiting its maximum change between samples; the other is the frequency maximum of the combined |FFT| of the AP and ML signals (considering that the ML-peak frequency for a normal walk should be half of the AP-peak frequency, and scaling the axes  ') was chosen as the one that most greatly reduced FFT evol (the difference from a normal walk) for the three signals, on each sample. This estimation has shown improved resistance to these discontinuities. In result, the original F avg (t) will show jumps related to drastic changes in balance (which is relevant to the test), while F avg '(t) will allow for the features to retain their biomechanical meaning ( figure 6). An analysis of F avg '(t) and its general link to scores in the test was performed. Results from one subject showing great asymmetry between steps, as mentioned in section 3.3.1. (with video records supporting this) were adapted to allow the presented analysis, comprising all subjects. Table 1 shows results for F avg0 and F avg '(t) (mean, maximum and relative standard deviation σ), grouped and averaged by score (which is specified for each stage). Results show consistency between F avg ' and the logic behind evaluations: more confident subjects perform tasks at higher speeds, with higher (speed changes) or lower (normal walk or with head turns) relative changes to F avg '(t) than those with lower scores. Additionally, the last feature (σ{F avg '(t)}/mean{F avg '(t)}) is independent of the absolute value of F avg ', as proposed in section 3.3.1. Table 1. F avg '(t) sweep: Results from stages 1-4 of DGI test, grouped by score. Subjects with higher scores show a higher mean or peak step frequency on all stages. When asked to change speed, subjects with 2-3 points show higher relative standard deviations in F avg ', and when asked to walk normally while turning their heads, they show lower deviations than subjects with 0 or 1 point. It should not be expected, however, that every subject with a score of 0 should have a lower mean step frequency than every subject that received a score of 3. Physicians take many factors into consideration while scoring, but the analysis of general tendencies for this feature should put its reliability to test. Averaging between subjects was only implemented to allow for a general interpretation of the results, while taking this into account. Finally, the highest relative change in F avg '(t) was found on subjects with a score of 3 in the walk with speed changes (0.11), meaning that they showed the most significant changes in speed, in relation to their average step frequency. Similar calculations were obtained from E step '(t), for each acceleration coordinate, showing higher maximum values and relative standard deviations for stage 2 than for stage 1 for E step ' from θ AP and A MOD , as well as greater relative deviations for stages 3-4 than for stage 1 on all components, for example.
• E step '(t) is a less noisy estimation than the unfiltered E step (t) (figure 5). In figure 7, E step '(t) is variable, and different, between axes. Isolating E step ' values from the three signals is of interest, but the ratio between AP and ML results (indicating how much of the actual energy expenditure is dedicated to moving forward) is another feature that should be considered, and it can easily be obtained from these features, while it would be difficult for physicians to estimate it. Alternative filters (and energy estimators) can additionally isolate other important signal characteristics, like sudden peaks, etc.  . Filtered E step '(t) results for subject in walk with speed changes (score: 2). Signals show different, significant changes in E step '(t), while the average step frequency F avg '(t) shows minor changes, stressing the relevance of this feature.
• As defined, FFT evol is able to detect changes in signal shape, compared to the mean shape of a recent normal walk, but also independently. Since the mean shape of a normal walk is constant, changes in FFT evol (t) reveal changes in the actual signal, so FFT evol can be used to assess how much the gait pattern changes over time, for all stages. Figure 8 shows the standard deviation of FFT evol (t) from two signals (θ AP vs. A MOD ) during the normal walk (8(a)), and for the walk with horizontal head turns (8(b)), for all subjects. Subjects with higher scores tend to show lower values for both signals, especially in (8(b)). A similar tendency was found for the walk with vertical head turns. Results for θ ML did not follow this trend. Additionally, the maximum standard deviation is significantly lower in the normal walk (0.07), compared to its equivalent in the walk with head turns in (8(b)) (0.30). This is consistent with the test, and can be used as a new feature, when evaluating a single subject.

Conclusions and Future Work
In this work, a comprehensive analysis of human gait registers obtained from a 3D-accelerometer during the DGI assessment of risk of falls in the elderly has been proposed, based on three features, each of them holding a specific, uniform biomechanical meaning between subjects, laying the required foundations for an objective analysis. Information from the assessment of these features on 42 subjects was processed, and summarized through parameters that were separated by the scores received during the clinical evaluations. Results showed promise in the implementation of the features for the objective evaluation of gait registers, and also allowed to determine which ones are best suited for discerning good and poor general responses, with features from ML signals showing the most variable response, due to the many factors that affect their shape between subjects (ranging from almost square signals to less recognizable ones), which can be assessed in the future. While a direct indiviual relationship between any feature and the final score for a stage should not be expected, unless it showed extreme values (a combination of the three features and other assessments made by the physicians is what should determine the score), the presented results show the practical viability of this method as a uniform source of detailed, precisely graded information, as well as a verification of the tendencies that they are expected to follow in practice. More advanced, custom analyzes can be developed on this basis. A new graphical user interface, through which a user can process this information during the DGI assessment, obtain the features and show them to the physicians, either graphically or with simple, select indexes as shown in table 1, can be developed, providing access to relevant, objective information that can improve and broaden the scope of this assessment. During the evaluation process, physicians remarked the possible effect of "training" on some of the tests. As subjects repeatedly perform these similar tasks, they get used to doing so, and this habit can affect how they respond in specific parts of the tests (stressing its effect on the timed, Get Up and Go evaluation). The proposed features can be used to actually measure this effect, by comparing two separate normal walks from the same subject at the beginning and end of the combined tests. Finally, it should be noted that certain variables from the original test can affect the proposed features: for example, the number of times and how often physicians command each subject to perform head turns or speed changes, which are not considered in the clinical assessment. For future work, commands can be emitted automatically, and saved with the acceleration signals, opening the possibility for an even more precise analysis (determining how much the features change, and how long it takes for the subject to perform the change).