Stability Precision Error Correction of Photoelectric Detection by Unmanned Aerial Vehicle

For getting clear images and overcoming shaking caused by various disturbances, real-time compensation of pointing errors will improve the overall stability performance of photoelectric detection by unmanned aerial vehicle. However, the compensation will be greatly deteriorated by error-causing sources, and the error correction process is of great importance. In this research, the problem of stability precision error correction is comprehensively studied. First, by modeling overall kinematics, errorcausing sources, and error compensation, the error correction process is mathematically modeled and simulated. Then, by using simulation data regression, error correction models including the global function model and parametric model are established. The models are validated by carrying out both simulations and validation experiments. At last, the performances of the error correction models are compared and analyzed, which concerns the factors of parameter identification, model simplicity, and final improvement effect. Results show that the final stability precision can be greatly improved over 20%, and the parametric model outperforms the global function model comprehensively. It can be concluded that, either in simulation environment or real application scenarios, the obtained models and related analysis results are effective in improving the system stability performance.


Introduction
To obtain clear images and overcome disturbances, stability precision (hereinafter, the precision) is a key index for evaluating performances of photoelectric detection devices, especially for lightweight and small-sized carriers like unmanned aerial vehicle (UAV), for those are easily affected by various disturbances and errors [1,2]. The typical application scenarios of this kind of device are shown in Figure 1.
Researchers have been always focusing on the stability precision control of photoelectric devices. The application scenarios include carriers like unmanned vehicles, aerial carriers, and naval vessels. For instance, Zhuchong et al. [3] developed an inertial-stabilized platform for airborne remote sensing using magnetic bearings. Zhou et al. [4] presented the design of a mechatronic system for a two-axis inertial-stabilized platform in an unmanned helicopter-(UH-) based airborne power line inspection system. Dong et al. [5] proposed a dynamic model and control method for a two-axis initially stabilized platform, and there are plenty of works in other fields concerning the problem of stability precession improvement [6][7][8]. Therefore, in this research, stability precision is always treated as the key performance index to evaluate the whole system.
Except for the casual environmental disturbances caused by carrier movements, winds, noises, etc., the over-all stability precision can also be severely affected by other errorcausing sources (ECS) related to the quality of the device itself, like assembly errors, mass eccentricities, and sensor measurement accuracies. For example, Wu et al. [9] studied the device stabilization with total warping variation model. Yu et al. [10] studied video stabilization based on the modeling of motion imaging. Mao et al. [11] proposed the continuous second-order sliding mode control based on disturbance observer for LOS stabilization. Chen et al. [12] studied the disturbance observer-based control and related methods. Dasgupta et al. [13] designed the disturbance observer for nonlinear systems by using a Hirschorn inverse approach. Gao et al. [14] carried out an analysis on the influence of assembly error of off-axis three-mirror optical system on imaging line-of-sight. Liu et al. [15] carried out a machining error analysis of freeform surface off-axis threemirror system based on optical performance evaluation.
However, these studies commonly adopt the methods of off-line modeling and precorrection before the real application. Comparatively, the real-time error correction is considered in this research, which is beneficial for the real-time improvement during the real application process.
The real-time compensation of the overall pointing errors will generally dissolve the disturbances coupled to the device base and improve the final precision. Specifically, to stabilize the line of sight (LOS) of the device, the kinematic pair of the azimuth frame and motor, and that of the pitch one, must be both used to compensate simultaneously. In this research, the two pairs are abbreviated as AZ and PI hereafter. However, the compensation performance will be greatly deteriorated by those ECS [16][17][18]. Therefore, during real applications, the extra error corrections aiming at dissolving the effects of ECS will be needed. The general correction process is shown in Figure 2.
The correction algorithm will be a parametric model used to predict the effects of ECS. It is used to calculate the pointing angle deviations between when those ECS exist and do not exist. Besides, when there are no ECS existing, the pointing angles are called theoretical pointing angles, which can be obtained by using analysis of general kinematics and compensation, and are often treated as the input parameters. In the real application scenarios, the real-time correction of those ECS effect will be realized by using extra servo control mechanism, including frames, motors, or more advanced structures, like multiaxis linkages, which are assembled on the outer side of AZ and PI. Those extra mechanisms will rotate according to the correction angles generated by using the algorithms above, so the deviations caused by ECS can be dissolved. Therefore, the design of the correction algorithm will be the key factor determining correction performance, which can be analyzed by comparing the final precision with the original precision without any correction. A better algorithm will predict the deviations more accurately and finally achieve a higher precision [19].
For instance, Wang et al. [20] proposed the real-time FPGA-based Kalman filter for constant and nonconstant velocity periodic error correction. Xingshun et al. [21] studied the real-time phase correction based on FPGA in the beam position and phase measurement system. Refan et al. [22] proposed the real-time global poisoning stability improvement by utilizing support vector machine. Sen et al. [23] studied the real-time correction of periodic nonlinearity in detection for scanning beam interference. Yu et al. [24] carried out research on dynamic tracking and compensation method for imaging, and there are other similar researches related to the error correction modeling [25][26][27]. There are plenty of researches concerning real-time error corrections using methods like collective morphing, PID algorithms, and lateral control [28][29][30]. However, these studies typically focused on only one kind of error like that of beam axis, sensors, motors, or accelerators, without comprehensive modeling and analysis. Besides, they barely focused on the two-axis stabilization mechanism, which is commonly adopted by UAV photoelectric detection.
In this research, based on our previous modeling works of the precision and various ECS, different correction algorithms are modeled and introduced into the overall simulation model, and the performances of those correction algorithms are compared. At last, the chosen algorism is validated by carrying out both simulation and experiment using data of a real product. Therefore, the real-time error correction of the UVA stability precision is comprehensively studied. Furthermore, it can be concluded that this research fills the technical deficiency of using a comprehensive method to compensate for the stability error of UAV photoelectric detection and provides a pioneering theoretical guidance for the related engineering applications in the future.
The organization of this paper is as follows: the background and literature review are presented in Section 1; the modeling and simulations of ECS are presented in Section 2; the error correction modeling is presented in Section 3;     Journal of Sensors the simulation and validation experiments are presented in Section 4; the final conclusions and future work are presented in Section 5.

