Fault estimation and compensation for hypersonic flight vehicle via type-2 fuzzy technique and cuckoo search algorithm

This study proposes a fault estimation and compensation scheme for hypersonic flight vehicle (HFV) attitude system with body flap fault. To achieve the fault compensation capability, an interval type-2 fuzzy estimator is designed to approximate the unknown nonlinear function caused by modeling uncertainties and the fault. The fault-tolerant controller via the terminal sliding mode and dynamic surface techniques is developed to ensure the tracking accuracy of attitude angles for HFV and the desired control torque can be achieved. Then, a novel control allocation scheme with a cuckoo search algorithm and linear programming method is proposed to distribute the desired torque to aerodynamic surfaces and reaction control system jets. The stability of the proposed scheme is analyzed using the Lyapunov stability theory. The validity of the method is verified by a series of comparisons on numerical simulation results.


Introduction
Hypersonic flight vehicles (HFVs) refer to vehicles that travel at a velocity greater than 5 Mach. 1 Such technique provides a reliable and cost-effective means for access to near space and has attracted great attention owing to their potential civilian and military applications such as prompt global response. 2,3 Since HFV works in a harsh environment where flight conditions and parameters often change radically, faults may occur in actuators such as elevators and rudders. The high cost of research and development of HFV also means that the failure of flight test will cause immeasurable loss of property. 4 Therefore, the fault-tolerant control (FTC) of HFV under actuator faults is highly significant.
In recent years, a variety of control methods have been proposed to deal with the adverse effects due to the nonlinearity and actuator faults in HFV. 5,6 Adaptive FTC is a common approach, which can make the flight state track the given command 7,8 A fault compensation scheme was investigated through a finite-time observer which was used to estimate actuator faults and uncertainties for hypersonic gliding vehicles. 9 Sliding mode control-based FTC was developed to ensure the tracking performance via suitable sliding mode surface. 10,11 Back-stepping fault-tolerant output tracking control was utilized for HFV subject to actuator constraints, disturbances, and uncertainties. 12 To handle the problem of parameter uncertainties or unknown parameters, neural network was introduced to enhance the robustness of the controller. 13, 14 An adaptive output feedback FTC was developed for the longitudinal dynamics of HFV in the presence of parameter uncertainties, actuator faults, and external disturbances. 15 In addition to actuator faults, the modeling uncertainties are inevitably rooted in the control-oriented models due to the lack of wind tunnel test data at hypersonic speeds and the difficulty to obtain sufficient on-flight test data. 16,17 Therefore, the fuzzy estimation algorithm that has high approximation capability for identifying nonlinear systems is considered to calculate the unknown effects of modeling error and fault. 18 However, the membership functions are usually defined according to the experience of designers and difficult to be calculated precisely. Compared with the conventional fuzzy systems, interval type-2 fuzzy system uses an interval rather than a number in their membership functions to define the membership degree. Thus, it provides more degrees of freedom that could reduce the effects of uncertainty in the fuzzy rules. [19][20][21] Given such advantages, an interval type-2 fuzzy estimation algorithm is designed to represent the unknown adverse effects of modeling error and faults in this article.
The estimation results are further used in the design of the FTC to obtain the needed control torque. Such control torque will be allocated to eight aerodynamic surfaces. However, these aerodynamic surfaces are usually too weak to satisfy control commands. 22 Thus, reaction control system (RCS) will be introduced to provide the residual control torque. 23 In the literature, 10 the derived control torque is distributed by pseudoinverse method directly. With this allocator, the utilization ratio of aerosurfaces is definitely low because of the fixed calculation. This has resulted in fast energy consumption of the RCS system. A new feature of this article is the utilization of cuckoo search algorithm (CSA) in torque allocation part. The CSA is a relatively novel and promising metaheuristic algorithm. 24,25 It was inspired by the obligate brood parasitism of some cuckoo species by laying their eggs in the nests of other host birds (of other species). Cuckoo search idealized its breeding behavior and thus can be applied for various optimization problems such as face recognition, 26 structural optimization, 27 optimal placement and sizing of static volt-ampere reactive (VAR) compensator, 28 and irrigation station optimization. 29 Some studies have demonstrated that its search capability is better than many other metaheuristic algorithms. 30,31 For HFVs, the control allocation problem is described as a linear programming problem and solved by CSA in our work.
This article is organized as follows. The attitude model of HFV and FTC scheme is first described in the second section. The third section presents an interval type-2 estimation algorithm and then develops an FTC via terminal sliding mode and dynamic surface control techniques. The fourth section proposes a control allocation algorithm which combines the linear programming problem and CSA. Several contrast simulations are conducted to demonstrate the validity of the proposed fuzzy fault estimation and allocation schemes in the fifth section. Finally, conclusions are presented at the end of this article.

