Development and evaluation of haltere-mimicking gyroscope for three-axis angular velocity sensing using a haltere-mimicking structure pair

This paper presents a three-axis biomimetic gyroscope, mimicking the haltere of Diptera. Diptera use a club-shaped mechanosensory organ called the haltere to get the three-axis angular velocity information, namely roll, pitch and yaw axes, for flight control. One pair of halteres is physically connected to the wings of Diptera that vibrate in antiphase to the flapping wings in ambient air. They sense the Coriolis force and relay angular velocity information to the Diptera. As an alternative to the conventional micro-electro-mechanical system gyroscopes which are widely used in robotics, many research groups have attempted to mimic the haltere. However, no previous study succeeded in measuring all three-axis components of angular velocity, due to various shortcomings. In this paper, we developed the first three-axis haltere-mimicking gyroscope. Two perpendicularly positioned haltere-mimicking structures that can vibrate at a 180° amplitude were mechanically integrated into a robot actuator. Two accelerometers, placed at the tip of each structure, were employed to measure the Coriolis force. The performance of the novel biomimetic gyroscope was measured in all rotational directions, using a motion capture system as the ground truth. One-axis input experiments were performed 240 times at different input magnitudes and directions, and the measured orientation error was less than ±2.0% in all experiments. In 80 three-axis input experiments, the orientation error was less than ±3.5%.


