Research on Sun-Oriented Spin-Stabilized Attitude Control of Micro/Nano Satellite Using Only Magnetic Control

: Sun-oriented attitude control is one of the most important attitude control modes for most micro/nano satellites, which directly affects the on-orbit energy acquisition. Therefore, it is of great importance to use the simplest sensors and actuators and the most reliable algorithm to achieve sun-oriented attitude control. A sun-oriented spin-stabilized attitude control method for micro/nano satellites using only magnetic control is proposed in this paper, in which the control progress is divided into four phases: initial damping phase, sun-aligned phase, spin-up phase, and spin-stabilized phase. The inﬂuence of the shadow zone of the orbit, offset installation of sun sensor and solar panel, limitation of the ﬁeld of view of the sun sensor, and environmental disturbance torques are all considered in the proposed method. The control performance is evaluated by numerical simulations, and the simulation results show that the proposed method is applicable to the satellite equipped with a sun sensor and a 3-axis magnetometer as attitude sensors and three magnetic torquers installed orthogonally as attitude actuators. The proposed method is applicable to most Earth-orbit satellites for which the geomagnetic ﬁeld can provide sufﬁcient attitude control torque.


Introduction
In recent years, with the development of information technology, microelectromechanical systems (MEMSs), new material technology, and high-end manufacturing, the global micro/nano satellite industry is growing rapidly and showing a "blowout" development momentum [1].Micro/nano satellites generally refer to satellites weighing between 1 and 100 kg [2][3][4].Due to their advantages, such as small size, light weight, low cost, flexible mobility, short development cycle, and ease to launch in batches, etc. [5][6][7][8], micro/nano satellites have become one of the most important directions of current space technology development [9].More recently, micro/nano satellites have begun to transform from technical experiments to business operations and have gradually replaced part of traditional large satellites [10].Micro/nano satellites have a very broad development prospect and have been widely used in many fields, such as remote sensing imaging, electronic reconnaissance, satellite communication, satellite navigation, environmental detection, and technical experiment [2,[11][12][13].
For most micro/nano satellites, due to the limitations of size, cost, etc., the solar panel is fixed on the main body of the satellite and cannot be rotated.Therefore, it can only rely on the attitude determination and control system (ADCS) of the satellite to continuously adjust the satellite attitude and keep the solar panel pointing to the sun.Generally, in order to ensure a sufficient and reliable energy supply of the onboard system, the satellite needs to maintain a sun-oriented attitude for most of the time in orbit.As one of the most important satellite attitude control modes, the sun-oriented attitude is a specific satellite attitude where a certain vector fixed to the satellite is aligned with the solar vector, i.e., the unit vector pointing from the center of mass of the satellite to the sun.In many cases, whether a stable and reliable sun-oriented attitude can be achieved directly determines the success or failure of the flight mission.Therefore, it is of great importance to study how to use the simplest sensors and actuators and the most reliable algorithm to achieve the sun-oriented attitude, especially for the case that star sensor, reaction wheel, and other devices are malfunctioned.
Many studies related to sun-oriented attitude control have been carried out, and a lot of valuable research results have been obtained [14][15][16][17][18][19][20][21].As early as 1970, E Birkhold et al. [14] studied active magnetic attitude control of the spinning sun-oriented satellite.A magnetometer and a sun sensor were selected as attitude measurement devices, and a magnetic coil installed around the spin axis was used to generate the control torques.In addition, nutation dampers were used to dampen the wobble of the satellite's spin axis.The method is simple and has low power consumption and can be used to control the satellite to achieve a sun-oriented spin-stabilized attitude.Since then, many sun-oriented attitude control methods have been proposed.For example, in 2002, G Falbel et al. [15] proposed a spin-stabilized attitude control algorithm for CUBESAT, which is a picosatellite developed by Stanford University and the California Polytechnic State University for space experiments.CUBESAT is equipped with two orthogonal magnetic torquing coils and a CO 2 high-pressure cartridge as attitude actuators and a 2-axis sun sensor as the attitude sensor.The proposed algorithm is used to control CUBE-SAT to maintain a spin-stabilized attitude, even during the shadow zone of the orbit.In 2007, J Luo [16] designed a spin-stabilized attitude control method for solar sail spacecraft and studied the method of generating spinning angular rate.In addition, the attitude control characteristics of the proposed method were simulated and analyzed.In 2012, aiming at the spin-stabilized satellite equipped with three magnetic coils or torque rods as attitude actuators, HS Ousaloo et al. [17] studied the control strategies of each attitude actuator.In 2019, a novel passive sun-oriented control method using solar radiation pressure torques was proposed by H Nakanishi et al. [18], which can be used as a low-cost backup for emergencies.In the same year, X Xia et al. [19] proposed a sun-oriented spin-stabilized attitude control method based on pure magnetic control for the satellite equipped with a sun sensor and a magnetometer as attitude sensors and three magnetic torquers (MTQs) as attitude actuators.The modification of the above method is also investigated in [20].In 2020, in view of the satellite in the sun-synchronous dawn-dusk orbit, S Liu et al. [21] proposed an attitude control method from the perspective of minimal system configuration for sun orientation.The method makes full use of the satellite's orbit characteristics and achieves the sun-oriented spin-stabilized attitude by using the pitch-axis spin-up method.However, most of the existing attitude control methods for sun orientation do not consider the influence of the shadow zone of the orbit, offset installation of sun sensor and solar panel, limitation of the field of view of the sun sensor, environmental disturbance torques, and other factors that may affect the performance of the attitude control.Therefore, the application scope of these methods is limited.
Based on the above discussions, we focus on the sun-oriented spin-stabilized attitude control for micro/nano satellites using only magnetic control.The proposed method is motivated by [19,20] while the influence of the shadow zone of the orbit, offset installation of the sun sensor and solar panel, limitation of the field of view of the sun sensor, and environmental disturbance torques are all considered in the proposed method.Different from the traditional spin-stabilized satellites (their spinning angular rate is generally as high as tens of revolutions per minute, even hundreds of revolutions per minute [22]), the proposed method can be applied to the case that the satellite spins at a relatively low angular rate (about several degrees per second).The proposed method is applicable to most Earth-orbit satellites for which the geomagnetic field can provide sufficient attitude control torque.The numerical simulation results show that the proposed method is applicable to the micro/nano satellite equipped with a sun sensor and a 3-axis magnetometer (TAM) as attitude sensors and three MTQs installed orthogonally as attitude actuators.In addition, the proposed method effectively guarantees the smooth implementation of satellite equipment debugging, energy acquisition, and other flight missions.Even in space exploration missions, the proposed method can be used as a good primary or backup solution for some phases of these missions [23][24][25][26].
The paper is organized as follows.In Section 2, the overview and mathematical model of micro/nano satellite's ADCS are introduced.Then, the sun-oriented spin-stabilized attitude control method is proposed in Section 3 including the rate filter design and the attitude controller design.The numerical simulation and results analysis are presented in Section 4. Finally, the conclusion is summarized in Section 5.

System Overview
The ADCS of the micro/nano satellite studied in this paper is composed of three parts: attitude sensors, attitude actuators, and an on-board computer (OBC) on which the ADCS control algorithm runs.
The attitude actuator of the ADCS consists of a 3-axis MTQs (here, three MTQs installed orthogonally were treated as one device).The attitude sensors of the ADCS consist of a TAM and a sun sensor.The ADCS control algorithm is responsible for generating the control command and recording all the necessary data of the ADCS.As shown in Figure 1, attitude sensors, attitude actuators, and OBC are connected via the controller area network (CAN) bus, which is an international standardized serial communication protocol.
magnetometer (TAM) as attitude sensors and three MTQs installed orthogonall attitude actuators.In addition, the proposed method effectively guarantees the sm implementation of satellite equipment debugging, energy acquisition, and other f missions.Even in space exploration missions, the proposed method can be used as a g primary or backup solution for some phases of these missions [23][24][25][26].
The paper is organized as follows.In Section 2, the overview and mathema model of micro/nano satellite's ADCS are introduced.Then, the sun-oriented s stabilized attitude control method is proposed in Section 3 including the rate filter de and the attitude controller design.The numerical simulation and results analysis presented in Section 4. Finally, the conclusion is summarized in Section 5.

System Overview
The ADCS of the micro/nano satellite studied in this paper is composed of three p attitude sensors, attitude actuators, and an on-board computer (OBC) on which the A control algorithm runs.
The attitude actuator of the ADCS consists of a 3-axis MTQs (here, three M installed orthogonally were treated as one device).The attitude sensors of the A consist of a TAM and a sun sensor.The ADCS control algorithm is responsible generating the control command and recording all the necessary data of the ADCS shown in Figure 1, attitude sensors, attitude actuators, and OBC are connected via controller area network (CAN) bus, which is an international standardized s communication protocol.

Kinematics and Dynamics Models
The mathematical model of satellite attitude motion contains a kinematics model a dynamics model [27].The coordinate systems used in this paper are first introdu where the Earth-centered inertial coordinate system is i i i i O X Y Z , and the micro/n satellite centroid inertial spindle coordinate system is

Kinematics and Dynamics Models
The mathematical model of satellite attitude motion contains a kinematics model and a dynamics model [27].The coordinate systems used in this paper are first introduced, where the Earth-centered inertial coordinate system is O i X i Y i Z i , and the micro/nano satellite centroid inertial spindle coordinate system is O b X b Y b Z b .The symbol T is used to denote the angular rate of the satellite relative to the inertial space, and the superscript b means that the vector is represented in The kinematics equation of the system is as follows and describes the relationship between the attitude quaternion Q bi and the angular rate ω b bi : where the square matrix H(Q bi ) is an orthogonal matrix, which satisfies In this paper, the micro/nano satellite is regarded as a rigid body.According to the angular momentum theorem, the satellite satisfies the following equation [27]: where J is the rotational inertia matrix of the satellite, and it is a positive definite matrix; ω b bi is the angular rate of the satellite relative to the inertial space; T MT is the control torque of the 3-axis MTQs, and d is the sum of the external disturbance torques acting on the satellite.This is the dynamics equation of the satellite, which mainly describes the relationship between the angular rate ω b bi and T MT , d.For the satellite centroid inertial spindle coordinate system O b X b Y b Z b , the rotational inertia matrix J has the following form: where J x , J y , and  3) is bounded; i.e., there always exists a constant ε ∈ + such that d ≤ ε.

