A Novel Method and System Implementation for Precise Estimation of Single-Axis Rotational Angles

Accurately estimating single-axis rotational angle changes is crucial in many high-tech domains. However, traditional angle measurement techniques are often constrained by sensor limitations and environmental interferences, resulting in significant deficiencies in precision and stability. Moreover, current methodologies typically rely on fixed-axis rotation models, leading to substantial discrepancies between measured and actual angles due to axis misalignment. To address these issues, this paper proposes an innovative method for single-axis rotational angle estimation. It introduces a calibration technique for installation errors between inertial measurement units and the overall measurement system, effectively translating dynamic rotational inertial outputs to system enclosure outputs. Subsequently, the method employs triaxial accelerometers combined with zero-velocity detection technology to estimate the rotation axis position. Finally, it delves into analyzing the relationship between quaternion and axis–angle, aimed at reducing noise interference for precise rotational angle estimation. Based on this proposed methodology, a Low-Cost, a High Accuracy Measurement System (HAMS) integrating sensor fusion was designed and implemented. Experimental results demonstrate static measurement errors below ±0.15° and dynamic measurement errors below ±0.5° within a ±180° range.


Introduction
In the fields of aerospace, robotics, and automotive engineering, accurately measuring the rotational angles of movable surfaces is crucial [1][2][3].This measurement aids in understanding the system's posture and status, enabling appropriate operations and adjustments.In aviation, precise measurement of aircraft control surface deflection is key for maintaining stability during high-speed flight, and any deviations from the designed angle measurement system can significantly impact the aircraft's performance and safety [4,5].In robotics, accurately measuring joint rotation is essential for executing complex movements and delicate operations [6,7].For example, during precision assembly or surgical assistance, robots must precisely control each joint of their mechanical arm to ensure accuracy and safety [8,9].Similarly, in automotive engineering, precise measurement of wheel steering angles and suspension adjustments is vital for maintaining vehicle stability and optimizing the driving experience.Significant measurement errors can reduce overall vehicle performance and, in severe cases [10], threaten driving safety.Hence, accurate angle measurement provides a fundamental basis for the system's stability, accuracy, and safety.
Inertial sensor-based motion tracking methods have become a research focus in rotational angle measurement due to their low cost, compact size, and ease of integration.Inertial Measurement Unit (IMU) typically include a gyroscope, accelerometer, and magnetometer.By combining data from these sensors, attitude angles are obtained through attitude estimation algorithms [11][12][13][14][15]. IMUs reference their own coordinate system when measuring angular acceleration and velocity, making this approach to posture estimation largely unaffected by interference and obstructions [16].In theory, they can capture the motion of a target without any limitations, leading to their widespread application [17][18][19].
In the field of rotational axis estimation, researcher Sara [20] introduced the Simultaneous Orthogonal Rotations Angle (SORA) method.This approach uses gyroscope outputs to determine the rotational angle and axis of single-axis movements.Its simplicity makes it suitable for general angular positioning, marking significant progress in angle estimation.However, it has limitations, relying solely on gyroscopes, which suffer from drift issues that worsen over time.Furthermore, the model assumes constant angular velocity, which might struggle with complex and unpredictable motion dynamics.To address gyroscopic drift, Cao [21] proposed a method for measuring spatial rotation angles using dual-axis MEMS tilt sensors.The method calculates the rotation angles of an object in space by establishing and solving model equations.A perpendicularly mounted single-axis tilt sensor is added to the original dual-axis tilt sensors, forming a three-axis tilt sensor system that effectively corrects and measures the spatial rotation angles of the object.Wang [22] proposed using an accelerometer to estimate the rotation axis can improve the precision of static measurements.However, when using Euler angles to represent rotation, the measurement precision decreases when the measurement angle exceeds 60 degrees.Subsequently, Xu [23] proposed a method for estimating the rotation axis based on incremental quaternions.This method employs incremental quaternions to calculate the rotation axis by computing intermediate rotation angles, ultimately determining the rotation angle.It effectively circumvents the gimbal lock issue associated with Euler angles and enables full-range rotation angle measurement and complete attitude estimation of the rotation axis.
While it has been proven effective in handling the static motion of targets, over-reliance on quaternions has resulted in increased accumulated errors over time in computations.
The remainder of the paper is organized as follows.Section 2 lays out the coordinate systems and introduces a calibration technique designed to correct installation errors between the Inertial Measurement Unit (IMU) and the entire measurement system, effectively translating the dynamic rotation outputs of the IMU into the system frame.Section 3 presents a method for estimating the direction of the rotation axis using a tri-axial accelerometer and zero-velocity detection technology and analyzes the transformations between quaternions and axis-angle pairs.Section 4 provides experimental validation of the algorithm's effectiveness.Finally, conclusions are summarized in Section 5.