Introduction
Recently, research on biomimetic robots has been receiving significant attention [1][2][3]. Various studies in robotics are inspired by the natural mechanisms in living organisms, including birds, fish and insects [4][5][6][7]. Notably, this biomimetic research is not limited to only robots, biomimetic sensors have also been receiving considerable attention, as natural sensing mechanisms may inspire the development of new sensing technologies [8][9][10][11].
Gyroscopes, or angular rate sensors, are one such example. Specifically, various researchers have attempted to mimic the halteres of Diptera. The halteres are club-shaped mechanosensory organs that function as angular rate sensors [12][13][14][15]. They are physically connected to the wings and vibrate in antiphase to the flapping wings at a stroke amplitude of 180 • [16][17][18]. In Diptera, the campaniform sensilla, sensory organs, decode the Coriolis force to estimate the angular velocity [19][20][21].
Biomimetic gyroscopes to measure angular velocity have been studied using various approaches. Droogendijk et al [22] placed a gimbal on a bilayer suspension structure and resonated the structure using electrostatic force. However, the experiment only evaluated the natural frequency of the sensor in the driving mode, and could not measure angular velocity. In another study, Smith et al [23] employed a lead zirconate titanate (PZT)-based piezoelectric actuator to drive the gimbal and to sense the Coriolis force. However, the experiment only reported the 588 Hz vibration of the PZT actuator without any sensing results. Kilic et al [24] employed a micro-electro-mechanical systems (MEMSs) structure vibrated by a separate electrostatic comb-drive actuator and a gimbal placed on the proof mass. Although they succeeded in measuring the angular velocity under atmospheric pressure, the sensor could only measure one-axis angular velocity. Lavrik and Datskos [25] also reported a haltere-inspired gyroscope that measures the Coriolis force using laser reflection. They fabricated a Y-shaped tuning fork haltere-mimicking structure and vibrated it by a PZT stage, and the reflection of the laser was utilized to measure the Coriolis force. The research also demonstrated the possibility of optically measuring only one-axis angular velocity. In another approach, Wu et al [26] constructed a biomimetic gyroscope using a haltere-shaped rod instead of a gimbal. The PZT actuator vibrated the rod, and a strain gauge in the rod measured the Coriolis force. The experimental results showed that the gyroscope could measure oneaxis angular velocity.
Although a plethora of haltere-based biomimetic gyroscopes have been proposed, two critical challenges must be overcome to achieve an effective haltere-mimicking gyroscope. First, the existing studies did not consider employing a single mechanism to actuate the wings and halteres, which is the case in Diptera. No study has considered integrated one-step mechanisms that can simultaneously actuate the wings and halteres. If this is accomplished, a significant improvement in energy efficiency can be achieved. Secondly, no study has succeeded in measuring three-axis angular velocity, and no attempts to measure all three axes have been reported. To measure all three axes, a pair of haltere-mimicking structures is required. In addition, two conditions must be satisfied: the stroke planes of the two halteremimicking structures must not overlap, and each haltere-mimicking structure must be able to measure two-axis angular velocity.
Note that commercial MEMS gyroscopes have been widely employed in robots for localization, navigation, and motion control [27,28]. MEMS gyroscopes detect the Coriolis force on a vibrating proof mass and measure the angular velocity [29,30]. However, they have two drawbacks, which are attributed to their sensing mechanisms. First, MEMS gyroscopes employ a resonant-actuating structure to measure the Coriolis force, which continuously consumes power even when the object is stationary. Second, MEMS gyroscopes require hermetically sealed vacuum packaging to sustain a high Q factor to reduce the dissipation effect [31]; however, vacuum packaging has several disadvantages, including the trade-off between the bandwidth and sensitivity, difficult closed-loop resonance control, and limited service life due to slow leakages [31][32][33]. To address these two drawbacks, several studies have been conducted on the gyro-free inertial measurement unit to measure the angular velocity using only accelerometers without self-vibrating parts [34][35][36]. On the other hand, the proposed biomimetic gyroscope overcomes the drawbacks by mimicking the kinematics of halteres.
Herein, we propose and demonstrate a halteremimicking gyroscope where a single mechanism can actuate a pair of wings and a pair of halteres in antiphase motion. In the proposed mechanism, the halteres can be integrated with the wing structure as in Diptera, so that they can be vibrated without a separate power source. The kinematics of Diptera's haltere and the haltere's three-axis angular velocity estimation method are analyzed in detail. A prototype is designed and built with a Scotch yoke and rack-and-pinion that actuate two haltere-mimicking structures at a stroke amplitude of 180 • . Two halteremimicking structures are placed perpendicularly so that their stroke planes do not overlap. An accelerometer is placed at the tip of each haltere-mimicking structure to measure the Coriolis force and estimate the angular velocity. In the estimation step, dissipation effects are not considered because the friction and viscous damping resulting from the flapping motion do not affect the frequency and amplitude of the flapping motion, as the haltere-mimicking structures are driven by a feedback-controlled brushless DC (BLDC) motor. Experiments are conducted to evaluate the performance of the developed halteremimicking gyroscope in roll, pitch and yaw directions. A motion capture system is employed as the ground truth.

