Low-Cost Portable System for Measurement and Representation of 3D Kinematic Parameters in Sport Monitoring: Discus Throwing as a Case Study
Abstract
:1. Introduction
2. System Components
2.1. Inertial Measurement Unit
2.2. Fusion Algorithm
2.3. Euler Angles vs. Quaternions
2.4. Bluetooth Low Energy
3. System Description
4. Methodology
4.1. Programming the Microcontroller
4.1.1. Program Structure
4.1.2. Reception and Processing of Information from the IMU
4.1.3. Control Structure
- 1.
- Data fusion. All the measurements collected at a given moment are combined using the Madgwick fusion algorithm to improve the quality of the output information. Figure 5 shows a schematic of its operation.It should be noted that for the correct operation of this fusion algorithm, the north, east, down (NED) convention must be followed: X-axis aligned with north, Y-axis aligned with east, and Z-axis pointing down.
- 2.
- Quaternions. To prevent the gimbal lock problem, quaternions instead of Euler angles are used. The use of quaternions reduces the computation time, since it avoids trigonometry calculations.
- 3.
- Suppression of gravity. An accelerometer is subject to dynamic accelerations (due to the athlete’s movement) and static ones (gravity). In order to obtain the correct measurements, it is necessary to eliminate the static acceleration. Then, the expected direction of gravity is calculated and then subtracted from the accelerometer readings. The result is the dynamic acceleration.
- 4.
- Rotation matrix. The IMU will always have, at least, one of its axes (IMU’s reference frame) rotated with respect to Earth’s reference frame. Thus, it is necessary to rotate it. The rotation matrix with quaternions is implemented as shown in (4) (Kong, 2002):The accelerations with respect to the Earth’s reference frame are computed by multiplying the inverse of (4) by the accelerations to which the device is subjected. In this way, the gravitational acceleration is eliminated.
- 5.
- Acceleration filtering. The acceleration signal obtained by the IMU is a signal with noise and some glitches that may generate errors in subsequent calculations. To obtain a smoother signal, an exponentially weighted moving average (EWMA) noise reduction filter is applied. This filter has a low computational cost, and it is based on taking N samples, adding them, and finally, dividing the result by N. The average is “moving”, so it is recomputed every time that a new sample is obtained by taking the previous N samples. The value of N was fixed to 50, and the approximated cutoff frequency of the filter was 115 Hz. Figure 6 shows a raw and a smoothed signal.
- 6.
- Speed calculation. Using the filtered accelerations of the previous phase, the instantaneous speed at each sampling time is calculated by integrating the accelerations. The integral computation is carried out by dividing the area under the acceleration curve into rectangles, whose sides are instantaneous accelerations and the time interval between measurements, and adding the area of all of them. The result of this operation is the device speed [30].
- 7.
- DC filtering. The speed computation from the integration of the acceleration measurements entails a problem. Since the result is calculated as the cumulative sum of partial areas, if there is an error in any of these areas, caused, for example, by noise in the signal, the error will affect the result. If the noise causes errors in several areas, the result will differ quite a bit from what is expected. This fact is easily appreciated when the acceleration of a mobile is integrated to calculate its speed. If a movement of the stop–start–stop type is monitored, it is possible that the final computed speed is not exactly 0 (although the mobile has really stopped). If these errors are not corrected or minimized, in subsequent position calculations, the results would be quite incoherent. One way to reduce this problem is to eliminate the DC component from the velocity signal by applying a high-pass filter. The value of the cutoff frequency was determined empirically by the results obtained in the calculation of the device displacement. It is convenient that the cutoff frequency is not very high, since this causes the continuous component elimination, cancelling any possible representation of the displacement of the device. A low cutoff frequency causes the filter to have little effect on the output signal. The cutoff frequency was set to 50 Hz, and the sampling time was 0.002 s. The graphs in Figure 7 show the effectiveness of this filtering stage, where the speed in the X axis is shown, both unfiltered and filtered.
- 8.
- Zero speed. The acceleration read by the IMU, even if it is completely stopped, will never be 0.0, but it has a small value. This value, no matter how small, ends up impacting the calculated speed. In order for the computed speed to be 0.0 when the device has almost stopped, a small adjustment is applied. If the measured acceleration is within a window for a set of consecutive samples, the speed for the entire period will be 0.0. For the device, the window limits were +0.3 and −0.3 m/s, and the number of samples considered was 60. Figure 8 shows the operation of this algorithm.
- 9.
- Speed calculation. One of the objectives of this work is to calculate the speed with which the athlete’s hand moves. In the previous step, the speed in each of the axes was computed, so the value of the speed for each time instant is:
- 10.
- Position calculation. Similar to what was done for the calculation of the velocities from the accelerations, the positions are computed by integrating the velocity. This process is carried out at each instant of time and for each axis. Unlike the calculation of the speed, the results obtained for the position should not be filtered, since it would directly impact the result. If, for example, a filter is performed to eliminate the continuous component, a possible displacement that was being carried out may be erased.
4.1.4. BLE Configuration
- 1.
- Waiting for the connection from the central device. The program will be stopped at this point until the smart phone (central) establishes communication with the device (client).
- 2.
- Data packaging. One of the limitations with BLE is that, unlike conventional Bluetooth serial transmission, a large frame of characters cannot be sent. BLE only allows 20 bytes to be transmitted in each frame. To make the most of each frame and the transmission of all the information last as short as possible, the packaging shown in Figure 9 was used.The frame is constructed by concatenating the values of the positions in the 3 axes and the speed for each of the measurements. Once each frame is received by the smart phone, it is decoded following the previous packing scheme.
- 3.
- Sending data to the smart phone. The frames are sent to the smart phone as soon as they are generated. The total number of frames sent corresponds to the number of samples taken by the IMU, in this case 3000 samples.
4.2. Programming on the Smart Phone
4.2.1. Data Reception
4.2.2. Graphic Representation
5. Device Operation
5.1. Operating Phases
- 1.
- Placement of the device: The athlete must firmly hold the device to the wrist using the tape that is incorporated. If it is not properly secured, it can cause vibrations, which generate incorrect readings in the IMU; see Figure 11a.
- 2.
- Power on: To power on the device, it is necessary to move the slide switch to the right. When it is turned on, the text “MOLADIS” appears on the screen (Figure 11b).
- 3.
- Start monitoring: To start capturing the data from IMU, the left button should be pressed; see Figure 11b.
- 4.
- The text “Stabilization” appears on the screen together with a countdown. This countdown corresponds to the stabilization time of the calculations made by the fusion algorithm and it also helps the athlete to prepare.
- 5.
- Once the countdown has finished, the device will make a small vibration to indicate that the data acquisition by the has IMU begun. In addition, the text “Capturing movement” appears on the screen.
- 6.
- At this point, the athlete should begin the movement he/she wants to monitor. The data collection is carried out during 6 s, where 3000 measurements are stored. When this process is finished, the device performs another vibration with a different pattern than the previous one to indicate that the data capture has finished.
- 7.
- Once the capture has finished, the microcontroller processes the collected information. The text “Computing speed and positions” appears on the screen.
- 8.
- After the processing, the data are sent to the smart phone via Bluetooth. This sending phase is indicated on the screen with the text “Waiting for Bluetooth connection”.
- 9.
- When the previous message appears, it is time to run the application for the data reception and display on the smart phone. While the information is being sent, the message “Sending data” is shown.
- 10.
- On the smart phone, it is necessary to execute the program to receive the information. To do this, the execute button within the Pythonista program should be pressed; see Figure 12a.
- 11.
- The program runs in console mode. If the connection to the device is successful, it will first connect to the device, then search for a service and then a feature of the device; see Figure 12b. If it finds the feature correctly, the device starts transmitting the data, which are received by the smart phone.
- 12.
- When the information is received and interpreted by the program, the graphs appear, as shown in the screenshots of Figure 13.The graphs, which were described in Section 4.2.2, are: representation of the movement of the athlete’s hand in 3D and top and side view of the movement of the athlete’s hand in 2D. These latter representations offer a complementary vision to those of 3D. In addition, the speed of the athlete’s hand is also shown, representing the instantaneous speed of the athlete’s hand during the execution of the movement.
5.2. Results
6. Conclusions
- The sensor calibration and data fusion algorithm implementation.
- The measurements’ filtering.
- The correction of the drift problem caused by the gyroscopes.
- The error correction in the calculations caused by the integration of accelerations and speeds.
- The use of quaternions instead of Euler angles to avoid the gimbal lock.
- The high speed of execution of the reading of the sensors and the transmission of the data arrays through BLE.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Conflicts of Interest
Appendix A. Calibration
- Gyroscope calibration: The simplest way to calibrate the gyroscope is to compute the offset in each of the axes. The measurement in each axis must be zero degrees per second if the IMU is in the resting position. The offset computed will be used to correct the measurements once the IMU is moving. This process is valid in most applications [29].
- Accelerometer calibration: Knowing the direction and intensity of the gravity acceleration, the accelerometer can be calibrated correctly in each of the axes [29]. Each axis will be oriented for a positive maximum value, a negative minimum value, and a zero value of the gravity acceleration, providing three measurements per axis, which will be used to calibrate the accelerometers.
- Magnetometer calibration: For the correct calibration of the magnetometer, it is important that the IMU be inside the casing, that is it must be done once the device is constructed and mounted. This will allow correcting the distortions caused by hard and soft iron [29,34]. During the calibration process, it is necessary to rotate the device in all directions while the magnetic field lines that pass through the device are measured. It is necessary to know the angle of the magnetic field of the place in which the calibration is carried out. Using this angle and the measurements of the magnetic field lines, the offset and slope needed to correct the distortions in each axis are computed. For the calibration of the magnetometer, the first step is to set the full scale to be T and the sensor frequency to 414 Hz. The magnetic field intensity, which depends on the location of the sensors, must also be set. This value is obtained by the National Centre for Environmental Information, National Oceanic and Atmospheric Administration (NOAA) [35]. Once the parameters are configured, the device is rotated until the values of the magnetic field remain stable. At this moment, the parameters to calibrate the sensors can be obtained.
References
- Lara, O.D.; Labrador, M.A. A Survey on Human Activity Recognition using Wearable Sensors. IEEE Commun. Surv. Tutor. 2013, 15, 1192–1209. [Google Scholar] [CrossRef]
- De-La-Hoz-Franco, E.; Ariza-Colpas, P.; Quero, J.M.; Espinilla, M. Sensor-Based Datasets for Human Activity Recognition—A Systematic Review of Literature. IEEE Access 2018, 6, 59192–59210. [Google Scholar] [CrossRef]
- Bartlett, R.M. The biomechanics of the discus throw: A review. J. Sports Sci. 1992, 10, 467–510. [Google Scholar] [CrossRef]
- Kos, A.; Milutinović, V.; Umek, A. Challenges in wireless communication for connected sensors and wearable devices used in sport biofeedback applications. Future Gener. Comput. Syst. 2019, 92, 582–592. [Google Scholar] [CrossRef]
- Xie, X. Real-Time Monitoring Of Big Data Sports Teaching Data Based On Complex Embedded System. Microprocess. Microsyst. 2022, 104181. [Google Scholar] [CrossRef]
- Pierleoni, P.; Raggiunto, S.; Marzorati, S.; Palma, L.; Cucchiarelli, A.; Belli, A. Activity Monitoring Through Wireless Sensor Networks Embedded Into Smart Sport Equipments: The Nordic Walking Training Utility. IEEE Sens. J. 2022, 22, 2744–2757. [Google Scholar] [CrossRef]
- Ghasemzadeh, H.; Loseu, V.; Guenterberg, E.; Jafari, R. Sport Training Using Body Sensor Networks: A Statistical Approach to Measure Wrist Rotation for Golf Swing. In Proceedings of the Fourth International Conference on Body Area Networks BodyNets ’09, ICST (Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering), Los Angeles, CA, USA, 1–3 April 2009. [Google Scholar] [CrossRef]
- Bornand, C.; Güsewell, A.; Staderini, E.; Patra, J. Sport and Technology: The Case of Archery. In Proceedings of the 2013 Humaine Association Conference on Affective Computing and Intelligent Interaction, Geneva, Switzerland, 2–5 September 2013; pp. 715–716. [Google Scholar] [CrossRef]
- Xu, W.; Liu, F. Design of embedded system of volleyball training assistant decision support based on association rules. Microprocess. Microsyst. 2021, 81, 103780. [Google Scholar] [CrossRef]
- Hölzemann, A.; Van Laerhoven, K. Using Wrist-Worn Activity Recognition for Basketball Game Analysis. In Proceedings of the 5th International Workshop on Sensor-Based Activity Recognition and Interaction iWOAR ’18, Berlin, Germany, 20–21 September 2018; Association for Computing Machinery: New York, NY, USA, 2018. [Google Scholar] [CrossRef]
- Zhou, J. Virtual reality sports auxiliary training system based on embedded system and computer technology. Microprocess. Microsyst. 2021, 82, 103944. [Google Scholar] [CrossRef]
- Huang, C.; Jiang, L. Data monitoring and sports injury prediction model based on embedded system and machine learning algorithm. Microprocess. Microsyst. 2021, 81, 103654. [Google Scholar] [CrossRef]
- Peng, Y. Research on teaching based on tennis-assisted robot image recognition. Microprocess. Microsyst. 2021, 82, 103896. [Google Scholar] [CrossRef]
- Kerdjidj, O.; Boutellaa, E.; Amira, A.; Ghanem, K.; Chouireb, F. A hardware framework for fall detection using inertial sensors and compressed sensing. Microprocess. Microsyst. 2022, 91, 104514. [Google Scholar] [CrossRef]
- Ferrand, S.; Alouges, F.; Aussal, M. An electronic travel aid device to help blind people playing sport. IEEE Instrum. Meas. Mag. 2020, 23, 14–21. [Google Scholar] [CrossRef]
- Nemstev, O. Comparison of kinematic characteristics between standing and rotational discus throwss. Porto Int. Soc. Biomech. Sports 2011, 29, 347–3509. [Google Scholar]
- Panoutsakopoulos, V.; Kollias, I. Temporal analysis of elite men’s discus throwing technique. J. Hum. Sport Exerc. 2012, 7, 826–836. [Google Scholar] [CrossRef] [Green Version]
- Chen, C.F.; Wu, H.J.; Yang, Z.S.; Chen, H.; Peng, H.T. Motion Analysis for Jumping Discus Throwing Correction. Int. J. Environ. Res. Public Health 2021, 18, 13414. [Google Scholar] [CrossRef] [PubMed]
- Leigh, S.; Liu, H.; Hubbard, M.; Yu, B. Individualized optimal release angles in discus throwing. J. Biomech. 2010, 43, 540–545. [Google Scholar] [CrossRef]
- Gregor, R.J.; Whiting, W.C.; McCoy, R.W. Kinematic Analysis of Olympic Discus Throwers. Int. J. Sport Biomech. 1985, 1, 131–138. [Google Scholar] [CrossRef]
- Hay, J.G.; Yu, B. Critical characteristics of technique in throwing the discus. J. Sports Sci. 1995, 13, 125–140. [Google Scholar] [CrossRef] [PubMed]
- Leigh, S.; Gross, M.T.; Li, L.; Yu, B. The relationship between discus throwing performance and combinations of selected technical parameters. Sports Biomech. 2008, 7, 173–193. [Google Scholar] [CrossRef]
- Wang, L.; Hao, L.; Zhang, B. Kinematic Diagnosis of Throwing Motion of the Chinese Elite Female Discus Athletes Who Are Preparing for the Tokyo Olympic Games. J. Environ. Public Health 2022, 2022, 3334225. [Google Scholar] [CrossRef]
- Yu, B.; Broker, J.; Silvester, L.J. Athletics. Sports Biomech. 2002, 1, 25–45. [Google Scholar] [CrossRef] [PubMed]
- Leibson, S. IMUs for Precise Location. Contributed By Digi-Key’s North American Editors. 2019. Available online: https://www.digikey.es/en/articles/imus-for-precise-location-part-2-how-to-use-imu-software-for-greater-precision (accessed on 28 November 2022).
- Chérigo, C.; Rodríguez, H. Evaluación De Algoritmos De Fusión De Datos Para Estimación De La Orientación De Vehículos Aéreos No Tripulados. I+D Tecnol. 2017, 13, 90–99. [Google Scholar]
- Madgwick, S. An efficient orientation filter for inertial and inertial / magnetic sensor arrays. Rep. x-io Univ. Bristol (UK) 2010, 25, 113–118. [Google Scholar]
- Kong, X. INS algorithm using quaternion model for low cost IMU. Robot. Auton. Syst. 2004, 46, 221–246. [Google Scholar] [CrossRef]
- Hrisko, J. Gyroscope and Accelerometer Calibration with Raspberry Pi; Maker Portal: San Francisco, CA, USA, 2021. [Google Scholar]
- Garcés, D. Estudio e Implementación de Algoritmos Para la Estimación de la Posición Mediante Sistemas Inerciales con Arduino. Ph.D. Thesis, Universitat Politècnica de València, Valencia, Spain, 2018. [Google Scholar]
- Yin, H.; Guo, H.; Deng, X.; Yu, M.; Xiong, J. Pedestrian Dead Reckoning Indoor Positioning with Step Detection Based on Foot-mounted IMU. In Proceedings of the 2014 International Technical Meeting of The Institute of Navigation, San Diego, CA, USA, 27–29 January 2014. [Google Scholar]
- Moreno-Salinas, D.; Pascoal, A.; Aranda, J. Optimal Sensor Placement for Multiple Target Positioning with Range-Only Measurements in Two-Dimensional Scenarios. Sensors 2013, 13, 10674–10710. [Google Scholar] [CrossRef] [Green Version]
- Moreno-Salinas, D.; Pascoal, A.; Aranda, J. Sensor Networks for Optimal Target Localization with Bearings-Only Measurements in Constrained Three-Dimensional Scenarios. Sensors 2013, 13, 10386–10417. [Google Scholar] [CrossRef] [PubMed]
- FAQ: Hard & Soft Iron Correction for Magnetometer Measurements. Available online: https://ez.analog.com/mems/w/documents/4493/faq-hard-soft-iron-correction-for-magnetometer-measurements (accessed on 18 October 2012).
- National Centre for Environmental Information, National Oceanic and Atmospheric Administration (NOAA). Available online: https://www.ngdc.noaa.gov/geomag/ (accessed on 18 October 2012).
Sensor | Full Scale | Resolution |
---|---|---|
Accelerometer | g | mg/LSB |
Gyroscope | dps | 70 mdps/LSB |
Magnetometer | gauss | mgauss/LSB |
Sensor | ODR |
---|---|
Accelerometer | 476 Hz |
Gyroscope | 476 Hz |
Magnetometer | 40 Hz |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Navarro-Iribarne, J.F.; Moreno-Salinas, D.; Sánchez-Moreno, J. Low-Cost Portable System for Measurement and Representation of 3D Kinematic Parameters in Sport Monitoring: Discus Throwing as a Case Study. Sensors 2022, 22, 9408. https://doi.org/10.3390/s22239408
Navarro-Iribarne JF, Moreno-Salinas D, Sánchez-Moreno J. Low-Cost Portable System for Measurement and Representation of 3D Kinematic Parameters in Sport Monitoring: Discus Throwing as a Case Study. Sensors. 2022; 22(23):9408. https://doi.org/10.3390/s22239408
Chicago/Turabian StyleNavarro-Iribarne, Juan Francisco, David Moreno-Salinas, and José Sánchez-Moreno. 2022. "Low-Cost Portable System for Measurement and Representation of 3D Kinematic Parameters in Sport Monitoring: Discus Throwing as a Case Study" Sensors 22, no. 23: 9408. https://doi.org/10.3390/s22239408
APA StyleNavarro-Iribarne, J. F., Moreno-Salinas, D., & Sánchez-Moreno, J. (2022). Low-Cost Portable System for Measurement and Representation of 3D Kinematic Parameters in Sport Monitoring: Discus Throwing as a Case Study. Sensors, 22(23), 9408. https://doi.org/10.3390/s22239408