# Nanosatellite Autonomous Navigation via Extreme Learning Machine Using Magnetometer Measurements
## 1 Introduction  
Spacecraft tracking is usually performed through ground-based tracking systems such as radar or optical station networks. The complexity introduced by these devices can be tackled by implementing autonomous navigation modules onboard spacecraft. This step is particularly crucial for small satellite missions, which generally have limited computational and power consumption resources available. An onboard GPS module is a common solution; however, it relies on the quality and the availability of the GPS signal for the accuracy of position and velocity estimates, thus making the satellite not completely autonomous. Furthermore, commercial GPS modules are subject to several limitations, such as military and/or government restrictions, intentional performance degradation, signal occlusion by the Earth during the initial acquisition phase, unwanted Doppler shifts, or component degradation [1]. For this reason, the use of data coming from sensors already available onboard, like magnetometers and/or Sun sensors, is attracting a lot of research effort [1, 2, 3, 4]. Magnetometers, in particular, are low-cost sensors which can be exploited by Kalman Filters (KFs) [5, 6, 7] to perform autonomous orbit determination. This approach yields errors with accuracies ranging from hundreds of kilometers to sub-kilometers from the spacecraft's position. The goodness of these estimates mainly depends on the accuracy of the magnetic field model used [8, 9, 10]. These results indicate that Kalman Filtering is a solid baseline for autonomous orbit determination, but the state estimation provided is still not reliable enough to be used in the absence of GPS signals. Following the recent exploit of Machine Learning (ML), manystudies have been carried out to integrate Kalman Filtering with Artifical Intelligence (AI) frameworks, in particular by using Neural Networks (NNs). The reference [11] presents a detailed overview of ML-KF applications, paying particular attention to the different roles played by ML. Such roles include the following:  
* Tuning and predicting KF parameters, such as error covariances;
* Predicting and compensating KF errors;
* Predicting and updating the state vector and/or measurements;
* Predicting pseudo-measurements to be fed to the KF. In general, an hybrid approach shows better results than the application of standalone ML frameworks or Kalman Filtering. When dealing with non-linear dynamics or non-Gaussian noises, ML models provide a better outcome than Kalman Filtering which, in turn, offers better interpretability with respect to end-to-end ML approaches. For most architectures, in fact, the intermediate relations between the features are unknown and the ML module acts as a \"black box\" between the input and the output of the process. In this work, the solidity and reliability of the Extended Kalman Filter (EKF) [12; 13] is combined with a Neural Network trained via the Extreme Learning Machine [14; 15] to further increase the accuracy of the state estimate. In particular, the algorithm collects GPS data as long as the GPS signal is available, while a magnetometer-based EKF provides a second, less accurate, state estimate. The error of the EKF estimate with respect to the GPS one is computed. When the GPS is no longer available, the Neural Network is trained using the EKF estimates as input values and the errors, with respect to the GPS, as target values. This work also represents a feasibility study of improved autonomous magnetometer-based navigation during spacecraft's safe mode when the GPS signal is unavailable due to safety reasons, system anomalies, a lack of communication, or hardware/software failures. In many situations, safe-mode navigation is performed via coarse orbit propagation from some initial conditions provided to the spacecraft by the ground station. This operation can be particularly demanding, especially when dealing with constellations of small satellites. Furthermore, communication with the ground station might be impossible under the given circumstances.