Kinematics of the haltere
Halteres of Diptera are club-shaped mechanosensory organs that measure the body angular velocity. They are physically connected to the wings and measure the Coriolis force using a campaniform sensilla, which is a sensory organ in halteres. Each haltere can decode the Coriolis force into only two axes of the body angular velocity. Therefore, in order to decode all three axes, two halteres are required. In this paper, the decoding process of the haltere is analyzed, which in turn is used to build a haltere-mimicking gyroscope capable of measuring all three axes of the body angular velocity.
Before analyzing the decoding process, the acceleration acting on each haltere is analyzed. Figure 1 shows the coordinates of three frames for analysis. The frames OXYZ, O 1 X 1 Y 1 Z 1 , and O 2 X 2 Y 2 Z 2 are the world frame, Diptera frame, and haltere frame, respectively. The point P represents the tip of the haltere that experiences the Coriolis acceleration. In addition, r 1 is the position of Diptera, r 2 is the position of the haltere attached to the Diptera, and r 3 is the position of the point P. Furthermore, ω 1 is the angular velocity of the Diptera in the world frame, and ω 2 is the angular velocity of the flapping motion of the haltere in the Diptera frame. The acceleration at the point P is as follows: a P =r 1 +r 2 +r 3 +2ω 1 ×(ṙ 2 +ṙ 3 + ω 2 ×r 3 ) + 2ω 2 ×ṙ 3 +ω 1 ×(r 2 + r 3 ) To simplify equation (1), several assumptions are used. To focus on the analysis of the haltere, the acceleration of the Diptera is set to zero as the acceleration term is independent of the others,r 1 = 0. The position of the haltere is close to zero, r 2 ≈ 0. As the position of the base of the haltere is fixed, the velocity and acceleration of the base of the haltere with respect to the Diptera frame are zero,ṙ 2 ,r 2 = 0. Moreover, as the position of the point P is fixed, the velocity and acceleration of the point P with respect to the Diptera frame are zero,ṙ 3 ,r 3 = 0. For the last assumption, the angular acceleration of the Diptera is negligible, because the angular acceleraion of the Diptera is smaller than that of the haltere,ω 1 = 0. Using these assumptions, equation (1) can be simplified as equation (2): In figure 2(a), the sphere represents the point P in figure 1. The position of the point P with the angle of the haltere can be expressed by sine and cosine, r 3 = (r 3 sin θ, r 3 cos θ, 0) T . Using r 3 , equation (2) can be expressed as follows: Because the angular velocity of the haltere is greater than the angular velocity of the Diptera, equation (3) can be simplified as follows: In figure 2(a), the sphere has three arrows pointing in the tangential, radial, and perpendicular directions. The red arrow in the tangential direction points in the driving direction, while the green arrow in the radial direction points in the direction of the angular velocity of the Diptera. The blue arrow in the perpendicular direction points in the direction of the Coriolis acceleration. The instantaneous velocity in the tangential direction and the angular velocity of the Diptera in the radial direction generate the Coriolis acceleration in the perpendicular direction. The direction of the angular velocity changes with the angle of the haltere, and this relationship is expressed in the third row of equation (4).
The Coriolis acceleration of the haltere contains the two-axis angular velocity of the Diptera, ω 1x , ω 1y . Let ω 2 cos θ and ω 2 sin θ be the modulating signals of ω 1x and ω 1y , respectively; then, the third row of equation (4) is the sum of the modulating signals of ω 1x and ω 1y . This signifies that ω 1x and ω 1y can be estimated by demodulation. Sensitivities of the demodulated signals, ω 1x and ω 1y , will be different because the amplitudes of the modulating signals are different. For demodulation, a sine wave that has the same frequency and phase as the modulating signal is required. The frequency of the modulating signal is determined by the vibration frequency of the haltere. In addition, the phase of the modulating signal is estimated using the acceleration in the tangential direction because the dominant component of acceleration in the tangential is the angular acceleration of the haltere. Figure 2(b) presents the relationship between the angular velocity of the Diptera and that of the two halteres. When the stroke planes of the two halteres do not overlap, the roll, pitch and yaw directions angular velocity of the Diptera can be estimated by equation (5):

Structure of the haltere-mimicking gyroscope
Inspired by the integrated one-piece mechanism of the haltere, the proposed haltere-mimicking gyroscope is designed to have the robot actuator physically connected to the haltere-mimicking structure. The BLDC motor, commonly used as robot actuators, is selected as the actuator for the haltere-mimicking gyroscope. To mimic the haltere motion, the halteremimicking structure should exhibit sinusoidal flapping motion with a 180 • stroke amplitude in two different stroke planes. This structure is implemented by combining the Scotch yoke and the rack-andpinion based on laboratory prototypes. The Scotch yoke converts the rotational motion of the motor into translational motion with sinusoidal speed, while the rack-and-pinion converts translational motion to flapping motion. The rack is designed to be tilted to avoid overlapping the stroke planes of the two haltere-mimicking structures. Figure 3(a) illustrates the model shape and the principal axes of the haltere-mimicking gyroscope. Figure 3(b) illustrates the motion of the haltere-mimicking structure with different stroke angles. The relative velocity of the tip of the haltere-mimicking structure is at its maximum in figure 3(d) and at its minimum in figures 3(c) and (e). The actual stroke amplitude is slightly less than 180 • to avoid collision between the halteremimicking structure and the support.
To transmit the acceleration data of the halteremimicking structure to a computer, wireless communication is used for noise reduction. Figure 4 displays the printed circuit board (PCB) of the model,  which contains an accelerometer, a microcontroller unit (MCU) and a WiFi module. The PCB is a halteremimicking structure, and the accelerometer is placed at the tip of the PCB to maximize the Coriolis acceleration. The PCB is custom-made based on Arduino Nano 33 IoT. The axes of the inertial measurement unit (IMU) are presented in figure 4. The x-axis data of the accelerometer are used to measure the driving acceleration in the tangential direction, and the z-axis data of the accelerometer are used to measure the Coriolis acceleration in the perpendicular direction.

