Research on Innovative Trim Method for Tiltrotor Aircraft Take- Off Based on Genetic Algorithm

Tiltrotor aircraft possesses redundant actuators in take-off phase and its flight control is more complicated than ordinary aircraft because the structural and dynamic characteristics keep changing due to tilting rotors. One of the fundamental bases for flight control is trim, which provides steady flight states under various conditions and then constructs the reference trajectory. Tiltrotor aircraft trim models are described by multivariate nonlinear equations whose initial values are difficult to determine and bad initials could lead to incorrect solution for flight control. Therefore, an innovative trim method is proposed to solve this issue. Firstly, genetic algorithm (GA), which possesses strong capability in searching global optimum, is adopted to identify a coarse solution. Secondly, the coarse solution is further refined by the Levenberg-Marquardt (LM) method for precise local optimum. The innovative trim method combines the advantages of these two algorithms and is applied to a tiltrotor aircraft’s flight control in the transition process of incline take-off. The limitation of trajectory is discussed, and tilt corridor is constructed. Finally, the incline take-off simulations are conducted and the effectiveness of the proposed trim method is verified through good match with the designed reference trajectory.


Introduction
Tiltrotor aircraft which is capable of taking-off/landing vertically and cruise at high speed simultaneously combines the advantages of rotorcraft and fixed-wing aircraft. These characteristics make tiltrotor aircraft a research hotspot for recent years [1][2][3]. Tilt rotors provide the aircraft with the ability of vector tension, which not only expands its operating conditions but also entangles its flight control [4,5]. In the process of rotor tilting, it is very important yet very difficult to implement the stability control of aircraft attitudes. The adjustment of the rotor tilt angle during take-off or landing causes significant changes in the structural and mechanical properties of the aircraft, eventually resulting in obvious changes in flight control parameters. Under such circumstances, accidents are more likely to happen during take-off or landing [6][7][8][9][10].
To achieve attitude stabilization, trim is needed, which is applied to determine the steady flight states in the design of the flight control algorithms. The equilibrium states of the aircraft play an important role in aircraft attitude response calculation, stability analysis, and flight control law design [11]. After trim then come the flight simulation and parameter adjustment for better flight performance [12]. However, since the tiltrotor aircraft has more actuators (control planes and propellers) than ordinary fixed-wing aircraft or rotorcraft, the aerodynamic of tiltrotor aircraft is more complex, which leads to the trim of the tiltrotor aircraft being more complicated and difficult than that of ordinary aircrafts [13]. Especially in the stage of rotor tilting when take-off or landing, the aircraft is controlled through both the direct force provided by the rotating propellers and the aerodynamic force derived from control planes. The actuator redundancy and force complexity lead to difficulty in attitude stabilization, which in turn demands more for trim. Traditional trim methods designed for ordinary aircrafts reveal the disadvantages such as lower efficiency and poor robustness. Therefore, a more efficient, robust, and accurate trim method is needed in the design of tiltrotor aircraft fight control.
In the process of trim, it is required to solve the multivariable time-varying nonlinear equations whose initial values are difficult to determine, and the globally optimal solutions are usually not unique. Several traditional methods such as the Newton method, gradient descent method, and Levenberg-Marquardt (LM) method have been used in trim [14][15][16], but they are so dependent on the initial values that tiny difference may lead to the locally optimal solution rather than the globally optimal solution. Besides, inaccurate initial values increase the number of iterations or even cause divergence of the solution. Genetic algorithm (GA) is capable of searching the optimal solution effectively in global scope and achieving a robust convergent in wide range, which is suitable for solving complex nonlinear optimization problems [17,18]. However, GA's ability of local search for optimum is weak, so the premier results derived from GA should be further promoted. They can be applied as the initial values for the traditional nonlinear programming algorithms for better local search performance. Combined with their respec-tive advantages, the globally optimal solution for nonlinear problems can be obtained in a fast, robust, and accurate way.
In this paper, an innovative trim method for tiltrotor aircraft is proposed. Firstly, GA is adopted in the primary trim procedure to achieve a coarse solution in global scale, and secondly, the coarse solution is assigned as the initial value of the LM method for more precise local solution. In this way, GA's solution guarantees the optimality of the solution in global scale while LM's solution insures the precision of the solution in local scale. Hence, the nonlinear trim equations can be solved efficiently, robustly, and precisely. Finally, the proposed innovative trim method is verified through flight simulation of the tiltrotor aircraft under the reference take-off trajectory.

