Automatic Control and Model Verification for a Small Aileron-Less Hand-Launched Solar-Powered Unmanned Aerial Vehicle

This paper describes a low-cost flight control system of a small aileron-less hand-launched solar-powered unmanned aerial vehicle (UAV). In order to improve the accuracy of the whole system model and quantify the influence of each subsystem, detailed modeling of UAV energy and a control system including a solar model, engine, energy storage, sensors, state estimation, control law, and actuator module are established in accordance with the experiment and component principles. A whole system numerical simulation combined with the 6 degree-of-freedom (DOF) simulation model is constructed based on the typical mission route, and the parameter precision sequence and energy balance are obtained. Then, a hardware-in-the-loop (HIL) experiment scheme based on the Stewart platform (SP) is proposed, and three modes of acceleration, angular velocity, and attitude are designed to verify the control system through the inner and boundary states of the flight envelope. The whole system scheme is verified by flight tests at different altitudes, and the aerodynamic force coefficient and sensor error are corrected by flight data. With the increase of altitude, the cruise power increases from 47 W to 78 W, the trajectory tracking precision increases from 23 m to 44 m, the sensor measurement noise increases, and the bias decreases.


Introduction
In recent decades, solar-powered unmanned aerial vehicles (UAVs) have attracted the attention of many research groups all over the world [1]. This new type of UAV consumes electrical energy converted from solar irradiance by solar cells mounted on the main wing. If the photovoltaic (PV) cells and battery produce and store sufficient extra energy during the daytime for nighttime flight, the The cost of a UAV platform and its operation is a crucial constraint to its application. At present, low-cost flight control platforms have been widely used in miniature air vehicles [9]. Smaller scale, lower-cost solar-powered hand-launched UAVs have the advantages of easier civilian application and marketization, yet there still might be a large amount of sensor errors, vulnerability to lower atmosphere influence, and flight instability [10]. Besides, the aileron-less design places a higher demand on the flight control system, and it is necessary to overcome the problems of only the rudder for lateral control and the lower measurement precision of a low-cost flight controller. Since the rudder not only performs the coordinated turning control, but also plays the role of the aileron, this leads to the roll and yaw control being significantly coupled, and the control law thus needs to be redesigned. Then, this indirect control scheme reduces the accuracy of trajectory tracking, and the measurement accuracy of the low-cost flight control is limited. Therefore, a filtering algorithm based on the characteristics of the UAV needs to be designed to improve the mission accuracy, detailed numerical and hardware-in-the-loop simulations (HILS) are also necessary for model error correction during the design process, and the accuracy of the model can be further improved by using flight data. This paper consequently aims to establish the state-of-the-art in the control system design of a hand-launched solar-powered UAV by introducing and extending relevant aspects from three levels, UAV systematic modeling, Stewart platform hardware-in-the-loop simulation, and lower and higher altitude flight tests, which together enable the whole scheme validation. The The cost of a UAV platform and its operation is a crucial constraint to its application. At present, low-cost flight control platforms have been widely used in miniature air vehicles [9]. Smaller scale, lower-cost solar-powered hand-launched UAVs have the advantages of easier civilian application and marketization, yet there still might be a large amount of sensor errors, vulnerability to lower atmosphere influence, and flight instability [10]. Besides, the aileron-less design places a higher demand on the flight control system, and it is necessary to overcome the problems of only the rudder for lateral control and the lower measurement precision of a low-cost flight controller. Since the rudder not only performs the coordinated turning control, but also plays the role of the aileron, this leads to the roll and yaw control being significantly coupled, and the control law thus needs to be redesigned. Then, this indirect control scheme reduces the accuracy of trajectory tracking, and the measurement accuracy of the low-cost flight control is limited. Therefore, a filtering algorithm based on the characteristics of the UAV needs to be designed to improve the mission accuracy, detailed numerical and hardware-in-the-loop simulations (HILS) are also necessary for model error correction during the design process, and the accuracy of the model can be further improved by using flight data. This paper consequently aims to establish the state-of-the-art in the control system design of a hand-launched solar-powered UAV by introducing and extending relevant aspects from three levels, UAV systematic modeling, Stewart platform hardware-in-the-loop simulation, and lower and higher altitude flight tests, which together enable the whole scheme validation. The method from model establishment to verification is applied to the design of the control system for a real UAV, which shortens the development cycle, reduces the cost, and enables it to be applied in similar platforms.
Electronics 2020, 9, 364 3 of 26 This paper is organized as follows: Section 2 gives an overview of a whole component-level model including the energy and controller systems of the UAV; Section 3 describes the numerical simulation and the Stewart platform hardware-in-the-loop simulation verification schemes; Section 4 shows the field flight test results at different altitudes and at a model correction method; and finally, Section 5 gives a conclusion.

Complete System Modeling
The UAV adopts a normal configuration, without landing gear and aileron, and the wing adopts a lightweight structural design with the PV cells cover the upper skin. Besides, the imaging equipment is mounted on the nose in order to get a wide field view as well as avoid touchdown collision, and the engine system is placed on the rear side of the wing to generate thrust, as shown in Figure 2.
Electronics 2020, 9, x FOR PEER REVIEW 3 of 26 method from model establishment to verification is applied to the design of the control system for a real UAV, which shortens the development cycle, reduces the cost, and enables it to be applied in similar platforms. This paper is organized as follows: Section 2 gives an overview of a whole component-level model including the energy and controller systems of the UAV; Section 3 describes the numerical simulation and the Stewart platform hardware-in-the-loop simulation verification schemes; Section 4 shows the field flight test results at different altitudes and at a model correction method; and finally, Section 5 gives a conclusion.

Complete System Modeling
The UAV adopts a normal configuration, without landing gear and aileron, and the wing adopts a lightweight structural design with the PV cells cover the upper skin. Besides, the imaging equipment is mounted on the nose in order to get a wide field view as well as avoid touchdown collision, and the engine system is placed on the rear side of the wing to generate thrust, as shown in Figure 2. This lightweight and maximum energy harvesting design requires the UAV to keep a low speed ensuring a long endurance, and the aileron-less design reduces the difficulty of solar cell installation and improves the efficiency of energy production, but it also leads to a different control strategy compared with the normal configuration. In addition, the basic flight modes of the UAV are divided into hand-launched take-off, autonomous cruise, slower glide, and fuselage touching the ground. In the simulation, a 6 degree-of-freedom (DOF) equation of motion derived from [11] is applied for the UAV airframe modeling, and the overall parameters of the airplane are shown in Table 1.  This lightweight and maximum energy harvesting design requires the UAV to keep a low speed ensuring a long endurance, and the aileron-less design reduces the difficulty of solar cell installation and improves the efficiency of energy production, but it also leads to a different control strategy compared with the normal configuration. In addition, the basic flight modes of the UAV are divided into hand-launched take-off, autonomous cruise, slower glide, and fuselage touching the ground. In the simulation, a 6 degree-of-freedom (DOF) equation of motion derived from [11] is applied for the UAV airframe modeling, and the overall parameters of the airplane are shown in Table 1.

Energy System
The system topology of the UAV is shown in Figure 3, and it can be divided into energy and flight control systems. The flight control system is located above the power bus, which consumes power for autonomous control, and the energy system is located below the power bus, which is composed of

Energy System
The system topology of the UAV is shown in Figure 3, and it can be divided into energy and flight control systems. The flight control system is located above the power bus, which consumes power for autonomous control, and the energy system is located below the power bus, which is composed of PV cells, maximum power point tracking (MPPT), and batteries for energy collection, consumption, and storage.

