# A low-cost machine learning process for gait measurement using an electrostatic sensors network

Blandine Pichon, Eric Benoit, Stéphane Perrin, Alexandre Benoit, Nicolas Berton, Dorian Coves, Julien Cruvieux, Youssoup h Faye

► To cite this version:

Blandine Pichon, Eric Benoit, Stéphane Perrin, Alexandre Benoit, Nicolas Berton, et al. A low-cost machine learning process for gait measurement using an electrostatic sensors network. ACTA IMEKO, 2024, 13 (1), pp.1-5. 10.21014/actaimeko.v13i1.1323. hal-04544797

HAL Id: hal-04544797

https://hal.science/hal-04544797v1

Submitted on 13 Sep 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# A low-cost machine learning process for gait measurement using an electrostatic sensors network

Blandine Pichon¹, Eric Benoit¹, Stephane Perrin¹, Alexandre Benoit¹, Nicolas Berton¹, Dorian Coves¹, Julien Cruvieux¹, Youssoupht Faye¹

¹ Université Savoie Mont Blanc, LISTIC, Annecy, France

## ABSTRACT

Continuous in-house measurement of gait of elderly People is relevant for health professionals. To be adopted by most, the system must be low-cost and non-intrusive. In this paper we present a solution for measuring the walking velocity based on a network of 4 electric potential sensors. In our experiments, we also add PIR sensors used in our previous work for comparative purposes. A temporary Depth camera is used for training the model on walking velocity. The first results presented are obtained without machine learning. Then a machine learning regression method is tested to reduce the uncertainty of the sensors. The results show that the electric potential sensors are suitable for the in-house measurement of walking speed of elderly people. The uncertainty is lower than the target of 0.15 m s⁻¹ known as the upper limit for detecting a reduction in speed due to illness. As for the PIR sensors, electric potential sensors consume very little energy, they are inexpensive, they can be embedded and hidden in the home which makes them less -intrusive and furthermore have better accuracy.

**Section:** RESEARCH PAPER

**Keywords:** machine learning; electrostatic sensor; PIR; depth camera; home monitoring; gait measurement

**Citation:** B. Pichon, E. Benoit, S. Perrin, A. Benoit, N. Berton, D. Coves, J. Cruvieux, Y. Faye, A low-cost machine learning process for gait measurement using an electrostatic sensors network, Acta IMEKO, vol. 13 (2024) no. 1, pp. 1-5. DOI: 10.21014/actaimeko.v13i1.1323

**Section Editor:** Francesco Lamonaca, University of Calabria, Italy

**Received** July 8, 2022; **In final form** March 19, 2024; **Published** March 2024

**Copyright:** This is an open-access article distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Corresponding author:** Blandine Pichon, e-mail: blandine.pichon@univ-smb.fr

## 1. INTRODUCTION

The measurement of in-house human activity at a lowest cost is a great way to improve the well-being as concluded by several studies focused on the measurement of walking activity in order to predict physical diseases [1]. In a previous study [2], we pointed out the necessity to use low cost and low consumption non-intrusive sensors to perform such measurement and proposed a solution based on a Passive Infra Red (PIR) sensor and on a machine learning (ML) extraction of walking speed.

Other solutions are based on capacitive sensors or on the electrical potential [3]. We discard the first ones due to their small range (ten centimeters). The latter have been used in a context close to our concerns.

In [4] Zeng proposed a solution based on electrostatic induction that looks promising for low cost and low consumption measurement of walking velocity. The electrostatic sensors are justified by several reasons: they can be miniaturized due to the small number of components. They can be also easily integrated into indoor objects such as skirting board for example and are not subject to the constraints of optical sensors such as

occlusions and lighting. Moreover, they are potentially inexpensive passive sensors, and they consume little energy. In [5], Kurita also demonstrated that such sensors can be used to distinguish some gestures and some type of steps [6], which would allow us to perform human recognition. The electrostatic sensor created by Kurita was also used in combination with a ML algorithm to identify individual characteristic [7]. This kind of sensor is a good candidate for the measurement of walking velocity but includes a component that reduce the possibility to use it as a low-cost sensor.

