1 Introduction

Motion analysis has a wide range of applications in neurology, rehabilitation, and physical therapy, allowing the detection of motion disorders [7, 27] and monitoring of different neurological symptoms. This multidisciplinary area combines the knowledge and use of different microelectromechanical sensor units (MEMS), video, depth and thermal camera systems [38, 39, 42], and wireless communication links. The development of automatic information systems in this area is a way how to contribute to the more efficient health care as well.

Fig. 1
figure 1

Principle of the use of the axis neuron system for accelerometric data acquisition at a selected body position of an individual with ataxia presenting a data recorded from the left leg during a time window of 20 s; b its spectral components; c positions of the sensors; and d, e similar results for the right leg and spectral windows for the evaluation of the relative power and estimation of the data features

Computational intelligence methods process the data recorded by sensors located inside wearable devices, such as mobile phones [12, 18, 26] and tablets or more sophisticated systems including perception neuron [28, 35] and robotic devices. Specific sensors are often applied for gait analysis [1, 15, 47, 49, 53], gesture recognition [52], motion symmetry study [41], breathing [40], or for monitoring human activities [16, 17, 50]. The results of the associated mathematical processing of the observed signals are then used for the early detection and classification of possible neurological disorders [46], monitoring the quality of the rehabilitation process, or for simulation-based training in surgery.

Motion sensors provide time-synchronized multichannel signals and multidimensional records that must be analysed by appropriate signal processing methods and specific intelligent data processing tools. While spatial domain features based on observations by video cameras are often used, frequency domain features can be very efficient as well. To avoid problems related the selection of the most significant features, the deep learning methods [2, 10, 45, 51] are used for more effective decision making in some cases as well. This complex approach [4, 21] to construction of classification models can be very efficient, but it needs sophisticated software and powerful computational tools.

The present paper is devoted to the analysis of motion feature [11, 22, 33] related to ataxia [13] as a neurological symptom characterized by the loss of balance and disrupted coordination while walking [7, 48]. Clinical scales used for diagnosing and quantification of ataxia (e.g. SARA) are not suitable for continuous monitoring in the natural environment of patients. In this situation, wearable sensors [19] can be very useful for balance assessment even though there are still many problems before their introduction to clinical practice. These problems include the selection of (1) the most suitable sensor positions, (2) the most determining features, and (3) the most reliable classification methods.

There exist different instrumented methods for objectification of ataxic disorders including infrared 3D cameras, pressure sensitive walkways [44], or electrooculography tests [32]. The increasing acceptance of gait analysis techniques and associated statistical analysis are enable to quantify subtle gait characteristics that are unmeasurable by current clinical methods to evaluate different gait scores and to differentiate between ataxic patients and healthy controls [7]. Despite of favourable results, no automated classification methods are commonly applied in the clinical practice.

Extracted parameters used for imbalance detection during the gait or stance represent spatio-temporal properties like the range of motions, step length, step time, stride time and speed, double support time, base width, and the anthropometric measures [9, 23]. A small number of studies bring promising results when extracting more complex features based on frequency measures [8, 29] and entropy [34, 37]. Specific studies are often devoted to the correlation of different biomedical and neurological signals [31], their interaction, and reactions to external stimuli.

The most common sensor placement is lower back and lower limb, while the locations on the upper body are relatively uncommon [19]. To analyse this problem, the full-body motion capture device (perception neuron [28]) was used to simultaneously record accelerometric data [3] at different sensor positions during the gait. Our set of individuals consists of healthy controls and ataxic patients suffering from multiple sclerosis (MS) as an autoinflammatory neurodegenerative disease.

The proposed method for the selection of features includes the use of functional transforms [25] to evaluate the components of the power at specific frequency ranges [24]. The extracted features are then used for the classification of the individual records and for evaluation of the classification accuracy for data acquired from different parts of the body.

2 Methods

2.1 Data acquisition

Figure 1 presents the principle of simultaneous data acquisition by the perception neuron system [5, 28] that uses 31 sensor units located at different parts of the body. This system enables both the data collection for the spatial location of the individual body joints and the recording of detailed signals acquired by individual sensors with a given sampling frequency. The notation for selected body positions used in the present study is presented in Table 1.

Table 1 Number of segments (S) belonging to class 1 (normal) and class 2 (ataxic) of separate individuals and positions used for extraction of accelerometric data features

The individuals in Table 1 form two separate classes:

  1. 1.

    Normal: 13 individuals (95 time windows 20-s long),

  2. 2.

    Ataxic: 12 individuals (106 time windows 20-s long).

