# Event-Based Emergency Detection for Safe Drone
## 4 Case Study
### Abnormal Case: Too Late (Air Collision)  
The next case is the collision encounter simulation. We made the drone get hit by an unknown flying object at waypoint C and examined the control method's response to the incident, as shown in Figure 7a. The drone was not able to arrive at waypoint c, meaning it would either call for an emergency landing or deploy a parachute right after the interval time exceeded the max out-of-bounds time-window. In Figure 7b, the moment of the actual emergency occurrence is marked with a yellow line, whereas the moment of emergency detection is marked with a red line. The moment of emergency detection describes the split moment where the event-based controller diagnose an emergency. Further in Table 3, the actual numerical time data including T\({}_{\text{start}}\), T\({}_{\text{min}}\), T\({}_{\text{max}}\), and the actual arrival time T\({}_{\text{arrival}}\) is displayed. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Path** & **T\({}_{\text{start}}\)** & **T\({}_{\text{min}}\)** & **T\({}_{\text{max}}\)** & **T\({}_{\text{arrival}}\)** \\ \hline
**A** to **b** & 0.00 s & **4.50 s** & **5.50 s** & 4.74 s \\
**b** to **c** & 4.74 s & **9.24 s** & **10.24 s** & 9.27 s \\
**c** to **d** & 9.27 s & **13.77 s** & **14.77 s** & 13.61 s \\
**d** to **e** & & & & \\
**e** to **F** & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The actual numerical time data including T\({}_{\text{start}}\), T\({}_{\text{min}}\), T\({}_{\text{max}}\), and the actual arrival time T\({}_{\text{arrival}}\) for the extreme wind case. On the path from c to d, the T\({}_{\text{arrival}}\) was outside the time-window. The initial call for an emergency landing would have been 13.61 s away from the start of the mission. This is a considerably long period of time, but better than lacking the ability to detect such conditions with using PID controllers alone. Figure 6: (**a**). Drone movement 2D log on abnormal case: too early. The vertical red line marks the moment when the drone detected an emergency and proceeded with an emergency landing. The wind was applied from the beginning of the mission, which is marked with a yellow line. Due to extreme wind conditions, the drone could not provide stable operations. (**b**). Time-window check results. The drone did not make it in the normal arrival time-windows on the path from c to d. The yellow line at the beginning indicates that extreme wind conditions were applied from the beginning of the flight. The red line indicates the moment where the event-based controller detected an abnormal situation due to early arrival. Figure 7: **(a)**. Drone movement 2D log on abnormal case: too late. The vertical red line marks the moment when the drone detected an emergency and proceeded with an emergency landing. Due to a collision, the drone far exceeded the expected path, which could possibly have led to secondary collisions. **(b)**. Time-window check results. The drone did not make it in the normal arrival time-windows on the path from b to c. The yellow line after the drone left b indicates the moment of the collision. The red line indicates the moment where the event-based controller detected an abnormal situation due to maximum time-window being exceeded. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Path** & **Tstart** & **Tmin** & **Tmax** & **Tarrival** \\ \hline
**A to b** & 0.00 s & **4.50 s** & **5.50 s** & 5.22 s \\
**b to c** & **5.22 s** & **9.72 s** & **10.72 s** & **x** \\ c to d & & & & \\ d to e & & & & \\ e to F & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The actual numerical time data including Tstart, Tmin, Tmax, and the actual arrival time Tarrival for the air collision case. The first interval from A to b was inside the time-window. However, due to the collision after waypoint b, the drone struggled to return to its mission path and exceeded the time-window. This type of emergency is extremely dangerous, yet hard to handle. In-air collision is a very dangerous situation for the drone.