Sun-Pointing Attitude Control Scheme for Magnetic-based Satellite

— For some low-orbit satellites, SADA (solar array drive assembly) is not necessary but steady sun-pointing is required. Magnetic-based attitude control schemes are adopted by more and more low-cost low-orbit satellites and magnetic-based sun-pointing attitude control schemes have been proposed for various satellites. For magnetic Attitude Determination and Control System (ADCS), magnetometer and magnetic torquer are the core ADCS components while sun sensor and gyro, which would be employed to determine or estimate sun vector, are important ones. Due to the underactuated characteristics, magnetic attitude control torque could not stabilize the full attitude but the two components of the attitude, simultaneously, which means that magnetic attitude control effort could orientate the solar panels to the Sun. A Lyapunov function, combining the rotational energy and sun angle, is formulated and a PD-type sun-pointing attitude control scheme is proposed to meet the requirements corresponding to sun-pointing task. Further, the effectiveness of the PD-type sun angle-based magnetic attitude control scheme, composed of proportional term, damping term and spinning term, has been verified by use of Lyapunov direct method. Simulations show that, the proposed PD-type attitude control scheme is a suitable sun-pointing scheme for magnetic satellites.

to point at the Sun. However, due to the existence of attitude error and disturbance, sun angle could not be stabilized at a smaller scale.
Spinning motion would generate a gyroscopic stiffness, which is benefit to enhance the attitude control capability to resist the influence induced by attitude error or attitude disturbance. For the spin satellites, control effort corresponding to the spin axis should be provided by the on-board actuators and thrusters, magnetic torquers are commonly employed. Many satellites developed in early years and several satellites developed recently adopted the common spin-stabilized attitude control scheme [21, 29~33]. Adequate attitude control schemes for spin satellites have been researched [22~28]. For magnetic sun-pointing attitude control schemes, adding a spinning control torque could generate a gyroscopic stiffness and spin motion of the satellite is benefit to orientate the solar panel to the Sun. The under-actuated axis corresponding to magnetic control torque would change along with the orbital motion and the corresponding attitude disturbance would be absorbed or depressed by the gyroscopic stiffness.
As to Ref. [18][19][20], the proposed sun-pointing control schemes combined PD control technique and spin motion, which could achieve sun-pointing effect. However, these schemes are designed according to engineering experience, and no literature has proposed the controllability and stability proofs of the attitude control schemes. In this paper, magnetic-based control sunpointing attitude control schemes are proposed to meet the requirements of spin-free satellites and spin satellites, and the corresponding controllability and stability proofs have been proposed. Mathematics models for attitude motion and magnetic torque are introduced in section 2. In section 3, a PD-type attitude control scheme is designed for sun pointing and the effectiveness corresponding to the proposed control scheme is proved by use of Lyapunov direct method. In the end, a set of simulation results are exhibited to verify the designed fully magnetic-based sun-pointing attitude control schemes.

II. MATHEMATICS MODELS FOR ATTITUDE MOTION
For low-cost LEO NanoSats, active magnetic-based attitude control schemes are required and sun-pointing attitude control scheme is required, too. The corresponding ADCS components are mainly magnetometers, sun sensors and magnetic torquers.

A. Attitude Dynamic Mathematics Model
For the momentum-free satellites, the dynamical model could be described in the following form [34], (1) where MC is the attitude control torque vector and II is the inertial tensor of the satellite.

B. Magnetic-based Attitude Control Torque Model
For the geomagnetic field vector Bb and the dipole moment m, the corresponding actual control torque, named as MC, is, (3) where Bb is the geomagnetic vector described in the body-fixed frame and m is the dipole moment corresponding to the magnetic torquers.
When the desired control torque Me is determined by the adopted attitude control law, according to the relative relationships between the vectors, vector m could be solved as, By substituting Equation (4) into Equation (3), the actual control torque MC could be generated. Obviously, MC is perpendicular to Bb while Me is not necessarily perpendicular to Bb. Relationship between MC and Me could be described as,

