Fuzzy Logic Attitude Control of A Magnetically Actuated CubeSat - Walker Cohen Putman

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

See

discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/258340123

Fuzzy Logic Attitude Control of a Magnetically


Actuated CubeSat
Conference Paper August 2013
DOI: 10.2514/6.2013-5059

CITATIONS

READS

102

3 authors, including:
Phil Putman

Kelly Cohen

Sierra Lobo, Inc.

University of Cincinnati

29 PUBLICATIONS 168 CITATIONS

209 PUBLICATIONS 1,016 CITATIONS

SEE PROFILE

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

https://www.researchgate.net/publication/304087998_Genetically_Tuned_LQR_Based_Path_Following_for_UA

View project

All in-text references underlined in blue are linked to publications on ResearchGate,


letting you access and read them immediately.

Available from: Kelly Cohen


Retrieved on: 29 October 2016

Fuzzy Logic Attitude Control of a Magnetically Actuated


CubeSat
Alex R. Walker1 and Kelly Cohen2
University of Cincinnati, Cincinnati, Ohio, 45219
Phil Putman3
Sierra Lobo, Inc., Milan, Ohio, 44846

CubeSats have become a viable means by which to conduct a variety of small-scale


experiments in space. They are relatively inexpensive to build and launch, but the limited size
of CubeSats poses some design challenges. For CubeSat missions requiring active 3-axis
attitude control, magnetorquers have been a more common means of actuation due to their
small size, weight, and power requirements. However, 3-axis magnetic actuation has only been
proven to allow periodic controllability, not time-instantaneous controllability. The present
work applies a fuzzy classifier system to a PD-type control law for a 3-axis magnetically
actuated CubeSat subject to gravity gradient torque.

Nomenclature

cD
cP
,
,
,
,
D

Ix
Iy
Iz
KD
KP

P
/
/

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

magnetic field vector


magnetic field magnitude in spacecraft x-axis
magnetic field magnitude in spacecraft y-axis
magnetic field magnitude in spacecraft z-axis
gain applied to output of derivative gain fuzzy inference system (FIS)
gain applied to output of proportional gain fuzzy inference system (FIS)
gain applied to angular error input of derivative gain fuzzy inference system (FIS)
gain applied to angular velocity input of derivative gain fuzzy inference system (FIS)
gain applied to angular error input of proportional gain fuzzy inference system (FIS)
gain applied to angular velocity input of proportional gain fuzzy inference system (FIS)
derivative gain applied to fuzzy PD control law
moment of inertia tensor
principal moment of inertia corresponding to spacecraft x-axis
principal moment of inertia corresponding to spacecraft y-axis
principal moment of inertia corresponding to spacecraft z-axis
derivative gain fuzzy inference system (FIS) also represents output of this FIS
proportional gain fuzzy inference system (FIS) also represents output of this FIS
magnetic moment vector
magnetic moment magnitude in spacecraft x-axis
magnetic moment magnitude in spacecraft y-axis
magnetic moment magnitude in spacecraft z-axis
specific gravitational constant for Earth (4 2 AU3/year2)
proportional gain applied to fuzzy PD control law
distance from spacecraft center of gravity to Earths center of gravity
distance from spacecraft center of gravity to Earths center of gravity in spacecraft x-axis

Student, School of Aerospace Systems, University of Cincinnati, 2600 West Clifton Ave., AIAA Student Member.
Associate Professor of Aerospace Engineering, School of Aerospace Systems, University of Cincinnati, 2600 West
Clifton Ave., AIAA Member.
3
Senior Research Scientist, Technology Development and Engineering Center, 11401 Hoover Road..
1
American Institute of Aeronautics and Astronautics
2

,1

,
,y
,

,
,
,

= distance from spacecraft center of gravity to Earths center of gravity in spacecraft y-axis
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

