Acessibilidade / Reportar erro

An open-source low-cost wireless sensor system for acquisition of human movement data

Abstract

Several fields of research such as medicine, robotics, sports, informatics, etc., require the analysis of human movement. Traditional systems for acquisition and analysis of human movement data are based on video cameras or active sensors. However, those systems are limited to high-resource settings. Wearable devices allow monitoring subjects outside typical clinical or research environments. Here, we present an open source low-cost wireless sensor system for acquisition of human movement data. Our system consists of two main parts: a server that stores data and, one or more wearable sensor modules that collect movement data through Inertial Measurement Units (IMUs) and transmit them wirelessly to the server. As a proof of concept, we measured human gait activity. Our results show that our system with IMUs can acquire quantifiable movement data. Characteristics such as open source code and its low-cost, make our system a viable alternative for clinical or research.

Key words
human movement; IMU; sensor system; wireless transmission; gait

INTRODUCTION

Analysis of gait provides information about the functional capabilities of a patient and plays an important role in the clinical practice for the diagnosis of movement disorders. It can also be used for health monitoring, for objectively evaluating the efficiency of rehabilitation or the success of a surgical procedure (Teufl et al. 2019TEUFL W, TAETZ B, MIEZAL M, LORENZ M, PIETSCHMANN J, JÖLLENBECK T, FRÖHLICH M & BLESER G. 2019. Towards an Inertial Sensor-Based Wearable Feedback System for Patients after Total Hip Arthroplasty: Validity and Applicability for Gait Classification with Gait Kinematics-Based Features. Sensors (Basel) 19: 5006., Bravi et al. 2020BRAVI M, GALLOTTA E, MORRONE M, MASELLI M, SANTACATERINA F, TOGLIA R, FOTI C, STERZI S, BRESSI F & MICCINILLI S. 2020. Concurrent validity and inter trial reliability of a single inertial measurement unit for spatial-temporal gait parameter analysis in patients with recent total hip or total knee arthroplasty. Gait & Posture 76: 175-181.). Gait monitoring can be applied for recognition of gait patterns that suggest risk of falling or the development of dementia in the elderly (Trojaniello et al. 2015TROJANIELLO D, RAVASCHIO A, HAUSDORFF JM & CEREATTI A. 2015. Comparative assessment of different methods for the estimation of gait temporal parameters using a single inertial sensor: application to elderly, post-stroke, Parkinson’s disease and Huntington’s disease subjects. Gait & Posture 42: 310-316., Byun et al. 2019BYUN S, LEE HJ, HAN JW, KIM JS, CHOI E & KIM KW. 2019. Walking-speed estimation using a single inertial measurement unit for the older adults. PLoS ONE 14: e0227075., Pau et al. 2020PAU M, MULAS I, PUTZU V, ASONI G, VIALE D, MAMELI I, LEBAN B & ALLALI G. 2020. Smoothness of Gait in Healthy and Cognitively Impaired Individuals: A Study on Italian Elderly Using Wearable Inertial Sensor. Sensors (Basel) 20: 3577.), for studying performance in athletes, for sports gear design and for control of bipedal humanoid robots (Brouwer et al. 2021BROUWER NP, YEUNG T, BOBBERT MF & BESIER TF. 2021. 3D trunk orientation measured using inertial measurement units during anatomical and dynamic sports motions. Scand J Med Sci Sport 31: 358-370., Zhen et al. 2020ZHEN T, YAN L & KONG JL. 2020. An Acceleration Based Fusion of Multiple Spatiotemporal Networks for Gait Phase Detection. Int J Environ Res Public Health 17: 5633., Zrenner et al. 2020ZRENNER M, KÜDERLE A, ROTH N, JENSEN U, DÜMLER B & ESKOFIER BM. 2020. Does the Position of Foot-Mounted IMU Sensors Influence the Accuracy of Spatio-Temporal Parameters in Endurance Running? Sensors (Basel, Switzerland) 20: 5705.). Due to the high demand for these applications, several research groups have dedicated their efforts to the development of methods for monitoring and analysis of gait. Camera-based are within the most effective methods for monitoring gait movements (Aggarwal & Cai 1997AGGARWAL JK & CAI Q. 1997. Human motion analysis: a review. In: Proceedings IEEE Nonrigid and Articulated Motion Workshop, p. 90-102., Wei & Yunxiao 2009WEI W & YUNXIAO A. 2009. Vision-Based Human Motion Recognition: A Survey. Second International Conference on Intelligent Networks and Intelligent Systems, p 386-389., Kim et al. 2015KIM A, KIM J, RIETDYK S & ZIAIE B. 2015. A wearable smartphone-enabled camera-based system for gait assessment. Gait Posture 42: 138-144, Cai et al. 2017CAI X, HAN G, SONG X & WANG J. 2017. Single-Camera-Based Method for Step Length Symmetry Measurement in Unconstrained Elderly Home Monitoring. IEEE Trans Biomed Eng 64: 2618-2627.); however, this method has spatial and temporal restrictions that limit the analysis to a specific moment and/or in a restricted space. Force plate instrumented treadmills are also effective, but they are expensive and limited to laboratory settings. In order to overcome the disadvantages of camera-based systems, new sensor technologies have been developed such as that in smart textiles with polymer optical fiber (POF) embedded. This technology allows highly stretchable wearable systems or stretchable passive tags (Leal-Junior et al. 2018LEAL-JUNIOR AG, FRIZERA A, VARGAS-VALENCIA L, DOS SANTOS WM, BÓ APL, SIQUEIRA AAG & PONTES MJ. 2018. Polymer Optical Fiber Sensors in Wearable Devices: Toward Novel Instrumentation Approaches for Gait Assistance Devices. IEEE Sensors Journal 18: 7085-7092., Niu et al. 2019NIU S ET AL. 2019. A wireless body area sensor network based on stretchable passive tags. Nat Electron 2: 361-368., Leal-Junior et al. 2020LEAL-JUNIOR A, AVELLAR L, FRIZERA A & MARQUES C. 2020. Smart textiles for multimodal wearable sensing using highly stretchable multiplexed optical fiber system. Sci Rep 10: 13867.)