In [8], the authors show that it's possible to obtain temporal gait parameters with the electrostatic field sensing technology; however, this study doesn't include the measurement of walking speed. In [9] and [10] studies use this kind of sensor but they focus on localization and identification. Actually, the technologies used to measure the walking speed do not include electrostatic sensors [11].

The solution we decided to explore uses a low-cost electrostatic sensor to perform an accurate contactless measurement of walking velocity. As this cost reduction is linked
<figure><img src="image_2.png" /><figcaption>Figure 1. Diagram of the different signal processing layers.</figcaption></figure>

to a sensitivity reduction, we use a ML algorithm to improve the accuracy of the sensor.

The learning phase is performed by the way of depth sensor the same way than in our previous study [2].

This paper first presents the electrostatic sensor and the experiment defined to perform the machine learning phase and the characterization. Then the data analysis methods are presented. The results with a direct computational method, and with a machine learning approach are presented.

## 2. EXPERIENCE PRESENTATION

Our goal is to measure an individual's walking speed using a non-intrusive sensor and to ensure that the results obtained are satisfactory compared to what we could achieve with another non-intrusive sensor. That's why we decided to present the results obtained with an electrostatic sensor, but also to compare them with the results obtained with one of the other sensors (PIR).

### 2.1. Electrostatic sensor

The electrostatic induction sensor proposed by Kurita in [6] requires a resistor of 3 TΩ that makes the sensor incompatible with the low-cost constraint. The electric potential sensor (EPS) we developed is specifically sized for indoor human motion capture: human activity frequencies are between 0 and 20 Hz [12].

They consist of an electrode whose received potential is filtered and amplified (see Figure 1).

The electrical diagram is shown in Figure 2. High-pass filters with a low cut-off frequency are used to cut the DC components of the signal, while low-pass filters are used to reject components that do not correspond to human movements, in particular the 50 Hz noise from the AC outlets.

This architecture makes it possible to amplify variations in electrical potential. When someone walks near the sensor, an induced current is generated on the electrode [13]. Indeed, the human body is charged with static electricity due to the creation of friction between the body and clothing; moreover, friction, contact and separation between the human foot and ground during walking also charges the human body electric field around the human body with the foot movement during walking [4].

### 2.2. Measurement system

The measurement system is made of 4 measuring boards facing each other in a corridor, each board including a PIR and an EPS. The scene is observed by a depth camera (RealSense L515) which makes it possible to obtain a reference of the experiments carried out by the detection of the skeleton of people moving (See Figure 3).

<figure><img src="image_3.png" /><figcaption>Figure 2. Electrical Diagram of the EPS.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Figure 3. Measurement system with the 4 measurement boards and the depth camera.</figcaption></figure>

During an experiment, a person walks in the corridor at a constant speed, which varies from slow to fast depending on the experiments. The signals measured by the 4 PIRs and the 4 EPS (see Figure 4 and Figure 5), as well as the skeletons detected by the 3D camera are stored as a set that we will call an experiment sample.

In order to evaluate our measurement system based on EPS sensors, we present in the following section two approaches: with ML and without ML, which we also compare with the results obtained with PIR sensors. The qualification of PIR sensors, and even more so that of EPS sensors, does not allow us to perform a type B estimation of the uncertainty of the walking speed. As a consequence, the uncertainty of our system will be estimated by a type A approach as defined in the GUM, and will take as reference the walking speed given by the 3D camera.

<figure><img src="image_5.png" /><figcaption>Figure 4. Graph of data acquired by PIR and EPS for a slow walking speed.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Figure 5. Graph of data acquired by PIR and EPS for a medium walking speed.</figcaption></figure>
## 3. MEASUREMENT WITHOUT ML

We used a dataset of 229 experiments, one experiment corresponding to a person walking straight down the centre of the corridor. They have a fixed length of 13 seconds with a sampling rate of 50 samples per second. 5 different persons of various ages and sizes took part to the experimentation.

The reference speed is computed by a linear regression of the locations of the right hip and the left hip given by the depth camera.

