1 Introduction

More devices are being made wearable due to advancements in miniaturization. Wearables are among the enablers of ubiquitous and mobile computing, making the technology pervasive by interweaving it into our personal lives. Various quantifying systems that are used for self-sensing and self-monitoring combine wearable sensors, data acquisition techniques, and wearable computing. One such group of quantifying systems includes motion tracking and movement recognition applications [15]. Motion tracking can be performed at different scales—from low-precision tracking in navigation and closed buildings [3] with required accuracies in metres to the submillimetre scale in the high-precision tracking of the fine movement of a speaker’s lips and jaw [4]. Various human body motion tracking applications require accuracy in the range of centimetres and fall between these extremities.

Microelectromechanical system (MEMS) inertial sensors are portable, miniature, inexpensive, and low power. Because of their properties, they are often the first choice for integration into wearable devices used in motion tracking systems. Inertial sensors, accelerometers, and gyroscopes are used in many applications in sports, recreation, rehabilitation, and well-being. One particular use of accelerometers and gyroscopes is body motion tracking in biofeedback systems in the above-mentioned applications. In this paper, the term “biofeedback” refers to body activity in the sense of physical movement, which is classified as biomechanical movement biofeedback [6].

In a biofeedback system, a person has sensors attached to his/her body for measuring bodily functions and parameters (bio). Sensor signals are transferred to a signal processing device, and the results are communicated back to the person (feedback) through one of the human senses (i.e. sight, hearing, touch) [9]. The person attempts to act on received information to change the body motion as desired. In contrast to natural or intrinsic biofeedback, which is based on proprioception, augmented or extrinsic biofeedback relies on information from artificial devices [69]. Thus, systems using inertial sensors are classified as augmented biofeedback systems.

The most common use of augmented biofeedback is motor learning in sports, recreation, and rehabilitation. The process of learning new movements is based on repetition [6]. Numerous correct executions are required to adequately learn a certain movement. Biofeedback is successful if the user is able to either correct a movement or abandon its execution given the appropriate biofeedback information. Real-time biofeedback can reduce the frequency of improper movement executions and speed up the process of learning the proper movement pattern. Such movement learning methods are suitable for recreational, professional, and amateur users in the initial stages of the learning process [10, 11]. One example of a real-time biofeedback system is the application that helps users correct specific golf swing errors [12].

Biomechanical biofeedback is based on sensing body rotation angles, posture orientation, body translations, and body speed. These parameters are generally calculated from raw sensor data that represent measured physical quantities. In biofeedback applications, sensors are attached to the body of the user. The assessment of posture and translations can be performed by accelerometers (gravity, acceleration); body rotations are calculated from obtained gyroscope data (angular velocity).

The general requirements of biomechanical biofeedback applications are defined by position and/or orientation tolerance and by the duration of analysis. The typical position errors allowed by biofeedback applications are up to a few centimetres, the typical angular errors are up to a few degrees, and the typical duration of the motion analysis is only a few seconds. For example, in golf biofeedback applications, the required accuracies are 2° in orientation and 1 cm in position, and the motion duration is approximately 2 s [12, 13]. Sensors must exhibit sufficient accuracy, measurement range, and sampling rate to fulfil the above requirements and cover the biofeedback application movement dynamics.

The most numerous and easily available inertial sensors are MEMS accelerometers and gyroscopes integrated into smartphones. Smartphones are also the most widely used devices suitable for mobile applications. The main advantages of using smartphones in mobile biofeedback applications are their wide availability, standardized platforms (iOS, Android, Windows), and all-in-one packaging, with integrated screens, a range of communication interfaces, notable processing power, various sensors, and other user interfaces. It is therefore straightforward and relatively easy to develop and implement a mobile biofeedback application that employs smartphone inertial sensors.

The most notable disadvantages of using smartphones as a biofeedback sensing devices are their size and weight. Size limits the choice of body attachment points, and weight is the limiting factor in large dynamic movements. Challenging environments, such as water, and operating system restraints on the sensor performance parameters, such as limiting the sampling frequency far below the MEMS sensor capabilities, also narrow the use of smartphones.