Solar Model
The solar model is based on the position, altitude, and attitude angle of the UAV to calculate the light intensity and the solar flux of the PV cells at the current time. Since the amount of solar energy changes with the latitude ( ξ ), longitude ( λ ), and altitude (h) of the earth, and the solar angles of azimuth ( s φ ), elevation ( s ε ) and Julian day (jd) can be computed from ( ξ , λ , h) and date/time [12].
The solar model is shown in Equation (1), which takes into account the annual variation and atmosphere absorption effects.
where I0 is the solar constant and   , as fh ε is an atmosphere absorption factor [13].
The solar flux of the PV cells on the wing surface can be calculated based on the relationship between the vehicle coordinate frame, area of PV cells, and the location of the solar vector. In the Forward-Right-Down coordinate system, the solar flux area is given by

Solar Model
The solar model is based on the position, altitude, and attitude angle of the UAV to calculate the light intensity and the solar flux of the PV cells at the current time. Since the amount of solar energy changes with the latitude (ξ), longitude (λ), and altitude (h) of the earth, and the solar angles of azimuth (ϕ s ), elevation (ε s ) and Julian day (j d ) can be computed from (ξ, λ, h) and date/time [12]. The solar model is shown in Equation (1), which takes into account the annual variation and atmosphere absorption effects.
where I 0 is the solar constant and f a (h, ε s ) is an atmosphere absorption factor [13]. The solar flux of the PV cells on the wing surface can be calculated based on the relationship between the vehicle coordinate frame, area of PV cells, and the location of the solar vector. In the Forward-Right-Down coordinate system, the solar flux area is given by where A s k is the area of each PV cells, R s b = R(ψ)R(θ)R(ϕ) is the rotation matrix form the body to the inertial frame, and ψ, θ, and ϕ are yaw, pitch, and roll angle.

Engine System
For the aileron-less control scheme, an accurate engine system model is helpful for the decrease of control input, and the engine system of the UAV is composed of a motor, a propeller, and an electronic Electronics 2020, 9, 364 5 of 26 speed regulator (ESC). In this paper, the engine model is obtained based on the static and dynamic experiments [14], and the combination of DualSky-2814 brush-less motor and a 10-inch diameter, 7-inch pitch propeller is chosen according to the thrust requirement and efficiency on the standard operation condition. In the static experiment, the motor and propeller are mounted on an ATI Gamma 6-DOF force/torque sensor and then connected to a fixed clamp on the desk, and the static thrust and torque values are collected by the data acquisition hardware and software system. In the dynamic experiment, the thrust and torque are still measured, but the whole system needs to be fixed in the car, and the whole experiment system is shown in Figure 4.
where s k A is the area of each PV cells, RR ψ R θ R φ is the rotation matrix form the body to the inertial frame, and ψ , θ , and φ are yaw, pitch, and roll angle.

Engine System
For the aileron-less control scheme, an accurate engine system model is helpful for the decrease of control input, and the engine system of the UAV is composed of a motor, a propeller, and an electronic speed regulator (ESC). In this paper, the engine model is obtained based on the static and dynamic experiments [14], and the combination of DualSky-2814 brush-less motor and a 10-inch diameter, 7-inch pitch propeller is chosen according to the thrust requirement and efficiency on the standard operation condition. In the static experiment, the motor and propeller are mounted on an ATI Gamma 6-DOF force/torque sensor and then connected to a fixed clamp on the desk, and the static thrust and torque values are collected by the data acquisition hardware and software system. In the dynamic experiment, the thrust and torque are still measured, but the whole system needs to be fixed in the car, and the whole experiment system is shown in Figure 4. The above experiment is carried out at a low altitude, but the UAV is intended to fly at high altitudes. Therefore, it was assumed that the propeller thrust and power coefficient did not change with altitude, and the calculation of high altitude propeller thrust and power was achieved by density change [15]. The nonlinear relationship between the static thrust and moment is shown in Figure 5a,b, and the dynamic thrust and moment are calculated based on the relationship between the advance ratio to the thrust and power coefficient, as shown in Figure 5c-e.   The above experiment is carried out at a low altitude, but the UAV is intended to fly at high altitudes. Therefore, it was assumed that the propeller thrust and power coefficient did not change with altitude, and the calculation of high altitude propeller thrust and power was achieved by density change [15]. The nonlinear relationship between the static thrust and moment is shown in Figure 5a,b, and the dynamic thrust and moment are calculated based on the relationship between the advance ratio to the thrust and power coefficient, as shown in Figure 5c-e.
where s k A is the area of each PV cells, RR ψ R θ R φ is the rotation matrix form the body to the inertial frame, and ψ , θ , and φ are yaw, pitch, and roll angle.

Engine System
For the aileron-less control scheme, an accurate engine system model is helpful for the decrease of control input, and the engine system of the UAV is composed of a motor, a propeller, and an electronic speed regulator (ESC). In this paper, the engine model is obtained based on the static and dynamic experiments [14], and the combination of DualSky-2814 brush-less motor and a 10-inch diameter, 7-inch pitch propeller is chosen according to the thrust requirement and efficiency on the standard operation condition. In the static experiment, the motor and propeller are mounted on an ATI Gamma 6-DOF force/torque sensor and then connected to a fixed clamp on the desk, and the static thrust and torque values are collected by the data acquisition hardware and software system. In the dynamic experiment, the thrust and torque are still measured, but the whole system needs to be fixed in the car, and the whole experiment system is shown in Figure 4. The above experiment is carried out at a low altitude, but the UAV is intended to fly at high altitudes. Therefore, it was assumed that the propeller thrust and power coefficient did not change with altitude, and the calculation of high altitude propeller thrust and power was achieved by density change [15]. The nonlinear relationship between the static thrust and moment is shown in Figure 5a,b, and the dynamic thrust and moment are calculated based on the relationship between the advance ratio to the thrust and power coefficient, as shown in Figure 5c-e.   The engine model is shown in Equation (3), where the thrust, power, and efficiency need to refer to the above experimental results. J = n s VD T P = ρn 2 s D 4 C T (J) P P = ρn 3 s D 5 C P (J) η P = η(J) M P = P P · η P /V where n s is the motor speed, determined by the throttle; J is the advance ratio; ρ is the air density; D is the propeller diameter; V is the inflow speed, V ≈ V a ; T P , P P , η P , and M P represent the thrust, power, efficiency, and torque of propeller; and C T and C P represent the thrust and power coefficients.

Power and Energy Storage
The energy flow of the UAV is a typical structure of harvest-charge-discharge, where the absorbed solar energy is used as energy input to provide power for engine and accessory avionics systems, and the remaining energy is stored in batteries. When the batteries are full, the UAV will climb to store the gravity potential energy, and when the light intensity is insufficient, it will use the batteries as the only power input and slide to extend the flight endurance. The electric power input is given by where η s is the solar collection system efficiency, η s = η panel · η MPPT , Φ s k I is the solar flux of each PV cell, and η panel and η MPPT are the efficiency of PV cell conversion and MPPT conversion, respectively. The collected energy can be stored in the battery and expended through the engine system or accessory avionics system for a stable flight. Power output is given by P out = P eng + P acc (5) where P eng = P P /η P , P P , and η P are shown in Equation (3), P acc is the accessory avionic power, including the payload, flight controller, data link, and actuators. The battery model is designed according to three states: charge, hold, and discharge, with the efficiency of η in and η out , and power flows into the battery system can be determined by the net power available (P net = P in − P out ), efficiency η, and initial energy E batt (t 0 ) [16]; thus, the battery storage model is as follows: where E batt is the stored energy in the batteries and E max is the maximum capacity. The energy system parameters are shown in Table 2.

Flight Control System
The flight control system is installed at the center of gravity of the UAV, and its model consists of four parts: sensors, state estimation module, closed-loop control law, and actuator. Low-cost sensors are equipped in a flight controller for preliminary state measurement, with a hierarchical extended Kalman filter (EKF) algorithm applied to the state estimation module to achieve a reliable state for autopilot input. The control law is designed based on a successive loop closure structure; then, the commands are output to the actuator to achieve autonomous control. Besides, the dynamic characteristics of the actuator are obtained by the experiment.