Angular velocity estimation
The angular velocity is estimated from the Coriolis acceleration of the haltere-mimicking structure, and this process is illustrated in figure 5. The accelerations in the tangential and perpendicular directions are used for estimation. Both signals are filtered by a bandpass filter (BPF), which removes the acceleration of the robot and various noises except for mechanical noise related to the flapping motion of the halteremimicking structure. Then, the acceleration in the tangential direction is used to generate the sine wave signal in phase with the modulated angular velocity signal. The acceleration in the perpendicular direction is multiplied by the generated sine wave, and the low pass filter and amplifier are then performed to estimate the angular velocity.
Because the angle of the haltere-mimicking structure can be expressed as θ = π 2 sin(2πft), ω 2 cos θ has the frequency of the flapping motion of the haltere-mimicking structure, while ω 2 sin θ has twice the frequency of the flapping motion of the halteremimicking structure. The resonant frequency of the BPF is equal to the frequency of the modulating signal. Because the frequencies of the modulating signals are different, ω 1x and ω 1y can be estimated separately.
There are two sources of dissipation. The first source is friction in the Scotch yoke and rack-andpinion during operation. The second source is viscous damping that occurs during the flapping of the haltere-mimicking structure in air. The second source in the experiments is small, because the halteremimicking structure is on the order of 10 cm. Furthermore, the friction of the Scotch-yoke and rackand-pinion and the small viscous damping do not affect the frequency and amplitude of the flapping motion in our experiments, because the halteremimicking structures are driven by a feedbackcontrolled BLDC motor. Therefore, the proposed biomimetic gyroscope does not need to consider the dissipation effects in the angular velocity estimation section.

Simulation of the kinematic model
Simulations were performed to evaluate the kinematic model of the haltere and the hardware of the proposed haltere-mimicking gyroscope. In sections 2.1 and 2.3, we demonstrated that each haltere-mimicking structure can decode the Coriolis acceleration into two-axis angular velocity. Figure 6 presents the simulation results of the acceleration of the haltere-mimicking structure in the perpendicular direction. For the simulation, equation (3) was slightly rearranged by changing the frame from a fixed frame to a variable frame that was aligned with the haltere-mimicking structure. The equation used for the simulation is as follows: 1,perpendicular 2ω 1,radial ω 2 + ω 1,radial ω 1,perpendicular   .
As the frame is rotated with the halteremimicking structure, ω 1,radial , ω 1,tan gential and ω 1,perpendicular are the angular velocity of the body in the radial, tangential, and perpendicular directions, respectively, and their values change depending upon the angle of the haltere-mimicking structure, despite the fact that the angular velocity of the body is constant. Figure 6(a) presents the simulation results of the Coriolis acceleration when ω 1x is zero and ω 1y is present. The frequency of the Coriolis acceleration is equal to the frequency of the flapping motion of the haltere-mimicking structure. Figure 6(b) presents the simulation results of the Coriolis acceleration when ω 1x is present and ω 1y is zero. The frequency of the Coriolis acceleration is twice the frequency of the flapping motion of the haltere-mimicking structure. Lastly, figure 6(c) presents the simulation results when both ω 1x and ω 1y are present.
The simulations were used to evaluate the proposed haltere-mimicking gyroscope by comparing the theoretical and experimental values. Figure 6 presents the simulation and experimental results of the acceleration of the haltere-mimicking structure in the tangential and perpendicular directions when the body is rotated at 90 • s −1 . Figures 6(d) and (e) present the simulation and experimental results of the acceleration in the tangential direction, respectively, while figures 6(f) and (g) present the simulation and experimental results of the acceleration in the perpendicular direction, respectively. The experimental results in the perpendicular direction differ from the simulation results due to noise, whereas the experimental results in the tangential direction are similar to the simulation results. This comparison demonstrates that the effect of noise in the perpendicular direction is greater than in the tangential direction.
Comparing the simulation and experimental results shows that noise is important in angular velocity estimation. Theoretically, noise in the perpendicular direction can be classified into three categories: (a) noise in a different frequency from that of the modulating signal, (b) noise in the same frequency as that of the modulating signal in antiphase, and (c) noise in the same frequency as that of the modulating signal in phase. The first and second types of noise can be eliminated by the BPF and demodulation process, respectively. However, the third type of noise cannot be removed by the angular velocity estimation algorithm. Therefore, the hardware of the haltere-mimicking gyroscope must be fabricated to minimize this type of noise as much as possible.