Modeling
The coordinate systems are defined as follows.Earth coordinate system O, O x and O y lies in the horizontal plane, with O x pointing east and O y pointing north.O z is perpendicular to the horizontal ground and points upward.
The inertial measurement unit coordinate system, I, corresponds to the three axes of the accelerometer's sensitive axis.
The HAMS coordinate frame, S, has its geometric center as the origin.The x-axis points forward, the y-axis points to the right, perpendicular to the x-axis, and the z-axis is perpendicular to the plane formed by x and y.
The relationship between the system coordinate system and the IMU coordinate system as shown in Figure 1.
The inertial measurement unit is placed inside the system, and its measurement axis has a small angular error with the outer frame of the system.Therefore, need to calibrate the small angle error between the system coordinate S and the inertial measurement unit coordinate system I, and convert the dynamic rotational inertial measurement output to the output of the overall.The relationship between the acceleration in the system coordinate system and the IMU coordinate system can be inferred as Formula (1).
R S I denotes the rotation matrix of the IMU coordinate system I rotated to the HAMS coordinate frame S.

I(S)
IMU HAMS With the accelerometer stationary, rotate around the x-axis of the system.According to Formula (1), the following can be derived: where v S x and v I x represent the coordinates of the rotation axis x in the HAMS coordinate system S and the inertial measurement unit coordinate system I, respectively.
At the initial moments, we can obtain the initial matrix in the HAMS coordinate system I: Then, at time t, assuming that a S 0 = [a S x 0 , a S y 0 , a S z 0 ], the acceleration in the HAMS coordinate system can be expressed as: With the angle changes, the rotation trajectory is a plane perpendicular to v S x .The a S t perpendicular to v S x can be obtained at any time by cross product, which is in the same direction as the rotation axis.
After three rotations a S t 11 , a S t 12 , a S t 13 can be obtained three time instants.Then, According to Equation (2), we can obtain: According to Equation ( 6), the first column vector of R S I can be obtained, which is v I x .
Next, repeat the above steps to obtain the other two column vectors of the rotation matrix R S I , which is v I y for rotation about the y axis, and v I z for rotation about the z axis.
According to the definition Therefore, according to Formulas ( 6)-( 11) the small angle transform matrix from the inertial unit to the device frame R S I can be obtained: This section has derived the coordinate transformation matrix from the IMU coordinate system to the HAMS coordinate frame, which allows for the conversion of outputs from the inertial measurement unit into the system coordinate framework.

Algorithm Design
The entire angle measurement process involves estimating the rotation axis direction to construct the prediction model and the measurement model, and using the relationship between quaternions and axis-angle pairs to calculate the rotation angle.Figure 2 shows the block diagram of the angle measurement algorithm.

Zero Velocity Update
When using accelerometers for posture estimation, the precision of angle measurement by the accelerometer can be affected by other accelerations.Given the limitations of its dynamic performance, accurately identifying a static state becomes crucial [24].Therefore, ZUPT technology is applied to determine whether an object is in a stationary state.
In the ZUPT algorithm, Wagstaff [25] proposed an adaptive threshold detector that optimizes the zero-velocity threshold by analyzing the characteristics of acceleration and angular velocity data under different motion patterns.This method can dynamically adjust the threshold according to changes in the motion state, adapting to various motion conditions and environments.
Considering that the main focus of this study is the rotation of a movable surface around a fixed axis, including both uniform and variable-speed rotation, the determination of thresholds may vary between the uniform and variable-speed rotation phases.Therefore, we propose a method of adaptive zero-velocity detection based on accelerometers and gyroscopes.
In the initial production stage, a segment of stationary time is collected for both accelerometer and gyroscope data.The magnitudes of the collected acceleration and angular velocity data, denoted as |a k | and |ω k |, respectively, are calculated.Initial thresholds thamin, thamax, thωmin, and thωmax are set.The variance of the collected acceleration magnitude, ζ 2 a = vart k a k t , is computed, and an initial threshold th ζ a is established.For a stationary state, for both the accelerometer and gyroscope, their thresholds and variances satisfy: Table 1 shows the initial threshold settings.In subsequent stages, accelerometer data a k and gyroscope data ω k are collected in a loop, where k represents the time step index.The most recent N samples constitute a sliding window ak − N + 1, . . ., ak and ωk − N + 1, . . ., ωk.For each sample, the acceleration error term is calculated as e k = |ak − g| 2 , and the gyroscope error term as f k = |ωk| 2 .The weighted mean of errors within the sliding window is computed as For data samples satisfying the stationary status, the acceleration error term e k and gyroscope error term f k are calculated.Using maximum likelihood estimation, the distribution parameters of the acceleration and gyroscope error terms, namely µ e , σ 2 e , µ f , and σ 2 f , are estimated.Based on the estimated parameters, thresholds th amin , th amax , and th ωmax are updated to adapt to the current motion state.
Selecting a sample that transitions from a stationary state to uniform rotation and then back to a stationary state, Figure 3 illustrates the variation in acceleration data, with fluctuations observed over a specific time period.Areas of low fluctuation indicate the object's stationary state.The part enclosed by the dashed box in the figure.Displaying the corresponding changes, Figure 4 reveals areas of low fluctuation in gyroscope data, corresponding to the presence of a stationary state, similar to the acceleration data.Directly presenting the rotation angles calculated after data processing, Figure 5 clearly shows that the angle changes corresponding to the stationary state are very small, intuitively demonstrating the working principle and effect of ZUPT.

