Next Article in Journal
Design and Optimization of Lightweight Electromagnetic Valves for High-Altitude Latex Balloons
Next Article in Special Issue
Automatic Determination of the Denavit–Hartenberg Parameters for the Forward Kinematics of All Serial Robots: Novel Kinematics Toolbox
Previous Article in Journal
Profit-Oriented Multi-Objective Dynamic Flexible Job Shop Scheduling with Multi-Agent Framework Under Uncertain Production Orders
Previous Article in Special Issue
Enhanced Voltage Stability and Fault Ride-Through Capability in Wind Energy Systems Using FACTS Device Integration
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Adaptive Trigger Compensation Neural Network for PID Tuning in Virtual Autopilot Heading Control

by
Yutong Zhou
* and
Shan Fu
Department of Automation, School of Automation and Intelligent Sensing, Shanghai Jiao Tong University, Shanghai 200240, China
*
Author to whom correspondence should be addressed.
Machines 2025, 13(10), 933; https://doi.org/10.3390/machines13100933
Submission received: 26 August 2025 / Revised: 1 October 2025 / Accepted: 2 October 2025 / Published: 10 October 2025
(This article belongs to the Special Issue Control and Mechanical System Engineering, 2nd Edition)

Abstract

Virtual commands are significant to model human–computer interactions in autopilot flight missions. However, the huge system hysteresis makes it difficult for proportional–integral–derivative (PID) algorithms to generate the commands that promise better flight convergence. An adaptive trigger compensation neural network method is proposed to dynamically tune the PID parameters, simulating the process of deciding virtual heading commands and performing heading adjustments for virtual pilots. The method consists of trigger filtering, dynamic updating, and compensation synthesis. First, the necessary historical errors are adaptively selected by the threshold trigger filter for better error utilization. Second, error-based initialization is introduced in the neural network PID update process to improve adaptiveness in the initial settings of PID parameters. Third, the parameters are synthesized via error compensation to compute virtual heading commands for acquiring more convergent flight trajectories. The adaptive filter, error-based initialization, and compensation are important to improve the backward propagation neural network in tuning PID parameters. The results demonstrate the advance of the method in simulating heading adjustment behaviors and reducing flight trajectory deviation and fluctuation. The adaptive trigger compensation neural network can enhance the convergent performance of the PID algorithm during autopilot flight scenarios.

1. Introduction

Computational models play an important role in the simulation of individual decisions and behaviors during human–computer interactions [1,2]. In the autopilot flight mission, virtual commands construct the interactive process between virtual pilots and the mode control panel (MCP). Specifically, the virtual altitude and heading commands are computational models of the altitude and heading adjustment behaviors, respectively. After acquiring flight information, the virtual pilot enters the virtual altitude or heading commands into the MCP to perform the necessary altitude or heading adjustment, thus accomplishing the autopilot flight mission. In the closed-loop interaction process, virtual altitude commands are set as the altitude of the target position, while virtual heading commands are determined by the PID control algorithms [3]. However, due to system hysteresis resulting from massive aircraft inertia, unstable air flow, and the integer precision of the heading setting in the MPC, the selection of the PID parameters can affect the degrees of convergence from flight trajectories to the planned path [4,5]. Hence, the dynamic PID tuning method is significant in improving flight convergence performance.
The neural network can provide an online update perspective to adjust the PID parameters through backward propagation [6,7,8]. Generally, PID algorithms use the accumulated errors to decrease the steady-state error [9], yet not all historical errors are helpful to enhance the algorithm performance. That is, since the impact of early errors on subsequent control may decrease over time, later errors may play a more significant role in PID control. Filtering is an important mechanism to eliminate unnecessary information [10,11,12], which can help select the necessary errors from the historical error sequence to improve error utilization, but for a better PID tuning performance, designing a proper adaptive trigger filter is a challenging task.
In addition, fuzzy control [13,14] and particle swarm optimization (PSO) [15,16,17] are two common approaches to improve the performance of the neural network PID tuning process. However, in some scenarios, fuzzy rule designs may affect tuning performance [18], and PSO algorithms can fall into local optima [19]. Due to the huge system hysteresis, the adaptive strategy can help the neural network update the PID parameters dynamically and thus flexibly deal with problems in uncertain situations [20]. Considering that the initial settings of the PID parameters may affect the performance of parameter tuning [21], error-based updating contributes to adaptive initialization of the PID parameters in the neural network tuning approach and adaptive compensation for the PID parameter generation process to achieve better flight convergence. The existing study validates the feasibility of error information in adaptively updating PID parameters [22] but lacks the application in the neural network PID tuning method. In sum, for better flight convergence, it is necessary to design adaptive trigger filtering and error-based parameter updating strategies in the neural network-based PID tuning process.
An adaptive trigger compensation neural network (ATC-NN-PID) method is proposed to dynamically update the PID parameters considering the autopilot flight scenarios. It applies trigger filtering in the selection of accumulated errors and uses dynamic parameter updating to initialize and compensate for the PID parameters. Thus, the method can enhance flight convergence in autopilot missions. Our contributions are listed below:
(1) The filtering strategy is designed using the adaptive threshold trigger filter to select the necessary heading errors for better error utilization;
(2) Error-based dynamic parameter initialization is applied in the backward propagation neural network to update the PID parameters adaptively;
(3) Compensation synthesizing is executed based on the selected errors to compute virtual heading commands, thereby improving flight convergence.

2. Preliminaries