Inertial Measurement Units (IMUs) offer a lightweight and portable method that can achieve real-time gait monitoring. Compared to existing gait monitoring devices, IMUs overcome some of the limitations of current technologies, such as high cost, difficulty to use or install, while providing desirable features, such as wearability, rapid response and durability, and they are easy-to-fabricate making them suitable for mass production. Raw signals acquired by IMUs can be converted into gait characteristics such as walking speed, joint angles, stride length, and ground reaction forces with signal processing techniques. Although inertial sensors are lightweight and can be conveniently mounted on the human body, they have some limitations compared with image-based methods, e.g. the quantity and accuracy of motion signals captured. However, new algorithms allow now acceptable detection and measurement of the characteristics of walk and its patterns from data acquired by IMUs.

The use of IMUs as an alternative to visual-based systems has been validated by several researchers. For measurement of the motion of a pendulum swing, the accuracy of data recorded by IMUs is as good as that obtained with a video analysis system (Brodie et al. 2008BRODIE M, WALMSLEY A & PAGE W. 2008. Dynamic accuracy of inertial measurement units during simple pendulum motion. Comput Methods Biomech Biomed Engin 11: 235-242.). Quantitative gait analysis, including gait phase detection has been achieved from data obtained using a wearable sensor system consisting of gyroscopes and accelerometers (Liu et al. 2009LIU T, INOUE Y & SHIBATA K. 2009. Development of a Wearable Sensor System for Quantitative Gait Analysis. Measurement 42: 978-988.). Human trajectories in 3D spaces have been recovered from data obtained by a motion-capturing suit equipped with several IMUs (Grzonka et al. 2012GRZONKA S, KARWATH A, DIJOUX F & BURGARD W. 2012. Activity-Based Estimation of Human Trajectories. IEEE Transactions on Robotics 28: 234-245.). Some devices have integrated a combination of wireless technology and communication protocols such as Bluetooth and ZigBee with IMUs (Hwang et al. 2004HWANG JY, KANG JM, JANG YW & KIM H. 2004. Development of novel algorithm and real-time monitoring ambulatory system using Bluetooth module for fall detection in the elderly. Conf Proc IEEE Eng Med Biol Soc 2004: 2204-2207., Lee J et al. 2007LEE J, SU Y & SHEN C. 2007. A Comparative Study of Wireless Protocols: Bluetooth, UWB, ZigBee, and Wi-Fi. IECON 2007 -33rd Annual Conference of the IEEE Industrial Electronics Society, p. 46-51., Kim et al. 2016KIM KJ, AGRAWAL V, GAUNAURD I, GAILEY RS & BENNETT CL. 2016. Missing Sample Recovery for Wireless Inertial Sensor-Based Human Movement Acquisition. IEEE Transactions on Neural Systems and Rehabilitation Engineering 24: 1191-1198.). In addition, several companies have released both wired and wireless IMU-based systems e.g. BTS Bioengineering (BTS Bioengineering Corp, Brooklyn, NY, USA), Inertial Labs (Inertial Labs, Herndon, VA, USA), Surrey Sensors (Surrey Sensors Ltd, Guildford, UK), XSens (XSens Technologies B. V. Enschede, Netherlands), GaitUp (Gait Up SA, Lausanne, Switzerland). However, proprietary hardware and software make these systems expensive and limit the number of sensors per system. To minimize the cost of sensors and increase the number of usable channels, some researchers have developed custom-made devices to track human movement (Brunetti et al. 2006BRUNETTI F, MORENO J, RUIZ A F, ROCON E & PONS JL. 2006. A new platform based on IEEE802.15.4 wireless inertial sensors for motion caption and assessment. In: Proceedings of the 28th IEEE. EMBS Annual International Conference, p. 6497-6500., Grandez et al. 2009GRANDEZ K, BUSTAMANTE P, SOLAS G, GURUTZEAGA I & GARCIA-ALONSO A. 2009. Wearable wireless sensor for the gait monitorization of Parkinsonian patients. 16th IEEE International Conference on Electronics, Circuits and Systems - (ICECS 2009), p. 215-218, Liu et al. 2009LIU T, INOUE Y & SHIBATA K. 2009. Development of a Wearable Sensor System for Quantitative Gait Analysis. Measurement 42: 978-988., Llamas et al. 2017LLAMAS C, GONZALEZ MA, HERNANDEZ C & VEGAS J. 2017. Open source hardware based sensor platform suitable for human gait identification. Pervasive and Mobile Computing 38: 154-165.) but most of those devices rely on Bluetooth or radio communication and therefore, have limited scalability due to protocol limitations (Lee J et al. 2007). Increasing the scalability is important because populating the kinetic information or making a network of body sensors increase the possibility of characterizing gait and gait patterns and correlate them with other physiological vital signs such as temperature, respiratory rhythm, etc.