Estimating the Rotation Axis
In the study of angle estimation for single-axis rotational motion, accurate estimation of the rotational axis's attitude is a fundamental and critical step.Currently, most data fusion algorithms are based on a fixed and visible rotation axis, imposing stringent requirements on the installation of angle measurement devices.Therefore, this section proposes a method for estimating the rotation axis that does not depend on the installation position, effectively avoiding the impact of installation errors.
Define the z-axis of the moving plane coordinate system C as the axis of rotation, as shown in Figure 6.v C and v S represent the directions of the rotation axis in the moving plane coordinate system C and in the HAMS coordinate system S, respectively.
When the accelerometer is in a stationary state, the initial matrix of the moment of the moving plane rotating around the rotation axis can be obtained at the initial moment: Then, after a time t, the acceleration can be expressed as: Similarly to the aforementioned calibration method, based on Formulas (2)-( 5), rotating the moving plane around the rotation axis three times can yield v S , which is the direction of the rotation axis in the HAMS coordinate system.

Attitude Solution
In the field of attitude estimation, Hamilton quaternions are widely used to represent rotational states.Theoretically, axis-angle pairs can be derived from quaternions, leading to the calculation of rotation angles.However, rotation angles derived directly from a single element of a quaternion often fail to meet the accuracy required for practical applications, because using a single element from the quaternion to solve for the rotation angle does not accurately reflect the relationship between the rotation angle and the quaternion, and the estimation of the rotation angle is highly sensitive to the rotation axis [26].Therefore, this section will delve into the analysis of the relationship between quaternions and axis-angle pairs, aiming to achieve precise estimation of rotation angles by reducing noise interference.
This paper utilize Hamilton quaternions q to represent the state of rotation.A quaternion is composed of a real number and a vector, represented as follows: In this representation, q 0 denotes the real number, while u = [q 1 , q 2 , q 3 ] T represents the vector component.

Rotational Axis Transformation
Based on the rotational axis obtained from Formula (19), it needs to be converted to the rotational axis in the Earth-fixed coordinate system.Therefore, we need to utilize the initial quaternions q obtained from the system device and calculate the rotational axis in the Earth-fixed coordinate system using Formulas ( 21) and (22).

The Relationship between Quaternions and Axis-Angle Pairs
After filtering the obtained quaternions, calculate the angles.Substitute the rotational axis v O obtained from Formula ( 22) into Formula (20) and simplify the expression.This process yields the expressions for four rotation angles as demonstrated in Formula ( 23).θ = 2 arctan 2 1 3 where v x , v y , and v z are the three components of the axis of rotation pose estimation v S .When using the aforementioned formula, it is necessary to use the derivatives of the rotational components, and if the component of the axis of rotation is small or even 0, this will cause the estimated value of the angle to be distorted, so it is necessary to filter out the component when solving.Introduce the gain component γ.
Convert Formula (23) to: where arctant2 is a function used to calculate the angle θ for any point (x, y), returning an angle value ranging from −180 • to 180 • .According to Formula (24), if a component of the estimated rotational axis v O does not meet the criterion during the process of solving for the rotation angle, that component will not be incorporated into the equation for solving the rotation angle.Appropriate thresholds need to be selected, as improper threshold selection, as shown in Figure 7, can result in significant distortions in certain angle calculations.
Formula (25) will resort to utilizing the more reliable rotational axis estimation v O component to solve for the rotation angle, where the calculated rotation angle becomes the final rotation angle.