1.1 Motivation and research contributions

The primary goal and motivation of the research presented in this paper is to measure, analyse, and evaluate the accuracy of smartphone gyroscopes and their validation for motion tracking in mobile biomechanical biofeedback applications. These currently rely on various motion tracking techniques; we use smartphone gyroscopes for tracking of angular motion. Angular tracking results often yield sufficient information for successful biofeedback [12]. The evaluation of smartphone gyroscopes for angular motion tracking is performed with the aid of a highly accurate optical motion capture system that is used as a reference system. The main contributions of this work are the following:

  1. (a)

    The design and implementation of a measurement system capable of comparing angular tracking signals acquired from smartphone gyroscopes and a professional optical tracking system in real time.

  2. (b)

    The validation of smartphone gyroscopes for motion tracking in mobile biomechanical biofeedback applications by identifying, measuring, and reducing several influential gyroscope inaccuracies.

The remainder of the paper is organized as follows. In Sect. 2, we present the related work. The experimental design with measurement systems, applications, and methodologies is described in Sect. 3. Section 4 is dedicated to the identification of inaccuracies in smartphone gyroscopes and their calibration. A comparison of smartphone gyroscopes with a reference tracking system is given in Sect. 5 with the final gyroscope validation. We conclude in Sect. 6.

2 Related work

Precision motion tracking is needed in various applications, particularly in research fields related to healthcare, rehabilitation, and sports.

The authors in Ref. [14] used Optotrack, a high-precision optical motion tracking system, to validate body-attached ProMove devices used for specific kinematic parameters in cycling. They used an algorithm designed for repetitive, well-defined, and bounded pedalling leg movement. Their results show that the achieved accuracy of gyroscope angular tracking in pedalling is in the range of 2.2°–6.4°.

Many works have been published on golf swing motion tracking. In Ref. [15], the authors used an XSens MTi three-axis accelerometer and three-axis gyroscope for golf swing motion tracking. Low-cost USB stereo cameras in combination with active markers on the golf club were used as a reference system. They focused on golf club position and reported a measured average position error of 3.6 cm with a worst-case error of 13.2 cm. They used gyroscope data for position calculation, but they did not measure or report the angular error.

Another comparison of the optical and inertial tracking of a golf swing is presented in Ref. [16]. The authors used the Vicon high-precision optical motion tracking system and commercial Memsense Nano IMU. They presented a graphical comparison of the rotation vector and position vector of both systems. Unfortunately, they did not provide numerical results; however, the graphs indicated that gyroscope angular tracking yields better results than accelerometer position tracking.

A novel method to measure the angular motion of golf swings in the global coordinate system using an accelerometer and gyroscope is presented in Ref. [17]. Inertial sensors were attached to the grip end of the golf club, and a Vicon DLT high-precision optical tracking system was used as a reference. They reported root-mean-square angular errors (RMSE) between the reference Vicon system and the inertial sensor system of 2.14°, 22.99°, and 2.37°, all in the global coordinate system.

3 Experimental design

The experiments are designed to track the angular motion of a 3D rigid body. Two different tracking systems are used: (a) a professional high-accuracy optical tracking system as a reference system and (b) a smartphone with an integrated MEMS gyroscope as the system for evaluation. The reference tracking systems measure the motion of the rigid body in the global Cartesian coordinate system, whereas the evaluated system measures the motion of the rigid body in the local coordinate system. The relation between both systems is explained in the following subsections.

3.1 Smartphone with an integrated MEMS gyroscope

The evaluated system is a MEMS gyroscope integrated into an iPhone 4 smartphone. As identified by Chipworks [18], the gyroscope embedded into iPhone 4 is an L3G4200D, manufactured by STMicroelectronics. The specifications of the gyroscope can be found in Ref. [19, 20].