For a flight mission from the initial position P i   ( l o n i , l a t i , a l t i ) to the target position P t   ( l o n t , l a t t , a l t t ) , a virtual pilot acquires flight information and manipulates the MCP via altitude or heading commands to complete the virtual autopilot mission, constituting the closed loop of human–computer interaction. The symbols l o n , l a t , and a l t represent longitude, latitude, and altitude sequentially. The virtual altitude command is used to simulate the altitude adjustment behavior and is generally set as the target altitude. The virtual heading command serves as the model for simulating the heading adjustment behavior and needs to be the specialized decision-making for better flight convergence. Once the current heading H c is equal to the virtual heading command H ( s 1 ) , the aircraft reaches the set heading, and the sth heading adjustment will be implemented. The heading H c t from the current position P c   ( l o n c , l a t c , a l t c ) to P t can be calculated by [23].
H c t ( s ) = mod 180 π arctan 2 cos ( l a t c ) sin ( l a t t ) s i n ( l a t c ) c o s ( l a t t ) c o s ( l o n t l o n c ) sin ( l o n t l o n c ) cos ( l a t t ) + 360 , 360
The function mod ( · ) performs the modulo operation, and arctan2 ( · ) yields a value that ranges from −π to +π. Similarly, the heading H i t from P t to P t can also be obtained. Then the heading error H e s can be computed as
H e s = H c t ( s ) H i t .
The heading H c t can be used to compute the virtual heading command H ( s ) , which is given by
H ( s ) = H c t .
The operator · returns a maximum integer no greater than the given value. To achieve convergent flight trajectories, the virtual heading command H ( s ) can be generated by the PID control, which is computed as
H ( s ) = mod { H c t ( s ) + K P H e s + K I n = 0 s H e n + K D Δ H e s + 360 , 360 } .
K P , K I , and K D are the proportional, integrated, and differential parameters. Δ H e s represents the change in heading errors, which is calculated as
Δ H e s = H e s H e s 1 .
However, the settings of the PID parameters generally affect the flight convergence. Neural network PID (NN-PID) tuning can dynamically compute PID parameters, but when initializing the PID parameters, it may ignore the role of traditional error-based dynamic parameter updates. Furthermore, error information can also help compensate for the parameter tuning process, and the selection of necessary heading errors probably contributes to better error utilization, improving the convergence performance of trajectories. These aspects need validation in neural network-based PID parameter tuning.

3. Methodology

The ATC-NN-PID method is shown in Figure 1. The method introduces trigger filtering, along with error-based initialization and compensation in the backpropagation neural network, which contributes to dynamically updating PID parameters for better flight convergence in the autopilot mission. The trigger filtering module selects the necessary historical errors using the adaptive threshold trigger filter to enhance error utilization. The parameter updating module tunes the PID parameters dynamically through error-based initialization and the backpropagation neural network, improving adaptiveness in the initial settings of PID parameters. The compensation synthesizing module calculates virtual heading commands to simulate virtual heading adjustment behaviors, thereby promising convergent performance of the flight trajectories.

3.1. Adaptive Trigger Filtering

The trigger filtering module employs the adaptive threshold trigger filter to select the necessary errors and thus to establish the accumulated error sequence. In general, the PID algorithm applies the accumulated errors to reduce the steady-state error. However, the impact of early errors on subsequent control may decrease as time goes by, and later errors are likely to play a more important role in the generation of control output. Selecting the necessary historical errors may improve the convergence of PID control. Hence, the adaptive trigger filtering strategy is designed to filter the error sequence and then select the necessary heading errors. Assuming that the historical heading error sequence H e is { H e 1 , , H e s } and the necessary heading error sequence H e * is { H e j , , H e s } , four steps constitute the adaptive trigger filtering process to decide the sequence number j of the cutoff heading error H e j and construct the sequence H e * , which is shown in Figure 2.
First, the inverse linear combination is established for the historical heading error sequence. Taking into account the differences among various heading errors, the inverse linear combination C l i n v is represented by
C l i n v = k = s n ω e k H e k .
The variable ω e k is the weight of the kth heading error H e k . The weight ω e k embodies the importance of the heading error H e k and can be calculated as
ω e k = H e k H e k 1 , k > 1 1 , k = 1 .
Second, non-linear mapping is performed to improve the filtering ability for historical errors. Combined with the non-linear mapping study based on the exponential function exp { · }  [24], our non-linear mapping result M n l is calculated as
M n l = exp { C l i n v } = exp k = s n ω e k H e k .
Third, the adaptive threshold trigger filter is designed to select the necessary errors from the historical error sequence. Considering that adaptive filters facilitate the dynamic filtering of information [25], we design the adaptive threshold trigger filter to select the necessary errors. The cutoff frequency F C / O is crucial for filter design, establishing the relationship between the cutoff frequency and historical errors can help eliminate unnecessary information adaptively. Consequently, F C / O is set as
F C / O = H e k H e k 2 H e k 1 H e k 2 , k > 2 1 , o t h e r s .
Four, the sequence number of the cutoff heading error is determined. Considering that later errors may be more important for computing control output than early errors, the linear combination C l i n v is a weighted sum in descending order, which can help select later heading errors by adaptive filtering. Thus, based on the cutoff frequency F C / O and the nonlinear mapping result M n l , the sequence number j of the cutoff heading error H e j can be given by
j = argmax n M n l | 1 exp k = s n ω e k H e k < F C / O .
The function argmax { · } returns the maximum sequence number n that satisfies the given conditions. In this way, the necessary heading error sequence H e * can be selected from historical errors for better error usage. In Section 3.3, these necessary heading errors will be applied in the PID control to compute virtual heading commands, thereby facilitating improvement of the convergence from flight trajectories to the planned path.