Control Objective
For the satellite equipped with a sun sensor and a TAM as attitude sensors, the solar vector cannot be obtained in the shadow zone of the orbit, which makes it difficult to achieve a sun-oriented attitude in the shadow zone of the orbit.The spinning of the satellite provides an effective way to solve this problem [27].According to the angular momentum theorem, the orientation of the spin axis of the satellite in the inertial space will remain unchanged when the satellite is free from external torque or the external torque is small.Sun-oriented spin-stabilized attitude control is a specific satellite attitude control mode, in which the satellite spins around a given vector fixed to the satellite, and the spin axis is aligned with the solar vector at the same time; i.e., where e b is the given vector fixed to the satellite; S b t is the unit vector pointing from the satellite to the sun, and ω spin is a given spinning angular rate.

Sun-Oriented Spin-Stabilized Attitude Control
For the ADCS shown in Figure 1 with the simplest configuration, the sketch of the attitude control method proposed in this paper is shown in Figure 2, which can be used as the safe mode of the satellite.
The TAM installed on the main body of the satellite obtains the measured value of the geomagnetic field.Then, the output of the TAM is used by the rate filter to estimate the 3-axis angular rates of the satellite.According to the measurement data of the geomagnetic field and the estimated value of the satellite's 3-axis angular rates, the attitude controller calculates the control torque and transforms it into the control commands of the 3-axis MTQs.In addition, the measurement output of the sun sensor is also used to calculate the control torque.Finally, the magnetic torquers execute the generated control commands and then control the satellite to achieve the sun-oriented spin-stabilized attitude.
Electronics 2023, 12, x FOR PEER REVIEW 5 of 20 For the ADCS shown in Figure 1 with the simplest configuration, the sketch of the attitude control method proposed in this paper is shown in Figure 2, which can be used as the safe mode of the satellite.The TAM installed on the main body of the satellite obtains the measured value of the geomagnetic field.Then, the output of the TAM is used by the rate filter to estimate the 3-axis angular rates of the satellite.According to the measurement data of the geomagnetic field and the estimated value of the satellite's 3-axis angular rates, the attitude controller calculates the control torque and transforms it into the control commands of the 3-axis MTQs.In addition, the measurement output of the sun sensor is also used to calculate the control torque.Finally, the magnetic torquers execute the generated control commands and then control the satellite to achieve the sun-oriented spin-stabilized attitude.