Experiment setup
Experiments were conducted to evaluate the halteremimicking gyroscope. The motion capture system illustrated in figure 7 was used to measure the exact orientation of the robot and evaluate the performance of the haltere-mimicking gyroscope. Eight motion capture cameras (Vantage V5, Vicon) were used in the experiments, and the Vicon tracker program estimated the position and orientation of the markers with high accuracy (i.e. less than 0.5 mm error). Therefore, the orientation measurement of the motion capture system was used as the ground truth for evaluation. The developed haltere-mimicking gyroscope was placed on the robot (Pioneer 3DX, Omron Adept) and used to measure the robot's angular velocity. Figures 8 and 9 illustrate the experimental setup of the robot and the developed haltere-mimicking gyroscope. Pioneer 3DX was used as the robot platform. As the robot was rotated only around the yaw direction, the cubic aluminum box was used to align the testing direction of the haltere-mimicking gyroscope with the yaw direction of the robot. Figures 8(a)-(c) display the experimental setup to evaluate the oneaxis estimation capability of the haltere-mimicking gyroscope experiencing angular velocity in roll, pitch and yaw directions respectively. Using this setup, the gyroscope performance could be evaluated for each isolated rotation axis. Figure 9 shows a different aluminum box which is designed for the experimental setup to evaluate the three-axis (roll-pitch-yaw direction) estimation capability of the haltere-mimicking gyroscope that simultaneously experiences angular velocity in all of the roll, pitch and yaw directions. Since the Vicon system tracked the orientation of the robot, the estimated angular velocity of the halteremimicking gyroscope should be converted into the orientation of the robot for evaluation.
For performance evaluation, 320 datasets were generated. In each dataset, the robot was rotated 360 • . The angular velocity of the rotation was set to 30 • s −1 , 60 • s −1 , 90 • s −1 , and 120 • s −1 , and the robot was rotated clockwise and counterclockwise. The halteremimicking gyroscope was placed to test roll, pitch, yaw and roll-pitch-yaw directions. The datasets were generated by repeating the rotation 10 times for each condition.