The experimental smartphone is running on the iOS version 7.1.2 operating system. Gyroscope data are captured by the application Sensor Monitor (Pro) version 1.0.9 (Ko, Young.woo, Fuzz-Tech, Korea, 2010). The application wirelessly streams gyroscope data from the smartphone to the laptop computer, both connected to the same WLAN network. Gyroscope data are processed by the LabVIEW™ application running on the laptop.

The smartphone defines the local coordinate system and gyroscope rotation directions as shown in Fig. 1. Rotation of the smartphone body around each of the local coordinate system axes yields the corresponding gyroscope signals, as shown in Fig. 1. The xy plane of the local coordinate system is parallel to the surface of the smartphone screen, and the z axis is pointing upward when the phone is in the position with its face up.

Fig. 1
figure 1

Smartphone with the definitions of the local coordinate system and gyroscope rotation directions

3.2 Optical tracking system

We used the optical motion capture system Qualisys™ (Qualisys Inc.) as a reference for the 3D rigid body angular tracking. Qualisys™ is a professional, high-accuracy tracking system [21] with eight Oqus 3+ high-speed cameras that offers real-time tracking of multiple reflective markers predefined rigid bodies. As stated in Ref. [22], the measurement noise for a static marker is given by its standard deviation for each individual coordinate: SDX = 0.018 mm, SDy = 0.016 mm, and SDz = 0.029 mm. In view of the given results, we can regard the measurement inaccuracy of the reference system as negligibly small.

The motion of the rigid body is captured by the Qualisys Track Manager (QTM) software application and is displayed in a 3D view window, as shown in Fig. 2. The QTM defines the global coordinate system, determines the 3D position of each tracked marker, and calculates the 3D orientation of the rigid body. QTM streams the rigid body orientation to the laptop computer over the network. Orientation data are processed by the LabVIEW™ application running on the laptop.

Fig. 2
figure 2

Qualisys Track Manager 3D view window showing the position and orientation of the tracked rigid body. Reference frame (thick arrows) shows the global coordinate system. The body frame (narrow arrows) shows the local coordinate system

3.3 Signal processing application

Streamed data from the gyroscope and optical tracking system are processed by a custom-designed application in LabVIEW™ running on the laptop computer (Intel® Core™ i7 CPU 3.4 GHz, 8 GB of RAM) with the Windows 8.1 operating system. The application (a) synchronizes the streamed data, (b) calculates the Euler orientation angles from gyroscope data, (c) calibrates the smartphone gyroscope, and (d) presents the results. All of the above tasks are performed in real time and saved for possible later analysis.

3.4 Technical set-up

Two sets of experiments with different set-ups were conducted. The first set of experiments comprises a series of hand-driven test movements of the custom-made rigid body. It is aimed at the precise measurement of the rigid body motion with well-defined positions at start, stop, and intermediate times. The second set of experiments comprises a series of golf swings. It is aimed at measuring the typical motion of the player’s hand (rigid body) during the golf swing.

3.4.1 Test movement set-up

Lego bricks are used for the custom-made rigid body shown in Fig. 3, which is also the encasement for the smartphone. It is possible to find Lego bricks that allow a perfect fit for an iPhone 4 smartphone in the Lego frame. Lego bricks are used because they are widely available, offer high adaptability, and are manufactured with an accuracy of 10−5 m.

Fig. 3
figure 3

Rigid body with the local and global coordinate systems in the test movement set-up

Four infrared reflecting markers are attached to the rigid body, and the smartphone is tightly embedded into the Lego frame. Three markers are attached to the frame to form the orthogonal vector basis of the xy plane and define the local coordinate system xyz of the rigid body, as shown in Fig. 3. The local coordinate system of the rigid body is aligned to the smartphone’s coordinate system, as shown in Fig. 1.

The series of hand-driven test movements is performed on a stable, levelled wooden table. The origin of the global coordinate system XYZ is defined by the Qualisys reference motion tracking system and is marked with the Lego plates that are firmly attached (glued) to the table, as shown in Fig. 3.