Rate Filter Design
In this paper, a fast and rough rate filter is used to estimate the 3-axis angular rates of the satellite, which is a classical angular rate information estimation method [28].The rate filter belongs to a class of the extended Kalman filter (EKF), which uses the measured value of the TAM as input to estimate the 3-axis angular rates of the satellite.The rate filter is widely used in the aerospace field because of its advantages of less computation and stable operation [29].We next present the details of the rate filter.
The state vector of the rate filter is taken as the angular rate b bi ω of the satellite relative to the inertial space [30]:

Rate Filter Design
In this paper, a fast and rough rate filter is used to estimate the 3-axis angular rates of the satellite, which is a classical angular rate information estimation method [28].The rate filter belongs to a class of the extended Kalman filter (EKF), which uses the measured value of the TAM as input to estimate the 3-axis angular rates of the satellite.The rate filter is widely used in the aerospace field because of its advantages of less computation and stable operation [29].We next present the details of the rate filter.
The state vector x Rate ∈ 3 of the rate filter is taken as the angular rate ω b bi of the satellite relative to the inertial space [30]: where  axes, respectively [27].Discretizing the above equation by first-order accuracy schemes, the transition matrix Φ Rate ∈ 3×3 can be obtained: where ∆T is the sampling period of the filter.Denote the measured value obtained by the TAM at the current sampling time as Because the sampling period ∆T is small relative to the orbital period, the variation of the geomagnetic field vector at the location of the satellite in ∆T can be ignored.Therefore, it can be approximated that the difference between B b and B b prev is only affected by the attitude motion of the satellite.Let Θ ∆ = ∆T•ω b bi ∈ 3 be the vector expression of the rotation angle of the satellite in ∆T.Because the rotation angle is relatively small during ∆T, the direction cosine matrix C ∆ ∈ 3×3 corresponding to Θ ∆ can be approximated as [31]: where I 3 ∈ 3×3 is an identity matrix, and ω b bi × is a cross product matrix defined as follows: It then follows from ( 9) and ( 10) that: This is regarded as the measurement equation of the rate filter.Then, the measurement matrix H Rate ∈ 3×3 can be obtained: Finally, the 3-axis angular rates could be estimated according to the general EKF method [30].