Sensors
The low-cost sensor combination of UAV includes the accelerometer, gyroscope, magnetometer, barometer, and GPS, and this sensor combination scheme has been widely used in small fixed-wing UAVs [17]. Different types of sensors have different measurement accuracy when high and low-frequency signals are input. For example, for high-frequency signals, the accelerometer has better measurement accuracy, but GPS has the opposite, and the yaw angle measured by the magnetometer is more reliable under windy conditions. Thus, the characteristics of this sensor combination on different signals can be used to achieve an optimal state estimation to improve control accuracy [11].
Low-cost sensors are susceptible to individual differences and external disturbances; consequently, bias, drift, and oscillatory need to be considered. Various sensors with the shelf product are shown in Table 3, with the SBG-Ellipse IMU component selected for high-precision comparison. The measurement signal includes traxial acceleration, angular velocity, magnetic angle, inertial position, ground speed, and static and dynamic pressure. The acceleration and angular velocity measurement undergo a two-layer function relationship between the voltage signal, displacement of the measuring element, actual acceleration, and Coriolis acceleration, as shown in Table 4. A triaxial magnetometer is composed of three monoaxial magnetic fields mounted orthogonally, in which combining the projection of geomagnetic direction on the body coordinate system gives the heading information [18]. The height and airspeed can be measured by static and dynamic pressure signals.

Sensors Measurement Model
Accelerometer u + qw − rv + g sin θ + β accel,x + η accel,x y accel,y = . v + ru − pw + g cos θ sin ϕ + β accel,y + η accel,y y accel,z = . w + pv − qu + g cos θ sin ϕ + β accel,z + η accel,z Gyroscope γ gyro = k gyro Ω + β gyro + η gyro V g GPS = (V a cos ψ + w n ) 2 + (V a sin ψ + w e ) 2 + η V χ GPS = tan −1 (V a cos ψ + w n , V a sin ψ + w e ) + η χ Electronics 2020, 9, 364 8 of 26 In practical, the aforementioned sensors are often contaminated by amounts of measurement noise, which are assumed to be zero-mean Gaussian white noise. Meanwhile, the measurement bias is also included in the measurement process, especially if there is mutual interference and temperature variation. The measurement models of different sensors are shown in Table 4.
Here, y represents the measured data, Ω = [p, q, r] T is the angular velocity, β is a temperature-related bias, and η is the Gaussian white noise, η ∼ N(0, Q). For the GPS measurement shown in Table 4, the position error and its dynamic characteristics are both required, and a Gauss-Markov error model is an appropriate description of the GPS measurement process [19].
According to the flight conditions of the UAV at low altitude, with an altitude of 600 m and an airspeed of 12.5 m/s during the hovering phase, the sensors are simulated with no wind, an altitude of 600 m, a turning radius of 80 m, the command rolling angle of 20 degrees; the controller temperature is 25 • C and remains unchanged, combined with the orthogonal error and bias from Table 3. The simulation results of various low-cost sensors are shown in Figure 6, the meas-sim and true-sim represent the measurement state and real state of the sensor simulation, respectively. Figure 6a,b, which is the Inertial Measurement Unit (IMU) simulation, where the accelerometer measurement is a high-frequency signal and the noise of low-cost sensors is obvious; (c) is a magnetometer, the measurement is a medium-low-frequency signal; (d,e) is GPS; and (f) is the pressure sensors' simulation, as low frequency as GPS, refer to Table 4. In the dynamic process, the measurement is consistent with the trend of the true signal, and when entering the steady state, the measurement noise is large, and there is a significant deviation.
Here, y represents the measured data,  Ω [ , , ] T p q r is the angular velocity, β is a temperature-related bias, and η is the Gaussian white noise, Table 4, the position error and its dynamic characteristics are both required, and a Gauss-Markov error model is an appropriate description of the GPS measurement process [19].
According to the flight conditions of the UAV at low altitude, with an altitude of 600 m and an airspeed of 12.5 m/s during the hovering phase, the sensors are simulated with no wind, an altitude of 600 m, a turning radius of 80 m, the command rolling angle of 20 degrees; the controller temperature is 25 °C and remains unchanged, combined with the orthogonal error and bias from Table 3. The simulation results of various low-cost sensors are shown in Figure 6, the meas-sim and true-sim represent the measurement state and real state of the sensor simulation, respectively.   Figure 6a,b, which is the Inertial Measurement Unit (IMU) simulation, where the accelerometer measurement is a high-frequency signal and the noise of low-cost sensors is obvious; (c) is a magnetometer, the measurement is a medium-low-frequency signal; (d,e) is GPS; and (f) is the pressure sensors' simulation, as low frequency as GPS, refer to Table 4. In the dynamic process, the measurement is consistent with the trend of the true signal, and when entering the steady state, the measurement noise is large, and there is a significant deviation.

State Estimation
After obtaining the measurement data of the sensor, a dynamic observation of the raw data is necessary for low-cost hardware. Extended Kalman Filter (EKF) theory is a suitable method for the poor computing power of a low-cost flight controller, which has been widely used in various open-source flight controllers [20], and different EKF structures are derived according to different sensor combinations; for example, there is no magnetometer or more angle of attack and sideslip angle sensors [21]. The UAV adopts the EKF structure algorithm for state estimation, which consists of prediction and update steps, and the state equation and measurement equation for nonlinear discrete dynamical systems can be written as where () t w represents the noise and unmodeled part, which can be considered as a zero-mean Gaussian noise with covariance Q. The random variable k v is the measurement noise and represents noise on the sensors with covariance R, which can be estimated from sensor calibration, but Q is generally unknown and needs to be tuned in order to improve the performance of the observer; thus, the prediction step is given by

State Estimation
After obtaining the measurement data of the sensor, a dynamic observation of the raw data is necessary for low-cost hardware. Extended Kalman Filter (EKF) theory is a suitable method for the poor computing power of a low-cost flight controller, which has been widely used in various open-source flight controllers [20], and different EKF structures are derived according to different sensor combinations; for example, there is no magnetometer or more angle of attack and sideslip angle sensors [21]. The UAV adopts the EKF structure algorithm for state estimation, which consists of prediction and update steps, and the state equation and measurement equation for nonlinear discrete dynamical systems can be written as where w(t) represents the noise and unmodeled part, which can be considered as a zero-mean Gaussian noise with covariance Q. The random variable v k is the measurement noise and represents noise on the sensors with covariance R, which can be estimated from sensor calibration, but Q is generally unknown and needs to be tuned in order to improve the performance of the observer; thus, the prediction step is given by Electronics 2020, 9, 364 10 of 26 The update step is where A is a linearized state update matrix, C is a linearized model output matrix, P is the state covariance matrix, and L is the sensor update gain matrix. Based on the EKF theory, a three-stage series structure algorithm is used in the state estimation module, as shown in Figure 7. The estimation of pitch and roll in the first stage is used as an input to the second stage to calculate the heading angle. The information of the first two stages along with GPS measurement is used as the input to the final stage for the position and wind estimation. During the flight, the heading state such as yaw and heading angle will directly affect the trajectory tracking accuracy, while the longitudinal state such as airspeed and altitude have less influence, since the installation of a PV cell on the wing will interfere with the measurement of the magnetometer and reduce the accuracy of the yaw angle. The key of this algorithm is to reduce the airspeed and altitude estimation accuracy, improve the heading angle accuracy, and make full use of the limited computing ability to improve the position tracking precision to meet the mission requirement. For example, a four-sided route with an area of 1 km 2 has an acceptable tracking error of approximately 30 m (30 m/km 2 ) and a heading error of nearly 13 degrees, and the simulation conditions are the same as before with an altitude of 600 m, an airspeed of 12.5 m/s, and a rolling angle hovering of 20 degrees in windless conditions [10].
Electronics 2020, 9, x FOR PEER REVIEW 10 of 26 The update step is where A is a linearized state update matrix, C is a linearized model output matrix, P is the state covariance matrix, and L is the sensor update gain matrix. Based on the EKF theory, a three-stage series structure algorithm is used in the state estimation module, as shown in Figure 7. The estimation of pitch and roll in the first stage is used as an input to the second stage to calculate the heading angle. The information of the first two stages along with GPS measurement is used as the input to the final stage for the position and wind estimation. During the flight, the heading state such as yaw and heading angle will directly affect the trajectory tracking accuracy, while the longitudinal state such as airspeed and altitude have less influence, since the installation of a PV cell on the wing will interfere with the measurement of the magnetometer and reduce the accuracy of the yaw angle. The key of this algorithm is to reduce the airspeed and altitude estimation accuracy, improve the heading angle accuracy, and make full use of the limited computing ability to improve the position tracking precision to meet the mission requirement. For example, a four-sided route with an area of 1 km 2 has an acceptable tracking error of approximately 30 m (30 m/km 2 ) and a heading error of nearly 13 degrees, and the simulation conditions are the same as before with an altitude of 600 m, an airspeed of 12.5 m/s, and a rolling angle hovering of 20 degrees in windless conditions [10].