Modeling and Simulations of UAV, Stability Precision, and Error-Causing Sources
Based on our previous research of error modeling [31], the necessary predefinitions are shown as follows, and all modeling components are integrated together for the later analysis. Furthermore, because the device base is considered as being fixed to the UAV body, the dynamic modeling and related analysis of UAV can be simplified as that of the device base, which is presented as follows: (i) The final precision is denoted as an index of RMS, and it is defined as the root mean square of the angular deviations Δθ si . The values of Δθ si are the differences between the ideal pointing positions and the real ones, and they are also defined as the pointing errors. The specific method to calculate Δθ si and RMS can be seen in our previous work [31] by using a series of statistic indexes (ii) The angular velocity of the device base related to the ground is denoted as ω the angle and the velocity of AZ compensation, which are driven by AZ motor, are denoted as θ a and _ θ a . Those parameters of PI are denoted as ω ! ip = ½ω ipx , ω ipy , ω ipz T , θ p , and _ θ p , respectively (iii) For the ECS modeling, in this research, the commonly-seen ECS of perpendicularity deviations including δ ! a = ½δ ax , δ ay , 0 T and δ ! p = ½δ px , 0, δ pz T , which can be measured by using high precision instruments [32], run-outs [33], including γ ! a = ½γ ax , γ ay , 0 T and γ ! p = ½γ px , 0, γ pz T , and assembly deviations of gyroscope locations [34] including ε ! a = ½ε ax , ε ay , 0 T and ε ! p = ½ε px , 0, ε pz T , are considered (iv) For the kinematics modeling, as mentioned, AZ and PI must be both used to compensate simultaneously. According to kinematics analysis of homogeneous coordinate transformation put forward by [35], the rotation transformation matrix from the device base to AZ and that from AZ to PI is denoted as R a b and R p a . Those of perpendicularity deviations are denoted as R a ′ and R b ′ , those of run-outs are denoted as ΔR a and ΔR p , and those of gyroscope location deviations are denoted as R ag and R pg More details of those ECS and related kinematics analysis can be seen in our previous work [31]. By integrating all the above modules, the overall stability precision is modeled in Simulink, which is shown in Figure 3. The original system base angular velocity ω ! ib = ½ω ibx , ω iby , ω ibz T is set as the input. All of the modules of the kinematics, components, and ECS are embedded in the middle, and the details of those modules can also be seen in our previous work [31]. The final index of stability precision RMS is set as the output.