Here, we describe the development of an open-source low-cost wireless sensor system for acquisition of human movement data. Our system consists of two main parts: a server that stores the data and, one or more wearable sensor modules that collect movement data from IMUs. The sensor system was constructed using the ESP8266 SoC, the MPU6050 IMU and JavaScript programming language. Our sensor system uses Wi-Fi standard (IEEE 802.11) to stream the raw data from the sensors to the server. In addition, we developed an Android app that controls the beginning/end of data collection (Liu et al. 2009LIU T, INOUE Y & SHIBATA K. 2009. Development of a Wearable Sensor System for Quantitative Gait Analysis. Measurement 42: 978-988.).

MATERIALS AND METHODS

System Overview

Our system is based on client/server network architecture, where a server device controls one or several client devices. Our wearable sensors are the clients, and the server can be any laptop computer with WiFi, or even a RaspberryPi microcomputer. The server application was developed using Node.js and can run under Windows, Linux or MacOS. Communication between sensors and server is made over WiFi using the WebSockets communication protocol. An Android application is used to control the beginning/end of the recording. Alternatively, the sensors can be controlled using the web application running on the server. Data from the sensor modules are transmitted to the server at a 100 Hz sampling rate. Figure 1 illustrates the architecture of the system.

Figure 1
System architecture.

Detailed description of the wearable sensor module

Each wearable sensor module consists of a breakout board with one MPU6050 IMU (Invensense Inc. San Jose, CA); an ESP8266-12e module (Expressif Systems, Shanghai, China) that can be used as a microcontroller and as WiFi device for wireless communication and, other electronic components such as resistors and capacitors. Each device is powered by a 3.7V LiPo battery that can be recharged using a micro USB cable. We added a voltage regulator to avoid damaging the ESP8266. Components are mounted on a homemade printed circuit board (PCB). The schematic diagram is shown in Figure 2, and Table I shows the complete list of necessary materials.

Figure 2
Schematic diagram of a wearable sensor. The ESP12E module read the data of the IMU using I2C protocol and transmit it wirelessly.
Table I
Materials to build sensors (cost in American dollars).

The MPU6050 is a 6-axis motion-tracking device that contains a 3-axis gyroscope and a 3-axis accelerometer (MPU-6050). The accelerometer measures linear acceleration with 16-bit resolution, and the gyroscope measures angular velocity with 16-bit resolution. It uses I2C protocol that allows communicating with the microcontroller using only two wires. The MPU6050 has an integrated Digital Motion Processor (DMP) that can process the raw readings of the gyroscope and the accelerometer. It has a selectable (via programming) full-scale gyro range of ±250, ±500, ±1000, ±2000 °/s (dps) and a selectable accelerometer full-scale range of ±2g, ±4g, ±8g, ±16g so it can be configured to track slow or fast movements. It also has a low energy consumption with a voltage range of 2.375V - 3.46V and 500μA at normal operating conditions.

The ESP8266 is a microcontroller with a self-contained SoC with a fully integrated TCP/IP stack implementing the full 802.11 b/g/n standard (ESP8266). The ESP8266 is capable of running a standalone application or function as the Wi-Fi slave of other processors. It can be interfaced with external sensors through its GPIOs. It integrates a 32-bit Tensilica L106 microcontroller with a CPU clock speed of 80 MHz with overclock capabilities up to 160 MHz, 50 KB of SRAM and 4 MB of flash memory. The ESP8266 has a small package size (5mm × 5mm); therefore, we used the ESP-12 breakout board which exposes several GPIO pins for easier manipulation. The ESP8266 s sold with a default firmware that uses AT commands to perform basic configuration of the module. However, users can overwrite the flash memory with their programs.

System’s communication

The TCP/IP suite is the foundation of all WiFi communications. It is named after its most prominent protocols, the Transmission Control Protocol (TCP) and the Internet Protocol (IP). It is divided in five layers, physical, data link, network, transport and application. The first two layers are for low- level physical configuration, network layer is for assigning an address to each device (IP address), transport and application layers are for processing the information delivery (Goralski 2017GORALSKI W. 2017. The Illustrated Network: How TCP/IP Works in a Modern Network. Elsevier Science.). We focused in choosing protocols for the transport and application layers that properly fit our system needs. Within the transport layer there are two popular protocols: User Datagram Protocol (UDP) and Transmission Control Protocol (TCP). UDP is a standard protocol intended for applications that can afford the loss of some data. It does not provide reliability, flow-control or error recovery, it simply serves as a multiplexer for sending and receiving datagrams, therefore has a very fast transport mechanism. TCP is a standard protocol, which provides more facilities for applications than UDP. To ensure reliability, TCP assigns a sequence number to each byte transmitted, and expects acknowledgment from the receiving devices. If the acknowledgment is not received, then the data is retransmitted. Also, TCP uses the sequence numbers to rearrange a datum if it arrives out of order (Parziale et al. 2006PARZIALE L, BRITT DT, DAVIS C, FORRESTER J, LIU W, MATTHEWS C & ROSSELOT N. 2006. TCP/IP Tutorial and Technical Overview. [Online]. Available: https://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf.
https://www.redbooks.ibm.com/redbooks/pd...
). TCP is more complex than UDP and therefore has a slower transmission mechanism. However, we chose TCP because the delivery of data is reliable.