Attitude Controller Design
The attitude controller of the proposed sun-oriented spin-stabilized attitude control method in this paper consists of four control phases: initial damping phase, sun-aligned phase, spin-up phase, and spin-stabilized phase.

Initial Damping Phase
Considering that the satellite may have uncertain angular momentum after separation from the vehicle (or losing attitude control for a long period of time), the satellite enters the initial damping phase first, during which the 3-axis MTQs work to slow down the 3-axis angular rates of the satellite.
In the initial damping phase, the desired control torque T c1 ∈ 3 outputted by the controller is given by the following equation: where K 1 is the control coefficient greater than zero.The first part of T c1 is used to slow down the 3-axis angular rates of the satellite, and the second part is used to eliminate the effects of angular rate coupling of different axes.
The desired control torque T c1 will be outputted by the 3-axis MTQs, and then the objective of angular rate damping is realized.When the 3-axis angular rates are damped near 0 • /s, the controller enters the next phase, namely the sun-aligned phase.

Sun-Aligned Phase
After completing angular rate damping, the satellite enters the sun-aligned phase.During this phase, the satellite is controlled to converge to the state that the optical axis of the sun sensor is aligned with the solar vector by using the measurement data of the sun sensor.
Because 3-axis MTQs can only output the control torque perpendicular to the geomagnetic field vector, the attitude maneuvering ability of the satellite is insufficient.Therefore, at the beginning of the sun-aligned phase, the control law of the initial damping phase continues to be used to search the sun slowly while damping the angular rate of the satellite, until the sun enters the sun sensor's field of view.
When the sun enters the field of view of the sun sensor, motivated by [32], the desired control torque T c2 ∈ 3 outputted by the controller is designed as follows: where K 2 , K 3 , and K 4 are the control coefficients, and all of them are greater than zero; e b s represents the unit vector along the optical axis of the sun sensor, which is determined by the installation angle of the sun sensor; S b is the unit vector pointing from the satellite to the sun measured by the sun sensor at the current sampling time, and S b prev is the unit vector pointing from the satellite to the sun measured by the sun sensor at the previous sampling time.The main objective of the control torque T c2 is to align the optical axis of the sun sensor with the sun.The first part of T c2 is used to make sure that e b s is aligned with S b .The second part and the third part are used to dampen the angular rate component perpendicular to S b .The fourth part is used to eliminate the effects of angular rate coupling of different axes.It should be noted that if the field of view of the sun sensor is larger than 90 • , the first part of T c2 can be modified to: where β is the angle between the vectors e b s and S b .Then, the desired control torque T c2 will be outputted by the 3-axis MTQs.When the angle between the vectors e b s and S b is close to 0 • , the controller enters the next phase, namely the spin-up phase.