The diagnosis of these individuals was evaluated by two experienced neurologists according to their behaviour during the gait. The simultaneous recording of accelerometric data was performed by the perception neuron after its initial calibration. The sampling frequency was \(f_s=60\) Hz (sampling time period \(T_s=0.017\) s). Each time frame included accelerometric data in three directions for specific body positions. Their modulus was then used for the data analysis.

2.2 Data processing methods

The pattern matrix was formed by the column vectors of the features associated with each signal segment recorded at a specific body position. The distribution of power components was studied for each joint and signal segment separately, using the discrete Fourier transform and frequency windows 0.5 Hz long. A sample of the resulting plots for the left/right shoulder for all windows belonging to a selected individual is presented in Fig. 2. Differences depend upon location of sensors and the diagnosis of a selected individual.

Fig. 2
figure 2

The evolution of spectral components of a selected individual (A09) evaluated in a time window 20-s long estimated as the relative power in the frequency range a 3–15 Hz and b 15–30 Hz, respectively, for the left/right shoulder

To reduce the number of features, two frequency ranges were selected to analyse the high-frequency components of the accelerometric data. Each of the selected spectral features of a signal segment N samples long was evaluated, using the discrete Fourier transform, in terms of the relative power in a specified frequency band \(\langle f_{c1}, f_{c2} \rangle\), as follows:

$$\begin{aligned} PV=\frac{\sum _{k \in {\varPhi }} \left| Y(k) \right| ^2}{\sum _{k=0}^{M/2} \left| Y(k) \right| ^2}, \quad Y(k)=\sum _{n=0}^{M-1} y(n)\;e^{-j\,kn\frac{2\pi }{M}} \end{aligned}$$
(1)

where \({\varPhi }\) is the set of indices for which the frequency values \(f_k= \frac{k}{N} f_s \in \langle f_{c1}, f_{c2} \rangle\). In the given case, we studied accelerometric spectral features in \(R=2\) frequency bands, \(\langle 3, 15)\) Hz and \(\langle 15, 30)\) Hz.

Fig. 3
figure 3

A two-layer neural network with sigmoidal and softmax transfer functions to recognize features of individual signal segments of accelerometric data acquired at specific body locations

The classification of Q pattern vector values and associated target values into two classes was performed by the methods of a support vector machine, Bayesian analysis, nearest neighbours, and neural networks. Special attention was given to the two-layer neural network as a classification model with R inputs, S1 neurons in the first layer, and S2 neurons in the second layer, as presented in Fig. 3.

The pattern matrix \(\mathbf{P}_{R,Q}\) was formed by Q columns with each of them standing for a pattern vector associated with the individual accelerometric time window. The outputs of the individual layers formed the values

$$\begin{aligned} \mathbf{A1}_{S1,Q}= & {} F1(\mathbf{W1}_{S1,R}\; \mathbf{P}_{R,Q}, \mathbf{b1}_{S1,1}) \\ \mathbf{A2}_{S2,Q}= & {} F2(\mathbf{W2}_{S2,S1}\; \mathbf{A1}_{S1,Q}, \mathbf{b2}_{S2,1}) \end{aligned}$$
(2)

The network coefficients included the elements of the matrices \(\mathbf{W1}_{S1,R}\), \(\mathbf{W2}_{S2,S1}\) and vectors \(\mathbf{b1}_{S1,1}\), \(\mathbf{b2}_{S2,1}\). The matrix of target values \(\mathbf{T}_{S2,Q}\) with \(S2=2\) rows was defined by the corresponding classes specified by a neurologist.

The proposed model used the sigmoidal transfer function F1 in the first layer and the probabilistic softmax transfer function F2 in the second layer. The values of the output layer, based on the Bayes theorem [42], used the function

$$\begin{aligned} F2(.)=\frac{{\text {exp}}(.)}{{\text {sum}}({\text {exp}}(.))} \end{aligned}$$
(3)

which provides the probabilities of individuals’ belonging to each class. The separate columns of the output matrix present the memberships in individual classes.

The performance of this neural network for its given target and evaluated outputs, \(\mathbf{T}_{S2,Q}\) and \(\mathbf{A2}_{S2,Q}\), respectively, was estimated by the cross-entropy error [30] and the calculation of the aggregate cross-entropy performance

$$\begin{aligned} P=\frac{1}{M} \sum _{i=1}^{S2} \sum _{j=1}^{Q} CE(i,j) \end{aligned}$$
(4)