Mechanical Model
The tiltrotor aircraft studied in this paper, JDW-1-1, is an electric blended wing body (BWB) Unmanned Aerial Vehicle designed and manufactured by our team as shown in Figure 1. JDW-1 has several emerging technologies that make   Journal of Sensors it an advanced and unique aircraft. First, the tiltrotors give JDW-1 the ability to take off and land without a runway, the flexibility being improved. Second, the blended wing body (BWB) configuration provides good stealth and relative high lift-to-drag ratio at the same time. Finally, JDW-1 is purely electric powered without any combustion engines, so the flight control efficiency is higher and more environmentally favorable. JDW-1 has two main propellers which can be tilted continuously by steering engines on both tips of the wings and a supplementary shrouded propeller at the tail for pitch stabilization when taking off or landing. The supplementary shrouded propeller can also be tilted along the lateral axis of the aircraft, but the range of tilt angle is only from −π/6 to π/6. Besides, it has two flaps for attitude control in level flight. Based on this structure, the mechanical model is detailed in the following aspects.
2.1. Coordinate System. The aerodynamic forces and moments are defined in airflow frame while the forces and moments of rotors are computed in rotor frame. Besides body frame and navigation frame also need to be set up in the mechanical model of six degree of freedom (DOF). A series of coordinate systems (CSs) are presented in Figure 2. The five CSs are the navigation CS O n − X n Y n Z n , body CS O n − X n Y n Z n denotes the navigation frame which coincides with the geographic frame, north east and down (NED).
denotes the aircraft body frame. O b is at the center of gravity, X b is pointing to the front of the aircraft, Y b is pointing right, and Z b is defined by the right-hand rule. The rotation from NED to the body CS is defined by Euler angles.
O w − X w Y w Z w denotes the air speed direction. O w is at the center of gravity, X w is pointing at the direction of airspeed V a , Z w is pointing down of the aircraft, and Y b is defined by the right-hand rule. Rotation from the body CS to the airflow CS is defined by the angle of attack α and sideslip β.
O mi − X mi Y mi Z mi ði = 1,2,3Þ are the rotor coordinates system which are fixed with three rotor engines, respectively, and tilt with them as shown below.