Reentry attitude dynamic model
The most common attitude dynamic model of HFV is shown as follows 32 where q¼ ½; a; b T is the attitude angle vector, with , a, and b as the bank angle, angle of attack, and sideslip angle, respectively; !¼ ½p; q; r T is the angular rate vector, with p, q, and r as roll rate, pitch rate, and yaw rate, respectively; J 2 R 3Â3 is the symmetric positive definite moment of inertia tensor; T 2 R 3Â1 is the control torque vector; gð!ðtÞÞ is an unknown nonlinear function caused by modeling error and external disturbance; and d denotes the external disturbance. The other matrices O and R are given as follows The control torque T is generated by 4 types of control surfaces and 10 RCS jets, which can be described by The torque T d produced by aerodynamic surfaces is expressed as follows where d e ¼ ½d rei d lei d rft d lft d lvr d lvr d reo d leo T with d rei ; Á Á Á ; d leo representing right and left inboard elevons, right and left body flaps, right and left rudders, and right and left outboard elevons, respectively; and B 2 R 3Â8 is a sensitivity matrix. 30 The torque T RCS produced by RCS jets is described as follows where C 2 R 3Â10 is a weight matrix, and its elements C ij represents the control torque generated by the jth RCS on the ith axis. u rcs ¼½u 1 ; Á Á Á ; u 10 is the command vector and u k ¼0=1(k ¼ 1; 2; Á Á Á ; 10) represents the off/on state of the kth RCS jet.

Actuator fault model
Aerodynamic surface faults may occur since HFV faces harsh environment in reentry phase, resulting in that the actual control torque cannot reach the desired one. Body flap is one of the actuators, which has great impact on the control torque. Therefore, HFV model with a right body flap fault is considered in this study, which is described as follows where f d 2 R 8Â1 represents the additive fault of the actuator and its third element is not always zero and other elements always zero.
Assumption 1. The external disturbance d is bounded and its derivative is also bounded. That is, there exist two positive scalars d 1 and d 2 such that jjdjj d 1 and jj _ djj d 2 . The control objective is to design an FTC law with respect to the control torque generated by aerodynamic surfaces and RCS jets such that the attitude angles can track the given commands asymptotically even if the body flap fault and disturbances exist. Normally, the whole attitude control system is divided into two subsystems: the inner angular rate loop and the outer attitude angle loop. The overall control scheme is shown in Figure 1.

Design of FTC
Interval type-2 fuzzy estimation As long as there are enough fuzzy conditions, any nonlinear function can be approximated with arbitrary precision. Therefore, a type-2 fuzzy estimation algorithm is designed to approximate the lumped effect of the unknown nonlinear function gð!ðtÞÞ and the actuator fault f d in this subsection. With reference to Rahmani and Shahriari-Kahkeshi, 20 the fuzzy rules of the estimation algorithm can be written as follows where x 1 ; x 2 ; Á Á Á ; x n are input variables, h is the output variable, and M represents the total number of fuzzy rules. F j i ði ¼ 1; 2; Á Á Á ; nÞ and G j represent interval type-2 antecedent and the consequent fuzzy sets, respectively. Through combining the firing strength of each fuzzy rule, the type-2 inference engine performs a nonlinear map from input interval type-2 fuzzy set to the output interval type-2 fuzzy set. The upper and lower bounds of the firing strength of the Pth rule can be calculated as follows For convenience of analysis, h l and h u can be written as the linear regression form as follows T are the fuzzy basis functions derived by the following methods where j ¼ 1; 2; Á Á Á ; M. Then, the final defuzzified crisp point is given by For any constant d > 0 and the unknown nonlinear term G f ðxÞ in the angular rate loop, there exists the following fuzzy logic system where ' Ã lf and ' Ã uf are optimal parameter matrices, and x Ã lf ðxÞ and x Ã uf ðxÞ are fuzzy basis functions. Then, G f ðxÞ can be written as follows where e f is the error between the original unknown function and the estimation function obtained by using the optimal parameter matrices. However, since those optimal parameter matrices are difficult to obtain, they are replaced by their estimation values' lf and' uf . Then, the fuzzy estimation result is given bŷ where the adaptive updating laws of' lf and' uf will be derived from the Lyapunov function in the next section.

