A General Framework for Flight Maneuvers Automatic Recognition

: Flight Maneuver Recognition (FMR) refers to the automatic recognition of a series of aircraft flight patterns and is a key technology in many fields. The chaotic nature of its input data and the professional complexity of the identification process make it difficult and expensive to identify, and none of the existing models have general generalization capabilities. A general framework is proposed in this paper, which can be used for all kinds of flight tasks, independent of the aircraft type. We first preprocessed the raw data with unsupervised clustering method, segmented it into maneuver sequences, then reconstructed the sequences in phase space, calculated their approximate entropy, quantitatively characterized the sequence complexity, and distinguished the flight maneuvers. Experiments on a real flight training dataset have shown that the framework can quickly and correctly identify various flight maneuvers for multiple aircraft types with minimal human intervention.


Introduction
Flight Maneuver, according to the standard definition given by the Federal Aviation Administration (FAA) [1], refers to a series of flight patterns of an aircraft under the control of the pilot.FMR as a key technology for automatic evaluation of flight technology is the focus of research on the application of artificial intelligence in the field of flight training.In the 1970s, for one-on-one, air-to-air combat training, NASA developed an applied to common time series analysis methods.As an artificial mechanical operating system, the data performance of the same flight maneuver of different pilots of different types of aircraft is very different, not to mention the influence of environmental factors such as weather variation.
Essentially, FMR is a multiple nonlinear time-series pattern-recognition problem [5].Pattern-recognition problems mainly include classification and clustering.
Classification-based FMR In the time-series classification problem, feature volume construction and classifier design are the core problems.Time-series classification aims to take the whole time series as input to assign a discrete label.In FMR, different maneuvers often have different lengths due to differences in aircraft types, and the same maneuvers have different lengths due to differences in pilot operating habits.It is more difficult than the general classification problem owing to the inequational length of the classified time-series data, which makes it impossible to apply the general classification algorithm directly.
In order to solve these difficulties, there are usually two approaches.First, define the appropriate distance degree using a distance-based pattern-recognition method, such as Dynamic Time Warping (DTW) distance [6][7][8], Locality Sensitive Hash (LSH) distance [9], and Approximate Entropy [10].The advantages of these methods are that they conform to the basic principles of pattern recognition; the more similar the patterns are, the smaller their distances are; and the algorithms are simple and easy to implement, do not limit the length of the time series between patterns, and can analyze nonlinear time series.The significant disadvantages are expensive calculation and inability to identify subtle differences between patterns.
(1) The main methods for feature extraction are SVD and SVM methods, combined with least squares or hierarchical classification methods, which reduce the computational effort by reducing the number of dimensions and compressing the data.The models are simple and easy to train but are not complete, and they are sensitive to temporal length and require manual prior knowledge.(2) The expert knowledge rule model method needs to establish the artificial rule knowledge database first, then use the pattern-matching query method to achieve recognition.The knowledge rule extraction method includes Natural Language Processing, Genetic Algorithm, and Swarm Optimization.This type of method is very widely used, with high recognition efficiency and correct rate, but the unavoidable disadvantages are high labor cost; the fact that a certain model only corresponds to a certain type of aircraft type or flight task; and the inability of the method be generalized.( 3) The probabilistic graphical model-based mainly uses hidden Markov model (HMM), Kalman filtering, and dynamic Bayesian methods, which can not only identify but also predict and only need a few parameters to form a complete model but cannot handle nonlinear time series.(4) The model based on neural network work uses deep neural network with fully supervised training method to constitute the model, with high recognition rate and good model maturity but also with high cost of integration with labeled data and computational complexity.Different aircraft types correspond to different models and need to be completely retrained.
Naturally, hybrid methods combining multiple methods have also been proposed [37,38]; these methods have better recognition performance but still do not have the ability to generalize.