Spin-Up Phase
During this phase, since the sun sensor's optical axis is already roughly aligned with the sun, the satellite is controlled so that the designated plane of the satellite (e.g., solar panel plane) is perpendicular to the solar vector, and the satellite begins to spin-up around the normal vector of the designated plane.The desired control torque T c3 ∈ 3 outputted by the controller is given by the following equation: where K 5 , K 6 , K 7 , and K 8 are positive control coefficients; e b p represents the unit normal vector of the designated plane, and ω spin is a given spinning angular rate.In contrast to T c2 , whose control objective is to align e b s with the solar vector, the control objective of T c3 is to align e b p with the solar vector and make the satellite spin around e b p .Similar to the sun-aligned phase, if the angle between the vectors e b p and S b is larger than 90 • , the first part of T c3 can be modified by referring to Equation (16).In particular, in order to obtain a better control effect, when the angle between e b s and e b p is large relative to the field of view of the sun sensor, the spin-up phase can be divided into two subphases.In the first subphase, the normal vector of the designated plane is controlled to align with the solar vector.Then, the satellite is controlled to spin up in the second subphase.
The control scheme designed in this paper, which first makes the optical axis of the sun sensor align with the sun and then makes the normal vector of the designated plane align with the sun, can significantly improve the reliability and stability of satellite attitude control in the case of limitation of the field of view of the sun sensor.
Then, the desired control torque T c3 will be outputted by the 3-axis MTQs.When the angle between the vectors e b p and S b is close to 0 • , and the deviation between the estimated value of the satellite's 3-axis angular rates and ω spin S b is near to 0 • /s, the controller enters the next phase, namely the spin-stabilized phase.However, if the satellite flies into the shadow zone of the orbit during this phase, it needs to return to the sun-aligned phase.