Outer loop terminal sliding mode controller
For the attitude control of HFV, system outputs are three attitude angles which are actually desired to track some predefined reference commands. Three angular rates, which can affect the system outputs, are treated as interval variables. And normally, the control torque is the system input. To obtain the needed control torque, it is necessary to calculate the corresponding angular rates via the system outputs. Thus, we can choose the following terminal sliding mode surface where h 1 ! 1; 0 < h 2 < 1;q d denotes the desired attitude angle vector; The reaching law of this terminal sliding mode surface is designed with a parameter 0 < h 3 < 1 as follows where e 1 and e 2 are two positive scalars. The virtual control input can be derived as follows whered represents the estimation of the external disturbance d. The adaptive law ofd is shown as follows where L 1 ¼ diag l 11 ; l 12 ; l 13 f gis the adaptive learning rate.
Theorem 1. The terminal sliding mode surface S can converge to an expected region and thenq is uniformly ultimately bounded under the adaptive law expressed in equation (22). Proof 1. Define the disturbance estimation errord ¼d À d and the following Lyapunov function is selected The derivative of V S is finally shown as follows Therefore, when appropriate parameters (e 1 , e 2 , and L) are adopted, the system can converge to an expected region. That is,q is uniformly ultimately bounded with the virtual control (21).
Here, we only give simple information. Refer to the work of Wang et al. 33 for the detailed information of the design and certification process of the outer loop controller. (21) is a discontinuous function with a significantly high-frequency switching, which may result in the chattering of the angular rate command signal. Therefore, the sign function can be approximately replaced by the following continuous function

Remark 1. The sign function in equation
where J i ði ¼ 1; 2; 3Þ are adjustable parameters which can be chosen in the form shown as follows A negative scalar u which is extremely small needs to be added here to avoid the appearance of the singular point since the value of the virtual control may be equal to zero in actual applications.

Inner loop dynamic surface controller
When the virtual control input is determined, the desired angular rate command can be derived by introducing a firstorder filter. Then, the dynamic surface control can be utilized to calculate the needed control torque and stabilize the inner loop angular rate system.
Let the virtual control input (21) pass through the following first-order filter where t > 0 denotes the time constant. Then where ¼ ! d À ! c represents the filter error.
Define the angular rate tracking error vector as follows Considering equations (17) and (31), the FTC for the angular rate loop can be designed as follows where 3Þ is the diagonal gain matrix to be designed.
Substituting equation (32) into equation (31), we can obtain where' lf ¼ ' Ã lf À' lf and' uf ¼ ' Ã uf À' uf . For the whole HFV attitude system, the Lyapunov function candidate is chosen as follows where trfÁg represents the trace of the corresponding matrix, and U lf and U uf are diagonal gain matrices to be designed. Let h 1 ¼ 1 and take the time derivative of V 1 , theñ q T _ q ¼q T ½ÀK 1 jqjsgnðqÞ À K 2 jqj h 2 sgnðqÞ À e 1 S À e 2 jSj h 3 sgnðSÞ þd þ R! þ R We can denote that lim t!1 jjSjj 2 $ with $ ¼ because it is known that S can converge to a bounded range according to Theorem 1. Then, equation (35) can be rewritten as follows With reference to the work of Qian et al., 34 the following inequality holds for the filter error item where nðq; _ q;!; q d ; _ q d ; € q d Þ is a continuous and bounded function. By substituting equations (36) and (37) into the derivative of V 1 , we can get Similar to the derivative of V 1 , _ V 2 is calculated as follows To eliminate the terms! T' lf T x Ã lf and! T' uf T x Ã uf in equation (39), the adaptive updating laws of the parameter matrices in fuzzy estimation part can be designed as follows and U lf ¼ diagfg lf 1 ; g lf 2 ; g lf 3 gðg lf i > 0; i¼ 1; 2; 3Þ and U uf ¼ diagfg uf 1 ; g uf 2 ; g uf 3 gðg uf i > 0; i¼ 1; 2; 3Þ.
Then, _ V 2 can be transformed into the following form By combining equations (38) and (41), the derivative of V can be expressed as follows Therefore, according to Qian et al., 34 appropriate parameters can be selected to make the attitude system uniformly bounded.

Control allocation
In the above section, we have obtained the desired control torque to make the HFV system stable even if an actuator fault occurs through the FTC. In this section, the desired torque needs to be distributed into 8 aerodynamic surfaces and 10 RCS jets. The main goal is to minimize the error between the desired torque and the torque provided by aerodynamic surfaces to reduce the use of RCS jets which consume more fuel in the actual flight.
The desired control torque T is calculated by equation (32). The control allocation problem is addressed to minimize the index J T by applying CSA where J T denotes the error index of the control torque and Q is the weight matrix. The admissible deflection angles d e are given in Table 1.
The nest location of the new generation is updated via the following two approaches: where r d j represents the jth cuckoo in the population of dth generation;a Ã j is the amplification factor; is the Hadamard multiplication; and LðlÞ denotes the Lévy distribution, which represents a kind of random walk of animals. 2. Local random walk via the detection probability p a r dþ1 where b Ã j is the amplification factor; r d m and r d n are two different randomly chosen solutions (not equal to r dþ1 j ). h*U ð0; 1Þ is a random number; and HðÁÞ denotes the Heaviside function.
From the above description, the detailed steps of control allocation based on CSA can be shown as follows: Step 1. Initialize the search parameters including the number of initial allocation schemes (i.e. the number of the nests), the maximum number of iterations d max , the given accuracy of the control torque error e J (i.e. the fitness of nest position), and the detection probability p a .
Step 2. Randomly select N sets of initial deflection angles of aerosurfaces r 0 j ðj ¼ 1; 2; Á Á Á ; N Þ, which represents the nest position of the first generation. It is worth noting that r 0 j ðj ¼ 1; 2; Á Á Á ; N Þ should be within the given ranges as presented in Table 1 as much as possible. Then calculate the fitness of each set of deflection angles according to equation (43).
Step 3. Update the deflection angles of eight aerosurfaces via equation (44)  Step 5. Calculate the current optimal solution. If current error index J T is less than the given accuracy e J or the number of iterations exceeds d max , end the search process; otherwise, return back to Step 2.
Remark 2. Similar to other metaheuristic algorithms, the process of the CSA is of randomicity. Compared with the allocation method proposed by Gao et al. 10 , it can improve the efficiency of the aerosurfaces and reduce the consumption of RCS fuel.

