SlideShare una empresa de Scribd logo
1 de 135
Descargar para leer sin conexión
DEVELOPING A GENERAL FRAMEWORK FOR A
TWO STAGED ARTIFICIAL POTENTIAL CONTROLLER
By
TRISTAN J. NEWMAN
A THESIS PRESENTED TO THE GRADUATE SCHOOL
OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT
OF THE REQUIREMENTS FOR THE DEGREE OF
MASTER OF SCIENCE
UNIVERSITY OF FLORIDA
2015
© 2015 Tristan J. Newman
To my colleagues, friends, and family.
4
ACKNOWLEDGMENTS
I would like to thank my research advisor, Dr. Norman Fitz-Coy, who believed in
me from the beginning; Dr. Josue Muñoz, who offered me his fantastic mentorship
during a research fellowship in New Mexico; and Roxanne Rezaei, my lovely wife who
has graced me with her unwavering support throughout my research and my studies. I
would also like to thank the department of Mechanical and Aerospace Engineering for
affording me the opportunity to study and do research, and all of the faculty and staff
within it who worked so hard to ensure that I was equipped with all of the tools
necessary to see it through.
5
TABLE OF CONTENTS
Page
ACKNOWLEDGMENTS.................................................................................................. 4
LIST OF TABLES............................................................................................................ 7
LIST OF FIGURES.......................................................................................................... 8
LIST OF ABBREVIATIONS............................................................................................. 9
ABSTRACT ................................................................................................................... 10
CHAPTER
1 INTRODUCTION................................................................................................ 12
Foreword ............................................................................................................ 12
A Note on Notation ............................................................................................. 13
Background ........................................................................................................ 14
Optimal Controls ...................................................................................... 14
Workspace-Discretized Pathfinding ......................................................... 20
Method of Lyapunov ................................................................................ 22
2 MATHEMATICAL OVERVIEW ........................................................................... 26
Vector Operations in Linear Algebra................................................................... 26
Body Rotations and Quaternion Math................................................................. 28
Derivatives of (and With Respect to) Multi-Dimensional Quantities.................... 32
3 METHODOLOGY ............................................................................................... 35
Formal Definition of an APF................................................................................ 35
Defining the Error States .................................................................................... 37
The Unconstrained Case.................................................................................... 39
General Constraints............................................................................................ 43
First Stage Repulsive Potential................................................................ 44
Second Stage Repulsive Potential........................................................... 49
4 IMPLEMENTATION............................................................................................ 54
Notable Constraints............................................................................................ 54
The Pointing Constraint ........................................................................... 54
The Slew Rate Constraint........................................................................ 59
Early Avoidance....................................................................................... 60
Developing a MatLab®
Simulation ...................................................................... 70
Dynamics................................................................................................. 70
6
Integration................................................................................................ 71
Processing............................................................................................... 73
5 CONCLUSION.................................................................................................... 75
A Quasi-Real World Example............................................................................. 75
Unconstrained Simulation Results........................................................... 79
Partially Constrained Simulation Results ................................................. 82
Fully Constrained Simulation Results ...................................................... 85
A Note on Second Stage Potentials......................................................... 88
Topics for Future Research ................................................................................ 89
Considerations for Physical Actuation Devices........................................ 89
The State Vector Escort Problem ............................................................ 92
Mitigation of Local Extrema...................................................................... 93
Afterword ............................................................................................................ 99
APPENDIX
A USEFUL MATRIX DERIVATIVES .................................................................... 100
Proof 1.............................................................................................................. 100
Proof 2.............................................................................................................. 101
Proof 3.............................................................................................................. 102
Proof 4.............................................................................................................. 103
Proof 5.............................................................................................................. 105
Proof 6.............................................................................................................. 106
Proof 7.............................................................................................................. 107
Proof 8.............................................................................................................. 109
Proof 9.............................................................................................................. 111
B MISCELLANEOUS PROOFS AND LEMMAS .................................................. 112
Proof 1.............................................................................................................. 112
Proof 2.............................................................................................................. 113
Proof 3.............................................................................................................. 114
Proof 4.............................................................................................................. 116
Proof 5.............................................................................................................. 117
Proof 6.............................................................................................................. 119
Proof 7.............................................................................................................. 121
Proof 8.............................................................................................................. 123
C MATLAB®
SIMULATION CODE ....................................................................... 125
LIST OF REFERENCES ............................................................................................. 133
BIOGRAPHICAL SKETCH.......................................................................................... 135
7
LIST OF TABLES
Table Page
2-1 Summary of derivatives discussed in Chapter 2................................................. 34
4-1 Logic term values across three regions in the gamma domain........................... 66
8
LIST OF FIGURES
Figure Page
1-1 Illustration of “attitude forbidden” and “attitude mandatory” zones...................... 15
1-2 Example of A* pathfinding with workspace discretization ................................... 22
3-1 Abstracted potential function with six sample points and two minima................. 35
3-2 Relative orientations of inertial, body, and tracking frames................................. 38
3-3 Dependency chart for the generalized control solution....................................... 53
4-1 Setup for the early avoidance pathway............................................................... 62
4-2 Illustration of the double conic problem .............................................................. 64
4-3 Variation in the logic term over the middle gamma domain ................................ 66
4-4 Illustration of the solution to the double conic problem....................................... 66
4-5 Sample profiles of the early avoidance potential ................................................ 67
5-1 AbstractoSat illustration...................................................................................... 75
5-2 Origin and terminus points for AbstractoSat sensors.......................................... 78
5-3 Results of the unconstrained simulation ............................................................. 80
5-4 Paths traced by sensor vectors in the unconstrained simulation ........................ 81
5-5 Results of the first pointing constraint simulation................................................ 83
5-6 Paths traced by sensor vectors in the first pointing constraint simulation........... 84
5-7 Results of the second pointing constraint simulation.......................................... 86
5-8 Paths traced by sensor vectors in the second pointing constraint simulation ..... 87
5-9 Demonstration of simulation hang-up induced by nearby local extrema............. 95
9
LIST OF ABBREVIATIONS
Angular Momentum
Exchange Device
(AMED)
An internal device on board a satellite which redistributes
angular momentum, resulting in imparted torque.
Artificial Potential
Function (APF)
A scalar function of the spacecraft’s orientation and/or angular
velocity which determines the values of the controller output.
Control Moment
Gyroscope (CMG)
A type of AMED which redistributes angular momentum by
rotating at a fixed rate along a variable direction.
Direction Cosine
Matrix (DCM)
A 3x3 matrix containing parameters which fully specify the
rotation of one coordinate system with respect to another.
Nth
Time Derivative
(TDN)
A shorthand way of describing the operation 𝑑 𝑁
𝑑𝑡 𝑁⁄
(e.g. TD1 means “first time derivative”).
Ordinary Differential
Equation (ODE)
An equation containing a function of one independent variable
and its derivatives.
Potential Rate
Transform (PRT)
A 3x1 vector which converts relative angular velocity into a
rate of change for first-stage APFs.
Reaction Wheel
Assembly (RWA)
A type of AMED which redistributes angular momentum by
rotating at a variable rate along a fixed direction.
Runge-Kutta (RK)
Method
A method of numerical integration which solves an ODE where
the independent variable is separable from its derivative.
10
Abstract of Thesis Presented to the Graduate School
of the University of Florida in Partial Fulfillment of the
Requirements for the Degree of Master of Science
DEVELOPING A GENERAL FRAMEWORK FOR A
TWO STAGED ARTIFICIAL POTENTIAL CONTROLLER
By
Tristan J. Newman
August 2015
Chair: Norman Fitz-Coy
Major: Aerospace Engineering
Although there are many control options available to satellite manufacturers,
artificial potential functions (APF) provide an analytical and computationally inexpensive
way for a satellite to perform multiple tasks simultaneously. By expressing mission
constraints as a series of APFs and combining the results, a control solution can always
be evaluated.
The goal of my research was to develop a general framework which evaluates
the control solution from a generalized combination of arbitrary constraints. Developing
a general framework is attractive because of its flexibility in adapting a control solution
to a landscape where the constraints may be subject to change based on the needs of
the mission.
Separating the control system into two stages – one for attitude/orientation, and
one for angular velocity – was necessary to decouple those states. The first stage
determines the angular velocity required by the spacecraft, and the second computes
the torque necessary to reach the desired state.
11
The newfound flexibility provided by this framework makes it possible to add
constraints to a control solution with unprecedented ease and efficiency. The primary
example focused on in this document is the “pointing constraint problem” – a classic
problem in spacecraft attitude control.
The research done here suggests that a wide range of uses may exist for APF
controls and including slew-rate constraints and early avoidance of pointing constraint
boundaries. Future research will be necessary to solve some issues with this approach
– particularly in the implementation of second-stage potentials. It is believed that solving
these problems will greatly increase the effectiveness of nonlinear control systems by
sparing time and control effort. Overcoming these barriers may very well lead to APF
controls becoming a valuable asset for satellites with limited computational resources.
12
CHAPTER 1
INTRODUCTION
Foreword
On-orbit attitude change maneuvers can be regarded as the astrodynamical
equivalent of looking over one’s shoulder. There are many ways to control such a
maneuver, and some are more efficient than others at the expense of higher
computational overhead. However, for such maneuvers there is a need to balance
efficiency with speed. To carry the human analogy one step farther, consider an
individual observing a plane as it flies through the daytime sky. If the plane were to fly in
front of the sun, we assume that it would cause the onlooker some discomfort if they
were to continue tracking it.
The “maneuver” performed here can be regarded as a tracking slew from one
orientation to another. However, this maneuver is subject to a “keep-out constraint” –
that is, there is a “sensor” (in this case, the onlooker’s eyes), and a direction along
which that sensor should not be directed. A buffer about this vector defines a conic
region known as the “keep-out cone.” The keep-out constraint is designed to prevent
the sensor from being directed along any vector within the keep-out cone.
To return to the human analogy, although the experiment would depend on some
unquantifiable parameters such as the pain-tolerance of the participant, or their
willingness to carry out the experiment, a surface-level reconstruction of this scenario
might show that one would instinctively avoid looking directly at the sun as the plane
crosses over its disk.
13
The operative distinction here is “instinctively,” which would imply that executing
the maneuver requires little-to-no effort on the part of the onlooker. Although it would
not necessarily follow an optimal path, the maneuver would, ideally, have little impact on
the performance of the onlooker’s mission (for example, perhaps they were commuting
to work). This example therefore illustrates the attractiveness of computationally
inexpensive maneuvers in the context of satellite control systems.
If a satellite was to be designed which could carry out a tracking maneuver
subject to the keep-out constraint, there would be several options for the control system.
In particular, three methods appeared predominantly in my research: (i) the time (or
energy) optimized control solution [1]; (ii) the workspace-discretized pathfinding solution
[2]; and (iii) the nonlinear control solution based on the method of Lyapunov [3], [4].
This document will primarily focus on the method of Lyapunov, and the concept
of artificial potential functions (APF) which stems from it. It will be shown that APF
controls provide an analytical - and therefore computationally inexpensive - way of
navigating the “field” of constraint boundaries. However, a brief study of other pre-
existing methods is necessary in order to fully appreciate the comparative efficiency of
APF controls.
A Note on Notation
Because of the breadth of subjects covered in this document, a single notation
will be used to avoid confusion. Equations brought in from other sources will thus have
their notation modified to fit this standard: All quantities will be hereafter be identified as
“scalar” – with no distinguishing marks (e.g. 𝑠 ∈ ℝ) – “vector” – marked with a single
underline (e.g. 𝑣 ∈ ℝ 𝑛
) – or “matrix” – marked with two underlines (e.g. 𝑀 ∈ ℝ 𝑛×𝑚
).
14
Because there will be such a heavy focus on linear algebra throughout this
document, the word “vector” may be used to refer to any matrix where either of the
dimensions are 1 (if both dimensions are 1, the quantity may be referred to as a scalar
instead), in which case the term “row vector” or “column vector” will be used in the case
where the number of rows or columns of said matrix are 1, respectively.
Any quantity underlined once in any of the equations appearing hereafter is
implicitly a column vector. If a row vector is to be used, the vector will be transposed as
such: 𝑣 is a column vector; 𝑣 𝑇
is a row vector. Furthermore, a “hat” over a vector with
any number of dimensions (e.g. 𝑣̂) will serve to indicate the vector is of unit length (i.e.
the scalar components of the vector are unitless and the magnitude is equal to one).
To avoid excessive notation, all physical vectors (e.g. directions in space,
angular velocities, torques, etc.) are all implicitly parameterized in the body-fixed
coordinate frame of the satellite unless otherwise noted. If it is necessary, the frame in
which the vector is parameterized will be noted with an upper-left superscript (e.g. 𝑣𝑁
).
Finally, the first time derivative (TD1) of any quantity will be represented with a
single dot (e.g. 𝑑𝑠 𝑑𝑡⁄ = 𝑠̇), the second time derivative (TD2) will be represented with
two dots (e.g. 𝑑2
𝑣 𝑑𝑡2⁄ = 𝑣̈), and so on.
Background
Optimal Controls
Summary. The optimal control solution is perhaps the most difficult one to derive
and implement. This difficulty arises because it must not only solve the problem, but do
so while minimizing a parameter of the satellite designer’s choice.
15
Unsik Lee and Mehran Mesbahi derived such a solution; minimizing either
maneuver time, or energy expenditure requirements for the maneuver using Gauss’s
pseudospectral method [1].
Citing the need for “…avoiding undesirable orientations with respect to celestial
objects…” as “…essential for science missions [1],” the problem described is exactly
the keep-out problem analogized in the “watching planes” example. As a point of
interest, [1] was mentioned to be a follow-up on research done by Lee and Mesbahi
regarding the use of Lyapunov potential functions to perform similar maneuvers [4].
As in [4], Lee and Mesbahi parameterize the rotation of the spacecraft with unit
quaternions, where any quaternion defines an attitude that the spacecraft may occupy.
Although there are an infinite number of attitudes that the spacecraft can occupy, there
exists a finite number of discrete zones, corresponding “attitude forbidden” (the keep-
out cones described in Chapter 1), and “attitude mandatory” (a conic region similar to a
keep-out cone, but whose role is reversed such that a body-fixed direction is meant to
stay within it rather than outside of it) [1]. An example for each type of zone is illustrated
in Figure 1-1 (the illustrations themselves taken from [1]).
A B
Figure 1-1. A) Illustration of an “attitude forbidden” zone [1].
B) Illustration of an “attitude mandatory” zone [1].
16
The cost function to be minimized is
𝐽 = ∫ (𝜌 + (1 − 𝜌)| 𝑢( 𝑡)|) 𝑑𝑡
𝑡 𝑓
𝑡0
(1-1)
where 𝑢( 𝑡) is a 3-element vector containing the control torques for each reaction wheel
[1], and 𝜌 is “a weighting factor on the time, where 𝜌 = 0 and 𝜌 = 1 yield the energy
optimal and time optimal performance cost, respectively [1].”
Equation 1-1 is subject to the following constraints:
𝑞̇( 𝑡) =
1
2
𝑞( 𝑡) ⊗ 𝜔̃( 𝑡), (1-2)
𝐽𝜔̇ ( 𝑡) = (𝐽𝜔 + 𝐽𝑟 𝜔 𝑟) × 𝜔 − 𝐽𝑟 𝑢, (1-3)
𝜔̇ 𝑟 = 𝑢 (1-4)
where “𝑞( 𝑡) is the unit quaternion representing the attitude of the rigid body at time 𝑡”,
“𝜔( 𝑡) ∈ ℝ3
denotes the angular velocity of the spacecraft in the body frame”, “𝜔̃( 𝑡) =
[𝜔 𝑇
0]4×1
𝑇
”, “ 𝐽 = diag( 𝐽1, 𝐽2, 𝐽3) denotes the [centroidal] inertia matrix of the spacecraft
in the body frame”, and “𝐽𝑟 = diag( 𝐽𝑟1, 𝐽𝑟2, 𝐽𝑟3) denotes the inertia matrix of the
spacecraft’s reaction wheels in the body frame [1].”
Lee and Mesbahi require the spacecraft to follow a “rest to rest” profile – i.e. the
maneuver begins (at time 𝑡 = 𝑡0) and ends (at time 𝑡 = 𝑡𝑓) with zero angular velocity.
The spacecraft’s reaction wheels are likewise assumed to be initially at rest. Thus, the
maneuver observes the following boundary conditions:
𝑞( 𝑡0) = 𝑞𝑡0
; 𝑞(𝑡𝑓) = 𝑞𝑡 𝑓
; 𝜔( 𝑡0) = 0; 𝜔(𝑡𝑓) = 0; 𝜔𝑟( 𝑡0) = 0. (1-5)
17
In addition to boundary conditions, there are three constraints on the control and
angular velocity of the spacecraft [1] which exist to prevent saturation of the reaction
wheels or harmonic oscillation of nonrigid components:
|𝑢𝑖| ≤ βu; (1-6)
|𝜔𝑖| ≤ 𝛽 𝜔; (1-7)
|𝜔𝑟 𝑖
| ≤ 𝛽 𝜔 𝑟
; (1-8)
for 𝑖 = 1, 2, 3 [1].
Finally, there are constraints corresponding to each attitude forbidden zone, and
the attitude mandatory zone [1]. These are represented by a known matrix 𝑀 that is a
function of spatial geometry. Each 𝑀 satisfies the inequality constraint
𝑞 𝑇
𝑀 𝑓 𝑖
𝑞 < 0 (1-9)
for the 𝑖th
forbidden zone (where 𝑖 = 1, … , 𝑛 [1]), and
𝑞 𝑇
𝑀 𝑚 𝑞 > 0 (1-10)
for the lone attitude mandatory zone [1].
The solution to the optimal control problem defined by Eqs. 1-2 through 1-10 was
determined by “a Gauss pseudospectral method (direct optimal control method) using
the open source optimal control software GPOPS®
in conjunction with the nonlinear
programming problem solver SNOPT®
and the automatic differentiator INTLAB®
[1].”
Gauss pseudospectral method is described as: “a class of direct collocation
methods where the optimal control problem is transcribed into a nonlinear programming
problem (NLP) by approximating the state and control states using global orthogonal
polynomials and collocating the differential dynamic equations on Legendre-Gauss
18
collocation points [1].” Reference [5] expounds more upon the details of pseudospectral
methods, including Legendre-Gauss collocation.
Because collocation methods such as this are only valid on the range [−1, 1],
the generalized time interval 𝑡 = [𝑡0, 𝑡𝑓] is transformed using
𝜏 =
2𝑡 − 𝑡𝑓 − 𝑡0
𝑡𝑓 − 𝑡0
. (1-11)
The derivation completes as follows:
The states [sic] 𝑞( 𝜏) is approximated by the polynomial 𝑞̃( 𝜏) using a basis of
𝑁 + 1 Lagrange interpolating polynomials on the time interval of [−1, 1] as
𝑞( 𝜏) ≈ 𝑞̃( 𝜏) = ∑ 𝑞( 𝜏𝑖) 𝐿𝑖( 𝜏𝑖)
𝑁
𝑖=0
where 𝐿𝑖( 𝜏) is the 𝑖th
Legendre polynomial defined as
𝐿𝑖( 𝜏) = ∏
𝜏 − 𝜏𝑗
𝜏𝑖 − 𝜏𝑗
𝑁
𝑗=0,𝑗≠𝑖
, ( 𝑖 = 0, … , 𝑁).
The derivative of the state approximation is similarly obtained as
𝑞̇( 𝜏) ≈ 𝑞̃̇( 𝜏) = ∑ 𝑞̃( 𝜏𝑖) 𝐿̇ 𝑖( 𝜏𝑖)
𝑁
𝑖=0
= ∑ 𝐷 𝑘,𝑖 𝑞̃( 𝜏𝑖)
𝑁
𝑖=0
where 𝐷 𝑘,𝑖 are element [sic] of non-square matrix 𝐷 ∈ ℝ 𝑁×(𝑁+1)
called Gauss
pseudospectral differentiation matrix … The performance cost in terms of 𝜏 is
approximated using a Gauss quadrature as
𝐽 =
𝑡𝑓 − 𝑡0
2
∑ 𝑤 𝑘(𝜌 + (1 − 𝜌)| 𝑢( 𝜏 𝑘)|)
𝑁
𝑘=1
where 𝑤 𝑘 are the Gauss weights. The above performance index together with
approximated constraints … lead to formulation of a nonlinear programming with
the initial and final states 𝑞( 𝑡0) = 𝑞̃( 𝜏0) and 𝑞(𝑡𝑓) = 𝑞̃(𝜏 𝑓), respectively, which
can be solved using SNOPT nonlinear solver [1].
19
Advantages and disadvantages. The greatest benefit of the optimal control
solution is that it is, in fact, optimal. This allows for satellites operating with such a
control system to complete large-slew maneuvers while holding to a variety of
constraints in as little time as possible, or expending as little energy as possible.
However, this benefit comes at a price. In computer science terms, the product
definition for the 𝑖th
Legendre polynomial implies that evaluating 𝐿𝑖( 𝜏) for 𝑁 collocation
points has a time complexity of 𝑂( 𝑁), as it is the product of 𝑁 terms (each with a time
complexity of 𝑂(1)). Furthermore, evaluating the state requires the summation of 𝑁 + 1
Legendre polynomials (modified by 𝑞( 𝜏)), implying that the evaluation of 𝑞̃( 𝜏) has a time
complexity of 𝑂( 𝑁2).
In addition, the first time derivative of 𝐿𝑖( 𝜏) requires the application of the product
rule 𝑁 times. Therefore, evaluating 𝐿̇ 𝑖( 𝜏) (and, by extension, 𝐷 𝑘,𝑖 [5]) also has a time
complexity of 𝑂( 𝑁2). However, since the evaluation of 𝑞̇( 𝜏) requires the summation of
𝑁 + 1 such terms, the overall time complexity for this section of the algorithm is 𝑂( 𝑁3).
This is only the time complexity involved in determining the quaternion rate at the
next collocation point. For all 𝑁 collocation points, the time complexity graduates to
𝑂( 𝑁4)! This complexity does not take into account operations done internally by the
SNOPT nonlinear solver, so 𝑂( 𝑁4) can be regarded as a minimum time complexity.
For comparison, a fully analytical method (such as the method of Lyapunov, as
will eventually be shown) has a time complexity of 𝑂(1). In other words, determining the
optimal control solution requires much dedication of onboard computational resources.
20
This may not be an issue for maneuvers wherein a small number of collocation
points can be used, as it can be inferred from Eq. 1-11 that short-duration maneuvers
do not progress as rapidly through the 𝜏 domain, and therefore fewer collocation points
may be used. Furthermore, larger satellites (such as GPS or military satellites) that
prioritize the speed in which a precise maneuver can be executed over the amount of
memory that maneuver takes may make better use of the optimal control solution
versus other, nonoptimal methods.
Workspace-Discretized Pathfinding
Summary. Another approach explored by Henri C. Kjellberg and E. Glenn
Lightsey discretizes the spherical space surrounding the spacecraft into hexagonal
segments to find “an admissible path between the attitude keep-out zone [using the] A*
pathfinding algorithm … chosen because of its ease of implementation [2].”
Since the workspace is discretized, each “pixel” (a single element of the unit
sphere) has its neighboring pixels identified pre-implementation and stored on-board. A
“path-cost function 𝑔(𝑝( 𝑘))” and “heuristic distance function ℎ(𝑝( 𝑘))” are defined where
𝑝( 𝑘) is the “pixel node at step 𝑘 [2].” The “distance-plus-cost function 𝑓(𝑝( 𝑘))” is
defined to be
𝑓(𝑝( 𝑘)) = 𝑔(𝑝( 𝑘)) + ℎ(𝑝( 𝑘)).
If a pixel is outside of the keep-out region (which [2] describes as “the prohibited
constraint set”), then the cost function is given by
𝑔(𝑝( 𝑘)) = 𝜃(𝑒( 𝑘), 𝑒( 𝑘 − 1)) + 𝑑 + 𝑔(𝑝( 𝑘 − 1)),
where 𝑒( 𝑘) is the vector difference between the “current” and “previous” pixels, and
𝜃(𝑒( 𝑘), 𝑒( 𝑘 − 1)) can be interpreted as the angle by which the path has deflected in the
21
previous two iterations, “thus penalizing a change in the eigenaxis vector direction … If,
however, the pixel is inside the prohibited constraint set, then 𝑔(𝑝( 𝑘)) = 𝑁, where 𝑁 is
an arbitrarily large constant to prevent a solution from going within the constrained
region [2].”
The heuristic distance function is the same regardless of whether or not a pixel is
inside the constrained region. If 𝑝( 𝑚) represents the “target” pixel, then the heuristic
distance is the angle that must be traversed in order to reach it [2]. Therefore
ℎ(𝑝( 𝑘), 𝑝( 𝑚)) = arccos[𝑣(𝑝( 𝑘)) ∙ 𝑣(𝑝( 𝑚))].
Having defined both cost functions, the A* algorithm can be run to find the path
that minimizes the total cost between the initial and final pixels. The algorithm as
described by Kjellberg and Lighsey
returns the set of pixels that provide an admissible, locally minimum path-cost [as
defined by the path-cost function 𝑓(𝑝( 𝑘))] trajectory for the desired rotation of the
vehicle’s body-fixed x axis to the new attitude. The pixels that have been
explored during this process are known as the closed set. The pixels that
constitute the final path are reduced by eliminating all pixels that lie along
approximately the same path on a great circle. The remaining pixels are “turning
points,” locations where the eigenaxis vector direction must change … The
resulting trajectory for a typical reorientation problem is shown in Figure 8 [of [2],
collated in Figure 1-2] for the vehicle’s body-fixed x axis [2].
Advantages and disadvantages. In contrast with the optimal control solution,
discretization becomes more efficient as the number of constraints increases. This is
because more constraints reduce the number of pixels accessible to the A* algorithm
[2]. However, it is worth noting that this method provides a solution that can be quite far
from optimal since the “cost function” being optimized relates to the A* algorithm instead
of the keep-out problem optimized by Lee and Mesbahi.
22
Figure 1-2. "Example x-axis reorientation trajectory resulting from the A* pathfinder
algorithm [2].”
However, Kjellberg and Lightsey note that “these advantages are particularly well
suited for small spacecraft, which have limited power and processing capabilities, yet
must meet many different attitude constraints [2].”
In terms of complexity, workspace discretization can be thought of as a middle
ground between optimality, and the computational efficiency of the Lyapunov’s method
for nonlinear control.
Method of Lyapunov
Summary. While the optimal control and workspace discretization methods
undoubtedly have their advantages, they are ultimately algorithmic approaches. The
optimal solution can only be approximated by introducing a finite number of collocation
23
points, and increasing the accuracy of the approximation drastically slows down its
computation. The workspace discretization method is purely algorithmic, requiring the
discretization of space around the satellite in order to be compatible with the A*
pathfinding algorithm proposed by Kjellberg and Lightsey.
In both cases, the time complexity of obtaining the solution depends on the
fidelity of the discretization (i.e. a better approximation can be obtained in both cases by
using either more collocation points, or more pixels respectively). An analytic and
closed-form solution has the benefit of being rapidly calculable, although the solution
obtained may not be optimal.
Colin McInnes describes a procedure to obtain such a solution: “The second
method of Lyapunov allows expressions for the required control torques to be obtained
analytically in closed form. Therefore, attitude control commands may be generated in
real time, so that the method may be suitable for autonomous, onboard operations [3].”
Defining “a scalar potential function 𝑉 … to be positive definite everywhere,
except at the target point of the system state space where it will vanish [3],”
𝑉 =
1
2
∑ 𝐼𝑖 𝜔𝑖
2
3
𝑖=1
+
1
2
∑ 𝜆(𝜃𝑖 − 𝜃𝑖)
2
3
𝑖=1
. (1-12)
Thus taking the first time derivative (TD1) of Eq. 1-12 yields
𝑉̇ = ∑ 𝜔𝑖 𝑇𝑖
3
𝑖=1
+ ∑ 𝜆𝜃̇ 𝑖(𝜃𝑖 − 𝜃̃𝑖)
2
3
𝑖=1
(1-13)
where “𝜔𝑖, 𝐼𝑖, 𝑇𝑖 (𝑖 = 1, … ,3) are the satellite body rate, moment of inertia, and control
torque about the 𝑖th principal axis”, and “the second term [of Eq. 1-12] represents an
24
artificial potential energy possessed by the system relative to the target attitude
(𝜃̃1, 𝜃̃2, 𝜃̃3) [3].”
Since 𝑉 takes on its minimum value (of zero) at the desired orientation and
angular velocity, the control solution 𝑇𝑖 should be specified such that 𝑉̇ (and Eq. 1-13 by
extension) is negative semidefinite [3]. “The choice of control is obviously nonunique;
however, the simplest control is selected as
𝑇𝑖 = −𝜅𝜔𝑖 − ∑ 𝐺𝑖𝑗
𝑇
𝜆𝑗(𝜃𝑗 − 𝜃̃𝑗)
3
𝑗=1
where the gain constants 𝜅 and 𝜆𝑖 (𝑖 = 1, … ,3 [sic]) will be chosen to shape the
maneuver [3].” The matrix 𝐺𝑖𝑗
𝑇
is a function of the spatial geometry of the system:
𝐺𝑖𝑗
𝑇
= [
1 sin 𝜃1 tan 𝜃2 cos 𝜃1 tan 𝜃2
0 cos 𝜃1 − sin 𝜃1
0 sin 𝜃1 sec 𝜃2 cos 𝜃1 sec 𝜃2
].
It can thus be shown that the target attitude is “the only attractive equilibrium point for
the system [3].”
In the context of “sun vector avoidance,” another scalar potential function must
be defined, although its exact form varies from author to author. McInnes uses
Gaussian functions “to represent the regions of high potential so that there are no
singularities in the potential and the controls are bounded [3].” Unsik Lee and Mehran
Mesbahi use “logarithmic barrier potentials [4].”
This is the point at which most research into APF-based controls diverges, as the
method of Lyapunov can be applied to many different potentials and constraints –
nearly all of which are defined differently from author to author. It is from here that my
own research branches off – away from the background material discussed thus far.
25
Advantages and disadvantages. It is hopefully apparent from this summary of
Lyapunov’s method that there is no one way to solve a constrained maneuver problem,
as doing so is nearly as much of an art as it is a science, which may be seen as either a
disadvantage (as some other methods yield concretely defined solutions with easily
understood physical significance), or a great advantage (since there are often as many
different ways to solve a problem using APFs, each with its own set of advantages and
disadvantages). However, it should be disclosed that the solution can never be said to
be optimal, no matter what APF is chosen.
The lack of optimality should really only be seen as a barrier to use in the case of
satellites for which quickly executing a maneuver is more important than sparing on-
board computational resources for more (subjectively) “important” tasks. For example, a
satellite conducting a survey of overhead constellations may not need to slew in an
optimal manner, but if the processor on board only has limited processing capability
then the analytical solution provided by Lyapunov’s method may be more attractive.
The greatest concerns with the application of user-defined scalar potentials is
that, when superimposed, the APFs may give rise to regions where the scalar rate
becomes zero, even though the desired state has not been reached. These situations
can be avoided through deliberate configuration of the APFs, and are oftentimes
unstable (meaning that they could be avoided using a jitter controller, which provides
numerical uncertainty to the currently adopted state). However, if such a region were
the result of a stable local minimum, then a more powerful approach is necessary. This
“local minimum problem” is of great concern to researchers studying nonlinear controls,
but it is currently beyond the scope of this document to address it directly.
26
CHAPTER 2
MATHEMATICAL OVERVIEW
Vector Operations in Linear Algebra
As noted in Chapter 1, “the word ‘vector’ may be used to refer to any matrix
where either of the dimensions are 1.” This can be done because every operation in
vector algebra has an equivalent operation in linear algebra.
For example, consider a vector 𝑣 ∈ ℝ3
. If 𝑣 is parameterized in an arbitrary
reference basis 𝐴 containing orthonormal basis vectors 1̂, 2̂, and 3̂, with corresponding
parallel components 𝑣1, 𝑣2, and 𝑣3, then the vector annotated equation for 𝑣𝐴
would be
𝑣𝐴
= 𝑣11̂ + 𝑣22̂ + 𝑣33̂,
Thus, the equivalent matrix form conveniently allows for the use of 𝑣𝐴
in linear algebra
operations, and can be determined by respectively representing the vectors 1̂, 2̂, and 3̂
(parameterized in 𝐴) as the 3 × 1 matrices (column vectors) [1 0 0] 𝑇
, [0 1 0] 𝑇
,
and [0 0 1] 𝑇
, then 𝑣𝐴
has the equivalent matrix representation
𝑣𝐴
⟺ [
𝑣1
𝑣2
𝑣3
].
Defining a second vector 𝑢 which is also parameterized in the 𝐴-fixed {1̂, 2̂, 3̂}
basis, it follows from the definition of the “dot product” 𝑢 ∙ 𝑣 that
𝑢 ∙ 𝑣 = 𝑢1 𝑣1 + 𝑢2 𝑣2 + 𝑢3 𝑣3. (2-1)
Note that the upper-left superscripts have been omitted because Eq. 2-1 is valid in any
coordinate system provided both vectors are parameterized within it. Ergo, Eq. 2-1 has
the equivalent matrix representation
𝑢 ∙ 𝑣 ⟺ 𝑢𝐴 𝑇
𝑣𝐴
(2-2)
27
where the superscript 𝑇 denotes the transpose of the column vector 𝑢𝐴
. One can verify
this by performing the multiplication in Eq. 2-2 and comparing its results to Eq. 2-1.
The result in Eq. 2-2 naturally suggests that there is an equivalent matrix form for
the cross product as well. Thus, we may once again consider the vectors 𝑢 and 𝑣 as
parameterized in the {1̂, 2̂, 3̂} basis. By definition, the cross product 𝑢𝐴
× 𝑣𝐴
is equal to
𝑢𝐴
× 𝑣𝐴
= ( 𝑢2 𝑣3 − 𝑢3 𝑣2)1̂ + ( 𝑢3 𝑣1 − 𝑢1 𝑣3)2̂ + ( 𝑢1 𝑣2 − 𝑢2 𝑣1)3̂. (2-3)
It is possible to group the terms on the right-hand side of Eq. 2-3 such that it may
be represented as the multiplication of a 3 × 3 matrix and the 3 × 1 matrix representing
the vector 𝑣𝐴
. This yields
𝑢𝐴
× 𝑣𝐴
⟺ 𝑢𝐴 ×
𝑣𝐴
; (2-4a)
𝑢𝐴 ×
≝ [
0 −𝑢3 𝑢2
𝑢3 0 −𝑢1
−𝑢2 𝑢1 0
] (2-4b)
where the superscript × in Eq. 2-4a denotes the “skew matrix form” of the column vector
𝑢𝐴
which is defined in Eq. 2-4b. Once again, this may be verified by executing the
matrix multiplication in Eq. 2-4a, which will consequently yield Eq. 2-4b.
The equivalencies in Eqs. 2-2 and 2-4a allow us to reconcile vector operations
with linear algebra. One example of this which we will eventually find to be particularly
useful relates the cross product of two vectors to their dot product. The identity formally
known as the “vector triple product” is most commonly cited in terms of vector
operations. However, we will hereafter refer to its equivalent matrix form:
𝑢𝐴 ×
𝑣𝐴 ×
= 𝑣𝐴
𝑢𝐴 T
− 𝑢𝐴 T
𝑣𝐴
𝕀 (2-5)
where 𝕀 is the 3 × 3 identity matrix. This identity is proven formally in [6], published in
1939’s Mathematical Gazette by S. Chapman and E. A. Milne.
28
Body Rotations and Quaternion Math
The rotation of a rigid body in space can always be specified using a direction
cosine matrix (DCM) – a 3x3 matrix whose terms fully specify the rotation of one
coordinate system with respect to another. For example, consider a spacecraft whose
body-fixed (i.e. fixed in frame 𝐵) 𝑥, 𝑦, and 𝑧 axes are parameterized in an inertially-fixed
(i.e. fixed in frame 𝑁) coordinate system as 𝑥̂𝑁
, 𝑦̂𝑁
, and 𝑧̂𝑁
, respectively. The DCM that
converts an inertially-fixed vector to body-fixed coordinates is 𝑅𝑁
𝐵
= [ 𝑥̂𝐵
𝑦̂𝐵
𝑧̂𝐵
] [7].
As a point of interest, the TD1 of any DCM is dependent on the angular velocity
of the coordinate system it transforms into. In general, for two coordinate systems fixed
in arbitrary reference frames 𝐴 and 𝐵, the TD1 of 𝑅𝐴
𝐵
is
𝑅̇𝐴
𝐵
= − 𝜔𝐴
𝐵 ×
𝑅𝐴
𝐵
(2-6)
where 𝜔𝐴
𝐵
is the angular velocity of the 𝐵 frame relative to the 𝐴 frame [8].
More compact ways of representing an orientation are available. The axis-angle
representation identifies the transformation between two reference frames as a rotation
by a single net rotation angle 𝜃 about a unit length “Eigen-axis” 𝑎̂. Alternatively, we may
specify the transformation as a sequence of three rotations about the basis axes. The
angles, in sequence, are known as “Euler” angles.
Either case exhibits special orientations (called “singularities” in formal literature
[9]) for which a unique set of parameters may not be determined. Many Earth-bound
applications (e.g. submarines, land vehicles, and passenger planes) may avoid these
singularities by restricting their operational envelopes (e.g. not being designed to
execute a 90° roll).
29
Satellites in space, however, do not often have such restrictions placed on the
attitudes they can occupy. Their constraints tend to be more exotic (such as the attitude
mandatory and forbidden constraints discussed in Chapter 1) thus necessitating a
singularity-free expression of attitude.
For this reason, space-based applications use four-element parameters called
“Euler symmetric parameters” or “quaternions.” Because they do not contain a minimal
set of three elements, quaternions are able to store all of the information necessary to
specify a unique orientation in space. These elements may be uniquely determined from
any DCM, including those which would create singularities in other representations.
Formally, quaternions are complex numbers consisting of one real, and three
imaginary components. However, in the context of this document, any quaternion is
treated as a 4 × 1 matrix (or four-dimensional column vector) of the form
𝑞 ≝ [
𝑎̂ sin( 𝜃 2⁄ )
cos( 𝜃 2⁄ )
] ≝ [
𝜀
𝜂] ≝ [
𝜀1
𝜀2
𝜀3
𝜂
] (2-7)
where 𝑎̂ is the the Eigen-axis of the rotation (the parameterization of which is context-
dependent), and 𝜃 is the rotation angle. As a point of interest, it follows from Eq. 2-7 that
|𝑞| = √sin2( 𝜃 2⁄ ) + cos2( 𝜃 2⁄ ) ≡ 1,
thus any quaternion representing a pure rotation (which, in this context, is the only
quaternion we will use) is of unit “length.”
The inverse rotation can be represented by a quaternion obtained in one of two
ways: either by rotating the starting coordinate basis about 𝑎̂ by an angle – 𝜃, or by
rotating about −𝑎̂ by 𝜃. Modifying Eq. 2-7, the inverse quaternion can be written as
30
𝑞−1
= [
𝑎̂ sin(− 𝜃 2⁄ )
cos(− 𝜃 2⁄ )
] = [
𝑎̂ sin( 𝜃 2⁄ )
− cos( 𝜃 2⁄ )
] ≡ [
𝜀
−𝜂] ; (2-8a)
𝑞−1
= [
−𝑎̂ sin( 𝜃 2⁄ )
cos( 𝜃 2⁄ )
] ≡ [
−𝜀
𝜂 ] = − [
𝜀
−𝜂] ≡ −𝑞−1
. (2-8b)
Note that Eqs. 2-8a and 2-8b are equivalent, despite being separated by a factor of −1.
This interesting property is called “sign ambiguity”, and implies that for any quaternion
𝑞 = −𝑞.
It will also be useful to note that applying any two rotations represented by the
quaternions 𝑞1 and 𝑞2 to a starting coordinate basis is equivalent to applying a single
rotation represented by may be expressed as a single rotation represented by the
quaternion 𝑞 𝑒 (also known as the “quaternion error”). If basis 1 and 2 are reached by
respectively applying 𝑞1 and 𝑞2 to the starting basis, then the quaternion error is
determined by applying the “quaternion product [10]” to 𝑞2 and 𝑞1
−1
𝑞 𝑒 ≝ 𝑞2 ⊗ 𝑞1
−1
,
which has the equivalent matrix expression
𝑞 𝑒 = [
−𝜀1
×
+ 𝜂2 𝕀 −𝜀1
𝜀1
𝑇
𝜂1
] [
𝜀2
𝜂2
], (2-9)
where 𝕀 denotes the identity matrix of dimension 3x3.
Equation 2-9 shows that the quaternion error can be obtained by applying a
linear operation on 𝑞2. However, it may be useful to express the quaternion error as a
linear operation on 𝑞1 instead. Reorganization of Eq. 2-9 results in the expression
𝑞 𝑒 = [
𝜀2
×
− 𝜂2 𝕀 𝜀2
𝜀2
𝑇
𝜂2
] [
𝜀1
𝜂1
], (2-10)
31
Thus, from these two equivalent forms of the quaternion error, we may define the
“quaternion error matrix” of type 1 from Eq. 2-9, and of type 2 from Eq. 2-10:
𝑄1 (𝑞) ≝ [
−𝜀×
+ 𝜂𝕀 −𝜀
𝜀 𝑇
𝜂
] ; (2-11a)
𝑄2 (𝑞) ≝ [
𝜀×
− 𝜂𝕀 𝜀
𝜀 𝑇
𝜂
]. (2-11b)
If we then substitute Eqs. 2-11a and 2-11b into Eqs. 2-9 and 2-10 respectively, we find
that a more compact expression for the quaternion error may be used:
𝑞 𝑒 = 𝑄1 (𝑞1) 𝑞2 = 𝑄2 (𝑞2) 𝑞1. (2-12)
Equation 2-12 affords us a meaningful, compact way of expression the effective
difference between two rotations, which will become useful later. For now, however, we
must also be concerned with locating a similar expression for a quaternion rate.
Because a quaternion contains four elements, so too must its TD1. However,
recall from Eq. 2-6 that the TD1 of an orientation is dependent on its angular velocity – a
physical vector consisting of three elements. A quaternion representation of orientation
should therefore be no different, so we must introduce a rectangular matrix to reconcile
this difference in the dimensionality:
Ξ (𝑞) ≝ [
𝜀×
+ 𝜂𝕀
−𝜀 𝑇
]. (2-13)
The matrix defined in Eq. 2-13 is called the “quaternion rate matrix”, and converts the
angular velocity of a coordinate system into a quaternion rate. For a coordinate system
defined by an orientation 𝑞 and angular velocity 𝜔, the TD1 of 𝑞 (i.e. 𝑞̇) is
𝑞̇ =
1
2
Ξ (𝑞) 𝜔. (2-14)
32
Derivatives of (and With Respect to) Multi-Dimensional Quantities
The previous discussion about the differentiation of a quaternion serves as an
indicator of the important role of derivatives in the field of nonlinear and APF-based
control. In fact, it will often be required of us to differentiate these multi-dimensional
quantities – sometimes with respect to other quantities of the same dimensionality.
We will find that any matrix can be differentiated with respect to a scalar quantity,
but only a scalar can be differentiated with respect to a matrix. Furthermore, in the case
where a matrix represents a column vector, we may introduce new definitions to allow
for the differentiation of either a vector with respect to a vector.
In most applications, differentiation is applied to a scalar with respect to another
scalar. For example, if 𝑦 and 𝑥 are scalars, then the derivative 𝐷 of 𝑦 with respect to 𝑥
can be written as
𝐷 ≝
𝑑𝑦
𝑑𝑥
if and only if 𝑦 is a function of only 𝑥. More generally, if 𝑦 is a function of other variables,
then the derivative 𝐷 can be written as
𝐷 ≝
𝜕𝑦
𝜕𝑥
(2-15)
Similarly, we may differentiate a general 𝑛 × 𝑚 matrix with respect to a scalar.
This also applies to vector quantities, since they may be represented as matrices. In
general, if 𝑀 ∈ ℝ 𝑛×𝑚
, then the derivative 𝐷 of 𝑀 with respect to a scalar 𝑥 is defined as
𝐷 ≝
[
𝜕𝑀11
𝜕𝑥
⋯
𝜕𝑀1𝑚
𝜕𝑥
⋮ ⋱ ⋮
𝜕𝑀 𝑛1
𝜕𝑥
⋯
𝜕𝑀 𝑛𝑚
𝜕𝑥 ]
(2-16)
33
[11], [12], [13] In other words, differentiating a vector or matrix with respect to a scalar is
equivalent to differentiating every element of that vector or matrix individually.
We will also need to consider the derivative a vector (but not a matrix [11]) with
respect to another vector. Note that, just as a vector can be represented as a single-
column matrix, so too may a scalar be represented as a single-element vector. In
general, if 𝑢 ∈ ℝ 𝑛
and 𝑣 ∈ ℝ 𝑚
, then the derivative 𝐷 of 𝑢 with respect to 𝑣 is defined as
𝐷 ≝
[
𝜕𝑢1
𝜕𝑣1
⋯
𝜕𝑢1
𝜕𝑣 𝑛
⋮ ⋱ ⋮
𝜕𝑢 𝑛
𝜕𝑣1
⋯
𝜕𝑢 𝑛
𝜕𝑣 𝑚]
(2-17)
[11], [12], [13] Note that in the case where 𝑢 ∈ ℝ1
→ 𝑢 ∈ ℝ, Eq. 2-17 reduces to a row
vector 𝐷 𝑇
(where 𝐷 ∈ ℝ 𝑛
). Furthermore, in the case where 𝑣 ∈ ℝ1
→ 𝑣 ∈ ℝ, Eq. 2-17
reduces to Eq. 2-16. If both conditions are true, then Eq. 2-17 fully reduces to Eq. 2-15.
These reduction checks serve to indicate that the general form of the matrix derivative
in Eq. 2-17 is valid in every case that we will encounter here.
Finally (for completeness’ sake), a derivative taken with respect to a matrix is
only valid with respect to a scalar [11]. The derivative 𝐷 of the scalar 𝑦 with respect to a
matrix 𝑀 is thus defined as
𝐷 ≝
[
𝜕𝑦
𝜕𝑀11
⋯
𝜕𝑦
𝜕𝑀 𝑛1
⋮ ⋱ ⋮
𝜕𝑦
𝜕𝑀1𝑚
⋯
𝜕𝑦
𝜕𝑀 𝑛𝑚]
[11] Note that if 𝑀 ∈ ℝ 𝑛×𝑚
→ 𝑀 ∈ ℝ 𝑛
then 𝐷 reduces to Eq. 2-17, thus we find that the
generality of these definitions hold for all special cases.
34
As a point of interest, some conventions transpose the resulting derivative
matrices for various reasons. Equations 2-15 through 2-17 thus represent the
untransposed form, giving them “the advantage of better agreement of matrix products
with composition schemes such as the chain rule [12].”
Reference [11] compactly provides the form of each derivative given the type of
quantity being differentiated, and that which it is being differentiated with respect to.
Table 2-1. Summary of derivatives discussed in this section, as outlined in [11]. The
first row shows the type of quantity being differentiated; the first column
shows the type of quantity it is being differentiated with respect to.
Diff. W.R.T. Diff. Of Scalar Diff. Of Vector Diff. Of Matrix
Scalar
𝑑𝑦
𝑑𝑥
𝑑𝑢
𝑑𝑥
= [
𝜕𝑢𝑖
𝑑𝑥
]
𝑑𝑀
𝑑𝑥
= [
𝜕𝑀𝑖𝑗
𝑑𝑥
]
Vector
𝑑𝑦
𝑑𝑣
= [
𝜕𝑦
𝜕𝑣𝑗
]
𝑑𝑢
𝑑𝑣
= [
𝜕𝑢𝑖
𝑑𝑣𝑗
]
Matrix
𝑑𝑦
𝑑𝑀
= [
𝜕𝑦
𝜕𝑀𝑗𝑖
]
The properties of matrix derivatives are largely similar to those of scalar
derivatives. They can be found summarized in [13], [14], and [15]. Of particular use is
the “multivariate chain rule” which will allow us to differentiate quantities with multiple
dimensions and dependencies.
𝑑𝑓 =
𝜕𝑓
𝜕𝑥1
𝑑𝑥1 + ⋯ +
𝜕𝑓
𝜕𝑥 𝑛
𝑑𝑥 𝑛 (2-18)
35
CHAPTER 3
METHODOLOGY
Formal Definition of an APF
An APF is a scalar potential function, hereafter denoted by 𝜑 or 𝜑 (𝓅) where
𝓅 ∈ ℛ 𝑛
is a vector containing 𝑛 independent variables. For example, if the state is
written as 𝓅 = [ 𝑥 𝑦] 𝑇
(corresponding to coordinates in a horizontal plane), then 𝜑 can
be visualized as a surface in 3-dimensional Cartesian space as in Figure 3-1.
Figure 3-1. An abstracted potential function containing a sample of six initial states, and
their corresponding paths to the nearest local minimum.
36
Recall from [3] that states (coordinates on the surface) corresponding to low
values of 𝜑 are more desirable than those corresponding to high values. By inspection,
it can be seen that an arbitrarily chosen point on the surface (represented in Figure 3-1
by the six sample points 𝓅𝑖 = [ 𝑥𝑖 𝑦𝑖] (𝑖 = 1, … ,6)) lies on a unique path formed by the
local negative gradient. According to the method of Lyapunov, such a path must always
terminate at a local minimum. In Figure 3-1, the two possible local minima are
represented by the points 𝓅 𝐴 = [ 𝑥 𝐴 𝑦 𝐴] and 𝓅 𝐵 = [ 𝑥 𝐵 𝑦 𝐵]. If, instead of a fixed point
in space, the potential-bound state is visualized as a loose particle free to move along
the surface of the APF, then a particle released at any point will propagate towards a
more desirable state by following such a path.
To state this more formally: A state 𝓅 constrained to an APF 𝜑 and initial
condition 𝓅0 will always propagate towards a local minimum if and only if the rate 𝜑̇ at
which the state’s potential changes is negative-definite at every point along the path
(not inclusive of the final endpoint, at which 𝜑̇ = 0).
There are three requirements for the asymptotically stable convergence of
Lyapunov’s method, which are mathematically expressed in [16] as:
𝜑(0) = 0; 𝜑 (𝓅) > 0 ∀ 𝓅 ≠ 0, (3-1)
𝜑̇ (𝓅) ≤ 0 ∀ 𝓅, (3-2)
‖𝜑 (𝓅)‖ → ∞ as ‖𝓅‖ → ∞. (3-3)
The first requirement provided by Eq. 3-1 requires the positive semi-definiteness
of the APF. If negative values of 𝜑 are allowed, then a perpetually negative 𝜑̇ would
conceivably result in values of 𝜑 approaching (negative) infinity.
37
The second requirement (Eq. 3-2) therefore pertains to the positive semi-
definiteness of the TD1 of the APF. This requirement is more obvious than the other
two, as a positive 𝜑̇ would lead away from convergence to a local minimum.
Finally, the third requirement (Eq. 3-3) pertains to the radial unboundedness of
the APF. This is, perhaps, the least intuitive requirement. Note that the example
potential function in Figure 3-1 takes the shape of a “bowl”, which is to say that it
approaches infinity in any radial direction. This allows for asymptotic convergence for
states whose initial conditions are of large magnitude compared to the primary
workspace of the system.
Observing all requirements, the system is asymptotically stable in state space
(the space containing all possible values for the state 𝓅) for any initial condition 𝓅0 [16].
However, it is worth noting that there is no condition to guarantee convergence to the
absolute minimum, as other local minima may exist (recall the local minimum problem
described in Chapter 1).
Defining the Error States
In the absence of constraints, only an attractive potential is necessary to drive
the state of the spacecraft towards its desired value. However, the state being
manipulated must first be defined. Let 𝑞 be the quaternion representing the present
orientation of the spacecraft, and 𝑞 𝑓 be the quaternion representing the orientation that
the spacecraft is attempting to reach. Recall from Chapter 2 that the quaternion error
corresponding to the difference between the current and final states is
𝑞 𝑒 = [
−𝜀 𝑓
×
+ 𝜂 𝑓 𝕀 −𝜀 𝑓
𝜀 𝑓
𝑇
𝜂 𝑓
] [
𝜀
𝜂] (2-9)
38
Note that as 𝑞 → 𝑞 𝑓, Eq. 2-9 reduces to 𝑞 𝑒 = [0 𝑇
±1] 𝑇
– the “effective zero state
orientation” which represents convergence. Thus the quaternion error represents the
relative rotation of the current “body frame” (the reference frame fixed to the satellite)
relative to the final “tracking frame” as shown in Figure 3-2.
Figure 3-2. The relative orientations of the inertial, body, and tracking frames.
The first observation we can make about the effective zero state orientation is
that its magnitude is nonzero. More specifically, since 𝑞 𝑒 represents a pure rotation, it is
necessarily of unit length. However, in our discussion of the method of Lyapunov in
Chapter 1, it was stated that the purpose of the controller is to drive the relative state to
zero. This requirement has not changed: even though the effective zero state has a
nonzero magnitude, it is representative of a zero degree rotation about any axis, and
can therefore be regarded as “zero in nature” or “effectively” zero.
39
The second observation is that there is not one, but two possible values of
convergence. Specifically, the parameter 𝜂 𝑒 can converge to either +1 or −1, which
corresponds to a relative rotation of either 0° or 360° about any axis. This arises from
the sign ambiguity demonstrated in Eqs. 2-8a and 2-8b. Note that, no matter which state
is converged upon, the end result is zero relative attitude.
Another quantity of importance is the “angular velocity error” 𝜔 𝑒 – the angular
velocity of the body frame with respect to the tracking frame, which is implicitly
parameterized in the body frame. As such, 𝜔 𝑒 can be calculated by taking the difference
of the body frame angular velocity 𝜔, and the tracking frame angular velocity 𝜔 𝑒 (after it
has been re-evaluated in the body frame). Thus
𝜔 𝑒 = 𝜔 − 𝑅 𝑒 𝜔 𝑓 (3-4)
where 𝑅 𝑒 is the DCM representation of the orientation represented by 𝑞 𝑒.
The Unconstrained Case
With the relative states defined, we may now specify an attractive potential to
bring it to its zero value. Recall from Chapter 1 that this has been typically accomplished
by using a Lyapunov potential function of the form
𝑉 =
1
2
∑ 𝐼𝑖 𝜔𝑖
2
3
𝑖=1
+
1
2
∑ 𝜆(𝜃𝑖 − 𝜃𝑖)
2
3
𝑖=1
, (1-12)
which was effective when the only constraints being enforced were directly placed on
the orientation of the spacecraft, and not the angular velocity. It will eventually be shown
that a general framework requires the separation of the APF into two distinct stages –
one for orientation, and one for angular velocity. For now, we will only consider an APF
that affects the former (indicated by a subscript 1):
40
𝜑1,𝑎 =
1
2
𝜀 𝑒
𝑇
𝜀 𝑒 +
1
2
(1 − 𝜂 𝑒
2). (3-5)
Note that unlike Eq. 1-13, Eq. 3-5 is in terms of the quaternion components 𝜀 𝑒 and 𝜂 𝑒.
A quick check shows that as 𝑞 𝑒 → [0 𝑇
±1] 𝑇
, the potential 𝜑1,𝑎 approaches 0
(regardless of the unit length requirement or sign ambiguity of 𝑞 𝑒). Furthermore, since
𝜀 𝑒
𝑇
𝜀 𝑒 > 0 ∀ 𝜀 ≠ 0, and 𝜂 𝑒
2
≝ cos2( 𝜃𝑒 2⁄ ) < 1 ∀ 0° < 𝜃𝑒 < 360°, it follows that 𝜑1,𝑎 > 0
when 𝑞 𝑒 ≠ [0 𝑇
±1] 𝑇
. Thus, Eq. 3-5 satisfies the condition of positive definiteness.
The condition of radial unboundedness may be ignored in this instance; since the
magnitude of the state 𝑞 𝑒 never approaches infinity, there is no need to check for radial
unboundedness. However, in order to verify that Eq. 3-2 is satisfied, we must calculate
the TD1 of Eq. 3-5. Applying the chain rule yields
𝜑̇1,𝑎 =
𝜕𝜑1,𝑎
𝜕𝑞 𝑒
𝑑𝑞 𝑒
𝑑𝑡
. (3-6)
Recognizing that 𝑞 𝑒 = [𝜀 𝑒
𝑇
𝜂 𝑒] 𝑇
, it follows from Eq. 2-17 that
𝜕𝜑1,𝑎
𝜕𝑞 𝑒
= [
𝜕𝜑1,𝑎
𝜕𝜀 𝑒
𝜕𝜑1,𝑎
𝜕𝜂 𝑒
] = [𝜀 𝑒
𝑇
−𝜂 𝑒] = − [𝑞 𝑒
−1]
𝑇
. (3-7)
Considering Eq. 3-7 and Eq. 2-6, Eq. 3-6 can be rewritten as
𝜑̇1,𝑎 = −
1
2
[Ξ 𝑇
(𝑞 𝑒) 𝑞 𝑒
−1]
𝑇
𝜔𝑒. (3-8)
Recall that Eq. 3-8 must be at least negative semi-definite to be in accordance
with Eq. 3-2. However, this can only be guaranteed by specifying a form for one or more
of its variables. The quaternion error 𝑞 𝑒 has a known value determined by on-board
sensors, implying that its form cannot be adjusted to determine the control solution.
41
However, assume that the angular velocity error 𝜔 𝑒 → 𝜔 𝑒,𝑑 is a desired value,
rather than a current evaluation. Allowing this, then the form of 𝜔 𝑒,𝑑 can be specified
such that Eq. 3-8 is negative semi-definite and Eq. 3-2 is satisfied. To ensure this, we
define a positive definite gain matrix 𝐾1. By definition, 𝐾1 satisfies the inequality relation
𝑣 𝑇
𝐾1 𝑣 > 0 ∀ 𝑣 ∈ ℝ3
. Thus, a negative semi-definite equation for 𝜑̇1,𝑎 is
𝜑̇1,𝑎 = −
1
2
[Ξ 𝑇
(𝑞 𝑒) 𝑞 𝑒
−1]
𝑇
𝐾1 [Ξ 𝑇
(𝑞 𝑒) 𝑞 𝑒
−1]. (3-9)
Relating Eq. 3-8 and Eq. 3-9, it follows that
𝜔 𝑒,𝑑 = 𝐾1Ξ 𝑇
(𝑞 𝑒) 𝑞 𝑒
−1
. (3-10)
Equation 3-10 indicates the “desired angular velocity error” of the spacecraft. If
mission controllers could adjust the angular velocity of the spacecraft directly without
the need for angular momentum exchange devices on board, then 𝜔 𝑒,𝑑 represents the
“target” angular velocity at the current orientation relative to the tracking state. However,
since this is not the case, a second stage APF must be designed to compute the torque
that must be supplied by onboard systems.
Just as the first stage APF served to drive the relative orientation towards its
effective zero value, the second stage APF must drive the relative angular velocity
towards zero. However, in this case “relative angular velocity” refers to the difference
between the actual value of the current angular velocity error (determined from Eq. 3-4),
and its desired value (determined from Eq. 3-10). Such a potential can take the form
𝜑2,𝑎 =
1
2
Δ𝜔𝑒
𝑇
Δ𝜔𝑒, (3-11)
where Δ𝜔𝑒 ≝ 𝜔 𝑒 − 𝜔 𝑒,𝑑. Note that Eq. 3-1 is satisfied since Δ𝜔𝑒
𝑇
Δ𝜔𝑒 > 0 ∀ Δ𝜔𝑒 ≠ 0.
42
Likewise, substituting large magnitude values of Δ𝜔 into Eq. 3-11 satisfies the
condition of radial unboundedness. However, we must take the TD1 of Eq. 3-11 to verify
that Eq. 3-2 is satisfied. Once more referring to proof 3 of Appendix A, we find that
𝜑̇2,𝑎 = Δ𝜔𝑒
𝑇
Δ𝜔̇ 𝑒, (3-12)
where Δ𝜔̇ 𝑒 contains the torque vector 𝜏 for which we can specify a form to ensure the
negative semi-definiteness of Eq. 3-12.
The TD1 of Δ𝜔𝑒 is
Δ𝜔̇ 𝑒 = 𝜔̇ 𝑒 − 𝜔̇ 𝑒,𝑑, (3-13)
where 𝜔̇ 𝑒,𝑑 must be computed separately. However, 𝜔̇ 𝑒 can be re-written in terms of
known angular velocities (and their TD1s), as demonstrated in proof 1 of Appendix B.
Defining a new quantity 𝒻𝑒 called the “feed forward vector”, (so named because it
propagates information about the current angular velocity and orientation forward
through time) Eq. 3-13 can be rewritten as
Δ𝜔̇ 𝑒 = 𝜔̇ + 𝒻𝑒, (3-14)
where
𝒻𝑒 ≝ 𝜔×
ℛ 𝑒 𝜔 𝑓 − ℛ 𝑒 𝜔̇ 𝑓 − 𝜔̇ 𝑒,𝑑. (3-15)
An attractive aspect of Eq. 3-14 is that the first term 𝜔̇ – the angular velocity rate
of the body as measured in the body frame – is now the only one containing the torque
vector 𝜏. It follows from Euler’s equations for rotational motion for a rigid body that
𝜔̇ = 𝕁−1
(𝜏 − 𝜔×
𝕁𝜔), (3-16)
where 𝕁 is the centroidal moment of inertia tensor for the rigid body.
43
Substituting Eq. 3-16 into Eq. 3-14, then further substituting into Eq. 3-12 yields
𝜑̇2,𝑎 = Δ𝜔 𝑒
𝑇
[𝕁−1
(𝜏 − 𝜔×
𝕁𝜔) + 𝒻𝑒], (3-17)
where we may enforce the negative definiteness of Eq. 3-17 by specifying a favorable
form for the control state. In this case, we define a second positive definite gain matrix
𝐾2 such that
𝜑̇2,𝑎 = −Δ𝜔 𝑒
𝑇
𝐾2Δ𝜔𝑒. (3-18)
Equating Eq. 3-17 with Eq. 3-18, we find the favorable form of 𝜏 to be
𝜏 = 𝜔×
𝕁𝜔 − 𝕁 (𝐾2Δ𝜔𝑒 + 𝒻𝑒). (3-19)
The practice of using a sequence of two APFs in this manner is called “back-
stepping”, and will eventually be used to separate repulsive potential function into APFs
that affect orientation from those which affect angular velocity. Because the angular
velocity of a system cannot be integrated to obtain its orientation, this approach is
absolutely necessary to ensure a valid control solution.
General Constraints
Using the attractive potentials of Eq. 3-5 and Eq. 3-11, the body-fixed coordinate
frame of the spacecraft will always converge asymptotically towards its desired value,
specified by the tracking frame. This is because we have specified a form for the control
state which satisfies the conditions of Eqs. 3-1 through 3-3.
Note that this analysis was predicated on the assumption that no constraints
existed – thus the case was said to be “unconstrained.” As discussed in Chapter 1, we
would eventually like to create a controller which satisfies any constraint (chief among
which is the keep-out constraint).
44
These constraints are each represented by a “repulsive potential.” As the name
implies, the repulsive potentials work against the attractive potential to ensure that the
state does not cross a constraint boundary. Since there are two stages of attractive
potential, there will also be two stages of repulsive potential. Furthermore – just as with
the attractive potentials – the first stage repulsive potential affects changes in
orientation, while the second affects changes in angular velocity.
First though, we must consider the structure of the APF common to both stages.
If the total APF 𝜑 is merely the superposition of its constituent (attractive and repulsive)
potentials, then its magnitude is
𝜑 = ∑ 𝜑𝑖
𝑁
𝑖=0
, (3-20)
where 𝜑𝑖 is the 𝑖th
potential function of any form.
Note that in either stage, there is always an attractive potential component to Eq.
3-20. If we assume that 𝑖 = 0 is “reserved” for the attractive potential, Eq. 3-20 may be
rewritten as
𝜑 = 𝜑 𝑎 + ∑ 𝜑𝑖
𝑁
𝑖=1
. (3-21)
Recall that, in order to satisfy Eq. 3-1, we require that Eq. 3-21 evaluates to zero
at the goal state. Since each potential is independent of all others, we can only
generally assume that their sum is zero if each term is itself zero. This was done by
assuming the form
𝜑 = 𝜑 𝑎 + ∑ 𝑐𝑖 𝜑 𝑎 𝜑 𝑟,𝑖
𝑁
𝑖=1
= 𝜑 𝑎 (1 + ∑ 𝑐𝑖 𝜑 𝑟,𝑖
𝑁
𝑖=1
) ≝ 𝜑 𝑎 𝜑𝑟, (3-22)
45
which has the TD1
𝜑̇ = 𝜑̇ 𝑎 𝜑𝑟 + 𝜑 𝑎 𝜑̇ 𝑟. (3-23)
In Eq. 3-22, 𝑐𝑖 is a positive scaling constant, and 𝜑 𝑟,𝑖 is the 𝑖th
repulsive potential.
Thus, the relationship between the attractive and repulsive potential is (somewhat
unexpectedly) multiplicative rather than additive. However, being potentials, each 𝜑 𝑟,𝑖
must be positive definite with a negative definite TD1. Therefore, the definition of 𝜑𝑟 (the
“total repulsive potential”) prohibits it from every being larger than one.
It then follows that Eq. 3-22 can equal zero if and only if the attractive potential is
zero. In other words, the repulsive potentials affect the path to convergence, but they do
not determine the goal state. For this reason, there is little use in expressing repulsive
potentials in terms of the error state, or even the final state.
First Stage Repulsive Potential
In general, a first stage repulsive potential may be a function of any orientation
illustrated in Figure 3-2 (i.e. 𝜑1,𝑟 = 𝜑1,𝑟 (𝑞, 𝑞 𝑓, 𝑞 𝑒)). Although, the quaternion error 𝑞 𝑒 is a
function of the body and tracking orientations (𝑞 and 𝑞 𝑓 respectively), it is a convenient
parameter to represent terms containing a variance on both 𝑞 and 𝑞 𝑓. Because of this,
we will carry on treating the generalized APF as a function of all three orientations,
though we may later reduce its dependency to be only on the body-frame orientation. In
holding with the form of Eq. 3-22, the TD1 of the potential can be written thusly:
𝜑̇1,𝑟 = ∑ 𝑐𝑖 𝜑̇1,𝑟,𝑖
𝑁
𝑖=1
. (3-24)
46
The differentiation of the individual repulsive potentials must be carried out using
the multivariate chain rule of Eq. 2-18. Doing so yields:
𝜑̇1,𝑟,𝑖 =
𝜕𝜑1,𝑟,𝑖
𝜕𝑞
𝜕𝑞
𝜕𝑞 𝑒
𝑞̇ 𝑒 +
𝜕𝜑1,𝑟,𝑖
𝜕𝑞 𝑓
𝜕𝑞 𝑓
𝜕𝑞 𝑒
𝑞̇ 𝑒 +
𝜕𝜑1,𝑟,𝑖
𝜕𝑞 𝑒
𝑞̇ 𝑒. (3-25)
Equation Eq. 3-25 can be reduced by expressing it in terms of the quaternion error
matrices 𝑄1 and 𝑄2. Recall from Eq. 2-12 that
𝑞 𝑒 = 𝑄1 (𝑞2) 𝑞1 = 𝑄2 (𝑞1) 𝑞2. (2-12)
Proof 3 of Appendix B demonstrates that 𝑄1 and 𝑄2 are orthogonal, therefore
𝜕𝑞
𝜕𝑞 𝑒
= 𝑄1
𝑇
(𝑞 𝑓);
𝜕𝑞 𝑓
𝜕𝑞 𝑒
= 𝑄2
𝑇
(𝑞). (3-26)
Next, recall that the TD1 of any unit quaternion can be computed from Eq. 2-14
in terms of the quaternion rate matrix Ξ:
𝑞̇ =
1
2
Ξ (𝑞) 𝜔. (2-14)
Thus substitution of Eqs. 2-14 and 3-26 into Eq. 3-25 yields
𝜑̇1,𝑟,𝑖 =
1
2
[Ξ 𝑇
(𝑞 𝑒) [𝑄1 (𝑞 𝑓) 𝑔1,𝑟,𝑖 (𝑞) + 𝑄2 (𝑞) 𝑔1,𝑟,𝑖 (𝑞 𝑓) + 𝑔1,𝑟,𝑖 (𝑞 𝑒)]]
𝑇
𝜔𝑒, (3-27)
where
𝑔𝑖 (𝓅) ≝ ∇ 𝓅( 𝜑𝑖) ≝ [
𝜕𝜑𝑖
𝜕𝓅
]
𝑇
(3-28)
is the gradient of the APF 𝜑𝑖 with respect to the parameter 𝓅, and can generally be
calculated from Eq. 2-17.
47
Owing to APF superposition, the gradient of the total repulsive potential 𝜑1,𝑟 is
equal to the sums of the individual APF gradients:
𝑔1,𝑟 (𝑞) = ∑ 𝑐𝑖
𝑁
𝑖=1
𝑔1,𝑟,𝑖 (𝑞) ; (3-29a)
𝑔1,𝑟 (𝑞 𝑓) = ∑ 𝑐𝑖
𝑁
𝑖=1
𝑔1,𝑟,𝑖 (𝑞 𝑓) ; (3-29b)
𝑔1,𝑟 (𝑞 𝑒) = ∑ 𝑐𝑖
𝑁
𝑖=1
𝑔1,𝑟,𝑖 (𝑞 𝑒). (3-29c)
Substitution of Eq. 3-27 into Eq. 3-24 and simplified by Eqs. 3-29a through c yields
𝜑̇1,𝑟 =
1
2
[Ξ 𝑇
(𝑞 𝑒) [𝑄1 (𝑞 𝑓) 𝑔1,𝑟 (𝑞) + 𝑄2 (𝑞) 𝑔1,𝑟 (𝑞 𝑓) + 𝑔1,𝑟 (𝑞 𝑒)]]
𝑇
𝜔𝑒. (3-30)
Furthermore, recall that repulsive potentials are generally represented as functions of
the body state, in which case Eqs. 3-29b and 3-29c evaluate to zero. Therefore
𝜑̇1,𝑟 =
1
2
[Ξ 𝑇
(𝑞 𝑒) 𝑄1 (𝑞 𝑓) 𝑔1,𝑟 (𝑞)]
𝑇
𝜔𝑒. (3-31)
Equations 3-27 and 3-30 demonstrate a pattern which inspired the definition of a
new quantity – the “potential rate transformation” (PRT) vector – which converts the
angular velocity error into an APF rate. The PRT vector is generally defined to be
Φ( 𝜑) ≝ Ξ 𝑇
(𝑞 𝑒) [𝑄1 (𝑞 𝑓) 𝑔 𝜑 (𝑞) + 𝑄2 (𝑞) 𝑔 𝜑 (𝑞 𝑓) + 𝑔 𝜑 (𝑞 𝑒)], (3-32)
where the PRT vector (given by Eq. 3-32) satisfies the relation
𝜑̇ =
1
2
Φ 𝑇( 𝜑) 𝜔𝑒. (3-33)
48
Setting 𝜑 = 𝜑1,𝑟,𝑖 and 𝜑 = 𝜑1,𝑟 reduces Eq. 3-33 to Eqs. 3-27 and 3-31
respectively. We therefore expect the relation to hold if 𝜑 = 𝜑1,𝑎, in which case the PRT
evaluates to
Φ(𝜑1,𝑎) = −Ξ 𝑇
(𝑞 𝑒) 𝑞 𝑒
−1
. (3-34)
As expected, substitution of Eq. 3-34 into Eq. 3-33 confirms the result found in Eq. 3-8.
We may now recast Eq. 3-23 in terms of the PRT vector for first stage potentials:
𝜑̇1 =
1
2
[Φ(𝜑1,𝑎)𝜑1,𝑟 + Φ(𝜑1,𝑟)𝜑1,𝑎]
𝑇
𝜔𝑒. (3-35)
Encouragingly, Eq. 3-35 is of the same form as Eq. 3-33. Thus, it follows that the PRT
for the overall first-step potential is
Φ( 𝜑1) = 𝜑1,𝑟Φ(𝜑1,𝑎) + 𝜑1,𝑎Φ(𝜑1,𝑟). (3-36)
As in the uncontrolled case, the control solution can be determined by ensuring
the negative definiteness of Eq. 3-35. Once more adopting the positive definite gain
matrix 𝐾1 from Eq. 3-9, this form was taken to be
𝜔 𝑒,𝑑 = −𝐾1Φ( 𝜑1). (3-37)
Note that in the case of no repulsive potentials (i.e. the unconstrained case), Eq.
3-36 reduces to Eq. 3-34, and thus Eq. 3-37 reduces to Eq. 3-10. Ergo, Eq. 3-37
represents the generalized angular velocity error – computing its value requires only
that we compute the gradients with respect to orientation for each repulsive potential.
As with the unconstrained case, this intermediate control solution determines the
desired angular velocity error. Determining the “true” control solution requires the
general implementation of second stage repulsive potentials. We therefore expect such
a solution to reduce to Eq. 3-19 in the special case of no repulsive potentials.
49
Second Stage Repulsive Potential
Recall that the TD1 of the desired angular velocity error appears in Eq. 3-15 as
part of the feed forward vector 𝒻𝑒. Differentiating Eq. 3-37, we find that
𝜔̇ 𝑒,𝑑 = −𝐾1Φ̇ ( 𝜑1),
thus requiring us to differentiate Eq. 3-36:
Φ̇ ( 𝜑1) =
1
2
[Φ(𝜑1,𝑟)Φ 𝑇(𝜑1,𝑎) + Φ(𝜑1,𝑎)Φ 𝑇(𝜑1,𝑟)]𝜔𝑒
+ [𝜑1,𝑟Φ̇ (𝜑1,𝑎) + 𝜑1,𝑎Φ̇ (𝜑1,𝑟)].
(3-38)
The PRTs in Eq. 3-38 are all determined. However, their rates in the second term must
be determined by differentiating Eq. 3-32 evaluated at 𝜑 = 𝜑1,𝑟 and 𝜑 = 𝜑1,𝑎. An
important consequence of this is that a gradient appearing in Eq. 3-32 will be
differentiated into what is known as a Hessian matrix 𝐻𝑖 (𝓅), which is defined as
𝐻𝑖 (𝓅) ≝ ∇∇ 𝓅( 𝜑𝑖) ≝
𝜕
𝜕𝓅
𝑔𝑖 (𝓅). (3-39)
Proofs 4 and 5 in Appendix B show the TD1s of the first-stage repulsive and attractive
PRTs to be respectively evaluated to
Φ̇ (𝜑1,𝑟) = [Ξ 𝑇
(𝑞 𝑒) 𝑄1 (𝑞̇ 𝑓) + Ξ 𝑇
(𝑞̇ 𝑒) 𝑄1 (𝑞 𝑓)] 𝑔1,𝑟 (𝑞) + Ξ 𝑇
(𝑞 𝑒) 𝑄1 (𝑞 𝑓) 𝐻1,𝑟 (𝑞) 𝑞̇ (3-40)
and
Φ̇ (𝜑1,𝑎) =
1
2
(𝕀 − 2𝜀 𝑒 𝜀 𝑒
𝑇
) 𝜔 𝑒 − Ξ 𝑇
(𝑞̇ 𝑒) 𝑞 𝑒
−1
. (3-41)
From Eqs. 3-40 and 3-41 follows the total PRT rate from Eq. 3-38, and thus the
rate of the desired angular velocity error. Therefore, with knowledge about angular
velocity and acceleration of the tracking coordinate frame (information which would be
specified by mission controllers), the feed forward vector from Eq. 3-15 is known!
50
However, the feed forward vector is only part of what is necessary to compute
the control solution. We have still yet to define the total second stage potential, or the
repulsive potentials it is comprised from.
It stands to reason that the second stage attractive potential defined 𝜑2,𝑎 does
not change from the unconstrained case in Eq. 3-11, since repulsive potentials do not
affect the relative state. Therefore, if we choose the multiplicative relation between the
attractive potential and repulsive potential as defined in Eq. 3-22, then the total second
stage potential can be written as
𝜑2 =
1
2
Δ𝜔𝑒
𝑇(Δ𝜔𝑒 𝜑2,𝑟), (3-42)
where 𝜑2,𝑟 is the total second stage repulsive term of the form defined in Eq. 3-22.
Since the second stage potentials control the angular velocity of the spacecraft, it
stands to reason that angular velocity will be one of the arguments. Perhaps less
intuitive is the dependence on orientation, which is not required for most applications,
but should be accounted for nonetheless.
Unsurprisingly, the control solution is embedded within the TD1 of Eq. 3-42.
Direct differentiation by way of product rule yields
𝜑̇2 = Δ𝜔𝑒
𝑇
(Δ𝜔̇ 𝑒 𝜑2,𝑟 +
1
2
Δ𝜔𝑒 𝜑̇2,𝑟), (3-43)
where Δ𝜔̇ 𝑒 contains the known feed forward vector and 𝜔̇ (which in turn contains the
control solution 𝜏).
Evaluating the TD1 of 𝜑2,𝑟 by chain rule, it follows that
𝜑̇2,𝑟 = 𝑔2,𝑟
𝑇
(𝜔)𝜔̇ +
1
2
𝑔2,𝑟
𝑇
(𝑞)Ξ (𝑞) 𝜔, (3-44)
where 𝑔 is the gradient vector defined in Eq. 3-28.
51
Recall that, as a consequence of Eq. 3-22,
𝑔2,𝑟(𝜔) = ∑ 𝑐𝑖 𝑔2,𝑟,𝑖(𝜔)
𝑁
𝑖=1
; (3-45a)
𝑔2,𝑟 (𝑞) = ∑ 𝑐𝑖 𝑔2,𝑟,𝑖 (𝑞)
𝑁
𝑖=1
. (3-45b)
Note that the striking similarity of Eqs. 3-45a and b to Eqs. 3-29a through c, thus
indicating that the methodology for these second stage potentials will be similar to that
for the first stage potentials. This is true, to a point. Since all first stage potentials were
functions of orientation, they could be consolidated into one quantity – the PRT vector.
However, because there is no integral relationship between angular velocity and
orientation, there is no analogous “trick” for the second stage potentials. Therefore, we
must proceed with direct substitution of Eq. 3-44 into Eq. 3-43:
𝜑̇2 = Δ𝜔𝑒
𝑇 {Δ𝜔̇ 𝑒 𝜑2,𝑟 +
1
2
Δ𝜔𝑒 [𝑔2,𝑟
𝑇
(𝜔)𝜔̇ +
1
2
𝑔2,𝑟
𝑇
(𝑞)Ξ (𝑞) 𝜔]}. (3-46)
Further substitution of Eq. 3-14 into Eq. 3-46 allows us to fully separate terms
containing 𝜔̇ from those containing 𝜔 and 𝑞:
𝜑̇2 = Δ𝜔𝑒
𝑇 {[𝜑2,𝑟 𝕀 +
1
2
Δ𝜔𝑒 𝑔2,𝑟
𝑇
(𝜔)] 𝜔̇ + [
1
4
Δ𝜔𝑒 𝑔2,𝑟
𝑇
(𝑞) Ξ (𝑞) 𝜔 + 𝜑2,𝑟 𝒻𝑒]}. (3-47)
Recall that the torque vector 𝜏 parameterized in the body frame is related to 𝜔̇ by
Euler’s equation for rotational motion (Eq. 3-16). As with the first stage, we once more
reclaim a positive definite gain matrix from the unconstrained case to create a form for
𝜑̇2 that is negative definite. In this case, equating Eq. 3-18 with Eq. 3-47 yields
−𝐾2Δ𝜔 𝑒 = [𝜑2,𝑟 𝕀 +
1
2
Δ𝜔𝑒 𝑔2,𝑟
𝑇
(𝜔)] 𝜔̇ + [
1
4
Δ𝜔𝑒 𝑔2,𝑟
𝑇
(𝑞)Ξ (𝑞) 𝜔 + 𝜑2,𝑟 𝒻𝑒]. (3-48)
52
Note that the common factor of Δ𝜔 𝑒
𝑇
has removed from both sides, thus ignoring
the trivial case where Δ𝜔𝑒 = 0 (which implies convergence has occurred anyway). Thus,
the left-hand side of Eq. 3-48 is representative of the negative definite form of 𝜑̇2, while
the right-hand side is the physical expression containing the control solution.
To solve for the torque vector, we must first solve for 𝜔̇ . Consolidating the terms
of Eq. 3-48, we find that
− [𝜑2,𝑟 𝕀 +
1
2
Δ𝜔 𝑒 𝑔2,𝑟
𝑇
(𝜔)] 𝜔̇ =
1
4
Δ𝜔𝑒 𝑔2,𝑟
𝑇
(𝑞)Ξ (𝑞) 𝜔 + 𝜑2,𝑟 𝒻𝑒 + 𝐾2Δ𝜔 𝑒. (3-49)
Solving for the control solution requires the inversion of [𝜑2,𝑟 𝕀 +
1
2
Δ𝜔𝑒 𝑔2,𝑟
𝑇
(𝜔)], for which
we make use of the Kailath Variant of The Woodbury Identity provided in [13]:
[𝜑2,𝑟 𝕀 +
1
2
Δ𝜔𝑒 𝑔2,𝑟
𝑇
(𝜔)]
−1
=
1
𝜑2,𝑟
[𝕀 −
Δ𝜔𝑒 𝑔2,𝑟
𝑇
(𝜔)
2𝜑2,𝑟 + 𝑔2,𝑟
𝑇
(𝜔)Δ𝜔𝑒
]. (3-50)
Thus applying Eq. 3-50 to Eq. 3-49, and rewriting 𝜔̇ in terms of 𝜏 (in accordance with
Euler’s equation of rotational motion), we find that the control solution is given by
𝜏 = 𝜔×
𝕁𝜔 −
1
𝜑2,𝑟
𝕁 [𝕀 −
Δ𝜔𝑒 𝑔2,𝑟
𝑇
(𝜔)
2𝜑2,𝑟 + 𝑔2,𝑟
𝑇
(𝜔)Δ𝜔𝑒
] [
1
4
Δ𝜔𝑒 𝑔2,𝑟
𝑇
(𝑞) Ξ (𝑞) 𝜔 + 𝜑2,𝑟 𝒻𝑒 + 𝐾2Δ𝜔𝑒]. (3-51)
Note that in the absence of repulsive APFs, the repulsive potential gradients
become zero, and the magnitude of the total repulsive potential goes to one. It follows
that Eq. 3-51 reduces precisely to Eq. 3-19:
𝜏 = 𝜔×
𝕁𝜔 − 𝕁 (𝐾2Δ𝜔𝑒 + 𝒻𝑒), (3-19)
which is the control solution for the unconstrained case. This encouraging result
indicates that we have indeed found an asymptotically stable solution for general
constraints applied in the second stage.
53
Equation 3-51 belies a complex web of variables with many interdependencies
and relationships – all of which are illustrated in Figure 3-3.
Figure 3-3. Dependency chart for the generalized control solution.
Although imposing, Figure 3-3 demonstrates one of the primary advantages of
APF controls: There are no algorithms; no interpolation; and every dependency is
expressed analytically and in closed-form. The advantage of this is that it makes
computing a control solution quick and efficient, which may be desired over optimality.
54
CHAPTER 4
IMPLEMENTATION
Notable Constraints
The Pointing Constraint
With the framework in place, we are now able to construct models for various
constraints that are of concern to mission controllers. Of chief importance is the
“pointing constraint” – an elegantly simple problem which has a readily apparent impact
on the performance of real-world satellites in orbit.
However, at this stage in our discussion of the problem, it may not be clear what
is pointing where. A spacecraft may occupy any one of an infinite number of attitudes,
and to simply say “a satellite cannot point in a direction” is unhelpful unless we can
quantify what exactly that means.
For the purposes of this document, consider a spacecraft to be a collection of
body-fixed “sensor” vectors. These vectors may be representative of any direction fixed
in the body-fixed coordinate frame – solar panels (barring the use of any rotational
mechanisms to which they might be affixed); directional antennas; telescopes; star
trackers; sun sensors; or arbitrary vectors defined as a point of reference are all valid
examples of what could constitute a “sensor” in this context. All sensor vectors are
implicitly of unit length; expressed in the body-fixed coordinate frame of the spacecraft;
and denoted by the unit vector 𝑠̂.
Next, we define an inertially-fixed “constraint” vector 𝑑̂ which is of unit length and
expressed in the inertial coordinates frame. These vectors specify a direction
corresponding to an attitude which mission controllers would either like to avoid, or
55
converge to. These constraint vectors will nearly always be accompanied by a
constraint angle 𝛽, representing a range of significant attitudes.
Significant attitude ranges can be represented in space by a cone whose axis is
parallel to 𝑑̂, and whose half-aperture angle is equal to 𝛽. Furthermore, any sensor on
the spacecraft may have a different set of significant attitude ranges associated with it,
which may be either “attitude forbidden” or “attitude mandatory.”
For example, we may consider one of the body-fixed sensor vectors to represent
a directional high-gain antenna that can only operate when aimed at an Earth-bound
tracking station accurate to within some pre-defined margin of error. Conversely, the
sensor vector may represent some light-sensitive piece of equipment, in which case we
might require it to avoid pointing at the Sun, and even specifying an angular buffer zone
about the inertially fixed body-sun vector. Despite these possibilities, for now we need
only consider the case of a satellite with one body-fixed sensor vector and one
corresponding attitude forbidden zone (or “keep-out” cone).
Single sensor – Single cone. Let 𝛾 represent the angle between the cone axis
𝑑̂ and the sensor vector 𝑠̂. The sensor will consequently never enter the attitude
forbidden region if 𝛾 is never allowed to become less than or equal to 𝛽. Mathematically,
this constraint can be expressed as
𝛽 < 𝛾 (4-1)
which, while compact, does not clearly demonstrate a dependence on the orientation
state 𝑞. With the benefit of foresight, we may evaluate the cosine of Eq. 4-1 (keeping in
mind that the inequality relationship between 𝛾 and 𝛽 will be inverted), yielding
cos 𝛽 − cos 𝛾 > 0. (4-2)
56
Recall that 𝑠̂ ∙ 𝑑̂ = cos 𝛾, since both 𝑠̂ and 𝑑̂ are unit vectors. However, the
equivalent matrix representation 𝑠̂ 𝑇
𝑑̂ is only valid if 𝑠̂ and 𝑑̂ are expressed in the same
basis. If we first rotate 𝑑̂ into the body frame, then we may rewrite Eq. 4-2 as
cos 𝛽 − 𝑠̂ 𝑇
𝑅 𝑞 𝑑̂ > 0,
where
𝑅 𝑞 = (𝜂2
− 𝜀 𝑇
𝜀)𝕀 + 2𝜀𝜀 𝑇
− 2𝜂𝜀×
(4-3)
is the DCM representing the rotation represented by the quaternion 𝑞.
If the goal is to create a “barrier” at the edge of the keep-out cone, then the
repulsive APF should take the form
𝜑1,𝑟,point =
1
cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂ (4-4)
which tends towards infinity as 𝛾 approaches 𝛽.
Recall from our discussion in Chapter 3 that, in order to implement a constraint at
the first stage, we must first determine its gradient (first derivative) and Hessian (second
derivative) with respect to 𝑞. This can be done by applying chain rule to Eq. 4-4, yielding
𝜕𝜑1,𝑟,point
𝜕𝑞
=
𝜕
𝜕𝑠̂ 𝑇 𝑅 𝑞 𝑑̂
(
1
cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂
)
𝜕
𝜕𝑞
(𝑠̂ 𝑇
𝑅 𝑞 𝑑̂) (4-5)
where
𝜕
𝜕𝑠̂ 𝑇 𝑅 𝑞 𝑑̂
(
1
cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂
) =
1
(cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂)
2 (4-6)
and
𝜕
𝜕𝑞
(𝑠̂ 𝑇
𝑅 𝑞 𝑑̂) = 2𝑞 𝑇 [
𝑑̂ 𝑠̂ 𝑇
+ 𝑠̂ 𝑑̂ 𝑇
− 𝑠̂ 𝑇
𝑑̂ 𝕀 𝑠̂×
𝑑̂
(𝑠̂×
𝑑̂)
𝑇
𝑠̂ 𝑇
𝑑̂
] ≝ 2𝑞 𝑇
Λ(𝑠̂, 𝑑̂). (4-7)
57
Verification of Eq. 4-7 is provided in proof 4 of Appendix A. As a point of interest,
Λ(𝑠̂, 𝑑̂) is a constant, symmetrical matrix function of the geometry between the satellite’s
sensor vectors the inertial attitude vectors. Note that the vector 𝑑̂ appearing in Eq. 4-7 is
still parameterized in the inertial frame. Thus, the gradient is computed by substituting
Eqs. 4-6 and 4-7 into Eq. 4-5:
𝑔1,𝑟,point (𝑞) =
2Λ(𝑠̂, 𝑑̂)𝑞
(cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂)
2. (4-8)
The Hessian matrix for the direct pointing constraint potential is computed by
differentiating Eq. 4-8. The process is shown in proof 5 of Appendix A shows the
derivation, yielding the result
𝐻1,𝑟,point (𝑞) =
2Λ(𝑠̂, 𝑑̂)
(cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂)
2 [𝕀 +
4𝑞𝑞 𝑇
Λ(𝑠̂, 𝑑̂)
cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂
]. (4-9)
Given the framework derived in Chapter 3, the outputs of Eqs. 4-8 and 4-9 are
enough to compute the control solution. However, recall that this only applies for the
case of one sensor and one keep-out cone. Variations on the constraints presented in
Eqs. 4-1 and 4-2 are also of interest.
For example, consider the inverse case of an attitude mandatory zone. In such a
case, the constraint from Eq. 4-1 becomes reversed, thus yielding
𝛽 > 𝛾. (4-10)
Note that, like Eq. 4-1, Eq. 4-10 can be equivalently stated in terms of angle cosines:
cos 𝛾 − cos 𝛽 > 0.
Thus, it can be seen that the APF corresponding to this constraint – and, by extension,
its gradient and Hessian – are the negatives of Eqs. 4-4, 4-8, and 4-9 respectively.
58
Multiple sensors – Multiple cones. In general, it cannot be assume that a
satellite contains a single body-fixed sensor vector. Nor can it be assumed that the
mission will only contain one attitude range of significance. Therefore, in general we
may need to consider a system of 𝑁 sensor vectors and 𝑀 constraint regions. For
simplicity, we will assume none of the constraint regions intersect, but if they did then it
may serve us well to model them as a single constraint region anyway.
It is convenient to store this information in matrix form, making it easily read by
linear algebra systems such as MatLab®
. The matrices containing sensor and cone data
could, for example, be respectively formatted:
𝑠𝑙𝑖𝑠𝑡 = [ 𝑠̂1
𝐵
𝑠̂2
𝐵
𝑠̂3
𝐵
⋯ 𝑠̂𝑖
𝐵
⋯ 𝑠̂ 𝑁
𝐵
] ∈ ℝ3×𝑁
, (4-11)
𝑑𝑙𝑖𝑠𝑡 = [
𝑑̂1
𝐼
𝛽1
𝑑̂2
𝐼
𝛽2
𝑑̂3
𝐼
𝛽3
⋯
𝑑̂ 𝑗
𝐼
𝛽𝑗
⋯
𝑑̂ 𝑀
𝐼
𝛽 𝑀
] ∈ ℝ4×𝑀
, (4-12)
where the superscripts 𝐵 and 𝐼 respectively denote body-fixed and inertially-fixed
coordinate parameterizations.
It is also useful to specify a constant “mapping” matrix, which defines the
relationship each sensor has with the constraint regions. This would be useful in cases
where some sensors may be permitted through constraint regions that others may not,
or vice versa. For example, a sensor might be constrained to point towards Earth, yet
there would be no reason why it could not be pointed at the sun. Conversely, a star
tracker would be able to safely point towards the Earth, but it may be desirable to
specify a constraint preventing it from being pointed towards the sun.
Harkening back to the general constraint form from Eq. 3-22, the coefficients 𝑐𝑖𝑗
which modify the repulsive potentials – each one representing the constraint imposed
59
on the 𝑖th
sensor by the 𝑗th
cone – must be positive if the relationship is attitude
forbidden, negative if it is attitude mandatory, or zero if there is no attitude constraint.
Expressed in matrix form, the mapping matrix 𝐶 is defined as
𝐶 ≝ [
𝑐11 𝑐12
𝑐21 𝑐22
⋯
𝑐1𝑀
𝑐2𝑀
⋮ ⋱ ⋮
𝑐 𝑁1 𝑐 𝑁2 ⋯ 𝑐3𝑀
] ; {
𝑐𝑖𝑗 > 0 if forbidden
𝑐𝑖𝑗 = 0 if no constraint
𝑐𝑖𝑗 < 0 if mandatory
. (4-13)
The total pointing constraint potential and its derivatives can be found by
summing over all indices ( 𝑖, 𝑗) in Eq. 4-13, then extracting 𝑠̂𝑖 from Eq. 4-11 and 𝑑̂ 𝑗, 𝛽𝑗
from Eq. 4-12:
𝜑1,𝑟,point = ∑
𝑐𝑖𝑗
cos 𝛽𝑗 − 𝑠̂𝑖
𝑇
𝑅 𝑞 𝑑̂ 𝑗
𝑁,𝑀
𝑖,𝑗=1
; (4-14)
𝑔1,𝑟,point (𝑞) = ∑
2𝑐𝑖𝑗Λ(𝑠̂ 𝑖, 𝑑̂ 𝑗)𝑞
(cos 𝛽𝑗 − 𝑠̂𝑖
𝑇
𝑅 𝑞 𝑑̂ 𝑗)
2
𝑁,𝑀
𝑖,𝑗=1
; (4-15)
𝐻1,𝑟,point (𝑞) = ∑
2𝑐𝑖𝑗Λ(𝑠̂𝑖, 𝑑̂ 𝑗)
(cos 𝛽𝑗 − 𝑠̂𝑖
𝑇
𝑅 𝑞 𝑑̂ 𝑗)
2 [𝕀 +
4𝑞𝑞 𝑇
Λ(𝑠̂𝑖, 𝑑̂ 𝑗)
cos 𝛽𝑗 − 𝑠̂𝑖
𝑇
𝑅 𝑞 𝑑̂ 𝑗
]
𝑁,𝑀
𝑖,𝑗=1
. (4-16)
Recall that the outputs of Eqs. 4-14 through 4-16 determine the control solution.
The Slew Rate Constraint
Sometimes, it may be desirable to limit the rate at which a satellite rotates. There
are many different reasons why mission controllers would want to do this. Chiefly, this
constraint exists to prevent saturation of on-board angular momentum exchange
devices. The constraint may also be in place to prevent mass-spring-damper type
oscillations in nonrigid components (such as solar panels, omnidirectional antennae, or
gravity gradient stabilization booms).
60
Limiting the slew rate requires the specification of a maximum allowable slew
rate, effectively creating an envelope around the angular velocity domain. It follows that
the slew rate constraint is, by definition, a second stage potential. The maximum slew
rate is necessarily a scalar quantity, and so must be related to the instantaneous
angular velocity by the dot product:
𝜔 𝑚𝑎𝑥
2
− 𝜔 𝑇
𝜔 > 0. (4-17)
Just as with the pointing constraint, a barrier can be constructed at the constraint
boundary by inverting the right-hand side of Eq. 4-17, thus yielding the slew rate
potential
𝜑2,𝑟,slew =
1
𝜔 𝑚𝑎𝑥
2 − 𝜔 𝑇 𝜔
. (4-18)
Unlike the first stage potentials, we do not need to take the Hessian of Eq. 4-18.
Instead, we must take the gradient of it with respect to orientation (which yields a zero
vector, since Eq. 4-18 has no dependency on orientation), and angular velocity.
Applying chain rule to Eq. 4-4 yields
𝑔2,𝑟,slew =
2𝜔 𝑇
𝜔 𝑚𝑎𝑥
2 − 𝜔 𝑇 𝜔
.
Early Avoidance
While concise, the pointing constraint potential loses efficiency when the tracking
frame will place the sensor on the opposite side of an attitude forbidden region. In such
a situation, more control effort is expended reversing the direction of the sensor. In the
edge case where the zero potential is on the exact opposite side of an attitude forbidden
region, and there is no lateral component of angular velocity, the sensor will become
mired in an unstable saddle point.
61
In almost every case, interference from other potentials will perturb the sensor
from its saddle point. Even if there are no other potentials present, numerical
uncertainty in the initial condition will almost certainly result in a lateral component of
angular velocity. In light of this, it is tempting to disregard these saddle points. However,
even if they do not permanently halt the progress of the satellite in its current maneuver,
they will slow it down, or result in a longer path that would otherwise be achieved.
One of the earliest objectives for this research was to avoid such attitude
forbidden regions in advance by imparting lateral velocity as soon as it became
apparent that an attitude forbidden region was incoming. This was accomplished by
creating a pathway between two planes tangent to the keep-out cone, whose
intersection contained the sensor vector itself. As long as the sensor continues to travel
outside of this pathway, it will not enter the constraint region.
Defining the pathway vectors. This method is based on the principle that a unit
vector will only change by a direction that lies inside the plane normal to that unit vector.
Placing this plane such that it contains the point at the head of 𝑠̂ will yield a conic
intersection where the plane crosses the attitude forbidden region. The constraint
pathway is bounded by the tangents of the conic intersection as illustrated in Figure 4-1.
Note that the vectors 𝑑̂1, 𝑑̂2, and 𝑑̂3, 𝑠̂1, 𝑠̂2, and 𝑠̂3 in Figure 4-1 are defined
differently from those in Eqs. 4-11 and 4-12. In this context they represent the basis
vectors 𝒟 and 𝒮 respectively, and are defined so as to simplify the parameterization of
the conic tangent vectors.
62
Figure 4-1. Setup for the Early Avoidance pathway.
The cone’s axis of symmetry makes a logical choice for the first axis 𝑑̂1 in the 𝒟
coordinate basis. However, being inertially fixed, it must be represented in the body
coordinate frame. The second axis 𝑑̂2 is thus defined to be that orthogonal to 𝑑̂1 in the
direction of the sensor vector 𝑠̂, with the third axis 𝑑̂3 being the cross product of the first
two. Thus, the basis vectors in the 𝒟 coordinate system are defined as
𝒟 ≝
{
𝑑̂1 = ℛ 𝑞 𝑑̂
𝑑̂2 =
𝑑̂1
×
𝑠̂×
𝑑̂1
sin 𝛾
𝑑̂3 = 𝑑̂1
×
𝑑̂2
. (4-19)
63
As a consequence of the way in which the cone-fixed basis vectors are defined,
the first axis 𝑠̂1 in the 𝒮 coordinate system is coincident with 𝑑̂3. Helpfully, this allows us
to define the third axis 𝑠̂3 to be identical to the sensor vector 𝑠̂, with the cross product
defining the second axis 𝑠̂2. Thus, the basis vectors in the 𝒮 system are defined as
𝒮 ≝ {
𝑠̂1 = 𝑑̂3
𝑠̂2 = 𝑠̂3
×
𝑠̂1
𝑠̂3 = 𝑠̂
.
(4-20)
Given the coordinate systems defined in Eqs. 4-19 and 4-20, the equation for the
conic intersection of the sensor travel plane with the attitude forbidden region is
𝑥2
= − (
cos 2𝛾 + cos 2𝛽
1 + cos 2𝛽
) 𝑦2
+ 2 (
sin 2𝛾
1 + cos 2𝛽
) 𝑦 + (
cos 2𝛾 − cos 2𝛽
1 + cos 2𝛽
)
(4-21)
as shown in proof 6 of Appendix B. Note that 𝑥 and 𝑦 correspond to the distances
between 𝑠̂3 and a point on the conic intersection as measured along the 𝑠̂1 and 𝑠̂2 axes
respectively. Equation 4-21 is – not surprisingly – symmetric about the 𝑠̂2 axis.
Let the vector 𝑣 ≝ 𝑥𝑠̂1 + 𝑦𝑠̂2 represent the position of a point on the conic
intersection relative to 𝑠̂3. Defining an angle 𝛼 as the angle between 𝑠̂2 and 𝑣, it follows
from geometry that 𝛼 will reach its maximum value at the point when 𝑣 → 𝑣 𝑡 where 𝑣 𝑡 is
tangent to the conic intersection. If the tangent coordinates in the sensor travel plane
are defined as 𝑥 = 𝑥 𝑡 and 𝑦 = 𝑦𝑡, then it follows from proof 7 of Appendix B that
𝑥t =
1
sin 2𝛾
√(cos 2𝛽 − cos 2𝛾)(1 − cos 2𝛽); 𝑦𝑡 =
cos 2𝛽 − cos 2𝛾
sin 2𝛾
. (4-22)
Recognizing that tan 𝛼 = | 𝑥𝑡 𝑦𝑡⁄ |, it follows from Eq. 4-22 that
tan 𝛼 = √
1 − cos 2𝛽
cos 2𝛽 − cos 2𝛾
. (4-23)
64
The double conic problem. An interesting yet unintended consequence of the
conic section in Eq. 4-21 is the symmetry that exists about the plane normal to the cone
axis – i.e. when plotting Eq. 4-22, one can see a discontinuity as the tangent point
jumps to the lower branch of the conic section (a cone equal in size but opposite in
direction of the keep-out cone being analyzed). Figure 4-2 illustrates this phenomenon:
Figure 4-2. An illustration of the double conic problem. Note that the origin represents
the sensor axis 𝑠̂3, and the red dot represents the cone axis 𝑑̂1.
Ideally, tan 𝛼 would approach zero as 𝛾 approaches the safety angle 𝛾𝑠 (as
shown in Figure 4-1), which would result in a “leading edge” of the potential as the
sensor crossed into the region where it is in danger of crossing into the keep-out cone.
However, Figure 4-2 demonstrates that no such tangent actually exists. Therefore, in
order to enforce the desired behavior, we project the tangent point from the lower
branch of the hyperbola onto the upper branch with a compensating logic term ℓ:
ℓ = 𝑚 (
sin2
2𝛽 − sin2
2𝛾
sin2 2𝛽 + sin2 2𝛾
)
𝑛
(4-24a)
65
where
𝑛 = {
0 if 𝛾 ≤
𝜋
2
1 if 𝛾 >
𝜋
2
; 𝑚 = {
0 if 𝛾 ≥ 𝛾𝑠
1 if 𝛾 < 𝛾𝑠
. (4-24b)
The conditions in Eqs. 4-24a and b are derived in proof 8 of Appendix B.
Note that the safety angle 𝛾𝑠 depends on the value of 𝛽. When 𝛽 ≤
𝜋
4
, then the
tangent point projection represented by Eq. 4-24a is valid for any 𝛾 < 𝛾𝑠 =
𝜋
2
+ 𝛽. Note,
however, that when 𝛽 ≥
𝜋
4
, then the projection is only valid when the sensor is between
both branches of the conic intersection (which will be hyperbolic over this part of the
domain. We are able to express both possibilities compactly by taking the minimum
value to be the true safety angle:
𝛾𝑠 = min (
𝜋
2
+ 𝛽, 𝜋 − 𝛽)
The compensating term in Eqs. 4-24a and b serves to divide the domain of
gamma into three sectors, thus constructing a piece-wise expression for tan 𝛼 that
demonstrates the behavior we are looking for. The three sectors are summarized in
Table 4-1, and the range of values over which ℓ varies is graphed in Figure 4-3.
The compensated tangent value can be obtained by multiplying the
uncompensated value from Eq. 4-23 to the logic term of Eq. 4-24a, thus yielding
tan 𝛼 = 𝑚 (
sin2
2𝛽 − sin2
2𝛾
sin2 2𝛽 + sin2 2𝛾
)
𝑛
√
1 − cos 2𝛽
cos 2𝛽 − cos 2𝛾
(4-25)
Plotting the modified pathway vectors using Eq. 4-25 demonstrates that the new logic
term does indeed solve the double conic problem, as shown in Figure 4-4.
66
Table 4-1. Values of the logic term ℓ across the three sectors of the gamma domain.
𝛾 (Range as Inequality) 𝑚 𝑛 ℓ
min (
𝜋
2
+ 𝛽, 𝜋 − 𝛽) ≤ 𝛾 ≤ 𝜋 𝑚 = 0 𝑛 = 1 ℓ = 0
𝜋
2
< 𝛾 < min (
𝜋
2
+ 𝛽, 𝜋 − 𝛽) 𝑚 = 1 𝑛 = 1 ℓ =
sin2
2𝛽 − sin2
2𝛾
sin2 2𝛽 + sin2 2𝛾
0 ≤ 𝛾 ≤
𝜋
2
𝑚 = 1 𝑛 = 0 ℓ = 1
Figure 4-3. Example of variation in the logic term ℓ over the domain
𝜋
2
< 𝛾 < 𝛾𝑠.
Figure 4-4. Results of applying the logic term ℓ to the double conic problem.
1.6 1.65 1.7 1.75 1.8 1.85 1.9 1.95 2 2.05
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Logic Term Values Between /2 and /2+ ( = /6)
 [rad]
logictermvalue[-]
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T
Newman_T

Más contenido relacionado

La actualidad más candente

MVA Dissertation 100510
MVA Dissertation 100510MVA Dissertation 100510
MVA Dissertation 100510Jon Stone
 
CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445Amit Ramji ✈
 
Cd001169 Standard
Cd001169 StandardCd001169 Standard
Cd001169 Standardireportergr
 
Intelligent Routine Generator
Intelligent Routine Generator Intelligent Routine Generator
Intelligent Routine Generator Mohammad Apu
 
MEng Report Merged - FINAL
MEng Report Merged - FINALMEng Report Merged - FINAL
MEng Report Merged - FINALAmit Ramji ✈
 
La Roche Catalog 2015-16
La Roche  Catalog 2015-16La Roche  Catalog 2015-16
La Roche Catalog 2015-16Abhishek Bajaj
 
IMechE Report Final_Fixed
IMechE Report Final_FixedIMechE Report Final_Fixed
IMechE Report Final_FixedAmit Ramji ✈
 

La actualidad más candente (8)

MVA Dissertation 100510
MVA Dissertation 100510MVA Dissertation 100510
MVA Dissertation 100510
 
Api 2015
Api 2015Api 2015
Api 2015
 
CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445
 
Cd001169 Standard
Cd001169 StandardCd001169 Standard
Cd001169 Standard
 
Intelligent Routine Generator
Intelligent Routine Generator Intelligent Routine Generator
Intelligent Routine Generator
 
MEng Report Merged - FINAL
MEng Report Merged - FINALMEng Report Merged - FINAL
MEng Report Merged - FINAL
 
La Roche Catalog 2015-16
La Roche  Catalog 2015-16La Roche  Catalog 2015-16
La Roche Catalog 2015-16
 
IMechE Report Final_Fixed
IMechE Report Final_FixedIMechE Report Final_Fixed
IMechE Report Final_Fixed
 

Destacado (11)

UFTranscripts2
UFTranscripts2UFTranscripts2
UFTranscripts2
 
Perturbação Esiritual
Perturbação EsiritualPerturbação Esiritual
Perturbação Esiritual
 
Lines and angles
Lines and anglesLines and angles
Lines and angles
 
Perimetar and area
Perimetar and areaPerimetar and area
Perimetar and area
 
Bryan W Pelky Resume
Bryan W Pelky ResumeBryan W Pelky Resume
Bryan W Pelky Resume
 
Shale gas
Shale gasShale gas
Shale gas
 
Intervensi perioperative
Intervensi perioperativeIntervensi perioperative
Intervensi perioperative
 
Parousiasi trikala
Parousiasi trikalaParousiasi trikala
Parousiasi trikala
 
IT security - a never ending saga - M Falcinelli
IT security - a never ending saga - M FalcinelliIT security - a never ending saga - M Falcinelli
IT security - a never ending saga - M Falcinelli
 
chile-2015 (2)
chile-2015 (2)chile-2015 (2)
chile-2015 (2)
 
Kelompok 4
Kelompok 4Kelompok 4
Kelompok 4
 

Similar a Newman_T

How training affect to the employee's performance
How training affect to the employee's performanceHow training affect to the employee's performance
How training affect to the employee's performanceDu Trang
 
Tomaszewski, Mark - Thesis: Application of Consumer-Off-The-Shelf (COTS) Devi...
Tomaszewski, Mark - Thesis: Application of Consumer-Off-The-Shelf (COTS) Devi...Tomaszewski, Mark - Thesis: Application of Consumer-Off-The-Shelf (COTS) Devi...
Tomaszewski, Mark - Thesis: Application of Consumer-Off-The-Shelf (COTS) Devi...Mark Tomaszewski
 
IanChang-Yen_dissertation_final
IanChang-Yen_dissertation_finalIanChang-Yen_dissertation_final
IanChang-Yen_dissertation_finalIan Chang-Yen, PhD
 
Stojanovski-Daniel_MECH4841B_2014_Aero-Cooling-Business_Appendix_Only
Stojanovski-Daniel_MECH4841B_2014_Aero-Cooling-Business_Appendix_OnlyStojanovski-Daniel_MECH4841B_2014_Aero-Cooling-Business_Appendix_Only
Stojanovski-Daniel_MECH4841B_2014_Aero-Cooling-Business_Appendix_OnlyDaniel Stojanovski
 
RY_PhD_Thesis_2012
RY_PhD_Thesis_2012RY_PhD_Thesis_2012
RY_PhD_Thesis_2012Rajeev Yadav
 
Complete Thesis-Final
Complete Thesis-FinalComplete Thesis-Final
Complete Thesis-FinalHao SHEN
 
Trinity Impulse - Event Aggregation to Increase Stundents Awareness of Events...
Trinity Impulse - Event Aggregation to Increase Stundents Awareness of Events...Trinity Impulse - Event Aggregation to Increase Stundents Awareness of Events...
Trinity Impulse - Event Aggregation to Increase Stundents Awareness of Events...Jason Cheung
 
NCLEX-PN Study Guide
NCLEX-PN Study GuideNCLEX-PN Study Guide
NCLEX-PN Study Guidejconcepcion1
 
James Pitts_Thesis_2014
James Pitts_Thesis_2014James Pitts_Thesis_2014
James Pitts_Thesis_2014James Pitts
 
Adaptive Networking Protocol for Rapid Mobility
Adaptive Networking Protocol for Rapid MobilityAdaptive Networking Protocol for Rapid Mobility
Adaptive Networking Protocol for Rapid MobilityDr. Edwin Hernandez
 
Production of vam by oxy acetylation of ethylene-min
Production of vam by oxy acetylation of ethylene-minProduction of vam by oxy acetylation of ethylene-min
Production of vam by oxy acetylation of ethylene-minkashan Aslam
 
AUTOMATIC WELL FAILURE ANALYSIS FOR THE SUCKER ROD PUMPING SYSTEMS USING MACH...
AUTOMATIC WELL FAILURE ANALYSIS FOR THE SUCKER ROD PUMPING SYSTEMS USING MACH...AUTOMATIC WELL FAILURE ANALYSIS FOR THE SUCKER ROD PUMPING SYSTEMS USING MACH...
AUTOMATIC WELL FAILURE ANALYSIS FOR THE SUCKER ROD PUMPING SYSTEMS USING MACH...Ramez Abdalla, M.Sc
 

Similar a Newman_T (20)

Leininger_umd_0117N_16271
Leininger_umd_0117N_16271Leininger_umd_0117N_16271
Leininger_umd_0117N_16271
 
mack_y
mack_ymack_y
mack_y
 
How training affect to the employee's performance
How training affect to the employee's performanceHow training affect to the employee's performance
How training affect to the employee's performance
 
Tomaszewski, Mark - Thesis: Application of Consumer-Off-The-Shelf (COTS) Devi...
Tomaszewski, Mark - Thesis: Application of Consumer-Off-The-Shelf (COTS) Devi...Tomaszewski, Mark - Thesis: Application of Consumer-Off-The-Shelf (COTS) Devi...
Tomaszewski, Mark - Thesis: Application of Consumer-Off-The-Shelf (COTS) Devi...
 
IanChang-Yen_dissertation_final
IanChang-Yen_dissertation_finalIanChang-Yen_dissertation_final
IanChang-Yen_dissertation_final
 
Stojanovski-Daniel_MECH4841B_2014_Aero-Cooling-Business_Appendix_Only
Stojanovski-Daniel_MECH4841B_2014_Aero-Cooling-Business_Appendix_OnlyStojanovski-Daniel_MECH4841B_2014_Aero-Cooling-Business_Appendix_Only
Stojanovski-Daniel_MECH4841B_2014_Aero-Cooling-Business_Appendix_Only
 
RY_PhD_Thesis_2012
RY_PhD_Thesis_2012RY_PhD_Thesis_2012
RY_PhD_Thesis_2012
 
35819303-MIT
35819303-MIT35819303-MIT
35819303-MIT
 
Published_Thesis
Published_ThesisPublished_Thesis
Published_Thesis
 
NP problems
NP problemsNP problems
NP problems
 
Complete Thesis-Final
Complete Thesis-FinalComplete Thesis-Final
Complete Thesis-Final
 
Thesispdf
ThesispdfThesispdf
Thesispdf
 
Trinity Impulse - Event Aggregation to Increase Stundents Awareness of Events...
Trinity Impulse - Event Aggregation to Increase Stundents Awareness of Events...Trinity Impulse - Event Aggregation to Increase Stundents Awareness of Events...
Trinity Impulse - Event Aggregation to Increase Stundents Awareness of Events...
 
NCLEX-PN Study Guide
NCLEX-PN Study GuideNCLEX-PN Study Guide
NCLEX-PN Study Guide
 
Get tr doc
Get tr docGet tr doc
Get tr doc
 
James Pitts_Thesis_2014
James Pitts_Thesis_2014James Pitts_Thesis_2014
James Pitts_Thesis_2014
 
Adaptive Networking Protocol for Rapid Mobility
Adaptive Networking Protocol for Rapid MobilityAdaptive Networking Protocol for Rapid Mobility
Adaptive Networking Protocol for Rapid Mobility
 
Production of vam by oxy acetylation of ethylene-min
Production of vam by oxy acetylation of ethylene-minProduction of vam by oxy acetylation of ethylene-min
Production of vam by oxy acetylation of ethylene-min
 
TheseHautphenne
TheseHautphenneTheseHautphenne
TheseHautphenne
 
AUTOMATIC WELL FAILURE ANALYSIS FOR THE SUCKER ROD PUMPING SYSTEMS USING MACH...
AUTOMATIC WELL FAILURE ANALYSIS FOR THE SUCKER ROD PUMPING SYSTEMS USING MACH...AUTOMATIC WELL FAILURE ANALYSIS FOR THE SUCKER ROD PUMPING SYSTEMS USING MACH...
AUTOMATIC WELL FAILURE ANALYSIS FOR THE SUCKER ROD PUMPING SYSTEMS USING MACH...
 

Newman_T

  • 1. DEVELOPING A GENERAL FRAMEWORK FOR A TWO STAGED ARTIFICIAL POTENTIAL CONTROLLER By TRISTAN J. NEWMAN A THESIS PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE UNIVERSITY OF FLORIDA 2015
  • 2. © 2015 Tristan J. Newman
  • 3. To my colleagues, friends, and family.
  • 4. 4 ACKNOWLEDGMENTS I would like to thank my research advisor, Dr. Norman Fitz-Coy, who believed in me from the beginning; Dr. Josue Muñoz, who offered me his fantastic mentorship during a research fellowship in New Mexico; and Roxanne Rezaei, my lovely wife who has graced me with her unwavering support throughout my research and my studies. I would also like to thank the department of Mechanical and Aerospace Engineering for affording me the opportunity to study and do research, and all of the faculty and staff within it who worked so hard to ensure that I was equipped with all of the tools necessary to see it through.
  • 5. 5 TABLE OF CONTENTS Page ACKNOWLEDGMENTS.................................................................................................. 4 LIST OF TABLES............................................................................................................ 7 LIST OF FIGURES.......................................................................................................... 8 LIST OF ABBREVIATIONS............................................................................................. 9 ABSTRACT ................................................................................................................... 10 CHAPTER 1 INTRODUCTION................................................................................................ 12 Foreword ............................................................................................................ 12 A Note on Notation ............................................................................................. 13 Background ........................................................................................................ 14 Optimal Controls ...................................................................................... 14 Workspace-Discretized Pathfinding ......................................................... 20 Method of Lyapunov ................................................................................ 22 2 MATHEMATICAL OVERVIEW ........................................................................... 26 Vector Operations in Linear Algebra................................................................... 26 Body Rotations and Quaternion Math................................................................. 28 Derivatives of (and With Respect to) Multi-Dimensional Quantities.................... 32 3 METHODOLOGY ............................................................................................... 35 Formal Definition of an APF................................................................................ 35 Defining the Error States .................................................................................... 37 The Unconstrained Case.................................................................................... 39 General Constraints............................................................................................ 43 First Stage Repulsive Potential................................................................ 44 Second Stage Repulsive Potential........................................................... 49 4 IMPLEMENTATION............................................................................................ 54 Notable Constraints............................................................................................ 54 The Pointing Constraint ........................................................................... 54 The Slew Rate Constraint........................................................................ 59 Early Avoidance....................................................................................... 60 Developing a MatLab® Simulation ...................................................................... 70 Dynamics................................................................................................. 70
  • 6. 6 Integration................................................................................................ 71 Processing............................................................................................... 73 5 CONCLUSION.................................................................................................... 75 A Quasi-Real World Example............................................................................. 75 Unconstrained Simulation Results........................................................... 79 Partially Constrained Simulation Results ................................................. 82 Fully Constrained Simulation Results ...................................................... 85 A Note on Second Stage Potentials......................................................... 88 Topics for Future Research ................................................................................ 89 Considerations for Physical Actuation Devices........................................ 89 The State Vector Escort Problem ............................................................ 92 Mitigation of Local Extrema...................................................................... 93 Afterword ............................................................................................................ 99 APPENDIX A USEFUL MATRIX DERIVATIVES .................................................................... 100 Proof 1.............................................................................................................. 100 Proof 2.............................................................................................................. 101 Proof 3.............................................................................................................. 102 Proof 4.............................................................................................................. 103 Proof 5.............................................................................................................. 105 Proof 6.............................................................................................................. 106 Proof 7.............................................................................................................. 107 Proof 8.............................................................................................................. 109 Proof 9.............................................................................................................. 111 B MISCELLANEOUS PROOFS AND LEMMAS .................................................. 112 Proof 1.............................................................................................................. 112 Proof 2.............................................................................................................. 113 Proof 3.............................................................................................................. 114 Proof 4.............................................................................................................. 116 Proof 5.............................................................................................................. 117 Proof 6.............................................................................................................. 119 Proof 7.............................................................................................................. 121 Proof 8.............................................................................................................. 123 C MATLAB® SIMULATION CODE ....................................................................... 125 LIST OF REFERENCES ............................................................................................. 133 BIOGRAPHICAL SKETCH.......................................................................................... 135
  • 7. 7 LIST OF TABLES Table Page 2-1 Summary of derivatives discussed in Chapter 2................................................. 34 4-1 Logic term values across three regions in the gamma domain........................... 66
  • 8. 8 LIST OF FIGURES Figure Page 1-1 Illustration of “attitude forbidden” and “attitude mandatory” zones...................... 15 1-2 Example of A* pathfinding with workspace discretization ................................... 22 3-1 Abstracted potential function with six sample points and two minima................. 35 3-2 Relative orientations of inertial, body, and tracking frames................................. 38 3-3 Dependency chart for the generalized control solution....................................... 53 4-1 Setup for the early avoidance pathway............................................................... 62 4-2 Illustration of the double conic problem .............................................................. 64 4-3 Variation in the logic term over the middle gamma domain ................................ 66 4-4 Illustration of the solution to the double conic problem....................................... 66 4-5 Sample profiles of the early avoidance potential ................................................ 67 5-1 AbstractoSat illustration...................................................................................... 75 5-2 Origin and terminus points for AbstractoSat sensors.......................................... 78 5-3 Results of the unconstrained simulation ............................................................. 80 5-4 Paths traced by sensor vectors in the unconstrained simulation ........................ 81 5-5 Results of the first pointing constraint simulation................................................ 83 5-6 Paths traced by sensor vectors in the first pointing constraint simulation........... 84 5-7 Results of the second pointing constraint simulation.......................................... 86 5-8 Paths traced by sensor vectors in the second pointing constraint simulation ..... 87 5-9 Demonstration of simulation hang-up induced by nearby local extrema............. 95
  • 9. 9 LIST OF ABBREVIATIONS Angular Momentum Exchange Device (AMED) An internal device on board a satellite which redistributes angular momentum, resulting in imparted torque. Artificial Potential Function (APF) A scalar function of the spacecraft’s orientation and/or angular velocity which determines the values of the controller output. Control Moment Gyroscope (CMG) A type of AMED which redistributes angular momentum by rotating at a fixed rate along a variable direction. Direction Cosine Matrix (DCM) A 3x3 matrix containing parameters which fully specify the rotation of one coordinate system with respect to another. Nth Time Derivative (TDN) A shorthand way of describing the operation 𝑑 𝑁 𝑑𝑡 𝑁⁄ (e.g. TD1 means “first time derivative”). Ordinary Differential Equation (ODE) An equation containing a function of one independent variable and its derivatives. Potential Rate Transform (PRT) A 3x1 vector which converts relative angular velocity into a rate of change for first-stage APFs. Reaction Wheel Assembly (RWA) A type of AMED which redistributes angular momentum by rotating at a variable rate along a fixed direction. Runge-Kutta (RK) Method A method of numerical integration which solves an ODE where the independent variable is separable from its derivative.
  • 10. 10 Abstract of Thesis Presented to the Graduate School of the University of Florida in Partial Fulfillment of the Requirements for the Degree of Master of Science DEVELOPING A GENERAL FRAMEWORK FOR A TWO STAGED ARTIFICIAL POTENTIAL CONTROLLER By Tristan J. Newman August 2015 Chair: Norman Fitz-Coy Major: Aerospace Engineering Although there are many control options available to satellite manufacturers, artificial potential functions (APF) provide an analytical and computationally inexpensive way for a satellite to perform multiple tasks simultaneously. By expressing mission constraints as a series of APFs and combining the results, a control solution can always be evaluated. The goal of my research was to develop a general framework which evaluates the control solution from a generalized combination of arbitrary constraints. Developing a general framework is attractive because of its flexibility in adapting a control solution to a landscape where the constraints may be subject to change based on the needs of the mission. Separating the control system into two stages – one for attitude/orientation, and one for angular velocity – was necessary to decouple those states. The first stage determines the angular velocity required by the spacecraft, and the second computes the torque necessary to reach the desired state.
  • 11. 11 The newfound flexibility provided by this framework makes it possible to add constraints to a control solution with unprecedented ease and efficiency. The primary example focused on in this document is the “pointing constraint problem” – a classic problem in spacecraft attitude control. The research done here suggests that a wide range of uses may exist for APF controls and including slew-rate constraints and early avoidance of pointing constraint boundaries. Future research will be necessary to solve some issues with this approach – particularly in the implementation of second-stage potentials. It is believed that solving these problems will greatly increase the effectiveness of nonlinear control systems by sparing time and control effort. Overcoming these barriers may very well lead to APF controls becoming a valuable asset for satellites with limited computational resources.
  • 12. 12 CHAPTER 1 INTRODUCTION Foreword On-orbit attitude change maneuvers can be regarded as the astrodynamical equivalent of looking over one’s shoulder. There are many ways to control such a maneuver, and some are more efficient than others at the expense of higher computational overhead. However, for such maneuvers there is a need to balance efficiency with speed. To carry the human analogy one step farther, consider an individual observing a plane as it flies through the daytime sky. If the plane were to fly in front of the sun, we assume that it would cause the onlooker some discomfort if they were to continue tracking it. The “maneuver” performed here can be regarded as a tracking slew from one orientation to another. However, this maneuver is subject to a “keep-out constraint” – that is, there is a “sensor” (in this case, the onlooker’s eyes), and a direction along which that sensor should not be directed. A buffer about this vector defines a conic region known as the “keep-out cone.” The keep-out constraint is designed to prevent the sensor from being directed along any vector within the keep-out cone. To return to the human analogy, although the experiment would depend on some unquantifiable parameters such as the pain-tolerance of the participant, or their willingness to carry out the experiment, a surface-level reconstruction of this scenario might show that one would instinctively avoid looking directly at the sun as the plane crosses over its disk.
  • 13. 13 The operative distinction here is “instinctively,” which would imply that executing the maneuver requires little-to-no effort on the part of the onlooker. Although it would not necessarily follow an optimal path, the maneuver would, ideally, have little impact on the performance of the onlooker’s mission (for example, perhaps they were commuting to work). This example therefore illustrates the attractiveness of computationally inexpensive maneuvers in the context of satellite control systems. If a satellite was to be designed which could carry out a tracking maneuver subject to the keep-out constraint, there would be several options for the control system. In particular, three methods appeared predominantly in my research: (i) the time (or energy) optimized control solution [1]; (ii) the workspace-discretized pathfinding solution [2]; and (iii) the nonlinear control solution based on the method of Lyapunov [3], [4]. This document will primarily focus on the method of Lyapunov, and the concept of artificial potential functions (APF) which stems from it. It will be shown that APF controls provide an analytical - and therefore computationally inexpensive - way of navigating the “field” of constraint boundaries. However, a brief study of other pre- existing methods is necessary in order to fully appreciate the comparative efficiency of APF controls. A Note on Notation Because of the breadth of subjects covered in this document, a single notation will be used to avoid confusion. Equations brought in from other sources will thus have their notation modified to fit this standard: All quantities will be hereafter be identified as “scalar” – with no distinguishing marks (e.g. 𝑠 ∈ ℝ) – “vector” – marked with a single underline (e.g. 𝑣 ∈ ℝ 𝑛 ) – or “matrix” – marked with two underlines (e.g. 𝑀 ∈ ℝ 𝑛×𝑚 ).
  • 14. 14 Because there will be such a heavy focus on linear algebra throughout this document, the word “vector” may be used to refer to any matrix where either of the dimensions are 1 (if both dimensions are 1, the quantity may be referred to as a scalar instead), in which case the term “row vector” or “column vector” will be used in the case where the number of rows or columns of said matrix are 1, respectively. Any quantity underlined once in any of the equations appearing hereafter is implicitly a column vector. If a row vector is to be used, the vector will be transposed as such: 𝑣 is a column vector; 𝑣 𝑇 is a row vector. Furthermore, a “hat” over a vector with any number of dimensions (e.g. 𝑣̂) will serve to indicate the vector is of unit length (i.e. the scalar components of the vector are unitless and the magnitude is equal to one). To avoid excessive notation, all physical vectors (e.g. directions in space, angular velocities, torques, etc.) are all implicitly parameterized in the body-fixed coordinate frame of the satellite unless otherwise noted. If it is necessary, the frame in which the vector is parameterized will be noted with an upper-left superscript (e.g. 𝑣𝑁 ). Finally, the first time derivative (TD1) of any quantity will be represented with a single dot (e.g. 𝑑𝑠 𝑑𝑡⁄ = 𝑠̇), the second time derivative (TD2) will be represented with two dots (e.g. 𝑑2 𝑣 𝑑𝑡2⁄ = 𝑣̈), and so on. Background Optimal Controls Summary. The optimal control solution is perhaps the most difficult one to derive and implement. This difficulty arises because it must not only solve the problem, but do so while minimizing a parameter of the satellite designer’s choice.
  • 15. 15 Unsik Lee and Mehran Mesbahi derived such a solution; minimizing either maneuver time, or energy expenditure requirements for the maneuver using Gauss’s pseudospectral method [1]. Citing the need for “…avoiding undesirable orientations with respect to celestial objects…” as “…essential for science missions [1],” the problem described is exactly the keep-out problem analogized in the “watching planes” example. As a point of interest, [1] was mentioned to be a follow-up on research done by Lee and Mesbahi regarding the use of Lyapunov potential functions to perform similar maneuvers [4]. As in [4], Lee and Mesbahi parameterize the rotation of the spacecraft with unit quaternions, where any quaternion defines an attitude that the spacecraft may occupy. Although there are an infinite number of attitudes that the spacecraft can occupy, there exists a finite number of discrete zones, corresponding “attitude forbidden” (the keep- out cones described in Chapter 1), and “attitude mandatory” (a conic region similar to a keep-out cone, but whose role is reversed such that a body-fixed direction is meant to stay within it rather than outside of it) [1]. An example for each type of zone is illustrated in Figure 1-1 (the illustrations themselves taken from [1]). A B Figure 1-1. A) Illustration of an “attitude forbidden” zone [1]. B) Illustration of an “attitude mandatory” zone [1].
  • 16. 16 The cost function to be minimized is 𝐽 = ∫ (𝜌 + (1 − 𝜌)| 𝑢( 𝑡)|) 𝑑𝑡 𝑡 𝑓 𝑡0 (1-1) where 𝑢( 𝑡) is a 3-element vector containing the control torques for each reaction wheel [1], and 𝜌 is “a weighting factor on the time, where 𝜌 = 0 and 𝜌 = 1 yield the energy optimal and time optimal performance cost, respectively [1].” Equation 1-1 is subject to the following constraints: 𝑞̇( 𝑡) = 1 2 𝑞( 𝑡) ⊗ 𝜔̃( 𝑡), (1-2) 𝐽𝜔̇ ( 𝑡) = (𝐽𝜔 + 𝐽𝑟 𝜔 𝑟) × 𝜔 − 𝐽𝑟 𝑢, (1-3) 𝜔̇ 𝑟 = 𝑢 (1-4) where “𝑞( 𝑡) is the unit quaternion representing the attitude of the rigid body at time 𝑡”, “𝜔( 𝑡) ∈ ℝ3 denotes the angular velocity of the spacecraft in the body frame”, “𝜔̃( 𝑡) = [𝜔 𝑇 0]4×1 𝑇 ”, “ 𝐽 = diag( 𝐽1, 𝐽2, 𝐽3) denotes the [centroidal] inertia matrix of the spacecraft in the body frame”, and “𝐽𝑟 = diag( 𝐽𝑟1, 𝐽𝑟2, 𝐽𝑟3) denotes the inertia matrix of the spacecraft’s reaction wheels in the body frame [1].” Lee and Mesbahi require the spacecraft to follow a “rest to rest” profile – i.e. the maneuver begins (at time 𝑡 = 𝑡0) and ends (at time 𝑡 = 𝑡𝑓) with zero angular velocity. The spacecraft’s reaction wheels are likewise assumed to be initially at rest. Thus, the maneuver observes the following boundary conditions: 𝑞( 𝑡0) = 𝑞𝑡0 ; 𝑞(𝑡𝑓) = 𝑞𝑡 𝑓 ; 𝜔( 𝑡0) = 0; 𝜔(𝑡𝑓) = 0; 𝜔𝑟( 𝑡0) = 0. (1-5)
  • 17. 17 In addition to boundary conditions, there are three constraints on the control and angular velocity of the spacecraft [1] which exist to prevent saturation of the reaction wheels or harmonic oscillation of nonrigid components: |𝑢𝑖| ≤ βu; (1-6) |𝜔𝑖| ≤ 𝛽 𝜔; (1-7) |𝜔𝑟 𝑖 | ≤ 𝛽 𝜔 𝑟 ; (1-8) for 𝑖 = 1, 2, 3 [1]. Finally, there are constraints corresponding to each attitude forbidden zone, and the attitude mandatory zone [1]. These are represented by a known matrix 𝑀 that is a function of spatial geometry. Each 𝑀 satisfies the inequality constraint 𝑞 𝑇 𝑀 𝑓 𝑖 𝑞 < 0 (1-9) for the 𝑖th forbidden zone (where 𝑖 = 1, … , 𝑛 [1]), and 𝑞 𝑇 𝑀 𝑚 𝑞 > 0 (1-10) for the lone attitude mandatory zone [1]. The solution to the optimal control problem defined by Eqs. 1-2 through 1-10 was determined by “a Gauss pseudospectral method (direct optimal control method) using the open source optimal control software GPOPS® in conjunction with the nonlinear programming problem solver SNOPT® and the automatic differentiator INTLAB® [1].” Gauss pseudospectral method is described as: “a class of direct collocation methods where the optimal control problem is transcribed into a nonlinear programming problem (NLP) by approximating the state and control states using global orthogonal polynomials and collocating the differential dynamic equations on Legendre-Gauss
  • 18. 18 collocation points [1].” Reference [5] expounds more upon the details of pseudospectral methods, including Legendre-Gauss collocation. Because collocation methods such as this are only valid on the range [−1, 1], the generalized time interval 𝑡 = [𝑡0, 𝑡𝑓] is transformed using 𝜏 = 2𝑡 − 𝑡𝑓 − 𝑡0 𝑡𝑓 − 𝑡0 . (1-11) The derivation completes as follows: The states [sic] 𝑞( 𝜏) is approximated by the polynomial 𝑞̃( 𝜏) using a basis of 𝑁 + 1 Lagrange interpolating polynomials on the time interval of [−1, 1] as 𝑞( 𝜏) ≈ 𝑞̃( 𝜏) = ∑ 𝑞( 𝜏𝑖) 𝐿𝑖( 𝜏𝑖) 𝑁 𝑖=0 where 𝐿𝑖( 𝜏) is the 𝑖th Legendre polynomial defined as 𝐿𝑖( 𝜏) = ∏ 𝜏 − 𝜏𝑗 𝜏𝑖 − 𝜏𝑗 𝑁 𝑗=0,𝑗≠𝑖 , ( 𝑖 = 0, … , 𝑁). The derivative of the state approximation is similarly obtained as 𝑞̇( 𝜏) ≈ 𝑞̃̇( 𝜏) = ∑ 𝑞̃( 𝜏𝑖) 𝐿̇ 𝑖( 𝜏𝑖) 𝑁 𝑖=0 = ∑ 𝐷 𝑘,𝑖 𝑞̃( 𝜏𝑖) 𝑁 𝑖=0 where 𝐷 𝑘,𝑖 are element [sic] of non-square matrix 𝐷 ∈ ℝ 𝑁×(𝑁+1) called Gauss pseudospectral differentiation matrix … The performance cost in terms of 𝜏 is approximated using a Gauss quadrature as 𝐽 = 𝑡𝑓 − 𝑡0 2 ∑ 𝑤 𝑘(𝜌 + (1 − 𝜌)| 𝑢( 𝜏 𝑘)|) 𝑁 𝑘=1 where 𝑤 𝑘 are the Gauss weights. The above performance index together with approximated constraints … lead to formulation of a nonlinear programming with the initial and final states 𝑞( 𝑡0) = 𝑞̃( 𝜏0) and 𝑞(𝑡𝑓) = 𝑞̃(𝜏 𝑓), respectively, which can be solved using SNOPT nonlinear solver [1].
  • 19. 19 Advantages and disadvantages. The greatest benefit of the optimal control solution is that it is, in fact, optimal. This allows for satellites operating with such a control system to complete large-slew maneuvers while holding to a variety of constraints in as little time as possible, or expending as little energy as possible. However, this benefit comes at a price. In computer science terms, the product definition for the 𝑖th Legendre polynomial implies that evaluating 𝐿𝑖( 𝜏) for 𝑁 collocation points has a time complexity of 𝑂( 𝑁), as it is the product of 𝑁 terms (each with a time complexity of 𝑂(1)). Furthermore, evaluating the state requires the summation of 𝑁 + 1 Legendre polynomials (modified by 𝑞( 𝜏)), implying that the evaluation of 𝑞̃( 𝜏) has a time complexity of 𝑂( 𝑁2). In addition, the first time derivative of 𝐿𝑖( 𝜏) requires the application of the product rule 𝑁 times. Therefore, evaluating 𝐿̇ 𝑖( 𝜏) (and, by extension, 𝐷 𝑘,𝑖 [5]) also has a time complexity of 𝑂( 𝑁2). However, since the evaluation of 𝑞̇( 𝜏) requires the summation of 𝑁 + 1 such terms, the overall time complexity for this section of the algorithm is 𝑂( 𝑁3). This is only the time complexity involved in determining the quaternion rate at the next collocation point. For all 𝑁 collocation points, the time complexity graduates to 𝑂( 𝑁4)! This complexity does not take into account operations done internally by the SNOPT nonlinear solver, so 𝑂( 𝑁4) can be regarded as a minimum time complexity. For comparison, a fully analytical method (such as the method of Lyapunov, as will eventually be shown) has a time complexity of 𝑂(1). In other words, determining the optimal control solution requires much dedication of onboard computational resources.
  • 20. 20 This may not be an issue for maneuvers wherein a small number of collocation points can be used, as it can be inferred from Eq. 1-11 that short-duration maneuvers do not progress as rapidly through the 𝜏 domain, and therefore fewer collocation points may be used. Furthermore, larger satellites (such as GPS or military satellites) that prioritize the speed in which a precise maneuver can be executed over the amount of memory that maneuver takes may make better use of the optimal control solution versus other, nonoptimal methods. Workspace-Discretized Pathfinding Summary. Another approach explored by Henri C. Kjellberg and E. Glenn Lightsey discretizes the spherical space surrounding the spacecraft into hexagonal segments to find “an admissible path between the attitude keep-out zone [using the] A* pathfinding algorithm … chosen because of its ease of implementation [2].” Since the workspace is discretized, each “pixel” (a single element of the unit sphere) has its neighboring pixels identified pre-implementation and stored on-board. A “path-cost function 𝑔(𝑝( 𝑘))” and “heuristic distance function ℎ(𝑝( 𝑘))” are defined where 𝑝( 𝑘) is the “pixel node at step 𝑘 [2].” The “distance-plus-cost function 𝑓(𝑝( 𝑘))” is defined to be 𝑓(𝑝( 𝑘)) = 𝑔(𝑝( 𝑘)) + ℎ(𝑝( 𝑘)). If a pixel is outside of the keep-out region (which [2] describes as “the prohibited constraint set”), then the cost function is given by 𝑔(𝑝( 𝑘)) = 𝜃(𝑒( 𝑘), 𝑒( 𝑘 − 1)) + 𝑑 + 𝑔(𝑝( 𝑘 − 1)), where 𝑒( 𝑘) is the vector difference between the “current” and “previous” pixels, and 𝜃(𝑒( 𝑘), 𝑒( 𝑘 − 1)) can be interpreted as the angle by which the path has deflected in the
  • 21. 21 previous two iterations, “thus penalizing a change in the eigenaxis vector direction … If, however, the pixel is inside the prohibited constraint set, then 𝑔(𝑝( 𝑘)) = 𝑁, where 𝑁 is an arbitrarily large constant to prevent a solution from going within the constrained region [2].” The heuristic distance function is the same regardless of whether or not a pixel is inside the constrained region. If 𝑝( 𝑚) represents the “target” pixel, then the heuristic distance is the angle that must be traversed in order to reach it [2]. Therefore ℎ(𝑝( 𝑘), 𝑝( 𝑚)) = arccos[𝑣(𝑝( 𝑘)) ∙ 𝑣(𝑝( 𝑚))]. Having defined both cost functions, the A* algorithm can be run to find the path that minimizes the total cost between the initial and final pixels. The algorithm as described by Kjellberg and Lighsey returns the set of pixels that provide an admissible, locally minimum path-cost [as defined by the path-cost function 𝑓(𝑝( 𝑘))] trajectory for the desired rotation of the vehicle’s body-fixed x axis to the new attitude. The pixels that have been explored during this process are known as the closed set. The pixels that constitute the final path are reduced by eliminating all pixels that lie along approximately the same path on a great circle. The remaining pixels are “turning points,” locations where the eigenaxis vector direction must change … The resulting trajectory for a typical reorientation problem is shown in Figure 8 [of [2], collated in Figure 1-2] for the vehicle’s body-fixed x axis [2]. Advantages and disadvantages. In contrast with the optimal control solution, discretization becomes more efficient as the number of constraints increases. This is because more constraints reduce the number of pixels accessible to the A* algorithm [2]. However, it is worth noting that this method provides a solution that can be quite far from optimal since the “cost function” being optimized relates to the A* algorithm instead of the keep-out problem optimized by Lee and Mesbahi.
  • 22. 22 Figure 1-2. "Example x-axis reorientation trajectory resulting from the A* pathfinder algorithm [2].” However, Kjellberg and Lightsey note that “these advantages are particularly well suited for small spacecraft, which have limited power and processing capabilities, yet must meet many different attitude constraints [2].” In terms of complexity, workspace discretization can be thought of as a middle ground between optimality, and the computational efficiency of the Lyapunov’s method for nonlinear control. Method of Lyapunov Summary. While the optimal control and workspace discretization methods undoubtedly have their advantages, they are ultimately algorithmic approaches. The optimal solution can only be approximated by introducing a finite number of collocation
  • 23. 23 points, and increasing the accuracy of the approximation drastically slows down its computation. The workspace discretization method is purely algorithmic, requiring the discretization of space around the satellite in order to be compatible with the A* pathfinding algorithm proposed by Kjellberg and Lightsey. In both cases, the time complexity of obtaining the solution depends on the fidelity of the discretization (i.e. a better approximation can be obtained in both cases by using either more collocation points, or more pixels respectively). An analytic and closed-form solution has the benefit of being rapidly calculable, although the solution obtained may not be optimal. Colin McInnes describes a procedure to obtain such a solution: “The second method of Lyapunov allows expressions for the required control torques to be obtained analytically in closed form. Therefore, attitude control commands may be generated in real time, so that the method may be suitable for autonomous, onboard operations [3].” Defining “a scalar potential function 𝑉 … to be positive definite everywhere, except at the target point of the system state space where it will vanish [3],” 𝑉 = 1 2 ∑ 𝐼𝑖 𝜔𝑖 2 3 𝑖=1 + 1 2 ∑ 𝜆(𝜃𝑖 − 𝜃𝑖) 2 3 𝑖=1 . (1-12) Thus taking the first time derivative (TD1) of Eq. 1-12 yields 𝑉̇ = ∑ 𝜔𝑖 𝑇𝑖 3 𝑖=1 + ∑ 𝜆𝜃̇ 𝑖(𝜃𝑖 − 𝜃̃𝑖) 2 3 𝑖=1 (1-13) where “𝜔𝑖, 𝐼𝑖, 𝑇𝑖 (𝑖 = 1, … ,3) are the satellite body rate, moment of inertia, and control torque about the 𝑖th principal axis”, and “the second term [of Eq. 1-12] represents an
  • 24. 24 artificial potential energy possessed by the system relative to the target attitude (𝜃̃1, 𝜃̃2, 𝜃̃3) [3].” Since 𝑉 takes on its minimum value (of zero) at the desired orientation and angular velocity, the control solution 𝑇𝑖 should be specified such that 𝑉̇ (and Eq. 1-13 by extension) is negative semidefinite [3]. “The choice of control is obviously nonunique; however, the simplest control is selected as 𝑇𝑖 = −𝜅𝜔𝑖 − ∑ 𝐺𝑖𝑗 𝑇 𝜆𝑗(𝜃𝑗 − 𝜃̃𝑗) 3 𝑗=1 where the gain constants 𝜅 and 𝜆𝑖 (𝑖 = 1, … ,3 [sic]) will be chosen to shape the maneuver [3].” The matrix 𝐺𝑖𝑗 𝑇 is a function of the spatial geometry of the system: 𝐺𝑖𝑗 𝑇 = [ 1 sin 𝜃1 tan 𝜃2 cos 𝜃1 tan 𝜃2 0 cos 𝜃1 − sin 𝜃1 0 sin 𝜃1 sec 𝜃2 cos 𝜃1 sec 𝜃2 ]. It can thus be shown that the target attitude is “the only attractive equilibrium point for the system [3].” In the context of “sun vector avoidance,” another scalar potential function must be defined, although its exact form varies from author to author. McInnes uses Gaussian functions “to represent the regions of high potential so that there are no singularities in the potential and the controls are bounded [3].” Unsik Lee and Mehran Mesbahi use “logarithmic barrier potentials [4].” This is the point at which most research into APF-based controls diverges, as the method of Lyapunov can be applied to many different potentials and constraints – nearly all of which are defined differently from author to author. It is from here that my own research branches off – away from the background material discussed thus far.
  • 25. 25 Advantages and disadvantages. It is hopefully apparent from this summary of Lyapunov’s method that there is no one way to solve a constrained maneuver problem, as doing so is nearly as much of an art as it is a science, which may be seen as either a disadvantage (as some other methods yield concretely defined solutions with easily understood physical significance), or a great advantage (since there are often as many different ways to solve a problem using APFs, each with its own set of advantages and disadvantages). However, it should be disclosed that the solution can never be said to be optimal, no matter what APF is chosen. The lack of optimality should really only be seen as a barrier to use in the case of satellites for which quickly executing a maneuver is more important than sparing on- board computational resources for more (subjectively) “important” tasks. For example, a satellite conducting a survey of overhead constellations may not need to slew in an optimal manner, but if the processor on board only has limited processing capability then the analytical solution provided by Lyapunov’s method may be more attractive. The greatest concerns with the application of user-defined scalar potentials is that, when superimposed, the APFs may give rise to regions where the scalar rate becomes zero, even though the desired state has not been reached. These situations can be avoided through deliberate configuration of the APFs, and are oftentimes unstable (meaning that they could be avoided using a jitter controller, which provides numerical uncertainty to the currently adopted state). However, if such a region were the result of a stable local minimum, then a more powerful approach is necessary. This “local minimum problem” is of great concern to researchers studying nonlinear controls, but it is currently beyond the scope of this document to address it directly.
  • 26. 26 CHAPTER 2 MATHEMATICAL OVERVIEW Vector Operations in Linear Algebra As noted in Chapter 1, “the word ‘vector’ may be used to refer to any matrix where either of the dimensions are 1.” This can be done because every operation in vector algebra has an equivalent operation in linear algebra. For example, consider a vector 𝑣 ∈ ℝ3 . If 𝑣 is parameterized in an arbitrary reference basis 𝐴 containing orthonormal basis vectors 1̂, 2̂, and 3̂, with corresponding parallel components 𝑣1, 𝑣2, and 𝑣3, then the vector annotated equation for 𝑣𝐴 would be 𝑣𝐴 = 𝑣11̂ + 𝑣22̂ + 𝑣33̂, Thus, the equivalent matrix form conveniently allows for the use of 𝑣𝐴 in linear algebra operations, and can be determined by respectively representing the vectors 1̂, 2̂, and 3̂ (parameterized in 𝐴) as the 3 × 1 matrices (column vectors) [1 0 0] 𝑇 , [0 1 0] 𝑇 , and [0 0 1] 𝑇 , then 𝑣𝐴 has the equivalent matrix representation 𝑣𝐴 ⟺ [ 𝑣1 𝑣2 𝑣3 ]. Defining a second vector 𝑢 which is also parameterized in the 𝐴-fixed {1̂, 2̂, 3̂} basis, it follows from the definition of the “dot product” 𝑢 ∙ 𝑣 that 𝑢 ∙ 𝑣 = 𝑢1 𝑣1 + 𝑢2 𝑣2 + 𝑢3 𝑣3. (2-1) Note that the upper-left superscripts have been omitted because Eq. 2-1 is valid in any coordinate system provided both vectors are parameterized within it. Ergo, Eq. 2-1 has the equivalent matrix representation 𝑢 ∙ 𝑣 ⟺ 𝑢𝐴 𝑇 𝑣𝐴 (2-2)
  • 27. 27 where the superscript 𝑇 denotes the transpose of the column vector 𝑢𝐴 . One can verify this by performing the multiplication in Eq. 2-2 and comparing its results to Eq. 2-1. The result in Eq. 2-2 naturally suggests that there is an equivalent matrix form for the cross product as well. Thus, we may once again consider the vectors 𝑢 and 𝑣 as parameterized in the {1̂, 2̂, 3̂} basis. By definition, the cross product 𝑢𝐴 × 𝑣𝐴 is equal to 𝑢𝐴 × 𝑣𝐴 = ( 𝑢2 𝑣3 − 𝑢3 𝑣2)1̂ + ( 𝑢3 𝑣1 − 𝑢1 𝑣3)2̂ + ( 𝑢1 𝑣2 − 𝑢2 𝑣1)3̂. (2-3) It is possible to group the terms on the right-hand side of Eq. 2-3 such that it may be represented as the multiplication of a 3 × 3 matrix and the 3 × 1 matrix representing the vector 𝑣𝐴 . This yields 𝑢𝐴 × 𝑣𝐴 ⟺ 𝑢𝐴 × 𝑣𝐴 ; (2-4a) 𝑢𝐴 × ≝ [ 0 −𝑢3 𝑢2 𝑢3 0 −𝑢1 −𝑢2 𝑢1 0 ] (2-4b) where the superscript × in Eq. 2-4a denotes the “skew matrix form” of the column vector 𝑢𝐴 which is defined in Eq. 2-4b. Once again, this may be verified by executing the matrix multiplication in Eq. 2-4a, which will consequently yield Eq. 2-4b. The equivalencies in Eqs. 2-2 and 2-4a allow us to reconcile vector operations with linear algebra. One example of this which we will eventually find to be particularly useful relates the cross product of two vectors to their dot product. The identity formally known as the “vector triple product” is most commonly cited in terms of vector operations. However, we will hereafter refer to its equivalent matrix form: 𝑢𝐴 × 𝑣𝐴 × = 𝑣𝐴 𝑢𝐴 T − 𝑢𝐴 T 𝑣𝐴 𝕀 (2-5) where 𝕀 is the 3 × 3 identity matrix. This identity is proven formally in [6], published in 1939’s Mathematical Gazette by S. Chapman and E. A. Milne.
  • 28. 28 Body Rotations and Quaternion Math The rotation of a rigid body in space can always be specified using a direction cosine matrix (DCM) – a 3x3 matrix whose terms fully specify the rotation of one coordinate system with respect to another. For example, consider a spacecraft whose body-fixed (i.e. fixed in frame 𝐵) 𝑥, 𝑦, and 𝑧 axes are parameterized in an inertially-fixed (i.e. fixed in frame 𝑁) coordinate system as 𝑥̂𝑁 , 𝑦̂𝑁 , and 𝑧̂𝑁 , respectively. The DCM that converts an inertially-fixed vector to body-fixed coordinates is 𝑅𝑁 𝐵 = [ 𝑥̂𝐵 𝑦̂𝐵 𝑧̂𝐵 ] [7]. As a point of interest, the TD1 of any DCM is dependent on the angular velocity of the coordinate system it transforms into. In general, for two coordinate systems fixed in arbitrary reference frames 𝐴 and 𝐵, the TD1 of 𝑅𝐴 𝐵 is 𝑅̇𝐴 𝐵 = − 𝜔𝐴 𝐵 × 𝑅𝐴 𝐵 (2-6) where 𝜔𝐴 𝐵 is the angular velocity of the 𝐵 frame relative to the 𝐴 frame [8]. More compact ways of representing an orientation are available. The axis-angle representation identifies the transformation between two reference frames as a rotation by a single net rotation angle 𝜃 about a unit length “Eigen-axis” 𝑎̂. Alternatively, we may specify the transformation as a sequence of three rotations about the basis axes. The angles, in sequence, are known as “Euler” angles. Either case exhibits special orientations (called “singularities” in formal literature [9]) for which a unique set of parameters may not be determined. Many Earth-bound applications (e.g. submarines, land vehicles, and passenger planes) may avoid these singularities by restricting their operational envelopes (e.g. not being designed to execute a 90° roll).
  • 29. 29 Satellites in space, however, do not often have such restrictions placed on the attitudes they can occupy. Their constraints tend to be more exotic (such as the attitude mandatory and forbidden constraints discussed in Chapter 1) thus necessitating a singularity-free expression of attitude. For this reason, space-based applications use four-element parameters called “Euler symmetric parameters” or “quaternions.” Because they do not contain a minimal set of three elements, quaternions are able to store all of the information necessary to specify a unique orientation in space. These elements may be uniquely determined from any DCM, including those which would create singularities in other representations. Formally, quaternions are complex numbers consisting of one real, and three imaginary components. However, in the context of this document, any quaternion is treated as a 4 × 1 matrix (or four-dimensional column vector) of the form 𝑞 ≝ [ 𝑎̂ sin( 𝜃 2⁄ ) cos( 𝜃 2⁄ ) ] ≝ [ 𝜀 𝜂] ≝ [ 𝜀1 𝜀2 𝜀3 𝜂 ] (2-7) where 𝑎̂ is the the Eigen-axis of the rotation (the parameterization of which is context- dependent), and 𝜃 is the rotation angle. As a point of interest, it follows from Eq. 2-7 that |𝑞| = √sin2( 𝜃 2⁄ ) + cos2( 𝜃 2⁄ ) ≡ 1, thus any quaternion representing a pure rotation (which, in this context, is the only quaternion we will use) is of unit “length.” The inverse rotation can be represented by a quaternion obtained in one of two ways: either by rotating the starting coordinate basis about 𝑎̂ by an angle – 𝜃, or by rotating about −𝑎̂ by 𝜃. Modifying Eq. 2-7, the inverse quaternion can be written as
  • 30. 30 𝑞−1 = [ 𝑎̂ sin(− 𝜃 2⁄ ) cos(− 𝜃 2⁄ ) ] = [ 𝑎̂ sin( 𝜃 2⁄ ) − cos( 𝜃 2⁄ ) ] ≡ [ 𝜀 −𝜂] ; (2-8a) 𝑞−1 = [ −𝑎̂ sin( 𝜃 2⁄ ) cos( 𝜃 2⁄ ) ] ≡ [ −𝜀 𝜂 ] = − [ 𝜀 −𝜂] ≡ −𝑞−1 . (2-8b) Note that Eqs. 2-8a and 2-8b are equivalent, despite being separated by a factor of −1. This interesting property is called “sign ambiguity”, and implies that for any quaternion 𝑞 = −𝑞. It will also be useful to note that applying any two rotations represented by the quaternions 𝑞1 and 𝑞2 to a starting coordinate basis is equivalent to applying a single rotation represented by may be expressed as a single rotation represented by the quaternion 𝑞 𝑒 (also known as the “quaternion error”). If basis 1 and 2 are reached by respectively applying 𝑞1 and 𝑞2 to the starting basis, then the quaternion error is determined by applying the “quaternion product [10]” to 𝑞2 and 𝑞1 −1 𝑞 𝑒 ≝ 𝑞2 ⊗ 𝑞1 −1 , which has the equivalent matrix expression 𝑞 𝑒 = [ −𝜀1 × + 𝜂2 𝕀 −𝜀1 𝜀1 𝑇 𝜂1 ] [ 𝜀2 𝜂2 ], (2-9) where 𝕀 denotes the identity matrix of dimension 3x3. Equation 2-9 shows that the quaternion error can be obtained by applying a linear operation on 𝑞2. However, it may be useful to express the quaternion error as a linear operation on 𝑞1 instead. Reorganization of Eq. 2-9 results in the expression 𝑞 𝑒 = [ 𝜀2 × − 𝜂2 𝕀 𝜀2 𝜀2 𝑇 𝜂2 ] [ 𝜀1 𝜂1 ], (2-10)
  • 31. 31 Thus, from these two equivalent forms of the quaternion error, we may define the “quaternion error matrix” of type 1 from Eq. 2-9, and of type 2 from Eq. 2-10: 𝑄1 (𝑞) ≝ [ −𝜀× + 𝜂𝕀 −𝜀 𝜀 𝑇 𝜂 ] ; (2-11a) 𝑄2 (𝑞) ≝ [ 𝜀× − 𝜂𝕀 𝜀 𝜀 𝑇 𝜂 ]. (2-11b) If we then substitute Eqs. 2-11a and 2-11b into Eqs. 2-9 and 2-10 respectively, we find that a more compact expression for the quaternion error may be used: 𝑞 𝑒 = 𝑄1 (𝑞1) 𝑞2 = 𝑄2 (𝑞2) 𝑞1. (2-12) Equation 2-12 affords us a meaningful, compact way of expression the effective difference between two rotations, which will become useful later. For now, however, we must also be concerned with locating a similar expression for a quaternion rate. Because a quaternion contains four elements, so too must its TD1. However, recall from Eq. 2-6 that the TD1 of an orientation is dependent on its angular velocity – a physical vector consisting of three elements. A quaternion representation of orientation should therefore be no different, so we must introduce a rectangular matrix to reconcile this difference in the dimensionality: Ξ (𝑞) ≝ [ 𝜀× + 𝜂𝕀 −𝜀 𝑇 ]. (2-13) The matrix defined in Eq. 2-13 is called the “quaternion rate matrix”, and converts the angular velocity of a coordinate system into a quaternion rate. For a coordinate system defined by an orientation 𝑞 and angular velocity 𝜔, the TD1 of 𝑞 (i.e. 𝑞̇) is 𝑞̇ = 1 2 Ξ (𝑞) 𝜔. (2-14)
  • 32. 32 Derivatives of (and With Respect to) Multi-Dimensional Quantities The previous discussion about the differentiation of a quaternion serves as an indicator of the important role of derivatives in the field of nonlinear and APF-based control. In fact, it will often be required of us to differentiate these multi-dimensional quantities – sometimes with respect to other quantities of the same dimensionality. We will find that any matrix can be differentiated with respect to a scalar quantity, but only a scalar can be differentiated with respect to a matrix. Furthermore, in the case where a matrix represents a column vector, we may introduce new definitions to allow for the differentiation of either a vector with respect to a vector. In most applications, differentiation is applied to a scalar with respect to another scalar. For example, if 𝑦 and 𝑥 are scalars, then the derivative 𝐷 of 𝑦 with respect to 𝑥 can be written as 𝐷 ≝ 𝑑𝑦 𝑑𝑥 if and only if 𝑦 is a function of only 𝑥. More generally, if 𝑦 is a function of other variables, then the derivative 𝐷 can be written as 𝐷 ≝ 𝜕𝑦 𝜕𝑥 (2-15) Similarly, we may differentiate a general 𝑛 × 𝑚 matrix with respect to a scalar. This also applies to vector quantities, since they may be represented as matrices. In general, if 𝑀 ∈ ℝ 𝑛×𝑚 , then the derivative 𝐷 of 𝑀 with respect to a scalar 𝑥 is defined as 𝐷 ≝ [ 𝜕𝑀11 𝜕𝑥 ⋯ 𝜕𝑀1𝑚 𝜕𝑥 ⋮ ⋱ ⋮ 𝜕𝑀 𝑛1 𝜕𝑥 ⋯ 𝜕𝑀 𝑛𝑚 𝜕𝑥 ] (2-16)
  • 33. 33 [11], [12], [13] In other words, differentiating a vector or matrix with respect to a scalar is equivalent to differentiating every element of that vector or matrix individually. We will also need to consider the derivative a vector (but not a matrix [11]) with respect to another vector. Note that, just as a vector can be represented as a single- column matrix, so too may a scalar be represented as a single-element vector. In general, if 𝑢 ∈ ℝ 𝑛 and 𝑣 ∈ ℝ 𝑚 , then the derivative 𝐷 of 𝑢 with respect to 𝑣 is defined as 𝐷 ≝ [ 𝜕𝑢1 𝜕𝑣1 ⋯ 𝜕𝑢1 𝜕𝑣 𝑛 ⋮ ⋱ ⋮ 𝜕𝑢 𝑛 𝜕𝑣1 ⋯ 𝜕𝑢 𝑛 𝜕𝑣 𝑚] (2-17) [11], [12], [13] Note that in the case where 𝑢 ∈ ℝ1 → 𝑢 ∈ ℝ, Eq. 2-17 reduces to a row vector 𝐷 𝑇 (where 𝐷 ∈ ℝ 𝑛 ). Furthermore, in the case where 𝑣 ∈ ℝ1 → 𝑣 ∈ ℝ, Eq. 2-17 reduces to Eq. 2-16. If both conditions are true, then Eq. 2-17 fully reduces to Eq. 2-15. These reduction checks serve to indicate that the general form of the matrix derivative in Eq. 2-17 is valid in every case that we will encounter here. Finally (for completeness’ sake), a derivative taken with respect to a matrix is only valid with respect to a scalar [11]. The derivative 𝐷 of the scalar 𝑦 with respect to a matrix 𝑀 is thus defined as 𝐷 ≝ [ 𝜕𝑦 𝜕𝑀11 ⋯ 𝜕𝑦 𝜕𝑀 𝑛1 ⋮ ⋱ ⋮ 𝜕𝑦 𝜕𝑀1𝑚 ⋯ 𝜕𝑦 𝜕𝑀 𝑛𝑚] [11] Note that if 𝑀 ∈ ℝ 𝑛×𝑚 → 𝑀 ∈ ℝ 𝑛 then 𝐷 reduces to Eq. 2-17, thus we find that the generality of these definitions hold for all special cases.
  • 34. 34 As a point of interest, some conventions transpose the resulting derivative matrices for various reasons. Equations 2-15 through 2-17 thus represent the untransposed form, giving them “the advantage of better agreement of matrix products with composition schemes such as the chain rule [12].” Reference [11] compactly provides the form of each derivative given the type of quantity being differentiated, and that which it is being differentiated with respect to. Table 2-1. Summary of derivatives discussed in this section, as outlined in [11]. The first row shows the type of quantity being differentiated; the first column shows the type of quantity it is being differentiated with respect to. Diff. W.R.T. Diff. Of Scalar Diff. Of Vector Diff. Of Matrix Scalar 𝑑𝑦 𝑑𝑥 𝑑𝑢 𝑑𝑥 = [ 𝜕𝑢𝑖 𝑑𝑥 ] 𝑑𝑀 𝑑𝑥 = [ 𝜕𝑀𝑖𝑗 𝑑𝑥 ] Vector 𝑑𝑦 𝑑𝑣 = [ 𝜕𝑦 𝜕𝑣𝑗 ] 𝑑𝑢 𝑑𝑣 = [ 𝜕𝑢𝑖 𝑑𝑣𝑗 ] Matrix 𝑑𝑦 𝑑𝑀 = [ 𝜕𝑦 𝜕𝑀𝑗𝑖 ] The properties of matrix derivatives are largely similar to those of scalar derivatives. They can be found summarized in [13], [14], and [15]. Of particular use is the “multivariate chain rule” which will allow us to differentiate quantities with multiple dimensions and dependencies. 𝑑𝑓 = 𝜕𝑓 𝜕𝑥1 𝑑𝑥1 + ⋯ + 𝜕𝑓 𝜕𝑥 𝑛 𝑑𝑥 𝑛 (2-18)
  • 35. 35 CHAPTER 3 METHODOLOGY Formal Definition of an APF An APF is a scalar potential function, hereafter denoted by 𝜑 or 𝜑 (𝓅) where 𝓅 ∈ ℛ 𝑛 is a vector containing 𝑛 independent variables. For example, if the state is written as 𝓅 = [ 𝑥 𝑦] 𝑇 (corresponding to coordinates in a horizontal plane), then 𝜑 can be visualized as a surface in 3-dimensional Cartesian space as in Figure 3-1. Figure 3-1. An abstracted potential function containing a sample of six initial states, and their corresponding paths to the nearest local minimum.
  • 36. 36 Recall from [3] that states (coordinates on the surface) corresponding to low values of 𝜑 are more desirable than those corresponding to high values. By inspection, it can be seen that an arbitrarily chosen point on the surface (represented in Figure 3-1 by the six sample points 𝓅𝑖 = [ 𝑥𝑖 𝑦𝑖] (𝑖 = 1, … ,6)) lies on a unique path formed by the local negative gradient. According to the method of Lyapunov, such a path must always terminate at a local minimum. In Figure 3-1, the two possible local minima are represented by the points 𝓅 𝐴 = [ 𝑥 𝐴 𝑦 𝐴] and 𝓅 𝐵 = [ 𝑥 𝐵 𝑦 𝐵]. If, instead of a fixed point in space, the potential-bound state is visualized as a loose particle free to move along the surface of the APF, then a particle released at any point will propagate towards a more desirable state by following such a path. To state this more formally: A state 𝓅 constrained to an APF 𝜑 and initial condition 𝓅0 will always propagate towards a local minimum if and only if the rate 𝜑̇ at which the state’s potential changes is negative-definite at every point along the path (not inclusive of the final endpoint, at which 𝜑̇ = 0). There are three requirements for the asymptotically stable convergence of Lyapunov’s method, which are mathematically expressed in [16] as: 𝜑(0) = 0; 𝜑 (𝓅) > 0 ∀ 𝓅 ≠ 0, (3-1) 𝜑̇ (𝓅) ≤ 0 ∀ 𝓅, (3-2) ‖𝜑 (𝓅)‖ → ∞ as ‖𝓅‖ → ∞. (3-3) The first requirement provided by Eq. 3-1 requires the positive semi-definiteness of the APF. If negative values of 𝜑 are allowed, then a perpetually negative 𝜑̇ would conceivably result in values of 𝜑 approaching (negative) infinity.
  • 37. 37 The second requirement (Eq. 3-2) therefore pertains to the positive semi- definiteness of the TD1 of the APF. This requirement is more obvious than the other two, as a positive 𝜑̇ would lead away from convergence to a local minimum. Finally, the third requirement (Eq. 3-3) pertains to the radial unboundedness of the APF. This is, perhaps, the least intuitive requirement. Note that the example potential function in Figure 3-1 takes the shape of a “bowl”, which is to say that it approaches infinity in any radial direction. This allows for asymptotic convergence for states whose initial conditions are of large magnitude compared to the primary workspace of the system. Observing all requirements, the system is asymptotically stable in state space (the space containing all possible values for the state 𝓅) for any initial condition 𝓅0 [16]. However, it is worth noting that there is no condition to guarantee convergence to the absolute minimum, as other local minima may exist (recall the local minimum problem described in Chapter 1). Defining the Error States In the absence of constraints, only an attractive potential is necessary to drive the state of the spacecraft towards its desired value. However, the state being manipulated must first be defined. Let 𝑞 be the quaternion representing the present orientation of the spacecraft, and 𝑞 𝑓 be the quaternion representing the orientation that the spacecraft is attempting to reach. Recall from Chapter 2 that the quaternion error corresponding to the difference between the current and final states is 𝑞 𝑒 = [ −𝜀 𝑓 × + 𝜂 𝑓 𝕀 −𝜀 𝑓 𝜀 𝑓 𝑇 𝜂 𝑓 ] [ 𝜀 𝜂] (2-9)
  • 38. 38 Note that as 𝑞 → 𝑞 𝑓, Eq. 2-9 reduces to 𝑞 𝑒 = [0 𝑇 ±1] 𝑇 – the “effective zero state orientation” which represents convergence. Thus the quaternion error represents the relative rotation of the current “body frame” (the reference frame fixed to the satellite) relative to the final “tracking frame” as shown in Figure 3-2. Figure 3-2. The relative orientations of the inertial, body, and tracking frames. The first observation we can make about the effective zero state orientation is that its magnitude is nonzero. More specifically, since 𝑞 𝑒 represents a pure rotation, it is necessarily of unit length. However, in our discussion of the method of Lyapunov in Chapter 1, it was stated that the purpose of the controller is to drive the relative state to zero. This requirement has not changed: even though the effective zero state has a nonzero magnitude, it is representative of a zero degree rotation about any axis, and can therefore be regarded as “zero in nature” or “effectively” zero.
  • 39. 39 The second observation is that there is not one, but two possible values of convergence. Specifically, the parameter 𝜂 𝑒 can converge to either +1 or −1, which corresponds to a relative rotation of either 0° or 360° about any axis. This arises from the sign ambiguity demonstrated in Eqs. 2-8a and 2-8b. Note that, no matter which state is converged upon, the end result is zero relative attitude. Another quantity of importance is the “angular velocity error” 𝜔 𝑒 – the angular velocity of the body frame with respect to the tracking frame, which is implicitly parameterized in the body frame. As such, 𝜔 𝑒 can be calculated by taking the difference of the body frame angular velocity 𝜔, and the tracking frame angular velocity 𝜔 𝑒 (after it has been re-evaluated in the body frame). Thus 𝜔 𝑒 = 𝜔 − 𝑅 𝑒 𝜔 𝑓 (3-4) where 𝑅 𝑒 is the DCM representation of the orientation represented by 𝑞 𝑒. The Unconstrained Case With the relative states defined, we may now specify an attractive potential to bring it to its zero value. Recall from Chapter 1 that this has been typically accomplished by using a Lyapunov potential function of the form 𝑉 = 1 2 ∑ 𝐼𝑖 𝜔𝑖 2 3 𝑖=1 + 1 2 ∑ 𝜆(𝜃𝑖 − 𝜃𝑖) 2 3 𝑖=1 , (1-12) which was effective when the only constraints being enforced were directly placed on the orientation of the spacecraft, and not the angular velocity. It will eventually be shown that a general framework requires the separation of the APF into two distinct stages – one for orientation, and one for angular velocity. For now, we will only consider an APF that affects the former (indicated by a subscript 1):
  • 40. 40 𝜑1,𝑎 = 1 2 𝜀 𝑒 𝑇 𝜀 𝑒 + 1 2 (1 − 𝜂 𝑒 2). (3-5) Note that unlike Eq. 1-13, Eq. 3-5 is in terms of the quaternion components 𝜀 𝑒 and 𝜂 𝑒. A quick check shows that as 𝑞 𝑒 → [0 𝑇 ±1] 𝑇 , the potential 𝜑1,𝑎 approaches 0 (regardless of the unit length requirement or sign ambiguity of 𝑞 𝑒). Furthermore, since 𝜀 𝑒 𝑇 𝜀 𝑒 > 0 ∀ 𝜀 ≠ 0, and 𝜂 𝑒 2 ≝ cos2( 𝜃𝑒 2⁄ ) < 1 ∀ 0° < 𝜃𝑒 < 360°, it follows that 𝜑1,𝑎 > 0 when 𝑞 𝑒 ≠ [0 𝑇 ±1] 𝑇 . Thus, Eq. 3-5 satisfies the condition of positive definiteness. The condition of radial unboundedness may be ignored in this instance; since the magnitude of the state 𝑞 𝑒 never approaches infinity, there is no need to check for radial unboundedness. However, in order to verify that Eq. 3-2 is satisfied, we must calculate the TD1 of Eq. 3-5. Applying the chain rule yields 𝜑̇1,𝑎 = 𝜕𝜑1,𝑎 𝜕𝑞 𝑒 𝑑𝑞 𝑒 𝑑𝑡 . (3-6) Recognizing that 𝑞 𝑒 = [𝜀 𝑒 𝑇 𝜂 𝑒] 𝑇 , it follows from Eq. 2-17 that 𝜕𝜑1,𝑎 𝜕𝑞 𝑒 = [ 𝜕𝜑1,𝑎 𝜕𝜀 𝑒 𝜕𝜑1,𝑎 𝜕𝜂 𝑒 ] = [𝜀 𝑒 𝑇 −𝜂 𝑒] = − [𝑞 𝑒 −1] 𝑇 . (3-7) Considering Eq. 3-7 and Eq. 2-6, Eq. 3-6 can be rewritten as 𝜑̇1,𝑎 = − 1 2 [Ξ 𝑇 (𝑞 𝑒) 𝑞 𝑒 −1] 𝑇 𝜔𝑒. (3-8) Recall that Eq. 3-8 must be at least negative semi-definite to be in accordance with Eq. 3-2. However, this can only be guaranteed by specifying a form for one or more of its variables. The quaternion error 𝑞 𝑒 has a known value determined by on-board sensors, implying that its form cannot be adjusted to determine the control solution.
  • 41. 41 However, assume that the angular velocity error 𝜔 𝑒 → 𝜔 𝑒,𝑑 is a desired value, rather than a current evaluation. Allowing this, then the form of 𝜔 𝑒,𝑑 can be specified such that Eq. 3-8 is negative semi-definite and Eq. 3-2 is satisfied. To ensure this, we define a positive definite gain matrix 𝐾1. By definition, 𝐾1 satisfies the inequality relation 𝑣 𝑇 𝐾1 𝑣 > 0 ∀ 𝑣 ∈ ℝ3 . Thus, a negative semi-definite equation for 𝜑̇1,𝑎 is 𝜑̇1,𝑎 = − 1 2 [Ξ 𝑇 (𝑞 𝑒) 𝑞 𝑒 −1] 𝑇 𝐾1 [Ξ 𝑇 (𝑞 𝑒) 𝑞 𝑒 −1]. (3-9) Relating Eq. 3-8 and Eq. 3-9, it follows that 𝜔 𝑒,𝑑 = 𝐾1Ξ 𝑇 (𝑞 𝑒) 𝑞 𝑒 −1 . (3-10) Equation 3-10 indicates the “desired angular velocity error” of the spacecraft. If mission controllers could adjust the angular velocity of the spacecraft directly without the need for angular momentum exchange devices on board, then 𝜔 𝑒,𝑑 represents the “target” angular velocity at the current orientation relative to the tracking state. However, since this is not the case, a second stage APF must be designed to compute the torque that must be supplied by onboard systems. Just as the first stage APF served to drive the relative orientation towards its effective zero value, the second stage APF must drive the relative angular velocity towards zero. However, in this case “relative angular velocity” refers to the difference between the actual value of the current angular velocity error (determined from Eq. 3-4), and its desired value (determined from Eq. 3-10). Such a potential can take the form 𝜑2,𝑎 = 1 2 Δ𝜔𝑒 𝑇 Δ𝜔𝑒, (3-11) where Δ𝜔𝑒 ≝ 𝜔 𝑒 − 𝜔 𝑒,𝑑. Note that Eq. 3-1 is satisfied since Δ𝜔𝑒 𝑇 Δ𝜔𝑒 > 0 ∀ Δ𝜔𝑒 ≠ 0.
  • 42. 42 Likewise, substituting large magnitude values of Δ𝜔 into Eq. 3-11 satisfies the condition of radial unboundedness. However, we must take the TD1 of Eq. 3-11 to verify that Eq. 3-2 is satisfied. Once more referring to proof 3 of Appendix A, we find that 𝜑̇2,𝑎 = Δ𝜔𝑒 𝑇 Δ𝜔̇ 𝑒, (3-12) where Δ𝜔̇ 𝑒 contains the torque vector 𝜏 for which we can specify a form to ensure the negative semi-definiteness of Eq. 3-12. The TD1 of Δ𝜔𝑒 is Δ𝜔̇ 𝑒 = 𝜔̇ 𝑒 − 𝜔̇ 𝑒,𝑑, (3-13) where 𝜔̇ 𝑒,𝑑 must be computed separately. However, 𝜔̇ 𝑒 can be re-written in terms of known angular velocities (and their TD1s), as demonstrated in proof 1 of Appendix B. Defining a new quantity 𝒻𝑒 called the “feed forward vector”, (so named because it propagates information about the current angular velocity and orientation forward through time) Eq. 3-13 can be rewritten as Δ𝜔̇ 𝑒 = 𝜔̇ + 𝒻𝑒, (3-14) where 𝒻𝑒 ≝ 𝜔× ℛ 𝑒 𝜔 𝑓 − ℛ 𝑒 𝜔̇ 𝑓 − 𝜔̇ 𝑒,𝑑. (3-15) An attractive aspect of Eq. 3-14 is that the first term 𝜔̇ – the angular velocity rate of the body as measured in the body frame – is now the only one containing the torque vector 𝜏. It follows from Euler’s equations for rotational motion for a rigid body that 𝜔̇ = 𝕁−1 (𝜏 − 𝜔× 𝕁𝜔), (3-16) where 𝕁 is the centroidal moment of inertia tensor for the rigid body.
  • 43. 43 Substituting Eq. 3-16 into Eq. 3-14, then further substituting into Eq. 3-12 yields 𝜑̇2,𝑎 = Δ𝜔 𝑒 𝑇 [𝕁−1 (𝜏 − 𝜔× 𝕁𝜔) + 𝒻𝑒], (3-17) where we may enforce the negative definiteness of Eq. 3-17 by specifying a favorable form for the control state. In this case, we define a second positive definite gain matrix 𝐾2 such that 𝜑̇2,𝑎 = −Δ𝜔 𝑒 𝑇 𝐾2Δ𝜔𝑒. (3-18) Equating Eq. 3-17 with Eq. 3-18, we find the favorable form of 𝜏 to be 𝜏 = 𝜔× 𝕁𝜔 − 𝕁 (𝐾2Δ𝜔𝑒 + 𝒻𝑒). (3-19) The practice of using a sequence of two APFs in this manner is called “back- stepping”, and will eventually be used to separate repulsive potential function into APFs that affect orientation from those which affect angular velocity. Because the angular velocity of a system cannot be integrated to obtain its orientation, this approach is absolutely necessary to ensure a valid control solution. General Constraints Using the attractive potentials of Eq. 3-5 and Eq. 3-11, the body-fixed coordinate frame of the spacecraft will always converge asymptotically towards its desired value, specified by the tracking frame. This is because we have specified a form for the control state which satisfies the conditions of Eqs. 3-1 through 3-3. Note that this analysis was predicated on the assumption that no constraints existed – thus the case was said to be “unconstrained.” As discussed in Chapter 1, we would eventually like to create a controller which satisfies any constraint (chief among which is the keep-out constraint).
  • 44. 44 These constraints are each represented by a “repulsive potential.” As the name implies, the repulsive potentials work against the attractive potential to ensure that the state does not cross a constraint boundary. Since there are two stages of attractive potential, there will also be two stages of repulsive potential. Furthermore – just as with the attractive potentials – the first stage repulsive potential affects changes in orientation, while the second affects changes in angular velocity. First though, we must consider the structure of the APF common to both stages. If the total APF 𝜑 is merely the superposition of its constituent (attractive and repulsive) potentials, then its magnitude is 𝜑 = ∑ 𝜑𝑖 𝑁 𝑖=0 , (3-20) where 𝜑𝑖 is the 𝑖th potential function of any form. Note that in either stage, there is always an attractive potential component to Eq. 3-20. If we assume that 𝑖 = 0 is “reserved” for the attractive potential, Eq. 3-20 may be rewritten as 𝜑 = 𝜑 𝑎 + ∑ 𝜑𝑖 𝑁 𝑖=1 . (3-21) Recall that, in order to satisfy Eq. 3-1, we require that Eq. 3-21 evaluates to zero at the goal state. Since each potential is independent of all others, we can only generally assume that their sum is zero if each term is itself zero. This was done by assuming the form 𝜑 = 𝜑 𝑎 + ∑ 𝑐𝑖 𝜑 𝑎 𝜑 𝑟,𝑖 𝑁 𝑖=1 = 𝜑 𝑎 (1 + ∑ 𝑐𝑖 𝜑 𝑟,𝑖 𝑁 𝑖=1 ) ≝ 𝜑 𝑎 𝜑𝑟, (3-22)
  • 45. 45 which has the TD1 𝜑̇ = 𝜑̇ 𝑎 𝜑𝑟 + 𝜑 𝑎 𝜑̇ 𝑟. (3-23) In Eq. 3-22, 𝑐𝑖 is a positive scaling constant, and 𝜑 𝑟,𝑖 is the 𝑖th repulsive potential. Thus, the relationship between the attractive and repulsive potential is (somewhat unexpectedly) multiplicative rather than additive. However, being potentials, each 𝜑 𝑟,𝑖 must be positive definite with a negative definite TD1. Therefore, the definition of 𝜑𝑟 (the “total repulsive potential”) prohibits it from every being larger than one. It then follows that Eq. 3-22 can equal zero if and only if the attractive potential is zero. In other words, the repulsive potentials affect the path to convergence, but they do not determine the goal state. For this reason, there is little use in expressing repulsive potentials in terms of the error state, or even the final state. First Stage Repulsive Potential In general, a first stage repulsive potential may be a function of any orientation illustrated in Figure 3-2 (i.e. 𝜑1,𝑟 = 𝜑1,𝑟 (𝑞, 𝑞 𝑓, 𝑞 𝑒)). Although, the quaternion error 𝑞 𝑒 is a function of the body and tracking orientations (𝑞 and 𝑞 𝑓 respectively), it is a convenient parameter to represent terms containing a variance on both 𝑞 and 𝑞 𝑓. Because of this, we will carry on treating the generalized APF as a function of all three orientations, though we may later reduce its dependency to be only on the body-frame orientation. In holding with the form of Eq. 3-22, the TD1 of the potential can be written thusly: 𝜑̇1,𝑟 = ∑ 𝑐𝑖 𝜑̇1,𝑟,𝑖 𝑁 𝑖=1 . (3-24)
  • 46. 46 The differentiation of the individual repulsive potentials must be carried out using the multivariate chain rule of Eq. 2-18. Doing so yields: 𝜑̇1,𝑟,𝑖 = 𝜕𝜑1,𝑟,𝑖 𝜕𝑞 𝜕𝑞 𝜕𝑞 𝑒 𝑞̇ 𝑒 + 𝜕𝜑1,𝑟,𝑖 𝜕𝑞 𝑓 𝜕𝑞 𝑓 𝜕𝑞 𝑒 𝑞̇ 𝑒 + 𝜕𝜑1,𝑟,𝑖 𝜕𝑞 𝑒 𝑞̇ 𝑒. (3-25) Equation Eq. 3-25 can be reduced by expressing it in terms of the quaternion error matrices 𝑄1 and 𝑄2. Recall from Eq. 2-12 that 𝑞 𝑒 = 𝑄1 (𝑞2) 𝑞1 = 𝑄2 (𝑞1) 𝑞2. (2-12) Proof 3 of Appendix B demonstrates that 𝑄1 and 𝑄2 are orthogonal, therefore 𝜕𝑞 𝜕𝑞 𝑒 = 𝑄1 𝑇 (𝑞 𝑓); 𝜕𝑞 𝑓 𝜕𝑞 𝑒 = 𝑄2 𝑇 (𝑞). (3-26) Next, recall that the TD1 of any unit quaternion can be computed from Eq. 2-14 in terms of the quaternion rate matrix Ξ: 𝑞̇ = 1 2 Ξ (𝑞) 𝜔. (2-14) Thus substitution of Eqs. 2-14 and 3-26 into Eq. 3-25 yields 𝜑̇1,𝑟,𝑖 = 1 2 [Ξ 𝑇 (𝑞 𝑒) [𝑄1 (𝑞 𝑓) 𝑔1,𝑟,𝑖 (𝑞) + 𝑄2 (𝑞) 𝑔1,𝑟,𝑖 (𝑞 𝑓) + 𝑔1,𝑟,𝑖 (𝑞 𝑒)]] 𝑇 𝜔𝑒, (3-27) where 𝑔𝑖 (𝓅) ≝ ∇ 𝓅( 𝜑𝑖) ≝ [ 𝜕𝜑𝑖 𝜕𝓅 ] 𝑇 (3-28) is the gradient of the APF 𝜑𝑖 with respect to the parameter 𝓅, and can generally be calculated from Eq. 2-17.
  • 47. 47 Owing to APF superposition, the gradient of the total repulsive potential 𝜑1,𝑟 is equal to the sums of the individual APF gradients: 𝑔1,𝑟 (𝑞) = ∑ 𝑐𝑖 𝑁 𝑖=1 𝑔1,𝑟,𝑖 (𝑞) ; (3-29a) 𝑔1,𝑟 (𝑞 𝑓) = ∑ 𝑐𝑖 𝑁 𝑖=1 𝑔1,𝑟,𝑖 (𝑞 𝑓) ; (3-29b) 𝑔1,𝑟 (𝑞 𝑒) = ∑ 𝑐𝑖 𝑁 𝑖=1 𝑔1,𝑟,𝑖 (𝑞 𝑒). (3-29c) Substitution of Eq. 3-27 into Eq. 3-24 and simplified by Eqs. 3-29a through c yields 𝜑̇1,𝑟 = 1 2 [Ξ 𝑇 (𝑞 𝑒) [𝑄1 (𝑞 𝑓) 𝑔1,𝑟 (𝑞) + 𝑄2 (𝑞) 𝑔1,𝑟 (𝑞 𝑓) + 𝑔1,𝑟 (𝑞 𝑒)]] 𝑇 𝜔𝑒. (3-30) Furthermore, recall that repulsive potentials are generally represented as functions of the body state, in which case Eqs. 3-29b and 3-29c evaluate to zero. Therefore 𝜑̇1,𝑟 = 1 2 [Ξ 𝑇 (𝑞 𝑒) 𝑄1 (𝑞 𝑓) 𝑔1,𝑟 (𝑞)] 𝑇 𝜔𝑒. (3-31) Equations 3-27 and 3-30 demonstrate a pattern which inspired the definition of a new quantity – the “potential rate transformation” (PRT) vector – which converts the angular velocity error into an APF rate. The PRT vector is generally defined to be Φ( 𝜑) ≝ Ξ 𝑇 (𝑞 𝑒) [𝑄1 (𝑞 𝑓) 𝑔 𝜑 (𝑞) + 𝑄2 (𝑞) 𝑔 𝜑 (𝑞 𝑓) + 𝑔 𝜑 (𝑞 𝑒)], (3-32) where the PRT vector (given by Eq. 3-32) satisfies the relation 𝜑̇ = 1 2 Φ 𝑇( 𝜑) 𝜔𝑒. (3-33)
  • 48. 48 Setting 𝜑 = 𝜑1,𝑟,𝑖 and 𝜑 = 𝜑1,𝑟 reduces Eq. 3-33 to Eqs. 3-27 and 3-31 respectively. We therefore expect the relation to hold if 𝜑 = 𝜑1,𝑎, in which case the PRT evaluates to Φ(𝜑1,𝑎) = −Ξ 𝑇 (𝑞 𝑒) 𝑞 𝑒 −1 . (3-34) As expected, substitution of Eq. 3-34 into Eq. 3-33 confirms the result found in Eq. 3-8. We may now recast Eq. 3-23 in terms of the PRT vector for first stage potentials: 𝜑̇1 = 1 2 [Φ(𝜑1,𝑎)𝜑1,𝑟 + Φ(𝜑1,𝑟)𝜑1,𝑎] 𝑇 𝜔𝑒. (3-35) Encouragingly, Eq. 3-35 is of the same form as Eq. 3-33. Thus, it follows that the PRT for the overall first-step potential is Φ( 𝜑1) = 𝜑1,𝑟Φ(𝜑1,𝑎) + 𝜑1,𝑎Φ(𝜑1,𝑟). (3-36) As in the uncontrolled case, the control solution can be determined by ensuring the negative definiteness of Eq. 3-35. Once more adopting the positive definite gain matrix 𝐾1 from Eq. 3-9, this form was taken to be 𝜔 𝑒,𝑑 = −𝐾1Φ( 𝜑1). (3-37) Note that in the case of no repulsive potentials (i.e. the unconstrained case), Eq. 3-36 reduces to Eq. 3-34, and thus Eq. 3-37 reduces to Eq. 3-10. Ergo, Eq. 3-37 represents the generalized angular velocity error – computing its value requires only that we compute the gradients with respect to orientation for each repulsive potential. As with the unconstrained case, this intermediate control solution determines the desired angular velocity error. Determining the “true” control solution requires the general implementation of second stage repulsive potentials. We therefore expect such a solution to reduce to Eq. 3-19 in the special case of no repulsive potentials.
  • 49. 49 Second Stage Repulsive Potential Recall that the TD1 of the desired angular velocity error appears in Eq. 3-15 as part of the feed forward vector 𝒻𝑒. Differentiating Eq. 3-37, we find that 𝜔̇ 𝑒,𝑑 = −𝐾1Φ̇ ( 𝜑1), thus requiring us to differentiate Eq. 3-36: Φ̇ ( 𝜑1) = 1 2 [Φ(𝜑1,𝑟)Φ 𝑇(𝜑1,𝑎) + Φ(𝜑1,𝑎)Φ 𝑇(𝜑1,𝑟)]𝜔𝑒 + [𝜑1,𝑟Φ̇ (𝜑1,𝑎) + 𝜑1,𝑎Φ̇ (𝜑1,𝑟)]. (3-38) The PRTs in Eq. 3-38 are all determined. However, their rates in the second term must be determined by differentiating Eq. 3-32 evaluated at 𝜑 = 𝜑1,𝑟 and 𝜑 = 𝜑1,𝑎. An important consequence of this is that a gradient appearing in Eq. 3-32 will be differentiated into what is known as a Hessian matrix 𝐻𝑖 (𝓅), which is defined as 𝐻𝑖 (𝓅) ≝ ∇∇ 𝓅( 𝜑𝑖) ≝ 𝜕 𝜕𝓅 𝑔𝑖 (𝓅). (3-39) Proofs 4 and 5 in Appendix B show the TD1s of the first-stage repulsive and attractive PRTs to be respectively evaluated to Φ̇ (𝜑1,𝑟) = [Ξ 𝑇 (𝑞 𝑒) 𝑄1 (𝑞̇ 𝑓) + Ξ 𝑇 (𝑞̇ 𝑒) 𝑄1 (𝑞 𝑓)] 𝑔1,𝑟 (𝑞) + Ξ 𝑇 (𝑞 𝑒) 𝑄1 (𝑞 𝑓) 𝐻1,𝑟 (𝑞) 𝑞̇ (3-40) and Φ̇ (𝜑1,𝑎) = 1 2 (𝕀 − 2𝜀 𝑒 𝜀 𝑒 𝑇 ) 𝜔 𝑒 − Ξ 𝑇 (𝑞̇ 𝑒) 𝑞 𝑒 −1 . (3-41) From Eqs. 3-40 and 3-41 follows the total PRT rate from Eq. 3-38, and thus the rate of the desired angular velocity error. Therefore, with knowledge about angular velocity and acceleration of the tracking coordinate frame (information which would be specified by mission controllers), the feed forward vector from Eq. 3-15 is known!
  • 50. 50 However, the feed forward vector is only part of what is necessary to compute the control solution. We have still yet to define the total second stage potential, or the repulsive potentials it is comprised from. It stands to reason that the second stage attractive potential defined 𝜑2,𝑎 does not change from the unconstrained case in Eq. 3-11, since repulsive potentials do not affect the relative state. Therefore, if we choose the multiplicative relation between the attractive potential and repulsive potential as defined in Eq. 3-22, then the total second stage potential can be written as 𝜑2 = 1 2 Δ𝜔𝑒 𝑇(Δ𝜔𝑒 𝜑2,𝑟), (3-42) where 𝜑2,𝑟 is the total second stage repulsive term of the form defined in Eq. 3-22. Since the second stage potentials control the angular velocity of the spacecraft, it stands to reason that angular velocity will be one of the arguments. Perhaps less intuitive is the dependence on orientation, which is not required for most applications, but should be accounted for nonetheless. Unsurprisingly, the control solution is embedded within the TD1 of Eq. 3-42. Direct differentiation by way of product rule yields 𝜑̇2 = Δ𝜔𝑒 𝑇 (Δ𝜔̇ 𝑒 𝜑2,𝑟 + 1 2 Δ𝜔𝑒 𝜑̇2,𝑟), (3-43) where Δ𝜔̇ 𝑒 contains the known feed forward vector and 𝜔̇ (which in turn contains the control solution 𝜏). Evaluating the TD1 of 𝜑2,𝑟 by chain rule, it follows that 𝜑̇2,𝑟 = 𝑔2,𝑟 𝑇 (𝜔)𝜔̇ + 1 2 𝑔2,𝑟 𝑇 (𝑞)Ξ (𝑞) 𝜔, (3-44) where 𝑔 is the gradient vector defined in Eq. 3-28.
  • 51. 51 Recall that, as a consequence of Eq. 3-22, 𝑔2,𝑟(𝜔) = ∑ 𝑐𝑖 𝑔2,𝑟,𝑖(𝜔) 𝑁 𝑖=1 ; (3-45a) 𝑔2,𝑟 (𝑞) = ∑ 𝑐𝑖 𝑔2,𝑟,𝑖 (𝑞) 𝑁 𝑖=1 . (3-45b) Note that the striking similarity of Eqs. 3-45a and b to Eqs. 3-29a through c, thus indicating that the methodology for these second stage potentials will be similar to that for the first stage potentials. This is true, to a point. Since all first stage potentials were functions of orientation, they could be consolidated into one quantity – the PRT vector. However, because there is no integral relationship between angular velocity and orientation, there is no analogous “trick” for the second stage potentials. Therefore, we must proceed with direct substitution of Eq. 3-44 into Eq. 3-43: 𝜑̇2 = Δ𝜔𝑒 𝑇 {Δ𝜔̇ 𝑒 𝜑2,𝑟 + 1 2 Δ𝜔𝑒 [𝑔2,𝑟 𝑇 (𝜔)𝜔̇ + 1 2 𝑔2,𝑟 𝑇 (𝑞)Ξ (𝑞) 𝜔]}. (3-46) Further substitution of Eq. 3-14 into Eq. 3-46 allows us to fully separate terms containing 𝜔̇ from those containing 𝜔 and 𝑞: 𝜑̇2 = Δ𝜔𝑒 𝑇 {[𝜑2,𝑟 𝕀 + 1 2 Δ𝜔𝑒 𝑔2,𝑟 𝑇 (𝜔)] 𝜔̇ + [ 1 4 Δ𝜔𝑒 𝑔2,𝑟 𝑇 (𝑞) Ξ (𝑞) 𝜔 + 𝜑2,𝑟 𝒻𝑒]}. (3-47) Recall that the torque vector 𝜏 parameterized in the body frame is related to 𝜔̇ by Euler’s equation for rotational motion (Eq. 3-16). As with the first stage, we once more reclaim a positive definite gain matrix from the unconstrained case to create a form for 𝜑̇2 that is negative definite. In this case, equating Eq. 3-18 with Eq. 3-47 yields −𝐾2Δ𝜔 𝑒 = [𝜑2,𝑟 𝕀 + 1 2 Δ𝜔𝑒 𝑔2,𝑟 𝑇 (𝜔)] 𝜔̇ + [ 1 4 Δ𝜔𝑒 𝑔2,𝑟 𝑇 (𝑞)Ξ (𝑞) 𝜔 + 𝜑2,𝑟 𝒻𝑒]. (3-48)
  • 52. 52 Note that the common factor of Δ𝜔 𝑒 𝑇 has removed from both sides, thus ignoring the trivial case where Δ𝜔𝑒 = 0 (which implies convergence has occurred anyway). Thus, the left-hand side of Eq. 3-48 is representative of the negative definite form of 𝜑̇2, while the right-hand side is the physical expression containing the control solution. To solve for the torque vector, we must first solve for 𝜔̇ . Consolidating the terms of Eq. 3-48, we find that − [𝜑2,𝑟 𝕀 + 1 2 Δ𝜔 𝑒 𝑔2,𝑟 𝑇 (𝜔)] 𝜔̇ = 1 4 Δ𝜔𝑒 𝑔2,𝑟 𝑇 (𝑞)Ξ (𝑞) 𝜔 + 𝜑2,𝑟 𝒻𝑒 + 𝐾2Δ𝜔 𝑒. (3-49) Solving for the control solution requires the inversion of [𝜑2,𝑟 𝕀 + 1 2 Δ𝜔𝑒 𝑔2,𝑟 𝑇 (𝜔)], for which we make use of the Kailath Variant of The Woodbury Identity provided in [13]: [𝜑2,𝑟 𝕀 + 1 2 Δ𝜔𝑒 𝑔2,𝑟 𝑇 (𝜔)] −1 = 1 𝜑2,𝑟 [𝕀 − Δ𝜔𝑒 𝑔2,𝑟 𝑇 (𝜔) 2𝜑2,𝑟 + 𝑔2,𝑟 𝑇 (𝜔)Δ𝜔𝑒 ]. (3-50) Thus applying Eq. 3-50 to Eq. 3-49, and rewriting 𝜔̇ in terms of 𝜏 (in accordance with Euler’s equation of rotational motion), we find that the control solution is given by 𝜏 = 𝜔× 𝕁𝜔 − 1 𝜑2,𝑟 𝕁 [𝕀 − Δ𝜔𝑒 𝑔2,𝑟 𝑇 (𝜔) 2𝜑2,𝑟 + 𝑔2,𝑟 𝑇 (𝜔)Δ𝜔𝑒 ] [ 1 4 Δ𝜔𝑒 𝑔2,𝑟 𝑇 (𝑞) Ξ (𝑞) 𝜔 + 𝜑2,𝑟 𝒻𝑒 + 𝐾2Δ𝜔𝑒]. (3-51) Note that in the absence of repulsive APFs, the repulsive potential gradients become zero, and the magnitude of the total repulsive potential goes to one. It follows that Eq. 3-51 reduces precisely to Eq. 3-19: 𝜏 = 𝜔× 𝕁𝜔 − 𝕁 (𝐾2Δ𝜔𝑒 + 𝒻𝑒), (3-19) which is the control solution for the unconstrained case. This encouraging result indicates that we have indeed found an asymptotically stable solution for general constraints applied in the second stage.
  • 53. 53 Equation 3-51 belies a complex web of variables with many interdependencies and relationships – all of which are illustrated in Figure 3-3. Figure 3-3. Dependency chart for the generalized control solution. Although imposing, Figure 3-3 demonstrates one of the primary advantages of APF controls: There are no algorithms; no interpolation; and every dependency is expressed analytically and in closed-form. The advantage of this is that it makes computing a control solution quick and efficient, which may be desired over optimality.
  • 54. 54 CHAPTER 4 IMPLEMENTATION Notable Constraints The Pointing Constraint With the framework in place, we are now able to construct models for various constraints that are of concern to mission controllers. Of chief importance is the “pointing constraint” – an elegantly simple problem which has a readily apparent impact on the performance of real-world satellites in orbit. However, at this stage in our discussion of the problem, it may not be clear what is pointing where. A spacecraft may occupy any one of an infinite number of attitudes, and to simply say “a satellite cannot point in a direction” is unhelpful unless we can quantify what exactly that means. For the purposes of this document, consider a spacecraft to be a collection of body-fixed “sensor” vectors. These vectors may be representative of any direction fixed in the body-fixed coordinate frame – solar panels (barring the use of any rotational mechanisms to which they might be affixed); directional antennas; telescopes; star trackers; sun sensors; or arbitrary vectors defined as a point of reference are all valid examples of what could constitute a “sensor” in this context. All sensor vectors are implicitly of unit length; expressed in the body-fixed coordinate frame of the spacecraft; and denoted by the unit vector 𝑠̂. Next, we define an inertially-fixed “constraint” vector 𝑑̂ which is of unit length and expressed in the inertial coordinates frame. These vectors specify a direction corresponding to an attitude which mission controllers would either like to avoid, or
  • 55. 55 converge to. These constraint vectors will nearly always be accompanied by a constraint angle 𝛽, representing a range of significant attitudes. Significant attitude ranges can be represented in space by a cone whose axis is parallel to 𝑑̂, and whose half-aperture angle is equal to 𝛽. Furthermore, any sensor on the spacecraft may have a different set of significant attitude ranges associated with it, which may be either “attitude forbidden” or “attitude mandatory.” For example, we may consider one of the body-fixed sensor vectors to represent a directional high-gain antenna that can only operate when aimed at an Earth-bound tracking station accurate to within some pre-defined margin of error. Conversely, the sensor vector may represent some light-sensitive piece of equipment, in which case we might require it to avoid pointing at the Sun, and even specifying an angular buffer zone about the inertially fixed body-sun vector. Despite these possibilities, for now we need only consider the case of a satellite with one body-fixed sensor vector and one corresponding attitude forbidden zone (or “keep-out” cone). Single sensor – Single cone. Let 𝛾 represent the angle between the cone axis 𝑑̂ and the sensor vector 𝑠̂. The sensor will consequently never enter the attitude forbidden region if 𝛾 is never allowed to become less than or equal to 𝛽. Mathematically, this constraint can be expressed as 𝛽 < 𝛾 (4-1) which, while compact, does not clearly demonstrate a dependence on the orientation state 𝑞. With the benefit of foresight, we may evaluate the cosine of Eq. 4-1 (keeping in mind that the inequality relationship between 𝛾 and 𝛽 will be inverted), yielding cos 𝛽 − cos 𝛾 > 0. (4-2)
  • 56. 56 Recall that 𝑠̂ ∙ 𝑑̂ = cos 𝛾, since both 𝑠̂ and 𝑑̂ are unit vectors. However, the equivalent matrix representation 𝑠̂ 𝑇 𝑑̂ is only valid if 𝑠̂ and 𝑑̂ are expressed in the same basis. If we first rotate 𝑑̂ into the body frame, then we may rewrite Eq. 4-2 as cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂ > 0, where 𝑅 𝑞 = (𝜂2 − 𝜀 𝑇 𝜀)𝕀 + 2𝜀𝜀 𝑇 − 2𝜂𝜀× (4-3) is the DCM representing the rotation represented by the quaternion 𝑞. If the goal is to create a “barrier” at the edge of the keep-out cone, then the repulsive APF should take the form 𝜑1,𝑟,point = 1 cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂ (4-4) which tends towards infinity as 𝛾 approaches 𝛽. Recall from our discussion in Chapter 3 that, in order to implement a constraint at the first stage, we must first determine its gradient (first derivative) and Hessian (second derivative) with respect to 𝑞. This can be done by applying chain rule to Eq. 4-4, yielding 𝜕𝜑1,𝑟,point 𝜕𝑞 = 𝜕 𝜕𝑠̂ 𝑇 𝑅 𝑞 𝑑̂ ( 1 cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂ ) 𝜕 𝜕𝑞 (𝑠̂ 𝑇 𝑅 𝑞 𝑑̂) (4-5) where 𝜕 𝜕𝑠̂ 𝑇 𝑅 𝑞 𝑑̂ ( 1 cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂ ) = 1 (cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂) 2 (4-6) and 𝜕 𝜕𝑞 (𝑠̂ 𝑇 𝑅 𝑞 𝑑̂) = 2𝑞 𝑇 [ 𝑑̂ 𝑠̂ 𝑇 + 𝑠̂ 𝑑̂ 𝑇 − 𝑠̂ 𝑇 𝑑̂ 𝕀 𝑠̂× 𝑑̂ (𝑠̂× 𝑑̂) 𝑇 𝑠̂ 𝑇 𝑑̂ ] ≝ 2𝑞 𝑇 Λ(𝑠̂, 𝑑̂). (4-7)
  • 57. 57 Verification of Eq. 4-7 is provided in proof 4 of Appendix A. As a point of interest, Λ(𝑠̂, 𝑑̂) is a constant, symmetrical matrix function of the geometry between the satellite’s sensor vectors the inertial attitude vectors. Note that the vector 𝑑̂ appearing in Eq. 4-7 is still parameterized in the inertial frame. Thus, the gradient is computed by substituting Eqs. 4-6 and 4-7 into Eq. 4-5: 𝑔1,𝑟,point (𝑞) = 2Λ(𝑠̂, 𝑑̂)𝑞 (cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂) 2. (4-8) The Hessian matrix for the direct pointing constraint potential is computed by differentiating Eq. 4-8. The process is shown in proof 5 of Appendix A shows the derivation, yielding the result 𝐻1,𝑟,point (𝑞) = 2Λ(𝑠̂, 𝑑̂) (cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂) 2 [𝕀 + 4𝑞𝑞 𝑇 Λ(𝑠̂, 𝑑̂) cos 𝛽 − 𝑠̂ 𝑇 𝑅 𝑞 𝑑̂ ]. (4-9) Given the framework derived in Chapter 3, the outputs of Eqs. 4-8 and 4-9 are enough to compute the control solution. However, recall that this only applies for the case of one sensor and one keep-out cone. Variations on the constraints presented in Eqs. 4-1 and 4-2 are also of interest. For example, consider the inverse case of an attitude mandatory zone. In such a case, the constraint from Eq. 4-1 becomes reversed, thus yielding 𝛽 > 𝛾. (4-10) Note that, like Eq. 4-1, Eq. 4-10 can be equivalently stated in terms of angle cosines: cos 𝛾 − cos 𝛽 > 0. Thus, it can be seen that the APF corresponding to this constraint – and, by extension, its gradient and Hessian – are the negatives of Eqs. 4-4, 4-8, and 4-9 respectively.
  • 58. 58 Multiple sensors – Multiple cones. In general, it cannot be assume that a satellite contains a single body-fixed sensor vector. Nor can it be assumed that the mission will only contain one attitude range of significance. Therefore, in general we may need to consider a system of 𝑁 sensor vectors and 𝑀 constraint regions. For simplicity, we will assume none of the constraint regions intersect, but if they did then it may serve us well to model them as a single constraint region anyway. It is convenient to store this information in matrix form, making it easily read by linear algebra systems such as MatLab® . The matrices containing sensor and cone data could, for example, be respectively formatted: 𝑠𝑙𝑖𝑠𝑡 = [ 𝑠̂1 𝐵 𝑠̂2 𝐵 𝑠̂3 𝐵 ⋯ 𝑠̂𝑖 𝐵 ⋯ 𝑠̂ 𝑁 𝐵 ] ∈ ℝ3×𝑁 , (4-11) 𝑑𝑙𝑖𝑠𝑡 = [ 𝑑̂1 𝐼 𝛽1 𝑑̂2 𝐼 𝛽2 𝑑̂3 𝐼 𝛽3 ⋯ 𝑑̂ 𝑗 𝐼 𝛽𝑗 ⋯ 𝑑̂ 𝑀 𝐼 𝛽 𝑀 ] ∈ ℝ4×𝑀 , (4-12) where the superscripts 𝐵 and 𝐼 respectively denote body-fixed and inertially-fixed coordinate parameterizations. It is also useful to specify a constant “mapping” matrix, which defines the relationship each sensor has with the constraint regions. This would be useful in cases where some sensors may be permitted through constraint regions that others may not, or vice versa. For example, a sensor might be constrained to point towards Earth, yet there would be no reason why it could not be pointed at the sun. Conversely, a star tracker would be able to safely point towards the Earth, but it may be desirable to specify a constraint preventing it from being pointed towards the sun. Harkening back to the general constraint form from Eq. 3-22, the coefficients 𝑐𝑖𝑗 which modify the repulsive potentials – each one representing the constraint imposed
  • 59. 59 on the 𝑖th sensor by the 𝑗th cone – must be positive if the relationship is attitude forbidden, negative if it is attitude mandatory, or zero if there is no attitude constraint. Expressed in matrix form, the mapping matrix 𝐶 is defined as 𝐶 ≝ [ 𝑐11 𝑐12 𝑐21 𝑐22 ⋯ 𝑐1𝑀 𝑐2𝑀 ⋮ ⋱ ⋮ 𝑐 𝑁1 𝑐 𝑁2 ⋯ 𝑐3𝑀 ] ; { 𝑐𝑖𝑗 > 0 if forbidden 𝑐𝑖𝑗 = 0 if no constraint 𝑐𝑖𝑗 < 0 if mandatory . (4-13) The total pointing constraint potential and its derivatives can be found by summing over all indices ( 𝑖, 𝑗) in Eq. 4-13, then extracting 𝑠̂𝑖 from Eq. 4-11 and 𝑑̂ 𝑗, 𝛽𝑗 from Eq. 4-12: 𝜑1,𝑟,point = ∑ 𝑐𝑖𝑗 cos 𝛽𝑗 − 𝑠̂𝑖 𝑇 𝑅 𝑞 𝑑̂ 𝑗 𝑁,𝑀 𝑖,𝑗=1 ; (4-14) 𝑔1,𝑟,point (𝑞) = ∑ 2𝑐𝑖𝑗Λ(𝑠̂ 𝑖, 𝑑̂ 𝑗)𝑞 (cos 𝛽𝑗 − 𝑠̂𝑖 𝑇 𝑅 𝑞 𝑑̂ 𝑗) 2 𝑁,𝑀 𝑖,𝑗=1 ; (4-15) 𝐻1,𝑟,point (𝑞) = ∑ 2𝑐𝑖𝑗Λ(𝑠̂𝑖, 𝑑̂ 𝑗) (cos 𝛽𝑗 − 𝑠̂𝑖 𝑇 𝑅 𝑞 𝑑̂ 𝑗) 2 [𝕀 + 4𝑞𝑞 𝑇 Λ(𝑠̂𝑖, 𝑑̂ 𝑗) cos 𝛽𝑗 − 𝑠̂𝑖 𝑇 𝑅 𝑞 𝑑̂ 𝑗 ] 𝑁,𝑀 𝑖,𝑗=1 . (4-16) Recall that the outputs of Eqs. 4-14 through 4-16 determine the control solution. The Slew Rate Constraint Sometimes, it may be desirable to limit the rate at which a satellite rotates. There are many different reasons why mission controllers would want to do this. Chiefly, this constraint exists to prevent saturation of on-board angular momentum exchange devices. The constraint may also be in place to prevent mass-spring-damper type oscillations in nonrigid components (such as solar panels, omnidirectional antennae, or gravity gradient stabilization booms).
  • 60. 60 Limiting the slew rate requires the specification of a maximum allowable slew rate, effectively creating an envelope around the angular velocity domain. It follows that the slew rate constraint is, by definition, a second stage potential. The maximum slew rate is necessarily a scalar quantity, and so must be related to the instantaneous angular velocity by the dot product: 𝜔 𝑚𝑎𝑥 2 − 𝜔 𝑇 𝜔 > 0. (4-17) Just as with the pointing constraint, a barrier can be constructed at the constraint boundary by inverting the right-hand side of Eq. 4-17, thus yielding the slew rate potential 𝜑2,𝑟,slew = 1 𝜔 𝑚𝑎𝑥 2 − 𝜔 𝑇 𝜔 . (4-18) Unlike the first stage potentials, we do not need to take the Hessian of Eq. 4-18. Instead, we must take the gradient of it with respect to orientation (which yields a zero vector, since Eq. 4-18 has no dependency on orientation), and angular velocity. Applying chain rule to Eq. 4-4 yields 𝑔2,𝑟,slew = 2𝜔 𝑇 𝜔 𝑚𝑎𝑥 2 − 𝜔 𝑇 𝜔 . Early Avoidance While concise, the pointing constraint potential loses efficiency when the tracking frame will place the sensor on the opposite side of an attitude forbidden region. In such a situation, more control effort is expended reversing the direction of the sensor. In the edge case where the zero potential is on the exact opposite side of an attitude forbidden region, and there is no lateral component of angular velocity, the sensor will become mired in an unstable saddle point.
  • 61. 61 In almost every case, interference from other potentials will perturb the sensor from its saddle point. Even if there are no other potentials present, numerical uncertainty in the initial condition will almost certainly result in a lateral component of angular velocity. In light of this, it is tempting to disregard these saddle points. However, even if they do not permanently halt the progress of the satellite in its current maneuver, they will slow it down, or result in a longer path that would otherwise be achieved. One of the earliest objectives for this research was to avoid such attitude forbidden regions in advance by imparting lateral velocity as soon as it became apparent that an attitude forbidden region was incoming. This was accomplished by creating a pathway between two planes tangent to the keep-out cone, whose intersection contained the sensor vector itself. As long as the sensor continues to travel outside of this pathway, it will not enter the constraint region. Defining the pathway vectors. This method is based on the principle that a unit vector will only change by a direction that lies inside the plane normal to that unit vector. Placing this plane such that it contains the point at the head of 𝑠̂ will yield a conic intersection where the plane crosses the attitude forbidden region. The constraint pathway is bounded by the tangents of the conic intersection as illustrated in Figure 4-1. Note that the vectors 𝑑̂1, 𝑑̂2, and 𝑑̂3, 𝑠̂1, 𝑠̂2, and 𝑠̂3 in Figure 4-1 are defined differently from those in Eqs. 4-11 and 4-12. In this context they represent the basis vectors 𝒟 and 𝒮 respectively, and are defined so as to simplify the parameterization of the conic tangent vectors.
  • 62. 62 Figure 4-1. Setup for the Early Avoidance pathway. The cone’s axis of symmetry makes a logical choice for the first axis 𝑑̂1 in the 𝒟 coordinate basis. However, being inertially fixed, it must be represented in the body coordinate frame. The second axis 𝑑̂2 is thus defined to be that orthogonal to 𝑑̂1 in the direction of the sensor vector 𝑠̂, with the third axis 𝑑̂3 being the cross product of the first two. Thus, the basis vectors in the 𝒟 coordinate system are defined as 𝒟 ≝ { 𝑑̂1 = ℛ 𝑞 𝑑̂ 𝑑̂2 = 𝑑̂1 × 𝑠̂× 𝑑̂1 sin 𝛾 𝑑̂3 = 𝑑̂1 × 𝑑̂2 . (4-19)
  • 63. 63 As a consequence of the way in which the cone-fixed basis vectors are defined, the first axis 𝑠̂1 in the 𝒮 coordinate system is coincident with 𝑑̂3. Helpfully, this allows us to define the third axis 𝑠̂3 to be identical to the sensor vector 𝑠̂, with the cross product defining the second axis 𝑠̂2. Thus, the basis vectors in the 𝒮 system are defined as 𝒮 ≝ { 𝑠̂1 = 𝑑̂3 𝑠̂2 = 𝑠̂3 × 𝑠̂1 𝑠̂3 = 𝑠̂ . (4-20) Given the coordinate systems defined in Eqs. 4-19 and 4-20, the equation for the conic intersection of the sensor travel plane with the attitude forbidden region is 𝑥2 = − ( cos 2𝛾 + cos 2𝛽 1 + cos 2𝛽 ) 𝑦2 + 2 ( sin 2𝛾 1 + cos 2𝛽 ) 𝑦 + ( cos 2𝛾 − cos 2𝛽 1 + cos 2𝛽 ) (4-21) as shown in proof 6 of Appendix B. Note that 𝑥 and 𝑦 correspond to the distances between 𝑠̂3 and a point on the conic intersection as measured along the 𝑠̂1 and 𝑠̂2 axes respectively. Equation 4-21 is – not surprisingly – symmetric about the 𝑠̂2 axis. Let the vector 𝑣 ≝ 𝑥𝑠̂1 + 𝑦𝑠̂2 represent the position of a point on the conic intersection relative to 𝑠̂3. Defining an angle 𝛼 as the angle between 𝑠̂2 and 𝑣, it follows from geometry that 𝛼 will reach its maximum value at the point when 𝑣 → 𝑣 𝑡 where 𝑣 𝑡 is tangent to the conic intersection. If the tangent coordinates in the sensor travel plane are defined as 𝑥 = 𝑥 𝑡 and 𝑦 = 𝑦𝑡, then it follows from proof 7 of Appendix B that 𝑥t = 1 sin 2𝛾 √(cos 2𝛽 − cos 2𝛾)(1 − cos 2𝛽); 𝑦𝑡 = cos 2𝛽 − cos 2𝛾 sin 2𝛾 . (4-22) Recognizing that tan 𝛼 = | 𝑥𝑡 𝑦𝑡⁄ |, it follows from Eq. 4-22 that tan 𝛼 = √ 1 − cos 2𝛽 cos 2𝛽 − cos 2𝛾 . (4-23)
  • 64. 64 The double conic problem. An interesting yet unintended consequence of the conic section in Eq. 4-21 is the symmetry that exists about the plane normal to the cone axis – i.e. when plotting Eq. 4-22, one can see a discontinuity as the tangent point jumps to the lower branch of the conic section (a cone equal in size but opposite in direction of the keep-out cone being analyzed). Figure 4-2 illustrates this phenomenon: Figure 4-2. An illustration of the double conic problem. Note that the origin represents the sensor axis 𝑠̂3, and the red dot represents the cone axis 𝑑̂1. Ideally, tan 𝛼 would approach zero as 𝛾 approaches the safety angle 𝛾𝑠 (as shown in Figure 4-1), which would result in a “leading edge” of the potential as the sensor crossed into the region where it is in danger of crossing into the keep-out cone. However, Figure 4-2 demonstrates that no such tangent actually exists. Therefore, in order to enforce the desired behavior, we project the tangent point from the lower branch of the hyperbola onto the upper branch with a compensating logic term ℓ: ℓ = 𝑚 ( sin2 2𝛽 − sin2 2𝛾 sin2 2𝛽 + sin2 2𝛾 ) 𝑛 (4-24a)
  • 65. 65 where 𝑛 = { 0 if 𝛾 ≤ 𝜋 2 1 if 𝛾 > 𝜋 2 ; 𝑚 = { 0 if 𝛾 ≥ 𝛾𝑠 1 if 𝛾 < 𝛾𝑠 . (4-24b) The conditions in Eqs. 4-24a and b are derived in proof 8 of Appendix B. Note that the safety angle 𝛾𝑠 depends on the value of 𝛽. When 𝛽 ≤ 𝜋 4 , then the tangent point projection represented by Eq. 4-24a is valid for any 𝛾 < 𝛾𝑠 = 𝜋 2 + 𝛽. Note, however, that when 𝛽 ≥ 𝜋 4 , then the projection is only valid when the sensor is between both branches of the conic intersection (which will be hyperbolic over this part of the domain. We are able to express both possibilities compactly by taking the minimum value to be the true safety angle: 𝛾𝑠 = min ( 𝜋 2 + 𝛽, 𝜋 − 𝛽) The compensating term in Eqs. 4-24a and b serves to divide the domain of gamma into three sectors, thus constructing a piece-wise expression for tan 𝛼 that demonstrates the behavior we are looking for. The three sectors are summarized in Table 4-1, and the range of values over which ℓ varies is graphed in Figure 4-3. The compensated tangent value can be obtained by multiplying the uncompensated value from Eq. 4-23 to the logic term of Eq. 4-24a, thus yielding tan 𝛼 = 𝑚 ( sin2 2𝛽 − sin2 2𝛾 sin2 2𝛽 + sin2 2𝛾 ) 𝑛 √ 1 − cos 2𝛽 cos 2𝛽 − cos 2𝛾 (4-25) Plotting the modified pathway vectors using Eq. 4-25 demonstrates that the new logic term does indeed solve the double conic problem, as shown in Figure 4-4.
  • 66. 66 Table 4-1. Values of the logic term ℓ across the three sectors of the gamma domain. 𝛾 (Range as Inequality) 𝑚 𝑛 ℓ min ( 𝜋 2 + 𝛽, 𝜋 − 𝛽) ≤ 𝛾 ≤ 𝜋 𝑚 = 0 𝑛 = 1 ℓ = 0 𝜋 2 < 𝛾 < min ( 𝜋 2 + 𝛽, 𝜋 − 𝛽) 𝑚 = 1 𝑛 = 1 ℓ = sin2 2𝛽 − sin2 2𝛾 sin2 2𝛽 + sin2 2𝛾 0 ≤ 𝛾 ≤ 𝜋 2 𝑚 = 1 𝑛 = 0 ℓ = 1 Figure 4-3. Example of variation in the logic term ℓ over the domain 𝜋 2 < 𝛾 < 𝛾𝑠. Figure 4-4. Results of applying the logic term ℓ to the double conic problem. 1.6 1.65 1.7 1.75 1.8 1.85 1.9 1.95 2 2.05 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Logic Term Values Between /2 and /2+ ( = /6)  [rad] logictermvalue[-]