3.4.2 Golf swing movement set-up

For the golf swing movement, the smartphone is attached directly onto the forearm of the player, as shown in Fig. 4. Four infrared reflecting markers are attached directly to the smartphone, three of which are attached to form the orthogonal vector basis of the xy plane of the local coordinate system of the rigid body. The local coordinate system of the rigid body is aligned to the smartphone’s coordinate system xyz shown in Fig. 1. The origin of the global coordinate system XYZ defined by the reference system is not visible in the picture.

Fig. 4
figure 4

Golf swing movement set-up

The series of golf swing movements is performed on the laboratory floor. The origin of the global coordinate system is defined by the Qualisys reference motion tracking system and is marked by self-adhesive tape on the floor.

3.5 Methodology

The smartphone gyroscope is evaluated through the comparison of rigid body orientations gained from the smartphone gyroscope and QTM signals. Validation is based on determining the fulfilment of the biofeedback application requirements presented in “Introduction”.

The Qualisys 6DOF tracking function computes the body origin vector P origin and the rotation matrix R, which describes the rotation of the rigid body, as illustrated in Fig. 2. Both parameters uniquely define the current position and orientation of all rigid body points P local in the global coordinate system P global [21]:

$$P_{\text{global}} = R \cdot P_{\text{local}} + P_{\text{origin}}$$
(1)

Only the rotation matrix or equivalent Euler angles (roll, pitch, and yaw) are needed for the gyroscope evaluation. The real-time motion tracking data stream originating from the Qualisys Track Manager software is captured by the Qualisys LabVIEW client. The gyroscope data stream from smartphone is captured by the custom-designed LabVIEW application. Both data streams are synchronized inside the main LabVIEW signal processing loop running at 60 Hz. The reference QTM system and evaluated gyroscope systems cannot be directly compared for two reasons:

  1. (a)

    QTM gives rotation angle data (roll, pitch, and yaw), and the gyroscope gives angular velocity data.

  2. (b)

    The aforementioned physical quantities are expressed in two different coordinate systems (local and global).

3.6 System comparison methods

We identified two methods for comparing results from the smartphone gyroscope and the optical tracking system.

  1. 1.

    Transformation of QTM rotation matrices R QTM[n] (2) to partial rotation matrices of the sensor-attached rigid body R local[n] (3) and calculation of the corresponding body rotation angles ΔΘ local[n] (4) between successive QTM analysis frames, thus enabling the evaluation of the virtual gyroscope data Ω QTM [n] (5). The parameter f s represents the synchronized sampling rate. The comparison of the reference system with the evaluated system is expressed in the local sensor-attached body coordinate system by the angular error ε local[n] (6).

    $$R_{\text{QTM}} \left[ n \right] = R_{\text{global}} \left[ n \right] = \prod\limits_{i = 1}^{n} {R_{\text{local}} \left[ i \right]}$$
    (2)
    $$R_{\text{local}} \left[ n \right] = R_{\text{global}}^{ - 1} \left[ {n - 1} \right] \cdot R_{\text{global}} \left[ n \right]$$
    (3)
    $$\Delta \varTheta_{\text{local}} \left[ n \right] = \varTheta \left( {R_{\text{local}} \left[ n \right]} \right)$$
    (4)
    $$\varOmega_{\text{QTM}} \left[ n \right] = \Delta \varTheta_{\text{local}} \left[ n \right] \cdot f_s$$
    (5)
    $$\varepsilon_{\text{local}} \left[ n \right] = T_{s} \cdot \sum\limits_{i = 1}^{n} {\left( {\varOmega_{\text{QTM}} \left[ i \right] - \varOmega_{\text{gyro}} \left[ i \right]} \right)}$$
    (6)
  2. 2.

    Gyroscope data Ω gyro[n] are used to calculate the successive local body rotation angle vectors ΔΘ local[n] (7), where T s represents the sampling time. Transformation of successive rotation matrices of the sensor-attached marked rigid body R local[n] (8) to the global coordinate system rotation matrices R global[n] (9), followed by the calculation of equivalent Euler angles around all principal axes Δ Θ global[n] (10) (roll, pitch, yaw). The angular error ε global[n] is expressed in the global reference coordinate system (11), where Θ QTM represents the QTM body Euler angle vector.

    $$\Delta \varTheta_{\text{local}} \left[ n \right] = \varOmega_{\text{gyro}} \left[ n \right] \cdot T_s$$
    (7)
    $$R_{\text{local}} \left[ n \right] = R(\Delta \varTheta_{\text{local}} \left[ n \right])$$
    (8)
    $$R_{\text{global}} \left[ n \right] = R_{\text{global}} \left[ {n - 1} \right] \cdot R_{\text{local}} \left[ n \right]$$
    (9)
    $$\varTheta_{\text{global}} \left[ n \right] = \varTheta \left( {R_{\text{global}} \left[ n \right]} \right)$$
    (10)
    $$\varepsilon_{\text{global}} \left[ n \right] = \varTheta_{\text{QTM}} \left[ n \right] - \varTheta_{\text{global}} \left[ n \right]$$
    (11)