Dynamic Equations.
The tiltrotor aircraft is assumed to be symmetrical relative to the plane X b O b Z b of the body CS while ignoring the centroid changes caused by the rotor tilting. According to Newton's second law, F being the external force acting on the airplane's center of mass and m being the mass of the aircraft, their relationship can be shown as follows: where δV/δt = _ ui + _ vj + _ wk, where V is the aircraft speed in the body CS and u, v, w are the projection of V in the body CS. ω = pi + qj + rk are the projections of the angular velocity of the body in the body CS. The component form is as follows: According to Euler's equation of rotation M = I _ ω + ω × Iω = I _ ω + ΩIω, the external moment M is derived in a component form as follows: Equations (2) and (3) are the six degree of freedom dynamic equations for tiltrotor aircraft.
where T r is the tension provided by the rotor and α r is the tilt angle with the rotor pointing vertically being π/2 and horizontally being 0. x r , y r , and z r are the distances between the rotor and body center. The aerodynamic forces and moments acting on the tiltrotor aircraft, such as lift force L w , resistance D w , lateral force C w , rolling moment L A , pitching moment M A , and yaw moment N A in the airflow CS are calculated in the airflow CS and then converted into the body CS. Since part of the wing is under the main propeller when it is pointing vertically, the propeller's wake will aerodynamically interfere with the wing [19,20]. Therefore, it is necessary to divide the wing area into slipstream zone and slipstream free zone to analyze the aerodynamic forces and moments, respectively. As shown in Figure 3, the slipstream zone refers to the area directly affected by the propeller's wake, while the free zone refers to the area unaffected. According to References [21,22], the area of slipstream zone is the largest when the tiltrotor aircraft is vertically taking off and landing. When the rotor tilt angle is less than π/6, the area of the slipstream zone is 0. In practice, the slipstream area can be calculated approximately according to the following formula: where S max = 2η sr R r c W is the maximum area of slipstream zone, namely, the area swept by the rotor's radius on the wing when the aircraft is hovering; η sr is the slipstream correction factor; and u max is the maximum x component speed in body CS. Parameters a and b yield the following constraints and can be obtained numerically: a = 1:386 and b = 3:114.
sin a π 2 + cos b π 2 = 1, sin a π 3 + cos b π 3 = 0: Assume the right wing area of the aircraft is S wr while the area of slipstream-free zone is S wf r = S wr − S wsr . The coordinates of the aerodynamic pressure centers of the slipstream zone and slipstream free zone on the right wing are ðx wsr , y wsr , z wsr Þ and ðx wf r , y wf r , z wf r Þ, respectively. Then, the velocity of the slipstream zone and slipstream free zone at this point can be expressed as follows: where the skew symmetric matrix is defined and u if s and w if s are the decomposition of the inter-ference of the propeller wake to the wing in the body CS. Then, the angle of attack, sideslip of slipstream zone, and slipstream free zone of the wing can be calculated as follows: Then, the force and moment generated by the right wing that determine the attitude of the aircraft are given by where l wr is the mean geometric chord length of the right wing. In addition, since lateral force C w , rolling moment L A , and yaw moment N A are less affected by the wake, a  Journal of Sensors formula without interference of the wake can be expressed as follows: Finally, the determined angle of attack and the side slip angle and the force and moment generated by the left and right wings are converted into the body CS.   Figure 4. The parameters to be solved are encoded to represent as chromosomes. One unsolved parameter corresponds to one chromosome, and all chromosomes constitute an individual, namely, a full state, which is a whole set of solution to equations. At the beginning, several individuals are randomly generated within the boundaries as the initial population. Then, selection, crossover, mutation, and other operations are carried out by an iterative method to exchange chromosome information. Better individuals are screened according to the fitness of the chromosomes. Finally, the chromosomes that meet the optimization target are generated.

Trim States.
We demonstrate the trim results by taking the flight states when its rotor tilt angle is 50°as an example, since both vertical and the horizontal states are involved, making it a representative case. The trim states to be determined include the synchronous tilt angles of the main rotors α m = α r = α l , differential tilt angles of the main rotors β m = −β r = β l , tensions of both main propellers T l and T r , tension and the tilt angle of the back supplementary shrouded propeller T b and α b , translational angle δ t and differential angle δ d of the aileron, and airspeed V a and three aircraft attitudes, namely, pitch, roll, and yaw. The vector with a total of 12 states is as follows:    Journal of Sensors As the aircraft does not achieve enough airspeed when the tilt angle of main rotor is 50 degrees, the control efficiency of the supplementary shrouded propeller is relatively low. Therefore, it is assumed that its tension T b and its inclination angle α b are 0. For providing an appropriate angle of attack, assume that the aircraft's pitch is fixed at this time and the yaw is 0. For convenience, the tension of the two main rotors is expressed as the translational tension of main propellers T m = ðT r + T l Þ/2 and their differential tension T n = ðT r -T l Þ/2. For instance, if both the tilt angles of main rotors are 50 degrees, the translational tilt angle α m = 50°and the differential tilt angle α n = 0. The parameters to be trimmed can be expressed as follows: As the states are the solution to the equations in the format of float real number, the encoding and decoding for the trim GA are very simple that the chromosomes are the states directly.