Spin-Stabilized Phase
In this phase, when the satellite is in the sunlit zone of the orbit, the calculation formula of the desired control torque T c4 ∈ 3 is the same as that of T c3 , i.e., Equation (17).When the satellite is in the shadow zone of the orbit, due to the angular momentum along the spin axis of the satellite, the sun-oriented attitude is maintained during the shadow zone of the orbit, so that the normal vector of the designated plane is aligned with the solar vector as the satellite returns to the sunlit zone of the orbit.In order to ensure that the spinning angular rate of the satellite is always near the given value ω spin , the desired control torque of the controller during the shadow zone of the orbit is given by the following equation: where K 9 is the control coefficient larger than zero.Then, the desired control torque T c4 will be outputted by the 3-axis MTQs.
We next prove the stability of the closed-loop system with the proposed control method and the attitude control of the sunlit zone of the orbit in the spin-stabilized phase is taken as an example without loss of generality.The control errors of the controller (17) are defined as: Theorem 1.Consider the attitude control system of the microsatellite described by the nonlinear dynamics (3) and the controller (17).Suppose that Assumption 1 holds and the initial conditions of the controller satisfy e 2 < ε K 8 min(J x ,J y ,J z ) , the control error e 2 is uniformly ultimately bounded (UUB).
Proof of Theorem 1.The proof is based on the Lyapunov stability theory.Define a candidate Lyapunov function for e 1 and e 2 as: The unit vector S b satisfies S b = C b i S i , where C b i is the direction cosine matrix between coordinate systems O i X i Y i Z i and O b X b Y b Z b , and S i is the solar vector represented in the coordinate system O i X i Y i Z i .The approximation is that Ṡi = 0, and then we obtained that Ṡb = S b × ω b bi [31].Then, According to Equations ( 3) and ( 17), it follows that: Substituting ( 22) into ( 21), we obtain: where S b prev × S b can be approximately written as: Obviously, it follows that ω b bi At the same time, according to the cross product rule, we know that e b p It follows that V(t) < 0 if e 2 > ε K 8 min(J x ,J y ,J z ) .Therefore, V(t) is strictly monotonous decreasing when e 2 is outside the region D e 2 e 2 ≤ ε K 8 min(J x ,J y ,J z ) , and ultimately ensures that e 2 enters the region D. Once e 2 enters the region D, we know that e 2 will remain in the region D afterward according to the fact that V(t) < 0. Therefore, it can be concluded that the control error e 2 is UUB and will eventually converge to the region D [33].It can be then proven that e 1 is also bounded.In practical applications, the upper bound of the control errors can be controlled in an acceptable range by selecting appropriate control coefficients.To this end, the proof is completed.

Control Command Generation
Based on the desired control torque output by the attitude controller, the expected magnetic moment M ∈ 3 outputted by the 3-axis MTQs can be calculated by the following equation: where T c is the desired control torque outputted by the attitude controller; i.e., T c1 , T c2 , T c3 , or T c4 , and α is the angle between the vectors B b and T c .Finally, the magnetic moment M will be transformed into the control commands that the 3-axis MTQs can execute, and then the objective of the attitude controller is realized.In summary, after the accomplishment of the initial damping phase, the sun-aligned phase, and the spin-up phase, the satellite finally enters the spin-stabilized phase, which is the long-term operating mode of the satellite.The detailed control flow of the sun-oriented spin-stabilized attitude control method proposed in this paper is shown in Figure 3.

Numerical Simulation
In order to verify the effectiveness of the proposed control method, the numerical simulation analysis is performed by using MATLAB Simulink.The closed-loop simulation program consists of the onboard software module and the satellite model module.The onboard software module is used to simulate the ADCS software that  The control period is set to be 0.5 s in the simulation.The attitude controller of the proposed method in this paper has 9 control coefficients in total, and their values used in the simulation are shown in Table 2.
Table 2.The control coefficients of the controller in the simulation.

