{'fraction_non_alphanumeric': 0.033636567834681046, 'fraction_numerical': 0.017744833782569632, 'mean_word_length': 4.5514339152119705, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
ADCS Preliminary Design For GNB

This work deals with an ADCS model for a satellite orbiting around Earth. The object is to achieve a preliminary design and perform some analysis on it. To do so, a GNB was selected and main properties are exploited. Previous works of [9], [13], [14], [15] and [17] were analyzed and a synthesis was obtained; then a suitable control system was designed to satisfy technical requirements. Coding was performed using Matlab and Simulink. Keywords: Attitude Determination, Attitude Control, Nanosatellite, Orbital Perturbations, Quaternion, Two Body Problem, Euler's Equations, Lyapunov Function.


Introduction
Satellites are roughly consisting of two parts, the payload and the satellite bus. The payload is responsible for completing the primary objectives of the mission, while the satellite bus supports the payload in its operation (mechanical structure, EPS, TCS, OBDH, ADCS, TMTC).
In order to reduce the development cost of the bus, the Space Flight Laboratory [3] developed the so called Generic Nanosatellite Bus (GNB) designed to work with a wide

Satellite Layout
The typical configuration of the BRITE satellite is presented in Figure 1 and Figure 2, essentially it is a 20 cm x 20 cm x 20 cm cube with a mass of 7 Kg.
The 2 mm thick panels with cross braces provide additional rigidity to the structure supporting a mounting surface for the solar cells, most sun sensors, the magnetometer boom, the magnetorquers and the various antennas. All other components, such as the reaction wheels, various computers on board, battery assemblies, radios and some of the sun sensors are mounted directly to the traies.
In [10], [13], [14] and [15] all components, instrumentation (in particular sensors and actuators for ADCS) and geometrical/mass properties are analyzed and assembly and integration procedures are presented. In [15] its Inertia Tensor is reported as:

Orbital Motion
From [2], [5] and [6] and is possible evaluate the spacecraft TLEs from his catalog number. In our case the NORAD CATALOG NUMBER is 40020 and the following orbit properties are reported in Table 1. Therefore from TLEs is possible to evaluate the initial conditions in terms of position and velocity for orbit propagation. Denoting with r = [x, y, z] T the position vector of the spacecraft in the ECI reference frame, the restricted two body problem equation is: where µ is the Earth gravitational constant. The a p represents the perturbative accelerations acting on the spacecraft; we considered: 1. Perturbation due to Earth oblateness: J 2 term (see [12] page 491 equation 10.30) 2. Perturbation due to Drag: Earth atmosphere effect (see [16] page 108 equation 3.163) 3. Perturbation due to Solar Radiation Pressure: SRP (see [16] page 109 equation 3.167) 4. Perturbation due to Third Body: Moon (see [12] page 530 equation 10.117) It is important to underline that as far as SRP and Drag are concerned, the force is directly correlated to the area seen by the relative velocity vector and therefore is strictly connected to the attitude that the satellite is assuming in any instant of time. We assumed the value of the Drag Coefficient is C d = 2.6. The eclipse condition is taken into consideration through the cylindrical approximation: where e e−s is the unit vector from the Earth to the Sun and R e is the Earth radius. The J 2 effect is negligible for short time mission operations, but as long as time passes, its effect becomes evident; in fact the orbit drifting implies the changing in keplerian elements and in particular on the inclination of the orbit. Therefore the Earth magnetic field sensed by the spacecraft will be strongly affected by it.

Attitude Motion
The mathematical model adopted is based on Euler's equations of motion, denoting with ω the body's angular velocity vector and with J its inertia tensor, we have: In (3.3) L represents the control torque (we will see later how to define it according to the mission purposes) while M d is the disturbance torque. We considered the following disturbances: 1. Gravity Gradient torque (see [16] page 104 equation 3.155) 2. Drag Torque (see [16] page 108 equation 3.164) 3. Solar Radiation Pressure Torque (see [16] page 109 equation 3.168) 4. Magnetic Torque (see [16] page 405 equation 11.5 for the dipole approximation for the magnetic field and page 106 equation 3.159 for the magnetic torque) Once (3.3) is integrated, the kinematics in terms of quaternion q is simply: where:

Sensors and Actuators
For attitude determination the typical GNB (see [14]) configuration is: 1. 6 Sun Sensors (one on each face): unit sphere coverage of 99.8%. Main properties are reported in Table 2.

Mission Requirements
The ADCS requirements can be formalized as: • The ADCS shall allow imaging of a target field for 15 minutes continuously for each orbit, with a goal of imaging multiple targets each orbit 6 Main Quantities Estimation and Filtering

Attitude Determination
As already mentioned, the spacecraft is equipped with various sensors for attitude determination, whose features and operating mechanisms are discussed in detail in [22]. Our implementation logic is to use the pair sun sensors -magnetometer for attitude determination in the initial phase of detumbling in order to give to the star tracker enough time to start correctly and in case of failure of the latter.
This combination of sensors is also used for avoiding the Sun in order not to damage the star tracker.
In all other cases, the attitude determination is performed by the star tracker. Therefore this is a redundant configuration.
When using Sun sensors and magnetometer, the estimation is less precise than star tracker one; however, if the spacecraft is not in eclipse condition, they provide two measurements capable of determining the attitude accordingly, in order to solve the sun sensors -magnetometer attitude determination problem, the static algorithm TRIAD has been chosen. This method is easy and no computational problems are present.
On the other hand the star tracker provides much more measurements at the same time; in fact we need at least eight stars to have 90% of probability to find four stars in the FOV.
To be more realistic, we decided to build a star catalog in which we considered eight stars; using their right ascension and declination, director cosines of the star position vector can be evaluated.
In order to model the FOV limitation a sort "eclipse condition" (3.2) is adopted. The algorithm logic is that of determine the stars in the FOV, then remove the other for the next calculations to reduce the computational cost.
The chosen static determination algorithm in this case is the QUEST method instead of Davenport's q method since it is more precise but more computationally expansive.

Angular Velocity Estimation
Since no rate sensors are present the angular velocity ω has to be estimated ex post (this problem is also analyzed by [11]). The quaternion kinematics can be described by: Equation (6.1) can be then inverted as: Then the derivativeq of the quaternion can be evaluated using finite difference method. In a same fashion the Attitude Matrix A B/N that represent the map from the inertial frame (N) to the body (B) frame (direction cosines matrix) can be computed as: where: and finally we have: In (6.5) P is a generic matrix. Then the derivativeȦ B/N of the Attitude Matrix can be evaluated using finite difference method.

Filtering
The TRIAD algorithm and the QUEST method provide a good approximation of quaternion and attitude matrix despite the random error related to the inaccuracy of the sensors. On the other hand, the numerical derivative generates noisy signals that have to be filtered. In order to eliminate high frequency noise without loosing too much information from the signal, two different low pass filter are implemented whose transfer functions are: 1 + 2ξω 2 s +ω 2 2 (6.6) whereω 1 andω 2 are the cut off frequencies of the first order and second order low pass filter respectively and ξ is the damping ratio of the second order low pass filter. All these parameters are optimally tuned in order to obtain the best performances depending on each mission operation phase.

Detumbling Maneuver
The detumble mode shall reduce the satellite rotation rates after release from the launcher, and after entering safe-hold mode, to the point where satellite angular momentum is low enough to be absorbed by reaction wheels. For BRITE, this is designed to recover from tumble rates up to 60 deg/s.
The control law is chosen as a combination of a bang-bang control and a pure B-dot control law 3 : Where B is the Earth magnetic field vector, m is the dipole moment of the magnetorquer, m max is the maximum magnetic dipole of the magnetorquer, T orb is the orbital period, ξ m is the inclination of the spacecraft orbit relative to the geomagnetic equatorial plane and J min is the minimum principal moment of inertia. The formula for k det in (7.2) can be found in [16] and a detailed proof is in [7]. Typical values of m max for GNB satellites are presented in [9] , in our case m max = 0.12 Am 2 .
The satellite is equipped with one star tracker, six sun sensors and one magnetometer, therefore the implementation logic is such that the attitude sensing is performed using sun sensors and the magnetometer for at least 60 minutes (which more or less correspond with the time the satellite is not in eclipse) end possibly, if needed, the star tracker performs the remaining of the attitude sensing to conclude the detumbling. This strategy is done in order to give enough time to the star tracker to switch on correctly (maximum time 60 minutes).  Figure 3 shows the behaviour of the angular velocity components, the initial condition ω(0) is selected as the limit one; we can see that the asymptotic zero condition is achieved more or less in 6 hours.  Figure 4 presents the behaviours of magnetic dipole m components; here we can appreciate the difference and the switching of two methods. Figure 5 presents the required torque, called L for simplicity. Such a simulation, with so onerous initial conditions, shows also the robustness of the control design; in fact it is capable of detumbling successfully the spacecraft despite the long amount of time required. Therefore less onerous initial conditions will require less effort.

Slew and Tracking Maneuvers
After the detumbling maneuver, the spacecraft shall point to the target. For our purposes, the goal is to point a fixed star. Two main consequences can be identified: the reference attitude (desired attitude) is not time varying with respect the ECI reference frame and the desired angular velocity during the tracking is zero. Therefore we are allowed to formulate the tracking and slew problem on the same time as:

.1) can be proved as follows:
Proof. Let ω e = ω − A e ω d the error in angular velocity with respect to the desired set point ω d . The condition of equilibrium to be studied is ω e = 0, then a suitable Lyapunov function is: which is zero for ω e = 0 and A e = I. The chosen Lyapunov function is never less than zero because the first term is a quadratic form and the trace surely greater than zero. Performing the time derivative of (8.2) we have: Where the external disturbances are not considered since in general it is not possible to compensate them. Finally we derive the general control law: which has been chosen in such a way thatV (ω e ) < 0. By setting ω d = 0 in (8.3) we get (8.1) and the system is asymptotically stable.
From (8.1) we can see that first of all we perform a feedback linearization by means of the term ω ∧ (Jω) to the Euler's equations and then two proportional actions are applied: one k ω on the angular velocity and the other k A on the attitude error ({k ω , k a } > 0). Equation (8.1) represents the so called desired control law, then we map it onto actuators solving the following differential equation: whereÃ is the distribution matrix of the momentum exchange devices andÃ * its pseudoinverse (since we have three orthogonal reaction wheelsÃ =Ã * = I ∈ R 3×3 ), h rw is the angular momentum vector of the reaction wheels. Equation (8.4) can be proven as follows: Proof. The total angular momentum of the spacecraft can be expressed as: performing time derivative of (8.5) and remembering that matrix J andÃ are not time varying, we have: Then (8.4) is obtained inverting the relation L = −Ãḣ rw − ω ∧ (Ãh rw ) Without any loss of generality, we considered as target the star Alpha Circini (a variable star in the faint, southern, circumpolar constellation of Circinus) that has an apparent magnitude of 3.18 -3.21 (that was also imaged and studied by BRITE Austria).
Alpha Circini's properties with respect to the ECI reference frame are: r cir−sun = 54 ly, α cir = 14h 42m 30.41958s, δ cir = −64°58 ′ 30.4934 ′′ (8.7) where r cir−sun is the distance from the Sun, α cir is the Right Ascension and δ cir is the declination of the star. Therefore from the information in (8.7) we can easily compute the position vector with respect to the ECI reference frame.
If we now consider the unit vector of the x-axis of the ECI reference frame i = [1, 0, 0] T than the quaternion to rotate i into the direction of r cir−sun can be evaluated as: q d = [cos(ψ/2), u sin(ψ/2)] T , u = i ∧ r cir−sun ||i ∧ r cir−sun || , ψ = cos −1 i × r cir−sun ||r cir−sun || (8.8) From (8.8) the desired attitude matrix and the attitude error (A e = A B/N A T d ) can be evaluated by the usual formulas for converting a quaternion into attitude matrix.
Finally we can evaluate the most important performance parameter for this mission phase, the so called pointing error that we define as: Equation (8.9) provides a criterion for deciding if we are or not satisfying the pointing requirement.
The initial conditions for the slew maneuver are those at the end of the detumbling one both in terms of angular velocity and attitude quaternion.
In our design is of course necessary to provide a desaturation mechanism for the reaction wheels; this is done by magnetotorquers. If we define M max the maximum torque that can be produced by a reaction wheel then the torque to be applied to the RW and the torque to be produced by the magnetorquers to be applied to the spacecraft are: Where M max is the maximum torque that reaction wheels can provide. Equation (8.10) provides the desaturation mechanism and it is effective if the magnetic field is orthogonal to the spin axis of the wheel; this yields to the possibility of making the desaturation when we reach such a condition preventing the saturation before it actually happens.   Figure 7 show respectively the behaviour of the angular velocity and torque components (in Figure 7 the torque is labelled as L and not L s−t as in (8.1) for simplicity); as expected ω start with the zero condition achieved from the detumbling and then start to increase (thanks to the RW actions) to line up the camera with the target direction.
In Figure 8 we can see how the pointing error decreases till the required pointing accuracy < 1°(in our calculation ≈ 0.023°), this means that the attitude error tends to the identity matrix as shown in Figure 9.
These calculations are done considering the saturation and de-saturation mechanism according to (8.10), however with the designed control the reaction wheels are more or less working under the saturation limit.