The speeds given by the PIR are computed as follows: each signal is interpreted as a wave packet and the moment of the middle of each wave packet is obtained with the maximum of energy of the Complex Morlet wavelet transform of the signal (Figure 6). A simple ratio between the time of flight and the distance between 2 measurement board gives the speed. The same process is used to compute the speed from the EPS (see Figure 7).

The standard uncertainty is estimated by the standard deviation from the reference speed given by the camera on walking speed from 0.5 m s⁻¹ to 2 m s⁻¹. The estimated standard uncertainties are $u = 0.284 \text{ m s}^{-1}$ for the PIR sensor after the exclusion of abhorrent results, and $u = 0.213 \text{ m s}^{-1}$ for the EPS (no exclusion).

<figure><img src="image_7.png" /><figcaption>Figure 6. Morlet wavelet transform of EPS signal for a walking person.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Figure 7. Morlet wavelet transform of PIR signal for a walking person.</figcaption></figure>

## 4. ML-AUGMENTED MEASUREMENT

### 4.1. Electrostatic sensor

The hypothesis we want to test is: "an ML regression can reduce the uncertainty of the sensors". To test this hypothesis, we started an exploration by the way of a manual hyperparameters optimization (see [14]) of a family of neural network models to optimise the sensor uncertainty. The models we explored are Convolutional Neural Networks (CNN) taking as input the 4 wavelet transforms computed from the signals issued from the 4 EPS as inputs.

The tested models were classical feedforward models with the following hyperparameters:1 or 2 convolution layers each followed by a Maxpool 2 × 2 layer. Each convolution layer has either 8, 16, 32 or 64 filters 3 × 3. The model is ended with 1 or 2 dense layers in addition to the last one. For all layers, the activation function is ReLu. The loss function is the mean square error, and the optimizer is the Adam optimizer. The 229 samples are split into train and validation groups respectively with 70 % and 30 % of samples.

The best reproducible results were obtained with the same model for the PIR and for the EPS. This model, denoted 2-layersNN, has 2 convolution layers, the first one with 32 filters, and the second one with 64 filters. The model has no additional dense layer (see Figure 8).

The results obtained with the EPS network are more accurate than those obtained with the PIR sensor network. The obtained standard uncertainty is $u = 0.13 \text{ m s}^{-1}$ for the EPS and $u = 0.17 \text{ m s}^{-1}$ for the PIR.

In order to circumvent the wavelet transform we tested recurrent networks specialized in time series such as LSTM and TCN. However, none of them performed well enough, as shown in the Table 1. These low results can be explained by the fact that recurrent networks, even if they are adapted to time series like the one produced by the sensors of this study, implement a forgetting behavior that is more dedicated to a continuous analysis of a signal.

Another architecture that cannot be avoided in such study is the ResNet architecture [15]. It allows to have deeper models with higher expressivity.

<figure><img src="image_9.png" /><figcaption>Figure 8. Hyperparameters of the CNN model giving the lowest reproducible uncertainty.</figcaption></figure>
<figure><img src="image_10.png" /><figcaption>Figure 9. ResNet architecture giving the lowest uncertainty.</figcaption></figure>

As for the 2-layersNN, the ResNet model takes the 4 wavelet transforms as input. With this architecture, it was able to obtain performances similar than that obtained with the two-convolution model (2-Layers NN).

Moreover, a dual-attention module [16] was added to the ResNet model before each pooling step; this attention module is a low complexity approach that associates both network channel level attention and spatial attention that relates here to spectro temporal information. This module allows the model to be focused on the areas holding the useful information, in our case, the area of the wavelet transform holding the signal energy (see Figure 9).

This architecture improves the performance of the system for the PIR and gives also similar performances for the EPS as presented in Table 1.

## 4.2. Sensor reduction

In the previous parts, we observed an improvement of the speed gait accuracy by the use of a ML stage. This means that the signal shapes of sensors may hold more information than a simple time shift between the signals from 2 sensors.

To test this hypothesis, we removed a pair of sensors to keep only 2 sensors facing each other (sensors 1 and 2 on Figure 3).

The two-convolution model and the residual model with or without attention were tested (see Table 2).

The sensor reduction induced a moderate degradation of the performances of the speed measurements based on the 2-layer NN. This is not the case for the ResNet based systems that keep their performances.