Trim Fitness Function.
According to the dynamic equations, the forces and moments generated by each rotor when the tilt angle of main rotor is 50 degree are expressed in the body CS. Þcos 50°− x r T r + x l T l ð Þsin 50°y r T r cos 50°+ y l T l cos 50°2 Aerodynamic forces and moments can be expressed in the body CS as follows: where the angle of attack α w = 2°and sideslip angle β w = 0.
Combined force and moment of the aircraft can be introduced as follows: T y = T ey + T wy + T gy , When the resultant forces and moments are zeros, the aircraft is in trim state. Therefore, the fitness function is set to be the sum of the squares of all the resultant forces and the moments as follows: 3.4. Trim Optimization Settings and Results. As the GA parameters have impact on the optimization result, they are adjusted with an experimental design method [23] and some comparisons are made here. The GA solver of optimization toolbox in Matlab is adopted to realize the trim GA optimization. The fitness function with 6 states is established as a previous chapter describes. According to the specific situation of the tiltrotor aircraft, the lower and upper boundaries are as follows: Since fixed pitch propellers are used in the JDW-1-1, only one-direction tensions can be provided, so the translational tension of main propellers T m is between 0 N and -500 N in the rotor coordinate system while the differential tension is between 500 N and -500 N. The roll, translational angle δ t , and differential angle δ d of the aileron are all constrained between -10 degree and 10 degree for flight safety.
The population size is set to 200, and the maximum limit of evolutionary algebra is 400. The crossover probability is 0.6, and the elite number is 50. The elite preservation strategy is that elites are guaranteed to survive to the next generation.
In order to remove the effect of the spread of the Fitness Function raw scores, the rank of the scores is adopted for fitness scaling rather than the score itself.
The mutation probability is not just a simple fixed ratio but a mutation function provided by Matlab. For the mutation function, adaptive feasible mode is selected, which randomly generates directions that are adaptive with respect to the last successful or unsuccessful generation. A step length is chosen along each direction so that boundaries are satisfied.  Journal of Sensors The crossover function of scattered is chosen, in which a randomly generated binary vector determines how the crossover is conducted. The crossover algorithm selects the genes where the binary vector is a 1 from the first parent and the genes where the vector is a 0 from the second parent and combines the genes to form the child.
For the selection function, the mode of stochastic uniform is chosen, which lays out a line in which each parent corresponds to a section of the line of length proportional to its expectation. The algorithm moves along the line in steps of equal size, one step for each parent. At each step, the algorithm allocates a parent from the section it lands on. The first step is a uniform random number less than the step size.
The GA trim results are shown in Figure 5. According to the GA results, its fitness value continuously drops down and reaches nearly zeros after around 9 Journal of Sensors ary algebra is 400, the deviation of mean fitness between two generations is less than 1 × 10 −5 , when the generation reaches 262, so GA terminates and provides final optimization results.
The best individual, namely, the globally optimal solution of trim state, is as follows: : ð21Þ From Figure 5, the average distance between individuals reaches nearly 0 after 150 generations, indicating that the GA algorithm achieves good convergence. The worst and mean scores drop quickly in the first 60 generations, showing that the GA algorithm converges rapidly. The last subfigure shows the distribution of selection function, namely, the number of children of each individual for the second last generations. The children are generated mainly by the first 50 elites. In summary, the GA trim results achieve good convergence and succeed in providing a globally optimal solution. Some comparisons are made with different GA parameters.
(1) Size of population: the size of population does not affect the optimization result much once it is more than 100. However, less than 100 populations do achieve a poor result. The trim results when the population is 60, 100, 200, and 500 are summarized in Table 1. Other parameters are fixed as previously stated. It is obvious that the differences of the final solution among the population of 100, 200, and 500 are negligible. However, the convergence speed is lower for 100 population case, as Figure 6 shows, compared with the first subfigure of Figure 5. Besides, the generation reaches 340, which also indicates poorer convergence performance for the case of 100 3.5. Tilt Corridor Design for Tiltrotor Aircraft Take-Off. Based on the innovative trim method proposed previously, the equilibrium flight states, for instance, airspeed, tensions of the rotors, and angles of flaps, can be determined under different tilting angles on a condition that proper actions are taken by the flight controller. However, the aircraft cannot always be in a "trimmed state" but also the "transition state". Therefore, the limitations of the flight states should also be determined in order to keep the tiltrotor aircraft under control. For example, when the tiltrotor aircraft is changing the tilt angle, if the airspeed is too low but the tilt angle too small, namely, the rotor tension pointing horizontally too much, the altitude of the aircraft will decrease rapidly, and even worse, the stall will occur since the lift is not enough; On the other hand, due to the limitation of rotor performance and aircraft aerodynamic characteristics, there are maximums for the airspeed and external forces applied to the aircraft. In order to provide limitations for the transition states and the reference for the design of the flight trajectory, it is necessary to specify the relationship between the airspeed and the rotor tilt angle, which creates a rotor tilt angleairspeed envelop called the tilt corridor.
According to the dynamic model of the tiltrotor aircraft, the maximum tilt angle is constrained by the z-axis force in the body CS, and the minimum tilt angle is determined by the x-axis force in the body CS. The aerodynamic force F w and the rotor tension T are related to the airspeed. When the maximum of the rotor tension is reached, it yields to the following: where T m max is the maximum main rotor tension, T b max is the maximum back rotor tension; the A m max is the maximum tilt angle; F wz and F wx are the aerodynamic force along the z -axis and x-axis in the body CS, respectively; and F z max and F x max are the maximum of the aerodynamic force along the z -axis and x-axis in the body CS, respectively. As shown in Figure 9, the area enclosed by the dotted line and the long broken line is the feasible range of the rotor tilt angle at a specific airspeed. The solid line with circles is the equilibrium state of the aircraft calculated by the innovative trim method, in which the aircraft maintains force balance. When the tiltrotor aircraft state is within the envelope of maximum tilt angle curve and the balance curve, the aircraft is accelerating. On the contrary, in another area, the aircraft is decelerating. These constitute the transition states of the tiltrotor.
Furthermore, the external force limitation must also be considered when designing the flight path of take-off, so the range of the external forces along the x-axis (forward) and z-axis (vertical) of the tiltrotor aircraft according to airspeed are also derived and shown in Figure 10.

