# Integrated Magnetic Management of Stored Angular Momentum in Autonomous Attitude Control Systems
## 1 Problem Statement and Spacecraft Dynamics  
The problem of stored angular momentum management is inherently related to attitude control systems with momentum exchange actuators. In fact, momentum exchange actuators do not generate any external torque, but they exchange angular momentum with the main spacecraft body by means of internal torques, \(\mathbf{t}_{R}\), which are generated by accelerating or decelerating a set of spinning rotors. This study considers a spacecraft with mass \(m_{B}\) equipped with four reaction wheels, which are identified as \(R_{i}\) with \(i=1,2,3,4\). These are organized in a redundant pyramid configuratio,\(n\) and their spinning axes are denoted as \(\mathbf{\hat{r}}_{1}\), \(\mathbf{\hat{r}}_{2}\), \(\mathbf{\hat{r}}_{3}\), and \(\mathbf{\hat{r}}_{4}\). The torques generated by the reaction wheels are practically provided by the electric motors driving the rotors, which have their typical operational curve that is a function of the angular speed. Despite the specific typology of the electric motor, it is common to have a specific spin rate, where the practical torque level falls to zero, \(\omega_{R}^{Max}\). This is called saturation speed, and, when the actuator reaches this speed, the motor cannot provide any additional torque in the direction of the increasing spin rate. Note that the four actuators are assumed to have the same saturation speed. When the rotation rate of one actuator reaches the maximum value, \(\omega_{R_{i}}=\omega_{R}^{Max}\), it has to be desaturated or unloaded from the stored angular momentum. In order to accomplish this task, an external torque is generated to maintain the spacecraft attitude control while the rotor is despun. In this case, three orthogonal magnetic torquers, which are identified as \(M_{i}\) with \(i=1,2,3\), are placed inside the spacecraft and are aligned with the axes \(\mathbf{\hat{m}}_{1}\), \(\mathbf{\hat{m}}_{2}\), and \(\mathbf{\hat{m}}_{3}\). They generate a magnetic dipole, \(\mathbf{m}\), which interacts with the surrounding geomagnetic field, \(\mathbf{B}\), producing a net torque on the spacecraft body: \(\mathbf{t}_{M}=\mathbf{m}\times\mathbf{B}\). This study considers a spacecraft orbiting in LEO with various attitude modes. Inertial pointing, nadir pointing, target tracking, and velocity dumping modes are considered in this research study. The spacecraft attitude dynamics are described with [PERSON]'s equation for rigid body motion, which is expressed in the body reference frame, \(B\), with origin in \(O_{B}\). The spacecraft's body axes are denoted as \(\mathbf{\hat{b}}_{1}\), \(\mathbf{\hat{b}}_{2}\), and \(\mathbf{\hat{b}}_{3}\). The attitude of the spacecraft is referenced to an Earth-centered inertial (ECI) frame, \(I\), through the attitude matrix, \(\mathbf{A}\), which is parametrized in terms of the quaternion, \(\mathbf{q}\). The spacecraft orbital position is represented in \(I\) by the radius vector \(\mathbf{r}\), which is associated to the inertial axes \(\mathbf{\hat{x}}\), \(\mathbf{\hat{y}}\) and \(\mathbf{\hat{z}}\). The complete problem setting is reported in Figure 1.  
Assuming the spacecraft has a constant inertia matrix, \(\mathbf{I}\), we can express the spacecraft attitude dynamics as:  
\[\mathbf{I}\dot{\boldsymbol{\omega}}+\boldsymbol{\omega}\times(\mathbf{I} \boldsymbol{\omega}+\mathbf{R}\mathbf{h}_{R})=-\mathbf{R}\mathbf{\hat{h}}_{R}+ \mathbf{t}_{M}+\mathbf{t}_{D}, \tag{1}\]  
where \(\boldsymbol{\omega}\) is the spacecraft's angular velocity expressed in the \(B\) frame, \(\mathbf{t}_{D}\) is the environmental disturbance torque, \(\mathbf{t}_{M}\) is the previously mentioned magnetic control torque, \(\mathbf{R}\) and \(\mathbf{h}_{R}\) are the reaction wheels' configuration matrix and vector of angular momenta, respectively. It is evident from Equation (1) that the reaction wheels do not produce a net torque on the spacecraft, but they only exchange angular momentum with it.