distance from spacecraft center of gravity to Earths center of gravity in spacecraft z-axis
quaternion with parameters 2-3 corresponding to Euler axis
first parameter of quaternion corresponding to transformation from current frame to desired frame
control torque vector
control torque magnitude in spacecraft x-axis
control torque magnitude in spacecraft y-axis
control torque magnitude in spacecraft z-axis
desired torque calculated from control law
gravity gradient torque magnitude in spacecraft x-axis
gravity gradient torque magnitude in spacecraft y-axis
gravity gradient torque magnitude in spacecraft z-axis
torque exerted about spacecraft x-axis
torque exerted about spacecraft y-axis
torque exerted about spacecraft z-axis
vector of 3 Euler axis parameters of error quaternion
angular velocity vector in spacecraft body-fixed frame
body-fixed angular rate in spacecraft x-axis
body-fixed angular rate in spacecraft y-axis
body-fixed angular rate in spacecraft z-axis
rate of change of body-fixed angular rate in spacecraft x-axis
rate of change of body-fixed angular rate in spacecraft y-axis
rate of change of body-fixed angular rate in spacecraft z-axis

I.

Introduction

HE problem of fully magnetic actuation for satellite attitude control has been studied over the past two decades.
One of the first authors to extensively investigate the solely magnetic attitude control problem was Wisniewski,
who obtained his Ph.D. in the area1. Wisniewski investigated infinite quadratic cost, finite quadratic cost, and
constant gain quadratic cost controllers using linearized system models. He also investigated Lyapunov methods for
three-axis stabilization and the B-dot algorithm for detumble. Ultimately, the B-dot algorithm and the constant gain
quadratic cost controller were utilized with provisions for special attitude cases for the rsted satellite, the satellite
with which Wisniewski worked1. The constant gain algorithm was chosen for its computational efficiency and fairly
good performance with respect to the other three-axis stabilization algorithms investigated1.
The application of a proportional-derivative-like control law to the attitude control problem has been known to be
asymptotically stabilizing for the case where control torques are always available in three linearly independent
directions; however, magnetic actuation only allows for the application of control torques in two linearly independent
directions at any one time. The proportional-derivative-like control problem has been examined for the case of
magnetic actuation in Ref. 2. Essentially, it was found that solely magnetically actuated attitude control of a satellite
with a proportional-derivative-like feedback control law allows global asymptotic stability as long as the proportional
and derivative gains are scaled appropriately with respect to one another and assuming the magnetic field varies
periodically with time, which is generally a good assumption for a satellite in a Keplerian orbit 2,3.
Guerrant thoroughly investigated the use of the B-dot and the proportional-derivative-like control law for control
of a 10 cm X 10 cm X 10 cm CubeSat4. In his thesis, he took into account delays for computational time and magnetic
field measurement. The measurement/actuation time, the proportional gain, and the derivative gain were optimized
for a three-axis stabilizing control law. It was found that the control law allowed pointing accuracies of about ten
degrees and settling times on the order of an hour or two, even with substantial measurement and state estimation
noise4.
The application of fuzzy logic to the problem of magnetic attitude control of a CubeSat is appropriate, because the
system is inherently nonlinear and time-varying. The basic proportional-derivative control law can be expressed in an
intuitive, linguistic manner. Essentially, the PD law aims to rotate the spacecraft from its present attitude to a desired
attitude about the Euler axis of rotation between the two attitudes while simultaneously minimizing the total system
angular velocity. The restrictions on the size of the gain terms with respect to one another, such that the system is
asymptotically stable, can also be captured in a fuzzy system.
2
American Institute of Aeronautics and Astronautics

Use of a genetic algorithm (GA) to tune the fuzzy inference controller, i.e. a fuzzy classifier system, is appropriate
to design a fuzzy attitude controller, because the design of a fuzzy inference system generally follows a guess and
check method, and a genetic algorithm can automate, thus expediate this process. Additionally, the GA converges on
a solution that minimizes a defined cost function. Such a cost function can be used to ensure that the resulting solution
satisfies desired qualities, such as minimum convergence time and minimum average state error.

II.

System Model

The satellite is modeled as a rigid body whose principal moments of inertia align with the spacecraft body axes.
The Euler equations for rigid body motion describe the time-variation of the body-fixed angular rates given any initial
state of rotation of a rigid body and a time-history of external torques in the body-fixed frame5:

