A Novel AHRS Inertial Sensor-Based Algorithm for Wheelchair Propulsion Performance Analysis

With the increasing rise of professionalism in sport, athletes, teams, and coaches are looking to technology to monitor performance in both games and training in order to find a competitive advantage. The use of inertial sensors has been proposed as a cost effective and adaptable measurement device for monitoring wheelchair kinematics; however, the outcomes are dependent on the reliability of the processing algorithms. Though there are a variety of algorithms that have been proposed to monitor wheelchair propulsion in court sports, they all have limitations. Through experimental testing, we have shown the Attitude and Heading Reference System (AHRS)-based algorithm to be a suitable and reliable candidate algorithm for estimating velocity, distance, and approximating trajectory. The proposed algorithm is computationally inexpensive, agnostic of wheel camber, not sensitive to sensor placement, and can be embedded for real-time implementations. The research is conducted under Griffith University Ethics (GU Ref No: 2016/294).


Introduction
The rapid development of microelectromechanical systems (MEMS) technology has afforded the use of small, ubiquitous sensors for performance tracking across a variety of sporting domains.Within the field of wheelchair court sports, inertial measurement unit (IMU) MEMS technologies are the most obvious way of tracking wheelchair performance in the field [1].IMU sensors predominately contain accelerometers and gyroscopes, allowing for biomechanical data to be both captured and analysed in the natural performance environment at low cost [2].The efficacy of IMUs for wheelchair propulsion metrics has been evidenced by researchers [3,4]; however, the reliability of these metrics (most commonly velocity, distance, and trajectory) are highly dependent on processing algorithms [5].
Researchers who have investigated wheelchair propulsion using inertial sensors have adopted a few different algorithmic approaches.Bergamini et al. [3] used a one IMU sensor approach to find push cycle duration and frequency from the forward component of acceleration using a sensor placed on the backrest of the wheelchair.A pitch-roll-yaw 5 s static hold and rotate calibration sequence was employed to ensure all the forward power was in the forward direction of the IMU.This approach is effective, although it only gives accurate information for purely linear acceleration.The vast majority of wheelchair sports-with the exception of the 100 m sprint-contains non-linear propulsive With any technology and accompanying algorithm used for elite sports monitoring, the accuracy, validity, and reliably of measurements is paramount.Mason et al. [15] investigated the reliability and validity of inertial sensors on wheelchair court sports in comparison to high speed video.In terms of speed, the sensor and his algorithmic implementation was found to be reliable, never exceeding a coefficient of variation of 0.9% at any speed.Peak speed was also proven valid using an IMU device with a coefficient of variation of 1.6%, concluding that IMUs are a capable and valuable tool for assessing aspects of linear wheelchair performance.To evidence the validity of spatial tracking in non-linear propulsion, Van der Slikke et al. [8] used 20 participants to compare IMU-based kinematic estimations to a gold standard 24-camera optimal motion analysis system across 21 tasks encompassing typical wheelchair basketball movements.The researchers used intraclass correlation (ICC) to assess IMU-based test outcomes for linear speed (ICC > 0.9), rotational speed (ICC > 0.99), and instantaneous rotation center (ICC > 0.90), showing very high correlations to the gold standard motion capture.This evidences that IMU technology has the potential to accurately and reliably measure in-game propulsive elements.
The desire to measure fundamental contextual propulsion characteristics, including distance, velocity, and trajectory in a camber agnostic and sensor-minimal system has led to the development of a new algorithm based on the computationally efficient open-sourced Madgwick's AHRS algorithm.The algorithm utilises the algorithmic concept of Dead-reckoning, whereby positioning is determined from distance and direction estimation from a previously-determined position [13].The methods and results of this paper validate the new algorithm against known baselines to evidence the accuracy and validity of the measurements.This algorithm can be linked with other algorithms-for example, Fuss et al.'s [7] fractional dimensioning approach to classify in-game activities or Bergamini et al.'s [3] measurement of wrist synchronicity-to provide coaches with enhanced information, pertinent understanding, and improved performance, mitigating against injury and improving wheelchair design.

