QDR: A Quadrotor Dead Reckoning Framework

Quadrotors are used for variety of applications both outdoors and indoors. Among them are - deliveries, surveillance, transportation, mapping and more. To accomplish its tasks an accurate navigation solution is required. To that end, most quadrotors apply fusion between an inertial navigation system and other external sensors, such as global navigation satellite systems (outdoors) or vision (indoors/outdoors). Due to environmental or sensor constraints, in some portion of the trajectory, the navigation solution relies only on the inertial navigation system solution. Consequently, the navigation solution drifts in time due to errors and noise in the inertial sensors measurements. Motivated from the pedestrian dead reckoning approach, we propose the quadrotor dead-reckoning framework to mitigate the navigation solution drift in situations of pure inertial navigation. There, instead of a straight line trajectory, the quadrotor is flown with a periodic motion to enable peak to peak distance estimation. Simulation and experiments results show that the proposed approach greatly improves the accuracy of the navigation solution.


I. INTRODUCTION
Quadrotors are used for a growing variety of applications both for outdoor and indoor environments. Among them are -industrial use, military applications, construction field, surveillance, transportation, mapping, emergency response and law enforcement in public areas. For example, in industrial and contraction fields, the quadrotors are used to examine the condition of machinery, structures or infrastructures located in remote areas or at considerably high altitude. In the transportation field, quadrotors are used to patrol certain areas, for deliveries, and even for data collection [1]. As mentioned in [2], quadrotors are used for surveillance of buildings, covering large indoor areas that are difficult to access on wheels or by foot. In the mapping field, quadrotors are used for image recognition and mobile 3D mapping, where the quadrotor takes pictures of certain area to build a virtual 3D model of it [3]. In emergency cases quadrotors are used for rescue missions in buildings after natural disasters or terror attacks [4]. In [5], [6], quadrotors are employed for grasping objects during flight -or more specifically -grasping and retrieving objects while hovering, combining terrestrial robot manipulation capabilities with the range, speed and vertical workspace of flying vehicles.
The associate editor coordinating the review of this manuscript and approving it for publication was Lubin Chang .
Quadrotors requires an accurate navigation solution to accomplish the challenging tasks assigned to them. Outdoors, quadrotor navigation is commonly based on global navigation satellite systems (GNSS) readings which provides position and velocity information [7]. On the other hand, GNSS is not available for indoor environments, which leads to different types of navigation solutions such as simultaneously localization and mapping (SLAM) [8], [9],visual positioning [10], [11], [12] and inertial navigation system (INS) fusion with other sensors such as Wi-Fi [13], [14].
In SLAM the goal is construction and updating a map of an unknown environment while simultaneously keeping track of the platform's location within it. In order to apply SLAM a visual sensor is used for feature extraction. Yet, in some situations visual conditions are not sufficient, thus disabling SLAM applications and usually resulting in pure inertial navigation. A solution, that rapidly drifts in time. The same phenomena occurs in visual positioning approaches which uses a visual sensor to capture an image and compare it to a database of images in order to determine the position of the quadrotors. Other approaches like INS/WiFi fusion require installation of hardware and sometime also knowledge of their exact location. Also, in outdoors GNSS is not always available like in urban canyons and other environments and again the quadrotors navigation solution will depend only on the INS solution and hence will drift in time. VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ Hence, indoors or outdoors, in many situations the navigation solution of the quadrotors is based on the INS solution known as pure inertial navigation. There, due to errors and noise in the inertial sensors measurements, the navigation solution will drift in time [15].
Pure inertial navigation leads to externally large errors also in smartphone based indoor navigation. One of the common approaches to mitigate such drift, is pedestrian dead reckoning (PDR) [16]- [19]. A classical PDR algorithm is usually defined in an horizontal plane and has four parts: 1) Step detection: the pedestrian steps are detected using accelerometer measurements [20] 2) Step length estimation: the pedestrian step-length can be determined using several approaches such as empirical formulas [21], [22] or deep learning [23] 3) Heading determination: the user walking direction is obtained from the gyroscope and/or magnetometer readings [24], [25] 4) Position update: the current user position is found giving initial conditions, heading estimation and step length estimation. Thus, in the PDR approach, only the accelerometers readings are used to determine the step length, i.e., the user change in distance.
In this paper, we propose a framework for quadrotor navigation based only on inertial sensors -quadrotor dead-reckoning (QDR). Motivated from the PDR approach, we adopt PDR principles for quadrotor's navigation. To that end, in situations of pure inertial navigation, emulation of a walking user motion is applied to quadrotors instead of moving in a straight line. In that manner, similar to step-length detection and estimation in PDR, the peak to peak change in distance of the quadrotor is estimated. Simulation and experimental results shows the contribution of the proposed approach to the navigation accuracy.
The rest of the paper is organized as follows: Section II presents the INS equations of motion, and traditional PDR approach. Section III, present the proposed QDR approach, Section IV describes the simulations and experiments results and Section V gives the conclusions.