Take-Off Simulation and Verification
In this paper, an incline flight trajectory in which both height and airspeed of tiltrotor aircraft increase simultaneously in the take-off phase is designed based on the proposed trim method and the tilt corridor. The external forces, tilting angles, angle of attack, etc. with respect to time or airspeed are depicted in Figures 11 and 12.
Several typical moments during take-off are selected to fit into the trim equations in Chapter 2, in which the values of T x and T z in Equation (17) are external forces in perpendicular directions. It can be verified from the comparison between Figure 10 and Figure 12 that the required external forces for tiltrotor aircraft to take off according to the designed trajectory are all within the allowable range. The following results shown in Table 2 are obtained when the tiltrotor aircraft is in take-off phase.
The whole process of take-off is simulated afterwards. The trim results detailed above are applied as the target state 11 Journal of Sensors of the flight control during the take-off. The flight simulation results and the trim values are compared to be in good agreement (Figure 13), so the effectiveness of the innovative trim method is verified through flight simulation.
Besides, the simulated flight trajectory of the tiltrotor aircraft is basically consistent with the designed flight trajectory (Figure 14).

Conclusion
An innovative trim method for tiltrotor aircraft take-off based on a genetic algorithm is proposed in this paper.
Firstly, the genetic algorithm, which possesses strong capability in searching global optimum, is adopted to identify a coarse solution. Secondly, the coarse solution of the trim is further refined by the Levenberg-Marquardt method for precise local optimum. In addition, the innovative trim method is applied to a tiltrotor aircraft's flight control in the transition process of incline take-off. The limitation of trajectory is discussed, and the tilt corridor is constructed. Finally, the incline take-off simulations are conducted, and the effectiveness of the proposed trim method is verified through good match with the designed reference trajectory.   Journal of Sensors

Data Availability
The airplane design data used to support the findings of this study have not been made available because the project involves intellectual property rights.

Conflicts of Interest
The authors declare that there is no conflict of interest regarding the publication of this paper.