Numerical simulation
In this section, simulation results of the proposed methods are presented and discussed. Different cases, including interval type-2 fuzzy estimation, FTC, and control allocation, are considered. The aerodynamic parameters of X-33 HFV can be obtained from the work of Zhao et al. 35 The desired attitude angle vector q d is set as ½0:8 ; 2 ; 0 T , while the initial attitude angle vector is ½0 ; 0 ; 0 T . The moment of inertia tensor is given by Case A: interval type-2 fuzzy estimation. The right body flap is assumed to have an additive fault, which can be expressed as follows The nonlinear function caused by the modeling error is assumed as the following form The upper and lower membership functions of the fuzzy estimator are given by 1 The adaptive updating parameters in the interval type-2 fuzzy estimator are set as g lf ¼ diagf200; 200; 200g and g uf ¼ diagf100; 100; 100g. Then, the estimation result of the unknown nonlinear function G f ðxÞ is shown in Figure 2.
From Figure 2, it can be seen that the estimation curve can track G f ðxÞ after approximately 5 s with accuracy.
Thus, the type-2 fuzzy estimator can estimate the lumped effect of the nonlinear function caused by modeling error and the right body flap fault accurately and quickly.
In this case, the control torque T is assumed to be sufficient and control allocation is not considered. The response curves of attitude angles and angular rates under different control methods are presented in Figures 3 and 4, respectively.   In Figure 3, it is shown that three angular rates can remain stable under nominal control and FTC when the right body flap fault occurs. However, the actual attitude angles deviate from the desired ones under the nominal controller, whereas three attitude angles track the reference command accurately under self-healing controller, as is  shown in Figure 4. Thus, the FTC proposed in this study can guarantee the stability and the tracking accuracy of HFV. Here, the nominal controller is designed based on the HFV system without faults. That is to say, the nominal controller means the control method does not consider the fault compensation signals.

Case C: CSA
In this case, the deflection angles of 8 aerosurfaces and the on/off states of 10 RCS jets under different allocation algorithms when the actuator fault exists are presented in Figures 5 and 6, respectively. Additionally, three attitude angle curves under different controllers considering control allocation are given in Figure 7. Figure 5 shows the utilization efficiency of aerosurfaces under CSA is higher than under the pseudoinverse allocation algorithm proposed by Gao et al. 10 . When the right body flap fault occurs, the left and right rudders almost have no compensation effect under the algorithm in the work of Gao et al. 10 , whereas CSA distributes the control torque to more aerosurfaces. Figure 6 shows RCS jets do not have too much switching states under CSA, which is beneficial to the operation of the system. In addition, the running time of the RCS system under the pseudoinverse method is longer than under CSA.
In Figure 7, it can be seen that with the interval type-2 fuzzy estimator and CSA, the stability of the system can be ensured and three attitude angles can track the desired ones accurately and rapidly. The transient performance of the response curves with the self-healing controller proposed in this study is better than that with the controller in the work of Gao et al. 10

Conclusions
In this article, a fault estimation and FTC scheme is developed for HFV subject to body flap additive fault and modeling error. With an interval type-2 fuzzy estimator, the lumped effect of the body flap fault and modeling error can be effectively approximated at first. The virtual control input of angular rate loop is obtained by constructing a terminal sliding mode controller, which avoids the imaginary situation successfully. Then, the dynamic surface technique is utilized to calculate the desired control torque based on the fuzzy estimation result, thereby preventing trajectory derivation of attitude angles. Finally, the control allocation problem is solved by combining the CSA and linear programming methods. With this allocation scheme, the utilization efficiency of 10 aerosurfaces is effectively improved. Several comparative simulation results for different cases illustrate the effectiveness of the presented fault estimation and compensation scheme.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: The project was supported by the National Natural Science Foundation of China (Grant No. 61533009, 61473146).