Clustering-based FMR
In addition, some scholars have also conducted FMR from the perspective of clustering [39][40][41][42].These methods do not require prior knowledge with the ability to generalize.However, the clustering results rely heavily on good temporal segmentation, and most of the papers appearing now use manual segmentation without automatic segmentation capability, and the clustered results still need to be interpreted by human experts and cannot correspond automatically.
In summary, it can be found that the existing literature methods all perform FMR for a certain task of a certain aircraft model and generally have the significant disadvantages of relying on manual expert knowledge, being unable to automatically segment, and being difficult to generalize.
To the best of our knowledge, there is no general framework that can automatically segment sequences and quickly discriminate between maneuvers with minimal human intervention.
This paper proposes a new general framework; the general idea is to integrate the automatic segmentation capability of unsupervised clustering and the ability of information entropy to distinguish sequence complexity.
This paper is organized as follows.Section 2 introduces the automatic segmentation method of flight maneuver sequence.Section 3 introduces the automatic recognition method of maneuver segments.Section 4 completely elaborates the overall framework of automatic FMR processing.Section 5 covers the experimental process and experimental results, and the conclusion is given in Section 6.

The Trend Fragmentation Algorithm
In this paper, a key parameter is selected for trend identification, and the index of all trend segments is obtained using the slope method combined with a height change threshold, using a sliding model with a double window.
The slope method is based on the least square method, where the sequence to be segmented is fitted to a straight line, and the main trend of the sequence is determined by comparing the slope of the line with a threshold size.
Set  = ( 1 ,  2 , ⋯   )  is a sample set,  = ( 1 ,  2 , ⋯ ,   )  is the time sequence set,   is a subset of the samples,  = (1,2, ⋯ ), and L is the number of trend segments.The model parameters are obtained by fitting the least squares method as in Equation (1).
The height-change threshold is used to determine long, slow-climbing, or circling maneuvers in flight, which have small slopes and long durations and can be misjudged based on the slope alone.The algorithm is described in Algorithm 1.
Algorithm 1 The Trend Fragmentation Algorithm.Input: sample set  = ( 1 ,  2 , ⋯   )  ; time sequence set  = ( 1 ,  2 , ⋯ ,   )  ; 1. Set slope threshold   and height-change threshold ∆  ; 2. Initial value of fitting parameter  = (, )  ; 3. Initialize the fixed window  = (   ,  2 , ⋯ ,    )  ,   = 1,   = ℎ ; 4. Initialize the sliding window  = (   ,  2 , ⋯ ,    )  ,   = 1,   = ℎ ; 5. Initialize the output sequence   = (   ,    , ); 6. Read a samples subset   = (   , ⋯    )  ; time sequence set   = ; 7. Least squares fitting model to obtain parameters:   ; 8.If  ≥   , identifies   as an upward trend, set f = 'U'; 9. Otherwise, if −  <  <   identifies   as a level trend, set f = 'L'; 10.Otherwise, identifies   as a downward trend, set f = 'D'; The core of Algorithm 1 is to use the sliding double window method to fit the slope to the original data and determine the flight attitude as ascending, leveling, or descending at that time based on the slope and use the change in attitude as the signal for automatic sequence segmentation.The   is slope threshold, ∆  is height-change threshold,  is fitting matrix,  is the fixed window,  is the sliding window,   is the output subsequence, f is the flag bit, and takes values in the range { 'U', 'L', 'D'}.

The Clustering Algorithm
With Algorithm 1, we obtain the trend segments, and this section will use the dynamic clustering method ISODATA (Iterative Self Organizing Data Analysis Techniques Algorithm) to complete the segment classification.ISODATA algorithm automatically selects a number of samples as cluster centers and adjusts the class centers by sample mean iteration in subsEquationuent calculations and realizes the adjustment of cluster center data by merging and splitting of patterns.However, the input data are time series, so the algorithm cannot be used directly; therefore, this paper improves the algorithm to TS-ISODATA, and the algorithm is described as follows Algorithm 2.

For input raw data
, n parameters, m data points of the fragment, normalized as calculate its statistics as