Control Coefficient
Value The simulation results of the sunlight occlusion where the satellite is located and the satellite control phase are shown in Figure 4.The initial damping phase lasts for nearly 1130 s.The 3-axis angular rates of the satellite are between −0.2 • /s and 0.2 • /s at the end of this phase (Figure 5a).Then, ADCS enters the sun-aligned phase and begins to search for the sun.At about 3060 s, the sun enters the field of view of the sun sensor (Figure 6a).After about 130 s, ADCS enters the spin-up phase and begins to spin up around the −O b Y b axis.However, the satellite flies into the shadow zone of the orbit at 3980 s, and the satellite must return to the sun-aligned phase.At 6370 s, the sun enters the field of view of the sun sensor again (Figure 6a).After a series of attitude control, the satellite finally enters the spin-stabilized phase at about 9170 s, which is the long-term operating mode of the satellite.The simulation results show that the satellite can keep the sun-oriented attitude steadily after entering the spin-stabilized phase.Most notably, with the difference of satellite characteristic parameters, orbit parameters, initial attitude, and control coefficients, the variation curve of the control phase will be different.
satellite must return to the sun-aligned phase.At 6370 s, the sun enters the field of view of the sun sensor again (Figure 6a).After a series of attitude control, the satellite finally enters the spin-stabilized phase at about 9170 s, which is the long-term operating mode of the satellite.The simulation results show that the satellite can keep the sun-oriented attitude steadily after entering the spin-stabilized phase.Most notably, with the difference of satellite characteristic parameters, orbit parameters, initial attitude, and control coefficients, the variation curve of the control phase will be different.O Z -axis components of the solar vector have obvious oscillations, which is mainly due to the nutation of the satellite while spinning.Especially in the shadow zone of the orbit, the satellite cannot obtain the solar vector and control the direction of the spin axis, so nutation becomes more intense during this period.Figure 7 shows the control torque outputted by the 3-axis MTQs.When the satellite flies from the shadow zone to the sunlit zone, the control torque increases to reduce the satellite nutation.Figure 6 shows the solar vector measured by the sun sensor and the true solar vector; both are represented in the coordinate system O b X b Y b Z b .The O b X b -axis and O b Z b -axis components of the solar vector have obvious oscillations, which is mainly due to the nutation of the satellite while spinning.Especially in the shadow zone of the orbit, the satellite cannot obtain the solar vector and control the direction of the spin axis, so nutation becomes more intense during this period.
Figure 7 shows the control torque outputted by the 3-axis MTQs.When the satellite flies from the shadow zone to the sunlit zone, the control torque increases to reduce the satellite nutation.

Conclusions
A sun-oriented spin-stabilized attitude control method using only magnetic control is proposed in this paper, in which the control progress is divided into four phases: initial damping phase, sun-aligned phase, spin-up phase, and spin-stabilized phase.The advantages of the control method proposed in this paper are reflected in three aspects.The control error at steady state, i.e., the angle between the solar vector and the −O b Y b axis, is shown in Figure 8.The angle begins to increase gradually when the satellite flies into the shadow zone of the orbit and decreases when the satellite flies into the sunlit zone of the orbit.The error angle is basically within 10 • in the sunlit zone of the orbit, which meets the basic flight mission requirements of most satellites, such as energy acquisition.However, in the shadow zone of the orbit, the maximum error angle reaches about 20 • .This is because the angle between the solar vector and the −O b Y b axis cannot be measured in the shadow zone.At the same time, it should be noted that the control error may vary with the satellite's characteristic parameters, orbital parameters, initial attitude, and control coefficients.

Conclusions
A sun-oriented spin-stabilized attitude control method using only magnetic control is proposed in this paper, in which the control progress is divided into four phases: initial damping phase, sun-aligned phase, spin-up phase, and spin-stabilized phase.The advantages of the control method proposed in this paper are reflected in three aspects.

Conclusions
A sun-oriented spin-stabilized attitude control method using only magnetic control is proposed in this paper, in which the control progress is divided into four phases: initial damping phase, sun-aligned phase, spin-up phase, and spin-stabilized phase.The advantages of the control method proposed in paper are reflected in three aspects.Firstly, it can realize the sun-oriented attitude in the presence of the shadow zone of the orbit, which overcomes the shortcomings that most of the existing studies can only be applied to the dawn-dusk orbit.Secondly, the proposed method only uses an offset-installed sun sensor with a limited field of view to measure the solar vector, which makes most of the satellites meet the conditions for the application of the method.Thirdly, a detailed control process from the initial damping phase to the spin-stabilized phase is designed in the proposed method, which greatly improves the practicability of the method.The proposed control method is applicable to most Earth-orbit satellites for which the geomagnetic field can provide sufficient attitude control torque and can control the satellite to achieve the sun-oriented attitude from any initial state.The simulation results show that the proposed method effectively ensures the smooth implementation of satellite equipment debugging, energy acquisition, and other flight missions.
used to denote the angular rate of satellite relative to the inertial space, and the superscript b means that the vect represented in the coordinate system b b b b O X Y Z .The kinematics equation of the system is as follows and describes the relation between the attitude quaternion bi Q and the angular rate b bi ω :