<table><caption>Table 1. Standard uncertainties: *u* in m s⁻¹ (4 sensors).</caption><thead><tr><td>Algorithm</td><td>PIR</td><td>EPS</td></tr></thead><tbody><tr><td>Without ML</td><td>0.28</td><td>0.21</td></tr><tr><td>2-Layers NN</td><td>0.17</td><td>0.13</td></tr><tr><td>ResNet</td><td>0.18</td><td>0.13</td></tr><tr><td>ResNet+Attention</td><td>0.15</td><td>0.12</td></tr><tr><td>LSTM</td><td>0.43</td><td>0.43</td></tr><tr><td>TCN</td><td>0.93</td><td>0.79</td></tr></tbody></table>

<table><caption>Table 2. Standard uncertainties: *u* in m s⁻¹ (2 sensors).</caption><thead><tr><td>Algorithm</td><td>PIR</td><td>EPS</td></tr></thead><tbody><tr><td>2-Layers NN</td><td>0.20</td><td>0.15</td></tr><tr><td>ResNet</td><td>0.18</td><td>0.13</td></tr><tr><td>ResNet+Attention</td><td>0.15</td><td>0.12</td></tr></tbody></table>

These results show that the 2-Layer NN based speed gait measurement system loses information during the sensor reduction but, in the case of EPS, keeps enough data to give a measurement result with an uncertainty compatible with the target of this study.

We analyse the trained model with the Grad-CAM tool to better understand it, and to know what features it relies on to perform the regression. Grad-CAM is a tool that allows you to understand what a model is based on to make its prediction, or on which part of an input image the model is positioned to give this result [17].

It clearly emerges that the model bases its regression on the contours of the wavelet transform and ignore the low frequencies - the bottom part of the wavelet transform - and the general shape of the signal - the highest energy area - see Figure 10.

More surprising is the stability of the performances of the ResNet based systems during the sensor reduction process. This can be variously interpreted and needs a deeper analysis of the network's trained models.

<figure><img src="image_11.png" /><figcaption>Figure 10. A wavelet transform as one of the Grad-CAM input and the corresponding heatmap for the trained 2-Layer NN.</figcaption></figure>
## 5. CONCLUSIONS

The comparison between a measurement results given by the data processing and measurement results given by a Machine Learning regression shown that the signals issued from the 2 kind of sensors, PIR and EPS, hold information on walking speed that can be exploited by a neural network.

A residual architecture ResNet in addition to an attention module gives significant performances. The two-layer model still performs very well, but this performance can strongly depend on the composition of our dataset and its simplicity. This is probably related to the number of convolution layers and the low number of samples.

It also shown that EPS - Electric Potential Sensors are suitable for the in-house measurement of walking speed of the elderly. Indeed, their uncertainty is lower than the target of 0.15 m s⁻¹ known as the upper limit to detect a speed reduction related to an illness [18]. As for the PIR sensors, EPS consume very little energy, they are inexpensive, non-intrusive but have a better accuracy. They could therefore be used in several fields such as health or home monitoring. Actually, such sensors are included into similar studies related to human activity such as the notification of the presence of people in a place, the measurement of other gait parameters or the gesture recognition.

## REFERENCES

[1] L. Scherf, F. Kirchbuchner, J. V. Wilmsdorff, B. Fu, A. Braun, A. Kuijper, 'Step by step: Early detection of diseases using an intelligent floor', Proc. of the 14th Eur. Conf. AmI, Larnaca, Cyprus, Nov. 2018, pp. 131–146.
DOI: 10.1007/978-3-030-03062-9

[2] F. Abdel Khalek, M. Hartley, E. Benoit, S. Perrin, L. Marechal, C. Barthod, A low-cost machine learning process for gait measurement using biomechanical sensors, Measurement: Sensors 18 (2021).
DOI: 10.1016/j.measen.2021.100346

[3] Y. MejiaCruz, J. Franco, G. Hainline, S. Fritz, Z. Jiang, J. M. Caicedo, B. Davis, V. Hirth, Walking Speed Measurement Technology: a Review, Current Geriatrics Reports, 10:1, 10(1), 2021, pp. 32–41.
DOI: 10.1007/S13670-020-00349-Z