3.2. Dynamic Parameter Updating

The parameter updating module introduces the error-based parameter initialization process in the backpropagation neural network to generate PID parameters. The neural network can help online compute the adjustment amounts of PID parameters and thus tune PID parameters dynamically. Its structure is designed as three nodes in the input layer, five nodes in the hidden layer, and three nodes in the output nodes. The input layer nodes receive the heading error H e s and the change Δ H e s in the heading errors; the output layer nodes return the adjustment amounts Δ K P , Δ K I , and Δ K D of the PID parameters. As the initial settings of the PID parameters may influence the convergence performance of the NN-PID method, the error-based dynamic parameter initialization strategy is applied in PID parameter tuning to improve adaptiveness. The structure of updating PID parameters based on the neural network is illustrated in Figure 3.
Combined with the network structure, the output o p h from the input layer nodes to the pth hidden layer node is computed as
o p h = f ω 1 , p ( 1 ) H e s + ω 2 , p ( 1 ) Δ H e s + b p ( 1 ) .
The variable w · ( 1 ) represents the connection weight of the input and hidden layers,  b p ( 1 ) means the bias term of the pth hidden node, and f ( · ) is the activation function, which can be computed as
f ( x ) = 1 1 + e x .
The qth output o q n of the network can be calculated as
o q n = f ω 1 , q ( 2 ) o 1 h + ω 2 , q ( 2 ) o 2 h + ω 3 , q ( 2 ) o 3 h + ω 4 , q ( 2 ) o 4 h + ω 5 , q ( 2 ) o 5 h + b q ( 2 ) .
The variable w · ( 2 ) means the connection weight between the hidden layer and the output layer,  b p ( 2 ) is the bias term of the qth output node. The network outputs are also the adjustment amounts Δ K P , Δ K I , and Δ K D of the PID parameters; thus, the relations between o n q and the adjustment amounts of the PID parameters can be represented as
Δ K P = o 1 n ,
Δ K I = o 2 n ,
Δ K D = o 3 n .
Due to the effects of PID initial settings on parameter tuning, the error-based initialization strategy is applied to dynamically compute the initial values for the PID parameters, which can be given by
K P i n i = H e s 1 H e s , s > 1 1 , o t h e r s ,
K I i n i = H e s k = 1 s ω e k H e k ,
K P i n i = H e s H e s 1 H e s , s > 1 1 , o t h e r s .
Then, the PID parameters can be calculated as
K P = Δ K P + K P i n i ,
K I = Δ K I + K I i n i ,
K D = Δ K D + K D i n i .
Based on the backward propagation algorithm [26,27], the network can be trained online to tune the PID parameters. These updated parameters will be combined with the selected heading errors and the error-based compensation strategy to simulate the heading adjustment behaviors of the virtual pilot.

3.3. Error-Based Compensation Synthesizing

The virtual heading command is synthesized using error-based compensation to adjust the heading in autopilot scenarios. The error-based compensation strategy enables the updated PID parameters to change along with the variation of heading errors by establishing a relationship between the PID parameters and the historical error information, improving adaptiveness in the PID tuning process. Thus, despite huge system hysteresis, updated PID parameters can still yield more convergent flight trajectories. Based on the necessary heading errors { H e j , , H e s } , the compensation process can be represented by
K P = K P · H e s 1 H e s ,
K I = K I · H e s k = j s H e k ,
K D = K D · H e s H e s 1 H e s 1 .
Then, the PID parameters are normalized as
K P * = K P K ,
K I * = K I K ,
K D * = K D K ,
K = K P 2 + K I 2 + K D 2 .
K P * , K I * , and K D * are the normalized PID parameters. Combined with the heading H c t and the selected errors { H e j , , H e s } , the virtual heading command can be given as
H ( s ) = mod { H c t ( s ) + K P * H e s + K I * n = j s H e n + K D * Δ H e s + 360 , 360 } .
The procedure using the ATC-NN-PID method to complete the flight mission is shown in Algorithm 1. Given the Q-waypoint sequence { P 1 , , P Q } , the mission can be regarded as a two-waypoint flight process of multiple segments. Virtual altitude or heading commands are used to adjust altitude or heading to complete each flight segment. Once the Euclidean distance D c t between the current and target positions is no more than the given threshold D t h r , the virtual pilot will embark on the next flight segment. In addition, to reflect the time expenditure on information acquisition, heading adjustments, and altitude adjustments, three random time delays r a n d ( 0.5 , 4.5 ) are applied in the flight simulation.
Algorithm 1 Q-waypoint flight mission using ATC-NN-PID method
Machines 13 00933 i001
For the Q-waypoint autopilot mission, there exist Q 1 flight segments. In each flight segment, the computational procedure belongs to stepwise processing using the corresponding equations. Hence, the computational complexity of each flight segment is O ( n ) , and the computational complexity of the whole flight mission is O ( Q · n ) . The total simulation time of the flight mission is related to the count of waypoints Q, the average heading adjustment times t in each segment, and the average time span T between two heading adjustments. The value of T is affected by the time cost of acquiring information and adjusting the heading or altitude, as well as the time interval when the current heading is equal to the last virtual heading command. Thus, the overall simulation time can be approximated as O ( Q · t · T ) .

4. Experiments and Discussion