Using
Madgwick's open-sourced AHRS implementation [14], a novel algorithm to find distance, velocity, and trajectory was developed as highlighted in Section 2.1.

Algorithm
The implemented algorithm can be visualized in the schematic below with the algorithm's intention to track wheel distance and trajectory.
As evidenced by Figure 1, the algorithm inputs calibrated inertial sensor data, formatted within the data structure defined by James and Wixted [16].The AHRS algorithm of Madgwick et al. [14] is then utilised to calculate the sensor orientation, giving the output in a quaternion representation, which is transformed into Euler angles.The wheel sensors were attached so the rotation axis of interest occurred around the yaw axis.Thus, the yaw angle of the wheel sensor derived by AHRS at each time point (termed θ WT ) was used to evaluate the angular change.This angular change of the wheel sensor over each time sample (termed θ WT ) compared to the previous time sample was then used to evaluate the distance (d T ) moved in that sample: The chair sensor is attached so that z axis rotation represents the heading angles, so a yaw angle of the chair sensor is regarded as chair heading angle θ H .The distance at each time series, from Equation (1), was vectorised to create an x and y position at each time series.Using the principle of Dead-reckoning [13], the current location is determined from the previous calculated coordinates, using Equations ( 2) and (3), to map the wheelchair trajectory.
To find orientations (θ W and θ H ) the proposed algorithm utilized Madgwick et al.'s AHRS 6DOF IMU open-sourced orientation filter [14], which encompasses sensor fusion of the gyroscope and the accelerometer to accurately find an attitude orientation which is referenced to gravity.The filter is tuned by the gain value, β.This value represents all mean zero gyroscope measurement errors which encompass sensor noise, aliasing, quantization error, calibration error, sensor misalignment, sensor axis non-orthogonality, and frequency response characteristics [14].The mean zero gyroscope measurement errors were calculated to establish a beta value for the wheel sensors of β = 0.03 [14].An iterative approach of incrementing beta from this value in steps of 0.01, and inspecting the unwrapped Euler angle plots, found that a chair beta value of β = 0.2 was the most appropriate to adequately weight the accelerometer signal for accurate heading tracking.
determined from distance and direction estimation from a previously-determined position [13].The methods and results of this paper validate the new algorithm against known baselines to evidence the accuracy and validity of the measurements.This algorithm can be linked with other algorithms-for example, Fuss et al.'s [7] fractional dimensioning approach to classify in-game activities or Bergamini et al.'s [3] measurement of wrist synchronicity-to provide coaches with enhanced information, pertinent understanding, and improved performance, mitigating against injury and improving wheelchair design.

Using
Madgwick's open-sourced AHRS implementation [14], a novel algorithm to find distance, velocity, and trajectory was developed as highlighted in Section 2.1.

Algorithm
The implemented algorithm can be visualized in the schematic below with the algorithm's intention to track wheel distance and trajectory.

Methods
A variety of tests were performed to ensure the accuracy of the system.The wheelchair used for the tests was instrumented with three 9DOF inertial sensor units (SABELSense, Nathan, Australia).An iteration of the sensor is detailed in James et al. [17].The sensors encompass a ±7 Gauss 3DOF magnetometer, a ±2000 • /s 3DOF gyroscope, and a ±16 g 3DOF accelerometer.The sensors were calibrated [18] and mounted as per Figure 2, with two IMUs attached to each wheel, and the fifth IMU-which was used purely for heading-was fixed to the centre of the wheelchair frame.This provided four independent straight line measures of distance that could be contrasted.The radiofrequency (RF) modules were started and stopped by a master sensor connected to the laptop, ensuring that data for each test and each IMU was synced.Each device logged directly to its own SD card and the data was recovered at the end of each test session.Each session was filmed by two video cameras on a tripod.The test session was conducted in an indoor sports hall, where the wheelchair basketball practice and games occur.The court floor is EN and DIN certified and International Basketball Federation (FIBA) approved.The wheel was removed from the chair, and the diameter measured using a tape measure.