II. PROBLEM FORMULATION A. INERTIAL NAVIGATION SYSTEMS
The INS equations of motion requires initial conditions and the inertial sensors readings to output the navigation solutionposition, velocity and attitude.
Let the gyroscopes measurements, i.e., the angular velocity vector, ω b ib , be denoted as and the accelerometer measurements, i.e., the specific force vector, f b ib , as where i stands for the inertial frame and b for the body frame. The INS equations of motion for a local navigation frame, neglecting the earth turn rate, are given by [15]: where p n is the position vector expressed in the local navigation frame, v n is the velocity vector expressed in the navigation frame, g n is the local gravity vector expressed in the navigation frame, b ib is a skew-symmeric form of the angular velocity vector and T n b is the transformation matrix from body to navigation frame given by: where S x is the sine of x and C x is the cosine of x.

B. PEDESTRIAN DEAD RECKONING
As shown in Figure 1, a classical PDR algorithm has four major parts: step-detection and estimation, heading determination and position update. Given the pedestrian initial position x k , y k at time k, the current step length s k and heading ψ k , the user position at time k + 1 given by: Yet, before the step-length can be estimated and used in the above equations, a step event needs to be determined. One of the common ways to detect a step is by using a peak detection algorithm [16], commonly based on the acceleration magnitude value threshold and minimum step period. A step is then defined between two successive peaks. One of the common approaches to estimated the step-length is the Weinberg's approach [21]. It is based on the amplitude of the vertical acceleration during the step (here, the measured specific force magnitude is used) and is given by:  where G w is a gain which needs to be calibrated prior to PDR application. In order to calculate G w the user needs to walk across a known distance which is equal to the step-lengths sum. Thus, given the accelerometers measurements and known walking distance, the gain can be calculated by using (9).

III. METHODOLOGY
Motivated from the PDR approach, we adopt PDR principles for quadrotor's navigation and propose the QDR framework.
To that end, in situations of pure inertial navigation, emulation of a walking user dynamics is applied to the quadrotor motion instead of moving in a straight line. In that manner, similar to step-length detection and estimation in PDR, the change in distance of the quadrotor is estimated. This illustrated in Figure 2, where currently for a straight line scenario in situations of pure inertial navigation, the quadrotor will maintain its flight as close as possible to the desired straight line. Yet, in the proposed approach for pure inertial navigation the quadrotor trajectory will resemble a sine wave (or any other periodic motion) in order to apply the proposed QDR approach. That is, a trade-off is made between quadrotor energy (battery life) to enhanced navigation capability (accuracy). Since short-time periods are considered, probably the latter will be preferred in many scenarios.
The proposed QDR framework, as well as the traditional INS approach, are illustrated in Figure 3. There, using accelerometers during the quadrotor motion (sine type trajectory) peaks can be detected in standard methods as in PDR.
Once the peaks are recognized, peak to peak distance can be calculated using, for example, the Weinberg approach or any other relevant PDR step length estimation approach [26], [27]. The attitude of the quadrotor is calculated in the same manner as in traditional INS using (5). Instead of using (3), we calculate the quadrotor's horizontal position only, using where d k is the peak to peak distance estimated using Weinberg approach and f b p2p is the set of all specific force magnitudes in the peak to peak duration.
As in the PDR framework, to determine the Weinberg gain G w , the quadrotor should be flown to a known distance with the required periodic motion. Also, as in PDR, to maintain a high accuracy level, each different periodic motion requires a different gain value. However, PDR is only applied in the vertical plane due to the human walking gait characteristics. In quadrotors, there is no such limitation and periodic horizontal motion can also be applied. Therefore, two scenarios are considered for the application of QDR: 1) Horizontal QDR (HQDR): the periodic motion is applied in the horizontal x-y plane while the altitude of the quadrotor remains constant. 2) Vertical QDR (VQDR): the periodic motion is applied in the vertical z-x plane while the y-axis position component of the quadrotor remains constant. In some situations, the magnitude of the maneuver is small compared to the local gravity vector value. Thus, the periodic motion will not be detectable using the specific force magnitude and as a consequence, the peak to peak distance (12) cannot be determined. In such cases, instead of the specific force magnitude set, f b p2p , only the relevant accelerometer axis showing the maneuver should be used. For example, if the accelerometer frame is aligned with the navigation frame and low acceleration is sensed in HQDR scenarios, the y or x axis accelerometer readings should be used instead of the specific force magnitude.