in each learning epoch with \(M=S2 \times Q\) standing for the total number of output values and

$$\begin{aligned} \mathbf{CE}_{S2,Q}= - \mathbf{T}_{S2,Q} .* \text {log}(\mathbf{A2}_{S2,Q}) \end{aligned}$$
(5)

representing the cross-entropy for each pair of target–output elements. During the optimization process, the coefficients of the model were selected so as to minimize the cross-entropy values.

The complete optimization process was performed for the training (70%), validation (15%), and test (15%) sets of signal segments. The qualities of the final models were then compared by their classification accuracy and the cross-validation errors.

3 Results

The proposed method was applied to the analysis of accelerometric data recorded at different body positions in 201 windows, each window being 20-s long (1200 samples), associated with two classes (normal and ataxic). After the initial detailed spectral analysis (presented for selected positions in Fig. 2), two frequency ranges for estimating the pattern values were chosen: \(\langle 3, 15)\) Hz and \(\langle 15, 30)\) Hz. Evaluations were done in the MATLAB 2019b environment.

Frequency domain signal processing is supported by [14, 36], confirming that sudden tilts during the gait cause three types of involuntary muscle responses. A segmental stretch reflex M1 occurs with a short latency, less than 50 ms, followed by the ‘long loop’ reflex M2 with its latency of 60–80 ms, and corrective muscle contractions, M3, at 100 ms. Patients with affected cerebellum or spinocerebellar pathways have delayed M2 or M3 reflexes. Moreover, such patients have a stronger and longer M3 antagonist response, which leads to correction overshooting. This is the most likely explanation for the higher power in the 3–15 Hz frequency range [33]. Inaccurate limb movements and dysfunctional corrective reflexes lead to increased body sway.

Fig. 4
figure 4

Classification of frequency features for a the left and right foot and b the left shoulder and right shoulder for a selected individual (A09) belonging to class 2 (ataxic)

The comparison of the classification of the associated frequency features for the left and the right foot and for the left and the right shoulder for a selected individual (A09) is presented in Fig. 4. The selected individual belongs to the ataxic class, and the results show how symmetric parts of the body can be distinguished in case they behave differently.

Table 2 Comparison of average power features for 25 individuals and four positions on the left and right parts of the body: Left/RightFoot (8/4), Left/RightLeg (7/3), Left/RightUpLeg (6/2), and Left/RightShoulder (45/17)

Table 2 compares the average power features for 25 individuals and four positions on the left and right parts of the body: Left/RightFoot, Left/RightLeg, Left/RightUpLeg, and Left/RightShoulder. The results confirm that in most cases, the average feature values for corresponding positions are lower for individuals from class 1 (normal) than for those from class 2 (ataxic). This fact can be explained by the body sway of ataxic patients and their efforts to compensate for instability.

Fig. 5
figure 5

Comparison of distributions of global mean power of signal segments for 25 different individuals forming class 1 (normal) and class 2 (ataxic) using mean power acquired by accelerometers located a left and right leg, b left and right upleg, c left and right shoulders, and d head and spine, using 20-s long time windows

Fig. 6
figure 6

The distribution of cluster centres for 25 different individuals forming class 1 (normal) and class 2 (ataxic) using mean power acquired by accelerometers located at different positions with 0.2, 0.5, and 0.8 multiples of standard deviations and criterion values for selected sensor positions

Table 3 Comparison of average power features of 25 individuals and positions located on the head (15) and the spine (10) with their mean (MN) values
Fig. 7
figure 7

Classification of frequency features for a the left foot, b the left upleg, and c the left shoulder, using data acquired from 25 individuals belonging to class 1 (normal) and class 2 (ataxic) using the neural network classification method and presenting the accuracy (AC) and cross-validation (CV) errors

Table 3 compares the average power features of 25 individuals and positions located on the head (15) and the spine (10). Again, the results confirm that in most cases, the average values of features for corresponding positions are lower for individuals from class 1 (normal) in comparison with those from class 2 (ataxic).

Figure 5 compares the distribution of the global mean of the power of a signal segment for 25 different individuals forming class 1 (normal) and class 2 (ataxic), using the mean power acquired by accelerometers located on the (a) left and right leg, (b) left and right upleg, (c) left and right shoulder, and (d) head and spine, using 20-s long time windows. The distribution of cluster centres with standard deviations for individual sensors located at different positions is presented in Fig. 6. The numerical comparison of clusters was performed by the criterion