The transformation formulas between rotational matrices R(Θ) and Euler angles Θ(R) are expressed by the rotation sequence around all three axes in a defined order (x, y, z), which is a default convention in Qualisys [21]. The QTM reference system and evaluated system with smartphone MEMS gyroscopes are compared in both coordinate systems in Sect. 5.

4 Inaccuracies and calibration of the smartphone gyroscope

Motion tracking applications based on raw smartphone gyroscope data have limited use. Various gyroscope inaccuracies cause significant angular errors. Gyroscope errors can be predicted for a simplified exemplary movement when one of two conditions is defined: (a) the gyroscope signal integration time T w is 10 s or (b) the rotation angle α is 90°. Table 1 lists the predicted gyroscope angular errors originating from various sources.

Table 1 Gyroscope inaccuracy sources and their predicted angular errors

Gyroscope bias measurements were taken on ten iPhone 4 smartphones. Biases were estimated by averaging samples over time intervals τ = 10 s when the smartphone was in the standstill position. The measured bias values are in the range of ±1 deg/s. MEMS gyroscope biases vary with time, and temperature is the most influential factor in bias instability [23, 24]. Sensors in smartphones experience changes in temperature not only because of their own heating but also because of the heating of other parts of hardware integrated into the smartphone’s enclosed casing. The change in the inner temperature caused by running applications has a greater and more instant effect than changes in the room air temperature. From our experience, the bias drift acquired from the repeated bias measurements after 1 h of smartphone operation does not exceed ±0.1 deg/s.

The results of gyroscope scaling factor measurements show that the scaling errors do not exceed 2 %. The angular error in the local coordinate system dimension depends on the scaling factor error and total rotation angle. In the worst case, the angular errors in each of the global reference frame dimensions can be larger because errors are simultaneously superimposed from other sensor dimensions. The results of the calibration procedure applied to several smartphones show that the axis misalignment error does not exceed 1°.

Regardless of the calibration methods used for identifying deterministic errors, random noise represents the limit of the gyroscope accuracy [25]. We investigated the gyroscope random noise model by measuring the Allan variance. The gyroscope Allan deviation plot σ A(τ) follows the slope of the white noise model for short averaging time τ < 100 s. The measured gyroscope Allan deviation σ A(τ = 1 s) of ten smartphone devices is in the range of 25–30 mdeg/s. The angle random walk has a zero mean with a standard deviation σϕ that increases with the square root of the integration time [26]:

$$\sigma_{\upphi} (t) = \sigma_{\text{A}} (\tau = 1s) \cdot \sqrt t$$
(12)