Flight Maneuver Recognition
Algorithm 2 assigns the fragment to a specific class without knowing which flight maneuvers it is.In this section, the algorithm will use phase reconstruction to reconstruct the feature space and identify specific classes of flight maneuvers based on the principle that different maneuvers have different approximate entropy.

Phase Space Reconstruction
Due to the superiority of PSR (phase space reconstruction) for chaotic time-series computation [43], this paper adopts a multivariate data fusion reconstruction method based on Bayesian estimation theory, and the main calculation steps are as follows.

Reconstruction Parameters
The phase space reconstruction technique has two key parameters: the dimension of the embedding  and the delay time  , which are determined here using the C-C method.
1. Define the correlation integral corresponding to each point y of the embedded time series in the reconstructed phase space as in Equation ( 4).
where   is the reconstructed phase space vector,  is the number of vectors  =  − ( − 1), m is the embedding dimension, N is the number of points of the original time series, t is time, and () is the associative integral, a cumulative distribution function that expresses the probability that the distance between any two points in the phase space is less than the radius r.Here, the distance between points is expressed as an infinite number of parameters of the difference of vectors.
2. Split the given time series into t equationual and disjoint subsequences as Equation ( 6), where t is the reconstruction time delay.
6. Take the value corresponding to the first zero point of  ̅ 2 () or the first minimal value of ∆ ̅ () as the optimal time delay . 7. Let the t corresponding to the global minimum of  2 () be the length of the time series window and the embedding dimension m.

Fusion Phase
As previously stated, the single variable delay time is  , and the embedding dimension is .To ensure that the multivariate is fully expanded in the same phase space without distortion, each variable's  = min(  ), and  = max(  ), ( = 1,2, ⋯ , ).Each reconstructed sequence expression   as in Equation (13).
Extract the  reconstructed sequences of the same position  out of phase points in Equation ( 13) to form the fusion set   = [ 1 ,  2 , ⋯ ,   ].The specific expression is given in Equation ( 14).
Let the expression of the phase point at position  after fusion be   , and the optimal fusion phase point at  is obtained according to Equation (15).
The final Bayesian estimate of the optimal fusion phase point at position k is obtained as in Equation (19), where the upper and lower limits of  are the maximum and minimum values of the phase point, and the PSR can be completed after finding all M position phase points.

Recursion Graphs and Approximate Entropy
Recursion graphs (RP) is an effective method for qualitative analysis of nonlinear dynamical systems, which can reveal the internal state evolution process of the system by using the image-change pattern.It is generally implemented using the Heaviside function.The black dots in the RP diagram indicate that the attractor trajectories reach the same region of the orbit at different moments and vice versa for the white dots.
Approximate entropy can quantitatively analyze the structural complexity of nonlinear systems [44] as defined in Equation (20).Different flight maneuvers generally have different complexity and have different approximate entropy.By calculating the approximate entropy and combining with the maneuvers entropy library, we can know which maneuver it is.

The FMR General Framework
The general idea of the generic framework proposed in this paper is to integrate the automatic segmentation capability of unsupervised clustering and the information entropy capability of distinguishing sequence complexity.
First, the original input data are processed using a dynamic clustering method such as ISODATA, and the algorithm outputs the segmented, unknown kinds of maneuver sequences.Second, the multivariate phase space reconstruction calculation is applied to establish the complete phase space of the dynamical system.Then, the recurrence map and approximate entropy are calculated in the new phase space to analyze the complexity of the sequences qualitatively and quantitatively.Finally, according to the principle that the complexity of different kinds of maneuver sequences is different, the specific kind of the sequence is determined based on the calculation results so as to complete the FMR.The specific flow chart is shown in Figure 1  In the flow chart, the raw flight data are first preprocessed to extract some of the parameter columns.The speed, altitude, roll angle, and pitch angle form a parameter matrix, which is involved in the unsupervised clustering calculation.Using the doublewindow algorithm, the trend identification is completed by using the normal load as the slope primitive, and the trend is used to segment the whole raw sequence into subseries and output the index values.Based on the index values of subsequences in the previous step, parameter fragments are extracted for each of the four parameter sequences.The extracted four parameter fragments are fed into the C-C algorithm, and the phase space reconstruction is performed according to the calculated minimum delay time and maximum embedding dimension, respectively, and the phase points at the same position in these four spaces are fused to extract the action fragments.After a comprehensive analysis of the qualitative values of the recurrence map and the quantitative values of the approximate entropy, the action recognition results are finally obtained.