Re-Pointing
The technical requirements of the ADCS subsystem establish that during one orbital period the satellite must orient the camera towards more than one star and keep this direction for at least 15 minutes (multiple targets each orbit).
Let us consider as the first target Alpha Circini and as second target Tania Australis. Tania Australis is a binary star in the constellation of Ursa Major. An apparent visual magnitude of +3.06 places it among the brighter members of the constellation. This star has the following properties with respect to the ECI reference frame are: r tania−sun = 230 ly, α tania = 10h 22m 19.73976s, δ tania = 41°29 ′ 58.2691 ′′ Figure 10 , Figure 11, Figure 12 and Figure 13 show the results mentioned above. It can be appreciated how the control system is able to reorient the satellite ensuring the required pointing accuracy. Also in this case the limits imposed by the reaction wheels are respected and the attitude error converges to the identity matrix.

Conclusions
Spacecraft attitude and control in short consist of a continuous check that a satellite points in some desired direction. But really attitude and control should be estimated simulta-neously, nevertheless they are separated to some extent due to a "separation theorem". In such a way, for the most space missions design, attitude determination dynamics can be designed separately from the control. The case study presented here holds almost the main theories and the state of the art, analyzing the transient performances of the control system by solving, by suitable numeric algorithms, the nonlinear differential equations modeling its dynamics and stability. After a short description of the system features, we performed several simulations. The main concern angular velocity, dipole moments and control torques during the tumbling. Afterwards angular velocity, required torque and pointing accuracy have been monitored during slew and star tracking. In any case we could ascertain that all the transients behave in due way and extinguish within the prescribed duration according to design specifications and according to our stability analysis in the sense of Lyapunov. The paper can be seen as our first step on the subject: further advanced techniques of control have been taken also into account (see [8], [19] and [20]) and will be exploited in a future work.