Experiments and Discussions
In this section, the precision three-axis turntable (SGT320E from China Aviation Industry Corporation, Beijing, China) is used to simulate single-axis rotational motion.With an accuracy of 5 arcseconds, this precision three-axis turntable is highly suitable for applications requiring high-precision inertial attitude sensors, providing actual reference data for rotation angles.In both dynamic and static performance experiments, and taking the angles measured by SGT320E as references, the rotation angles calculated by the method proposed in this paper are compared with the rotation angles obtained using the IOE method [23].To better validate the effectiveness of the proposed method in estimating rotation angles and axis attitudes during single-axis rotational motion, a low-cost high-precision angle measurement system (High Precision Angular Measurement System, HAMS) based on sensor fusion is designed and implemented.It is compared with the currently available Ellipse2-N (a compact, high-precision Attitude and Heading Reference System (AHRS)) (VectorNav: Dallas, TX, USA) in Figure 8.The Ellipse2-N device can provide measurement accuracies of 0.1°for roll and pitch, and 0.8°for yaw [27,28].Through comparison, we can evaluate the accuracy and reliability of the proposed method.

Static Performance Experiment
In the research presented in this paper, static performance experiments are a crucial component, used to validate and assess the stability and accuracy of algorithms in the absence of external dynamic inputs [25].Such experiments are particularly important for applications requiring precise angle measurements over extended periods.
In static experiments, controlled disturbances are intentionally introduced during rotation to simulate uncertain factors present in reality.These disturbances are designed to take various forms, including mechanical vibrations, temperature fluctuations, and electromagnetic interference.In this study, mechanical vibration is utilized to assess the applicability and robustness of the proposed method.In each experiment, as depicted in Figure 9, disturbances are introduced after the rotation reaches the set angular velocity and gradually reduced over time until the system comes to a complete stop, allowing it to return to its static state.
The data comparison plot in Figure 10 demonstrates a high consistency between the proposed method and the IOE method [23] regarding angle measurements during rotation and disturbance.After the dynamic disturbance, both methods show a return to the static state, indicating that the proposed method can provide more precise measurement results.Figures 11 and 12 further illustrate the measurement errors of the proposed method and the IOE method [23].From Figure 12, it can be observed that although the proposed method initially exhibits an error greater than 0.1°at the start of rotation, the error gradually decreases over time and stabilizes, indicating good accuracy in adapting to disturbances and returning to the static baseline.In contrast, the error of the IOE method, as shown in Figure 11, quickly peaks at the beginning of the experiment, suggesting sensitivity to initial conditions.When disturbances are introduced, the system requires time to stabilize, with the final error stabilizing at around 0.16°.Table 2 provides a comparison of the static experimental data between the IOE method and the proposed method.The results show that the proposed method yields a lower error and RMSE in comparison to the IOE method.

Dynamic Characteristic Experiment
Dynamic performance experiments involve assessing the algorithm's responsiveness under changing temporal conditions.As evident from the angular velocity data in Figure 13, significant fluctuations occur, providing a dynamic backdrop for evaluating the measurement methods.From Figure 14, it can be observed that both the proposed method and the IOE method [23] can track the true values with good consistency, indicating that the proposed method effectively captures the trend of angle changes.From the enlarged section, it can be observed when the angle reaches its peak, both the method and the proposed method exhibit smaller fluctuations in estimated angles, resulting in smoother variations.In Figures 15 and 16, the results show that the estimation error of the IOE method remains around 0.2°for the majority of the regions, indicating good stability.However, towards the end, the IOE method exhibits a significant error spike, suggesting over-reliance on gyroscopic data and the phenomenon of gyroscopic error accumulation.The maximum estimation error reaches 0.4°.The errors of the proposed method primarily concentrate within a range of 0.3°.Table 3 provides a comparison of the dynamic experimental data between the IOE method and the proposed method.The results indicate that the proposed method exhibits some improvement in error and RMSE compared to the IOE method.