[4] W. Zheng, Z. Cui, Determination of velocity and direction of human body motion based on electrostatic measurement, 2011 Int. Conf. on Consumer Electronics, Communications and Networks (CECNet), 2011, pp. 4035-4039.
DOI: 10.1109/CECNET.2011.5769004

[5] K. Kurita, Non contact detection technology for individual characteristics of motorcycle riding operation using electrostatic induction, Measurement: Sensors, vol. 18, 2021, 100118.
DOI: 10.1016/j.measen.2021.100118

[6] K. Kurita, S. Morinaga, Detection Technique of Individual Characteristic Appearing in Walking Motion, in IEEE Access, vol.

7, Sept. 2019, pp. 139226-139235.
DOI: 10.1109/ACCESS.2019.2943495

[7] K. Kurita, S. Morinaga, Non Contact Detection of movements of standing up from and sitting down on a chair using electrostatic induction, IEEE Sensors Journal, vol. 19, no.19, pp. 8934 – 8939.
DOI: 10.1109/JSEN.2019.2921379

[8] M. Li, P. Li, S. Tian, K. Tang, X. Chen, Estimation of Temporal Gait Parameters Using a Human Body Electrostatic Sensing-Based Method, vol. 18, issue 6, 2018, 1737.
DOI: 10.3390/s18061737

[9] B. Fu, F. Kirchbuchner, J. von Wilmsdorff, T. Grosse-Puppendahl, A. Braun, A. Kuijper, Performing indoor localization with electric potential sensing, J. Ambient Intell. Humanized Comput., vol. 10, no. 2, Jun. 2018, pp. 731–746.
DOI: 10.1007/s12652-018-0879-z

[10] T. Grosse-Puppendahl, X. Dellangnol, C. Hatzfeld, B. Fu, M. Kupnik, A. Kuijper, M. R. Hastall, J. Scott, M. Gruteser, Platypus: Indoor localization and identification through sensing of electric potential changes in human bodies, in Proc. 14th Annu. Int. Conf. Mobile Syst., Appl., Services (MobiSys), New York, NY, USA, pp. 17–30, 2016.
DOI: 10.1145/2906388.2906402

[11] B. Fu, N. Damer, F. Kirchbuchner, A. Kuijper, Sensing Technology for Human Activity Recognition: A Comprehensive Survey, IEEE Access, vol. 8, 2020, pp. 83791 – 83820.
DOI: 10.1109/ACCESS.2020.2991891

[12] E. K. Antonsson, R. W. Mann, The frequency content of gait, J. Biomech, 18, 1985, pp. 39–47.
DOI: 10.1016/0021-9290(85)90043-0

[13] M. Li, X. Chen, S. Tian, Y. Wang, P. Li, Research of Gait Recognition Based on Human Electrostatic Signal, 2nd IEEE Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC), Xi'an, China, 25-27 May 2018, pp. 1812-1817.
DOI: 10.1109/IMCEC.2018.8469720

[14] M. Feurer, F. Hutter, Hyperparameter optimization, In: Hutter, F., Kotthoff, L., Vanschoren, J. (eds) Automated Machine Learning. The Springer Series on Challenges in Machine Learning. Springer, Cham., 2019, pp 3-33.
DOI: 10.1007/978-3-030-05318-5_1

[15] K. He, X. Zhang, S. Ren, J. Sun, Deep Residual Learning for Image Recognition, arxiv.org, 2015.
DOI: 10.48550/arXiv.1512.03385

[16] J. Fu, J. Liu, H. Tian, Y. Li, Y. Bao, Z. Fang, H. Lu, Dual Attention Network for Scene Segmentation, arxiv.org, 2019.
DOI: 10.48550/arXiv.1809.02983

[17] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, D. Batra, Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization, arxiv.org, 2019.
DOI: 10.48550/arXiv.1610.02391

[18] A. Goldberg, S. Schepens, Measurement error and minimum detectable change in 4-meter gait speed in older adults, Aging clinical and experimental research 23 (2011), pp. 406–412.
DOI: 10.1007/BF03325236