To validate the progress of our ATC-NN-PID method, two types of flight missions are discussed. One mission contains even flight waypoints and the other has odd flight waypoints. To isolate the contribution of each component in our method, the ATC-NN-PID heading adjustment approaches, with no trigger filtering, no error-based initialization, and no error compensation, are sequentially applied in the ablation studies, which are denoted as ATC-NN-nF, ATC-NN-nI, and ATC-NN-nC, respectively. Then, nine methods are used to compute the virtual heading command in the two flight missions, namely, heading adjustment approaches based on H c t , PID, NN-PID, TLBO-PID [28], TC-PID [22], ATC-NN-PID, ATC-NN-PID-nF, ATC-NN-PID-nI, and ATC-NN-PID-nC in sequence.
We utilize the C # programming language to implement the nine methods. For each method, 100 simulations are conducted in the two flight scenarios, respectively. The computer is equipped with a 12th Generation Intel(R) Core (TM) i9-12900H processor (Intel, Santa Clara, CA, USA), operating at a frequency of 2.50 GHz, and features 16 GB of memory along with the Windows 11 operating system. The aircraft model is derived from the open source software FlightGear 2.8.0.5 [29]. The experimental details of the flight scenarios, containing wind, turbulence, and actuator delays, adopt the default settings in FlightGear. The airspeed is chosen as 230 fpm. The distance threshold D t h r is set at 2500 m.
Flight results are quantitatively assessed by average flight time (AFT) and distance (AFD), heading adjustment times (AHAT), the mean (AEM) and standard deviation (AEStd) of the error distances, and robustness (R). Given M flight trajectories and N sampling points on the mth flight trajectory, AFT, AFD, and AHAT are calculated separately as
AFT = 1 M m = 1 M FT m ,
AFD = 1 M m = 1 M FD m ,
AHAT = 1 M m = 1 M HAT m .
FT m , FD m , and HAT m are the time, distance, and heading adjustment times of the mth flight simulation, respectively. The operator · rounds up the given value. AEM and AEStd can be computed sequentially by
AEM = 1 M m = 1 M EM m ,
AEStd = 1 M m = 1 M EStd m .
EM m and EStd m are the values of the mean and standard deviation for the error distances on the mth flight trajectory, respectively. The error distance can be calculated based on the existing coordinate mapping algorithm [30]. Due to the effects of the outside unstable air flow, flight deviations and fluctuations exist during the autopilot mission. Combined with study [31] and the error distances, the robustness R is defined as
R = 1 M m = 1 M 1 2 exp EM m AEM EM m .
Considering that the range of data can measure the degree of data dispersion, we adopt the difference in the maximum and minimum to perform the normalized assessment for each quantitative evaluation index. Combined with the maximum–minimum normalization method [32,33], the results are also evaluated using the normalized flight time (NFT) and distance (NFD), heading adjustment times (NHAT), and the normalized mean (NEM) and standard deviation (NEStd) of the error distances. NFT, NFD, NHAT, NEM, and NEStd can be computed in sequence as Equations (17a)–(17e), where the functions max { · } and min { · } return the maximum and minimum values of the given sequence, respectively
NFT = ln AFT · max { FT m | m = 1 , , M } AFT max { FT m | m = 1 , , M } min { FT m | m = 1 , , M } ,
NFD = ln AFD · max { FD m | m = 1 , , M } AFD max { FD m | m = 1 , , M } min { FD m | m = 1 , , M } ,
NHAT = ln AHAT · max { HAT m | m = 1 , , M } AHAT max { HAT m | m = 1 , , M } min { HAT m | m = 1 , , M } ,
NEM = ln AEM · max { EM m | m = 1 , , M } AEM max { EM m | m = 1 , , M } min { EM m | m = 1 , , M } ,
NEStd = ln AEStd · max { EStd m | m = 1 , , M } AEStd max { EStd m | m = 1 , , M } min { EStd m | m = 1 , , M } .

4.1. Even-Waypoint Simulation

Table 1 gives the mission information, and the example trajectories are illustrated in Figure 4. PID parameters K P , K I , and K D are chosen as 0.76, 0.25, and 0.09, respectively. The strategies of trigger filtering along with error-based initialization and compensation contribute to PID parameter updating in the backward propagation neural network. Thus, the ATC-NN-PID method can promise better flight convergence compared to the other eight heading adjustment methods.
Table 2 lists the quantitatively evaluated results of flight trajectories. Compared to heading adjustment approaches based on H c t , PID, NN-PID, TLBO-PID, and TC-PID, the ATC-NN-PID method does not achieve the minimum values in the average flight time and distance, but the optimal value in heading adjustment times. Furthermore, the ATC-NN-PID method also has the smallest values in AEM and AEStd. The lower the values of AEM and AEStd, the less the deviation and fluctuation of the flight trajectories. That is, the flight trajectory aligns more closely with the planned path when the heading adjustment approach is the ATC-NN-PID method. In ablation studies, the ATC-NN-PID method has lower values than the ATC-NN-PID-nF, ATC-NN-PID-nI, and ATC-NN-PID-nC approaches in average flight time and distance, heading adjustment times, and the mean and standard deviation of the error distances. In addition, the ATC-NN-PID method demonstrates good robustness, indicating that the method has a relatively strong anti-interference ability despite the unstable airflow outside. Hence, trigger filtering, error-based initialization, and error-based compensation strategies can improve the performance of neural network PID parameter tuning in autopilot scenarios.
Table 3 lists the normalized evaluation results, which can comprehensively reflect the influence of each quantitative evaluation index, as well as the impact of the difference between the maximum and minimum values of the index, in the data assessment process. Although the values of the normalized flight distance (NFD) and normalized heading adjustment times (NHAT) are not optimal for the ATC-NN-PID method, the NFT has a lower value than the other eight methods. NEM serves as an indicator of the average degree of trajectory deviation, while NEStd reflects the level of fluctuation in flight trajectories. The ATC-NN-PID method has the lowest values for the normalized mean NEM and the normalized standard deviation NEStd of the error distances. Influenced by the data range of each quantitative evaluation index, there are certain differences in the size relationship of the results in Table 2 and Table 3. However, the values that indicate the deviation and fluctuation degrees of the flight trajectory are the smallest in these two tables, which means that the ATC-NN-PID method can improve the ability to tune the PID parameters and refine the convergence of flight trajectories.