On the application layer, there is a wide variety of protocols designed for a specific type of application, e.g., Simple Mail Transport Protocol (SMTP) for electronic mail applications, File Transfer Protocol (FTP) for file transfer applications and the most common, Hypertext Transfer Protocol (HTTP) for web browser applications. For our application, we needed a protocol that allows fast data transmission from sensor modules to server and vice versa. We chose the WebSocket Protocol because it is designed for bi-directional communication between server and client devices (Fette & Melnikov 2011FETTE I & MELNIKOV A. 2011. The WebSocket Protocol. [Online]. Available: https://datatracker.ietf.org/doc/html/rfc6455. “EVERYTHING ESP8266.” 2021. [Online]. Available: https://www.esp8266.com/
https://datatracker.ietf.org/doc/html/rf...
). The WebSocket connection is initialized by an opening handshake and it will remain open until a closing handshake is sent. While the connection remains open, clients and server can send messages, even at the same time, enabling real-time data transmission. Figure 3 shows the working flow of a WebSocket connection.

Figure 3
WebSocket protocol. The clients send an opening handshake to the server to open a connection. Once the connection is opened, both, clients and server can transmit data. The connection is closed when one of them sends a closing handshake.

Data collected by the sensors are serialized in JavaScript Object Notation (JSON) format before being sent to the server. JSON is a lightweight format used for data-interchange on the internet. It is designed to be human-readable and easily parsable by computers. It has two structured types: name- value pairs (objects) and an ordered list of values (arrays) (Bray 2014BRAY T. 2014. The JavaScript Object Notation (JSON) Data Interchange Format: RFC 7158: 1-16.). An example of a JSON serialized package from our sensor nodes is the following: {“ID”:“1”,“lectures”:[7244,- 282,-3088,-20,1,-11,188724,2256]} where ID is the identifier of the sensors and lectures is an array of numbers which represents the values collected by the sensor in the following order: Accelerometer X, Accelerometer Y, Accelerometer Z, Gyro X, Gyro Y, Gyro Z, Sensor timestamp and index.

System’s Security

In order to protect patient’s data, our system uses the SSL (Secure Socket Layer) protocol to secure the data transmission. The SSL protocol uses an asymmetric encryption algorithm (RSA algorithm) in order to encrypt all the communication between server and sensors. The asymmetric encryption uses a pair of keys i.e., public key and private key, the public key is used for encryption and the private key is used for decryption. The SSL protocol consists of two phases: the initial handshake and the data transfer. Basically, during the handshake phase, the client i.e., the sensors, and the server exchanges its public keys and use them to create session keys which they will use to encrypt or decrypt the data (Kant et al. 2000KANT K, IYER R & MOHAPATRA P. 2000. Architectural impact of secure socket layer on Internet servers. Proceedings 2000 International Conference on Computer Design, p. 7-14.). That session key can be created in two lengths, 40-bit and 128-bit; the longer the key, the more difficult to breaking the encryption code. On the data transfer phase, both, client and server use the session key to maintain the communication secured. Fig. 3 illustrates the SSL protocol.

Subjects and protocol for movement analysis

Eight healthy volunteers were enrolled in the study (4 females, 4 males, mean age 24.8 ± 3 years-old) with no history of neurological injury or psychiatric diseases. All participants were native from Xalapa, capital city of Veracruz, México. The Research and Ethics committee of the Faculty of Medicine of the Universidad Nacional Autónoma de México approved the study. Written informed consent was obtained from each participant according to the Helsinki declaration (World Medical Association 2013).

After a test walk to get accustomed to the experimental procedure, subjects were asked to walk along a 5-m long, plain, unmarked track; IMUs signals were recorded while the participants walked straight and stop at the end of the track.

Balance and coordination during gait (dynamic balance) was evaluated using the “tandem walk test (TWT)”, which estimates the risk of falls. To perform the test, a 5 m long, 5 cm wide line was drawn on flat ground. The participants task was to walk along the line in such a way that during each step, the heel of one foot touched the toes of the other foot. The patient walked 10 such steps forward in that way, and repeated twice the instruction (Kamińska et al. 2018KAMIŃSKA MS, MILLER A, ROTTER I, SZYLIŃSKA A & GROCHANS E. 2018. The effectiveness of virtual reality training in reducing the risk of falls among elderly people. Clin Interv Aging 13: 2329-2338.)