Thus, the predicted angular deviation after a 10-s signal analysis, calculated from Eq. (12), is <0.1°. Sensor noise also affects the precision of the bias measurement. The initial bias measurement error in a 10-s averaging interval, estimated with a 1σ confidence interval, is <10 mdeg/s.

To improve the gyroscope angular tracking accuracy, one or more deterministic errors from the top rows of Table 1 should be reduced. Smartphone gyroscope calibration is a prerequisite for its comparison with the optical tracking system. We first took bias measurements with a 10-s averaging time and bias compensation, followed by calibration of the scaling factors and the axis alignment. Gyroscope bias measurement and bias compensation is performed in the stand-still position in the vibration-free environment. Measurements of scaling factors and of the misalignment of the MEMS sensor axis with the smartphone axis are taken through the following procedure: The smartphone is mounted into the specially designed mechanical calibration frame, several full-circle rotations around one of the smartphone principal axes are performed, and the rotation angles for all sensor axes are calculated; the same procedure is repeated for the remaining two smartphone principal axes. Finally, scaling factors and axis misalignments are derived from the measured values. The method is similar to that presented in Ref. [27].

The calibration method is based on the assumptions of gyroscope linearity and requires stable temperature conditions without bias drift. In practice, biases change with time, and smartphone gyroscopes exhibit small nonlinearities. Thus, scaling factors and axis misalignment remain partially uncompensated, causing residual angular errors.

Bias drift errors can be reduced by repetitive bias measurements. Random angular errors induced by sensor noise are negligible compared with the other error sources in Table 1.

5 System comparison and validation

The smartphone gyroscope evaluation procedure is based on measurements of rigid body angular motion. The measurements are taken concurrently in both systems: the reference professional optical tracking system and the evaluated smartphone gyroscope. Angular motion is expressed and compared by one of the two proposed methods presented and explained in Sect. 3.6. The sampling rate of both systems is set at 60 samples per second.

  1. 1.

    The test movement sequence is composed of four hand-driven phases with the following rotations: (a) roll of approximately 90°, (b) yaw of approximately −90°, (c) pitch of approximately −90°, and (d) rotate back to initial orientation by simultaneously rotating around all three rigid body axes. Each phase is smoothly executed in approximately 2 s. After each phase, the smartphone was left in a standstill position for several seconds. The total duration of the measured signal is 30 s, with 18 s of observed movement.

  2. 2.

    The golf swing is executed in full, but only its backswing component is tracked. The backswing phase measurement takes approximately 2 s, with 1.5 s of observed movement.

The evaluated gyroscope data are compared with reference virtual gyroscope data using Eqs. (2)–(6), and the results are presented by two sets of measurements.

Figure 5 shows the comparison results of measured 3D rotation angles for both sets of movements presented in the local coordinate system. Graphs (a)–(c) show test movement measurements, and graphs (e)–(g) show golf swing measurements. Some high-frequency noise can be observed in all three virtual gyroscope signal components. However, when calculating angular orientation error (6), high-frequency noise components are largely filtered out. The orientation angle error in the local coordinate system is shown in graph (d) for the test movement and graph (h) for the golf swing. The calculated RMSE is 0.46° for the test movement and 1.86° for the golf swing.

Fig. 5
figure 5

Comparison of smartphone gyroscope signals (blue plots) and the derived reference system virtual gyroscope signals (red plots) in the local coordinate system. ad show signals of the test movement. eh show signals of the golf swing movement, as defined in Sect. 3. a, e show the smartphone and virtual gyroscope x axis (roll) angular velocity, b, f show the smartphone and virtual gyroscope y axis (pitch) angular velocity, and c, g show the smartphone and virtual gyroscope z axis (yaw) angular velocity. The difference in orientation angles is shown in d, h (colour code: red = roll, green = pitch, blue = yaw)