Experiment results and discussion
The experimental results are all presented in tables 1 and 2, and an example of the experimental results of orientation estimation is provided in figure 10. As the total number of datasets was 320, the root mean square (RMS) of the orientation error for each case is presented in the tables. Because the rotation angles of the robot were not identical, the orientation error rate was used to evaluate the haltere-mimicking gyroscope.
In theory, the sensitivity of the roll direction is lower than that of the pitch and yaw directions, whereas the sensitivities of the pitch and yaw directions are equal. In the experimental results of oneaxis estimation, the RMS of the orientation error rate on the yaw direction was the lowest, as expected. However, the RMS of the orientation error rate on the pitch direction was similar to that on the roll direction. In the experimental results of threeaxis estimation, the RMS of the orientation error rate was similar on all axes. In the experimental results of one-axis estimation, the RMS of the orientation error rate for both directions was similar.   However, in the experimental results of three-axis estimation, the RMS of the orientation error rate for the clockwise angular direction is slightly smaller than for the counterclockwise angular direction. From the experimental results, the cross-axis sensitivities of roll, pitch and yaw direction are 2.9%, 2.9% and 3.7% respectively, calculated by the root mean square. Overall, the orientation error rates in one-axis estimation were lower than that in three-axis estimation, and the measured orientation error rates in all experiments were less than ±3.5%.
Diptera use two sensory organs to estimate orientation: compound eyes and halteres [38][39][40][41]. Compound eyes are mainly used to estimate orientation at a low angular velocity, whereas halteres are mainly used to estimate orientation at a high angular velocity [40,41]. This indicates that the sensitivity of the haltere for measuring low angular velocity is lower than for measuring high angular velocity. In the experimental results, the orientation error rate was usually large when the angular velocity of the robot was low. It demonstrates the limitations of the haltere model at low angular velocity.
The detailed specifications of the developed haltere-mimicking gyroscope are presented in table 3, and the settings of the utilized accelerometer are listed in table 4. The overall system power consumption of a commercial IMU (LSM6DS3, STMicroelectronics) is 0.9 mA, and the power consumptions of the  Figure 10. Example of the results of orientation estimation in the yaw direction experiment when the robot is rotated counterclockwise at 120 • s −1 . The green line represents the ground truth robot orientation measured by the motion capture system (Vicon), while the blue line represents the orientation estimation using the developed haltere-mimicking gyroscope.  accelerometer and gyroscope built in the IMU are 0.07 mA and 0.83 mA, respectively [37]. The power consumption of the gyroscope is calculated by subtracting the power consumption of the accelerometer from the total power consumption of the IMU. The measurement range of the sensor is a theoretical value based on each scale factor. Since the roll direction sensitivity was the lowest, as expected, the roll direction had a wider measurement range but lower resolution than the other directions. The dynamic range of the roll direction was lower than that of the other directions due to the high density of noise. The nonlinearity of all directions was less than ±1%. Since the nonlinearity specified in the datasheet of the utilized commercial accelerometer was less than ±1%, the nonlinearity results of the gyroscope were considered to be at the same level as that of the accelerometer. The developed gyroscope had the same power consumption as the two accelerometers used at 0.14 mA, which represents approximately 17% of the power consumption of commercial gyroscopes.

Conclusion
In this paper, we developed a novel halteremimicking gyroscope that can measure three-axis angular velocity. Numerous attempts have been made to mimic the haltere; however, no study succeeded in measuring the three-axis angular velocity of a robot. This is primarily attributed to the following two reasons: first, the existing studies failed to consider that the two haltere-mimicking structures must move in non-overlapping stroke planes; second, the stroke amplitude of the haltere-mimicking structure was not large enough to estimate the two-axis angular velocity. We solved these problems using two perpendicularly positioned haltere-mimicking structures that move at a 180 • stroke amplitude. The performance of the developed novel biomimetic gyroscope was measured by the one-axis and three-axis angular velocity, and the orientation error rates were less than ±3.5% in all experiments. In conclusion, the developed haltere structures can be utilized in biomimetic robots with a wing structure as in Diptera. This allows the haltere structures to actuate only when the robot body is in motion. Therefore, this configuration truly biomimics the haltere and requires no power when the robot is stationary. Although extensive research efforts are still required for practical applications, we successfully developed the three-axis haltere-mimicking gyroscope for the first time.

Data availability statement
All data that support the findings of this study are included within the article (and any supplementary files).