4.2. Odd-Waypoint Simulation

Table 4 defines the odd-waypoint mission information, and Figure 5 shows the flight examples. The parameters K P , K I , and K D in Equation (2a) are set, respectively, at 0.77, 0.40, and 0.17. It can be found that heading adjustment using the ATC-NN-PID method can guarantee a more convergent flight trajectory than the other eight methods. Adaptive filtering can select the necessary heading errors; error-based initialization and compensation contribute to further improving the performance of PID tuning.
The quantitative results are listed in Table 5. Although the flight mission becomes more complex, the ATC-NN-PID method can also promise the minimum values in AEM and AEStd, indicating lower degrees of flight deviation and trajectory fluctuation, respectively. In addition, the ATC-NN-PID method ranks at the middle level in the average flight time (AFT), distance (AFD), and heading adjustment times (AHAT) among the heading adjustment approaches based on H c t , PID, NN-PID, TLBO-PID, and TC-PID. We can also find see the ATC-NN-PID shows commendable robustness, which means that it has a relatively strong ability to resist interference despite the presence of unstable external airflow. In ablation experiments, the values of AFT, AFD, and AHAT are not optimal via the ATC-NN-PID method, but AEM and AEStd have lower values, which can validate the advance of trigger filtering, error-based initialization, and error-based compensation strategies in the neural network PID tuning process considering autopilot flight missions.
The normalized evaluated results are listed in Table 6. The ATC-NN-PID method does not have the lowest values in NFT, NFD, and NHAT among the eight heading adjustment approaches, but its NEM and NEStd are the minimum values, which means the deviation and fluctuation of flight trajectories are indeed reduced. Combined with the results listed in Table 3 and Table 5, as well as Table 4 and Table 6, it can be found that the ATC-NN-PID method still promises more convergent flight trajectories despite the increasing complexity of the flight mission. In sum, the ATC-NN-PID method can update the PID parameters adaptively and achieve a better ability to improve flight convergence.

4.3. Discussion

In the closed-loop human–computer interaction process, the virtual pilot acquires information and then makes heading adjustments using the virtual altitude or heading command to complete the given autopilot flight mission. For better convergence of the flight trajectory to the planned path, the adaptive trigger compensation structure is applied in the backward propagation neural network to dynamically tune the PID parameters and generate virtual heading commands. Specifically, considering that the effects of early errors on control output may decline with time, later errors may play a more important role in the generation of control output. The trigger filtering strategy is designed using the adaptive threshold trigger filter to select the necessary heading errors. Due to the huge system hysteresis, error-based updating contributes to enhancing the adaptiveness of control behaviors in uncertain situations. The error-based parameter updating strategy is applied to initialize and compensate for the PID tuning process. That is, the error-based parameter initialization strategy is employed in the neural network to generate PID parameters, and error-based compensation synthesizing is performed to compute virtual heading commands for better convergence of flight trajectories. In this way, trigger filtering, dynamic updating, and compensation synthesis strategies achieve functional coupling to tune PID parameters dynamically, and thus reduce deviation and fluctuation of flight trajectories.
The ATC-NN-PID method can ensure more convergent flight trajectories in the two virtual autopilot missions. Although flight time, distance, and heading adjustment times are not always optimal, the ATC-NN-PID method exhibits lower values in quantitative and normalized evaluations of the mean and standard deviation of error distances. Meanwhile, although flight trajectories are affected by unstable airflow outside, the method also has strong robustness. In the ablation studies, the contributions of adaptive filtering, error-based initialization, and error-based compensation are discussed. In sum, the adaptive filter, along with error-based initialization and compensation, facilitates improving the performance of the neural network PID parameter tuning process and enhancing the flight trajectory convergence.
Our ATC-NN-PID method is important for heading decision making and behavioral simulation in autopilot flight scenarios. However, the effects of individual emotions are not reflected during the decision-making process of virtual heading commands. Furthermore, cooperation and collaboration among multiple virtual pilots should be considered when the flight mission is relatively complex. The next work should also include comparisons between the virtual heading adjustment behavior model and the real-world heading adjustment behaviors. More research is needed to explore these aspects in detail to establish a comprehensive human–computer interaction model.

5. Conclusions

The adaptive trigger compensation neural network is used in the PID parameter tuning process to compute virtual heading commands during autopilot flight missions. Adaptive filtering, in conjunction with error-based initialization and compensation, is essential to refine the performance of neural network PID tuning. Adaptive trigger filtering selects the necessary heading errors to optimize the utilization of error information; dynamic parameter updating incorporates error-based initialization with the neural network to tune PID parameters; and error compensation synthesizing applies the PID parameters in the virtual heading command generation to simulate heading adjustment behaviors and reduce flight trajectory deviation and fluctuation. Two flight missions are discussed to validate the progress of our method in PID tuning. The method facilitates better flight convergence of trajectories and strong robustness in autopilot missions, which is an important step to model individual behaviors and decision-making processes in human–computer interactions.

Author Contributions

Y.Z. designed the methodology and authored the article, and S.F. provided reviews and revisions to improve its content. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

The authors affirm that this work does not involve human participants or animals.

Data Availability Statement