$$\begin{aligned} C(k)=\frac{{\text {dist}}([M_x(j),M_y(j)],[M_x(k),M_y(k)])}{{\text {mean}}([S_x(j),S_y(j)]) + {\text {mean}}([S_x(k),S_y(k)])} \end{aligned}$$
(6)

where \([M_x(i),M_y(i)]\) and \([S_x(i),S_y(i)]\) stand for cluster centres and standard deviations of cluster pairs for \(i=j\) and \(i=k\). This value is the highest for the shoulder position (3.0) and the lowest for the foot position (0.7).

Figure 7 compares selected classification results, and it presents the distribution of frequency features for the left foot, for the left upleg, and for the left shoulder, using data acquired from 25 individuals belonging to class 1 (normal) and class 2 (ataxic) using the neural network classification method. The clusters of values belonging to class 1 are more compact than those belonging to class 2, which have a larger standard deviation. Moreover, the discriminative abilities are higher for sensors located in the upper half of the body, confirming the results of other studies [15, 20].

Table 4 Accuracy (AC [%]), specificity (TNR [%]), sensitivity (TPR [%]), and cross-validation (CV) errors of the classification by the support vector machine (SVM), Bayesian, 3-nearest neighbour (3-NN), and neural network (NN) methods for power features acquired from accelerometers located on the left and right foot, leg, shoulder, and head/spine for 14 individuals of class 1 (normal) and class 2 (ataxic)

Table 4 compares the classification accuracy by the support vector machine (SVM), decision tree (DT), 3-nearest neighbour (3-NN), and neural network (NN) methods for 25 individuals of class 1 (normal) and class 2 (ataxic) using power features acquired from accelerometers positioned on the left and right foot, leg, upleg, shoulder, and head/spine. Cross-validation errors are evaluated by the leave-one-out method in all cases.

The distribution of frequency features for both classes (1: healthy controls, 2: ataxic patients) and their classification confirm the importance of their proper selection. It can be summarized that

  1. 1.

    cluster centres for class 1 (normal) are more compact than those of class 2 (ataxic): it can be explained by the different patterns of motion of patients with ataxia;

  2. 2.

    the relative mean power of features of patients with ataxia (in the frequency band F1 \(\langle 3,15 \rangle\) Hz) is higher, for the same reasons: this can be explained by the fast motions of patients with ataxia;

  3. 3.

    the classification accuracy is dependent on positions of sensors and the model used: sensors located on the shoulder, head, or spine can distinguish between classes 1 and 2 with an accuracy higher than 98%.

A better discrimination of ataxia with sensors placed on the upper body can be explained by comparison with the inverted pendulum. Ankle sensors capture less involuntary movements due to partial stabilization by the contact with the floor. Amplitude of body oscillations increases with the distance from the ground. Sensors placed on the head and shoulders are therefore more suitable for separation of normal and ataxic gait.

Results obtained correspond with those published recently [7, 29, 37]. Main advantages of accelerometric body-worn systems over other motion capture devices are in simultaneous monitoring of different body parts with relatively high spatio-temporal resolution and extensive possibilities of feature extraction. Recording upper-body movements as a clinical biomarker during the gait is emerging as a powerful measure complementary to traditional gait analysis using stepping characteristics [6]. The proposed methodology is relatively simple and affordable for discriminating ataxic patients from controls. Different models using spatial domain features have in many cases much lower accuracy [32, 53] which in the early stage of the disease is between 70 and 80% [6, 43] only. These facts motivate further studies of accelerometers to diagnose ataxic disorders.

4 Conclusion

This paper presents selected methods of signal processing and machine learning to evaluate and classify accelerometric data acquired during the gait. Individuals selected by the clinical expert assessment include 12 ataxic patients and 13 healthy controls.

The goal of the study is to present the use of frequency domain features to classify individuals with neurological disorders and to study the discrimination abilities of sensors in dependence on their location on the body. Results show how different positions of sensors can affect the ability to perform the classification, its accuracy, and the cross-validation errors.

The study includes the application of selected classification methods to distinguish ataxic patients from healthy controls. The best results were achieved by the neural network method with the accuracy of 77.1 % for sensors located on the left/right foot that was increased to more than 98.0 % for sensors located in the upper part of the body (shoulders, head, spine).

It is expected that further studies will be devoted to the analysis of more extensive data sets of patients with different neurological problems during different kinds of activities and selected positions of sensors. Other features related to motion disorders (including spasticity, flaccidity, rigidity, tremor) will be studied as well. It is assumed that specific intelligent computational and classification methods will contribute to the improvement of automatic diagnostic and monitoring tools for the daily medical practice.