The protocol includes five sensors (left and right foot), and each of them records a six-dimensional signal (3D accelerations and 3D angular velocities). Instead of considering all these dimensions, we decided to use only one of them: the most relevant in the context of step detection. This decision was made based on observations of real data and physiological reasons provided by medical doctors. Consequently, the y-axis angular velocity was the only component studied. Each subject performed the protocol 2 times. The average number of steps per trial was 6, and the average speed was 1.5 m/s.

RESULTS

Our system has two main parts: a server that store the data received and the wearable sensor modules that collect data from IMUs and send them to the server. Both were implemented using open-source programming languages. In addition, our system has the following features:

  • Portability. Sensors have been packaged in a small wearable module; they also have Velcro straps to attach to the body easily. Figure 4 shows a sensor module.

  • The system is scalable. Each sensor module will automatically obtain a network address through the Dynamic Host Configuration Protocol (DHCP). The simplest network configuration (24-bit subnet mask) has 254 addresses, that means that up to 252 sensor modules can be connected to the network.

  • Sensor modules are independent and configurable. The programming of each sensor module allows to configure the automatic/manual network address and the sensitivity of the IMU. Moreover, after uploading our code to the microprocessor, subsequent changes can be uploaded using Over the Air update, that means, programming the sensor wirelessly using the Wi-Fi connection.

  • Data collected by the sensors is showed in real time.

  • An Android application was developed to control the data acquisition.

Figure 4
Sensor module. Overall device view of our sensor node.

Server programming

The server was implemented with Node.js, an open source runtime environment for JavaScript. It uses an event-driven, non-blocking I/O architecture that allows an efficient performance on real-time applications (Foundation 2018). Although JavaScript is an interpreted language (every line of code has to be interpreted while the code is executed), in Node.js the code is compiled into machine-level code permitting a faster execution. The server will function as an intermediary between sensors and controlling applications. For example, a sensor sends data to the server, and the server will redirect that data to another application. In order to export the data, the server will store it temporarily on RAM and when the recording is finished that data will be dumped to a csv formatted text file and RAM memory will be cleared.

Real-time visualization

The real-time visualization page is embedded in the server. It is implemented as a web page developed using the Pug template engine (pugjs/pug, 2019PUGJS/PUG. 2019. original-date: 2010-06-23T01:05:42Z. [Online]. Available: https://github.com/pugjs/pug.
https://github.com/pugjs/pug...
) and JavaScript. To achieve a user-friendly and responsive page, we used the Bootstrap CSS framework (Bootstrap 2021BOOTSTRAP. 2021. The world’s most popular mobile-first and responsive front-end framework”. [Online]. https://nmap.org/book/output-formats-output-to-html.html.
https://nmap.org/book/output-formats-out...
). Data is plotted in real-time using the Smoothie Charts library (Walnes 2019WALNES J. 2019. “joewalnes/smoothie,” original-date: 2010-08-10T09:54:54Z, [Online] Available: https://github.com/joewalnes/smoothie.
https://github.com/joewalnes/smoothie...
). Figure 5 shows a screenshot of the real-time visualization page. The source code of the server, including the real-time visualization can be downloaded from the GitHub repository: https://github.com/malandaj/mpu6050-ws.

Figure 5
Real time visualization page.

Android application

The Android app, shown in Figure 6, was designed to control the beginning/end of the recording without the need of being near to the server/computer, e.g., the experimenter is in a corner of the room and the server is in the opposite corner. The app was developed following the Android Design Guidelines. The app also has a database where patient data can be filled-in. Before starting a recording, the experimenter can choose the patient code from a drop-down list. When the recording is started, patient’s data is transmitted to the server and it is used to generate a custom file name for later identification of the data collected by the sensors. The source code of the app can be downloaded from GitHub: https://github.com/malandaj/Gaitimu.

Figure 6
Android application. Left: Main view of the application, user can start/end the recording. Center: Settings view. User can change the IP address/port of the server. Right: Add subject view. Information of subjects is stored in a database on the phone.

Sensor programming

As mentioned before, the ESP8266 can be reprogrammed to perform complex operations. This programming can be done using a Software Development Kit (SDK) designed for the ESP8266. Although Espressif has an SDK for the module, several developers have established alternative SDKs that allow programming the module using syntax from other programming languages. We used the Arduino core for ESP8266 (Everything ESP8266 2021) to program our sensor modules. The Arduino core for ESP8266 allows to write programs using the default Arduino syntax and upload the program to the ESP8266 using the Arduino IDE. Additionally, it includes several libraries that make easier the programming of advanced operations, such as, TCP/UDP communication, OTA updates, etc. It also has a very active community that keeps adding new functions or improving the existing. The source code can be downloaded from GitHub: https://github.com/malandaj/mpu6050-ws.

Test: Measurement of gait