Trials
A straight line 14 m test was performed five times.This involved walking (pushing) the unmanned wheelchair at a constant pace from the intersection of the halfway line and the sideline and stopping on the intersection of the halfway line and the baseline.As the court is FIBA level one approved, the accuracy of court markings have been independently scrutinised, ensuring the distance is 14 m.A centre court-to-baseline linear walking test was then also performed five times under the same unmanned walking (pushing) conditions.To validate distance at different time increments for both of these tests, a laser range finder (Jenoptik LDM301) with a 100 Hz sampling frequency set up on a fixed tripod was used.This provided a reference measure to independently monitor the distance of the wheelchair over the testing time, allowing for the comparison of velocity curves.Three half court laps were then performed, initially in a clockwise direction and then in an anticlockwise direction with the chair again walked at a relatively constant pace.As the centre of the chair was kept on the line, the distance for the internal wheel and the external wheel could be deduced.As this test was aimed at assessing trajectory accuracy, the laser was not used.

Results
After post-processing the data, it was clear that there were two large magnetic disturbances running parallel to the court that affected all trials.The disturbance was located approximately 75 cm into the trial.
The results of the 14 m straight line test were tabulated, shown below in Table 1.  1 provides evidence that the laser is an accurate reference of the linear velocity profile, in terms of the distance covered over a specific period of time.This allowed for the visual comparison

Trials
A straight line 14 m test was performed five times.This involved walking (pushing) the unmanned wheelchair at a constant pace from the intersection of the halfway line and the sideline and stopping on the intersection of the halfway line and the baseline.As the court is FIBA level one approved, the accuracy of court markings have been independently scrutinised, ensuring the distance is 14 m.A centre court-to-baseline linear walking test was then also performed five times under the same unmanned walking (pushing) conditions.To validate distance at different time increments for both of these tests, a laser range finder (Jenoptik LDM301) with a 100 Hz sampling frequency set up on a fixed tripod was used.This provided a reference measure to independently monitor the distance of the wheelchair over the testing time, allowing for the comparison of velocity curves.Three half court laps were then performed, initially in a clockwise direction and then in an anticlockwise direction with the chair again walked at a relatively constant pace.As the centre of the chair was kept on the line, the distance for the internal wheel and the external wheel could be deduced.As this test was aimed at assessing trajectory accuracy, the laser was not used.

Results
After post-processing the data, it was clear that there were two large magnetic disturbances running parallel to the court that affected all trials.The disturbance was located approximately 75 cm into the trial.
The results of the 14 m straight line test were tabulated, shown below in Table 1.  1 provides evidence that the laser is an accurate reference of the linear velocity profile, in terms of the distance covered over a specific period of time.This allowed for the visual comparison of velocity from the four inertial sensors against this reference.One trial example-trial one of the 14 m test-is shown below in Figure 3.
Algorithms 2016, 9, 55 6 of 10 of velocity from the four inertial sensors against this reference.One trial example-trial one of the 14 m test-is shown below in Figure 3.The results of the halfway to baseline test are shown below in Table 2.  4 and 5 show the results from the half court laps performed both clockwise and then anticlockwise.The results of the halfway to baseline test are shown below in Table 2. Tables 3 and 4 show the results from the half court laps performed both clockwise and then anticlockwise.To visualise the information given in Tables 3 and 4, the trajectory was plotted for each half court loop.Figure 4 shows one example plot, depicting the four independent wheel measures starting from the origin (0, 0), with the error visually highlighted by the incompleteness of the loop.To visualise the information given in Tables 4 and 5, the trajectory was plotted for each half court loop.Figure 4 shows one example plot, depicting the four independent wheel measures starting from the origin (0, 0), with the error visually highlighted by the incompleteness of the loop.