Experimental Features of the System
In the system experiment, a high-precision angular measurement system (HAMS) based on sensor fusion at low cost was designed and implemented.Angle estimation for single-axis rotation was conducted based on the method proposed in this paper, and compared with a compact, high-precision Attitude and Heading Reference System (AHRS).The angular variation data in the experiment is shown in Figure 17.
In Figure 18, the AHRS racks the reference angle more closely than the HAMS.In Figures 19 and 20, the HAMS designed in this paper exhibits larger variations in error, staying within 0.5°.However, it demonstrates better performance in the final static state with smaller errors compared to AHRS, indicating the superior static performance of HAMS.The AHRS maintains relatively consistent errors of less than 0.1°for the majority of the time, but towards the end, due to the phenomenon of gyroscopic error accumulation, the error exceeds 0.3°.Table 4 lists the error and root mean square error (RMSE) data for both AHRS and HAMS.Although HAMS has higher error values, the results suggest that in certain specific scenarios, considering its low-cost design, it may still exhibit acceptable performance.

AHRS HAMS
Experimental tests compared with the IOE method demonstrate the effectiveness of the approach proposed in this paper, particularly in enhancing static measurement performance.Compared to costly AHRS devices, the HAMS designed according to the method in this paper significantly reduces costs while maintaining a measurement accuracy of 0.5°for dynamic error and 0.15°for static error.This makes precise angle measurement feasible, even with limited budgets.Furthermore, the low-cost HAMS equipment demonstrates outstanding static measurement performance, which is crucial for industrial applications with stringent requirements for both cost and performance.

Conclusions
This study focuses on a novel method for estimating single-axis rotation angles for movable planes rotating around a fixed axis.Traditional angle measurement techniques are often limited by sensor constraints and environmental interference, leading to significant deficiencies in accuracy and stability.Moreover, existing methodologies typically rely on the strict alignment of the IMU's X axis or Y axis with the rotation axis of the measured plane.However, due to installation errors, there is often a discrepancy between the assumed and actual rotation axes, resulting in a significant deviation between the measured and true angles [29].
To address the aforementioned issues, this paper proposes an innovative method for single-axis rotation angle estimation.The core innovations of this method lie in three aspects: Firstly, we introduce a novel calibration method for the installation error the inertial measurement unit, allowing effective conversion of dynamic rotational inertial measurement data to system shell output, thereby significantly enhancing the accuracy and reliability of the data.Secondly, by utilizing a combination of triaxial accelerometers and zero velocity detection technology, we accurately estimate the direction of the rotation axis, effectively eliminating the influence of the installation position on the measurement results.This ability to negate the impact of installation position gives the method high versatility, making it adaptable to a wider range of single-axis rotational angle estimation tasks.Finally, quaternion representation of rotation combined with the estimated rotation axis is employed for attitude estimation.
In the experimental section, we first compared the rotation angles calculated using the method proposed in this paper with those obtained using the IOE method [23].Static experiments demonstrates good system stability, with a maximum error of less than 0.15°.Dynamic experiments showed a maximum error of less than 0.3°, indicating that the proposed method effectively captures the trend of angle changes.To further validate the effectiveness of the method proposed in this paper in estimating the rotation angles and axis orientations of single-axis rotational motion, we designed and implemented HAMS, which was compared with the commercially available AHRS (Ellipse-2).The HAMS designed according to the method proposed in this paper maintains a measurement accuracy of 0.5° for dynamic errors and 0.15°for static errors, while significantly reducing costs.This makes it possible to perform accurate angle measurements within a limited budget.

Figure 1 .
Figure 1.The relationship between the HAMS coordinate frame S and the IMU coordinate system I.

Figure 2 .
Figure 2. The block diagram of the algorithm system.

Figure 3 .
Figure 3. Changes in acceleration data during stillness and motion.

Figure 4 .
Figure 4. Changes in angular velocity data during stillness and motion.

Figure 5 .
Figure 5. Changes in angular data during stillness and motion.

Figure 6 .
Figure 6.Schematic of the rotation axis direction in the geodetic coordinate system.

Figure 7 .
Figure 7.Comparison experiment of different thresholds for rotational components.

Figure 9 .
Figure 9. Angular velocity data in static experiment.

Figure 10 .
Figure 10.Angle comparison in static characteristic experiment.

Figure 12 .
Figure 12.Our method's error in static experiment.

Figure 13 .
Figure 13.Angular velocity data in dynamic experiment.

Figure 14 .
Figure 14.Angle comparison in dynamic characteristic experiment.

Figure 16 .
Figure 16.My Method error in dynamic experiment.

Figure 17 .
Figure 17.Angular velocity data in system experiment.

Figure 18 .
Figure 18.Angle comparison in system experiment.

Figure 20 .
Figure 20.HAMS error in system experiment.
a is the variance is measured for the acceleration within a time window of length seconds.

Table 4 .
System experimental data.