Successive Loop Closure Control Law
For the low-cost solar UAV, the flight control architecture emphasizes simplicity, robustness, and low-power consumption to fulfill the need for a reliable long-endurance automatic flight. Thus, the structure of the control law is designed by using the longitudinal and lateral separated cascaded proportional-integral-derivative (PID) controllers, as shown in Figure 8. In the outer loop, the flight controller employs a nonlinear guidance law to track waypoints by generating the command roll angle. Altitude and airspeed control are provided by a proportional-integral (PI) structure, command pitch angle, and throttle as output [22]. For the low-cost solar UAV, the flight control architecture emphasizes simplicity, robustness, and low-power consumption to fulfill the need for a reliable long-endurance automatic flight. Thus, the structure of the control law is designed by using the longitudinal and lateral separated cascaded proportional-integral-derivative (PID) controllers, as shown in Figure 8. In the outer loop, the flight controller employs a nonlinear guidance law to track waypoints by generating the command roll angle. Altitude and airspeed control are provided by a proportional-integral (PI) structure, command pitch angle, and throttle as output [22]. The target application field of the UAV is a plateau with an altitude of 5 km and a cruise speed of 12 m/s, and the flight modes under trim conditions are shown in Table 5, which are all stable. The longitudinal control inputs are throttle and elevator, and the lateral input is only the rudder, so a pseudo aileron is defined here. Since the longitudinal control law adopts a conventional control structure, only the lateral control law is studied here, which is designed according to the combination of roll attitude control and coordinated turning control.
where 0 a δ is the pseudo aileron, 0 r δ is the pseudo rudder, and δa k and δr k are the proportion of aileron and rudder in the channel, which are related to the roll angular velocity |p| and yaw angular velocity |r|, respectively. There are five circumstances for rudder control structure design, as shown in Table 6 and Figure 9a. Among them, the roll angle hold can be achieved by any control method, but the best control effect is the combination of coordinate turning and PI control of aileron, and the worst is obtained by directly inputting the aileron command to the rudder, with the The target application field of the UAV is a plateau with an altitude of 5 km and a cruise speed of 12 m/s, and the flight modes under trim conditions are shown in Table 5, which are all stable. The longitudinal control inputs are throttle and elevator, and the lateral input is only the rudder, so a pseudo aileron is defined here. Since the longitudinal control law adopts a conventional control structure, only the lateral control law is studied here, which is designed according to the combination of roll attitude control and coordinated turning control. For the pseudo aileron and rudder channels, the control law of lateral inner loop is as follows where δ a0 is the pseudo aileron, δ r0 is the pseudo rudder, and k δa and k δr are the proportion of aileron and rudder in the channel, which are related to the roll angular velocity |p| and yaw angular velocity |r|, respectively. There are five circumstances for rudder control structure design, as shown in Table 6 and Figure 9a. Among them, the roll angle hold can be achieved by any control method, but the best control effect is the combination of coordinate turning and PI control of aileron, and the worst is obtained by directly inputting the aileron command to the rudder, with the best control law is loaded into the flight Electronics 2020, 9, 364 12 of 26 controller hardware. In the lateral out loop, L 1 guidance law [23] is applied for trajectory following, as shown in Equation (12). The five roll attitude hold simulations comparison and straight-line path following are shown in Figure 9, and the UAV starts with a given trim state, in which the roll angle command is 25 degrees and the command path is from (0, 50) to (1000, 50). The roll angle command can be quickly tracking due to the absence of direct control of the ailerons, while the lateral trajectory tracking response is slow, but it still can be used in practice.

Actuator
The UAV adopts a digital actuator as the only driving mechanism of its aerodynamic surface to generate control force and moment, since the response time of the actuator is generally much smaller than its time constant. In the initial stage of the controller design, the influence of the actuator can be ignored. However, the dynamic response of the actuator will affect the actual control process in the flight test stage, and the slow response of the servo may cause the entire system to diverge, so the response characteristics of actuator must be considered [24]. In the simulation, the dynamic process of a digital actuator can be regarded as a linear second-order model, with the effects of the dead zone, saturation, clearance, and communication delay [25], and the damping and frequency characteristics are still need to be measured experimentally. The The five roll attitude hold simulations comparison and straight-line path following are shown in Figure 9, and the UAV starts with a given trim state, in which the roll angle command is 25 degrees and the command path is from (0, 50) to (1000, 50). The roll angle command can be quickly tracking due to the absence of direct control of the ailerons, while the lateral trajectory tracking response is slow, but it still can be used in practice.

Actuator
The UAV adopts a digital actuator as the only driving mechanism of its aerodynamic surface to generate control force and moment, since the response time of the actuator is generally much smaller than its time constant. In the initial stage of the controller design, the influence of the actuator can be ignored. However, the dynamic response of the actuator will affect the actual control process in the flight test stage, and the slow response of the servo may cause the entire system to diverge, so the response characteristics of actuator must be considered [24]. In the simulation, the dynamic process of a digital actuator can be regarded as a linear second-order model, with the effects of the dead zone, saturation, clearance, and communication delay [25], and the damping and frequency characteristics are still need to be measured experimentally. The dynamic performance test experiment of the actuator is completed in this paper, as shown in Figure 10, and a sweep frequency function is input through the Nano system. dynamic performance test experiment of the actuator is completed in this paper, as shown in Figure  10, and a sweep frequency function is input through the Nano system.

Simulation Verification
Before implementing the control system on the UAV, the whole system needs to be verified by simulations, including a numerical nonlinear model and hardware-in-the-loop (HIL) validation. The numerical simulation is used to justify the whole platform, aerodynamic, energy, and control system, and to test each phase and state-switching process via a typical mission route [26]. After the numerical simulation verification, combined with the control system hardware and a 6-DOF motion platform, an HILS system is established for typical flight modes, sensor measurement, and control logic.

Numerical Simulation
In the numerical simulation, the conditions are set according to the plateau environment conditions during flight test, a typical mission route was used, and the flight time was December 21, 2018, at 10:57, with an altitude of 5000 m, a mission height of 100 m above the ground level, a temperature of 0 °C , and no wind. The initial capacity of the battery was 70% of the maximum capacity, and the estimated state was used as feedback. The simulation results of the flight path, position, and attitude of different phases are shown in Figure 11, where the estimated state is indicated with a dashed line, and the true state is indicated with a solid line for comparison.  During the experiment process, the actuator receives a 50 Hz PWM signal as an input, and the test time is 50 seconds. The test command is δ cmd = δ max sin f 0 t + kt 2 /2 , in which δ max is 20 degrees, f 0 is 1, and k equals to 0.2, and the transfer function of the actuator can be expressed in Equation (13).