Error Correction Modeling
3.1. Necessary Predefinitions and Preparations before the Modeling. As mentioned, the error correction process is used to dissolve the effects caused by ECS. The correction algorithm model is used to predict the pointing angle deviations between when those ECS exist and do not exist. When there are no ECS existing, those are called the theoretical pointing angles. For the case of the two-axis-two-frame structure of AZ and PI, the theoretical pointing angles are denoted as ½ α i , β i , where α i denotes the AZ pointing angle, β i denotes the PI one, i = 1, 2, 3, ¡-, n m , and n m is the total number of the samples used for modeling. ½α i , β i can be obtained by using methods of general kinematics and compensation and are often treated as the input parameters of the correction model.
Respectively, when there are ECS existing, those are called the real pointing angles, which are denoted as ½b α i , b β i . The deviations between the theoretical and the real are denoted as ½δα i , δβ i . In that case, the general form of the error correction model can be expressed as (1), where f ðα i , β i Þ and gðα i , β i Þ are the model functions, and ε i and η i are the prediction deviations of the model.
Therefore, the modeling process is to find the most appropriate forms of f ðα i , β i Þ and gðα i , β i Þ to obtain the minimum accumulation values of ε i and η i , which is expressed by (2): The n m groups of sampling values of ½δα i , δβ i and ½α i , β i are the data basis for the modeling process. Based on simulation models presented in Section 2 and by carrying out the simulation with all those ECS set to zeros, the signal values of Δθ szi and Δθ syi are taken as the sample values of ½α i , β i by definition. Similarly, the differences of those signal values, between when those ECS are set to certain values and zeros, are taken as the sample values of ½δα i , δβ i . Additionally, the ECS are all set to be 0.5 degrees considering the actual manufacturing and assembly accuracy. The sampling data process is shown in Figure 4.

Journal of Sensors
About more details of the above data-acquiring process, the UAV movements, and other various disturbances coupled to the device base, namely, ω ! ib = ½ω ibx , ω iby , ω ibz T , are simulated by using back-ward deduction of a power spectrum. In addition, based on real measurement data of UAV movements in outdoor environments, the power spectrum is obtained by using the method of correction function estimation [36]. The backward deduction means that the amplitude of the simulated signal is obtained by inverse Fourier transform of the power spectrum data, the phase is randomly generated, and the three directions of ω ! ib are all set equal.
Those processes and obtained data are shown in Figure 5, and the relative MATLAB codes are also attached as supplementary files.
Based on the above background, 13600 groups of ½δα i , δ β i and ½α i , β i are obtained, namely, n m is set as 13600. Those obtained data groups are also attached as supplementary files, which can be used as the basis for the error correction modeling.

Global Function
Then by using the spherical function as the basis, A m ðαÞ and B m ðαÞ are expanded in ½0, 2π as (4), where P m l ðcαÞ is the l-order associated Legendre polynomial [38], and A m l and B m l are the coefficients.
By introducing (4) into (3), we get (5), which can be further expanded as a form of polynomial shown as (6).
We introduce the contents in Section 2 into (10) and then simplify the result by adhering to rules as follows: first, any of the elements Δ belongs to ECS are treated as small angles, so sΔ ≈ 0, and cΔ ≈ 1; second, all of the high-order elements are neglected. Simultaneously, the transfer relation between the rectangular coordinate and spherical coordinate is shown as (11), where d is the distance away from the target.

Simulation and Validation Experiment of Error Correction
Based on the modeling results in Section 3, both simulation and validation experiments are carried out to evaluate the performances of the modeling methods.

Simulations of Error Correction.
The simulation process is shown in Figure 6, in which the device base movements are simulated by signals generated in Subsection 3.1. The overall integrated precision model in Section 2 is used to generate real-time real pointing angles and theoretical pointing angles. Different correction models, including GFM and PM in Subsections 3.2 and 3.3, and the most commonly used models of ADRC, DAC, and CHADC in [4,12,20], are all used to calculate the correction angles. The final stability  7 Journal of Sensors precisions after correction are also compared to evaluate the performances of the correction models.
The modeling and simulations are all carried out in MATLAB R2019b Simulink, and the MATLAB codes of the simulation works are available online at Supplementary Materials.
The necessary parameters of the simulation are listed in Table 1, and other parameters for the calculations are set equal to those listed in Table 2 shown later, which is originated from a real pod product. The simulation results are listed in Table 3. The deviation angles Δθ si along the simulation process are presented in Figure 7, which is used to calculate the final RMS.
From Table 3 and Figure 7, it is obvious that PM outperformed GFM and the others in improving the overall stability precision, and the improvement percentage can reach up to over 20%.

