To improve attitude tracking control of a civil aircraft under actuator faults and model uncertainties, an RL-RMI-INDI-based fault-tolerant control method is proposed in this section.
3.3. Parameters Optimization of the RL-Based RMI-INDI Controller
To achieve the optimization of control parameters of the civil aircraft with actuator faults, a fault-tolerant control parameter optimization method is proposed based on the DDPG algorithm. DDPG is chosen because it is simple and effective in continuous control tasks that employ deterministic strategies. This method can realize adaptive parameters optimization offline for the control system and significantly improves flight control performances under actuator faults.
Since the function approximation is used by the neural network, it cannot guarantee obtaining the global optimal solution of the Hamilton–Jacobi–Bellman (HJB) equation under the strong nonlinear characteristics of aircraft dynamics. However, the proposed RL framework is to find a set of high-performance and near-optimal control gains that minimize the cumulative cost of the reward function. The objective is to significantly improve the efficiency of tuning parameters and the performance of baseline controllers.
The DDPG algorithm can be regarded as a combination of deterministic policy gradients and deep neural network; it overcomes the defects that traditional RL can only output discrete actions. Therefore, the DDPG algorithm is applied to optimize the control parameters in Equation (53).
Reinforcement learning takes the Markov decision process as its basic framework and makes the optimal decision through the continuous interaction between the controller system and the environment [
34]. The basic model can be represented by
, where
represents the total set of states,
represents the set of all actions,
represents the probability of state transition, which is the probability that the state changes from
to the next state
under action
, and can be defined as
.
represents the total reward function. The accumulated reward value
during the training process is
where
is the discount factor, satisfying
,
is the reward at the time
.
In the DDPG design, an actor is a deterministic policy function that can be expressed as
. The parameters of the actor network to be learned are represented as
, and the parameters of the critic network to be learned are represented as
. Each action of the aircraft control system is directly calculated by
and does not need to be sampled from the random policy [
35]. In the state
, the action
is performed through policy
to obtain the next state
and the reward value
.
The actor network comprises two hidden layers by using the ReLU activation function, which includes 256 neurons and 128 ones, respectively. The tanh activation function is used by the output layer, and the output is scaled according to the action range. The critic network also comprises two hidden layers, which includes 256 neurons and 128 ones, respectively, and the state and action are concatenated before they are feedback to the second hidden layer.
The DDPG produce is as follows:
Step 1: Select the action according to the current policy: .
Step 2: Perform the action , obtain the reward , and the environment state changes from to . Store transition in D.
Step 3: Sample a random minibatch of N transitions from D.
Step 4: Calculate using the target network:
Step 5: Update the current critic network by minimizing the target loss function:
Step 6: Update the current network by calculating the sampled policy gradient:
Step 7: Update the target network by using exponential smoothing:
where
represents the learning rate.
The Algorithm 1 is as follows:
| Algorithm 1 DDPG |
| 1: Set hyperparameters: soft update factor , reward discount factor . |
| 2: Randomly initialize weight parameter of the critic network and weight parameter of the actor network . |
| 3: Initialize target networks and with weight parameters , . |
| 4: Initialize replay buffer D. |
| 5: for episode = 1, …, M do |
| 6: Receive initial observation . |
| 7: for t = 1, …, T do |
| 8: Select the action according to the current policy: . |
| 9: Perform the action , obtain the reward , and the environment state changes from to . |
| 10: Store transition in D. |
| 11: Sample a random minibatch of N transitions from D. |
| 12: Calculate using the target network: . |
| 13: Update the current critic network by minimizing the target loss function: |
| 14: Update the current network by calculating the sampled policy gradient: |
| 15: Update the target network by using exponential smoothing: |
| 16: end for |
| 17: end for |
To ensure that the control parameters can achieve the desired flight control performances in cases of faults and uncertainties, thus ensuring flight safety, the DDPG method is used to optimize the control parameter in Equation (53), The algorithm application process is as follows:
The state space represents aircraft state information and is the basis for control parameters evaluation. First, define the angular rate error:
where
is the angular rate error,
is the angular rate, and
is the angular rate real-time output.
The state space based on the angular rate real-time output and angular rate error can be represented as
- (2)
Action space design
Considering the parameter optimization of the aircraft control system in scenarios with faults and uncertainties, the action space can be defined as follows:
The parameter is dynamically offline optimized in each period of ; is related to the action directly.
- (3)
Reward function design
In this part, the current state of the aircraft is effectively evaluated by designing a composite reward function, which is designed according to the state error, the control input and state constraints. To achieve the best result of the DDPG algorithm, the novel reward function is designed as follows:
where the tracking error term
is used to penalize the deviation from the target angular acceleration and directly reflects the control accuracy; the control input term
is used to constrain excessive deflection of the control surface and to prevent actuator saturation; the state term
is used to penalize excessive angular rates by a smooth saturation function, which can assure that the aircraft flies within the safety envelope while preventing instability in the learning process due to hard constraints;
are configuration parameters of the reward function.
Remark 2. The hyperbolic tangent function is chosen because it is smooth and bounded; these properties can effectively suppress excessive angular acceleration while discontinuous phenomenon is avoided.
3.4. Stability Analysis
By using RMI systems (50) and the control law (52), the derivative of the tracking error
can be obtained as follows:
Substituting Equation (53) into Equation (62) yields
and then define
,
,
, where
,
represents all uncertainties of the RMI system, and Equation (63) can be rewritten as follows:
To ensure the feasibility of stability analysis, the following assumptions are introduced:
Assumption 2. There exists a constant such that , and if the RMI estimator converges asymptotically, then can be set arbitrarily small.
Since is obtained through the RL dynamic training, it can be assumed that the are time-varying bounded gain matrices, and its rate of change is also bounded during the training process.
Assumption 3. There exist constants and such that for all ,
where are symmetric gain matrices. Assumption 4. There exists a constant , and is sufficiently small such that Remark 3. In the actual implementation of RL, these assumptions can be ensured as follows: (1) DDPG gains can be designed in the prescribed range by projection clipping of its output; (2) low-pass filtering can constrain the change rate of the DDPG updated gains; (3) the parameters of the RMI estimator can be designed reasonably.
Based on the above assumptions, the stability of the closed-loop system is proven by the Lyapunov theory. The detailed proof process is shown in the
Appendix A.