From the experiment observer’s view, it is more natural and more convenient to express the rotation angles in the global coordinate system. Rotation angles calculated from gyroscope data using Eqs. (7)–(11) are compared with the reference QTM rotation angles in Fig. 6. Graphs (a) and (b) show the test movement measurements, and graphs (c) and (d) show the golf swing measurements. Graphs (a) and (c) show the rotation angles given by both systems, and graphs (b) and (d) show the rotation angle errors in the global coordinate system (11). The calculated RMSE is 0.42° for the test movement and 1.15° for the golf swing.

Fig. 6
figure 6

Comparison of smartphone (dotted black plots) and QTM body rotation angles (solid coloured plots) in the global coordinate system (colour code: red = roll, green = pitch, blue = yaw). a, b show test movement and c, d show golf swing movement, as defined in Sect. 3. a, c show smartphone and QTM rotation angles. b, d show the difference in rotation angles of the QTM system (reference) and smartphone gyroscope

The comparison results in Figs. 5 and 6 are obtained after employing the gyroscope bias compensation and gyroscope scaling factor calibration. The residual gyroscope errors are relatively small and are analysed in the next section.

5.1 Identified sources of gyroscope inaccuracies

Gyroscope bias is the most relevant gyroscope error source. Uncompensated gyroscope bias has a significant effect on angular error, as illustrated in Fig. 7a. A deterministic linear ramp angular error in the current example results from the measured but intentionally uncompensated biases: (0.92, −0.25, 1.08) deg/s.

Fig. 7
figure 7

Influences of basic gyroscope inaccuracies in the global coordinate system (colour code: red = roll, green = pitch, blue = yaw). Gyroscope angular error without compensation is shown in graph (a). Gyroscope angular error after the bias and scaling factor calibration is shown in graph (b). Residual angular errors are shown in graph (c)

The calculated RMSE is 9.26°. The gyroscope angular errors after bias compensation are shown in Fig. 7b. The calculated RMSE is 2.05°. The angular errors are further reduced after the gyroscope calibration as shown in Fig. 7c. The remaining angular errors are mainly in the range of ±1°. The calculated RMSE is 0.42°.

The residual error is partially the result of an imperfect calibration of gyroscope scaling factors and axis misalignments. Gyroscope errors also occur from non-deterministic sources, such as bias measurement error, angle random walk generated by white sensor noise, and bias drift. Residual gyroscope random errors from the above-mentioned sources are considerably smaller than 1° and are thus less visible in angular error measurement results in Fig. 7c.

5.2 Smartphone gyroscope validation

Based on the comparison results presented in this section and the general requirements of biofeedback applications from the Introduction section, smartphone gyroscopes are validated for angular motion tracking in mobile biofeedback applications.

The typical required angular accuracies of biofeedback applications are up to a few degrees; after full gyroscope calibration, the measured inaccuracies are 0.42° for the test movement and 1.15° for the golf swing; under partial gyroscope calibration, they are 2.05° for the test movement and 1.67° for the golf swing (bias compensation only).

6 Conclusion

The main purpose of our research is to validate smartphone gyroscopes for mobile biofeedback applications. For that purpose, we designed and implemented a real-time measurement system capable of tracking rotation angles from two asynchronous signal sources: a smartphone and an optical tracking system. The smartphone gyroscope validation procedure is based on concurrent measurements and a comparison with a reference professional optical tracking system.

Smartphone gyroscope calibration is a prerequisite for its comparison with the optical tracking system. Gyroscope bias compensation must achieve an angular tracking precision of 1°. Biofeedback applications should include an initial gyroscope calibration and occasional bias compensations when needed.

A comparison is made using two methods of error measurement in both local and global coordinate systems. Two sets of experiments with different set-ups were conducted: a series of hand-driven test movements of the custom-made rigid body and a series of golf swings. The root-mean-square angular errors are 0.42° for the test movements and 1.15° for a golf swing. The measurement results confirm that the gyroscope precision is adequate for most biofeedback applications.

Smartphones are the most widely available mobile sensing devices. Thus, it is highly beneficial that smartphone gyroscopes can be used for most health-related biofeedback applications in sports, recreation, rehabilitation, and well-being.