# Secure Aviation Control through a Streamlined ADS-B Perception System
## 4 Methodology
### Detection and Classification  
A model that forecasts the class of supplied data points is called a machine learning classifier model. In supervised learning, test datasets that the machine learning model has never seen before are used to test and evaluate the model after it has been trained with potential attacks using training data. Multiple classifiers were evaluated while creating the ensemble machine learning model to attain the best outcomes. We utilized Jupyter Notebook to test the algorithms mentioned previously in the overview section (random forest, AdaBoost, naive Bayes (NB), neural networks, SVM, and kNN), and the comparison factors are represented as confusion matrices for the top three performing models. The algorithms were tested respectively, without parallelization for both detection and classification.  
* **Detection**: the models' first test is performed on the dataset containing only original and malicious ADS-B messages while ignoring the different types of malicious messages. The dataset was balanced, so there was no need for any techniques to balance it, and then we tested the model's ability to detect a fake message without necessarily classifying it into its relevant attack type. The dataset was split into multiple types. The model was tested using different training dataset sizes to achieve the highest results by lowering the amount needed in the training process since our model is efficient, which is important because we are dealing with decisions that could depend on these messages. These decisions could change in a matter of seconds.
* **Classification**: here, we emit authentic messages from the dataset, and we are left with the injected messages; this is done to enable testing of the classification of attack types, which consist of three different types, as discussed above. Unfortunately, the dataset is unbalanced, so we had to test different balancing techniques to maximize our model's efficiency. After balancing the dataset and before further testing of the models' classification, we also split our experiment into different stages to obtain better results with the lowest amount of training needed, hence proposing an efficient model. Finally, it is obvious and trivial that the model will perform better with larger training data. Still, since we aim to achieve efficiency in our model and have a fast response to zero-day attacks on ADS-B messages, we decided to move forward with lower training dataset sizes. We have yet to notice much improvement after 30%, but this still needs further research with a larger data set.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature** & **Datatype/Value** & **Definition** \\ \hline Time & Int/No nulls & The time of the last position was reported. \\ ICAO24 & String/No nulls & International Civil Aviation Organization 24, a unique hex \\  & address of transponder. \\ LAT & Float/Nulls exist & Latitude. \\ ION & Float/Nulls exist & Longitude. \\ Velocity & Float/Nulls exist & Velocity in m/s. \\ Heading & Float/Nulls exist & The angle at which an aircraft is moving. \\ VertRate & Float/Nulls exist & The ascending/descending rate of the aircraft. \\ Call Sign & String/Nulls exist & The callsign of the aircraft. \\ On-ground & Bool/No nulls & Indicate if the aircraft is on the ground or not. \\ SPI & Bool/No nulls & Special purpose identifier confirms the identity of an aircraft. \\ Squawk & Int/Nulls exist & Code for identification and emergency purposes. \\ Baroaltitude & Int/Nulls exist & Bar altitude in meters. \\ Geoaltitude & Int/Nulls exist & Geo altitude in meters. \\ Lastposupdate & Int/No nulls & Time of the last position update. \\ Last contact & Int/No nulls & Time of the last signal sent/received. \\ RSS & Float/Nulls exist & Signal strength. \\ Doppler & Float/Nulls exist & Any changes in the frequency of transmission. \\ Label & Float/Nulls exist & Indicates an authentic or malicious ADS-B message. \\ \hline \hline \end{tabular}
\end{table}
Table 5: Dataset features.