Simulation Verification
Before implementing the control system on the UAV, the whole system needs to be verified by simulations, including a numerical nonlinear model and hardware-in-the-loop (HIL) validation. The numerical simulation is used to justify the whole platform, aerodynamic, energy, and control system, and to test each phase and state-switching process via a typical mission route [26]. After the numerical simulation verification, combined with the control system hardware and a 6-DOF motion platform, an HILS system is established for typical flight modes, sensor measurement, and control logic.

Numerical Simulation
In the numerical simulation, the conditions are set according to the plateau environment conditions during flight test, a typical mission route was used, and the flight time was December 21, 2018, at 10:57, with an altitude of 5000 m, a mission height of 100 m above the ground level, a temperature of 0 • C, and no wind. The initial capacity of the battery was 70% of the maximum capacity, and the estimated state was used as feedback. The simulation results of the flight path, position, and attitude of different phases are shown in Figure 11, where the estimated state is indicated with a dashed line, and the true state is indicated with a solid line for comparison. dynamic performance test experiment of the actuator is completed in this paper, as shown in Figure  10, and a sweep frequency function is input through the Nano system.

Simulation Verification
Before implementing the control system on the UAV, the whole system needs to be verified by simulations, including a numerical nonlinear model and hardware-in-the-loop (HIL) validation. The numerical simulation is used to justify the whole platform, aerodynamic, energy, and control system, and to test each phase and state-switching process via a typical mission route [26]. After the numerical simulation verification, combined with the control system hardware and a 6-DOF motion platform, an HILS system is established for typical flight modes, sensor measurement, and control logic.

Numerical Simulation
In the numerical simulation, the conditions are set according to the plateau environment conditions during flight test, a typical mission route was used, and the flight time was December 21, 2018, at 10:57, with an altitude of 5000 m, a mission height of 100 m above the ground level, a temperature of 0 °C , and no wind. The initial capacity of the battery was 70% of the maximum capacity, and the estimated state was used as feedback. The simulation results of the flight path, position, and attitude of different phases are shown in Figure 11, where the estimated state is indicated with a dashed line, and the true state is indicated with a solid line for comparison.   Figure 11a shows a comparison between the estimated and true flight trajectories. Since the altitude and airspeed are only low-pass filtered, the static bias of the altitude is 12 m, and the airspeed bias is 1 m/s, as shown in Figure 11c, d. Figure 11b shows the change of the attitude angle, 150-250 s is the phase of the hovering mission, the roll angle error range is 3 degrees, and the pitch angle is 2 degrees, which makes the hovering trajectory fluctuate slightly, but the trajectory tracking process remains stable. Figure 11d,e shows that 8 m is a reliable estimation of the heading angle, ground speed, and wind speed ensuring the low-cost platform has a sufficient position accuracy with the trajectory tracking accuracy. The above results show that the accuracy of the longitudinal parameters has less effect on the mission trajectory, while the attitude and heading will have a direct impact, and the attitude angle changes obviously when the state is switched, such as climbing transfer to cruise state, but the position parameters such as ground speed and heading angle remain stable. Besides, the accuracy of the estimated states is shown in Table 7 with the precision sequence in the reverse of the state estimation stages i.e., "position > wind speed > heading/ground speed > attitude > altitude/airspeed". In addition, as shown in Figure 11e, the input energy is slightly greater than the output, the battery is in a balance of charging and discharging, the maximum output power during the climb is 280 W, the cruise power is 64 W, and the energy output will increase obviously during the state-switching process. Therefore, it is possible to increase endurance by reducing state switching in a complete mission.  Figure 11a shows a comparison between the estimated and true flight trajectories. Since the altitude and airspeed are only low-pass filtered, the static bias of the altitude is 12 m, and the airspeed bias is 1 m/s, as shown in Figure 11c,d. Figure 11b shows the change of the attitude angle, 150-250 s is the phase of the hovering mission, the roll angle error range is 3 degrees, and the pitch angle is 2 degrees, which makes the hovering trajectory fluctuate slightly, but the trajectory tracking process remains stable. Figure 11d,e shows that 8 m is a reliable estimation of the heading angle, ground speed, and wind speed ensuring the low-cost platform has a sufficient position accuracy with the trajectory tracking accuracy. The above results show that the accuracy of the longitudinal parameters has less effect on the mission trajectory, while the attitude and heading will have a direct impact, and the attitude angle changes obviously when the state is switched, such as climbing transfer to cruise state, but the position parameters such as ground speed and heading angle remain stable. Besides, the accuracy of the estimated states is shown in Table 7 with the precision sequence in the reverse of the state estimation stages i.e., "position > wind speed > heading/ground speed > attitude > altitude/airspeed". In addition, as shown in Figure 11e, the input energy is slightly greater than the output, the battery is in a balance of charging and discharging, the maximum output power during the climb is 280 W, the cruise power is 64 W, and the energy output will increase obviously during the state-switching process. Therefore, it is possible to increase endurance by reducing state switching in a complete mission.

Stewart Platform (SP) Modeling
HILS is an effective way for the implementation of advanced control law to hardware, which bridges the practical real-time control and the numerical simulation together [27]. Compared with the three-axis motion platform, SP is more open and has a greater advantage in load capacity and space, the UAV can be directly fixed to the platform for a complete HILS experiment, and the platform can perform 6-DOF motions to realize the coupling of linear and angular motion. In this paper, three experimental motion modes are proposed including attitude, angular velocity, and acceleration to test different dynamic characteristics. The Jiwang Mechatronics Company (JWMC)'s motion platform and simulation model used here are shown in Figure 12, and its motion limitations are shown in Table 8.

Stewart Platform (SP) Modeling
HILS is an effective way for the implementation of advanced control law to hardware, which bridges the practical real-time control and the numerical simulation together [27]. Compared with the three-axis motion platform, SP is more open and has a greater advantage in load capacity and space, the UAV can be directly fixed to the platform for a complete HILS experiment, and the platform can perform 6-DOF motions to realize the coupling of linear and angular motion. In this paper, three experimental motion modes are proposed including attitude, angular velocity, and acceleration to test different dynamic characteristics. The Jiwang Mechatronics Company (JWMC)'s motion platform and simulation model used here are shown in Figure 12, and its motion limitations are shown in Table 8.  The SP is limited by its range of motion and cannot simulate feature points in the whole flight envelope, but it can realize the specified frequency and amplitude motion within the limitation, such as short-period or phugoid motion, or specific dynamic processes, such as individual velocity or acceleration simulation. Therefore, the movement of the SP needs to be modeled to predict the attitude and position of the load platform and to verify the expression of the platform for the tested motion. Figure 13 shows the geometry of SP, in which the base platform is fixed to the ground, and the load platform moves according to the length of the six hydraulic struts [28]. Here, we define {P} and {B} as the coordinate systems of the load and the base platform, and Op and Ob as the origins of these two coordinate systems. Thus, the base platform is fixed and the points on the load platform can be represented as vectors in this coordinate system. Let t be a vector from Ob to Op, t = (x y z) T and θ be a Cartesian angle vector of {P} relative to {B}, θ = (α β γ) T , assuming that the vector from  The SP is limited by its range of motion and cannot simulate feature points in the whole flight envelope, but it can realize the specified frequency and amplitude motion within the limitation, such as short-period or phugoid motion, or specific dynamic processes, such as individual velocity or acceleration simulation. Therefore, the movement of the SP needs to be modeled to predict the attitude and position of the load platform and to verify the expression of the platform for the tested motion. Figure 13 shows the geometry of SP, in which the base platform is fixed to the ground, and the load platform moves according to the length of the six hydraulic struts [28]. Here, we define {P} and {B} as the coordinate systems of the load and the base platform, and O p and O b as the origins of these two coordinate systems. Thus, the base platform is fixed and the points on the load platform can be represented as vectors in this coordinate system. Let t be a vector from O b to O p , t = (x y z) T and θ be a Cartesian angle vector of {P} relative to {B}, θ = (α β γ) T , assuming that the vector from the connection point of the load platform to O p is p i , and the vector from the connection point of the base platform to O b is q i . The vector of the connection point from the base to the load platform is Si, which is represented as The hydraulic strut length and unit vector are Since Li is a function of (x, y, z, α, β, γ), with Equation (16) can be further derived as  (17) where the Jacobian matrix can be expressed as

