Autonomous fixed-wing interception using reinforcement learning
Medium altitude, long endurance unmanned aerial systems such as Shahed-type strike drones are an unanswered threat in modern conflicts. Conventional air defense systems are too expensive to provide a feasible large-scale solution.
From the abstract. Our summary is in progress.
Full paper
Autonomous fixed-wing interception using reinforcement learning
Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2610.37470 (PDF).
Abstract
Medium altitude, long endurance unmanned aerial systems such as Shahed-type strike drones are an unanswered threat in modern conflicts. Conventional air defense systems are too expensive to provide a feasible large-scale solution. Quadcopter interceptors are a cheap, battle-proven alternative, but their extremely limited flight time restricts them to low altitude targets at short range, whereas fixed-wing platforms have the endurance to reach higher altitude targets from longer distances. However, such interceptors are still operated manually. Recent developments in learning-based controllers show potential for automation. In this work, a fixed-wing interceptor is presented that is controlled by a neural network that maps filtered monocular vision observations directly to actuator commands. The policy was trained in a custom Python environment using reinforcement learning and proximal policy optimization. The policy was then deployed on a fixed-wing platform and tested in real interception scenarios. As a baseline, two classical guidance controllers were also developed and tested in simulation. The policy is able to intercept targets both in simulation and in real flight. In simulation, the policy outperforms the classical controllers under most conditions. The interceptor was ultimately successfully validated in real flight by intercepting maneuvering fixed-wing targets. This novel system shows the potential of artificial intelligence for autonomous control of fixed-wing interceptor drones.
Index Terms:
interception, CUAS, reinforcement learning, artificial intelligence, terminal guidance, computer vision, fixed-wing
I Introduction
Medium Altitude Long Endurance (MALE) Unmanned Aerial Systems (UAS) pose a credible threat in modern warfare [1][2]. In both the Ukraine-Russia conflict as well as the recent Iran-Israel/US war, the systems used can be classified into two broad groups. Firstly, intelligence, surveillance and reconnaissance drones, which are generally fixed-wing UAS with varying imaging capabilities. They typically fly at 2-3 km altitude at speeds up to 150 km/h. Secondly, Shahed-type strike drones, which are delta-wing kamikaze drones that typically fly at 1-2 km altitude at speeds reaching above 250 km/h. They carry a large explosive payload and have high endurance, allowing for long-range (up to 2000 km) targeted ground strikes.
To answer these threats, low cost interceptor drones are emerging as an alternative to expensive conventional air defenses such as fighter jets and missiles. Interceptors carry an explosive payload which is detonated when close enough to neutralize the target. Hence, such systems are single-use, meaning a minimal onboard sensor suite is preferred for affordability. A ground-based radar system can typically provide a mid-course guidance target lock with a few hundred meters error. However, terminal guidance requires meter-level accuracy and hence is currently mainly vision-based, as monocular cameras are inexpensive and easy to source. Traditional guidance laws such as Proportional Navigation (PN) and Pure Pursuit (PP) [3][4][5] need a constant Line Of Sight (LOS) and struggle against maneuvering targets. Consequently, current interceptors are mostly manually controlled during terminal guidance.
Vision-based relative state estimation can be done in many ways for a variety of applications, including drone racing [6], target tracking [7], aerial refueling [8] and also interception [9][10][11]. For interception purposes, the bounding-box [12][13][11] is an effective and easy to implement proxy to a relative state. Turning visual observation into effective guidance for interception has been done using classical control approaches such as PP [9] and PN [14].
Recently, Reinforcement Learning (RL) has been successfully applied to UAS control tasks such as stabilization [15], attitude control [16], acrobatics [17], drone racing [18][6] and also interception [7][19][20], with controller authority varying from high level planning to direct actuator command. While promising, for interception the real challenge lies in transferring these results from simulation to a real, uncontrolled environment. Recent work suggests that end-to-end learning-based controllers can achieve high sim-to-real transfer robustness by implementing domain randomization [21].
In MALE interception scenarios, fixed-wing drones can be superior to quadrotors due to their better endurance, allowing them to intercept targets from longer ranges and at higher altitudes. Studies on RL controllers for fixed-wing platforms are sparse. However, obstacle avoidance [22], path following [23] evasion [24] and interception with perfect state knowledge [20] have been carried out in simulation. In real environments, studies have demonstrated successful attitude holding [25] and landing [26].
Fixed-wing, vision-based interception using a learning-based controller in a real environment is lacking in the literature. Most interception studies are done in simulation and using a quadrotor model, whilst realistic perception and sim-to-real transfer are usually not addressed.
In this work, a learning-and monocular vision-based fixed-wing interceptor is presented and demonstrated to successfully intercept MALE targets in a real environment. Shown in figure 1, the interceptor is built entirely with off-the-shelf components. An RL controller is trained in simulation which replaces the guidance and control of a conventional autopilot. A neural network directly maps filtered visual and flight controller information to actuator commands. The performance of the RL controller is validated against baseline PN and PP controllers in simulation. Finally, the RL controller is tested on real flight interceptions of fixed-wing, MALE UAS.
The main contributions of this work are therefore:
- Development of an end-to-end neural network enabling autonomous fixed-wing interception of maneuvering targets with limited onboard sensing.
- Development of a monocular vision- and learning-based, autonomous, fixed-wing interceptor able to intercept MALE targets in a real environment.
- Development of a RL framework inspired by [19], incorporating fixed-wing dynamics and a real computer-vision algorithm.
The final controller is tested in real flight interceptions and assessed in terms of performance and constraints.
II Preliminaries
II-A Problem formulation
The interceptor and the target are flying in a North-East-Down (NED) 3-dimensional space. It is assumed that to neutralize the target, an explosive device must be detonated within a maximum radius r_{n} around the target’s position \mathbf{p}_{T}. Hence to intercept the target, the interceptor’s position \mathbf{p}_{I} must satisfy:
(\mathbf{p}_{I}-\mathbf{p}_{T})^{\top}(\mathbf{p}_{I}-\mathbf{p}_{T})\leq r_{n}^{2}.Monocular vision suffers from Field Of View (FOV) limitations, occlusions and pixel noise. This sensor requires the problem to be framed as a partially observable Markov Decision Process (POMDP) [19][27], incorporating uncertainty as a quantitative observation.
II-B Dynamics model
To train the RL policy in simulation, a six degree of freedom, rigid-body dynamics model for a fixed-wing aircraft was built. The model is based on literature [28][29] and is described in appendix A.
III Methodology
III-A System identification
An X-UAV Talon1 body was used for both the interceptor and the target. The interceptor was fitted with a Pixhawk 6C running Ardupilot. The inertial properties of the aircraft were estimated by modeling the fuselage as a cuboid and the wing as a flat plate with uniform density. Cross-coupling terms I_{xy} and I_{yz} were assumed to be zero due to the symmetry of the aircraft. I_{xz} was assumed to be negligible, even though the asymmetry in the horizontal axis would cause this to be non-zero.
A magnetic angle encoder with a wind-vane was mounted on the side of the fuselage to measure angle of attack (AOA). Three system identification flights were flown to estimate the aerodynamic coefficients of the aircraft using ordinary least squares regression [30]. The regression method is described in appendix B.
III-B Perception
A front-facing IMX462LQR monocular camera was installed in the nose of the interceptor. The videostream was input to a proprietary target detection algorithm running on an onboard Raspberry Pi 5 fitted with a Hailo neural network accelerator.
III-B1 Bounding box
The algorithm outputs a Bounding Box (BB): a rectangular box encapsulating the target drone. The BB outputs the following measurement vector at time step k:
\mathbf{z}_{k}^{\top}=\begin{bmatrix}x_{c}&y_{c}&w&h&c\end{bmatrix}.Here, x_{c},y_{c} are the BB center coordinates and w,h are its width and height, all in pixels. c is a confidence score \in[0,1] and represents how confident the algorithm is that the bounding box actually encapsulates a drone.
III-B2 Pinhole model
A simulation was created that maps a 3D point in the camera frame to the 2D image plane using the pinhole model adopted from [31]. If the dimensions of the object of interest are known, the distance along the optical axis of the camera can be formulated as:
Z=\frac{f_{x}W}{w_{px}},where W is the width of the object in meters. w_{px} is the width of the object in the image in pixels. Equation 3 assumes that W is constant when viewed from all angles, which holds only for spherical objects. For a fixed-wing target, the perceived W will depend on the orientation from which it is viewed. To accommodate for this, the simulation computes the effective width as W_{\mathrm{eff}}=W\cdot\max\bigl(\lvert\cos\psi\rvert,\;0.6\bigr), where \psi is the angle between the target’s velocity vector and the LOS. f_{x} is the focal length of the camera:
f_{x}=f_{y}=\frac{W_{\mathrm{img}}}{2\tan(\mathrm{HFOV}/2)}=\frac{1280\hskip 2.84526pt\mathrm{px}}{2\tan(60^{\circ}/2)}\approx 1108\ \mathrm{px}Once Z is known, X and Y, the horizontal and vertical distance from the center of the object to the optical axis, can be formulated as follows:
X=\frac{(u_{c}-c_{x})}{f_{x}}Z,\\
\hskip 8.53581ptY=\frac{(v_{c}-c_{y})}{f_{y}}Z.Here, u_{c},v_{c} are the pixel center coordinates of the object. c_{x},c_{y} are the image center coordinates in pixels. To simulate u_{c},v_{c}, the LOS vector \mathbf{r}\in\mathbb{R}^{3} must be decomposed into X,Y,Z relative to the optical axis of the camera.
III-B3 Camera noise and detection probability
A monocular camera is inherently noisy and computer vision algorithms are prone to non-detections even with a drone in the FOV. To reflect this in simulation, several error sources were introduced.
First, zero mean pixel noise was added to the BB center and its dimensions.
\sigma_{c}=3.0+0.05\,d\ \mathrm{px},\qquad\sigma_{s}=2.0+0.02\,d\ \mathrm{px},with d the range in meters, standard deviation \sigma_{c} applied to x_{c} and y_{c}, and standard deviation \sigma_{s} to w and h.
Second, computer vision algorithms are prone to anchor the BB consistently wrong for a stretch of frames. For instance, the BB can briefly only encapsulate the fuselage of the target, missing the dimensions of the wing. Hence, a BB bias \mathbf{b}_{k} was introduced:
\mathbf{b}_{k}=\rho\,\mathbf{b}_{k-1}+\sqrt{1-\rho^{2}}\;\sigma_{b}\,\bm{\epsilon}_{k},\qquad\bm{\epsilon}_{k}\sim\mathcal{N}(\mathbf{0},\mathbf{I}_{4}),with \mathbf{b}_{k}=[\,b_{x},\ b_{y},\ b_{w},\ b_{h}\,]^{\top} and \rho=e^{-\Delta t_{\mathrm{ctrl}}/\tau_{b}}, where \tau_{b}=1\,s is the time over which the bias persists and \sigma_{b} its standard deviation. \bm{\epsilon}_{k} is a vector of four independent zero mean normal samples with standard deviation of one, redrawn at each control step. The bias enters the measurement as:
\displaystyle\tilde{x}_{c} \\ \displaystyle=x_{c}+b_{x}\,w, \\ \displaystyle\qquad\tilde{y}_{c} \\ \displaystyle=y_{c}+b_{y}\,h, \\ \displaystyle\tilde{w} \\ \displaystyle=(1+b_{w})\,w, \\ \displaystyle\qquad\tilde{h} \\ \displaystyle=(1+b_{h})\,h,so the center is displaced by a fraction of the apparent box size and the dimensions of the box are scaled.
Third, the per-frame detection is probabilistic and degrades with range:
P_{\mathrm{detect}}=p_{\min}+(1-p_{\min})\,e^{-d/d_{s}},with d_{s}=150 m and p_{\min}=0.05. Detections can only occur if the target is within the FOV.
Non-detections tend to be clustered. Hence, the detector is simulated as a two-state Markov chain, moving between detecting and blind with per step transition probabilities:
P(\mathrm{blind}_{k+1}\mid\mathrm{detect}_{k})=q,\hskip 2.84526ptP(\mathrm{detect}_{k+1}\mid\mathrm{blind}_{k})=r,r=\frac{\Delta t_{\mathrm{ctrl}}}{T_{\mathrm{blind}}},\qquad q=r\,\frac{1-P_{\mathrm{detect}}}{P_{\mathrm{detect}}}.While blind, the detector recovers with probability r at each control step of duration \Delta t_{\mathrm{ctrl}}, giving outages with a mean duration T_{\mathrm{blind}}. Outages therefore keep the same mean duration at all ranges while becoming more frequent as P_{\mathrm{detect}} falls.
Finally, a computer vision algorithm does not instantly produce detections, but instead lags the camera image. This detection latency was also simulated such that the current detection lags the current camera frame. The delayed detection is interpreted with the current attitude of the interceptor, so any rotation appears as a bearing error.
BB bias, detection dropout and latency were varied through a curriculum as described in section III-G, with specific values described in appendix IV.
III-C Kalman filtering
The bounding box is noisy and does not provide a continuous estimate of the relative target state. Hence, a Constant Acceleration Kalman Filter (CAKF) was applied to provide robust relative target state estimation. The same filter, with identical parameters, is used in simulation, training, and real flight. The filter is described in appendix C.
III-D RL formulation
In this study, the RL controller is a single neural network that maps the observation vector to an actuation vector u_{k}\in\mathbb{R}^{4} that outputs normalized throttle u_{t}\in[0,1] and flight control surface u_{a},u_{e},u_{r}\in[-1,1] commands. The controller maps a monocular vision-based, filtered relative target state estimate, the filter’s confidence in that estimate, and the interceptor’s own state directly to actuator-level outputs. Hence, the low-level FC autopilot is bypassed completely.
III-D1 Observable state
The per-frame observation vector \mathbf{O}\in\mathbb{R}^{38} is built from the KF state estimate and the interceptor’s own state:
\mathbf{O}^{\top}=\begin{bmatrix}\hat{\mathbf{\bm{r}}}_{b}&\!d&\!f&\!\mathbf{r}_{b}&\!\dot{\mathbf{r}}_{b}&\!\mathbf{v}_{b}&\!\mathbf{q}&\!\bm{\omega}_{b}&\!\bm{\delta}\\
t_{\text{lost}}&\!\log(\bm{\sigma}_{p}^{2})&\!\log(\bm{\sigma}_{v}^{2})&\!\bm{\delta}_{k-1}&\!V_{c}&\!V\end{bmatrix}where:
\hat{\mathbf{r}}_{b}\in\mathbb{R}^{3},d\in\mathbb{R}are the unit line-of-sight vector and range estimates in the body frame,f\in\mathbb{R}is a detection flag (1if detected this step, else0),\mathbf{r}_{b},\dot{\mathbf{r}}_{b}\in\mathbb{R}^{3}are the relative target position and velocity estimates in the body frame,\mathbf{v}_{b}\in\mathbb{R}^{3}is the interceptor’s velocity in the body frame,\mathbf{q}\in\mathbb{R}^{4}is the interceptor’s attitude quaternion,\bm{\omega}_{b}\in\mathbb{R}^{3}are the body angular rates,\bm{\delta}\in\mathbb{R}^{4}are the physical control-surface positions[\delta_{e},\delta_{a},\delta_{r},\delta_{t}]after passing through a first-order lag model as described in appendix D,t_{\text{lost}}\in\mathbb{R}is the time since the last successful detection,\log\bm{\sigma}_{p}^{2},\log\bm{\sigma}_{v}^{2}\in\mathbb{R}^{3}are the log position and velocity variances from the KF covariance,\bm{\delta}_{k-1}\in\mathbb{R}^{4}is the previous commanded action in physical units before actuator lag,V_{c}\in\mathbb{R}is the closing speed (positive=closing),V\in\mathbb{R}is the interceptor’s airspeed [m/s].
To provide temporal information, n_{\text{stack}}=3 frames spaced 0.5\,s apart (a 1\,s window) are flattened into the network input \mathbf{O}\times n_{\text{stack}}\in\mathbb{R}^{114}. While this introduces aliasing for content with frequency higher than the 1 Hz Nyquist limit, this is acceptable as the newest frame is sampled at the control rate (50 Hz) and all rate quantities are observed directly instead of being inferred by differencing frames.
Although \hat{\mathbf{r}}_{b} and d are technically redundant with \mathbf{r}_{b}, they are deliberately both included in the observation vector. From \hat{\mathbf{r}}_{b} and d, \mathbf{r}_{b} can be constructed. However, this is an operation that the neural network would need to learn. \hat{\mathbf{r}}_{b} is range invariant, making it easy for the policy to interpret. \mathbf{r}_{b} preserves the true geometry, which is relevant when combining other observable states such as relative target velocity. d is also included separately to inform about closing dynamics without relying on bearing.
The observation uses the KF estimate rather than the raw bounding box. Training directly on \mathbf{z}_{k} and its finite difference approximation of velocity was attempted, but the policy did not converge to successful interception behavior.
III-D2 Reward function
The reward function r_{k} is designed to drive the policy towards three behavioral goals: interception, perception and stable flight, and can be formulated as:
\displaystyle r_{k}=f_{\text{norm}}\bigg( \\ \displaystyle c_{d}\,r_{\text{dist}}+\mathbf{1}_{\text{int}}\,c_{\text{int}}\,(t_{\max}-t_{k}) \\ \displaystyle\text{(interception)} \\ \displaystyle}{\displaystyle+c_{c}\,r_{\text{cam}}-c_{\Phi}\,p_{\Phi} \\ \displaystyle\text{(perception)} \\ \displaystyle}{\displaystyle-c_{\Omega}\,p_{\Omega}-c_{u}\,p_{u}-c_{\alpha}\,p_{\alpha}\;\bigg) \\ \displaystyle\text{(stable flight)}where \mathbf{1}_{\text{int}} activates on the intercept step and f_{\text{norm}}=R_{\max}/t_{\max} normalizes the return across episode lengths and control rates. Here, R_{\max}=1000 is the maximum achievable return for a single episode and t_{\max} is the time limit upon which timeout triggers. The shaping terms are:
r_{\text{dist}}=\tanh\!\left(\frac{d_{k-1}-d_{k}}{v_{cl,\text{safe}}\,\Delta t_{\text{ctrl}}}\right),\qquad d_{k}=\lVert\mathbf{p}_{T}-\mathbf{p}_{I}\rVert,p_{\Omega}=\sum_{i=1}^{3}\Big(\min\big(\tfrac{|\Omega_{i}|}{\Omega_{r_{\max}}},1\big)\Big)^{2},\qquad p_{u}=\tfrac{1}{16}\sum_{i=1}^{4}(\Delta u_{i})^{2},r_{\text{cam}}=c\,\max\!\Big(0,\;1-4\big[(c_{x}-\tfrac{1}{2})^{2}+(c_{y}-\tfrac{1}{2})^{2}\big]\Big),p_{\Phi}=\frac{\min(\tau_{\text{lost}},\,\tau_{\max})}{\tau_{\max}},p_{\alpha}=\frac{e^{K\,\bar{\alpha}}-1}{e^{K}-1},\bar{\alpha}=\min\!\Big(\max\big(\tfrac{|\alpha|-\alpha_{\text{warn}}}{\alpha_{\max}-\alpha_{\text{warn}}},0\big),1\Big),\quad K=-3.The distance-progress term r_{\text{dist}} rewards a timestep reduction in true relative distance d_{k}=\lVert\mathbf{p}_{T}-\mathbf{p}_{I}\rVert, normalized by the distance the interceptor would cover in one control step at a nominal safe closing speed v_{cl,\text{safe}}. The \tanh saturates this signal, so closing faster than v_{cl,\text{safe}} yields no additional reward, which discourages aggressive high-speed dives and instead promotes steady, controlled closure. The interception bonus c_{\text{int}}(t_{\max}-t_{k}) is granted only on the step the target is intercepted (\mathbf{1}_{\text{int}}=1). Its magnitude decreases with the interception timestep t_{k}, rewarding earlier interceptions, while the (t_{\max}-t_{k}) form removes any incentive to loiter near the target and accumulate shaping reward.
The perception terms reward behavior that keeps the target inside camera view. The centering reward r_{\text{cam}} is maximal when the target is imaged at the frame centre (c_{x}=c_{y}=\tfrac{1}{2}) and decays parabolically to zero at the frame edge. It is gated by the detection confidence c, vanishing when no detection is available. It provides a gradient toward keeping the target in view and hence stimulates pure pursuit-like tailchase interception behavior. The FOV penalty p_{\Phi} is its reactive counterpart: \tau_{\text{lost}} counts the control steps since the last successful detection, and the penalty grows linearly to unity at the loss horizon \tau_{\max}, beyond which the episode is terminated. Together they encourage the agent to keep the target framed before it is lost, and to reacquire it quickly if it is.
The stable flight terms aim to shape the policy towards behavior that is realistic and non-damaging for the airframe and also not stall the aircraft. The body-rate penalty p_{\Omega} discourages aggressive angular rates \Omega_{i} (roll, pitch, yaw), each normalized by \Omega_{r_{\max}} and squared. The smoothness penalty p_{u} penalizes large timestep changes in the four actuator commands \Delta u_{i}, pushing for smooth control. The exponential AOA penalty p_{\alpha} enforces high AOA avoidance, remaining zero below a warning angle \alpha_{\text{warn}} and rising sharply to unity at the AOA limit \alpha_{\max}.
The coefficients are calibrated relative to the unit maximum of the progress reward. Penalties weighted above one: p_{\Phi}, p_{\alpha}, and p_{\Omega} near saturation, can render sustained target loss, incipient stall, or hard manoeuvring net-negative even while the interceptor is closing, whereas c_{c}<1 ensures the centering reward nudges rather than overrides the pursuit geometry. Appendix III describes the exact weights used in training of the policy used in the real flight tests.
III-E RL algorithm
Proximal Policy Optimization (PPO) [32] was used for training in combination with the Stable-Baselines3 Python library [33]. The algorithm parameters were all kept default, with the exception of clip range \epsilon and discount factor \gamma. \epsilon was reduced from 0.2 to 0.05, meaning the policy updates are limited to 5 percent increments per step to increase training stability. \gamma was increased from 0.99 to 0.999 to encourage longer-term path planning in the policy.
III-F Training environment
In [19], a custom environment was developed to run a parallel simulation of more than a thousand quadcopters. In this work, the environment is adapted for fixed-wing aircraft. JAX [34] and Numba [35] are used for efficient compiling, reducing training time and allowing the training to run on a CPU. Training occurs in episodes with a single target T and interceptor I. I is initialized with conditions close to trim. T is modeled as a moving or accelerating point mass. Episodes are terminated when:
Tis intercepted :(\mathbf{p}_{I}-\mathbf{p}_{T})^{\top}(\mathbf{p}_{I}-\mathbf{p}_{T})\leq r_{n}^{2}Tis missed :r_{n}<d<r_{m}\hskip 5.69054pt\&\hskip 5.69054pt\dot{d}>0Tis lost :\tau_{\text{lost}}>\tau_{\max}Istalls:\alpha>60^{\circ}Ihits the ground:h<10mIgoes above altitude ceiling:h>1000mIgoes out of boundsp_{I_{x}},p_{I_{y}}>1000m- timeout occurs:
t_{k}>t_{\max}
with r_{n}=3\,m and miss radius r_{m} = 5 m. \tau_{\text{lost}} is the number of control steps since the last successful detection and \tau_{\max}=200 steps (4 s at 50 Hz). t_{\max} varies across the curriculum (see appendix IV) to accommodate for longer range approaches and faster targets.
Contrary to quadrotors, fixed-wing drones can stall at low airspeeds or high AOA. This proved to be one of the main challenges encountered in this work. Instead of exploring post-stall modelling, the approach taken here involved encouraging the agent to avoid stall regimes in the first place. While stall regimes were not clearly defined during the system identification, 25 degree AOA was deemed to be a conservative limit to avoid, regardless of airspeed, as this was near the maximum AOA observed during the system identification flights. At first, episodes were simply cut off when this threshold was crossed, however this resulted in many episodes being lost due to stalls without the agent learning how to avoid them. It is also not possible to penalize AOA, as non-zero AOA is needed to generate lift. Finally, a stall penalty was included that only penalized time steps above a certain AOA threshold.
To create a RL controller that works in a real environment, the simulation should reflect uncertainties, noise, constraints and variance in the underlying observations and model. Domain Randomization (DR) has been successfully used to train a single neural network that is capable of controlling physically distinct quadcopters [21]. In this work, DR is increased from zero to 30 percent around nominal values as the training progresses.
III-G Curriculum learning
The full interception task involves pursuing a far-away maneuvering target from noisy monocular vision estimates under wind, turbulence and domain randomization of the aircraft parameters. This is too difficult to learn from random initialization all at once. Hence, the training is structured into a 10-stage curriculum. In the initial stage, the interception task is relatively easy. The target is close-by, slow moving and not accelerating. The main goal of this stage is to learn how to fly the aircraft and produce motion towards the target. Progression to a successive stage occurs when the interception rate reaches 75 percent. The policy is evaluated every 1000 episodes, to see whether it can advance to the next stage in the curriculum. The final stage uses an interception target of 101 percent, which is impossible, making it train until the timestep budget runs or the training crashes. When progressing between stages, the best policy is transferred (not the latest) and acts a starting point for the training to continue. Appendix IV describes the individual stages in the curriculum used for training the policy that was ultimately tested in real flight.
III-H Real interception test flights
Flight tests were conducted at Vliegbasis Valkenburg in the Netherlands. It was quickly discovered that testing the entire system together proved to be difficult initially. Target perception was especially challenging. The interceptor needs to be aligned with the target before the RL policy can take control of the actuators. Furthermore, the detection algorithm was not as robust as anticipated, and particularly struggled with tail-based engagements when the background is not clear and the target has a very thin profile.
III-H1 Virtual stationary target
To separate perception from control, a script was developed that projects a virtual 1.7 meter wide target on the camera image using the pinhole model. This script takes predefined Global Navigation Satellite System (GNSS) coordinates and the interceptor’s attitude and position and computes a bounding box onto the camera image. This artificial bounding box then feeds into the CAKF. This way, the pipeline is identical to the deployment scenario, except there are no detection dropouts and the aligning the interceptor with the target becomes much easier.
III-H2 Virtual moving target
Once stationary virtual targets were successfully intercepted, the script was expanded to also allow a moving virtual target to be projected onto the camera. Instead of a single GNSS coordinate, a series of predefined coordinates plus altitudes and a fixed ground speed simulate a moving target, with the bounding box generation logic identical to the stationary virtual target. The moving target travels between the given coordinates in a looping fashion, progressing to the first coordinate after the last coordinate has been reached, and does so indefinitely, allowing for systematic testing.
III-H3 Real fixed-wing target
A second X-UAV Talon was developed to function as a moving target. To provide a meaningful interception scenario, the target was autonomously flying a 90 meter altitude rectangular waypoint trajectory using AUTO mode. The pilot was instructed to provide evasive stick inputs whilst in AUTO mode, which allows the target to maneuvre away from the flight mission until the pilot lets go of the sticks. This makes it both harder to track and to intercept the target. Airspeed was managed autonomously with throttle by Ardupilot; the pilot could alter demanded airspeed with stick inputs.
III-I Baseline classical controller
To compare the RL with a baseline, vision-based Proportional Navigation (PN) and Pure Pursuit (PP) classical guidance controllers were developed. All three controllers (RL, PN and PP) used the same perception pipeline as described in sections III-B and III-C, meaning differences in performance would be attributable to differences in control.
III-I1 Guidance laws
PN commands an acceleration perpendicular to the LOS and proportional to its rotation rate:
\mathbf{a}_{\mathrm{PN}}=N\,V\,\bigl(\bm{\Omega}\times\hat{\mathbf{r}}_{b}\bigr),\qquad\bm{\Omega}=\mathbf{R}_{b/i}\bigl(\hat{\mathbf{r}}_{i}\times\dot{\hat{\mathbf{r}}}_{i}\bigr)\hat{\mathbf{r}}_{i}=\mathbf{R}_{i/b}\,\hat{\mathbf{r}}_{b},\qquad\hat{\mathbf{r}}_{b}=\frac{\mathbf{r}_{b}}{\lVert\mathbf{r}_{b}\rVert},where N is the dimensionless gain and \bm{\Omega} is the inertial LOS rotation rate. \dot{\hat{\mathbf{r}}}_{i} is the finite difference of \hat{\mathbf{r}}_{i} over one control step, passed through a first order low-pass filter with a time constant \tau_{\lambda}=0.5\,s. \bm{\Omega} is computed in the inertial frame and then converted to the body frame using rotation matrix \mathbf{R}_{b/i} such that the interceptor’s own rotation does not influence it. The LOS rate can also be derived analytically in its standard vector form [4][5] as \bm{\Omega}=\frac{\mathbf{r}_{b}\times\dot{\mathbf{r}}_{b}}{\lVert\mathbf{r}_{b}\rVert^{2}} scaled by V_{c}=-\,\hat{\mathbf{r}}_{b}\cdot\dot{\mathbf{r}}_{b} instead of V, however this depends on the estimated relative velocity \dot{\mathbf{r}}_{b} to set the direction and magnitude of the command. With the current approach, the commands generated depend only on the measured bearing and the interceptor’s own speed, and are not affected by the noisy estimate of relative velocity.
PP instead drives the angle \varepsilon between the camera boresight \hat{\mathbf{b}}=[1,0,0]^{\top} and the line of sight to zero:
\mathbf{a}_{\mathrm{PP}}=K\,V\,\varepsilon\,\frac{\mathbf{e}_{\perp}}{\lVert\mathbf{e}_{\perp}\rVert},\hskip 2.84526pt\varepsilon=\arccos\bigl(\hat{\mathbf{r}}_{b}\cdot\hat{\mathbf{b}}\bigr),\hskip 2.84526pt\mathbf{e}_{\perp}=\hat{\mathbf{r}}_{b}-(\hat{\mathbf{r}}_{b}\cdot\hat{\mathbf{b}})\hat{\mathbf{b}}.so that K [\mathrm{s^{-1}}] sets the demanded turn rate per unit of pointing error. LOS should be minimized with respect to the boresight instead of the velocity vector because a fixed camera should be aligned with the target to see.
III-I2 Cascaded autopilot
Both classical guidance laws produce an acceleration command, which must be realized by an aircraft whose only maneuvering force is lift generated from the wings. To achieve the normal acceleration, the aircraft must hence roll the lift vector onto the demanded acceleration vector. A cascaded autopilot performs this mapping. The acceleration command is first translated into the specific force the accelerometer must register,
\mathbf{f}_{\mathrm{cmd}}=\mathbf{a}_{\mathrm{cmd}}-\mathbf{g}_{b},with \mathbf{g}_{b} gravity expressed in body axes. Its magnitude in the plane normal to the optical axis sets how much lift is required, and its direction sets where that lift must point:
f_{n,\mathrm{cmd}}=\bigl\lVert(f_{y},f_{z})\bigr\rVert,\hskip 2.84526pt\phi_{\mathrm{err}}=\operatorname{atan2}\bigl(f_{y},\,-f_{z}\bigr),with f_{y} and f_{z} the y and z components of \mathbf{f}_{\mathrm{cmd}} in the body frame. The roll channel drives \phi_{\mathrm{err}} to zero, aligning the lift vector with the demand, while the pitch channel regulates the achieved normal specific force onto f_{n,\mathrm{cmd}} through a feedback loop. Both outer loops feed inner body-rate loops with proportional, integral and feedforward terms. A sideslip loop drives \beta to zero through the rudder.
Because \phi_{\mathrm{err}} is an error rather than an absolute bank angle, and because gravity is accounted for once in \mathbf{f}_{\mathrm{cmd}} rather than through separate corrections in each channel, the mapping remains valid at any attitude. The pitch loop compares the demanded normal specific force f_{n,\mathrm{cmd}} with the actual specific force, and zeroes the difference with a pitch rate command. In simulation, measured specific force is not available and hence it is reconstructed from the velocity in the body frame:
\tilde{\mathbf{f}}=\frac{\mathbf{v}_{b}[k]-\mathbf{v}_{b}[k-1]}{\Delta t}+\bm{\omega}\times\bar{\mathbf{v}}_{b}-\mathbf{g}_{b}.Because the leading term is a numerical derivative, it amplifies noise on \mathbf{v}_{b} by 1/\Delta t. Therefore, the estimate is low pass filtered by a first order filter with a time constant \tau_{f}=0.08\,s. A block diagram of the constructed autopilot is shown in figure 2.
\beta=\arcsin\!\left(v/{\lVert\mathbf{v}_{b}\rVert}\right), with v the lateral velocity in the body frame. In real flight, Ardupilot’s EKF estimate for sideslip can be used. Note that unlike the baseline controllers, the RL policy does not observe \beta.A total of sixteen gains were tuned manually, with the inner loops being closed first before the outer loops were tuned. The gains are summarized in appendix E.
After the cascaded autopilot was tuned, the guidance law gains were then selected by sweeping each against interception rate, giving N=2 and K=1\,\mathrm{s}^{-1}.
IV Results
IV-A System identification
The interceptor weighs approximately 2.87 kg. The moments of inertia are estimated to be: I_{xx}=0.14 kg\cdotm2, I_{yy}=0.20 kg\cdotm2 and I_{zz}=0.34 kg\cdotm2. All cross-coupling terms are assumed to be zero. The surface area of the wing is 0.46 m2, the wingspan is 1.718 m and the mean aerodynamic chord is 0.265 m. The dihedral angle of the V-tail was measured to be approximately 35 degrees. A 12.5 inch diameter, 6.5 inch pitch propeller was used in combination with an X2820 KV570 electric motor. For the thrust model, data from a test report2 was used. The estimated maximum thrust at zero airspeed is 38.23 N. The maximum velocity was estimated to be around 40 m/s based on airspeeds achieved in flight.
- Pitching moment
- \mathbf{R}^{2}
- 0.4794
- 0.6809
- 0.6889
- C_{m0}
- -0.0035
- -0.0113
- -0.0127
- C_{m_{\alpha}}
- -0.0508
- -0.1885
- -0.1724
- C_{m_{q}}
- -1.9179
- -3.0066
- -2.4160
- C_{m_{\delta_{e}}}
- 0.1536
- 0.3647
- 0.2907
- Lift
- \mathbf{R}^{2}
- 0.5943
- 0.7853
- 0.7967
- C_{L0}
- 0.2140
- 0.3793
- 0.2963
- C_{L_{\alpha}}
- 1.3442
- 3.1066
- 2.8529
- C_{L_{\delta_{e}}}
- 1.6628
- 0.4925
- 0.4181
- Drag
- \mathbf{R}^{2}
- 0.4316
- 0.5727
- 0.4473
- C_{D0}
- 0.0797
- 0.1552
- 0.1232
- k_{\mathrm{induced}}
- 0.3142
- 0.1835
- 0.1303
- Rolling moment
- \mathbf{R}^{2}
- 0.2281
- 0.2754
- 0.2486
- C_{l0}
- -0.0005
- -0.0010
- -0.0007
- C_{l_{\beta}}
- -0.0074
- -0.0176
- -0.0180
- C_{l_{p}}
- -0.0781
- -0.0996
- -0.0910
- C_{l_{r}}
- 0.0156
- 0.1029
- 0.0727
- C_{l_{\delta_{a}}}
- 0.0188
- 0.0367
- 0.0317
- Yawing moment
- \mathbf{R}^{2}
- 0.3204
- 0.3565
- 0.4278
- C_{n_{\beta}}
- 0.0132
- 0.0215
- 0.0206
- C_{n_{p}}
- -0.0198
- -0.0797
- -0.0524
- C_{n_{r}}
- -0.0062
- -0.0509
- -0.0342
- C_{n_{\delta_{a}}}
- 0.0010
- 0.0108
- 0.0059
- C_{n_{\delta_{r}}}
- 0.0242
- 0.0316
- 0.0263
- Side force
- \mathbf{R}^{2}
- 0.1243
- 0.0313
- 0.1075
- C_{Y_{\beta}}
- -0.0954
- -0.0577
- -0.1361
- C_{Y_{\delta_{r}}}
- -0.1689
- 0.1276
- -0.2167
In table I, the estimated aerodynamic coefficients of the aircraft are given for the three system identification flights that were performed. Flight 1 utilized Ardupilot’s extended Kalman filter’s estimate of the AOA, whereas during flight 2 and 3, a wind vane on an angle encoder was used to measure the real AOA. Additionally, flights 2 and 3 were flown in MANUAL mode, meaning there is no stabilization and each axis was excited separately. Flight 1 was mostly flown in STABILIZED mode, which means yaw and roll are excited simultaneously on lateral stick inputs.
Figure 3 shows the aerodynamic coefficients estimates as a flight-by-flight comparison. Especially flight 2 and 3 agree well. This is likely because of the use of the AOA vane, instead of the Extended Kalman Filter (EKF) estimated AOA onboard the flight controller.
Figure 4 shows the modeled versus measured aerodynamic coefficients over a ten second segment of flight 2. The model was identified from flight 3, so the comparison is out of sample. While there are sizeable residuals, the model follows the trend of the measurements.
OLS regression assumes the residuals are white noise. To check whether this assumption holds, the autocorrelation function (ACF) for the residuals was computed for lag 0 to 300 and is shown in figure 5. For most axes, the residuals are indeed uncorrelated over time. However, C_{L}, and consequently C_{D}, which is dependent on C_{L}, shows significant autocorrelation, especially at lower lag. This means the residuals are potentially not white noise, indicating some deficiency in the aerodynamic model. This was likely due to the thrust model, which neglects advance ratio and other physically correct additions in favor of simplicity. Instead of perfecting the system identification, these results were deemed ”good enough” to start training a controller as domain randomization of the aircraft parameters alleviates the need for really accurate system identification.
For each coefficient, the estimate with the strongest fit and best agreement between flights was adopted. The final values used in training the RL policy are described in appendix V.
IV-B Cascaded autopilot for baseline classical guidance
Figure 6 shows the simulated tracking performance of the autopilot used for the baseline classical controller in the full non-linear model. The two inner rate loops are the fastest elements of the cascade. The roll rate loop (a) reaches 90 percent of demand in 0.10 s with at most 7 percent overshoot. The pitch-rate loop (b) is even faster at 0.06 s but more oscillatory, overshooting by 26 percent before settling within 2 percent in roughly 0.44 s. The sideslip regulator (c) is excited by an instantaneous lateral gust rather than a demand step, and returns sideslip angle to zero from initial values of 5∘ to 20∘. The first undershoot reaches approximately -6^{\circ} for the largest lateral gust, with residual oscillations fully decayed by 2.5 s.
The two outer loops are three to five times slower than the inner loops they command. The roll channel (d) reaches 90 percent of a commanded bank angle in 0.16-0.22 s and settles within 2 percent in approximately 0.75 s, with nearly no overshoot. The normal-acceleration loop (e) is the slowest and least damped element: it rises in 0.16-0.20 s but overshoots by 15-26 percent and takes 1.0-1.5 s to settle.
IV-C RL learning
Throughout the course of this research more than 120 different RL policies were trained with varying degrees of success in simulation. The scope of this research was sim-to-real transfer. Hence, only the policy that successfully intercepted targets in real flight is discussed.
Learning was structured into 10 stages (see appendix IV). The progress of the training in terms of average interception rate and mean reward is shown in figure 7. In the initial stage, the agent quickly progresses from an approximate 30 percent interception rate to nearly 95 percent interception rate. At this stage, the task is simple and maintaining the aircraft’s attitude usually results in an interception. As the training progresses through the curriculum, the agent learns to adapt to new circumstances, which causes it to recover from initial drops in performance. An interception rate above 80 percent is not seen after completing stage 4. In stage 8, the task is so difficult that the agent is not able to progress above the threshold of 75 percent interception rate before the training stops (due to CPU constraints).
IV-D Performance in simulation
IV-D1 Single episode analysis
Before analyzing performance across many episodes, it is insightful to examine a single episode to understand how the policy behaves. In figure 8, the trajectories of the interceptor and target in a single engagement are shown. The target inertial velocity in NED was set to 10 m/s (v_{N}=4 m/s, v_{E}=6 m/s) and it was manoeuvering (a_{N}= 1 m/s2, a_{E}= -1 m/s2). During this episode, there was a steady wind speed of 2 m/s and a 0.5 m/s Gaussian gust at each timestep. The aircraft parameters were randomized ±15 percent around nominal values. Target wingspan was also randomized ±10 percent around 1.7 m. The detection latency was set at 0.06 seconds. The interceptor was able to successfully intercept the target within 6 seconds under these circumstances.
Figure 9 shows the ground truth distance to the target versus the estimated distance produced by the KF, with the red areas indicating periods of no detection. Even during these blind moments, the KF produces a reasonable closing distance estimate that follows the ground truth, leading to a successful interception. Figure 10 showcases that AOA throughout the course of the engagement stays within the ±10 degree penalty thresholds. This shows the policy has learned to fly conservatively, which is as intended. The interceptor’s airspeed varied between a minimum of 21 and a maximum of 33 m/s, which is well above the aircraft’s stall speed at these relatively low AOA values.
Figure 11 shows the state of the actuators throughout the engagement. The policy commands full throttle immediately. This is a behavior that was consistent across every policy trained throughout the course of this research. However, this particular policy will reduce throttle if the target is lost for a prolonged period of time. This behavior started occurring once the reward for quick interceptions was reduced and the reward for keeping the target inside the FOV was increased.
Besides throttle, the flight control surfaces all show slight oscillations. Interestingly, the policy aggressively oscillates rudder deflection, which causes subsequent oscillatory yawing behavior as can be seen in figure 12. Earlier policies that were trained with less strict AOA penalties showed the same behavior but rather in the pitch axis, with the elevator being excited continuously up to its limits.
Figure 13 shows the same engagement but with the trajectories generated by the baseline classical controllers also included. All three interceptors manage to intercept the target during this engagement. Figure 14 shows the Euler angles of the classically guided interceptors throughout the engagement. Figure 15 shows the control surfaces of the classically guided interceptors over the course of this episode.
IV-D2 Multiple episodes analysis
The trained RL policy and the baseline classical controllers were tested in the curriculum that the policy was trained in. In figure 16 the performance of each controller throughout the curriculum is shown. To show the effects of limited sensing through the noisy, 60∘ horizontal FOV monocular camera, the performance is also shown with an idealized 180∘ FOV camera, which always detects the target as long as it is in the FOV. For each controller, each of the nine curriculum stages and each of the two camera types, 896 episodes were simulated, for a total of 48,384 episodes.
All controllers perform nearly perfect at stage 0. At this stage, there is very little perceptual noise, no wind or gusts, and the target is near stationary and not accelerating at a low range from the interceptor. As the curriculum progresses, all controllers lose performance, but not equally. Overall, RL performs best and is only matched in the final stages by ideal PP and even outperformed slightly by ideal PN. Ideal RL is even better and degrades much slower. PP and PN perform near equally until stage 5, after which PN degrades more rapidly than PP. Real PP is less affected by camera noise than PN as its guidance law commands it to keep the target in view, resulting in robustness despite noisy detections.
To draw meaningful conclusions about the behavior and performance of the controllers in general, 14,256 additional episodes were simulated to investigate the effect of a single variable condition. 336 episodes were generated with nominal conditions similar to stage 5 of the curriculum. Each condition comprises 144 episodes: 5 conditions at increasing target ground speed (5 m/s increments) and no acceleration, 5 at increasing target acceleration (1.15 m/s2 increments), 5 at increasing wind strength (2.25 m/s increments), 5 with increasingly long clustered camera dropout bursts (up to 2.8 s), 4 with 50 m initial range increments, and 5 with varying approach geometry from tail-chase to head-on.
Figure 17 shows the interception rate under these conditions. Target speed has little effect over most of its range, but the three controllers differ. RL seems to degrade only at target speeds of 20 m/s, whereas PN degrades slightly at target speeds of 15 m/s, but recovers at speeds of 20 m/s. PP outperforms the other controllers at higher target speeds. On the contrary, target acceleration seems to have a real degrading effect on the performance of the controllers, with higher accelerations leading to lower interception rates for all controllers. However, the classical controllers are more affected than RL in terms of performance. Wind affects each controller differently. PP and RL are mostly unaffected across the whole sweep, but PN drops below 60 percent interception rate at 9 m/s winds. Increasingly, long camera dropout bursts lead to decline in performance of all controllers, but surprisingly this decline plateaus beyond 1.4 s dropouts. Initial range is non-monotone. Close range initialization provides little time to correct the initial geometry leading to relatively low performance. The highest performance is at 50-150 m for all controllers. Finally, approach geometry produces the largest spread in the figure, and its minimum lies at 45∘ rather than head-on for RL and PP. RL falls from 83.3 percent in a tail chase to 47.2 percent at 45∘, recovering to 57.6 percent head-on. PP is worst affected, dropping to 29.2 percent and 34.0 percent at these two geometries, while PN is the least sensitive and even outperforms RL at 45∘. PP performing the worst is expected as it always aims to nullify the LOS with respect to the boresight of the camera and hence will result in tail chases. A head-on initialization will therefore likely result in lots of near misses and also loss of target lock, as the interceptor can be too slow in turning around to reacquire the target after passing it. Interestingly, the performance of PN and RL are nearly equal at head-on and 45∘ engagements, suggesting that RL adapts it pursuit strategy based on the closing velocity.
Figure 18 gives a breakdown of the reasons for termination of episodes per condition and per controller. Across all conditions, RL outperforms the other controllers with the exception of 20 m/s target speed, in which the classical controllers are better. 9 m/s wind barely has an impact on performance in RL and PP. PN however degrades from 81 percent to 73 percent interception rate.
Longer initial range has an impact on performance. With initial ranges between 150 to 200 meters, the performance of RL drops slightly to 82 percent interception rate, with a small portion of episodes surprisingly being terminated due to loss of control. At increasingly higher ranges, the KF range estimate becomes unstable, such that it produces estimates far beyond the training envelope, causing erratic behavior. For the classical controllers, a longer range means more engagements terminate in a target loss, which is expected as the detection probability is lower at longer range.
A quickly accelerating target also reduces interception rates for all controllers, mostly due to target loss. RL is most robust against maneuvering targets and is still able to intercept 78 percent of the time with a majority of the other episodes resulting in a near miss. Surprisingly, a maneuvering target does not cause episodes to be terminated in a loss of control. Unsuccessful terminations are due to near miss and target loss. PN and PP struggle with maneuvering targets with interception rates of 54 and 62 percent respectively. Extended periods of camera dropouts impact the interception rate of all controllers, leading mainly to more target loss. In training, the agent sees mainly tail-based engagements, where the target is moving away from the interceptor’s initial position. However for evaluation, beam (sideways) and head-on approaches were also simulated. These show a significant reduction in performance, with both a large amount of near misses and target losses. PP is the worst affected during head-on approaches.
Finally, the condition where the target has a speed of 20 m/s (excluding acceleration) is examined. Unsurprisingly, some episodes terminate in a timeout, as the interceptor can lack the speed to catch the target before the time runs out, however RL is more affected than PN and PP. The latter even improves as target speed increases. This is likely due to PP resulting in a tail-based engagement. When the target has a higher speed, the relative velocity will be lower, allowing for more precise terminal guidance. This is reflected by the fact that there are also no near misses for this condition.
IV-E RL controller in real flight
Initial in flight testing of the RL controller proved to be difficult. A moving fixed-wing target was hard to keep in the FOV whilst engaging the RL policy. Furthermore, unsuccessful attempts could either be due to a sim-to-real gap in the controller, or the perception could be insufficient.
IV-E1 Stationary virtual target
Flight tests with a virtual target resolved this issue. During the first successful interception tests, the video3 showed the interceptor passing through the target 5 out of 6 times.
Figure 19 shows the trajectories of the interceptor during all 6 real flight engagements of a stationary virtual target. Engagements 2, 4 and 6 show the interceptor passing through the virtual target barring a few meters error. Engagements 1 and 5 were stopped just before the target was being passed through because the pilot switched to STABILIZED mode, meaning the RL controller is interrupted. However as the onboard video recording shows, the interceptor still passed through the target shortly after without pilot stick inputs. Only engagement 3 shows a clear failure with the interceptor seemingly turning away at about 70 meters from the target. This could be due to a bad KF estimate of the target, however this can not be confirmed as the KF estimation was not logged during this flight. Also visible in figure 19 is the fact that the controller does not stop after the target is intercepted. In training and simulation, the engagement stops, but in real flight, the controller experiences a flight through the target and after passing quickly tries to reacquire it in its FOV with an aggressive maneuver (visible in engagements 2, 4 and 6).
Figure 20 shows the actuator commands by the RL controller during each engagement. As observed in simulation, the policy heavily oscillates the rudder. This is also observed on the onboard video which shows the plane yawing back and forth significantly. Throttle is mostly full, except in engagement 2 and 3. In engagement 2, the throttle drops immediately after the policy takes control, only to recover quickly to full throttle after 0.7 s. In engagement 3, the throttle is reduced for a longer period of time. This points to a loss of target track, as the same behavior is observed in simulation when a target is lost for a prolonged period.
With the RL policy being able to intercept a virtual target, the sim-to-real transfer has been successful controller-wise. The policy produces flight behavior that mimics simulation. It successfully avoids high body rates and erratic control inputs. One of the key insights was to ensure that the deployment scripts running on the interceptor provided the same telemetry frequency as the policy was trained on. Earlier flight tests provided 10 to 20 Hz telemetry, whereas the policy was trained on 40-50 Hz.
IV-E2 Moving virtual target
After successfully intercepting virtual stationary targets, the controller was challenged with a moving virtual target. The target was flying a 90 meter altitude loop at a fixed ground speed of 8 m/s through a set of coordinates that defined an oval-shaped track. Eight attempts were made, of which four resulted in an interception (distance \leq 3 m), two resulted in a miss (3 m \leq distance \leq 8 m) and two were aborted due to divergence. The trajectories of the interceptor and virtual target during each engagement are shown in figure 21. In figure 22, the distance between the interceptor and the target throughout the engagement is shown.
Overall, the controller performed well with a moving target. During the first engagement, a closest point of approach (CPA) of 0.3 m was achieved. This is tenfold below the chosen interception threshold of 3 m, but also far below the wingspan of the target (1.7 m), indicating precision even as the target moves. During engagement four, five and seven, similar performance was observed. Engagement six and eight also showed the interceptor closing in quite well, but ultimately remained above the threshold of 3 m. Engagement two and three were aborted due to the interceptor steering away from the target.
In simulation, it was observed that tail-based approach geometries had the highest success rate. In real flight, approach geometry does not necessarily negatively influence performance. Engagement four shows an approximately sideways engagement, resulting in a successful interception (CPA: 1.3 m). Engagement seven and eight start nearly head-on, with engagement seven resulting in a precise interception (CPA: 0.8 m) and engagement eight resulting in a near miss (CPA: 7.3 m). Engagement eight shows the interceptor making a very sharp move to try and align itself with the target. Engagement six is fully head-on and the interceptor does not try to align itself with the target’s trajectory but just flies into it head on (CPA: 5.6 m).
Engagement two and three were aborted because the interceptor started to steer away from the target. This was likely due to the KF producing an unreasonable range and position estimate. Once the estimates are far beyond what the policy has seen in training, it starts to diverge. During these two engagements, the policy reduces throttle, which is consistent behavior occurring when it has lost track of the target.
IV-E3 Real target
The ultimate test of the system was the interception of a real target. For this test, a fixed-wing target was flying a rectangular pattern at 90 meters altitude in AUTO mode. Meanwhile, the operator of the target was instructed to give stick inputs to maneuver and actively avoid being collided into.
The interceptor was aimed at the target manually. The controller would be switched on after a target detection was confirmed on the camera feed. After switching on the controller, RC commands generated by the RL policy take over the aircraft, with pilot stick inputs having no effect until the controller is switched off again. The relative trajectory was monitored by both pilots from the ground. When the interceptor got into collision range, the controller was switched off and both pilots maneuvered in STABILIZED mode to avoid an actual impact.
A total of six engagements were flown with the RL controller engaged. Three engagements resulted in a successful interception with both pilots taking over to avoid a collision. During the first engagement4, the interceptor detected a bird or another aircraft, which was mistakenly assumed by the human operators to be the target drone. This resulted in normal behavior, but chasing a phantom target of which detection faded as the controller was turned on. The third interception was the first successful engagement5. Both pilots actively took over control manually to avoid a collision. The fifth engagement was a successful interception. The sixth and final attempt was also a successful interception. The interceptor banked 130 degrees during this chase (as visible in the flight logs) and was able to keep the target in sight before the pilot took back control.
Unfortunately, the target’s flight logging got corrupted a mere 17 seconds after launch. Hence, there are no GNSS coordinates of the target’s trajectory. To still get an indication of CPA, a mixture of information was used. Firstly, the target was mostly flying a rectangular pattern between four predetermined GNSS coordinates with a desired altitude of 90 meters. The target was maneuvering to make it more difficult for the interceptor, but it can be assumed that the target was approximately flying the mission. For each engagement, the CPA with this trajectory can be computed. By assuming a constant airspeed of 15 m/s, the reconstructed target trajectory based on the mission can be compared to the interceptor’s trajectory as shown in figure 23.
Secondly, the video recordings can be analyzed to see how much the target drone takes up the frame. Using the pinhole model equations (3, 4), a depth estimate can be reconstructed from the image.
In figures 24, 25 and 26, still images of the target being intercepted during engagement three, five and six respectively are shown. The interceptor comes even closer on video, but the images shown here contain relatively little static noise and also show the entire wingspan of the aircraft. For engagement three, the interceptor and target bank opposite ways to avoid a collision, meaning this range estimate will be quite accurate as the closest point of approach. For engagement five and six, the interceptor flies underneath the target. Therefore the CPA is likely closer than these images suggest.
The wingtips are identified manually in each frame, and the tip-to-tip separation L measured in screen-capture pixels is converted to native camera pixels through s=1280/W_{\mathrm{act}}, where W_{\mathrm{act}} is the width of the active video area. With f_{x}=1108.5 px from Eq. (4) and W=1.718 m, Eq. (3) gives Z=f_{x}W/w_{px} with w_{px}=sL:
- (3)
- \sqrt{515^{2}+927^{2}}=1060.4
- 0.552
- 585.6
- 3.25
- (5)
- \sqrt{376^{2}+150^{2}}=404.8
- 0.553
- 224.0
- 8.50
- (6)
- \sqrt{354^{2}+186^{2}}=399.9
- 0.554
- 221.5
- 8.60
A target yawed by \psi relative to the camera axis presents an effective width W\cos\psi, so the values above are upper bounds. Estimating \psi\approx 45^{\circ} in engagement 5 and \psi\approx 20^{\circ} in engagement 6 yields corrected ranges of 6.0 m and 8.1 m, respectively.
Lastly, besides the mission and the images, the KF running on the interceptor gives a 1 Hz log containing the range estimate, which gives an indication of perceived range. In figure 27, various KF parameters are plotted over time during each engagement. The top subfigure shows the KF range estimate. For engagements 3, 5 and 6 the final range estimate is 3, 4 and 6 meters respectively. This corroborates the range estimates obtained using other methods. Besides the final estimates, these plots also show how target state estimation progresses over time during real interception flights. Engagements 1, 3 and 6 show a very similar pattern in the range estimate, which starts high and gradually decreases over time. This explains why during flight 1, the interceptor did not cut throttle: the filter’s estimate remained consistent with a closing engagement throughout. However, the video shows the detector had locked onto something else in the sky. The detection dropout plot shows that six seconds into the engagement, the target has been lost for 3.7 seconds. Surprisingly, the interceptor keeps flying normally on the filter’s estimate rather than breaking off. This shows the strength of introducing detection dropouts to the training environment. As long as the target is far away and not maneuvering unpredictably, a long detection dropout can still result in a successful pursuit and possibly regain of target lock if the target being chased is real.
Engagement 5 is interesting because the range estimate is actually very low upon initialization (12 m), but then quickly climbs to 54 m, only to drop all the way to 4 m when the target is being intercepted. The perception model possibly locked onto different illusionary targets mid-engagement, reducing the reliability of the KF estimate. This is also reflected by the other plots in figure 27, which show a climbing target speed estimate, as if the target is accelerating away. Also, the position and velocity estimate variances are high compared to the actual range and velocity estimates. The detection dropout plot corroborates these findings as it shows that 2 seconds into the engagement, the target was lost for 1.7 seconds. After that it (re)acquires the real target and proceeds to intercept successfully.
IV-F Rudder behavior in RL
The RL policy showed significant oscillation of the rudder, both in simulation and in real flight, resulting in an oscillatory yaw rate that decreases in amplitude as the target is approached. This was investigated and seems to be correlated with perceived range to the target as shown in figure 28. Rudder oscillation amplitude, quantified as the root mean square rudder deflection in degrees, correlated nearly linearly with perceived range. If the policy is presented artificial high or low range estimates, the rudder oscillation amplitude will be high or low respectively, regardless of actual range.
V Discussion
V-A Performance
In simulation, RL outperformed the classical controllers under almost all circumstances. Against fast, non-maneuvering targets, PP overtakes RL. At a target speed of 20 m\cdots-1 it achieves 91.8 percent interception rate against the policy’s 70.2 percent. The policy’s training distribution reached only 12 m\cdots-1 target speed per axis, favoring to leave a velocity margin for accelerating targets. Hence, this condition lies partly outside the training distribution. RL commanded rudder independently, PP and PN only use rudder to coordinate turns. PN underperformed RL but mostly matched PP, only being outperformed in the later stages of the curriculum where perception is severely limited by noise. This is mainly due to the sensor being a strapdown monocular camera. Traditionally, PN is used on missiles with seeker heads which ensure the sensor is pointing at the target. That assumption is not valid for the interceptor used in this work. Notably, PN is implemented in a range-invariant fashion. This differs from textbook approaches [4][5] which scale the commands by closing velocity. This approach was initially attempted, but abandoned as it was observed that the closing velocity estimate from apparent bounding box dimensions was too noisy to properly scale the guidance commands. The performance of the baseline classical guidance algorithms also depends on the underlying cascaded autopilot that was manually tuned.
In real flight, the RL policy achieved sim-to-real transfer. With virtual targets its performance showed high accuracy at a variety of initial geometries, attitudes and wind speeds. The performance was ultimately successfully validated by the interceptions of real, maneuvering fixed-wing MALE targets. Human operators had to intervene repeatedly to prevent an actual collision between the interceptor and its target.
V-B Perception
Perception was a key challenge in this work. Initial results showed that simply providing bounding-box data as input was not sufficient to let the policy converge to reliable interception behavior in training. The Kalman filter resolved this by providing relative target state estimates. Additionally, the Kalman filter also made the classical controllers more robust. With the bounding-box only approach, these controllers would have no input to act on when the target left the FOV. However, the filter produces estimates even when the target is not detected.
In training, the challenge was to simulate all real-life perception noise. Since the performance of the computer vision algorithm was not quantitatively known, the approach was to train the controller with as much noise as possible. Initially, mainly white noise in the pixels and frame-by-frame detection dropouts were provided, but this is easily compensated for by the filter. By clustering detections dropouts into larger chunks, it becomes harder for the filter to create reliable estimates. Consequently, the policy learns to behave conservatively. In real flight, the perception might be less noisy, meaning more optimal approaches could be flown. During interceptions of real targets, it was indeed observed that detection can drop out over prolonged periods. Figure 27 shows that during engagement 5 with a real target, there were no detections for at least 1.7 seconds at one point. Despite this, the policy was able to successfully intercept the target, showing robustness during perception degradation.
One noise source that was not simulated in training is the detection of false positives or even other potential wrong targets such as birds, clouds, or even high-altitude civilian aircraft. This was especially visible during real target engagement 1, where the RL controller was engaged whilst locking onto a different target. The policy currently does not discern between a real target and something else that still results in detections feeding into the Kalman filter.
The Kalman filter currently uses all detections with a confidence score above 0.3. Using these scores as weights could actually result in a better prediction with a lower uncertainty. In the current implementation, the detection algorithm’s confidence score is lost during the filtering.
Range estimation is based on the Kalman Filter back projecting bounding box dimensions onto a known wingspan of 1.7 meters. While the simulation and training environments randomize the actual target dimensions around this nominal value, the range estimate will breakdown for targets that are much smaller or larger. This does not necessarily mean that performance degrades however. In real flight, spurious odd-sized detections did not result in sudden changes in course.
V-C Flight model
To effectively train a policy that is transferable to a real platform, robustness is needed rather than accuracy. The dynamics model used in training should cover the real life physics, but also not over-complicate things. To identify the aircraft parameters, three flights were flown, with two having an AOA vane mounted on the aircraft. The results in table I are not perfect, with no correlation scores above 0.8. This could probably be greatly improved by flying more flights with an AOA vane and specifically exciting different axis independently. Additionally, a different regression method could be used. OLS was used here for simplicity, but figure 5 showed that for lift and drag, the residuals are autocorrelating, which violates the OLS assumption that the noise is independent. Some non-linear identification method could possibly generate a more valid estimate. A better thrust model could potentially also resolve the autocorrelation problem.
However, the scope of this work was sim-to-real transfer. Rather than focusing on creating a very high fidelity simulation, domain randomization and other techniques were successfully used to overcome gaps between simulation and real flight.
V-D Training
Once a policy was successfully used to intercept stationary virtual targets in real flight, further development and training of other RL policies was halted. This was not because it could not have been improved, but rather the choice was deliberately made to test the policy with as many different real flight experiments as possible whilst keeping performance and limitations comparable across experiments.
One of the downsides of reinforcement learning is that it requires training of the neural network, which can take a long time. This makes iteration cycles long. To alter the observations of the policy or the curriculum usually means retraining the policy from scratch, costing multiple hours of CPU time. Transfer learning allows the weights of one policy to be transferred to the next. This is helpful when quickly testing late-stage curriculum changes, where the policy already should have learned how to fly. However, to obtain reproducible results, the curriculum and parameters should not be altered mid-training.
The analyses in sections IV-D1 and IV-D2 were performed after a bug fix in the training environment. Specifically, the pre-fix training environment mixed aircraft acceleration in the inertial frame with aircraft acceleration in the body frame (equations 27 and 28). This lead to the additional term -\bm{\omega}_{b}\times\mathbf{v}_{b} fighting the aircraft during turning in the training environment. In other words, the RL policy was trained in an environment in which turning was approximately twice as hard as would be realistic. This explains why the performance in the corrected environment is lower than what is suggested by the curriculum learning progression in figure 7, which is in the environment where the bug is still present. The bug was discovered after real flight tests were successfully performed and hence instead of retraining a new policy, the current policy was maintained for comparability at the cost of performance. Nonetheless, this error shows the robustness of the RL policy. Not only did performance degrade only slightly in simulation after the fix, the policy also managed to intercept targets in a real environment, showcasing sim-to-real transferability even when trained in an imperfect physics model. The performance of the policy in the original training environment is included in appendix 29, which unsurprisingly shows higher performance across all domains.
One interesting but unexplored idea to potentially improve performance of the policy is to introduce a reward for producing a correct relative target state estimate. Currently the policy is driven towards perception by keeping the camera aimed at the target and the target in the FOV, but this might not always be the optimal solution. The reward function could stimulate low covariances in the state estimates or even penalize proportional to the error in the state estimate.
V-E Transferability
Initially, time since start of the engagement was also provided to the policy, but this proved to hinder sim-to-real transfer. During real flight testing, the controller is running continuously, but its authority over the aircraft is being toggled on and off by a human operator. Time since start of the engagement quickly blows up beyond the training envelope, leading to unpredictable behavior. Additionally, the parameter adds no value to the agent’s decision making.
By using a framework that trains policies with up to 30 percent domain randomization in simulation, the controller becomes robust to sim-to-real gaps in the flight model. This controller is end-to-end, meaning even low-level dynamics needed to be simulated.
V-F RL controller flight behavior
One of the more surprising observations during this research was the continuous rudder oscillations produced by the policy both in simulation and in real flight. The aircraft is visibly heavily yawing back and forth, even in level wings flight, which means it is unlikely to be attributable to turn coordination. The oscillatory yawing fades as perceived range shrinks, as if the interceptor is straightening itself out before impact. At first it was thought that the policy might have learned to triangulate for better range estimates, however replacing the noisy camera with an ideal one reduced KF position error to nearly zero, whilst rudder oscillation was unchanged. Then it was hypothesized that perhaps the oscillatory motion aids in reacquisition of target lock after a detection dropout, as the oscillation effectively widens the FOV. However this was unlikely, as reacquisition seemed independent of rudder oscillation. It was thought that maybe the policy uses the generated sideslip as an airbrake. This could keep throttle at a maximum, which is preferred to avoid its ramp up, whilst slowing closing velocity allowing for preciser maneuvering. This theory was refuted as airspeeds were comparable with or without the oscillations. It could also have been an artifact of the pre-correction training environment physics, which artificially made banking a lot harder, but this appears unlikely as removing rudder actually reduced performance less in the pre-correction training environment than in the corrected training environment. Since replacing the RL rudder control with the sideslip damper used in the cascaded autopilot for the baseline controllers did not reduce the interception rate significantly, it was hypothesized that the behavior must be optimizing some reward, however this was not confirmed. In the end, this analysis also highlights one of the downsides of using neural networks for control: its behavior can be a black box to an extent.
V-G Future work
This work has demonstrated fixed-wing, vision-based interception using an RL controller in real flight. The focus here was to demonstrate the proof-of-concept; once a policy was successfully flight tested, development of other policies stopped. Future work could continue this research. The approach in this study was to create a very conservative policy, with the highest chance of successful sim-to-real transfer, but this is at the cost of performance. It would be very interesting to see exactly when the policy fails to transfer to reality. In the current setup, policies are trained with up to 30 percent domain randomization of the aircraft parameters. This value is based on other work, but such high domain randomization also degrades performance and it is not certain that it is needed to such a degree to ensure sim-to-real transfer. Additionally, the policy described has been steered significantly by including large incentives to keep the target in sight. While this makes the policy more robust in the case of lots of camera noise or bad computer vision, it also hinders interception performance. It would be insightful to see where the limits of all of these considerations lie and where the policy breaks down in real flight.
Previous work has investigated quadrotor-based interception in simulation. This work now shows it is possible both in simulation and real flight for fixed-wing drones. This indicates that the possibilities are not gated by the platform used. The work outlined here could be extended for other platforms like tailsitters or X-wing interceptors.
One caveat of the work demonstrated here is that upon initializing an interception, for both the RL and classical controllers, the target needs to be detected. The KF produces a relative target position estimate. If there are no prior detections, the KF can not produce a position estimate, meaning the controllers have nothing to act on. Having the controller acquiring the target autonomously would greatly improve combat readiness.
The classical controllers were not tested in real flight. While their they were outperformed in simulation, for a complete comparison they would also need to be tested in real flight.
Currently, the relative state of the target is determined solely by visual observations. For midcourse guidance, a rough, ground-based radar estimate of the relative position of the target can be used. Future controllers could fuse such estimates with onboard detections, leading to a more robust behavior and also allowing autonomous target (re)acquisition for terminal guidance. For terminal guidance, monocular cameras provide a cheap and established way to detect targets. However, other sensors such as acoustic sensors, stereovision cameras, event-based cameras and infrared sensors can also be used. Multiple monocular cameras of different focal lengths can even be used to fuse a sharp focused image with a wide, unsharp image. This can make target reacquisition much easier in case of a missed interception.
VI Conclusion
In this work, an end-to-end neural network was trained using reinforcement learning to control a fixed-wing interceptor aircraft tasked with taking down an uncooperative target. The policy maps filtered, monocular vision observations directly to actuator commands. In simulation it outperformed baseline classical guidance algorithms. The controller achieved sim-to-real transfer, showcasing a comparable performance during real flight experiments. The system was ultimately successfully validated by intercepting real fixed-wing, medium altitude, long endurance targets, showing the potential of autonomous, intelligent interceptors in a modern air-defense context.
Appendix A Aerodynamics model
This section briefly describes the aerodynamics model that was used in the Python-based simulation and training environments.
A-1 State vector
The state vector \mathbf{x} can be defined as:
\displaystyle\mathbf{x}^{\top} \\ \displaystyle=\begin{bmatrix}\mathbf{p}_{i}&\mathbf{v}_{i}&\mathbf{q}&\bm{\omega}_{b}&\delta_{e}&\delta_{a}&\delta_{r}&\delta_{t}\end{bmatrix}where \mathbf{p}_{i}, \mathbf{v}_{i} \in\mathbb{R}^{3} are the position and velocities in the North-East-Down (NED) inertial frame, \mathbf{q}=\begin{bmatrix}q_{0}&q_{1}&q_{2}&q_{3}\end{bmatrix}^{\top}, is the unit quaternion attitude representation, \bm{\omega}_{b}\in\mathbb{R}^{3} are the angular rates in the body frame, \delta_{e},\delta_{a},\delta_{r}\in [-1, 1] are the normalized control surfaces actuator states which are scaled by the actuator deflection limits in radians and \delta_{t}\in [0, 1] is the normalized throttle state. All actuator states undergo first-order lag and hence: \dot{\delta}_{j}=\frac{\delta_{j,\mathrm{cmd}}-\delta_{j}}{\tau_{j}},\qquad j\in\{e,a,r,t\}, with \tau_{e,a,r}=0.05 s and \tau_{t}=0.4 s.
A-2 Translational dynamics
The translational dynamics in the body frame can be defined as:
\dot{\mathbf{v}}_{b}=\tfrac{1}{m}\mathbf{F}\mathrm{{}_{tot}}-\bm{\omega}_{b}\times\mathbf{v}_{b}.Here, m is the mass of the aircraft and F_{tot} is the total force acting on the body. The simulator propagates position and velocity in NED inertial coordinates, giving:
\dot{\mathbf{p}}_{i}=\mathbf{v}_{i},\hskip 8.53581pt\dot{\mathbf{v}}_{i}=\tfrac{1}{m}\mathbf{R}{{}_{b/i}}^{\top}\mathbf{F}\mathrm{{}_{tot}}.Vectors are resolved either in the NED inertial frame, whose axes point north, east and downward, or in the body frame, whose axes x_{b}, y_{b}, z_{b} point forward along the fuselage, out the right wing and downward respectively. The corresponding body-frame velocity components are denoted u, v and w:
\mathbf{v}_{b}=\mathbf{R}_{b/i}\,\mathbf{v}_{i}=\begin{bmatrix}u&v&w\end{bmatrix}^{\top},\quad V=\|\mathbf{v}_{b}\|The rotation matrix R_{b/i} maps the inertial frame to the body frame:
\mathbf{R}_{b/i}=\begin{bmatrix}1-2(q_{2}^{2}+q_{3}^{2})&2(q_{1}q_{2}+q_{0}q_{3})&2(q_{1}q_{3}-q_{0}q_{2})\\[1.0pt]
2(q_{1}q_{2}-q_{0}q_{3})&1-2(q_{1}^{2}+q_{3}^{2})&2(q_{2}q_{3}+q_{0}q_{1})\\[1.0pt]
2(q_{1}q_{3}+q_{0}q_{2})&2(q_{2}q_{3}-q_{0}q_{1})&1-2(q_{1}^{2}+q_{2}^{2})\end{bmatrix}.The matrix is orthonormal, so its inverse is its transpose, \mathbf{R}_{b/i}^{-1}=\mathbf{R}_{b/i}^{\top}=\mathbf{R}_{i/b}.
The total force is comprised of the aerodynamic forces, the thrust generated by the propeller and the force due to gravity:
\mathbf{F}_{\mathrm{tot}}=\mathbf{F}_{\mathrm{aero}}+\mathbf{F}_{\mathrm{thrust}}+\mathbf{F}_{\mathrm{gravity}},where:
\mathbf{F}_{\mathrm{gravity}}=R_{b/i}\begin{bmatrix}0&0&mg\end{bmatrix}^{\top},\mathbf{F}_{\mathrm{thrust}}=\begin{bmatrix}\delta_{t}\,T_{\max}\sqrt{\dfrac{\rho}{\rho_{0}}}\left(1-\hat{V}^{\,2}\right)&0&0\end{bmatrix}^{\top},\mathbf{F}_{\mathrm{aero}}=\bar{q}S\hskip-2.84526pt\begin{bmatrix}\cos\alpha\cos\beta&-\sin\beta&-\sin\alpha\cos\beta\\
\cos\alpha\sin\beta&\cos\beta&-\sin\alpha\sin\beta\\
\sin\alpha&0&\cos\alpha\end{bmatrix}\hskip-5.69054pt\begin{bmatrix}-C_{D}\\
\phantom{-}C_{Y}\\
-C_{L}\end{bmatrix}.Here, g is the gravitational acceleration. T_{max} is the maximum thrust achievable at full throttle with zero airspeed. \hat{V}=\min\!\left(\frac{V}{V_{\max}},\,1\right), with V being the airspeed and V_{\max} the airspeed at which thrust is zero. \rho is the air density (ISA troposphere model) and \rho_{0}=1.225\ \mathrm{kg\,m^{-3}} is the reference air density at sea level. In this research, \sqrt{\dfrac{\rho}{\rho_{0}}} is effectively 1 due to the low altitude testing (max 120 m). S is the wing surface area and \bar{q} is the dynamic pressure. \alpha=\arctan\frac{w}{u} is the Angle Of Attack (AOA), \beta=\arcsin\frac{v}{V} is the sideslip angle. C_{L},C_{D} and C_{Y} are the non-dimensional lift, drag and sideforce coefficients and can be described as:
C_{L}=C_{L_{0}}+C_{L_{\alpha}}\,\alpha+C_{L_{\delta_{e}}}\,\delta_{e},C_{D}=C_{D_{0}}+kC_{L}^{2},C_{Y}=C_{Y_{\beta}}\,\beta+C_{Y_{\delta_{r}}}\,\delta_{r}.Here, k is the induced drag factor. C_{L_{0}},C_{L_{\alpha}},C_{L_{\delta_{e}}} are coefficients that describe how the lift is shaped by AOA and elevator deflection. C_{D_{0}} is the zero-lift drag coefficient. C_{Y_{\beta}},C_{Y_{\delta_{r}}} are coefficients that shape how the sideforce is shaped by sideslip angle and rudder deflection.
A-3 Rotational dynamics
The rotational dynamics are given by:
\dot{\bm{\omega}}_{b}=\mathbf{J}^{-1}\Big(\mathbf{M}_{b}-\bm{\omega}_{b}\times(\mathbf{J}\,\bm{\omega}_{b})\Big),where \mathbf{J} is the inertia tensor of the aircraft and \mathbf{M}_{b} is the total moment vector which is approximated to contain only aerodynamic moments:
\mathbf{M}_{b}=\bar{q}S\begin{bmatrix}bC_{l}&cC_{m}&bC_{n}\end{bmatrix}^{\top}.Here, b is the wingspan and c is the mean aerodynamic chord. C_{l},C_{m} and C_{n} are the dimensionless aerodynamic moment coefficients that describe how airflow generates rotational moments about the body axes:
\displaystyle C_{l} \\ \displaystyle=C_{l_{0}}+C_{l_{\beta}}\beta+C_{l_{p}}\frac{pb}{2V}+C_{l_{r}}\frac{rb}{2V}+C_{l_{\delta_{a}}}\delta_{a}+C_{l_{\delta_{r}}}\delta_{r},\displaystyle C_{m} \\ \displaystyle=C_{m_{0}}+C_{m_{\alpha}}\alpha+C_{m_{q}}\frac{qc}{2V}+C_{m_{\delta_{e}}}\delta_{e},\displaystyle C_{n} \\ \displaystyle=C_{n_{0}}+C_{n_{\beta}}\beta+C_{n_{p}}\frac{pb}{2V}+C_{n_{r}}\frac{rb}{2V}+C_{n_{\delta_{a}}}\delta_{a}+C_{n_{\delta_{r}}}\delta_{r}.Here, p,q,r are the body angular rates.
A-4 Attitude kinematics
The attitude kinematics are defined by:
\dot{\mathbf{q}}=\tfrac{1}{2}\begin{bmatrix}-q_{1}&-q_{2}&-q_{3}\\
\phantom{-}q_{0}&-q_{3}&\phantom{-}q_{2}\\
\phantom{-}q_{3}&\phantom{-}q_{0}&-q_{1}\\
-q_{2}&\phantom{-}q_{1}&\phantom{-}q_{0}\end{bmatrix}\bm{\omega}_{b}.A-5 V-tail configuration
The interceptor built for this study has a V-tail ruddervator configuration instead of a conventional rudder and elevator. Hence:
\displaystyle\delta_{e,\text{eff}} \\ \displaystyle=\frac{1}{2}\cos(\Gamma)\,(\delta_{v_{L}}+\delta_{v_{R}}), \\ \displaystyle\delta_{r,\text{eff}} \\ \displaystyle=\frac{1}{2}\sin(\Gamma)\,(\delta_{v_{L}}-\delta_{v_{R}}),where \Gamma is the dihedral angle and \delta_{v_{L}},\delta_{v_{R}}\in [-1, 1] are the normalized left and right ruddervator deflection.
Appendix B Ordinary Least Squares regression
Ordinary Least Squares describes the regression problem as follows:
\mathbf{z}=\mathbf{X}\bm{\theta}+\mathbf{v}.Here, \mathbf{z} is the vector of the measured dependent variables. \mathbf{X} is the regressor matrix formed from measured independent variables. \bm{\theta} is the unknown true parameter vector. Finally, \mathbf{v} is the residual vector. The OLS parameter estimate \hat{\bm{\theta}} is obtained by minimizing the sum of squared residuals:
J(\bm{\theta})=(\mathbf{z}-\mathbf{X}\bm{\theta})^{T}(\mathbf{z}-\mathbf{X}\bm{\theta}).The necessary condition for the minimum is:
\mathbf{X}^{T}\mathbf{z}=\mathbf{X}^{T}\mathbf{X}\hat{\bm{\theta}}.Solving this yields the solution:
\hat{\bm{\theta}}=(\mathbf{X}^{T}\mathbf{X})^{-1}\mathbf{X}^{T}\mathbf{z}.This OLS parameter vector estimate gives the best least-squares fit of the linear model to the gathered flight data and was consequently used to create a high-fidelity simulation to train the RL controller.
Appendix C Kalman Filter
This section describes the Kalman filter used to filter the bounding-box signals and output relative state estimates.
C-1 State vector and process noise model
The filter tracks the target’s dynamic state:
\bm{x}_{k}=\begin{bmatrix}\bm{p}_{k}\\
\dot{\bm{p}}_{k}\\
\ddot{\bm{p}}_{k}\end{bmatrix}=\begin{bmatrix}p_{N}\hskip-2.84526pt&\hskip-2.84526ptp_{E}\hskip-2.84526pt&\hskip-2.84526ptp_{D}\hskip-2.84526pt&\hskip-2.84526ptv_{N}\hskip-2.84526pt&\hskip-2.84526ptv_{E}\hskip-2.84526pt&\hskip-2.84526ptv_{D}\hskip-2.84526pt&\hskip-2.84526pta_{N}\hskip-2.84526pt&\hskip-2.84526pta_{E}\hskip-2.84526pt&\hskip-2.84526pta_{D}\end{bmatrix}^{\!\top},where \bm{p}_{k},\dot{\bm{p}}_{k},\ddot{\bm{p}}_{k}\in\mathbb{R}^{3} are the target position, velocity and acceleration in NED. By including acceleration in the state vector, the filter can follow a maneuvering target. By working in a NED inertial frame, the target’s motion is decoupled from the interceptor’s ego-motion.
Between measurements, the state evolves under a discrete constant acceleration model with additive Gaussian process noise,
\bm{x}_{k}=\bm{\Phi}\,\bm{x}_{k-1}+\bm{w}_{k-1},\qquad\bm{w}_{k-1}\sim\mathcal{N}(\bm{0},\bm{Q}),with the sampling interval \Delta t=1/f_{c}=0.02\,\mathrm{s} matching the control and perception frequency f_{c}=50\,\mathrm{Hz}. In training, f_{c} is randomized between 40 and 50 Hz. With \bm{I}_{3} and \bm{0}_{3} the 3\times 3 identity and zero matrices, the transition matrix \bm{\Phi} is
\bm{\Phi}=\begin{bmatrix}\bm{I}_{3}&\Delta t\,\bm{I}_{3}&\tfrac{1}{2}\Delta t^{2}\,\bm{I}_{3}\\[2.0pt]
\bm{0}_{3}&\bm{I}_{3}&\Delta t\,\bm{I}_{3}\\[2.0pt]
\bm{0}_{3}&\bm{0}_{3}&\bm{I}_{3}\end{bmatrix}.Real targets do not obey constant acceleration, hence process noise is introduced to explain the change of acceleration (jerk). The process noise is obtained by treating jerk as a zero-mean white process of intensity (power spectral density) q and integrating over \Delta t:
\bm{Q}=q\begin{bmatrix}\tfrac{\Delta t^{5}}{20}\bm{I}_{3}&\tfrac{\Delta t^{4}}{8}\bm{I}_{3}&\tfrac{\Delta t^{3}}{6}\bm{I}_{3}\\[4.0pt]
\tfrac{\Delta t^{4}}{8}\bm{I}_{3}&\tfrac{\Delta t^{3}}{3}\bm{I}_{3}&\tfrac{\Delta t^{2}}{2}\bm{I}_{3}\\[4.0pt]
\tfrac{\Delta t^{3}}{6}\bm{I}_{3}&\tfrac{\Delta t^{2}}{2}\bm{I}_{3}&\Delta t\,\bm{I}_{3}\end{bmatrix},\qquad q=5\times 10^{-4}.\bm{Q} is the covariance of the error that the prediction model makes in a single step.
C-2 Measurement model
Only target pixel coordinates are used, not their temporal derivatives. Each detection where c\geq 0.3 is converted to a measured NED position \bm{m}_{k}. c_{x},c_{y} and normalized width w are back projected through the pinhole model using the image size W_{\mathrm{img}}\times H_{\mathrm{img}}=1280\times 720 px, and the nominal target wingspan W=1.7\,\mathrm{m} using equations 3, 4 and 5 yielding the camera-frame point \bm{r}_{\mathrm{cam}}=[X,Y,Z]^{\top}. This is rotated into the body frame and then into NED and translated by the interceptor’s own NED position \bm{p}_{i} using the body-to-NED rotation \mathbf{R}_{i/b} formed from the autopilot attitude quaternion \bm{q}:
\bm{m}_{k}=\bm{p}_{i}+\mathbf{R}_{i/b}\,\mathbf{R}_{b/c}\,\bm{r}_{\mathrm{cam}},\qquad\hskip-17.07164pt\mathbf{R}_{b/c}=\begin{bmatrix}0&0&1\\
1&0&0\\
0&1&0\end{bmatrix}.The resulting measurement is linear in the state
\bm{m}_{k}=\bm{H}\,\bm{x}_{k}+\bm{\nu}_{k},\qquad\bm{\nu}_{k}\sim\mathcal{N}(\bm{0},\bm{R}_{k}),with \bm{H}=\begin{bmatrix}\bm{I}_{3}&\bm{0}_{3\times 6}\end{bmatrix} such that velocity and acceleration are never measured directly but instead are estimated from the sequence of position fixes through the model in (52). \bm{\nu}_{k} represents the zero mean Gaussian measurement noise with covariance \bm{R}_{k}.
C-3 Range-dependent measurement covariance
Range is recovered from apparent size and is far less certain than bearing, with an uncertainty that grows with distance. This is modeled by constructing \bm{R}_{k} in a LOS frame and rotating it into NED. With range d=\lVert\bm{m}_{k}-\bm{p}_{i}\rVert (floored at 0.5\,\mathrm{m}), the lateral and depth standard deviations are
\;\sigma_{\mathrm{lat}}=\Big|\tfrac{\partial X}{\partial u_{c}}\Big|\sigma_{c}=\frac{Z}{f_{x}}\sigma_{c}=\frac{d(\sigma_{c,0}+\sigma_{c,1}d)}{f_{x}}\;and
\;\sigma_{\mathrm{depth}}=\Big|\tfrac{\partial Z}{\partial w_{px}}\Big|\sigma_{s}=\frac{Z^{2}}{f_{x}W}\sigma_{s}=\frac{d^{2}(\sigma_{s,0}+\sigma_{s,1}d)}{f_{x}W},\;with \sigma_{c,0}=3.0\,\mathrm{px}, \sigma_{c,1}=0.05\,\mathrm{px/m}, \sigma_{s,0}=2.0\,\mathrm{px}, \sigma_{s,1}=0.02\,\mathrm{px/m} and Z\approx d. The three sources of error are assumed to be uncorrelated. The covariance in the LOS frame \bm{R}^{\mathrm{LOS}}_{k} is therefore:
\bm{R}^{\mathrm{LOS}}_{k}=\begin{bmatrix}\sigma_{\mathrm{depth}}^{2}&0&0\\
0&\sigma_{\mathrm{lat}}^{2}&0\\
0&0&\sigma_{\mathrm{lat}}^{2}\end{bmatrix}and is mapped into NED by
\bm{R}_{k}=\bm{L}\,\bm{R}^{\mathrm{LOS}}_{k}\,\bm{L}^{\top},\qquad\bm{L}=\begin{bmatrix}\hat{\bm{r}}&\bm{v}_{1}&\bm{v}_{2}\end{bmatrix},where \hat{\bm{r}}=(\bm{m}_{k}-\bm{p}_{i})/d is the LOS unit vector and \bm{v}_{1},\bm{v}_{2} are two unit vectors orthogonal to each other and to \hat{\bm{r}}, completing an orthonormal basis. Bearing can be trusted from few measurements, whereas range needs a longer measurement time to be trusted.
C-4 Initialisation
On the first detection that exceeds the confidence threshold, the filter is seeded from the measurement, with zero velocity and acceleration and large priors on the unobserved states:
\hat{\bm{x}}_{0}=\begin{bmatrix}\bm{m}_{0}\\
\bm{0}\\
\bm{0}\end{bmatrix},\qquad\bm{P}_{0}=\begin{bmatrix}\bm{R}_{0}&\bm{0}&\bm{0}\\
\bm{0}&\sigma_{v_{0}}^{2}\bm{I}_{3}&\bm{0}\\
\bm{0}&\bm{0}&\sigma_{a_{0}}^{2}\bm{I}_{3}\end{bmatrix},with \sigma_{v_{0}}=5\,\mathrm{m/s} and \sigma_{a_{0}}=2\,\mathrm{m/s^{2}}, so that the first updates are dominated by the measurements.
C-5 Prediction step
At every control step, irrespective of whether a detection is available, the state and covariance are propagated with (52)–(53):
\displaystyle\hat{\bm{x}}_{k\mid k-1} \\ \displaystyle=\bm{\Phi}\,\hat{\bm{x}}_{k-1\mid k-1}, \\ \displaystyle\bm{P}_{k\mid k-1} \\ \displaystyle=\bm{\Phi}\,\bm{P}_{k-1\mid k-1}\,\bm{\Phi}^{\top}+\bm{Q}.C-6 Correction step
When an accepted detection is available, the predicted state is corrected by the measurement \bm{m}_{k}. The innovation (measurement residual) and its covariance are
\displaystyle\tilde{\bm{y}}_{k} \\ \displaystyle=\bm{m}_{k}-\bm{H}\,\hat{\bm{x}}_{k\mid k-1}, \\ \displaystyle\bm{S}_{k} \\ \displaystyle=\bm{H}\,\bm{P}_{k\mid k-1}\,\bm{H}^{\top}+\bm{R}_{k}.The Kalman gain weights the correction by the relative confidence in the prediction and the measurement,
\bm{K}_{k}=\bm{P}_{k\mid k-1}\,\bm{H}^{\top}\,\bm{S}_{k}^{-1},and the state and covariance are updated as
\displaystyle\hat{\bm{x}}_{k\mid k} \\ \displaystyle=\hat{\bm{x}}_{k\mid k-1}+\bm{K}_{k}\,\tilde{\bm{y}}_{k}, \\ \displaystyle\bm{P}_{k\mid k} \\ \displaystyle=\left(\bm{I}_{9}-\bm{K}_{k}\,\bm{H}\right)\bm{P}_{k\mid k-1}.Although only position enters the innovation (63), the off-diagonal terms of \bm{P}_{k\mid k-1} built up by the dynamics in (52) make velocity and acceleration observable, so the gain (65) corrects all nine states.
C-7 Detection handling and coasting
When there is no detection or detection is below the confidence threshold, the correction step (63)–(67) is skipped and only the prediction step (61)–(62) executes. The filter then coasts on its motion model, with \bm{P} growing through \bm{Q} to reflect the increasing uncertainty until the target is reacquired.
C-8 Outputs
The filter exposes the estimated target state and covariance,
\hat{\bm{p}}_{k}=\hat{\bm{x}}_{k\mid k}^{(1:3)},\quad\hat{\bm{v}}_{k}=\hat{\bm{x}}_{k\mid k}^{(4:6)},\quad\hat{\bm{a}}_{k}=\hat{\bm{x}}_{k\mid k}^{(7:9)},\quad\bm{P}_{k\mid k}.These are expressed relative to the interceptor and rotated into the body frame,
\bm{r}_{b,k}=\mathbf{R}_{i/b}\,(\hat{\bm{p}}_{k}-\bm{p}_{i}),\qquad\dot{\bm{r}}_{b,k}=\mathbf{R}_{i/b}\,(\hat{\bm{v}}_{k}-\bm{v}_{i}),from which the LOS angles and rates used by the controllers are computed.
Appendix D Actuator lag model
Each actuator is modeled as a first-order lag between the commanded deflection \delta_{i,\mathrm{cmd}} and the achieved deflection \delta_{i},
\dot{\delta}_{i}=\frac{\delta_{i,\mathrm{cmd}}-\delta_{i}}{\tau_{i}},\qquad i\in\{e,a,r,t\},with \tau_{e}=\tau_{a}=\tau_{r}=0.05\,s for the flight control surfaces and \tau_{t}=0.40\,s for the propeller.
Appendix E Classical guidance cascaded autopilot gains
The gains of the cascaded autopilot used in the baseline classical guidance controller are given in table II. Every integrator is protected against windup by clamping its magnitude, to 0.35, 0.55 and 0.40 of full travel in the roll rate, pitch rate and sideslip loops respectively and to 30 m s-2 in the normal acceleration loop. Accumulation is suspended whenever the surface command exceeds actuator limits and the current error would drive it further beyond the limits. Integration resumes as soon as the error reverses, so recovery from a saturated maneuver is not delayed by an integrator that must first unwind.
- K_{ff,p}
- 0.134
- s rad-1
- rate feedforward, 1/p_{ss}
- K_{P,p}
- 0.25
- s rad-1
- proportional gain
- K_{I,p}
- 0.15
- rad-1
- integral gain
- Pitch-rate loop (inner, elevator)
- K_{ff,q}
- 0.300
- s rad-1
- rate feedforward (1/q_{ss}= 0.405)
- K_{P,q}
- 0.70
- s rad-1
- proportional gain
- K_{I,q}
- 2.00
- rad-1
- integral gain
- Sideslip regulator (inner, rudder)
- K_{P,\beta}
- 1.2
- rad-1
- proportional gain
- K_{I,\beta}
- 0.8
- rad-1s-1
- integral gain
- K_{D,r}
- 0.30
- s rad-1
- yaw damping about r_{\mathrm{coord}}
- Roll channel (outer)
- T_{\phi}
- 0.15
- s
- roll time constant; P=1/T_{\phi}
- Normal-acceleration channel (outer)
- K_{P,a}
- 2.0
- –
- open-loop gain
- K_{I,a}
- 4.0
- s-1
- integral gain
- Applying across loops
- V_{\mathrm{stab}}
- 25.0
- m s-1
- reference for (V_{\mathrm{stab}}/V)^{2} schedule
- \tau_{f}
- 0.08
- s
- low-pass on specific force
- f_{\min}
- 1.47
- m s-2
- roll demand frozen below this
Appendix F Reward function coefficients
Table III shows the reward function coefficients used in the training of the ultimate policy that was flown in the real flight tests.
- Term weights
- c_{d}
- Distance-progress reward
- 1.0
- c_{\text{int}}
- Interception bonus
- 0.5
- c_{c}
- Camera-centering reward
- 0.4
- c_{\Phi}
- Field-of-view penalty
- 1.5
- c_{\Omega}
- Body-rate penalty
- 0.7
- c_{u}
- Action-smoothness penalty
- 1.5
- c_{\alpha}
- Angle-of-attack penalty
- 2.0
- Shaping parameters
- v_{cl,\text{safe}}
- Safe closing speed
- 10\ \mathrm{m/s}
- \Omega_{r_{\max}}
- Body-rate normalizer
- 2.0\ \mathrm{rad/s}
- \alpha_{\text{warn}}
- AOA warning angle
- 10^{\circ}
- \alpha_{\max}
- AOA cutoff limit
- 60^{\circ}
- K
- AOA penalty curvature
- -3
- \tau_{\max}
- Target-loss horizon
- 200 steps
- R_{\max}
- Return normalization budget
- 1000
Appendix G Curriculum learning stages
Tabel IV describes all the changes per stage during the training curriculum. Maximum range is deliberately lowered in the latest two stages, as it was that observed that the camera noise became too large at greater ranges to reliably detect the target.
Appendix H Aerodynamic aircraft coefficients
In table V, the aerodynamic aircraft coefficients that were used in training of the RL policy are given.
- Lift
- C_{L0}
- 0.31
- C_{L_{\alpha}}
- 2.90
- C_{L_{\delta_{e}}}
- 0.50
- Drag
- C_{D0}
- 0.12
- k_{\mathrm{induced}}
- 0.18
- Side Force
- C_{Y_{\beta}}
- -0.096244
- C_{Y_{\delta_{r}}}
- -0.18
- Pitching Moment
- C_{m0}
- -0.011
- C_{m_{\alpha}}
- -0.18
- C_{m_{q}}
- -2.60
- C_{m_{\delta_{e}}}
- 0.30
- Rolling Moment
- C_{l_{\beta}}
- -0.0170
- C_{l_{p}}
- -0.092
- C_{l_{r}}
- 0.075
- C_{l_{\delta_{a}}}
- 0.03
- C_{l_{\delta_{r}}}
- 0.006506
- Yawing Moment
- C_{n_{\beta}}
- 0.02
- C_{n_{p}}
- -0.051
- C_{n_{r}}
- -0.035
- C_{n_{\delta_{a}}}
- 0.007
- C_{n_{\delta_{r}}}
- 0.028
Appendix I RL policy performance in the old training environment
The performance of the RL policy in the old simulation environment (with the bug not fixed) is shown in figure 29.
Acknowledgment
This work was funded by TU Delft and Dremian BV. The latter provided the computer vision algorithm used to detect real targets in real flight experiments.