Discussion
Magnetometer data showed two large magnetic disturbances on the basketball court which affected the sensor heading angle, occurring 1.81 ± 0.09 s into the 14 m trial.The cause of this disturbance was determined to be high voltage power and telecommunications lines for the adjoining sports stadium that ran underneath the court.This heading angle error due to the magnetic disturbance shaped the decision to utilise only the IMU AHRS implementation for all calculations.
The 14 m straight line trial (shown in Table 1) indicated that the proposed algorithm gives accurate, less than ±5% error, distance calculations when compared to the known 14 m track length.The mean value was 14.31 ± 0.15 m, overestimating distance for the trial by an average error of 2.21%.The inter-sensor error was also very low, with an average 0.77% distance error between the five trials with the average range of 0.11 ± 0.03 m.The laser measurement gave a mean result of 13.96 ± 0.03 m, demonstrating its use as a velocity reference.When comparing the gradient of the velocity curve between the four wheel sensors and the laser shown in Figure 2, it is apparent that the velocity estimation based on distance and time is an accurate reflection of the true velocity.
The halfway centre court position to the baseline corner was chosen as the second measure of distance, shown in Figure 2C.The rationale was that if the wheel was pushed in a slightly non-linear trajectory, the left outside wheel would show a greater travelled distance.The laser again proved to be an accurate measure, estimating the distance at an average of 15.864 ± 0.032 m.The IMU sensors also provided an accurate distance measurement when compared to the known distance 16.288 ± 0.205 m, with a mean distance error percentage of 2.57%.A left wheel distance dominance was seen, with a mean increase in distance of 0.362 m, indicating that the wheelchair was not pushed directly straight and rather had a slightly curved trajectory.
Three half court laps were performed in each direction.As the wheelchair was walked along the centre line, the internal wheel distance should equate to 56.25 m, and the external wheel should travel 61.72 m.The mean distance travelled for the internal wheel 57.27 ± 0.70 m, and the external wheel 60.85 ± 0.46 m, with an average internal wheel over-estimation error of 1.79% and an average outside wheel under-estimation of 1.42%.The tracking accuracy using the orientation from the rigidly-mounted chair sensor was also very good, with a radial distance error mean of 0.71 ± 0.17 m.If the MARG AHRS system was used, it could be assumed that this error would be further reduced, as a more accurate heading could be attained.
In addition to the computational efficiency and accuracy of the measurement algorithm, the algorithmic implementation also benefits, as it is both placement and camber agnostic.This is a substantial benefit in comparison to pre-existing algorithms, reducing setup time and enhancing useability.The algorithm in its current form has a few limitations.The algorithm did not include wheel skid correction factors, as the testing did not encompass any skid moments.For in-game distance and trajectory, a modification of Van der Slikke et al.'s [8] correction algorithm will be integrated, as skidding is likely to occur.The implemented algorithm also requires an accurate wheel radius measurement, and this radius will vary with tire pressure and deformation due to player loading.Therefore, to ensure measurement accuracy for tire radius measurements, Moore et al.'s [19] wheel radius measurement protocol will be adopted for testing with athletes.Furthermore, due to the ferromagnetic disturbance, MARG AHRS was not utilised.If possible, it should be used; however, as the magnetometer was affected, a more accurate trajectory could not be ascertained.
Future algorithmic developments will aim to reduce the sensor number, subsequently reducing costs and improving usability.For enhanced performance analysis, the algorithm will be tested on elite athletes to provide overall contextual information augmented with more detailed propulsive elements based on other IMU extracted features; for example, encompassing a bilateral wrist symmetry algorithm [3].These tests will be conducted under match play conditions, investigating the efficacy of the algorithm under dynamic performance conditions.

Conclusions
An inertial sensor system using the presented IMU AHRS orientation-based algorithm has been found to be an accurate way of estimating wheelchair distance, velocity, and trajectory.The average distance error across all trials was found to be an overestimation of distance of 1.62% ± 1.09%.The algorithmic accuracy for positional tracking was also demonstrated, with a distance error not exceeding 3.1% for one lap.The proposed computationally-efficient camber agnostic algorithm has been proven to be an accurate measure of extracting key contextual propulsion elements.These elements, when fed back to coaching staff, could aid in informing tactical decisions, enhancing player performance, and mitigating injury.