Figure 7 shows plots of the data collected from normal walk (7a) and tandem-walk (7b) respectively, acquired by our system. The normal gait data acquired from the left and right shank accelerometers were compared on a step-by-step basis against the data from the GAITRite electronic walkway, which was previously reported as a golden standard system (Greene et al. 2012GREENE BR, FORAN TG, MCGRATH D, DOHENY EP, BURNS A & CAULFIELD BA. 2012. Comparison of Algorithms for Body-Worn Sensor-Based Spatiotemporal Gait Parameters to the GAITRite Electronic Walkway. J Appl Biomech 28: 349-355.). We found that stride time was 1.07 ± 0.08 s in GAITRite vs 1.64 ± 0.14 s in our system, step time was 0.66 ± 0.06 s in GAITRite vs 0.82 ± 0.07 s in our system, stride length was 148.45 ± 12.64 cm in GAITRite vs 123.875±7.2 cm in our system and, stride velocity was 87.85 ± 15.84 cm/s in GAITRite vs 102 ± 5.90 cm/s in our system (n= 3 for GAITRite, n=8 for our system).

Figure 7
a) Plots of data collected from the sensor node attached to the right ankle of a subject during walking. Top: data from the accelerometer. Bottom: data from the gyroscope. b) Subject during tandem walking. Top: data from the accelerometer. Bottom: data from the gyroscope.

In addition, we compared our data with the public dataset Human Gait Database for Activity Recognition from Wearable Inertial Sensor Networks (HuGaDB) (Chereshnev & Kertesz-Farkas 2017CHERESHNEV R & KERTESZ-FARKAS A. 2017. HuGaDB: Human Gait Database for Activity Recognition from Wearable Inertial Sensor Networks. [Online]. Available: https://arxiv.org/abs/1705.08506.
https://arxiv.org/abs/1705.08506...
). We plotted data from our accelerometer’s vs data from HuGaDB accelerometers (Fig. 8a). Although visually both signals show similar patterns, the shift make unsuitable a traditional correlation analysis. Therefore, we used the Dynamic Time Warping (DTW) pattern matching algorithm that allows the detection of similarities between time series even if they differ in sampling frequencies (Jiang Y et al. 2020JIANG Y, QI Y, WANG WK, BENT B, AVRAM R, OLGIN J & DUNN J. 2020. EventDTW: An Improved Dynamic Time Warping Algorithm for Aligning Biomedical Signals of Nonuniform Sampling Frequencies. Sensors, 20(9): 2700.). DTW determines quantitatively the similarities between two time series providing a measure of the distance between the compared data; a lower distance means a higher similarity (Lee 2019LEE HS. 2019. Application of dynamic time warping algorithm for pattern similarity of gait. J Exerc Rehabil 15: 526-530.). We took the acceleration values from our normal gait pattern data (Fig. 8a) and compared them with the HuGaDB database to build a matrix of the distance between the two signals and to obtain a similarity index. We found a similarity index close to zero between the databases (0.64 ± 0.08 SE, n = 8) (Fig. 8b). In contrast, the similarity index between the normal and tandem (Fig. 9a) walking patterns was higher (6.01 ± 0.77 SE; n = 8) (Fig. 9b).

Figure 8
a) Examples of data collected from the sensor node attached to the right ankle of a subject during normal walking vs data from the HuGaDBl database in normal walking. b) DTW similarity matrix for IMU data vs l data.
Figure 9
a) Plots of data collected from the IMU sensor node attached to the right ankle of a subject during normal walking vs tandem walking. b) DTW similarity matrix for normal walking vs tandem walking.

Finally, the scalability of the system was tested using a computer simulating nodes. We used a Python script that creates 50 simultaneous processes, each process opened a WebSocket connection to the server and stream a series of random numbers sampled with a frequency of 100 Hz. On the server side, the system was able of show the 50 real time plots and saving the data to a csv file (see Supplementary material).

DISCUSSION

The main aim of this work was the designing and building of a low-cost open source system to allow gait researchers acquisition of data in settings outside of a conventional laboratory, e.g., in the house of the patient. Our system is portable: it only needs a computer, which can be easily replaced with a Raspberry Pi, and a WiFi router. Also, it is scalable: to add a new sensor, the system only needs an IP address available on the network. In addition, the system provides a user-friendly interface to monitoring the data in real-time and a mobile app to control the recordings. As a proof of concept, we obtained recordings of walk and tandem walk from a subject wearing a single sensor. As expected, the recordings showed well- defined patterns for each type of walking. Therefore, the data recorded by our system could be used to implement classifiers of different human movements, or other type of analysis using time series.

Our system is open-source. The source code and a schematic design are provided in GitHub. This allows users to improve/modify the code according to their requirements and to modify the hardware of the modules, adding other sensors, for example, a magnetometer.

Test measurement of gait shows one of the possible uses of our system. An important challenge for systems that acquire human movement data is the reduction of the size of sensors, to ensure that the subjects can move freely. Although the size of our sensors did not represent a problem for measurement of gait, they can be further reduced by modifying the PCB design. The incorporation of wireless technology allows acquisition of data in almost any setting. However, despite the fact that our system can be used outdoors, we must disclaim that, due to the transmission range, it was designed for indoor applications. A traditional Wi-Fi network has a transmission range of about 100 meters that will make it ideal for indoor use but when a higher transmission range is needed it will be necessary to use a different protocol, for example, Zigbee.

CONCLUSIONS

Here, we report the designing and building of a low-cost wireless sensor platform to acquire human movement data. The main aim of our system is to offer an alternative to commercial systems for the recording of human gait. To ensure reproducibility, we focused this paper on the details of the design: from hardware components to communication protocols theory. The availability and low-cost of our system make it a viable alternative for acquisition of human movement data, especially in clinical or research environments with limited funding and low-resource settings. Future work will be focused on the development of tools to analyze the data.

