Automatic Balancing for Satellite Simulators with Mixed Mechanical and Magnetic Actuation

: Dynamic spacecraft simulators are becoming a widespread tool to enable effective on-ground veriﬁcation of the attitude determination and control subsystem (ADCS). In such facilities, the on-orbit rotational dynamics shall be simulated, thereby requiring minimization of the external torques acting on the satellite mock-up. Gravity torque is often the largest among the disturbances, and an automatic procedure for balancing is usually foreseen in such facilities as it is signiﬁcantly faster and more accurate than manual methods. In this note, we present an automatic balancing technique which combines mechanical and magnetic actuation by the joint use of sliding masses and magnetorquers. A feedback control is employed for in-plane balancing in which the proportional and integral actions are provided by moving the masses, while the derivative action is provided by the magnetorquers. Compared to an earlier implementation by the authors relying on shifting masses only, the novel approach is shown to reduce the in-plane unbalance by an additional 45% on average.


Introduction
Adequate on-ground verification is of paramount importance for the successful operation of a satellite attitude determination and control subsystem (ADCS). To this end, dynamic attitude simulators have been used for many decades [1]. Thanks to the increasing popularity of small satellites, attitude simulators are now becoming a very popular tool not only for research but also for education [2].
These facilities need to emulate an almost torque-free rotational motion, which is often achieved by positioning the spacecraft mock-up on a platform sustained by a spherical air bearing. Among the different disturbances affecting the dynamics of spherical air bearings, the gravitational torque is usually the largest [3]. It arises due to the offset between the center of mass (CM) and the center of rotation (CR), which must be minimized. The simplest way to reduce this disturbance is by manual balancing [4], which is very time-consuming (depending on the specific implementation [1]). Automatic balancing overcomes this limit and can improve the offset compensation obtained manually [5,6]. It requires the implementation of an automatic control system capable of moving the center of mass of the platform, which is usually obtained by using actuated shifting masses. The position of the center of mass can be estimated through input-output data processing whenever additional actuators are present on-board the mock-up [7,8] or through a least-squares filter based on the dynamical model [9,10]. Alternatively, a two-step procedure can be implemented, in which in-plane balancing is followed by the estimation and compensation of the vertical offset [11,12]. This approach was followed in [13,14], where an automatic balancing system (ABS) was designed and tested as part of a three-degrees-of-freedom simulator for ADCS verification of CubeSats. The ABS employed three sliding masses independently actuated by three stepper motors. The motors were used for the real-time in-plane balancing algorithm based on proportional-integral-derivative (PID) feedback (step 1), while the third motor alone was used in a subsequent step to compensate for the vertical CM-to-CR offset. This latter was estimated, along with the inertia parameters, through off-line least-squares filtering of the angular velocity data sampled during free platform oscillations (step 2). Indeed, platform balancing is inherently related to inertia identification [15][16][17][18], with the latter usually required to complete the former.
The increasing popularity of attitude simulators for small satellites keeps pushing forward the development of new implementations of ABS [19][20][21][22]. For a recent thorough survey and analysis of existing methods, the reader is referred to [23].
Despite ABS based solely upon shifting masses having been proven to be effective in several works [5,6,[11][12][13]19], they do have their own limitations. For example, the motors driving the masses have limited response time, and suffer from backlash. In-plane balancing usually is based on a control system using data provided by an onboard inertial measurement unit (IMU). If the feedback loop includes angular rate measurements, then high-frequency noise from gyros may enter the system, resulting in unwanted mechanical vibration that, in turn, can increase gyro noise amplitude.
By recognizing that most nanosatellites in Earth orbit are equipped with magnetic actuators (e.g., coils or magnetorquers), and many attitude testbeds feature magnetic simulation capabilities (through, e.g., Helmholtz coils), in this work we propose an automatic in-plane balancing method which tries to overcome the above drawback by relying upon a combined mechanical/magnetic actuation through shifting masses and magnetorquers. The core idea is to distribute the required control effort to the two kinds of actuators. The proportional and integral parts are realized by mass displacement, while the derivative/damping part is realized by the magnetic torque originated thanks to the magnetorquers' dipole. In doing so, smoother positioning for the sliding masses is achieved, which results in a more effective unbalance reduction, as demonstrated by the experimental testing reported in this Note.
The modifications required by the proposed balancing technique with respect to a standard approach based only on shifting masses are minimal, provided that the testbed is equipped with a magnetic field simulator; we thus believe that our results might be profitably exploited in other similar facilities.

Materials and Methods
We adopted as an experimental testbed for the mixed mechanical and magnetic ABS a tabletop rotating platform hosting a CubeSat ADCS mock-up; see Figure 1. The tabletop platform, which is made of amagnetic aluminum, accommodates the mechanics and electronics of the ABS. The mock-up is equipped with a set of three mutually orthogonal magnetorquers, capable of generating 1 Am 2 of magnetic dipole each, and with an Arduino Feather M0 microcontroller (item a, following the nomenclature in Figure 1

Mathematical Model for ABS
In this work, we focus on the real-time in-plane balancing, which is the first of the two-step procedures developed in [13] and is recalled in the Introduction, whose objective is to align the CM-to-CR offset to the z (out-of-plane) body axis. The main assumptions The overall system architecture is depicted in Figure 2.

Mathematical Model for ABS
In this work, we focus on the real-time in-plane balancing, which is the first of the two-step procedures developed in [13] and is recalled in the Introduction, whose objective is to align the CM-to-CR offset to the z (out-of-plane) body axis. The main assumptions

Mathematical Model for ABS
In this work, we focus on the real-time in-plane balancing, which is the first of the two-step procedures developed in [13] and is recalled in the Introduction, whose objective is to align the CM-to-CR offset to the z (out-of-plane) body axis. The main assumptions retained for the mathematical modeling of the system dynamics are the same as described in [13] and will be omitted here for brevity, stating only the main results.
The dynamical system under study is described by [24]: where J x , J y and J z are the principal moments of inertia of the inertia matrix that is assumed to be diagonal in the chosen reference frame, is the gravity vector and m tot is the total mass of the free-to-rotate body. In the following, for ease of notation, the superscript b will be omitted. τ u = τ u,x τ u,y τ u,z T is the control torque which, in the envisaged mixed mechanical-magnetic balancing technique, is the sum of two contributions τ sm (mechanical) and τ mag (magnetic) as in: where m b is the sliding mass, r b is the mass displacement vector in body axes, d is the dipole vector created by the set of magnetorquers, and b is the external magnetic field vector, assumed to be controllable (which is the case in our simulator thanks to a Helmholtz cage). In the following, we will assume the external magnetic field b to be anti-parallel to the local vertical (i.e., positive upward). The desired profiles for the mass displacement r b and the magnetic dipole d will be derived prescribing a control torque according to the following PID feedback law: whose aim is to alignẑ body axis to gravity by drivingĝ ×ẑ to 0. Indeed, if the system converges to an equilibrium for whichẑ andĝ are parallel, then the only non-zero component of r CR must lie alongẑ, which is the definition of planar balancing. In Equation (3), ω ⊥ and i ⊥ represent, respectively, the projection of the angular velocity and of the integral error signal i in the plane orthogonal toĝ. The contribution to the total torque actuated by the sliding masses τ sm consists of the proportional and integral parts of Equation (3): By comparing the rightmost side of Equation (2) to Equations (3) and (4), the mass displacement which generates the desired τ sm can be computed as [12]: whereẑ ⊥ is the projection ofẑ in the plane perpendicular toĝ. The contribution to the total torque to be actuated by the magnetorquers is instead: which is obtained by setting the magnetic dipole d equal to: where the rightmost side has been derived upon substitution of Equation (6), noticing that The planar balancing method based on the joint use of Equations (5) and (7) will be compared to a purely mechanical one, where the control torque in Equation (3) is entirely obtained through mass displacement, i.e., by setting: which differs from Equation (5) due to the additional derivative damping term.

Results
The proposed approach for in-plane balancing has been verified through experiments using the testbed described in Section 2, by making joint use of the actuated masses (m b = 0.123 kg) and of the magnetorquers according to the control laws in Equations (5) and (7). The required measurements, namely the components of the angular rate and gravity vectors, are obtained from the on-board IMU. Both the measurement and control stages are run at a frequency of 20 Hz. The new methodology is compared to the classic one, Equation (8), by performing several tests according to the following set-up.
We start from a balanced platform which underwent multiple iterations of the twostep algorithm developed in [13]. Before beginning each test, a known offset is created in the horizontal plane by commanding the same fixed position to the sliding masses. The platform would then tilt towards a given rest position which is used as the initial condition. The experiment duration is maintained fixed at 300 s for each batch of tests. During the tests employing the magnetorquers, the Helmholtz cage is set to generate a magnetic field parallel to the local vertical (positive upwards) with a magnitude b = 6 × 10 −4 T.
The two methods are compared in terms of residual torque after balancing the range of the masses' positions r x , r y and steady-state rms value of the dimensionless gravity vector componentsĝ x ,ĝ y ,ĝ ⊥ = ĝ 2 x +ĝ 2 y , which ideally should become null when a perfect in-plane balance is achieved. The residual torque is estimated using the method described in [13] by computing the variation of the angular momentum of the free-floating balanced platform. This, in turn, is obtained by evaluating the left-hand-side of Equation (1) using the measured angular rates.
The test conditions and results for two different batches of tests are collected in Tables 1 and 2. Values reported are averaged across each batch population.
A comparison between the stepper motors' position in the two cases is shown in Figure 3, while Figure 4 depicts the in-plane components of the dimensionless gravitational acceleration,ĝ ⊥ . In Figure 5, the dipole generated by the magnetorquers during the balancing procedure is shown. Figure 6 shows the temporal evolution of the estimated total residual torque after multiple iterations of the two-step procedure using both the stepper motors and the magnetorquers.  Table 2. Gravitational acceleration, masses position and residual torque for the second set of tests.

Mechanical Mechanical/Magnetic
Initial offset (mm) 0.5 0.5 Initial angular rate Null null Proportional gain K p (Nm) 2.44 × 10 −3 1.54 × 10 −3 g y steady rms value (-) 3.87 × 10 −3 2.71 × 10 −3 g ⊥ steady rms value (-) 4.57 × 10 −3 3.12 × 10 −3 r x peak-to-peak (mm) 0.142 0.020 r y peak-to-peak (mm) 0.148 0.012 r x standard dev.  A comparison between the stepper motors' position in the two cases is shown in Figure 3, while Figure 4 depicts the in-plane components of the dimensionless gravitational acceleration, . In Figure 5, the dipole generated by the magnetorquers during the balancing procedure is shown.         Figure 6 shows the temporal evolution of the estimated total residual torque after multiple iterations of the two-step procedure using both the stepper motors and the magnetorquers.

Discussion
A major difference between the two methods consists in the smoother variation of the sliding masses' positions when magnetorquers are employed for angular velocity

Discussion
A major difference between the two methods consists in the smoother variation of the sliding masses' positions when magnetorquers are employed for angular velocity damping, both during transients and upon convergence; see Figure 3. As a result, the peakto-peak variation of the stepper motor positions once the steady state is reached is reduced. Similarly, the steady-state values of the in-plane components of gravity acceleration are also smaller; see Figure 4.
Although both methods effectively reduce the unbalance, the new mixed mechanicalmagnetic technique outperforms the classic one. The performance increase can be appreciated using two indexes. First, for a direct assessment of the in-plane balancing effectiveness, we compare the magnitude of the in-plane component of the dimensionless gravity acceleration upon convergence,ĝ ⊥ , whose root-mean-square value is smaller by about 45% when adopting the new method. Note thatĝ ⊥ coincides with |ĝ ×ẑ|, the norm of the feedback error signal in Equation (3), thereby providing a direct measure of the controller performance.
Secondly, we consider the magnitude of the overall torque acting on the platform after balancing, which is about 14% smaller on average; see Tables 1 and 2. Given that the torque magnitude estimated by inspection of the free-floating platform oscillations is the total one (i.e., not only due to unbalance, but also, e.g., due to aerodynamic drag and airbearing friction), this index provides a mainly qualitative assessment of the improvement brought by the new method and of the adequacy of the experimental platform to emulate low-disturbance rotational dynamics. Multiple balancing iterations can also be performed to further decrease the residual torque acting on the rotating platform. In doing so, the torque norm can be maintained below ≈ 4.3 × 10 −5 Nm during free platform oscillations, as depicted in Figure 6.
In summary, the new mixed mechanical-magnetic actuation strategy, when compared to the mechanical-only one, has brought two advantages to our facility, namely (i) more effective in-plane balancing, and (ii) a smaller total disturbance torque acting on the balanced platform.

Conclusions
In this Note, we have presented an approach to the automatic balancing of dynamic attitude simulators making use of mixed mechanical/magnetic actuation through shifting masses and magnetorquers. The method consists of splitting the balancing torque into two parts: a proportional-integral action, obtained by moving the sliding masses, plus a derivative action obtained through an onboard generated magnetic dipole. When experimentally compared to balancing relying upon sliding masses only, the method presented herein yielded a residual in-plane unbalance that was about 45% smaller, which in turn allowed achieving a reduced value of disturbance torque acting on the balanced platform.