Validation Experiment of Error Correction.
For further validation of the correction models, validation experiments using a real product assembled on an experiment platform is carried out, as shown in Figure 8.
The details of the experiment platform are listed as follows: (i) The high precision servo turntables is used to simulate the UAV movements and other disturbances coupled to the product base, namely, ω ! ib = ½ω ibx , ω iby , ω ibz T . Those movements are also generated by using signals in Subsection 3.1, and based on which, the theoretical pointing angles ½α i , β i are calculated in the background software to support the real-time error correction process using GFM or PM. Although all the simulation and experiments are carried out indoors, the movements are simulated according to the real outdoor environments (ii) The photoelectric system product is a UAV detection pod (iii) The PSD position measurement system is used to measure the real pointing angles ½b α i , b β i and further calculate the final stability precision RMS    Journal of Sensors (iv) The two-axis position platform is used to adjust the position of the PSD system for better measurement By referring to real measurement data of the pod product, the necessary parameters, used for the theoretical pointing angles calculation, are preset before the experiments. Those parameters are listed in Table 2.
GFM, PM, and other commonly used methods are both used to do the correction. The experiment results are listed in Table 4. From Table 4, PM also outperformed GFM and the others, and the improvement percentage can reach up to over 15%.

Conclusions and Future Work
The major contributions of this research are as follows. Additionally, the nomenclature is presented in the end.
(1) Stability precision error correction of UAV photoelectric detection is comprehensively defined and analyzed. The analysis results and related data can be valuable guidance for real application As the next step, we will investigate other error correction methods like semiparametric model, BP neural net, and machining learning. The same is true for other error-causing sources and situations, like frictions, structural eccentricity, and inertia coupling. The definition of limitations and constraints should be well-adjusted according to the scenario. For example, the linear disturbances of UAV and target movements may have a great influence on the results. Similar control mechanism of more complex system with more dimensions or new materials will be studied, like two-axisfour-frame and three-axis-four-frame used on larger carriers.

UAV:
Unmanned aerial vehicle LOS: Line of sight AZ: Kinematic pair of the azimuth frame and motor PI: Kinematic pair of the pitch frame and motor ECS: Error causing sources RMS: System precision; root mean square of the angular deviation between the ideal and the real pointing positions t s , T s , n s :   Rotation transformation matrixes affected by errors of axis perpendicularity of the azimuth and the pitch γ ! a , γ ax , γ ay : Run-outs vector of the azimuth, and its decomposed components of the maximum tilting oscillations around the x and y axes of the system base coordinate in [rad] γ ! p , γ px , γ pz : Run-outs vector of the pitch, and its decomposed components of the maximum tilting oscillations around the x and z axes of the azimuth coordinate in [rad] ΔR a , ΔR p : Rotation transformation matrixes affected by errors of run-outs of the azimuth and the pitch ε ! a , ε ax , ε ay : Vector of the azimuth gyroscope assembling deviation in the pitch coordinate, and its components around the x and y axes of the coordinate in [rad] ε ! p , ε px , ε pz : Vector of the pitch gyroscope assembling deviation in the pitch coordinate, and its components around the x and z axes of the coordinate in [rad] R ag , R pg : Rotation transformation matrixes affected by assembling errors of the gyroscope locations n m : Total number of the samples used for modeling b α i , b β i : Real pointing angles δα i , δβ i : Deviations between the theoretical and the real ε i , η i : Prediction deviations A m , B m : Fourier series coefficients P m l ðcαÞ: The l-order associated Legendre polynomial P pgi : Target position in the CðpgÞ coordinate P bi : Target position in the CðbÞ coordinate b α i , b β i : Real pointing angles J ma : Rotary inertia of the azimuth motor in ½kg · m 2 J La : Rotary inertia of the azimuth load in ½kg · m 2 J mp : Rotary inertia of the pitch motor in ½kg · m 2 J Lp : Rotary inertia of the pitch load in ½kg · m 2 R m : Total resistor of the two armature circuits in ½Ω L m : Total inductance of the armature circuits in ½H D L : Damping coefficient of the two motors K L : Elastic coefficient of the two motors C e : EMF coefficient of the two motors C m : Motor torque coefficient of the two motors K p : Amplification coefficient of driving circuit R s : Resistor of the driving circuit in ½Ω K g : Amplification coefficient of the gyroscopes ω g : Natural frequency of the gyroscopes in ½rad/s λ g : Damping coefficient of the gyroscopes.

Data Availability
The MATLAB codes of power correlation function and backward deduction mentioned above are included within the supplementary files. The figures used to show the data example for the modeling process, and the error correction process are also included within the supplementary files.

Conflicts of Interest
The authors declare that they have no conflicts of interest.