1. Introduction and Background
Global aviation system modernization efforts have been in progress in the last decades and include the FAA’s Next Generation Air Transportation System (NextGen) [1
] portfolio in the U.S. and the Single European Sky Air traffic management (ATM) Research (SESAR) [2
] program in Europe. The modernization efforts are long-term plans with a large focus on improving the safety and efficiency of aircraft operations. High-precision trajectory prediction and robust trajectory anomaly detection methods are paramount to support efforts to improve the safety and efficiency of airspace systems. The abundance of sensor data collected from aircraft in flight has led to the establishment of structured routine data collection and analysis programs to improve safety. Due to the advances in modern machine learning techniques, operational insights utilizing data-driven techniques are gaining significant momentum to improve aviation safety and efficiency. Operations within the terminal airspace, in particular, are known to greatly impact both individual flight-level and entire airspace system-level safety and efficiency [3
]. Consequently, developing data-driven trajectory prediction and anomaly detection methods to operate within the terminal airspace is often a focus. The high traffic density, interdependent utilization of airport and airspace resources, and more complex traffic dynamics in the constrained terminal airspace make the tasks of trajectory prediction and anomaly detection within the terminal airspace challenging [3
]. Therefore, in-depth analyses of terminal airspace trajectory operations are required.
Trajectories following a similar spatial path or belonging to the same air traffic flow
tend to correspond to a specified structured operation within the terminal airspace, as defined by air traffic control (ATC). For each structured operation, the approach and climb paths mandated by ATC typically have very distinct energy profiles. Thus, unless a prediction or an anomaly detection algorithm uses the additional spatial context related to the air traffic flow to which the trajectory belongs, the algorithm may yield more conservative results. For instance, applying anomaly detection methods to an entire terminal airspace dataset without contextual spatial information may result in anomalous flights remaining undetected as their states are embedded within the entire dataset [4
]. Additionally, applying prediction methods to an entire dataset without contextual spatial information may result in less precise predictions. Further, in the context of air traffic flow management, it is essential to identify air traffic flows to characterize temporal variations to support system-level air traffic management (ATM) decision-making [3
]. Overall, it is evident that the accurate identification of air traffic flows in terms of their spatial context within the terminal airspace is necessary.
The trajectory clustering
task is generally formulated as an unsupervised machine learning (ML) problem. The task involves partitioning a collection of trajectories into similar groups to define flows [5
]. Several different trajectory clustering methods have been employed to identify air traffic flows in previous works. Eckstein [6
] presented an automated flight track taxonomy, which identifies air traffic flows by combining Principal Components Analysis (PCA) and k-means clustering. Rehm [7
] utilized a single linkage hierarchical clustering technique to identify air traffic flows. Enriquez and Kurcz [8
] developed an air traffic flow detection algorithm based on spectral clustering. Gariel et al. [9
] proposed two methods for identifying air traffic flows: (1) way-point-based trajectory clustering; and (2) trajectory-based clustering via PCA. Both of Gariel et al.’s proposed methods leverage the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) [10
] algorithm. Conde Rocha Murca et al. [3
] presented a data mining framework to characterize air traffic flows in metroplex systems, where DBSCAN is utilized to learn the typical network of nominal arrival and departure flows. Olive and Morio [11
] proposed a method to identify air traffic flows specifically in the terminal airspace, which recursively applies DBSCAN to cluster significant trajectory points [11
]. Further, as a data pre-processing step, Puranik [12
], Deshmukh [4
], and Olive and Basora [13
] utilized DBSCAN to identify air traffic flows prior to performing trajectory anomaly detection. Additionally, Olive and Basora [14
] demonstrated the use of a GMM (Gaussian Mixture Model) for trajectory clustering. In another work, Olive and Barsora [15
] utilized the HDBSCAN (Hierarchical DBSCAN) algorithm to identify air traffic flows for en-route trajectories. Basora et al. [16
] presented a trajectory clustering framework utilizing HDBSCAN to analyze air traffic flows. Additionally, Tanner and Strohmeier [17
] applied HDBSCAN to cluster surface trajectories for runway utilization assessments. Most recently, Olive et al. [18
] demonstrated the utilization of deep clustering techniques to identify and characterize air traffic flows.
Similar data instances are grouped into clusters according to a defined distance function
. It has been noted that one of the most critical components of trajectory clustering is the definition of an appropriate distance function [11
]. Trajectories are functional in nature, not independent data points, so selection of an appropriate distance function is often less straightforward [18
]. Additionally, the computation time of a distance function must scale well with increases in data size to ensure that clustering algorithms are efficient.
The majority of aviation literature focuses on the spatial dimension of air traffic flows (trajectories’ latitude, longitude, and, sometimes, altitude features) [4
]. Most distance functions require re-sampling all trajectories to standardize the length of the trajectories such that each trajectory is represented by an n
-dimensional vector of points [13
]. The Euclidean distance (ED) is most often utilized to compute the distance between two n
-dimensional trajectories [13
]. Provided two n
-dimensional trajectory vectors,
, the ED computation proceeds as:
indicate an aircraft’s horizontal position related to longitude and latitude measurements, respectively, at point k
in the sequence of points making up the aircraft’s trajectory.
Due to the convergence/divergence of trajectories within the terminal airspace, the distances computed between trajectory points closest to the airport will be relatively small for all trajectories, regardless of the air traffic flow to which the trajectories belong. This is due primarily to runway configuration and assigned arrival and departure runways. On the other hand, distances between trajectories within the same flow may be relatively large between trajectory points considered at the terminal airspace’s defined border. The distance between these trajectory points depends on the density of the air traffic flows and the radius around the airport. The uneven distribution of distances as aircraft arrive at or depart from the airport may skew the classification, resulting in misclassification of trajectories or inadequate air traffic flow identification. Therefore, it is noted that the utilization of the ED to cluster trajectory records may not be adequate [11
Other distance functions have been proposed to address the issues related to the limitations of the ED, such as the Symmetrized Segment Path Distance (SSPD) [19
] distance. Basora et al. [16
] compared the utilization of the ED versus the SSPD to cluster en-route trajectories and found that the utilization of the SSPD results in more precise identification of air traffic flows, yet there exists a significant trade-off with computation time [16
]. A large computation time may prevent subsequent applications of the algorithm in real-time. Gariel et al. [9
] and Olive and Morio [11
] presented iterative point-based clustering methods to identify air traffic flows. However, clustering of entire trajectory records or multi-point segments at once is often a requirement to enable the extension of clustering methods to real-time applications. While real-time application is not the focus of this work, aviation organizations have set goals to ultimately deploy novel trajectory prediction and anomaly detection methods in real-time or near-real-time [20
]. Considering the previous observations, the following research objective is proposed for this work:
A primary limitation in the utilization of the ED is that the uneven distribution of distances as aircraft arrive at or depart from the airport may result in inadequate identification of air traffic flows. Therefore, a distance that places more importance on specified trajectory points in the sequence of re-sampled trajectory points could mitigate the limitations of the ED. An alternative distance providing this ability is the weighted Euclidean distance (WED). The WED is a slight modification of the ED such that an extra multiplicative factor is added, which does not significantly increase computation time, nor does it prevent the extension to real-time applications. Considering the same two n
-dimensional trajectory vectors,
, and a weight vector, W
, the WED computation proceeds as:
The WED introduces an additional trajectory point weighting term, , which enables an “importance” to be assigned to each trajectory point. The importance may be determined according to the position in the sequence of points relative to the airport’s location or bounds of the airspace. Thus, the WED is proposed as a computation-time-efficient distance that results in a more accurate clustering of the converging and diverging trajectories within the terminal airspace compared with the ED through the use of a weighting factor for trajectory points.
Due to the increased prevalence of the HDBSCAN [21
] algorithm within the aviation literature [16
], it is selected as the clustering algorithm for which to test the effectiveness of the WED. The HDBSCAN algorithm extends the widely-utilized DBSCAN by converting it to a hierarchical clustering algorithm, where it ultimately extracts a flat clustering (set of clusters without any explicit structure that relates the clusters to each other) based on the stability of the identified hierarchical clusters [24
]. The algorithm’s primary advantage over DBSCAN is identifying clusters of varying density, which is relevant for applications in the terminal airspace where flows often have varying densities, i.e., some flows appear very tight, while others are more spread out. HDBSCAN requires a single input parameter that sets the minimum cluster size to perform clustering [21
]. Additionally, an optional “smoothing” parameter may be set that provides a measure of how “conservative” the clustering should be [24
]. The larger is the smoothing parameter value, the more points are declared as outliers, and the clusters are restricted to more dense areas [24
]. To demonstrate the proposed method’s efficacy, only horizontal spatial features (latitude and longitude) are considered for clustering.
From the OpenSky Network’s [25
] historical database, flight records are retrieved for flights arriving at San Francisco International Airport (KSFO) in 2019 via the traffic Python library [26
]. Additionally, ASOS (Automated Surface Observing System) data are extracted. ASOS stations take minute-by-minute observations and generate basic weather reports, with the access to the processed weather reports being provided by the Iowa Environmental Mesonet [27
3.1. Data Processing
First, the data must be extracted from the two data sources. The extraction of ASOS data is straightforward, requiring simple processing to fill and interpolate missing values. Then, OpenSky Network state vectors within a 20 nautical mile radius of KSFO and below 25,000 ft altitude are requested via the traffic Python library for all days in 2019. State vectors that are redundant, contain empty values for latitude, longitude, altitude, heading, or groundspeed, or cannot be associated with a commercial flight utilizing their callsign, are discarded. The ASOS data are then fused with the state vectors based on the state vector timestamp.
Next, state vectors are split by callsign. Then, the state vectors split by callsign are further split into individual flight segments if the time difference between two successive state vectors is greater than 5 min. A unique identifier is assigned to each flight segment. If the median of the first five state vector altitude measurements is greater than the median of the last five state vector altitude measurements, then the flight segment is characterized as an arrival, and departures are discarded. The touchdown point is identified as the first point where the groundspeed reaches below 100 knots or the last point if no state vector groundspeed measurement is recorded to reach below 100 knots.
Utilizing the mean sea level pressure from the fused ASOS data, a corrected airport altitude at the touchdown point time stamp for each flight segment is computed. If the difference between the touchdown state vector altitude measurement and the corrected airport altitude is greater than 100 ft (the flight segment does not reach within 100 ft above the ground level), then the flight segment is discarded. Then, cumulative ground track distance from the touchdown point is computed for each state vector in each flight segment.
The flight segments are then re-sampled on 50 uniform intervals between 0 and the maximum cumulative ground track distance value for the flight segment within a 20 nautical mile radius of KSFO. Each state vector’s latitude and longitude measurements are projected onto a UTM coordinate system. The Cartesian coordinates are then stacked to generate feature vectors for each flight, and the feature vectors for all flights are aggregated to produce the clustering input matrix.
The final dataset contains 178,890 total arrival flight segments. The dataset contains both domestic and international flights on 187 airlines, where 110 unique aircraft types are identified. From the final dataset, 237 days are extracted and separated into daily datasets for clustering, where each day contains around 500 trajectories. Additionally, 30 weeks are extracted and separated into weekly datasets for clustering, where each week contains around 3500 trajectories.
3.2. HDBSCAN Clustering
For each dataset in the data groups (daily and weekly), an HDBSCAN clustering is performed to evaluate the impact of utilizing the WED as opposed to the ED. The hdbscan Python library [24
] is leveraged to perform the clustering. To select values of W
to assess the performance of the WED compared with the ED, the weights
are varied according to functions inspired by the shapes of normal and beta distribution probability density and cumulative distribution functions. Four different weighting schemes are selected, and are displayed in Figure 1
. The point 0 is the point in the trajectory closest to the airport location (the touchdown point), whereas point 50 is the first point in which the trajectory enters the terminal airspace.
Weighting 2 is included to test the method’s robustness and emphasize the importance of selecting an appropriate weighting scheme. Weighting 2 weights the trajectory points in the center of the trajectory higher, yet most other points are weighted near zero on both ends of the trajectory. This should result in a less accurate clustering due to the focus on a limited sub-sequence of the trajectory points.
For the clustering of each dataset, the parameter controlling the minimum cluster size is set to 2% of the total number of flights within the dataset. For the daily datasets, this is an average of 10 trajectories, and for the weekly datasets, an average of 70 trajectories, which is consistent with other studies leveraging HDBSCAN or DBSCAN clustering [14
]. As the WED weighting schemes and ED are compared against each other directly for each dataset, the bias of the portion of outlying trajectories is removed by utilizing the HDBSCAN smoothing parameter to control the percentage of outlying trajectories identified. Gariel et al. found from 2% to 16% outlying trajectories per day [9
]. In this study, for each dataset, an iterative loop is implemented to adjust the smoothing parameter in each loop, such that the percentage of outlying trajectories is restricted to between 10% and 15% of the total number of trajectories within the dataset to remove outlier bias.
To compare the WED weighting schemes’ performance with that of the ED, the mean distance between trajectories assigned to a flow and their respective flow centroid is considered. If air traffic flows are more accurately identified, then it follows that the distances between trajectories assigned to a flow and their respective flow centroid will be smaller. Therefore, if the mean of these distances for the WED weighting schemes is lower than that for the ED, and utilization of the WED does not significantly increase computation time, then the proposed method improves terminal airspace air traffic flow identification. Graphic representation of specific daily or weekly datasets enables visual inspection to confirm conclusions.
In summary, the WED shows promise in improving air traffic flow identification compared to the commonly-utilized ED on both daily and weekly datasets. The computation time difference between the ED and the WED is not significant. Further, more accurate flows are identified, which also indicates a more robust identification of outlier trajectories. It is demonstrated that the selection of an appropriate weighting scheme is important. In particular, for the KSFO terminal airspace, if trajectory points closer to the border of the terminal airspace, but not necessarily at the border, are weighted highest, then a more accurate clustering is computed. However, the most appropriate weighting scheme may vary for different airports depending on runway configuration.
This work will subsequently be extended to other terminal airspaces with dissimilar runway configurations. Further, the proposed method will be applied to departing datasets to assess performance compared with utilizing the ED. Additionally, future work includes investigating the impact of utilizing the WED to identify air traffic flows on a subsequent trajectory anomaly detection algorithm compared with utilizing the ED.