Stewart Platform Hardware-In-the-Loop-Simulation (SPHILS)
The SPHILS system consists of an SP, upper machine for simulation preset, lower machine for model calculation, industrial computer for motion platform drive, in which the flight controller receives the measurement information output control command, and the ground station receives real-time information and sends instructions. This co-simulation system can be used to verify the feasibility of the control system, calibrate the sensor and filter algorithm, and reproduce the typical flight mode. Figure 14 shows the system structure of the SPHILS, which can be divided into three layers: simulation environment, hardware, and output. The real-time simulation environment is built in MATLAB/Simulink, and the upper machine is embedded with a complete system including a controller model, nonlinear dynamics, desktop real-time simulation module, and the SP model. The hardware layer consists of a flight controller and SP, and it communicates with the simulation The vector of the connection point from the base to the load platform is S i , which is represented as The hydraulic strut length and unit vector are Since L i is a function of (x, y, z, α, β, γ), with ω = Equation (16) can be further derived as where the Jacobian matrix can be expressed as

Stewart Platform Hardware-In-the-Loop-Simulation (SPHILS)
The SPHILS system consists of an SP, upper machine for simulation preset, lower machine for model calculation, industrial computer for motion platform drive, in which the flight controller receives the measurement information output control command, and the ground station receives real-time information and sends instructions. This co-simulation system can be used to verify the feasibility of the control system, calibrate the sensor and filter algorithm, and reproduce the typical flight mode. Figure 14 shows the system structure of the SPHILS, which can be divided into three layers: simulation environment, hardware, and output. The real-time simulation environment is built in MATLAB/Simulink, and the upper machine is embedded with a complete system including a controller model, nonlinear dynamics, desktop real-time simulation module, and the SP model. The hardware layer consists of a flight controller and SP, and it communicates with the simulation system through RJ45 and COM ports to express motion. The ground station and external servos are the output layer and obtain the measurement parameters and control commands. system through RJ45 and COM ports to express motion. The ground station and external servos are the output layer and obtain the measurement parameters and control commands. Figure 15 shows an open-loop and a closed-loop experimental scheme of the real HILS system. The open-loop experiment is a process from the upper computer to the ground station, which is a unidirectional structure and tests the limit states in the process of simulation, such as acceleration and angular velocity exceeding the limit, and it also verifies the consistency of the instructions between the flight controller and simulation model. The closed-loop experiment is a structure of feedback, in which the real measured value of the sensor is input into the simulation model of the upper machine instead of the simulation model of sensor; then, the sensor measurement and the state estimation algorithm of the dynamic process can be verified.  The attitude angle and position in the simulation model are relative to the aircraft body coordinate system Oxbybzb, which is different from the platform's own coordinate system OxSySzS, and it is shown as follows.
As shown in Figure 16, the conversion relationship between the SP coordinate system and UAV body coordinate system can be obtained as follows:  The open-loop experiment is a process from the upper computer to the ground station, which is a unidirectional structure and tests the limit states in the process of simulation, such as acceleration and angular velocity exceeding the limit, and it also verifies the consistency of the instructions between the flight controller and simulation model. The closed-loop experiment is a structure of feedback, in which the real measured value of the sensor is input into the simulation model of the upper machine instead of the simulation model of sensor; then, the sensor measurement and the state estimation algorithm of the dynamic process can be verified.
Electronics 2020, 9, x FOR PEER REVIEW 17 of 26 system through RJ45 and COM ports to express motion. The ground station and external servos are the output layer and obtain the measurement parameters and control commands. Figure 15 shows an open-loop and a closed-loop experimental scheme of the real HILS system. The open-loop experiment is a process from the upper computer to the ground station, which is a unidirectional structure and tests the limit states in the process of simulation, such as acceleration and angular velocity exceeding the limit, and it also verifies the consistency of the instructions between the flight controller and simulation model. The closed-loop experiment is a structure of feedback, in which the real measured value of the sensor is input into the simulation model of the upper machine instead of the simulation model of sensor; then, the sensor measurement and the state estimation algorithm of the dynamic process can be verified.  The attitude angle and position in the simulation model are relative to the aircraft body coordinate system Oxbybzb, which is different from the platform's own coordinate system OxSySzS, and it is shown as follows.
As shown in Figure 16, the conversion relationship between the SP coordinate system and UAV body coordinate system can be obtained as follows: The attitude angle and position in the simulation model are relative to the aircraft body coordinate system Ox b y b z b , which is different from the platform's own coordinate system Ox S y S z S , and it is shown as follows.
As shown in Figure 16, the conversion relationship between the SP coordinate system and UAV body coordinate system can be obtained as follows: Electronics 2020, 9, x FOR PEER REVIEW 18 of 26

Experiment Design
In order to verify the stable measurement and control of the flight controller in the complete envelope, the above SPHILS system is used for control system experiment. Although the range and velocity are limited, the movement can be decomposed to a single direction to ensure that the test parameters do not exceed the platform limitation. In the paper, the parameters of aircraft are classified according to the response speed; for example, the acceleration is the most direct, the next is the linear or angular velocity, and the last is the position and attitude. Thus, three experiment modes are proposed including acceleration, angular velocity, and attitude. The acceleration mode focuses on the load simulation, the angular velocity mode is for each flight mode, and the attitude mode is a single-point test to calibrate the measurement of the controller.

Acceleration Mode
In the acceleration mode experiment, only a single acceleration movement in a certain direction is carried out to verify the limit overload of the aircraft and calibrate the measurement of angular velocity in the dynamic process. When the aircraft is fixed on the platform, this mode can be used to test the limit frequency and amplitude of structural strength. Figure 17 shows the test results under 50 and 100 °/s 2 angular acceleration, in which the solid line is the input of the upper machine, and the dotted line is the measurement of the flight controller. The delay time of the open-loop experiment is 100 ms, and the closed loop is increased to 500 ms due to the feedback of the controller hardware; so, the acceleration mode requires the system to have a fast response and can only be tested in the open-loop experiment. Results show that the control system can withstand a 100°/s 2 vibration, and the pitch angle and angular velocity can be accurately measured. The movement in this mode is gradually divergent, and it can be regarded as an unstable state in practice. In addition, the whole process of oscillation divergence can be reproduced by the experiment.

Experiment Design
In order to verify the stable measurement and control of the flight controller in the complete envelope, the above SPHILS system is used for control system experiment. Although the range and velocity are limited, the movement can be decomposed to a single direction to ensure that the test parameters do not exceed the platform limitation. In the paper, the parameters of aircraft are classified according to the response speed; for example, the acceleration is the most direct, the next is the linear or angular velocity, and the last is the position and attitude. Thus, three experiment modes are proposed including acceleration, angular velocity, and attitude. The acceleration mode focuses on the load simulation, the angular velocity mode is for each flight mode, and the attitude mode is a single-point test to calibrate the measurement of the controller.