ACKNOWLEDGMENTS

This research was supported by The Beltran-Morgado Foundation for the Advancement and Communication of Neuroscience in Veracruz, by CONACYT-Grant A1S14473 CMV; Doctoral fellowships 258946 for PGG, 258942 for MLJ granted by CONACyT, México.

REFERENCES

  • AGGARWAL JK & CAI Q. 1997. Human motion analysis: a review. In: Proceedings IEEE Nonrigid and Articulated Motion Workshop, p. 90-102.
  • BOOTSTRAP. 2021. The world’s most popular mobile-first and responsive front-end framework”. [Online]. https://nmap.org/book/output-formats-output-to-html.html
    » https://nmap.org/book/output-formats-output-to-html.html
  • BRAY T. 2014. The JavaScript Object Notation (JSON) Data Interchange Format: RFC 7158: 1-16.
  • BRAVI M, GALLOTTA E, MORRONE M, MASELLI M, SANTACATERINA F, TOGLIA R, FOTI C, STERZI S, BRESSI F & MICCINILLI S. 2020. Concurrent validity and inter trial reliability of a single inertial measurement unit for spatial-temporal gait parameter analysis in patients with recent total hip or total knee arthroplasty. Gait & Posture 76: 175-181.
  • BRODIE M, WALMSLEY A & PAGE W. 2008. Dynamic accuracy of inertial measurement units during simple pendulum motion. Comput Methods Biomech Biomed Engin 11: 235-242.
  • BROUWER NP, YEUNG T, BOBBERT MF & BESIER TF. 2021. 3D trunk orientation measured using inertial measurement units during anatomical and dynamic sports motions. Scand J Med Sci Sport 31: 358-370.
  • BRUNETTI F, MORENO J, RUIZ A F, ROCON E & PONS JL. 2006. A new platform based on IEEE802.15.4 wireless inertial sensors for motion caption and assessment. In: Proceedings of the 28th IEEE. EMBS Annual International Conference, p. 6497-6500.
  • BYUN S, LEE HJ, HAN JW, KIM JS, CHOI E & KIM KW. 2019. Walking-speed estimation using a single inertial measurement unit for the older adults. PLoS ONE 14: e0227075.
  • CAI X, HAN G, SONG X & WANG J. 2017. Single-Camera-Based Method for Step Length Symmetry Measurement in Unconstrained Elderly Home Monitoring. IEEE Trans Biomed Eng 64: 2618-2627.
  • CHERESHNEV R & KERTESZ-FARKAS A. 2017. HuGaDB: Human Gait Database for Activity Recognition from Wearable Inertial Sensor Networks. [Online]. Available: https://arxiv.org/abs/1705.08506
    » https://arxiv.org/abs/1705.08506
  • FETTE I & MELNIKOV A. 2011. The WebSocket Protocol. [Online]. Available: https://datatracker.ietf.org/doc/html/rfc6455 “EVERYTHING ESP8266.” 2021. [Online]. Available: https://www.esp8266.com/
    » https://datatracker.ietf.org/doc/html/rfc6455
  • FOUNDATION NJ. 2018. “Node.js.” [Online]. Available: https://nodejs.org/en/
    » https://nodejs.org/en/
  • GORALSKI W. 2017. The Illustrated Network: How TCP/IP Works in a Modern Network. Elsevier Science.
  • GRANDEZ K, BUSTAMANTE P, SOLAS G, GURUTZEAGA I & GARCIA-ALONSO A. 2009. Wearable wireless sensor for the gait monitorization of Parkinsonian patients. 16th IEEE International Conference on Electronics, Circuits and Systems - (ICECS 2009), p. 215-218
  • GREENE BR, FORAN TG, MCGRATH D, DOHENY EP, BURNS A & CAULFIELD BA. 2012. Comparison of Algorithms for Body-Worn Sensor-Based Spatiotemporal Gait Parameters to the GAITRite Electronic Walkway. J Appl Biomech 28: 349-355.
  • GRZONKA S, KARWATH A, DIJOUX F & BURGARD W. 2012. Activity-Based Estimation of Human Trajectories. IEEE Transactions on Robotics 28: 234-245.
  • HWANG JY, KANG JM, JANG YW & KIM H. 2004. Development of novel algorithm and real-time monitoring ambulatory system using Bluetooth module for fall detection in the elderly. Conf Proc IEEE Eng Med Biol Soc 2004: 2204-2207.
  • JIANG Y, QI Y, WANG WK, BENT B, AVRAM R, OLGIN J & DUNN J. 2020. EventDTW: An Improved Dynamic Time Warping Algorithm for Aligning Biomedical Signals of Nonuniform Sampling Frequencies. Sensors, 20(9): 2700.
  • KAMIŃSKA MS, MILLER A, ROTTER I, SZYLIŃSKA A & GROCHANS E. 2018. The effectiveness of virtual reality training in reducing the risk of falls among elderly people. Clin Interv Aging 13: 2329-2338.
  • KANT K, IYER R & MOHAPATRA P. 2000. Architectural impact of secure socket layer on Internet servers. Proceedings 2000 International Conference on Computer Design, p. 7-14.
  • KIM A, KIM J, RIETDYK S & ZIAIE B. 2015. A wearable smartphone-enabled camera-based system for gait assessment. Gait Posture 42: 138-144
  • KIM KJ, AGRAWAL V, GAUNAURD I, GAILEY RS & BENNETT CL. 2016. Missing Sample Recovery for Wireless Inertial Sensor-Based Human Movement Acquisition. IEEE Transactions on Neural Systems and Rehabilitation Engineering 24: 1191-1198.
  • LEAL-JUNIOR A, AVELLAR L, FRIZERA A & MARQUES C. 2020. Smart textiles for multimodal wearable sensing using highly stretchable multiplexed optical fiber system. Sci Rep 10: 13867.
  • LEAL-JUNIOR AG, FRIZERA A, VARGAS-VALENCIA L, DOS SANTOS WM, BÓ APL, SIQUEIRA AAG & PONTES MJ. 2018. Polymer Optical Fiber Sensors in Wearable Devices: Toward Novel Instrumentation Approaches for Gait Assistance Devices. IEEE Sensors Journal 18: 7085-7092.
  • LEE HS. 2019. Application of dynamic time warping algorithm for pattern similarity of gait. J Exerc Rehabil 15: 526-530.
  • LEE J, SU Y & SHEN C. 2007. A Comparative Study of Wireless Protocols: Bluetooth, UWB, ZigBee, and Wi-Fi. IECON 2007 -33rd Annual Conference of the IEEE Industrial Electronics Society, p. 46-51.
  • LIU T, INOUE Y & SHIBATA K. 2009. Development of a Wearable Sensor System for Quantitative Gait Analysis. Measurement 42: 978-988.
  • LLAMAS C, GONZALEZ MA, HERNANDEZ C & VEGAS J. 2017. Open source hardware based sensor platform suitable for human gait identification. Pervasive and Mobile Computing 38: 154-165.
  • NIU S ET AL. 2019. A wireless body area sensor network based on stretchable passive tags. Nat Electron 2: 361-368.
  • PARZIALE L, BRITT DT, DAVIS C, FORRESTER J, LIU W, MATTHEWS C & ROSSELOT N. 2006. TCP/IP Tutorial and Technical Overview. [Online]. Available: https://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf
    » https://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf
  • PAU M, MULAS I, PUTZU V, ASONI G, VIALE D, MAMELI I, LEBAN B & ALLALI G. 2020. Smoothness of Gait in Healthy and Cognitively Impaired Individuals: A Study on Italian Elderly Using Wearable Inertial Sensor. Sensors (Basel) 20: 3577.
  • PUGJS/PUG. 2019. original-date: 2010-06-23T01:05:42Z. [Online]. Available: https://github.com/pugjs/pug
    » https://github.com/pugjs/pug
  • TEUFL W, TAETZ B, MIEZAL M, LORENZ M, PIETSCHMANN J, JÖLLENBECK T, FRÖHLICH M & BLESER G. 2019. Towards an Inertial Sensor-Based Wearable Feedback System for Patients after Total Hip Arthroplasty: Validity and Applicability for Gait Classification with Gait Kinematics-Based Features. Sensors (Basel) 19: 5006.
  • TROJANIELLO D, RAVASCHIO A, HAUSDORFF JM & CEREATTI A. 2015. Comparative assessment of different methods for the estimation of gait temporal parameters using a single inertial sensor: application to elderly, post-stroke, Parkinson’s disease and Huntington’s disease subjects. Gait & Posture 42: 310-316.
  • WALNES J. 2019. “joewalnes/smoothie,” original-date: 2010-08-10T09:54:54Z, [Online] Available: https://github.com/joewalnes/smoothie
    » https://github.com/joewalnes/smoothie
  • WEI W & YUNXIAO A. 2009. Vision-Based Human Motion Recognition: A Survey. Second International Conference on Intelligent Networks and Intelligent Systems, p 386-389.
  • WORLD MEDICAL ASSOCIATION DECLARATION OF HELSINKi: Ethical Principles for Medical Research Involving Human Subjects. 2013. JAMA 310: 2191-2194.
  • ZHEN T, YAN L & KONG JL. 2020. An Acceleration Based Fusion of Multiple Spatiotemporal Networks for Gait Phase Detection. Int J Environ Res Public Health 17: 5633.
  • ZRENNER M, KÜDERLE A, ROTH N, JENSEN U, DÜMLER B & ESKOFIER BM. 2020. Does the Position of Foot-Mounted IMU Sensors Influence the Accuracy of Spatio-Temporal Parameters in Endurance Running? Sensors (Basel, Switzerland) 20: 5705.

Publication Dates

  • Publication in this collection
    20 Apr 2022
  • Date of issue
    2022

History

  • Received
    19 Nov 2019
  • Accepted
    03 Dec 2020
Academia Brasileira de Ciências Rua Anfilófio de Carvalho, 29, 3º andar, 20030-060 Rio de Janeiro RJ Brasil, Tel: +55 21 3907-8100 - Rio de Janeiro - RJ - Brazil
E-mail: aabc@abc.org.br