Assumption 1 :
z are the rotational inertia of the satellite around O b X b , O b Y b , and O b Z b axes, respectively.This paper focuses on attitude control under bounded external disturbance torques.Therefore, d satisfies the following assumption: The sum of the external disturbance torques d in (

Figure 2 .
Figure 2. Sketch of the sun-oriented spin-stabilized attitude control method.
the dynamics model (3) into component expression gives:

Figure 2 .
Figure 2. Sketch of the sun-oriented spin-stabilized attitude control method.
ω x , ω y , and ω z are the components of ω b bi along O b X b , O b Y b , and O b Z b axes, respectively.Expanding the dynamics model (3) into component expression gives: where, T MT,x , T MT,y , and T MT,z are the components of T MT along O b X b , O b Y b , and O b Z b axes, respectively, and d x , d y , and d z are the components of d along O b X b , O b Y b , and O b Z b

∈ 3 .
and denote the measured value obtained by the TAM at the Electronics 2023, Then, the measurement vector Z Rate ∈ 3 of the rate filter is taken as the difference between two adjacent measured values of the TAM:

S
Is the satellite in the sunlit zone , and is the s un sensor's output valid?bIs the angle between the vectors and close to 0°, and is the deviation between and near to 0°/s?

Figure 3 .
Figure 3.The control flow chart of the sun-oriented spin-stabilized attitude control method.

Figure 3 .
Figure 3.The control flow chart of the sun-oriented spin-stabilized attitude control method.

Figure 4 .
Figure 4.The variation curve of the sunlight occlusion where the satellite is located and the satellite control phase.

Figure 20 Figure 5 .
Figure The variation curve the sunlight occlusion where the satellite is located and the satellite control phase.Electronics 2023, 12, x FOR PEER REVIEW 16 of 20

Figure 5 .
Figure 5. Simulation results of (a) 3-axis angular rates of the satellite estimated by rate filter; (b) angular rates estimation errors of rate filter.Figure 5. Simulation results of (a) 3-axis angular rates of the satellite estimated by rate filter; (b) angular rates estimation errors of rate filter.

Figure 6 .Figure 6
Figure 6.Measured (a) and true (b) solar vectors.The 3-axis angular rates of the satellite estimated by the rate filter and its estimation errors are shown in Figure 5.According to statistics, the mean value and standard deviation of rate filter estimation errors are [ ] 0.00105 0.134 0.00388 s − − − 

Figure 6 .
Figure 6.Measured (a) and true (b) solar vectors.The 3-axis angular rates of the satellite estimated by the rate filter and its estimation errors are shown in Figure 5.According to statistics, the mean value and standard deviation of rate filter estimation errors are [−0.00105−0.134 −0.00388] • /s and [0.0797 0.0785 0.0681] • /s.Figure6shows the solar vector measured by the sun sensor and the true solar vector; both are represented in the coordinate system O b X b Y b Z b .The O b X b -axis and O b Z b -axis components of the solar vector have obvious oscillations, which is mainly due to the nutation of the satellite while spinning.Especially in the shadow zone of the orbit, the satellite cannot obtain the solar vector and control the direction of the spin axis, so nutation becomes more intense during this period.Figure7shows the control torque outputted by the 3-axis MTQs.When the satellite flies from the shadow zone to the sunlit zone, the control torque increases to reduce the satellite nutation.

Figure 7 .
Figure 7.Control torque outputted by 3-axis MTQs.The control error at steady state, i.e., the angle between the solar vector and the b b O Y − axis, is shown in Figure 8.The angle begins to increase gradually when the satellite flies into the shadow zone of the orbit and decreases when the satellite flies into the sunlit zone of the orbit.The error angle is basically within 10  in the sunlit zone of the orbit, which meets the basic flight mission requirements of most satellites, such as energy acquisition.However, in the shadow zone of the orbit, the maximum error angle reaches about 20  .This is because the angle between the solar vector and the b b O Y −axis cannot be measuredin the shadow zone.At the same time, it should be noted that the control error may vary with the satellite's characteristic parameters, orbital parameters, initial attitude, and control coefficients.

Figure 8 .
Figure 8. Angle between the solar vector and the

Figure 8 .
Figure 8. Angle between the solar vector and the

Figure 8 .
Figure 8. Angle between the solar vector and the −O b Y b axis.