  Unmanned autonomous vehicles (UAVs) rely on effective path planning and
tracking control to accomplish complex tasks in various domains. Reinforcement
Learning (RL) methods are becoming increasingly popular in control
applications, as they can learn from data and deal with unmodelled dynamics.
Cyber-physical systems (CPSs), such as UAVs, integrate sensing, network
communication, control, and computation to solve challenging problems. In this
context, Software Rejuvenation (SR) is a protection mechanism that refreshes
the control software to mitigate cyber-attacks, but it can affect the tracking
controller's performance due to discrepancies between the control software and
the physical system state. Traditional approaches to mitigate this effect are
conservative, hindering the overall system performance. In this paper, we
propose a novel approach that incorporates Deep Reinforcement Learning (Deep
RL) into SR to design a safe and high-performing tracking controller. Our
approach optimizes safety and performance, and we demonstrate its effectiveness
during UAV simulations. We compare our approach with traditional methods and
show that it improves the system's performance while maintaining safety
constraints.