Acceleration Mode
In the acceleration mode experiment, only a single acceleration movement in a certain direction is carried out to verify the limit overload of the aircraft and calibrate the measurement of angular velocity in the dynamic process. When the aircraft is fixed on the platform, this mode can be used to test the limit frequency and amplitude of structural strength. Figure 17 shows the test results under 50 and 100 • /s 2 angular acceleration, in which the solid line is the input of the upper machine, and the dotted line is the measurement of the flight controller. The delay time of the open-loop experiment is 100 ms, and the closed loop is increased to 500 ms due to the feedback of the controller hardware; so, the acceleration mode requires the system to have a fast response and can only be tested in the open-loop experiment. Results show that the control system can withstand a 100 • /s 2 vibration, and the pitch angle and angular velocity can be accurately measured. The movement in this mode is gradually divergent, and it can be regarded as an unstable state in practice. In addition, the whole process of oscillation divergence can be reproduced by the experiment.

Angular Velocity Mode
The angular velocity mode is a fixed frequency and amplitude simulation, and it can be used for both open-loop and closed-loop experiments of typical flight modes as shown in Table 5, as well as a calibration of angular velocity measurement and attitude estimation. In this paper, the frequencies of 0.15 and 0.012 Hz are used as short period and phugoid for open-loop and closed-loop experiments, as shown in Figure 18.  Figure 18a,b shows that SP can achieve an accurate tracking of pitch angle; there is a small error in pitch angular velocity tracking, and the attitude angle input is consistent with the measurement. In the closed loop as shown in Figure 18c, as the measurement state feedback to the upper machine, the amount of calculation becomes larger, and the motion exhibits a certain delay. The experiment frequency of the closed loop is the same as that of the input, but the amplitude increases by nearly 30%. Combined with Figure 18d, the closed-loop experiment also shows that the  Table 5, as well as a calibration of angular velocity measurement and attitude estimation. In this paper, the frequencies of 0.15 and 0.012 Hz are used as short period and phugoid for open-loop and closed-loop experiments, as shown in Figure 18.

Angular Velocity Mode
The angular velocity mode is a fixed frequency and amplitude simulation, and it can be used for both open-loop and closed-loop experiments of typical flight modes as shown in Table 5, as well as a calibration of angular velocity measurement and attitude estimation. In this paper, the frequencies of 0.15 and 0.012 Hz are used as short period and phugoid for open-loop and closed-loop experiments, as shown in Figure 18.  Figure 18a,b shows that SP can achieve an accurate tracking of pitch angle; there is a small error in pitch angular velocity tracking, and the attitude angle input is consistent with the measurement. In the closed loop as shown in Figure 18c, as the measurement state feedback to the upper machine, the amount of calculation becomes larger, and the motion exhibits a certain delay. The experiment frequency of the closed loop is the same as that of the input, but the amplitude increases by nearly 30%. Combined with Figure 18d, the closed-loop experiment also shows that the  Figure 18a,b shows that SP can achieve an accurate tracking of pitch angle; there is a small error in pitch angular velocity tracking, and the attitude angle input is consistent with the measurement. In the closed loop as shown in Figure 18c, as the measurement state feedback to the upper machine, the amount of calculation becomes larger, and the motion exhibits a certain delay. The experiment frequency of the closed loop is the same as that of the input, but the amplitude increases by nearly 30%. Combined with Figure 18d, the closed-loop experiment also shows that the amplitude increases obviously in the state change process. Compared with the numerical simulation, the dynamic process of the state change in practice will have a certain delay, and the amplitude will be enlarged or reduced. By adjusting the dynamic characteristics of the SPHIL, such as adding a given delay process or amplitude limit to the acceleration or velocity of the platform, it can reproduce the actual motion characteristics and reduce the gap between the numerical simulation and the real flight.

Attitude Mode
The attitude mode is a simulation based on the state points in the whole flight process, as shown in Figure 19, and there are four constant states in different missions. Compared with the first two experiments, the attitude mode is static and can be used to verify the control logic of each point. By comparing the real output of the controller with the model output, the gain parameters and measurement accuracy of the controller are further calibrated.
Electronics 2020, 9, x FOR PEER REVIEW 20 of 26 amplitude increases obviously in the state change process. Compared with the numerical simulation, the dynamic process of the state change in practice will have a certain delay, and the amplitude will be enlarged or reduced. By adjusting the dynamic characteristics of the SPHIL, such as adding a given delay process or amplitude limit to the acceleration or velocity of the platform, it can reproduce the actual motion characteristics and reduce the gap between the numerical simulation and the real flight.

Attitude Mode
The attitude mode is a simulation based on the state points in the whole flight process, as shown in Figure 19, and there are four constant states in different missions. Compared with the first two experiments, the attitude mode is static and can be used to verify the control logic of each point. By comparing the real output of the controller with the model output, the gain parameters and measurement accuracy of the controller are further calibrated. The combination of three modes can verify the flight envelope and boundary state, calibrate the measurement error of the sensor and the result of state estimation, and test the feasibility of the whole system; the angular velocity mode can also be regarded as a combination of multiple attitude modes. The angular velocity and attitude modes can be used to simulate the states in the envelope, and the acceleration mode is used to simulate the boundary and oscillation divergence states. Table  9 is a summary of the characteristics of three modes.  The combination of three modes can verify the flight envelope and boundary state, calibrate the measurement error of the sensor and the result of state estimation, and test the feasibility of the whole system; the angular velocity mode can also be regarded as a combination of multiple attitude modes. The angular velocity and attitude modes can be used to simulate the states in the envelope, and the acceleration mode is used to simulate the boundary and oscillation divergence states. Table 9 is a summary of the characteristics of three modes.

Field Flight Test
The above simulation process is a preliminary and a laboratory test of the whole system; due to the lack of position and velocity information, a field test is necessary for the whole system verification. The target mission areas of the UAV are Qiangtang and Hoh Xil, Tibet, the flight conditions are high altitude, low temperature, low pressure, and limited flight area, and the field test flight is divided into two stages of low and high altitude to fully verify the design scheme and compare the difference caused by high altitude in detail. To ensure the experiment consistency, the power and payload conditions of UAV are the same in the two experiments. The low-altitude test site was located in Xi'an (34.033 E, 109.100 N) with a height of 635 m, the time was November 29, 2018, 13:00, and the temperature was 6 • C; the high-altitude test was in Qiangtang (31.988 E, 87.317 N) with a height of 4554 m, and it was at the time the same as the numerical simulation. The temperature difference due to the altitude difference was approximately −15 • C during winter, the take-off speed increased from 8.5 to 11.5 m/s, and the cruise speed increased from 10 to 11.5 m/s.

Flight Results
The field tests at low and high altitudes are shown in Figure 20. Figure 21 shows the flight data in the cruise phase of a four-sided rectangular mission route. The UAV has no landing gear and fuselage touches the ground directly, and it takes off from the car by hand, and the state bus for communication with the ground station includes speed, height, position, attitude, and commands. According to Figure 21a,b, the accuracy of the longitudinal parameters of high and low altitude is closed, the height error precision is nearly 8 m, the airspeed is nearly 4 m/s, and the pitch angle is nearly 3 degrees. It is found that the wind speed at high altitude is close to 10 m/s, while that at low altitude is 3 m/s, which causes an obvious deviation in heading accuracy. The error of yaw angle in high altitude is 10.3 degrees, which is twice of that in the low area. In the state estimation module, the first two stages of the estimation aimed at improving the accuracy of the attitude for the UAV without aileron, a stable roll angle estimation, and control ensuring that the system has the ability of autonomous flight. The roll angle error accuracy of the two altitudes is approximately 6.5 degrees, and the trajectory accuracies are respectively 23 m and 44 m, which meet the design requirements.