C. Mathematics Derivations
Along the meridian lines, the geomagnetic field changes periodically with a 2ω0 frequency, where ω0 is the frequency corresponding to orbital motion. For the satellites in orbits, the change rate of the measured geomagnetic field vector is similar to 2ω0. Generally speaking, 2ω0 is far below the satellite's actual angular velocity, i.e., 2ω0<<ω. In this case, one has, is the absolute derivative (corresponding to inertial space) and ( ) / t    is the relative derivative (corresponding to orbital space).
According to the previous equation, one could get the relationship between b B  , Bb and ω, which could be described as, In addition, the change rate of Sb could be approximately written as, where Sb and Sb are the sequential measured Sun vectors and ΔT is the sampling interval corresponding to the attitude sensors.
In a similar manner, the change rate of Bb could be approximately written as, where Bb and Bb are the successive measured Sun vectors.
According to the rules of vector cross multiplication, the following equations hold.

III. MAGNETIC-BASED SUN POINTING CONTROL LAWS FOR SPIN SATELLITE
Since the Lyapunov function-based sun-pointing control scheme could not be suitable to every scenario, novel attitude control scheme should be proposed to further enhance the satellite's sun-pointing capability.

A. Extended Lyapunov function
The included angle between the solar panel and the sun vector is, The change rate of sun angle could be approximately written as, where the angles ε and εare the successive measured sun angles, and ΔT is the control cycle (sampling time interval).
In the previous equations, inverse cosine function has been adopted, which submerged the relationship between sun angle and the vectors, i.e., VS and Sb. To describe sun angle ε and its changing trend simply and distinctly, one could pick up the following expression to denote the sun angle, (13) where f(ε) = (1-cosε) = 2sin 2 (ε/2) and the corresponding monotonicity is consistent with that of sun angle in the range of [0, π]. When sun angle approaches to zero, f(ε) would be approached to zero, too. While if sun angle changes to π, f(ε) would be close to 2. Obviously, f(ε) could be used to substitute sun angle ε.
Since the magnetic-based control torque is under-actuated, sun-pointing attitude control effort may drive the satellite rotate around the sun vector. To avoid this drawback, the designed sun-pointing attitude control law should contain damping term to suppress the spin rate. B-dot damping algorithm, a classic and commonly adopted magnetic-based de-tumbling attitude control algorithm, is developed based on the fact that the kinetic energy could be reduced gradually.
In the derived process of B-dot algorithm, the classic Lyapunov function is picked up as the satellite's rotational kinetic energy J, which could be written as [34], The control effort corresponding to B-dot algorithm is dedicated to reduce the rotational kinetic energy to a low-scale one. To orientate the solar panel pointing to the Sun, sun angles should be fed back to construct energy function. To enhance sun pointing performance, the target angular velocity should not be zero. Therefore, the corresponding Lyapunov function could be constructed as, where the targeted angular velocity is ω0 and k is the coefficient that is used to adjust the influence of sun angle.
B. PD-type Sun-pointing Attitude Control Scheme To reduce the sun angle, a PD control law could be developed as [17], According the expected control torque, the desired dipole moment could be determined as, The commanded dipole moment would be limited according to the available capability. That means, when the magnitude of the obtained dipole moment is larger than the nominal one, the magnetic torquers would output the nominal dipole moment.
Generally speaking, the commands corresponding to Equation (18) could guarantee sun-pointing. Though the desired control effort has no component in Bb direction, the changeable Bb would reduce the corresponding negative influence. However, when the attitude determination accuracy is poor, the measured sun vector would be obviously deviate from the true one and. Similarly, the measured sun angles, the desired control torque and the resulted dipole moment would be more different from the desired one, which would cause the sun angle not to converge or even cause the satellite to rotate. Fig. 1 Sketch of the desired control torque corresponding to the proposed PD-type attitude control laws However, according to Equation (3) and Equation (4), the torque Me, determined in Equation (17), could be implemented completely due to the characteristic of the magnetic-based control scheme (illustrated in Fig. 1(a)). In this case, the component Me||, which is parallel with Bb, could not be implemented. When Me⊥ is parallel with VS, the satellite would spin around the normal direction of the solar panel and sun angle would be out of control due to the corresponding gyroscopic stiffness. To avoid this, an option is to introduce another vector, which is difference from Me determined in Equation (17), to the control law. In addition, to guarantee sun angle be small, spinning the satellite to a specified angular velocity is a better option for the gyroscopic stiffness would enhance the capability to resist attitude error and disturbance. Therefore, the ideal attitude control law (illustrated in Fig. 1(b)) could be proposed as, where the first term is used to reduce the sun angle, the second term is adopted to provide the damping effort and the third term is added to control the angular velocity, which would enhance the gyroscopic stiffness. The coefficients, k10, k20, k30, are positive quantities.
Even in the case that the satellite spins around Bb, since Bb changes along with the orbit, the corresponding control effort would guarantee sun-pointing quickly as usual.
In fact, the actual magnetic-based control torque MC is different from the expected control torque Me. The inner relationship between the two vectors could be described as, Substituting Equation (20) into Equation (16) yields, Let, C. Analysis for Cross Product of Tri-vectors Firstly, two propositions are proposed.