A. SIMULATION
Herein, both HQDR and VQDR are evaluated by simulation. To that end, the body frame acceleration and angular velocity vectors required for QDR periodic motion are defined using a simplified kinematic model. For VQDR: where a b VQDR is acceleration vector expressed in the body frame, a xz is the amplitude and ω VQDR is the angular velocity.  In the same manner for HQDR: where a xy is the amplitude and ω HQDR is the angular velocity.
Utilizing (13) at a sampling rate of 100 Hz. To generate the noisy accelerometer measurements, constant bias of 30 mg and a velocity random walk of 300 µg/ √ Hz were added to the nominal accelerometer readings (equal in each axis). As for the gyroscopes, it is assumed ideal gyroscopes measurements in the simulation analysis, since the purpose of it is to examine the feasibility of the proposed QDR approach. In the following subsection, field experiments results with real recorded accelerometers and gyroscopes data are addressed and analyzed for QDR and INS approaches. The simulation, generated IMU readings, are used to obtain the classical INS solution (3)-(5) and QDR solution (10)- (11). Figure 4 shows an example of the simulated specific force magnitude during VQDR motion. The initial velocity of the quadrotor was 2 m/s and the VQDR parameters as given in (15). The required peaks need to determine the gain and distance can be easily recognized.
To find the required QDR gain, the quadrotor is flown for a known distance using the same parameters as used to generate Figure 4. Next, the quadrotor peaks during the motion are detected and the peak to peak accelerometer measurement sequence, f b p2p , is substituted into (12) to estimate the gain. Figure 5, shows the QDR gain value as a function of time, that is the travelled distance. Since the accelerometer measurements are noisy, more peaks should yield better gain accuracy as presented. For further analysis the resulting gain after 100 s, G w = 6.44 is employed.  The INS and VQDR position errors were calculated using the gain are presented in Figure 6. There, the INS solution was calculated for a straight line trajectory and the QDR solution was calculated for the proposed periodic motion, (15), both with the same travelled distance. As can be seen, the QDR approach gives a bounded solution with an error that is less than 30 cm throughout the trajectory while the INS error diverges rapidly.
The same behaviour occurs in HQDR as shown in Figure 7: QDR solution is bounded while INS solution diverges rapidly.