Figure 1 .
Figure 1.Overview of the Algorithmic implementation.The algorithm requires inertial measurement unit (IMU) data from a chair sensor and one or more wheel sensors, and the radius of the wheel ( ) as inputs.The algorithm outputs distance ( ), heading orientation from chair sensor ( ), orientation from wheel sensor ( ), and the positional coordinates X , y .

Figure 1 .
Figure 1.Overview of the Algorithmic implementation.The algorithm requires inertial measurement unit (IMU) data from a chair sensor and one or more wheel sensors, and the radius of the wheel (r wheel ) as inputs.The algorithm outputs distance (d), heading orientation from chair sensor (θ H ), orientation from wheel sensor (θ W ), and the positional coordinates X pos , y pos .

Figure 2 .
Figure 2. IMU sensor placement.Right wheel 1 and 2 (RW1 + RW2) and Left wheel 1 and 2 (LW1 + LW2) oriented +x wheel rotation direction and +z into the wheel.Centered frame (Cf) sensor oriented +x forward, +y right, +z down.(A) photo of sensor placement, with blue squares overlaid on sensors to increase visual prominence; (B) schematic of the sensor location with additional componentry removed; and (C) court testing dimensions.

Figure 2 .
Figure 2. IMU sensor placement.Right wheel 1 and 2 (RW1 + RW2) and Left wheel 1 and 2 (LW1 + LW2) oriented +x wheel rotation direction and +z into the wheel.Centered frame (Cf) sensor oriented +x forward, +y right, +z down.(A) photo of sensor placement, with blue squares overlaid on sensors to increase visual prominence; (B) schematic of the sensor location with additional componentry removed; and (C) court testing dimensions.

Figure 3 .
Figure 3. Velocity profile comparison of the four sensors used in trial 1, 14 m.

Figure 3 .
Figure 3. Velocity profile comparison of the four sensors used in trial 1, 14 m.

Figure 4 .
Figure 4. Trial 2, half court lap performed in a clockwise direction starting and finishing at the origin (0,0) with the error visually depicted by the incompleteness of the loop.

Figure 4 .
Figure 4. Trial 2, half court lap performed in a clockwise direction starting and finishing at the origin (0,0) with the error visually depicted by the incompleteness of the loop.

Table 1 .
Fourteen meter straight line distance test results.Comparing the distance from the laser, and the independently found distance from each of the four wheel sensors (R1, R2, L1, L2) to the known 14 m distance from the court markings.

Table 1 .
Fourteen meter straight line distance test results.Comparing the distance from the laser, and the independently found distance from each of the four wheel sensors (R1, R2, L1, L2) to the known 14 m distance from the court markings.

Table 2 .
Range test, 15.88 m straight line.Comparing the distance found by the laser, the distance found independently for each of the four wheels (R1, R2, L1, L2), and the known distance from the court markings.

Table 4 .
Half court lap trajectory tracking results, comparing the IMU derived output with the known court markings.(Note: A denotes IMU set 1, and B denotes IMU set 2. * denotes clockwise travel.** denotes anticlockwise travel).

Table 2 .
Range test, 15.88 m straight line.Comparing the distance found by the laser, the distance found independently for each of the four wheels (R1, R2, L1, L2), and the known distance from the court markings.

Table 3 .
Half court lap trajectory tracking results, comparing the IMU derived output with the known court markings.(Note: A denotes IMU set 1, and B denotes IMU set 2. * denotes clockwise travel.** denotes anticlockwise travel).

Table 4 .
Half court lap distance tracking results, comparing the IMU derived output with the known court markings.(Note: * denotes clockwise travel.** denotes anticlockwise travel.Perimeter of the court 14 m × 15 m, Wheelbase = 0.87 m, therefore the internal wheel should travel 56.26 m and the external should travel 61.73 m).

Table 5 .
Half court lap distance tracking results, comparing the IMU derived output with the known court markings.(Note: * denotes clockwise travel.** denotes anticlockwise travel.Perimeter of the court 14 m × 15 m, Wheelbase = 0.87 m, therefore the internal wheel should travel 56.26 m and the external should travel 61.73 m).