Proof.
We would discuss this problem in three-dimensional space.
Therefore, one could have, End of the proof.

Proof.
We would discuss this problem in three-dimensional space.
Let three unit vectors, a, b and c, be illustrated in the following figure. Unit vector d=(b×c)×[a×(b×c)]/||(b×c)×[a×(b×c)]|| is the projection of vector a in the plane determined by b and c. The case corresponding to cos -1 (b·d)+cos -1 (c·d)=cos -1 (b·c) means that vector d lies in the region surrounded by b and c while the case of cos -1 (b·d)+cos -1 (c·d)>cos -1 (b·c) means that vector d lies outside of the corresponding region.
The corresponding included angles are denoted in this figure. According geometric knowledge, it is easy to get, where Δ is the difference between α0 and α, and α=α0+Δ.
In the previous equation, the magnitude of all the angles are less than 180deg and β0 is obviously an acute angle. In addition, it is easy to get that when β<0, α would be an acute angle, too. That means that vector c could not influence the validity of Equation (27). Without loss of generality, the following discussion would set β be an acute angle. In these cases, angle difference Δ is a positive quantity, and therefore, Equation (26) When cos -1 (b·d)+cos -1 (c·d)>cos -1 (b·c), vector d lies outsides the region surrounded by vector b and vector c in the plane determined by vector b and vector c.
As shown in the case (C) and case (D). Since angle difference Δ is a negative quantity, and therefore, from Equation (26), one could get, cos cos sin sin cos cos cos cos cos cos cos cos Rewritten the cosine function into the dot product form, for case (A) and case (B), one could have, In the similar manner, as for case (C) and case (D), one could have, End of the proof.
Lema 1: for the cases that the included angle between a and b is an acute angle, when the coefficient k is selected properly, [(a·b)-(a·c)·(b·c)]-k(a·b)<0 (k>1) always holds. While for the cases that the included angle is an obtuse angle, the mentioned expression is never true.

Proof.
According to the above analysis, this problem would be divided into 4 cases, which are illustrated in Fig.4. According to the above discussed, suppose that the included angle between vector a and vector b is an acute angle (corresponding to the discussed case (A) and case (D)) and a proper positive k (k>1) is picked up, [(a·b)-(a·c)·(b·c)]-k(a·b)<0 always holds. While for the case (B) and case (C), the included angle between a and b is an obtuse angle. Specifically, in case (B), the expression is never true, while in case (C), the expression is true only when a proper k (0<k<<1) is picked up.
End of the proof.

D. Feasibility Analysis for Spinning-based Sun-pointing Attitude Control Scheme
Revisiting Equation (19), one could find that some basic conclusions.
For the first term in Equation (19), since it is devoted to reducing sun angle, under the corresponding control effort, sun angle would be more and more close to zero. The third term in Equation (19) would control the angular velocity to the specified one, which would enhance the satellite's gyroscopic stiffness to resist attitude disturbance. For the second term in Equation (19), which is adopted to prevent the satellite rotating around Bb. This term would act as the damping term in the proposed attitude control law, and the corresponding control effort is used to ensure the stabilization of the attitude control process.
The third term in right hand of Equation (23) is devoted to controlling the angular velocity to the specified one and it could be rewritten as, Under the corresponding attitude control effort, the angular velocity would approach the specified one, that means, ω→ω0 holds. Along with the advancement of the attitude control process, the included angle between ω and ω0 would be an acute angle.
The first term in right hand of Equation (23) could be expanded as, Considering T S b V S  firstly, it is easy to get, According to Equation (19), one could find that, at the beginning of the sun-pointing attitude control process, ε is a big one, which would be depressed by the corresponding attitude control effort. That means, both ε<ε and cosε>cosε hold and T