Field Flight Test
The above simulation process is a preliminary and a laboratory test of the whole system; due to the lack of position and velocity information, a field test is necessary for the whole system verification. The target mission areas of the UAV are Qiangtang and Hoh Xil, Tibet, the flight conditions are high altitude, low temperature, low pressure, and limited flight area, and the field test flight is divided into two stages of low and high altitude to fully verify the design scheme and compare the difference caused by high altitude in detail. To ensure the experiment consistency, the power and payload conditions of UAV are the same in the two experiments. The low-altitude test site was located in Xi'an (34.033 E, 109.100 N) with a height of 635 m, the time was November 29, 2018, 13:00, and the temperature was 6 °C; the high-altitude test was in Qiangtang (31.988 E, 87.317 N) with a height of 4554 m, and it was at the time the same as the numerical simulation. The temperature difference due to the altitude difference was approximately -15 °C during winter, the take-off speed increased from 8.5 to 11.5 m/s, and the cruise speed increased from 10 to 11.5 m/s.

Flight Results
The field tests at low and high altitudes are shown in Figure 20. Figure 21 shows the flight data in the cruise phase of a four-sided rectangular mission route. The UAV has no landing gear and fuselage touches the ground directly, and it takes off from the car by hand, and the state bus for communication with the ground station includes speed, height, position, attitude, and commands. According to Figure 21a,b, the accuracy of the longitudinal parameters of high and low altitude is closed, the height error precision is nearly 8 m, the airspeed is nearly 4 m/s, and the pitch angle is nearly 3 degrees. It is found that the wind speed at high altitude is close to 10 m/s, while that at low altitude is 3 m/s, which causes an obvious deviation in heading accuracy. The error of yaw angle in high altitude is 10.3 degrees, which is twice of that in the low area. In the state estimation module, the first two stages of the estimation aimed at improving the accuracy of the attitude for the UAV without aileron, a stable roll angle estimation, and control ensuring that the system has the ability of autonomous flight. The roll angle error accuracy of the two altitudes is approximately 6.5 degrees,   The flight parameters of four typical phases are shown in Table 10. The increase in altitude reduces the air density, the airspeed increases by 10%, the motor power increases by 40%, and the attitude amplitude is twice the low altitude. The reduction of propeller thrust and the increase of take-off speed will influence the take-off mode, so the car launching take-off is the only mode. Since the light intensity in the plateau region is about twice as strong as that in the low altitude, the endurance is approximately the same. The results show that the UAV has the capability of autonomous flight at high attitude, the altitude precision is less than 10 m, and the positioning precision is less than 50 m/km 2 . The flight parameters of four typical phases are shown in Table 10. The increase in altitude reduces the air density, the airspeed increases by 10%, the motor power increases by 40%, and the attitude amplitude is twice the low altitude. The reduction of propeller thrust and the increase of take-off speed will influence the take-off mode, so the car launching take-off is the only mode. Since the light intensity in the plateau region is about twice as strong as that in the low altitude, the endurance is approximately the same. The results show that the UAV has the capability of autonomous flight at high attitude, the altitude precision is less than 10 m, and the positioning precision is less than 50 m/km 2 .   is more in line with the actual situation [29]. After the field test, the flight data can be used to verify the correctness of the system model and to calibrate the key parameters of the modeling. Using the parameters in the cruise state as a reference, the flight data can be used to calibrate the longitudinal lift-drag model, sensor, and state estimation module. The longitudinal lift, drag coefficient curves, and elevator influence are shown in Figure 22, and the effect of the elevator on lift and drag is calculated by its derivatives, C L δe and C D δe . The design point of the maximum lift-to-drag ratio is 0 to 4 degrees angle of attack, and the UAV cruises in this state. Considering the cost of the experiment, no airflow angle sensor is installed in the control system.

Model Calibration
Simulation and model correction are mutually reinforcing processes. The former is to predict the final result through a general rule, and the latter is a reverse process to ensure that the prediction result is more in line with the actual situation [29]. After the field test, the flight data can be used to verify the correctness of the system model and to calibrate the key parameters of the modeling. Using the parameters in the cruise state as a reference, the flight data can be used to calibrate the longitudinal lift-drag model, sensor, and state estimation module.
The longitudinal lift, drag coefficient curves, and elevator influence are shown in Figure 22, and the effect of the elevator on lift and drag is calculated by its derivatives, CL δe and CD δe . The design point of the maximum lift-to-drag ratio is 0 to 4 degrees angle of attack, and the UAV cruises in this state. Considering the cost of the experiment, no airflow angle sensor is installed in the control system.  Based on the windless assumption, when the UAV is in the vertical plane, the relationship among climb angle γ , pitch angle θ , and angle of attack α is  γ θ α , and in the cruise phase,  Table 11. The force coefficient is divided into model and real; the former is obtained from the Computational Fluid Dynamics (CFD) results, and the latter is the reverse calculation result based on the balanced state. Then, the real data can be used to calibrate that of the model. The results show that the model lift coefficient is 14.5% larger and the drag coefficient is 20% smaller than that of the real. With the increase of height, the lift-drag ratio decreases by 27%.  Based on the windless assumption, when the UAV is in the vertical plane, the relationship among climb angle γ, pitch angle θ, and angle of attack α is γ = θ − α, and in the cruise phase, γ ≈ 0, leading to θ ≈ α, and the longitudinal balance equation is given T P cos α = D T P sin α + L = mg M + T P l z = 0 (20) where L, D, and M are the lift, drag, and pitching moment, and l z is the vertical distance from the center of the propeller to the center of gravity. Aerodynamic force can be calculated by the force coefficient, dynamic pressure, and wing area, and the force coefficient is a function of the UAV flight state, C i = f i (H, V a , θ, δ e ). The cruise state parameters of the two flights and the longitudinal aerodynamic force coefficients are shown in Table 11. The force coefficient is divided into model and real; the former is obtained from the Computational Fluid Dynamics (CFD) results, and the latter is the reverse calculation result based on the balanced state. Then, the real data can be used to calibrate that of the model. The results show that the model lift coefficient is 14.5% larger and the drag coefficient is 20% smaller than that of the real. With the increase of height, the lift-drag ratio decreases by 27%. Except for the basic aerodynamic force correction, the dynamic error of the IMU can also be corrected by the real measurement during the flight. A Finite Impulse Response (FIR) filter is applied to filter the measurement data as a reference state, and the noise and bias in the model can be calibrated by the relationship between the range and mean value of the measured and filtered data, shown as follows where the subscripts m and f represent the measured and filtered data. The measurement noise and bias of the IMU are shown in Table 12, and the error and noise in Table 2 are the same in the xyz direction, but the acceleration in the x direction and the angular velocity in the y direction are obviously greater than that of the other two directions, and the noise in the corresponding direction is also greater.
With the increase of altitude, the noise increases and the deviation decreases, which can be regarded as a function of altitude and airspeed, but the sensor bias is almost constant and it can be regarded as a function of temperature.

Conclusions
The paper presents an evolutionary stage in the development of an aileron-less low-cost LALE solar-powered UAV from the concept of flight control design to the real-life field test. The modeling process is complete, and the component-level modeling method of energy and flight control system can take more parameters and influences into account, which has reference significance for small solar aircraft.
A complete verification process from numerical simulation to HILS to field test shows that the accuracy sequence of state parameters and energy balance process of the simulation process are consistent with the actual flight. Based on the simulation model and Stewart platform, a novel SPHIL experiment is established, and three experiment modes of acceleration, angular velocity, and attitude are designed to test the inner and boundary states of the flight envelope. Besides, the HILS system can be used to calibrate the measurement of the low-cost sensor, verify the accuracy of the control command, and reproduce the typical flight states.
The flight test at different altitudes is the verification of modeling and simulation, which shows that the UAV scheme meets the design requirements. Combined with the filtered results, the aerodynamic force coefficients and sensor measurement error can be further calibrated. As the altitude increases, the control accuracy of the attitude angle is twice that of the low altitude, the precision of the heading angle is unchanged, the trajectory accuracy is increased by a factor of approximately two, the cruising power increases by 66%, the model lift coefficient is 14.5% larger, the drag coefficient is 20% smaller, and the measurement noise of the sensor increases. Future work will focus on the exploration of long-endurance hardware reliability and the environmental adaptability of the UAV.