Data are accessible upon any rational request.

Acknowledgments

The authors express their gratitude for the opportunity to present this work. The authors appreciate the time, assistance, and professional suggestions of the Editor-in-Chief, the Associate Editor, and the reviewers on this work. The authors thank everybody who contributed to the work.

Conflicts of Interest

The authors declare that no potential conflicts of interest are associated with this work.

References

  1. Rahman, M.H.; Xie, C.; Sha, Z.H. Predicting sequential design decisions using the function-behavior-structure design process model and recurrent neural networks. J. Mech. Des. 2021, 143, 081706. [Google Scholar] [CrossRef]
  2. Gnjatovic, M.; Delic, V. Cognitively-inspired representational approach to meaning in machine dialogue. Knowl.-Based Syst. 2024, 71, 25–33. [Google Scholar] [CrossRef]
  3. Yi, S.H.; Shamsudin, S.S.; Pairan, M.F. Flight control system design for a rotorcraft-based unmanned aerial system using pole placement and LQR-based PID tuning techniques. J. Aeronaut. Astronaut. Aviat. 2024, 56, 615–636. [Google Scholar] [CrossRef]
  4. Miao, C.X.; Fang, J.C. The design and implement of micro autopilot system for low-altitude mapping of MAV. In Proceedings of the 2011 Second International Conference on Mechanic Automation and Control Engineering, Bao Tou, China, 15–17 July 2011; pp. 1744–17488. [Google Scholar] [CrossRef]
  5. Li, L.; Zhang, X.B.; Qian, C.X.; Wang, R.H.; Zhao, M.H. Autopilot controller of fixed-wing planes based on curriculum reinforcement learning scheduled by adaptive learning curve. IEEE Trans. Emerg. Top. Comput. Intell. 2024, 8, 2182–2196. [Google Scholar] [CrossRef]
  6. Madhuranthakam, C.R.; Singh, J.; Elkame, A.; Budman, H. Optimal PID controller parameters for first order and second order systems with time delay using a connectionist approach. Eng. Optim. 2010, 42, 295–303. [Google Scholar] [CrossRef]
  7. Cao, Y.; Zhang, L.; Yao, Y.; Wang, Y.; Liu, H.; Jie, Y. Research on frequency stabilization method of PID controller based on BP neural network optimization for POINT system on EAST. In Proceedings of the 7th International Conference Frontiers in Diagnostic Technologies, Frascati, Italy, 21–23 October 2024; Volume 20, pp. 1–7. [Google Scholar] [CrossRef]
  8. Liu, J.; Zhang, Z.; Zhang, J.; Chen, J.A. Application of a neural network on steam drum pressure control in a fixed-bed reactor for exothermic reactions. Appl. Sci. 2024, 14, 3052. [Google Scholar] [CrossRef]
  9. Kumar, N.; Thakur, N.; Gupt, Y. Optimisation of synchronisation control parameters for enhanced bilateral teleoperation system. Robotica 2024, 42, 3639–3656. [Google Scholar] [CrossRef]
  10. Talebi, S.P.; Darvishi, H.; Werner, S.; Rossi, P.S. Gradient-descent adaptive filtering using gradient adaptive step-size semantic search result. In Proceedings of the 2022 IEEE 12th Sensor Array and Multichannel Signal Processing Workshop (SAM), Trondheim, Norway, 20–23 June 2022; pp. 321–325. [Google Scholar] [CrossRef]
  11. Arthanari, S.; Jeong, J.H.; Joo, Y.H. Learning multi-regularized mutation-aware correlation filter for object tracking via an adaptive hybrid model. Neural Netw. 2025, 191, 107746. [Google Scholar] [CrossRef]
  12. Li, J.; He, X.; Zhou, Q.; Anthony, C.; Wang, B.; Lu, G.X.; Xu, H.M. Heuristic information-rich evolutionary modelling for engine soft sensors of hybrid electric vehicles. Appl. Soft Comput. 2025, 180, 113468. [Google Scholar] [CrossRef]
  13. Chen, L.G.; Zhu, P.C.; Qiang, W.; Zhang, X.B.; Wang, S.F. Fuzzy backpropagation neural network PID control of a 6-DOF parallel robot. In Proceedings of the International Conference on Mechanical Design and Simulation, Xi’an, China, 29 February–2 March 2024; pp. 1375–1384. [Google Scholar] [CrossRef]
  14. Qian, R.H.; Wu, R.P.; Wu, H. Research on adaptive control of six-degree-of-freedom manipulator based on fuzzy PID. Syst. Sci. Control Eng. 2025, 13, 2498912. [Google Scholar] [CrossRef]
  15. Liu, Z.L.; Lv, X.F.; Gan, S.K.; Yang, K.K. Application of particle swarm optimization-based BP neural network PID controller in spray humidification. Eng. Res. Express 2025, 7, 025412. [Google Scholar] [CrossRef]
  16. Mao, Q.H.; Chong, S.M.; Chai, J.Q.; Qin, S.; Zhang, F. Research on deviation correction control method of full-width horizontal-axis roadheader based on PSO-BP neural network PID. Actuators 2025, 14, 362. [Google Scholar] [CrossRef]
  17. Wu, L.F.; Wang, Z.H.; Rastgaar, M.; Mahmoudian, N. Adaptive velocity control for UAV boat landing: A neural network and particle swarm optimization approach. J. Intell. Robot. Syst. 2025, 111, 6. [Google Scholar] [CrossRef]
  18. Nangrani, S.P.; Singh, A.R.; Chandan, A. Chaos driven instability control using interval type-2 fuzzy logic controller for better performance. J. Intell. Fuzzy Syst. 2018, 34, 1491–1501. [Google Scholar] [CrossRef]
  19. Deng, X.K.; Chen, J.B.; Chen, C.Z.; Zhang, Y.Y.; Zhang, Z.Y. UAV path planning with improved PSO al-gorithm based on levy flight. In Proceedings of the 6th International Conference on Control and Computer Vision-ICCCV-Annual, Tianjin, China, 13–15 June 2024; pp. 86–91. [Google Scholar] [CrossRef]
  20. Srinivasan, A.V.; Jayarajan, N.; Ganesan, T. Optimizing UAV trajectory tracking using neural network-based PID control in dynamic environments. In Proceedings of the 2025 International Conference on Computational Innovations and Engineering Sustainability (ICCIES), Coimbatore, India, 24–26 April 2025; pp. 1–8. [Google Scholar] [CrossRef]
  21. Marino, A.; Neri, F. PID tuning with neural networks. In Intelligent Information and Database Systems. ACIIDS 2019; Nguyen, N., Gaol, F., Hong, T.P., Trawiński, B., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2019; Volume 11431, pp. 476–487. [Google Scholar] [CrossRef]
  22. Zhou, Y.T. Ternary correlation adaptive tuning for virtual autopilot commands. J. Guid. Control Dyn. 2024, 47, 1946–1951. [Google Scholar] [CrossRef]
  23. Rachmanto, A.D.; Iswanto, I.; Hernawati, H. Simulation and modeling of aircraft movements passing through VOR. Iop Conf. Ser. Mater. Sci. Eng. 2020, 830, 032021. [Google Scholar] [CrossRef]
  24. Hussein, H.H.; Ahmed, H.M.; Kandil, S.A.; Alexan, W. Unveiling diverse solitons in the quintic perturbed Gerdjikov-Ivanov model via a modified extended mapping method. Sci. Rep. 2025, 15, 15881. [Google Scholar] [CrossRef]
  25. Zhang, W.; Wang, Z.L.; Wang, H.Y.; Li, Z.W.; Wang, Y.F.; Zhao, Z.Y. AEK-MFIS: An adaptive ensemble of Kriging models based on multi-fidelity simulations and importance sampling for small failure probabilities. Comput. Methods Appl. Mech. Eng. 2025, 441, 117952. [Google Scholar] [CrossRef]
  26. Benrabah, M.; Kara, K.; AitSahed, O.; Hadjili, M.L. Adaptive Fourier series neural network PID controller. Int. J. Control Autom. Syst. 2021, 19, 3388–3399. [Google Scholar] [CrossRef]
  27. Ahmadi, A.; Esfanjani, R.M. Improved machine learning based approach for autotuning PID controller using genetic algorithms and parallel processing. J. Sci. Ind. Res. 2025, 84, 269–277. [Google Scholar] [CrossRef]
  28. Singh, A.; Yadav, S.; Tiwari, N.; Nishad, D.K.; Khalid, S. Optimized PID controller and model order re-duc-tion of reheated turbine for load frequency control using teaching learning-based optimization. Sci. Rep. 2025, 15, 3759. [Google Scholar] [CrossRef]
  29. Perry, A.R.; Olson, C. The FlightGear Flight Simulator History, Status and Future; Citeseer: Princeton, NJ, USA, 2021; Available online: https://kruimel.snt.utwente.nl/pub/software/flightgear/www/old/Papers/LinuxTag-2001/fgfs.pdf (accessed on 14 August 2025).
  30. Wang, L.; Li, Y.K.A. A multi-objective optimization method based on dimensionality reduction mapping for path planning of a HALE UAV. In Proceedings of the Chinese Automation Congress (CAC), Hangzhou, China, 22–24 November 2019; pp. 3189–3194. [Google Scholar] [CrossRef]
  31. Zhan, T.; Chen, W.T.; Xu, C.C.; Li, L.X.; Ding, X.X. Attention mechanism-based feature fusion and degra-dation state classification for rolling bearing performance assessment. Sensors 2025, 25, 4951. [Google Scholar] [CrossRef] [PubMed]
  32. Ma, B.; Dong, S.M. A novel hybrid efficiency prediction model for pumping well system based on MDS-SSA-GNN. Energy Sci. Eng. 2024, 12, 3272–3288. [Google Scholar] [CrossRef]
  33. Xue, H.; Xu, X.P.; Meng, X. Variety classification and identification of maize seeds based on hyperspectral imaging method. Optoelectron. Lett. 2025, 21, 234–241. [Google Scholar] [CrossRef]