Experiments
The experimental environment is Windows 10 operating system, Anaconda development environment, python language, and Matlab7.1 simulation platform.The visualization tool is the three-dimensional flight path recovery system (3D-FPRS) developed by the author's team  TS-ISODATA model has six clustering parameters, and K = 7, L = 1, and I = 100 were selected in the experiment, and the genetic algorithm was used to find   ,   ,   .The final optimal parameter setting values obtained are   = 1,   = 0.0373, and   = 0.0043, and the evaluation result using this set of parameter values is 6.3823.The input raw sequence is segmented into 96 maneuver segments.The segmentation calculation process takes an average of 76 s.
Three samples of the trace recovery visualization and recurrence map experiment are given in Figures 3-5    In order to study what exactly these three categories of maneuvers are, this paper uses the recurrence diagrams of these three categories of maneuvers in conjunction with the visual flight path recovery system to be able to clearly distinguish the categories of maneuvers.As shown in Figures 3a, 4a, and 5a, category 1 is Eight maneuver, category 2 is RectangularCourse maneuver, and category 3 is Spin maneuver.Not only do these three categories of maneuvers have different ApEn value, but their RPs also have significant differences, which perfectly match the complexity level given by flight experts as shown in Figures 3b, 4b, and 5b.The RP and ApEn calculation process takes an average of 88 s.
The overall average time of the whole framework automatic FMR calculation process is 285 s with 5730 raw input data.
In order to verify that the framework can be applied to multiple aircraft types, we selected two other datasets to complete the validation experiments, which are also from CAFUC real flight training records: aircraft types SR20 and DA42, file 3 name log_210521_ZHCC (13,750 lines), and file 4 name log_210531_ZUUU (13,018 lines); the raw flight data are visualized as Figure 6.In addition, in order to do comparison experiments, the project team developed an expert validation aid tool (EVAT) as shown in Figure 7.The system is also based on the CesiumJS platform, which can not only be reduced to 3D dynamic visualization of flight trajectory but also can display each second of temporal parameters and mark them in sequence, helping flight experts to judge flight movements with the naked eye.
With this tool, three flight experts made flight maneuvers judgments on the above two experimental files and two validation files, frame by frame, respectively, and the complete comparison results are shown in Table 3 below.The experimental results in Table 3 show that the method in this paper can perform FMR for three types of aircraft and different file lengths, with the highest accuracy rate for category 1 (Eight maneuver), and the lowest accuracy rate for category 2 (RectangularCourse maneuver), with an overall average accuracy rate of 85.5%.The reason why the Eight maneuver accuracy is the highest is because the maneuver is significantly different from others, and the RectangularCourse maneuver accuracy is the lowest because the maneuver is generally time-consuming, which is accompanied by a half-spin maneuver, and the number of such maneuvers is small, so the recognition is not effective.
In terms of time consumption, the consumption time is related to the document length, and overall, the recognition speed of this paper is 54.3 times faster than human flight experts.
The comparison experiments were difficult to design and implement because none of the other papers disclosed the datasets used, and some of the papers corresponded to aircraft types that were fighter jets or UAVs, which differed greatly from the temporal nature of this paper; neither did any of the other methods cover temporal segmentation and automatic recognition.However, we still completed the recognition experiments using the same datasets provided in this paper, files 1 and 2, and the experimental results are shown in the following Table 4. From the results, we can see that under the same flight-type condition, the accuracy of this paper's method is second only to the expert system, and the speed is second only to SVM, which is better than other methods in the comprehensive evaluation.More importantly, if we want to follow the aircraft model, except for this paper, all other methods have to retrain the model or redesign the knowledge rules, which does not have generalization ability in practical application scenarios.