(
)


) +
[ ] = (


(
)
[

]
[
]

(1)

The external torques present in this equation consist of the gravity gradient torque and the magnetic control torque.
The magnetic control torque results from an interaction of the local magnetic field with the magnetorquers, which are
coils of wire through which an electric current passes in order to produce a magnetic moment on the local magnetic
field. The magnetic moment vector crossed with the local magnetic field vector yields the magnetic control torque:

0
,
= [, ] = [ ] = [
=
,


] [ ]

(2)

The gravity gradient torque results from the slight variation in the principal moments of inertia of the spacecraft.
Derivation of the mathematical expression for this torque can be found in Ref. 5:
/

( )
,

[, ] = 3
[ / / ( ) ]
/ 5

,
/ /
( )

(3)

The quaternion attitude representation utilizes a linear time-varying equation to propagate the time-varying attitude
of a rotating body with respect to time. Using the time-history of angular rates, the time-history of the quaternion
attitude representation can be calculated using:
0
1
= (
2



)
0

Mass properties for the spacecraft considered are detailed in table 1, below.
Table 1. Mass properties of simulated CubeSat.

Axis of Intertia
Ix
Iy
Iz

Moment of Inertia (kg-m2)


8.81710-4
9.80410-4
10.3510-4
3

American Institute of Aeronautics and Astronautics

(4)

Modeling of the orbital dynamics was accomplished by using the modified SGP4 algorithm suggested by Vallado
in Ref. 6 and provided on his website. The two-line element set (TLE) utilized in conjunction with the SGP4 algorithm
to generate a simulated orbit was that of the Raiku spacecraft, a CubeSat launched from the International Space Station
in late 2012.
Furthermore, modeling of the Earths magnetic field was accomplished by using the 13 th order 2010 International
Geomagnetic Reference Field (IGRF) model with secularly varying terms. Efficient algorithms for calculating the
magnetic field utilizing this model are given in Ref. 7.
The overall control algorithm, following the general structure of Guerrants algorithm, utilizes a measurement
phase followed by a constant-value actuation phase. Between the two phases, a time delay of 0.1 seconds simulates
the time necessary for the attitude control computer to calculate the required output, and another time delay of 0.1
seconds simulates the time necessary to turn off the magnetorquers. The control algorithm repeats indefinitely.
The effects of noisy measurement and state estimation were not taken into consideration in the design of the PDlike fuzzy attitude controller.

III.

Fuzzy Classifier System Setup

The static PD attitude control law multiplies the angular rate error by a constant derivative gain, multiplies the
Euler-axis portion of the error quaternion by a constant proportional gain, sums the two quantities, and uses the
negative of the result, modified by the inverse of the moment of inertia tensor, as a desired torque. This desired torque
vector is mapped to its projection on the plane perpendicular to the magnetic field, using equations 8 and 9, which
were first suggested by Wisnewski.
The fuzzy system utilizes this same structure but incorporates gain scheduling based on Euler axis angular error
and spacecraft total angular rate. Equations 5-9 describe the fuzzy gain scheduling, including pre-scaling of the inputs
to a normalized range. Additionally, because the outputs of the fuzzy inference systems are on a normalized range,
they are post-muliplied by an appropriate gain.

= (min {, [1 |1

2
cos 1 (,1 )|] , 1} ; min{, |
|, 1})

(5)

= (min {, [1 |1

2
cos 1 (,1 )|] , 1} ; min{, |
|, 1})

(6)

= 1 (
+ )
=


| |2

(7)
(8)
(9)

The pre- and post-multiplication gains are determined using the fuzzy classifier system. Each gain is represented
in the classifier system as a power of ten and a constant decimal value less than ten, combined in scientific notation.
The fuzzy classifier system is also tasked with tuning the input and output membership functions. However, to reduce
the solution complexity, only triangular membership functions are used, each input and each output has three
membership functions, and most of the membership function defining parameters are fixed.
The first input membership function has its first minimum at -0.5 and its maximum at 0. The third input
membership function has its maximum at 1 and its second minimum at 1.5. The other input membership function
parameters are restricted to lie within the range [0 1]. Fuzzification only considers values on the range [0 1].
The first output membership function is centered at 0. The third output membership function is centered at 1. The
second output membership function is centered on the range [0 1]. Additionally, all output membership function halfwidths (first minimum to maximum) are restricted to the range [0 0.5]. Defuzzification only utilizes membership
values on the range [-0.5 1.5].
This fuzzy inference system architecture only has nine combinations of the two inputs per each fuzzy inference
system. Therefore, only nine rules per fuzzy inference system are needed to map input membership functions to output

4
American Institute of Aeronautics and Astronautics

membership functions. The classifier system is allowed to assign one of three of the output membership functions or
no output membership function for each unique combination.
In addition to tuning the fuzzy input/output gains, membership function parameters, and rule base, the fuzzy
classifier system was also tasked with tuning the measurement and actuation times. Each time has an upper limit of
63 seconds (maximum binary value) and a lower limit of 10 seconds (imposed by algorithm check).
Parameters limited to the range [0 0.5] are only allowed to take binary values 0 to 31 and are thus 5-digit binary.
Parameters limited to the range [0 1] as well as the timing parameters are only allowed to take binary values 0 to 63,
and are thus 6-digit binary. The powers of ten of the gains are restricted to 3-digit binary (+4/-3 from a nominal
predetermined value), and the constant decimal multipliers are restricted to 2-digit decimal (corresponding to a ones
place and a tenths place). The fuzzy rule base for each inference system is limited to a 9-digit quaternary number,
where 0 corresponds to no rule applied.
With different data types in the same string, single point crossover is not a viable option. Instead, two point
crossover is used. Additionally, because of the large search space, the classifier system is chosen to have a high
mutation rate (30%) to search a wide range of possible solutions. However, a high mutation rate usually prevents
convergence on a solution, so elitist selection is utilized to keep the two best members of each generation. Population
size is kept to 50 members, plus the two best members of the previous generation (i.e. 50 for the first generation and
52 for each subsequent generation). Members are selected for breeding with roulette wheel style selection.
The classifier system is set to minimize a sum of terms proportional to the last time that total pointing error is
greater than ten degrees, the average pointing error, and the average angular rate. Each simulation is run for 10 hours
of simulation time. Initially, the population is set to a random set of 50 members.

IV.

Results and Discussion

With the initial random population, the best solution does not posess the desired settling characteristics. The initial
candidate controllers tend to make the system unstable. After a solution is close to that desired, the best solution of
each generation can be tracked to see this progression. Figures 1 to 3 show the improvements in pointing error over
generation. Figures 4 to 6 show the improvements in angular velocity over generation.

Figure 1. Initial start to classifier system convergence attitude angular error.

5
American Institute of Aeronautics and Astronautics

Figure 2. Continued classifier system convergence attitude angular error.

Figure 3. Near-steady-state classifier system convergence attitude angular error.

Figure 4. Initial start to classifier system convergence angular rate error.

6
American Institute of Aeronautics and Astronautics

Figure 5. Continued classifier system convergence angular rate error.

Figure 6. Near-steady-state classifier system convergence angular rate error.

Convergence to an acceptable solution was observed within about 90 generations. This took approximately three
days on a laptop computer with 16 GB RAM and an Intel COREi7 processor. The results show strong similarity to
similar PD-type solutions, including LQR designs for magnetic attitude control. Settling times and steady state
behavior are similar.

V.

Conclusion

A fuzzy classifier system was utilized to tune a fuzzy gain scheduling PD-type controller for magnetically actuated
attitude control of a CubeSat. The results show convergence to the desired attitude within about an hour and a half
from an initial attitude error of sixty degrees. This result is in line with previous PD-type control laws applied to this
problem, including LQR controllers.

References
Wisniewski, R., Satellite Attitude Control Using Only Electromagnetic Actuation, Ph.D. Thesis, Dapartment
of Control Engineering, Aalborg University, Aalborg , Denmark, December 1996.
2
Lovera, M. and Astolfi, A., Spacecraft Attitude Control Using Magnetic Actuators, Automatica, Vol. 40, 2004,
pp. 1405-1414.
3
Bhat, S. P., Controllability of Nonlinear Time-Varying Systems: Applications to Spacecraft Attitude Control
Using Magnetic Actuation, IEEE Transactions on Automatic Control, Vol. 50, No. 11, November 2005.
4
Guerrant, D. V., Design and Analysis of Fully Magnetic Control for Picosatellite Stabilization, Masters Thesis,
California Polytechnic State University, San Luis Obispo, CA, 2005.
1

7
American Institute of Aeronautics and Astronautics

Sidi, M. J., Spacecraft Dynamics & Control: A Practical Engineering Approach, Cambridge, Neq York, NY,
1997.
6
Vallado, David A., Paul Crawford, Richard Hujsak, and T.S. Kelso, "Revisiting Spacetrack Report #3," presented
at the AIAA/AAS Astrodynamics Specialist Conference, Keystone, CO, 2006 August 2124.
7
Wertz, J. R., Spacecraft Attitude Determination and Control, Reidel, Dordrecht, Holland, 1978.

8
American Institute of Aeronautics and Astronautics

You might also like