B. EXPERIMENTS
To evaluate the performance of the proposed QDR approach, field experiments in an outdoor environment were conducted. To that end, DJI's MATRICE 300 RTK quadrotor, Figure 8, was used in the experiments. The outdoor environment was chosen so GPS measurements will be available during flights.
A Pixhawk Cube flight controller was attached to the quadrotor's landing gear, as seen in Figure 9, and its three IMU readings were recorded during flight. Near the Pixhawk Cube an RTK GPS receiver was installed to obtain the ground truth of the trajectory. Notice, the quadrotor was flown manually by an experienced and licensed pilot and the Pixhawk Cube was used only to gather IMU readings.   The experiment altitude was set to 20 meters and the travelled distance was approximately 100 m. To begin with, the quadrotor was planned to fly in a straight line (forth and back) at a constant altitude in order to generate IMU readings for pure inertial navigation during the trajectory. Yet, due to winds and manual flight, the altitude was not kept fixed. Moreover, the MATRICE 300 has a fail safe property that holds the quadrotor in mid air every time a disturbance, like strong wind, is sensed. Next, the quadrotor flights were made with periodic motion to enable the QDR approach. In the VQDR, the goal was to change the altitude with ±2 peaks relative to the nominal altitude and obtain at least 10 peaks. In the same manner in HQDR, with peaks in the horizontal plane. As expected, due to winds and manual flight the peaks are not as smooth as in the simulations, but still the periodic nature was kept and enabled QDR application. Moreover, because of those reasons, the quadrotor motion was not constrained to the required plane. As a consequence, an out of plane motion occurred during the flights. An example for trajectories, as obtained from the RTK-GPS measurements, used for INS and QDR calculations are shown in Figures 10 and 11.
In order to apply QDR position calculations (10)-(11), first QDR gain should be determined using (12). To that end, one flight forth and back was used to determine the gain. A gain value of 14.07 was obtained. Then, this gain was used to calculate peak to peak distance and together with the calculated attitude from (5) the quadrotor position was found. The INS solution was calculated using (3)-(5) for the straight line trajectory. As shown in Figure 9, the Pixhawk was attached to the landing gear not aligned to the quadrotor motion direction. Therefore, before INS and QDR calculations are applied, the IMU readings were transformed to the quadrotor body reference frame. To that end, this fixed transformation matrix was calculated while the quadrotor was stationary on the ground. The roll and pitch angles from the accelerometer measurements and the heading angle was approximated as the difference between two magnetometer readings (one aligned with the body frame and the other with the IMU frame), were used. VOLUME 8, 2020  For VQDR, the magnitude of the specific force was used in (12) to calculate the peak to peak distance, while for HQDR the y axis accelerometer was used. As mentioned in Section III, in situations were peaks are not detected in the specific force magnitude (low-manoeuvrability), the expected accelerometer axis (where is period motion is applied) is used instead.
Before presenting the results, we note that IMU2 readings were very noisy and contained some irregular recordings compared to IMU1 and IMU3 all located within the Pixhawk Cube controller. In its specifications, it is stated that only two sets of IMUs are mechanically vibration-isolated. Thus, we employ only IMU1 and IMU3 measurements for INS and QDR evaluations.
The position error at the end of the trajectory is chosen as the performance measure. Table 1 shows the results for the traditional INS approach and the proposed QDR one. There, three trajectories are presented, two for VQDR and one for HQDR.
INS results in the straight line trajectory showed an error of 1.4−4.6 times the total travelled distance. In VQDR, the error was less than 9% of the travelled distance while in HQDR the error was less than 6%. Thus, is clearly seen that QDR approach outperformed the traditional INS approach both in VQDR and HQDR. Notice, that in the peak to peak distance estimation, the QDR estimated distance is sometimes higher than the actual one and sometimes lower (same phenomena in step-length estimation with PDR). To illustrate it, consider the HQDR    scenario which has five peak-to-peak distances during the trajectory. In the initial distance the largest error of 6.38 m was obtained, while in the following four -0.68, −4.84, 0.44 and 1.42 m. Summing all the peak to peak distances gives the error at the end of the trajectory, 3.2 m, as presented in Table 1. Figure 12 shows the RTK-GPS, HQDR and INS calculated distance in each estimated peak to peak duration throughout the trajectory. The INS solution diverges while the HQDR solution remains bounded and near the actual trajectory. Notice, that QDR provides only peak-to-peak distance (like PDR provides step-length), therefore only the distance error in each peak-to-peak occurrences is addressed.
The distance errors for HQDR at each peak-to-peak occurrence is shown in Table 2. Since the distance is estimated, in some situations it will be bigger and in some shorter than the actual distance, just as in PDR. In general, this behaviour contributes to the small error obtained at the end of the trajectory. For the HQDR, the first two distance errors have positive values, i.e. longer distance estimated, while the third and forth have negative values, that is shorter distance was estimated. In the same manner, the distance errors for both VQDR trajectories are presented in Table 3 for VQDR 1 and in Table 4 for VQDR 2. The distance error for VQDR 1 was less than 9% in each peak to peak distance. For VQDR 2, The first peak-to-peak distance error is 70% of the actual distance due to pilot error that occurred in this stage. All other three distances were estimated with an error less than 20% of the actual distance.

V. CONCLUSION
The quadrotor dead-reckoning framework, based on inertial sensors only, was suggested as an alternative solution to classical INS in situations of pure inertial navigation. Motivated from the pedestrian dead reckoning approach, the quadrotor is set to move in a periodic motion. That is, a trade-off is made between quadrotor energy (battery life) in straight line trajectories to enhanced navigation capability (accuracy) in periodic motion trajectories. Since short-time periods are considered in pure inertial-navigation, probably the latter will be preferred in many scenarios.
After gain calibration, peaks are detected and the distance between them can be estimated using an empirical formula such as the Weinberg gain. Using this distance the horizontal quadrotor position can be determined.
A rigours comparison between the proposed QDR approach to the classical INS in situations of pure inertial navigation was made. When using the appropriate gain of the required periodic motion, the QDR navigation solution is bounded while the INS solution rapidly diverge. When examining the robustness of the gain to other dynamics the accuracy degrades but still improves the INS solution.
To overcome this situation several gains, each for a different type of expected period motion, can be used.
QDR approach was also evaluated in fields experiments using DJI Matrice 300 RTK with a Pixhawk cube attached to its landing gear. Using its IMU readings, we showed that QDR solution was bounded with an error of several meters corresponding to less than 9% of the travelled distance while the INS solution rapidly diverged. Therefore, applying the QDR approach in situations of pure inertial navigation will result in an improved navigation solution.
Although the proposed QDR approach has many benefits as described above, since it is a dead reckoning approach eventually it will drift in time, both indoors and outdoors. Therefore, the application of QDR is limited to short time periods. In addition, unlike the periodic motion of a pedestrian, a quadrotor trajectory in the open air may be influenced by winds, resulting in an out of plane motion that underlines the assumption of a periodic in plane motion. Yet, as shown in the presented experiment results, even with some wind level the QDR obtained much better results compared to the INS solution. Finally, as in PDR, the QDR approach is limited to the periodic motion corresponding to the pre-calibrated gain it uses. Different periodic motions will require different gains.