Figure 1. The PID tuning procedure of the adaptive trigger compensation neural network in autopilot flight missions. Part 1 performs adaptive trigger filtering to select the necessary heading errors. Part 2 implements error-based dynamic parameter updating to generate PID parameters. Part 3 fulfill error compensation synthesizing to calculate virtual heading commands.
Figure 1. The PID tuning procedure of the adaptive trigger compensation neural network in autopilot flight missions. Part 1 performs adaptive trigger filtering to select the necessary heading errors. Part 2 implements error-based dynamic parameter updating to generate PID parameters. Part 3 fulfill error compensation synthesizing to calculate virtual heading commands.
Machines 13 00933 g001
Figure 2. The procedure of adaptive trigger filtering. The necessary heading errors are adaptively selected based on the process of (I) inverse linear combination, (II) non-linear mapping, (III) adaptive filter design, and (IV) sequence number determination. The mark “×” represents the data point in the heading error sequence or the necessary heading error sequence.
Figure 2. The procedure of adaptive trigger filtering. The necessary heading errors are adaptively selected based on the process of (I) inverse linear combination, (II) non-linear mapping, (III) adaptive filter design, and (IV) sequence number determination. The mark “×” represents the data point in the heading error sequence or the necessary heading error sequence.
Machines 13 00933 g002
Figure 3. Backpropagation neural network using dynamic parameter initialization. The neural network comprises three input layer nodes, five hidden layer nodes, and three output layer nodes. Backward propagation is used to update neural network parameters. The heading error and the heading error change are the inputs of the neural network, and the output are the adjustment amounts of PID parameters. Then PID parameters are computed using the error-based initialization strategy.
Figure 3. Backpropagation neural network using dynamic parameter initialization. The neural network comprises three input layer nodes, five hidden layer nodes, and three output layer nodes. Backward propagation is used to update neural network parameters. The heading error and the heading error change are the inputs of the neural network, and the output are the adjustment amounts of PID parameters. Then PID parameters are computed using the error-based initialization strategy.
Machines 13 00933 g003
Figure 4. Flight curves for the even-waypoint mission.
Figure 4. Flight curves for the even-waypoint mission.
Machines 13 00933 g004
Figure 5. Flight curves for the odd-waypoint mission.
Figure 5. Flight curves for the odd-waypoint mission.
Machines 13 00933 g005
Table 1. Settings of the even-waypoint mission.
Table 1. Settings of the even-waypoint mission.
WaypointLatitude (°)Longitude (°)Altitude (m)
056.42163.005000.00
157.00164.555000.00
Table 2. Even-waypoint quantitative evaluation.
Table 2. Even-waypoint quantitative evaluation.
MethodAFT
(s)
AFD
(m)
AHAT
(Times)
AEM
(m)
AEStd
(m)
R
H c t 753.62112,642.6417686.90333.030.84
PID 753.83112,665.8310614.65347.320.86
NN PID 752.90112,629.5510535.54302.360.99
TLBO PID 744.29112,613.976562.97324.050.98
TC PID 754.37112,624.839556.06247.380.99
ATC NN PID 753.02112,627.485518.67238.820.99
ATC NN PID nF 754.08112,633.6721533.46336.870.98
ATC NN PID nI 753.97112,638.0018614.27286.010.98
ATC NN PID nC 753.77112,632.9812533.78244.100.96
Table 3. Even-waypoint normalized assessment.
Table 3. Even-waypoint normalized assessment.
MethodNFTNFDNHATNEMNEStd
H c t 11.6411.271.845.925.24
PID 11.1513.021.655.655.23
NN PID 11.0612.781.375.645.13
TLBO PID 11.3212.991.505.634.95
TC PID 11.4212.850.725.694.83
ATC NN PID 11.0212.961.495.614.65
ATC NN PID nF 12.3811.362.285.635.29
ATC NN PID nI 12.9611.342.155.645.02
ATC NN PID nC 13.0311.311.265.624.67
Table 4. Settings of the odd-waypoint mission.
Table 4. Settings of the odd-waypoint mission.
WaypointLatitude (°)Longitude (°)Altitude (m)
030.50127.005000.00
131.25126.505000.00
232.15125.955000.00
332.90125.505000.00
433.75126.255000.00
Table 5. Odd-waypoint quantitative evaluation.
Table 5. Odd-waypoint quantitative evaluation.
MethodAFT
(s)
AFD
(m)
AHAT
(Times)
AEM
(m)
AEStd
(m)
R
H c t 3010.40419,704.13772518.511151.650.77
PID 3005.91419,197.00761577.62951.200.78
NN PID 2999.03418,132.58481097.12846.060.86
TLBO PID 3001.63418,482.46721042.42770.710.89
TC PID 3004.79419,120.521161085.30608.110.83
ATC NN PID 3043.90424,571.2598880.43606.600.94
ATC NN PID nF 3057.99427,338.6793927.25715.480.80
ATC NN PID nI 3019.01421,028.54791418.08897.770.68
ATC NN PID nC 3063.99427,907.6798940.59650.940.93
Table 6. Odd-waypoint normalized assessment.
Table 6. Odd-waypoint normalized assessment.
MethodNFTNFDNHATNEMNEStd
H c t 13.6511.813.977.416.34
PID 13.5911.773.127.066.58
NN PID 14.0912.253.007.026.56
TLBO PID 12.0013.973.686.436.37
TC PID 14.3912.394.376.725.96
ATC NN PID 14.4312.463.735.845.84
ATC NN PID nF 14.1812.223.845.905.99
ATC NN PID nI 14.1812.193.526.746.35
ATC NN PID nC 13.8411.913.836.045.68
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhou, Y.; Fu, S. Adaptive Trigger Compensation Neural Network for PID Tuning in Virtual Autopilot Heading Control. Machines 2025, 13, 933. https://doi.org/10.3390/machines13100933

AMA Style

Zhou Y, Fu S. Adaptive Trigger Compensation Neural Network for PID Tuning in Virtual Autopilot Heading Control. Machines. 2025; 13(10):933. https://doi.org/10.3390/machines13100933

Chicago/Turabian Style

Zhou, Yutong, and Shan Fu. 2025. "Adaptive Trigger Compensation Neural Network for PID Tuning in Virtual Autopilot Heading Control" Machines 13, no. 10: 933. https://doi.org/10.3390/machines13100933

APA Style

Zhou, Y., & Fu, S. (2025). Adaptive Trigger Compensation Neural Network for PID Tuning in Virtual Autopilot Heading Control. Machines, 13(10), 933. https://doi.org/10.3390/machines13100933

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop