Magnetic Torquers Only Attitude Control of a 3U Cube Satellite
MEHMET FATIH ERTURK, CHINGIZ HAJIYEV
Faculty of Aeronautics and Astronautics
Istanbul Technical University
Maslak, 34469, Istanbul
TURKEY
Abstract: - In this paper, attitude control of a 3U CubeSat is discussed using magnetic torquers only. As the
capabilities of attitude control systems increase, the use of magnetic torques in the CubeSat is becoming more
popular. Attitude control using only magnetic torquers has been researched for years and is still a current problem
to study. This paper presents the use of an LQR controller for a 3U CubeSat without full gravity gradient stability
of the model in a deterministic approach.
Key-Words: - Magnetic control, LQR, CubeSat, magnetorquer
Received: March 18, 2021. Revised: April 13, 2022. Accepted: May 11, 2022. Published: June 24, 2022.
1 Introduction
One of the first usage of nanosatellite term can be
found in [1]. It is mentioned as a new class of satellite
with a mass less than 10 kg. Currently, the definition
is mostly used for satellites with masses between 10
kg and 1kg. Cost-efficient and easy to develop fea-
ture of this satellite platform makes it more popular
as can be seen in Fig. 1. Total number of launched
nanosatellites reached 1800 at the end of 2021 [2].
They can be used for different purposes such as com-
munication to observation.
Figure 1: Nanosatellite launches by types [2].
The nanosatellites have both low mass and low
volume. As a result of low volume, the capabilities
of nanosatellites have some limits. So that, usage of
highly reliable and capable subsystems are more im-
portant. In terms of attitude control systems (ACS),
magnetorquers are one of the most suitable options for
nanosatellites. They have high reliability, long life,
and less power requirement within lowered volume
with respect to its alternatives.
Interaction of Earth’s magnetic field and created
magnetic dipole by magnetorquer generates a mag-
netic torque. With the controlling generated mag-
netic dipole, this magnetic torque can be used to orient
satellite. They can only be used effectively on LEO
as they are directly affected by the Earth’s magnetic
field.
While the first satellites carry magnetometers to
measure magnetic field, idea of using this natural phe-
nomena as an assistant for stabilizing the satellite is
came up. TIROS-2 is the first satellite that used active
magnetic control in 1960 [3]. Used magnetic actua-
tor of TIROS-2 is just wounded wires around satellite.
However, that was the proof of concept, and capabili-
ties of magnetic attitude control is discovered rapidly.
On the other hand, it took about 40 more years to
use magnetic coils in a nanosatellite. According to re-
search on [4, 5], TUBSAT-N, launched in 1998, ap-
pears to be the first nanosatellite with magnetic coils.
When the low volume and power of nanosatellites is
considered, meeting the needs of three-axis attitude
control for a nanosatellite becomes a challenge. Here
magnetic torquers become a viable solution to this
problem.
To apply this solution, different control methods
are implemented. In [6], a fully automatic attitude
control system has been released for a high inclined,
momentum-biased LEO satellite is published. For a
rigid satellite with near circular and near polar orbit,
attitude control of satellite by only magnetorquers is
searched in [7]. An LQR controller is used in the pa-
per. Also, a new type of asymptotic periodic LQR
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2022.18.18
Mehmet Fatih Erturk, Chingiz Hajiyev
E-ISSN: 2224-3488
128
Volume 18, 2022
controller is used in [8].
In this study, attitude of a 3U CubeSat model is
controlled using LQR with magnetic torquers only.
2 Magnetic Actuation and Satellite
Model
Magnetic torquers are simple wires with current flow-
ing through them. The amount of dipole moment
produced depends on the total number of wire turns
(N), current (I), and wire loop area (a) as in the (1).
However, producing required magnetic dipole or re-
quired direction for any time is not possible. The
direction of magnetic torque can be found by cross
product of magnetic dipole moment of torquer and
magnetic field. So that, while the angle between mag-
netic field and magnetic dipole moment getting par-
allel, produced torque moves away from required.
m=NIa (1)
To solve this problem, a projection based method
is mentioned in [9]. Using (3), where uis required
magnetic control moment and Bis magnetic field of
Earth, gives applicable magnetic dipole m. Then, it is
easy to calculate applicable magnetic torque τapplicable
as in (4). Figure 2 can be given as an explanation of
the calculations.
τ=m×BEarth (2)
m=B×u
||B||2(3)
τapplicable =m×B(4)
Figure 2: Projection based control torque.
A basic 3U CubeSat model is used with an inertia
as (5).
I="0.06297 0 0
0 0.06297 0
0 0 0.01000 #kg.m2(5)
3 Attitude Kinematics and Dynamics
Orientation of satellite can be represented with using
quaternions. Quaternions has a vector and a scalar
part as in (6). To calculate the change of a quaternion,
(7) can be used.
q= [q1:3, q4]0= [ q1q2q3q4]
0
(6)
In (7), it is possible to rewrite (w)as (8), where
wis angular velocity of satellite with respect to orbital
frame.
˙
q=1
2 (w)q(7)
(w) = w×w
wT0
=
0w3w2w1
w30w1w2
w2w10w3
w1w2w30
(8)
Skew symmetric matrix of wis represented as w×
and open form of it is given in (9).
w×="0w3w2
w30w1
w2w10#(9)
Then, solution of (7) is rearranged as (10).
˙
q=1
2
q2w3q3w2+q4w1
q3w1q1w3+q4w2
q1w2q2w1+q4w3
q1w1w2q2w3q3
(10)
The change of angular velocity is searched within
the attitude dynamics. Attitude dynamics can be writ-
ten as a nonlinear system in (11). Only the gravity
gradient torque and magnetic torque caused by mag-
netorquers are considered as disturbance torque in the
equation.
˙
w=I1w×Iw+I1τgg +I1τmag (11)
The nonlinear attitude dynamics can be linearized
around the small angle assumption and (13) can be
used as generalized linear attitude dynamic model. In
here, matrix Aand matrix Bis written in (14) and
(15) by following [10].
˙
x=Ax +Bu (12)
˙q1
˙q2
˙q3
¨q1
¨q2
¨q3
=A
q1
q2
q3
˙q1
˙q2
˙q3
+B"u1
u2
u3#(13)
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2022.18.18
Mehmet Fatih Erturk, Chingiz Hajiyev
E-ISSN: 2224-3488
129
A=
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
4n2σ10 0 0 0 n1
0 3n2σ20 0 0 0
0 0 n2σ3n30 0
(14)
B=03×3
I1(15)
Where,
n=µ
a3(16)
σ1=J2J3
J1, σ2=J3J1
J2, σ3=J1J2
J3(17)
Initial attitude of the satellite are given in (18) and
(19). Both of angular velocity and quaternion vectors
of body are defined in orbital frame.
wBO ="0.01967
0.02010
0.02011 #[deg/sec](18)
qBO =
0.050230
0.055884
0.050230
0.995907
(19)
Also the orbit of satellite is given in Table 1. The
parameters are semi-major axis (a), eccentricity (e),
inclination (i), right ascension of ascending node (),
argument of perigee (w), and true anomaly (θ) re-
spectively.
Table 1: Orbit of the satellite.
Parameter Value Unit
a6906.13 [km]
e1.126 ×103-
i97.51 [deg]
89.44 [deg]
w227.1[deg]
θ132.9[deg]
Epoch 25 Jan 2021 18:58:30
4 LQR Controller
In this paper, LQR controller is used with its con-
stant coefficients or constant gain. To calculate gain
of controller, a cost function should be minimized as
in (20). State vector of satellite, x, is the same with
(12). On the other hand, matrix Qis positive defi-
nite and matrix Ris non-negative definite matrices as
stated in [7].
J(u) = limtf→∞
1
2xT(tf)Sfx(tf)
+1
2Rtf
t0xT(t)Qx(t) + uTRudt
(20)
Now, (13) is rewritten in (21).
˙
x(t) = Ax(t) + B(t)u(t)(21)
It has a common solution as (22), where S(t)satis-
fies Riccati differential equation in (23) with the help
of latest status S(tf) = Sf[7].
u(t) = R1BT(t)S(t)x(t)(22)
˙
S(t) = S(t)AATS(t)
+S(t)B(t)R1BT(t)S(t)Q
(23)
Finally, a backward integration of the equation can
give gain matrix (24). While the time increasing,
dependency of S(t)on Sfdecreases and becomes
unimportant.
K(t) R1BT(t)S(t)(24)
The process is run once before the run simula-
tion to obtain the gain matrix. Obtained gain never
changes during simulations and stays steady. LQR
function of MATLAB is used to calculate constant
gain matrix for this thesis. Nterm is neglected and
assumed as zero matrix while Rmatrix assumed as 3
by 3identity matrix.
5 Simulation Results
It is better to first consider the torque free motion of
the satellite to obtain a comparison reference point.
Figure 3 is the change of Euler angles of the satel-
lite without any control. Pitch and yaw angles of the
CubeSat oscillates up to 15 degrees during simulation.
Yaw angle of the satellite has a large frequency to
complete its one period, but there is no limit for its
oscillation.
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2022.18.18
Mehmet Fatih Erturk, Chingiz Hajiyev
E-ISSN: 2224-3488
130
Figure 3: Euler angles without attitude control.
Quaternions of the CubeSat have similar motion
as can be seen in Figure 4. While q1and q2are oscil-
lating approximately 2.5times in one orbit, q3and q4
are change a lot without oscillating rapidly.
Also, change of the angular velocity in torque free
motion is given in Figure 5. All the variables are os-
cillates. However, pay attention to third element of
the angular velocity vector. It never reaches 0deg/sec
during propagation. This is the reason of large change
on the yaw axis.
Figure 4: Quaternions without attitude control.
For the torque free motion, mean error on the Euler
axes can be seen in Figure 3 and Table 2. Mean error
is the total error in degree per time passed through
simulation.
Table 2: Mean error of Euler angels for torque free
motion.
Error Value
Mean yaw 80.2660 [deg]
Mean pitch 8.04858 [deg]
Mean roll 7.16065 [deg]
Figure 5: Angular velocities without attitude control.
Then, Qmatrix of LQR is set to (25) to compute
constant gain of LQR.
Q=3.55181 I3×31014 03×3
03×39.65961 I3×31014 (25)
Obtained LQR gain gives following results in Fig-
ure 6. The error on Euler angles for each axes de-
creases below 1degree after almost 1.5orbit.
Figure 6: Euler angles of LQR controller simulation.
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2022.18.18
Mehmet Fatih Erturk, Chingiz Hajiyev
E-ISSN: 2224-3488
131
Similarly, quaternions reach very close values to
their target within 1orbit as can be seen in Figure 7.
Figure 7: Quaternions of LQR controller simulation.
Figure 8 shows the change of angular velocity
change of simulation. It reaches below 0.005 deg/sec
before 1orbit.
Figure 8: Angular velocities of LQR controller simu-
lation.
When LQR controller is used with a good gain it is
possible to obtain accurate pointing as presented dur-
ing this section. In terms of the Euler angles, mean
error decreases to 2degree for the simulation as given
in Table 3.
Table 3: Mean error on Euler angles of controlled
satellite.
Error Value
Mean yaw 1.78644 [deg]
Mean pitch 0.895059 [deg]
Mean roll 1.00956 [deg]
6 Conclusion
A 3U CubeSat model which only uses magnetic ac-
tuators as attitude actuator is controlled by an LQR
controller in this study. Qmatrix of the LQR con-
troller is well chosen to improve the accuracy of the
satellite attitude. As a future work, adding a determi-
nation algorithm as SVD or TRIAD and then applying
a Kalman Filter as in [11, 12] can be done to make the
simulations more realistic.
References:
[1] Sweeting, M. N., UoSAT microsatellite missions,
Electronics & Communication Engineering Jour-
nal, Vol.4, 1992, pp. 141-150.
[2] Kulu, E., Nanosats Database, www.nanosats.
eu, Access date: 22.05.2022.
[3] Ovchinnikov, M. Yu. and Roldugin, D. S., A
survey on active magnetic attitude control algo-
rithms for small satellites, Progress in Aerospace
Sciences, Vol.109, 2019.
[4] McDowell, J., SATCAT Database,
https:// www.planet4589.org/ space/
gcat/ data/ cat/ satcat.html, Access date:
22.05.2022.
[5] Kreps, G. D., Tubsat N - Gunter’s Space
Page, https:// space.skyrocket.de/ doc_
sdat/ tubsat-n.htm, Access date: 22.05.2022.
[6] Stickler, A. C. and Alfriend, K. T., Elementary
Magnetic Attitude Control System, Journal of
Spacecraft and Rockets, Vol.13, No.5, 1976, pp.
282-287.
[7] Musser, K. L. and Ebert, W. L., Autonomous
Spacecraft Attitude Control Using Magnetic
Torquing Only, Flight Mechanics and Estimation
Theory Symposium, 1989.
[8] Psiaki, M. L., Magnetic Torquer Attitude Control
via Asymptotic Periodic Linear Quadratic Reg-
ulation, Journal of Guidance, Control, and Dy-
namics, Vol.24, No.2, pp. 386-394, 2001.
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2022.18.18
Mehmet Fatih Erturk, Chingiz Hajiyev
E-ISSN: 2224-3488
132
[9] Martel, F., Pal, P. and Psiaki, M. , Active Mag-
netic Control System for Gravity Gradient Stabi-
lized Spacecraft, The 2. Annual AIAA Conference
on Small Satellites, 1988.
[10] Makovec, K. , A Nonlinear Magnetic Controller
for Three-Axis Stability of Nanosatellites, Vir-
ginia Polytechnic Institute and State University,
Msc. Thesis, 2001.
[11] Cilden-Güler, D., Söken, H. E., and Ha-
jiyev C., A SVD-Aided UKF for Estimation
of Nanosatellite Rotational Motion Parameters
,WSEAS TRANSACTIONS on SIGNAL PRO-
CESSING, Vol.18, pp. 27-35, 2018.
[12] Gökçay, M. A. and Hajiyev C., Comparison
of TRIAD+EKF and TRIAD+UKF Algorithms
for Nanosatellite Attitude Estimation, WSEAS
TRANSACTIONS on SYSTEMS and CONTROL,
Vol.17, pp. 201-206, 2022.
Creative Commons Attribution License 4.0
(Attribution 4.0 International, CC BY 4.0)
This article is published under the terms of the Creative
Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/deed.en_US
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2022.18.18
Mehmet Fatih Erturk, Chingiz Hajiyev
E-ISSN: 2224-3488
133