S b
V S  is a positive quantity. In this case, according to the results in the previous subsection, one could find that, when a suitable k is picked up, the first term in Equation (33) is a negative one. Nevertheless, when sun angle has been suppressed near to zero, the sign of T S b V S  would be negative or positive or even zero.
According to Equation (25), the first term in '〈〉' could be considered to have the same order of magnitude as T S b V S  . For the sun angle control, considering Lemma 1 described in the previous subsection, the coefficient k (in Equation (23)) is obvious larger than k1||Bb|| 2 (the weight corresponding to sun angle is emphasized here), which means that, for the contents in '〈〉' of Equation (23), kV S  is the dominant term. Therefore, Equation(33) could be rewritten as, For the second term in Equation (33), when sun angle has not been stabilized, the angular position relationship between ω0, Bb and VS×Sb are changing continuously. With the going on of the control process corresponding to sun angle, the difference between VS and Sb would be suppressed and the second term would approach to the region near to zero.
The second term in right hand of Equation (23) could be rewritten as, It is easy to get, And according to Equation (25), one could obtain, where uBb, uω and uω0 are the unit vectors corresponding to Bb, ω0 and ω, respectively. Therefore, Equation (36) could be rewritten as, During the control process, the angular position relationship between ω0, Bb and ω are changing continuously. And when ω→ω0 holds, the second term in right hand of Equation (23) The first term in the right hand of Equation (40) is negative, which means that it would be devoted to reducing the energy function J. The second term is related to the sun angle. At the beginning of attitude control process, under the corresponding control effort, sun angle would approach to zero and, therefore, the second term in Equation (40) is also a negative quantity. Nevertheless, when sun angle has been near to zero, the introduction of attitude error, disturbance, and the underactuated characteristic corresponding to magnetic attitude control scheme, would make sun angle change in a certain range.
According to Equation (40), when suitable coefficients are picked up, change rate of the expanded energy function J would be negative, which means that sun angle is controllable. Nevertheless, since the damping term is small, the corresponding control system is an under-damped system and sun angle would change in a large range. While when k3 is obviously large, in a similar manner, the sun-pointing control system is still stable. However, the strong gyroscopic stiffness would make it hard to control sun angle. Therefore, in the proposed attitude control scheme, spinning motion could not be emphasized, especially for cases that the included angle between the Sun and the orbital plane is near to 90deg. For dawn-dusk orbits, since sun vector is always on the same side of the orbital plane, spinning motion could enhance the desired sun-pointing. While for Meridional orbits, since sun vector is near to parallel with the orbital plane, spinning motion could be limited to a small-scale level, which could guarantee sun-pointing is available.
Actually, one could divide the attitude control process into two phases. In the first phase, the corresponding control effort is devoted to reducing sun angle and the specified angular velocity, ω0, could be set as 0. During the control process, the value corresponding to Equation (40) is always negative and the sun-pointing attitude control is feasible. While in the second phase, ω0 could be set as a non-zero quantity, which would drive the satellite spin around the normal of the solar panel and the spinning motion would guarantee sun-pointing manner. During the second phase, since sun angle is small, under the attitude control effort, angular velocity ω would approach to ω0.
In summary, during the attitude control process, when suitable coefficients are picked up, the change rate of J (J is the proposed Lyapunov function) is negative. That means that the proposed sun-pointing magnetic attitude control scheme is convergent and sun angle is controllable.

IV. SIMULATIONS
Suppose that the inertial tensor is diag([40, 48, 36]) kg·m2. The product of inertia is taken as 0.5 kg·m2. The section area corresponding to the aerodynamic drag is 3.5 m2, and the offset (in body-fixed frame) of the center of geometry away from the center of gravity is [-0.02, 0.005, 0.005] m. The nominal output of the magnetic torquers is 30A·m2. Both the control cycle and the sensors' sampling duration are 1s and the maximum duration corresponding to the magnetic torquers is 0.5s. The initial attitude quaternion is supposed as [-0.58113, 0.27710, 0.76414, 0.03989], while the initial angular velocity is supposed as [-2, -2, 2]deg/s. when the spacecraft is in the shadow of the Earth, a gyro is required to estimate the sun vector, which means sun vector is always available.
For the proposed PD-type sun-pointing attitude control scheme, harsh conditions have been considered in the following simulations. Suppose magnetometer measurement error be 200nT and the measurement noise be 500nT. The order of the magnitude of disturbance is set to the level of 10 -4 Nm. And solar panel is mounted on the -y facet of the satellite.
A. CASE1: Sun-synchronous orbit and LTDN=8:00AM For theses near dawn-dusk orbits, the injected angle of the Sun to the orbital plane is about 35deg and, obviously, -y facet is suitable for solar panel to mount. When the specified angular velocity is set as zero, the corresponding simulation results are presented in Fig. 5. When the specified angular velocity is -2deg/s, the corresponding simulation results are presented in Fig. 6. Simulation results indicate that, for near dawn-dusk orbits, whether the target angular velocity is set as zero or a non-zero quantity, the proposed sun-pointing attitude control scheme could guarantee sun-pointing manner. And in both of the cases, solar panels would rotate around the Sun, which means energy achievement requirement could be met.