Conclusions
In this paper, a general framework was constructed for the first time for automated FMR based on dynamic clustering and phase space reconstruction.The framework decomposes the FMR task into two parts, which are automatic maneuver sequence segmentation and automatic maneuver class identification.The automatic maneuver sequence segmentation was implemented by the improved dynamic clustering method TS-ISODATA, which solves the problem of self-organized iterative clustering of multivariate time series and successfully segments the input data into multiple segments and automatically clusters them into four classes.Due to the chaotic nature of the flight dynamics system, the automatic recognition of maneuver categories partially reconstructs the phase space of multivariate fusion, transforms the representational dimensional change patterns of flight maneuvers that are difficult to organize into attractive subsequences that are easy to identify, and generates recursive graphs from them to calculate ApEn values that can characterize the complexity of maneuvers.With the help of a visual 3D flight-track reduction system, the flight maneuver categories are easily identified.With an input sequence of 5000 s, the entire framework computation process takes an average of 285 s, which is 54 times faster than human expert recognition, with an overall accuracy rate of 85.5%.
In the next step, the entropy corresponding to different flight actions can be solidified so as to form an automatic identification library for fast and automatic classification output.This step requires collecting a large number of samples of a particular flight maneuver and deriving a reasonable range of approximate entropy values through a large number of experiments, and the range of values among the maneuvers should not overlap to avoid duality.According to different entropy value ranges corresponding to different aircraft maneuvers categories, automatic identification rules were established to realize the final automatic output of flight maneuvers.For maneuvers with close approximate entropy values and little difference, the complexity of the recurrence graph should be considered, and the difference enhancement of information entropy should be designed to further strengthen the difference between maneuvers.In addition, as a patternrecognition category, although the method in this paper has better generalization ability and does not require pre-training, it is computationally intensive and time-consuming and cannot realize online real-time recognition.At this stage, it can only be used for postflight analysis to support the next application, such as flight technology scoring based on a specific flight maneuver and post-accident investigation after a flight accident.In the future, the principle of the method can be explored in depth to simplify the computation process.

Figure 1 .
Figure 1.A general framework for FMR.
. The system is based on the open-source CesiumJS platform and implemented using WebGL, HTML5 technology, which can reduce the input flight raw data into 3D dynamic visualization of flight trajectory.The experimental raw data were obtained from CAFUC real flight training records: the aircraft type is C172R, file name 1 log_210721ZUCK, 5724 lines; file name 2 log_210316ZUUU, 6445 lines.Due to the problem of data accuracy, 1104 rows of data in log_210721ZUCK and 4626 rows of data in log_210316ZUUU were used during the experiment, with six columns of data in each row, totaling 34,380 pieces of data.The total length of the experimental sequence was 5730.The whole raw flight data are visualized as Figure 2.
For each category   , recalculate the clustering centers   = Algorithm 2 TS-ISODATA Algorithm.Input: , trend sequence O; 1. Normalized processing   ; 2. Statistics calculation ̅  ,   ; 3. Construct feature vectors  = (̅ 1 ,  1 , ̅ 2 ,  2 , ⋯ , ̅  ,   )  ; 4. Randomly select  0 samples as initial clustering centers  = { 1 ,  2 , ⋯ ,   0 }; 5. Calculate the distance from each sample   to the cluster center of the  0 cluster centers and assign it to the class with the min distance; 6. Determine whether the number of elements in each class above is less than   .If so, discard the class, make  =  − 1, and reassign the samples to the class with the min distance;7.

Table 3 .
The overall experimental results.

Table 4 .
The comparison experiments results.