B. CASE2: Sun-synchronous orbit and LTDN=1:00AM
For near meridional orbits, sun vector is near parallel with the orbital plane. Therefore, solar panels should change continuously to track the Sun. When the specified angular velocity is set as zero, the corresponding simulation results are presented in Fig. 7. When the target angular velocity is specified as -2deg/s, the corresponding simulation results are presented in Fig. 8. Simulation results show that, when the specified angular velocity is set as zero, corresponding attitude control effort would spin the satellite and the actual angular velocity would be controlled to some value, which would guarantee sun-pointing manner. While if the specified angular velocity is set as a non-zero quantity, due to the change of sun vector, the actual angular velocity may be different from the specified one. In this case, sun angle would be worse than that corresponding to the case discussed above.

C. CASE3: Low-inclination Earth orbit
Suppose the orbit height be 500km, orbital inclination be 35 deg, right ascension of ascending node be 159 deg. In this case, the included angle between the Sun and the orbital plane is about 35 deg. When the target angular velocity is specified as 0deg/s or -2deg/s, the corresponding simulation results are presented in Fig. 9~Fig. 10. Simulation results indicate that, when the target angular velocity is specified as zero, the actual angular velocity would change around zero and sun angle would be controlled near to zero. While if the specified angular velocity is -2deg/s or other non-zero quantity, the actual angular velocity would change slowly to the specified one and sun angle would be stabilized near to zero along with the increment of angular velocity.
Consider the case that right ascension of ascending node is 259 deg. In this case, the included angle between the Sun and the orbital plane is about 65 deg, which would add the difficulty for sun-pointing.
When the target angular velocity is specified as 0deg/s or -2deg/s, the corresponding simulation results are presented in Fig.  11~Fig. 12. When the specified angular velocity is 0deg/s, from Fig. 11, one could find that both the actual angular velocity and sun angle are near to zero. While if specified angular velocity is -2deg/s, from Fig. 12, one could find that, due to the change of sun vector with respect to the orbital plane, the control effort adopted to spin the satellite would weaken that used to suppress sun angle. In this case, the actual angular velocity could be controlled to the specified one and sun angle would change in a larger range.
Combining Fig. 9 and Fig. 11, one could find that, the actual angular velocity would change in the adjacency region near to zero and sun angle may be a large one since angular velocity is near to zero and the gyroscopic stiffness is very weak. Combining Fig. 10 and Fig. 12, one could find that, when control efforts corresponding to several terms in Equation (19) could not counteract each other, sun angle could be controlled perfectly. While if the control efforts neutralize each other, it would be hard to suppress sun angle.

V. CONCLUSION
The proposed magnetic-based attitude control scheme could provide proper control effort to guarantee sun-pointing. Under the attitude control effort provided by the three orthogonal magnetic torquers, the orientation of the solar panel would be controlled to point to the Sun, which is the basic survive mode for any satellite. The Lyapunov function-based sun-pointing attitude control scheme could guarantee sun-pointing manner in the cases that both attitude error and disturbance are small and the spin motion could enhance the capability to resist the introduced command noise to a certain extent. Sun pointing attitude control effects are related to the orbit and the proposed attitude control scheme could guarantee sun-pointing when the included angle between the Sun and the orbital plane is near to 90 deg. For the proposed PD-type sun-pointing attitude control scheme, which emphasis clearly the satellites spinning around the orientation of the solar panel, is suitable for arbitrary low-earth orbits and the sun-pointing effect could meet the requirements corresponding to energy achievement.

Conflicts of interest:
The authors declare that they have no conflict of interest. Funding: This work is supported, in part, by Shanghai Natural Science Foundation of China (Grant Number: 19ZR1453200).
Availability of data and material: This manuscript has no associated data.