Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
POLITECNICO DI MILANOMaster of Science in Space Engineering
Department of Aerospace Engineering
School of Industrial and Information Engineering
OPTIMAL DOCKING FOR AN UNDER-ACTUATED
12U CUBESAT
Supervisor: Prof. James Douglas Biggs
MSc Thesis by:
Filippo Menegolo
ID Number: 852292
Academic Year 2016-2017
Acknowledgment
The first person to thank is Professor James Douglas Biggs for his great support
during this thesis. He has always been available whenever I needed any help and,
with his great knowledge, he helped me to overcome all the problems I encountered
during this work.
I must express my enormous gratitude to my parents and my sister Alice, who
made these five years of study possible and always supported me, also in the
difficult moments. If I am where I am, I just owe it to them.
An enormous thank to Chiara, who has made these years pass very quickly. She has
given me a great emotional support and made me live a lot of beautiful moments.
Without you, everything would have been more difficult.
A big, big thank to all my friends with which I had great moments during these
university years, in particular Andre, Chris, Fede, Fritz, Lele, Marcone, Mauro,
Meph, Palmi, Tommy and Uilli.
Many thanks to my family, in particular to my grandmother Caterina and my
great-aunts Romana and Luigina. I am very happy to have shared these moments
with you.
A special thought goes to my grandfather Gianni, who passed away the summer
before the start of my studies. I would had shared these important events with
you.
I would like to thank all those people that shared also a single moment with me
during these five years. You have all contributed to complete my path in the
university.
I
Ringraziamenti
La prima persona da ringraziare e il Professore James Douglas Biggs per il
suo grande supporto durnate questa tesi. E sempre stato disponibile per ogni
chiarimento e, con la sua esperienza, mi ha aiutato a superare tutti i problemi
incontrati durante questo progetto.
Devo esprimere la mia piu profonda gratidune per i miei genitori e per mia sorella
Alice, che hanno reso questi cinque anni possibili e mi hanno sempre supportato,
anche nei momenti piu difficili. Se sono dove sono, lo devo solo a voi.
Un enorme grazie a Chiara, che ha fatto volare questi cinque anni. Mi e sempre
stata di supporto e mi ha fatto passare dei momenti fantastici. Senza di te sarebbe
stato tutto piu difficile.
Un grandissimo grazie a tutti i miei amici con i quali ho passato dei bellissimi
momenti, in particolare Andre, Chris, Fede, Fritz, Lele, Marcone, Mauro, Meph,
Palmi, Tommy e Uilli.
Grazie ai miei famigliari, in particolare alla nonna Caterina e alle prozie Romana
e Luigina. Sono contento di aver condiviso questi momenti con voi.
Un pensiero particolare va a mio nonno Gianni che e venuto a mancare l’estate
prima dell’inizio dell’universita. Avrei tanto voluto passare questi momenti con
te.
Vorrei inoltre ringraziare tutte le persone che hanno condiviso anche solo un singolo
momento con me. Mi avete aiutato a completare questo importante percorso.
II
Abstract
CubeSats, small spacecrafts with a mass lower than 10 kilograms, enable access
to space at a significantly reduced cost compared to conventional spacecrafts. As
a result of their constrained volume and mass, precision guidance and control is
highly challenging and, in particular, a limited amount of fuel is available on-board.
Furthermore, the drive towards miniaturization means that future CubeSats will
likely be under-actuated in control.
In this thesis, the problem of optimally guiding an under-actuated 12 U CubeSat
to dock with a target body is addressed. This problem is formulated as a con-
strained non-linear optimal control problem and solved using PSOPT, a pseudo
spectral optimal control software. In particular, this thesis concentrates on the
optimization of the total thrust needed to perform these maneuvers in order to
minimize the amount of fuel used per maneuver.
The main analyses for general docking maneuvers were performed assuming only
a planar motion. This work, instead, presents the solution to the 6-DOF prob-
lem which includes the problem of under-actuation and which minimizes fuel. The
analysis considers the motion of a CubeSat and a rotating target subject to Earths
gravitational field. The effect of air drag on the docking maneuver is also consid-
ered.
III
Contents
Acknowledgment I
Ringraziamenti II
Abstract III
List of Figures V
List of Tables VI
Nomenclature IX
1 Introduction 1
1.1 CubeSat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 6-DOF Relative Motion Dynamics 8
2.1 Translational Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.1 Restricted Three Body Problem . . . . . . . . . . . . . . . . 9
2.1.2 Clohessy-Wiltshire Equations . . . . . . . . . . . . . . . . . 12
2.1.3 Translational Dynamics Equations . . . . . . . . . . . . . . 14
2.2 Rotational Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2.1 Attitude Representation . . . . . . . . . . . . . . . . . . . . 16
2.2.2 Attitude Error Kinematics . . . . . . . . . . . . . . . . . . . 20
2.2.3 Euler Equations . . . . . . . . . . . . . . . . . . . . . . . . . 21
IV
2.2.4 Rotational Dynamics Equations . . . . . . . . . . . . . . . . 23
2.3 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4 Confguration of the Spacecraft . . . . . . . . . . . . . . . . . . . . . 27
2.5 Constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3 Implementation 32
3.1 State Space Formulation and Optimization Problem . . . . . . . . . 32
3.1.1 Theoretical Review . . . . . . . . . . . . . . . . . . . . . . . 33
3.1.2 State Space Formulation of the 6-DOF Relative Motion System 34
3.2 PSOPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.2.1 Translational Example . . . . . . . . . . . . . . . . . . . . . 39
3.2.2 Rotational Dynamics Example . . . . . . . . . . . . . . . . . 49
3.3 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.4 Air Drag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4 Optimal Docking Maneuvers 59
4.1 Physical Properties of the CubeSat . . . . . . . . . . . . . . . . . . 60
4.2 Pareto Front . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.3 Simulations’ Results - Unperturbed . . . . . . . . . . . . . . . . . . 63
4.3.1 Case 1: 400 km Circular Orbit . . . . . . . . . . . . . . . . . 65
4.3.2 Case 2: 500 km Circular Orbit . . . . . . . . . . . . . . . . . 70
4.3.3 Case 3: 600 km Circular Orbit . . . . . . . . . . . . . . . . . 75
4.3.4 Case 4: 700 km Circular Orbit . . . . . . . . . . . . . . . . . 80
4.3.5 Case 5: 800 km Circular Orbit . . . . . . . . . . . . . . . . . 85
4.3.6 Case 6: 900 km Circular Orbit . . . . . . . . . . . . . . . . . 90
4.4 Unperturbed Results’ Output . . . . . . . . . . . . . . . . . . . . . 95
4.5 Air Drag Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.5.1 Comparison 1: 400 km Circular Orbit . . . . . . . . . . . . . 98
4.5.2 Comparison 2: 500 km Circular Orbit . . . . . . . . . . . . . 100
4.5.3 Comparison 3: 600 km Circular Orbit . . . . . . . . . . . . . 102
4.5.4 Comparison 4: 700 km Circular Orbit . . . . . . . . . . . . . 103
4.5.5 Comparison 5: 800 km Circular Orbit . . . . . . . . . . . . . 105
4.5.6 Comparison 6: 900 km Circular Orbit . . . . . . . . . . . . . 106
V
4.6 Perturbed Results Analysis . . . . . . . . . . . . . . . . . . . . . . . 108
5 Conclusion 110
5.1 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
5.2 Future Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Bibliography v
Appendix A vi
VI
List of Figures
2.1 Three Body Problem . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Newton’s Law of Universal Gravitation . . . . . . . . . . . . . . . . 9
2.3 Restricted Three Body Problem System . . . . . . . . . . . . . . . 10
2.4 Satellites Relative Motion System . . . . . . . . . . . . . . . . . . . 12
2.5 LVLH Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.6 Euler Angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.7 12U CubeSat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.8 Docking Cone (left) and Docking Probe (right) . . . . . . . . . . . 29
2.9 Docking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.1 Translational Example - Trajectory . . . . . . . . . . . . . . . . . . 47
3.2 Translational Example - Relative Position Profile . . . . . . . . . . 48
3.3 Translational Example - Relative Velocity Profiles . . . . . . . . . . 48
3.4 Translational Example - Thrust Profiles . . . . . . . . . . . . . . . 49
3.5 Rotational Example - MRP Profiles . . . . . . . . . . . . . . . . . . 53
3.6 Rotational Example - Angular Velocity Profiles . . . . . . . . . . . 53
3.7 Rotational Example - Control Torque Profiles . . . . . . . . . . . . 54
3.8 Bounded Motion of the Chaser Satellite . . . . . . . . . . . . . . . . 55
3.9 Hatten and Russel minimum and maximum density profiles [1] . . . 57
4.1 Pareto Front . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.2 Case 1 - Orbits Underactuated . . . . . . . . . . . . . . . . . . . . . 66
4.3 Case 1 - Orbits Fully Actuated . . . . . . . . . . . . . . . . . . . . 66
4.4 Case 1 - Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.5 Case 1 - Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.6 Case 1 - Force Profiles . . . . . . . . . . . . . . . . . . . . . . . . . 69
VII
4.7 Case 2 - Orbits Underactuated . . . . . . . . . . . . . . . . . . . . . 71
4.8 Case 2 - Orbits Fully Actuated . . . . . . . . . . . . . . . . . . . . 71
4.9 Case 2 - Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.10 Case 2 - Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.11 Case 2 - Force Profiles . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.12 Case 3 - Orbits Underactuated . . . . . . . . . . . . . . . . . . . . . 76
4.13 Case 3 - Orbits Fully Actuated . . . . . . . . . . . . . . . . . . . . 76
4.14 Case 3 - Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.15 Case 3 - Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.16 Case 3 - Force Profiles . . . . . . . . . . . . . . . . . . . . . . . . . 79
4.17 Case 4 - Orbits Under-Actuated . . . . . . . . . . . . . . . . . . . . 81
4.18 Case 4 - Orbits Fully-Actuated . . . . . . . . . . . . . . . . . . . . 81
4.19 Case 4 - Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
4.20 Case 4 - Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4.21 Case 4 - Force Profiles . . . . . . . . . . . . . . . . . . . . . . . . . 84
4.22 Case 5 - Orbits Underactuated . . . . . . . . . . . . . . . . . . . . . 86
4.23 Case 5 - Orbits Fully Actuated . . . . . . . . . . . . . . . . . . . . 86
4.24 Case 5 - Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
4.25 Case 5 - Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
4.26 Case 5 - Force Profiles . . . . . . . . . . . . . . . . . . . . . . . . . 89
4.27 Case 6 - Orbits Underactuated . . . . . . . . . . . . . . . . . . . . . 91
4.28 Case 6 - Orbits Fully Actuated . . . . . . . . . . . . . . . . . . . . 91
4.29 Case 6 - Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
4.30 Case 6 - Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4.31 Case 6 - Force Profiles . . . . . . . . . . . . . . . . . . . . . . . . . 94
4.32 Case 1 - Relative Orbits Comparison . . . . . . . . . . . . . . . . . 99
4.33 Case 1 - Relative Distances Comparison . . . . . . . . . . . . . . . 99
4.34 Case 2 - Relative Orbits Comparison . . . . . . . . . . . . . . . . . 101
4.35 Case 2 - Relative Distances Comparison . . . . . . . . . . . . . . . 101
4.36 Case 3 - Relative Orbits Comparison . . . . . . . . . . . . . . . . . 102
4.37 Case 3 - Relative Distances Comparison . . . . . . . . . . . . . . . 103
4.38 Case 4 - Relative Orbits Comparison . . . . . . . . . . . . . . . . . 104
4.39 Case 4 - Relative Distances Comparison . . . . . . . . . . . . . . . 104
VIII
4.40 Case 5 - Relative Orbits Comparison . . . . . . . . . . . . . . . . . 105
4.41 Case 5 - Relative Distances Comparison . . . . . . . . . . . . . . . 106
4.42 Case 6 - Relative Orbits Comparison . . . . . . . . . . . . . . . . . 107
4.43 Case 6 - Relative Distances Comparison . . . . . . . . . . . . . . . 107
IX
List of Tables
1.1 CubeSat Missions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4.1 Thrusters Comparison . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.2 Spacecraft Properties . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.3 Boundary Conditions Case 1 . . . . . . . . . . . . . . . . . . . . . . 65
4.4 Results Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.5 Boundary Conditions Case 2 . . . . . . . . . . . . . . . . . . . . . . 70
4.6 Results Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.7 Boundary Conditions Case 3 . . . . . . . . . . . . . . . . . . . . . . 75
4.8 Results Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.9 Boundary Conditions Case 4 . . . . . . . . . . . . . . . . . . . . . . 80
4.10 Results Case 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
4.11 Boundary Conditions Case 5 . . . . . . . . . . . . . . . . . . . . . . 85
4.12 Results Case 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.13 Boundary Conditions Case 6 . . . . . . . . . . . . . . . . . . . . . . 90
4.14 Results Case 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
4.15 Unperturbed Resulsts’ Summary . . . . . . . . . . . . . . . . . . . 95
4.16 Unperturbed Resulsts’ Summary - Maneuvers . . . . . . . . . . . . 97
4.17 Comparison Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.18 Comparison Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
4.19 Comparison Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.20 Comparison Case 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
4.21 Comparison Case 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.22 Comparison Case 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
4.23 Air Drag Resulsts’ Summary for Under-Actuated Configuration . . 108
X
Nomenclature
i x-axis Versor
j y-axis Versor
k z-axis Versor
σ Modified Rodrigues Parameters Vector
a Acceleration Vector
F Force Vector
I Inertia Matrix
M External Moment Vector
q Quaternions Vector
r Position Vector
v Velocity Vector
δ(...) Relative
µ⊕ Earth’s Standard Graviational Parameter
Ω Angular Orbital Velocity
φ Roll Angle
Ψ Yaw Angle
XI
θ Pitch Angle
Favg Average Force During the Maneuver
Fi Control Thrus Component
g0 Gravitational Acceleration at the surface of the Earth (9,81 m/s2)
Mapp Apparent Moment
Mci Target Inertial Torque
Mg Gyroscopic Torque
mman Mass of Fuel per Maneuver
R⊕ Radius of the Earth
Ti Control Torque Component
Vman Volume per Maneuver
6-DOF Six Degrees of Freedom
ADN Ammonium Di-Nitramide
AOCS Attitude and Orbit Control System
CW Clohessy-Wiltshire
DAE Dynamic Algebraic Equation
ECI Earth-Centered Inertial
FEEP Field-Electric Emission Propulsion
G Universal Gravitational Constant
GNC Guidance and Navigation Control
h Orbit Altitude
IDVD Inverse Dynamics in the Virtual Domain
XII
Isp Specific Impulse
ISS International Space Station
J Cost Function
LEO Low Earth Orbit
m Mass
MRP Modified Rodrigues Parameters
NLP Non Linear Programming
ODE Ordinary Differential Equation
PSOPT Pseudo Spectral OPTimization
RW Reaction Wheels
SGRA Sequential Gradient-Restoration Algorithm
T Period of the Orbit
XIII
Chapter 1
Introduction
The space race started during the Cold War, when USA and USSR wanted to
demonstrate their power. It started in 1958 with the launch by the Soviet Union
of the Sputnik 1, the first satellite to orbit around the Earth: one year later the
United States launched Explorer 1. The challenge extended to an higher level: in
1961 Jurij Gagarin was the first human to flight in space, and was followed by
other compatriots in the following years. The US answered few days after the first
USSR human flight in space with the mission MR-3 that took the first American
man in space.
What seemed to be a challenge for the domination of the world resulted in the
start of the space revolution, that would have changed the world as it was known it
in the following decades. Nowadays, the results of this process are clearly visible:
spacing from television broadcasts to meteorological forecasts, going from navi-
gations systems to telecommunications, ranging from military devices to science
studies, everybody is surrounded by instruments and services that use thousands
of in-orbit satellites as a platform. It was also possible to explore Mercury, Venus,
Mars, Jupiter and the borders of the solar system with the mission New Horizons
that provided the first ever high quality images of the surface of Pluto. Thanks to
Hubble telescope, scientists were able to explore the deep space and, with the fu-
ture launch of the James Webb Telescope they will be capable of seeing the deepest
part of the universe that has never been reached by any optical instrument.
1
1.1 CubeSat
Year by year, the technological level increased, and not only in the space sector:
just think to the computers and mobile phones that were on the market 20 years
ago: with todays technology, smartphones have a computational power that the
first satellites could never reach. In general, in this years a miniaturization of the
components has happened, going from large devices to always smaller.
This is what has happened also with the satellites. During the years, the average
launch mass of a spacecraft increased, peaking with the 8.2 tons of Envisat, a
Earth Observation satellites developed by the European Space Agency [2]. The
reason for an increase in the mass, as explained by Poghosyan [3], was done to
reduce the cost per kg of payload launched and to incorporate multiple payload
instruments in a single satellite. However, micro-vibrations and electromagnetic
issues could create problems in the integration process, as it happened for the
Envisat [4]. These complications, together with the development of the technology,
led to the miniaturizations of satellites, with a new concept called CubeSat. The
first CubeSat standard was defined at Stanford and California Polytechnic State
Universities in 1999 [5, 6], and defines the unit of a cubesat as 10x10x10 cm3 with
a mass of 1.33 kg [7]. The first launches of nanosatellites (not already known as
CubeSats but with comparable dimensions) are dated in the early ’60s, exactly at
the beginning of the space revolution presented before. After that, there was a
very long period with no launch of small satellites until early 2000s were, after the
study of CubeSats cited above, the launches increased drastically [5].
Due to their lower cost with respect to the traditional satellites, CubeSats are
widely used by Universities to perform scientific experiments in space. However,
also bigger organizations such as national agencies and companies are helping the
development of this sector [3]. In Table 1.1 some of the most recent and future
missions involving Cubesats are presented, with the aim of showing that CubeSats
can have, just to show that the field of operations is very various and that both
universities, national agencies and military forces are pushing in the direction of
this new technology.
2
Mission Size Organization Objective Launch
AENEAS [8] 3U University ofSouthern Califor-nia
Track cargo con-tainers in theopen ocean
2012
Firefly [9] 3U NASA Explore relation-ships betweenlightnings andTGFs
2013
Sense SV1/SV2 [10] 3U US Air Force Investigate spaceweather
2013
Perseus M1/M2 [11] 6U Aquia Space,Dauria Aerospace
Detect AIS trans-mitted by vessels
2014
Aoxiang-Sat [12] 12U NorthwesternPloytechnicalUniversity, China
Detect skylightpolarization pat-terns and measuregravity
2016
EON-MW [13] 12U MIT Scanning 22-channel from23 to 183 GHzhigh-resolutionmicrowave spec-trometer
2017
iSat [14] 12U NASA Test CubeSat Ma-neuverability
2017
Lunar Flashlight [15] 6U NASA JPL andMarhsall SpaceFlight Center
Locating icedeposits in themoons perma-nently shadowedcrater and detect-ing its properties
2019
EQUULEUS [16] 6U JAXA and Uni-versity of Tokyo
Study of theradiation envi-ronment in theregion of spacearound Earth
2020
Table 1.1: CubeSat Missions
3
What is done, typically, is to launch a constellation of CubeSats able to per-
form the mission. Due to their limited coverage and power, they would not be
able to achieve their goals alone. This is the case of the SWEET mission [17],
that need a global coverage for the monitoring of the water quality and water
level for African countries. Another example of multiple CubeSats launch is repre-
sented by AAReST (Autonomous Assembly of a Reconfigurable Space Telescope),
where the different modules combine directly in orbit to form a space telescope
[18]. CubeSats are widely used in planetary science missions and are a cheaper
instrument with respect to typical satellites for universities who wants to test their
systems directly in space. One of the first nanosatellite launched by a university
was QuakeSat [19], a 6U CubeSat deployed in 2003 by Stanford University with
the aim of detecting low frequency magnetic field signals using AC magnetome-
ters. After that, many universities developed their own projects: this is the case
of the University of Illinois in 2006, with its ION [3],with the mission of measur-
ing molecular oxygen airglow emissions from the Earths mesosphere and in 2008
of the University of Toronto, that developed a 3U CubeSat named CanX-2 [20]
that has the goal of measuring the total amount of electrons and water vapor
contents in the atmosphere as a function of the altitude. This new technology
has influenced also national agencies, such as NASA (USA) and JAXA (Japan).
It is the case, for example, of ASTERIA [3], a 6U CubeSat that has to look for
transits of identified RV planets and conduct high cadence stellar photometry over
long durations. OMOTENASHI (Outstanding MOon exploration TEchnologies
demonstrated by NAno Semi-Hard Impactor) [21, 22], that will be launched in
2020, will be the smallest moon lander ever. It provides attitude control and puts
itself into a impact trajectory. Before reaching the surface, the Cubesat spins up
and deploys the 0.7 kg surface probe featuring an inflatable airbag and a solid
rocket motor. Then the airbag is inflated and, just before impact, the solid rocket
motor is fired, performing a semi-hard landing. This mission could open the pos-
sibilities for nanosatellites, giving them the opportunity to act as a spacecraft and
as a lander. Also private companies, such as Lockheed Martin, Ball Aerospace
and many others, are investing in this field. Lockheed Martin, one of the most
important company in the aerospace and military sector, will launch in 2019 the
SKyfire, a 6U CubeSat with the aim of performing a lunar flyby and taking in-
4
frared sensor data for surface characterization, remote sensing, and site selection
as well as collecting data on thermal environments [3, 23]. Ball aerospace will
launch CIRiS (Compact Infrared Radiometer in Space), a 6U CubeSat equipped
with an infrared radiometer designed for high radiometric performance for land
and water resource management, research, and modeling [24].
However, CubeSats are not limited only to planetary missions. The Interplane-
tary NanoSpacecraft Pathfinder In Relevant Environment (INSPIRE), launched in
summer 2014, opened the field of interplanetary missions for CubeSats [25]. The
goal of this nanosatellite was to demonstrate its ability to communicate, operate
and be navigated remotely from earth at 1AU from earth, that is the distance of
Mars from our planet, for three months, together with the testing of CubeSats
systems that were never used before on interplanetary missions. In May 2018,
MarCO (Mars Cube One) CubeSats [26] will be launched together with the In-
Sight mission, that has to bring a lander on Mars. The two nanosatellites will
not be an active part of the original lander mission, on which they were added
subsequently, but they will be experimental entities. They, in fact, test the ability
of a 6U CubeSat of transmitting data from Mars to the Earth through a high-gain
antenna and of collecting solar power from the sun at 17 W. These nanosatellites
will rely only on the InSight final stage of Atlas V, that will insert them in the
interplanetary trajectory to Mars: their propulsion system consists only in atti-
tude control. In 2019, EQUULEUS [16, 27] will be launched and it will analyze
the Earth-Moon surrounding space, measuring the distribution of plasma to help
the scientists understand the radiation environment. It will also test low-energy
trajectory control techniques within the Earth-Moon Lagrangian points. In the
same year, on the Exploration Mission 1 (EM-1), 13 CubeSats payloads will be
launched, including EQUULEUS and: Lunar Flaslight [15] that with solar sail
will light the shadowed crater and help the detection of ice deposits; Near-Earth
Asteroid Scout [28], a solar sail CubeSat that will encounter near-earth asteroids
and, thanks to a high-resolution camera, retrieve information from them; Lunar
Ice Cube [29] that will search for the presence of ice from a low lunar orbit; and
many others.
As can be understood from this section, CubeSats can be used in every field
(imaging, data handling, science, communication) and by any organization (pub-
5
lic, private and universities). It is an area that is still developing, and with the
improvement of the technology that is leading to always smaller and more efficient
components, CubeSats can become the reference for space systems.
1.2 Problem
The main problem regarding CubeSats concerns the attitude and orbit de-
termination and control [5]. The major function of AOCS (Attitude and Orbit
Control System) in nano-satellites is to apply a simple rotational damping to re-
duce the spin rate of the satellite, that is important if CubeSats that need to
orient their antenna or sensor in some directions are taken into account. Com-
pared with the bigger satellites system, the control of the rotation is more coarse,
and a rough pointing of the instrument should be expected. An optimal control of
the nano-satellite is difficult because at least a two-axis system for the orientation
is required, and the lack of space in the typical 3U CubeSats used in multiple mis-
sions represents a strong limitation. However, in the last years the attitude control
technology has drastically improved, thanks to the miniaturization of orbit deter-
mination star trackers[3]: moreover, some companies have developed GNC systems
that fits in only 0.5U [30]. Strictly related to the attitude and orbit control, there
is the docking problem. It involves two bodies, one of them being the target and
the other the chaser. The typical example for space application is the ISS, where,
periodically, supplies and crew members berth with their module; the maneuvers
can either be performed autonomously or by members of the ISS/module. In
general, the interactions between different spacecrafts can have the most various
applications, and this work will exploit the docking scenario.
Ciarcia and Romano firstly [31] developed a near-optimal planar proximity maneu-
ver coupling two methods, IDVD (Inverse Dynamics in the Virtual Domain) and
SGRA (Sequential Gradient-Restoration Algorithm): the computations were done
considering a chaser spacecraft docking to a non-cooperative target, and both time
and energy optimizations were considered. In a subsequent work [32], they imple-
mented the same combined methods but in a planar translational only problem in
the Clohessy-Wiltshire environment. After these, they exploited experimentally
the IDVD-SGRA using a Floating Spacecraft Simulators testbed to perform au-
6
tonomous cooperative planar docking maneuvers between two spacecrafts [33, 34].
Inverse dynamics method is widely used, and also Biggs and Caubet in their work
[35] on the sub-optimal motion planning method for attitude maneuvers take ad-
vantage of the same technique, with quaternions describing the orientation of the
spacecraft. These works, as could be noticed, perform computations for planar
maneuvers or attitude-only, and they consider fully-actuated bodies as the tar-
gets of the projects. However, the typical configuration of a CubeSat, mainly due
to lack of space, is with one thruster only (under-actuated): for this reason, an
in-depth analysis of this technology must be performed.
1.3 Methodology
The motion planning of an under-actuated CubeSat in the 3D space has not
been evaluated yet, and in this work an in-depth analysis of this technology will
be produced. In particular, the motion planning that will be analyzed regards the
docking maneuver of a chaser spacecraft with a target satellite.
First of all, the equations characterizing the problem are presented, followed by
a presentation of the instrument used to carry out the solutions. After that, the
physical properties of the spacecraft that is going to be considered will serve as a
basis for the following presentation of the results. The simulations, on which the
results will be based, are 6, and they cover almost the whole LEO environment,
going from 400 kilometers (the height at which ISS is orbiting) to 900 kilometers.
A comparison between under-actuated and fully-actuated spacecrafts will be done
in the analysis, in order to show the main differences between a real-life system and
an ideal one. The results will comprehend both numerical values of the CPU time
(all computations have been carried out with a machine working with an Intel Core
i7-6500 that has a base frequency of 2.50 GHz with the possibility to boost it up
to 3.10 GHz), cost function value, average propulsion force during the maneuver
and the graphs with the absolute orbits, relative distances and velocities and the
thrust profiles. At the end, the results for the real life system, the under-actuated,
will be compared with the case of a perturbed environment caused by atmospheric
drag.
7
Chapter 2
6-DOF Relative Motion Dynamics
In this chapter, the fundamental mathematical and physical concepts necessary
for this work are presented. For the translational part, the R3BP is stated and then
the Clohessy-Wiltshire equations of relative dynamics deriving from it are devel-
oped. This part provides the 3-DOF equations of the relative translational motion
of two bodies. For the rotational part, instead, three different way to represent
the attitude of a spacecraft are expressed as follows: Euler angles, quaternions
and modified Rodrigues parameters. These three concepts are fundamental for
the next sections that are Euler equations, first, and attitude relative dynamics,
second. This last part will provide the 3-DOF relative rotational equations of a 2
satellite system. At the end, the translational and rotational part are coupled and
the optimal control problem that needs to be solved will be stated.
2.1 Translational Dynamics
This section presents the fundamental translational dynamics equations neces-
sary for the statement of the optimization problem. First of all, the more general
formulation of the R3BP is presented, then, from it, the Clohessy-Wiltshire equa-
tion of relative motion are derived. At the end, the set of the 3 dynamics equations
of relative motion are stated.
8
2.1.1 Restricted Three Body Problem
The general three body problem was first stated by Isaac Newton in 1687
when in his ”Principia” he presented the problem of the movement of three mas-
sive bodies subjected to their mutual gravitational perturbations. This problem
can be represented in the following way:
Figure 2.1: Three Body Problem
Each body interacts with the other two under the Newton’s Law of Universal Grav-
itation, that states that two masses attracts each other with a force directed along
the intersection of the two bodies, being this force proportional to the product
of the two masses and inversely proportional to the square of the distance. The
gravitational law is represented in the picture below
Figure 2.2: Newton’s Law of Universal Gravitation
with G = 6.67 · 10−11Nm2kg−2 being the universal gravitational constant.
Using the Newton’s second law, the general three body problem can be stated as
follows. At a certain time, for a mass mi and its vector position ri, the three
9
differential equations governing the problem are:
r1 = −Gm2r1 − r2|r1 − r2|3
−Gm3r1 − r3|r1 − r3|3
r2 = −Gm3r2 − r3|r2 − r3|3
+Gm1r1 − r2|r1 − r2|3
r3 = Gm1r1 − r3|r1 − r3|3
+Gm2r2 − r3|r2 − r3|3
(2.1)
A closed solution for this system of equations does not exist but it is possible to
retrieve an approximated one using numerical integration techniques.
In the restricted three body problem, instead, it is possible to find a closed solution.
Figure 2.3: Restricted Three Body Problem System
As shown in Figure 2.3 the two main bodies, m1 and m2, are moving in a circular
orbit of radius r12 under the action of their mutual gravitational attraction. G is
the centre of mass of the two body systems and it is coincident with the centre of
the xyz non-inertial comoving reference frame with the axis directed as shown in
the figure. The reference frame is rotating at a constant angular velocity Ω given
by
Ω = Ωk (2.2)
10
where
Ω =2π
T(2.3)
and T is the period of the circular orbit.
Given a rotating vector in the xyz frame, in this case the vector connecting the
centre of the reference system and the third body m,
r = xi+ yj + zk (2.4)
its first derivative is given by
r = vG + Ω× r + vrel (2.5)
where vG is the velocity of the centre of the reference frame and vrel = xi+yj+zk.
The second derivative is given by
r = aG + Ω× r + Ω× (Ω× r) + 2Ω× vrel + arel (2.6)
where arel = xi+yj+ zk. As stated above, the angular velocity Ω of the reference
frame is constant, so its time derivative is null. Also the velocity of the center of
mass is constant, as a consequence aG = 0. At the end, the second derivative of
the position vector r can be expressed as follows:
r = Ω× (Ω× r) + 2Ω× vrel + arel (2.7)
The third body m is subjected to the gravitational attractions of both m1 and m2
with the total force F being
F = −Gmm1r1r31−Gmm2
r2r32
(2.8)
From the second law of dynamics, combining equations (2.7) and (2.8), the for-
mulation of the restriced three body problem is obtained:
m[Ω× (Ω× r) + 2Ω× vrel + arel] = −Gmm1r1r31−Gmm2
r2r32
(2.9)
11
2.1.2 Clohessy-Wiltshire Equations
Now that the restricted three body problem has been stated, the next step will
be the derivation of the Clohessy-Wiltshire equations of relative motion.
From Figure 2.3 it is possible to define ρ1 and ρ2 as the vectors connecting the
center of mass to m1 and m2 respectively. Recalling equation (1.9) it can be said
r1 = r − ρ1 r2 = r − ρ2
To adapt the R3BP to the problem of a chaser spacecraft m and a target spacecraft
m2 both orbiting around a central body m1 (typically much bigger than m and
m1), let’s consider m and m1 infinitesimal. From this assumption derives that
ρ1 = 0 → r = r1
Moreover it can said that r2 = R is the position vector of the chaser with respect
to the target satellite and the angular velocity Ω is given by
Ω2 =Gm1
ρ32→ Ω2ρ32 = Gm1
The resulting systems is represented in the figure below:
Figure 2.4: Satellites Relative Motion System
After these assumptions, the equation of the chaser spacecraft can be written as
follows:
Ω× [Ω× (R+ ρ2)] + 2Ω× dR
dt+d2R
dt2= −Ω2ρ32
r3r (2.10)
This differential equation is clearly non-linear due to term 1/r3, but thanks to the
Taylor series expansion it can transformed in a linear equation. First of all it can
be defined
12
x =R
ρ2
and then it can be written
r2
ρ22=
(ρ2 +R)(ρ2 +R)
ρ22=ρ22 + 2ρ2 ·R+R2
ρ22= x2 + 2iξ · iRx+ 1
with iξ and iR being the versor of ρ2 and R respectively. The Taylor series
expansion leads to
ρ2r
= (1 + 2iξ · iRx+ x2)−
1
2 = 1− iξ · iRx+ . . .
Therefore, taking the third power of this last equation and discarding the second
and higher order terms brings to
ρ32r3
= 1− 3iξ · iRR
ρ2+O
(R2
ρ22
)(2.11)
Thus, equation (2.10) can be rewritten as follows
d2R
dt2+ 2Ω× dR
dt+ Ω× [Ω× (R+ ρ2)] = −Ω2
[1− 3(iξ ·R)
1
ρ2
](ρ2 +R) (2.12)
Since (iξ ·R) ·R = O(R2), the previous equation can be reduced to
d2R
dt2+ 2Ω× dR
dt+ Ω× (Ω×R) = −Ω2R+ 3Ω2(iξ ·R) · iξ +O(R2) (2.13)
For this relative motion problem it is useful to define a proper reference frame on
the target satellite as follows: x−axis coincident with the radial direction, y−axiswith the direction of motion and z − axis resulting from the cross-product of the
previous two. This is called LVLH (Local Vertical Local Horizon) frame (Figure
2.5).
As a consequence R can be expressed as
R = xiθ + yir + ziz Ω = Ωiz iξ = ir
At the end, after these assumptions, and after having solved the triple vectorial
product, equation (2.13) can be rewritten in vectorial form as follows
d2R
dt2+ 2Ω× dR
dt= −Ω2ziz + 3Ω2xir (2.14)
13
Figure 2.5: LVLH Frame
or, in scalar form,
d2x
dt2− 3Ω2x− 2Ω
dy
dt= 0
d2y
dt2+ 2Ω
dx
dt= 0
d2z
dt2+ Ω2z = 0
(2.15)
The system (2.15) represents the Clohessy-Wiltshire equations. These three cou-
pled, second order differential equations with constant coefficients are capable of
providing an exact solution.
2.1.3 Translational Dynamics Equations
Now that the review of the relative motion equation has been presented, the
final step is to develop the translational dynamics equations that will be used to
solve the problem. Considering the general case of a chaser satellites with thrusters
acting together on x − y − z directions of the target satellite, the system (1.15)
14
can be rewritten as follows x− 3Ω2x− 2Ωy =
Fxm
y + 2Ωx =Fym
z + Ω2z =Fzm
(2.16)
where m is the mass of the chaser and the dots represent the time derivative of
the variables. System (2.16) represents the final translational dynamics problem.
Later in this chapter, these three equations will be coupled with the rotational
dynamics’ ones to form the complete mathematical problem. It must be kept in
mind that this Ω represents the angular velocity of the orbit, not the angular
velocity of the body around its axes.
15
2.2 Rotational Dynamics
In this section, the relative rotational dynamics equations of the chaser with
respect to the target are presented. First of all, a review of the possible attitude
representations will be outlined, then, after choosing the proper representation,
the equations will be developed, starting from the more general Euler equations,
passing through the attitude error kinematics and finally coming to the set of three
dynamics equations.
2.2.1 Attitude Representation
There are different way to represent the rotation of a spacecraft around its main
axis. The first is by means of Euler angles, the most intuitive one but also the most
computational-demanding too. The second one is by using quaternions, composed
by a vectorial part and a scalar part, which provide good computational results
with and avoid singularities that could be encountered using Euler angles. The last
ones that is presented in this document are the Modified Rodrigues Parameters,
derived from quaternions with a reduction in the dimensions (3 MRP with respect
to the 4 quaternions). The most important aspect of these 3 formalism that will
be analysed is the Direction Cosine Matrix, which represent the orientation of the
chaser with respect to the target reference frame and which is needed for the final
coupling of translational and rotational dynamics.
Euler Angles
Euler angles represent the orientation of a rigid body with respect to a fixed
reference frame. In the aerospace field, the rotations around the three axes are
called (in the order around x, y and z) roll, pitch and yaw (Figure 2.6). This
formalism is called Tait-Bryan angles, but it is known with the general name of
Euler angles. It is mostly used in aeronautical applications but it can be extended
to the aerospace field. Typically, roll, pitch and yaw are represented with the
greek letters φ, θ and Ψ.
The direction cosine matrix is produced in the following way: the complete ro-
tation of a spacecraft is done by means of three subsequent rotations around the
16
Figure 2.6: Euler Angles
three main axes in whatever order (xyz, zyx, zxy, yzx, ...) and from each of these
rotations, a rotation matrix is generated. Here these matrices are shown:
Ax =
1 0 0
0 cos(φ) − sin(φ)
0 sin(φ) cos(φ)
(Roll)
Ay =
cos(θ) 0 sin(θ)
0 1 0
− sin(θ) 0 cos(θ)
(Pitch)
Az =
cos(Ψ) − sin(Ψ) 0
sin(Ψ) cos(Ψ) 0
0 0 1
(Y aw)
17
The resulting DCM is built in accordance with the order of the rotation. In fact, if
the sequence was xyz, then Axyz = AzAyAx, so the matrices must be multiplied
in the opposite order of the sequence of rotations. The resulting DCM from a xyz
sequence of rotation is
Axyz =
c(θ)c(Ψ) −c(φ)s(Ψ) + s(φ)s(θ)c(Ψ) s(φ)s(Ψ) + c(φ)s(θ)c(Ψ)
c(θ)s(Ψ) c(φ)c(Ψ) + s(φ)s(θ)s(Ψ) −s(φ)c(Ψ) + c(φ)s(θ)s(Ψ)
−s(θ) s(φ)c(θ) c(φ)c(θ)
where c and s stand for cosine and sine. As can be seen from the matrix above,
the terms are highly non linear, and once they are inserted in the equations the
computational effort results to be very demanding.
Quaternions
Quaternions are mathematical entities defined by a vectorial part and a scalar
part:
q = (q0, q1, q2, q3) = (q0, qv)
According to Euler’s rotation theorem, the rotation or sequence of rotations of a
body around its axes can be represented through a single rotation Θ around a
proper axis, called Euler axis, which in this case is defined by the unit vector qv.
This rotation can be represented by the following quaternion:
q =
cos
(Θ
2
), sin
(Θ
2
)qv
with qv = qvxi, qvyj, qvzk
being i, j and k the versor of the reference cartesian frame. The rotation of
any vector v by means of quaternions can be done representing the vector in the
following way:
a = 0,v
The final rotation of the vector v is given by the vectorial part of the following
conjugation of a by q
a′ = qaq−1 where q−1 =
cos
(Θ
2
),− sin
(Θ
2
)qv
18
The direction cosine matrix expressed using quaternion’s component is
Aq =
q20 + q21 − q22 − q23 2(q1q2 + q0q3) 2(q1q3 − q0q2)2(q1q2 − q0q3) q20 − q21 + q22 − q23 2(q2q3 + q0q1)
2(q1q3 − q0q2) 2(q2q3 + q0q1) q20 − q21 − q22 + q23
It is easy to notice that this matrix is easier to handle for any machine and this is
the great advantage of using quaternions instead of Euler angles.
Modified Rodrigues Parameters
The quaternions normalization constraint, that needs to be done cycle by cycle
when solving a problem, has shown to produce singularities in control problems.
The three-dimensional parametrization of the attitude representation can overcome
this problem, and this is why in control problems there are still 3D models [36].
However, Euler angles produces matrices and equations heavy to handle; this is
why modified Rodrigues parameters (MRP) gained importance in the time.
MRP are defined as follows:
σ =qv
1 + q0= n tan
Θ
4where n = i, j,kT
As can be noticed, MRP present a singularity for Θ = 2π, which corresponds to a
complete rotation around the axes until the initial position.
The DCM expressed in terms of the MRP can be shown to be as follows [37]:
Aσ=1
(1+σTσ)2
4(σ21−σ2
2−σ23)+Σ2 8σ1σ2+4σ3Σ 8σ1σ3−4σ2Σ
8σ1σ2−4σ3Σ 4(−σ21+σ
22−σ2
3)+Σ2 8σ2σ3+4σ1Σ
8σ1σ3+4σ2Σ 8σ2σ3−4σ1Σ 4(−σ21−σ2
2+σ23)+Σ2
(2.17)
Σ = 1− σTσ
As for the quaternions’ DCM, the MRP’s direction cosine matrix is easier to han-
dle from the computational point of view with respect to the Euler angles’ one.
19
In this paper the use of the MRP will be exploited because it has been proven
their advantages in the optimal problem solutions [36] and because Euler angles
and quaternions have demonstrated computational and singularities issues respec-
tively.
2.2.2 Attitude Error Kinematics
The problem at the base of this project is a relative one, therefore the relative
expression of the MRP is needed, and in particular their time derivatives: this
argument was previously treated by Younes in 2013 [38]. ”Relative” can be sub-
stituted with ”error” without change in the meaning.
As defined above in the document,
σ =qv
1 + q0= n tan
Θ
4
The inverse transformations can be written as
q0 =1− σ2
1 + σ2qv =
2σ
1 + σ2
where
σ2 = σTσ
It can be done the same for the error MRP (expressed with the prefix δ), leading
to
δσ =δqv
1 + δq0(2.18)
with the inverse transformations expressed as
δq0 =1− δσ2
1 + δσ2δqv =
2δσ
1 + δσ2(2.19)
The time variation of the error MRP can be derived from equation (2.18), and it
is given by
δσ =δqv
1 + δq0− δq0δqv
(1 + δq0)2(2.20)
20
where
δqv =1
2−([δω×] + 2[ωt×])δqv + δq0δω (2.21)
At the end, putting equations (2.19) and (2.21) in (2.20) leads to
δσ =1
4−2([δω×] + 2[ωt×])δσ + (1− δσ2)δω+
1
2(δωT δσ)δσ (2.22)
where
δω = ωc − ωt (2.23)
and the notation [A×] indicates
[A×] =
0 −A3 A2
A3 0 −A1
−A2 A1 0
2.2.3 Euler Equations
Euler equations are used to describe the rotation of a body around through a
reference of frame whose axes are coincident with the principal axes of inertia of
the body. In vectorial form the eqation is stated as follows
Iω + ω × (Iω) = T (2.24)
where I is the inertia matrix, ω the angular velocity vector of the body and T
the applied control torques. In the considered case of principal axes of inertia, I
is represented by the following matrix
I =
Ix 0 0
0 Iy 0
0 0 Iz
where Ix, Iy and Iz are the inertias of the body on its principal axes. Developing
the vectorial equations, the following set of scalar differential Euler equations is
obtained
21
ωx =TxIx
+Iy − IzIx
ωyωz
ωy =TyIy
+Iz − IxIy
ωxωz
ωz =TzIz
+Ix − IyIz
ωxωy
(2.25)
where the subscripts x y z on the angular rates and on the torques mean that
those velocities and external solicitations are acting on the principal axes of inertia
of the body. System (2.24) provides the Euler equations, but this is valid only for
a single body. This problem deals with relative dynamics, and this also involves
relative attitude. Therefore it is needed to derive the relative attitude equations
between target and chaser as done by Mauro Massari in his paper [39].
The more complete vectorial Euler equations of the chaser (subscript c) is:
Icωc + ωc × (Icωc) = T c +M c (2.26)
where the disturbance moment M c acting on the chaser has been added to the
previous equation. The following definitions will be useful for the derivation of the
final relative Euler equations:
Relative angular velocity: ωr = ωc − Γωt
Relative angular acceleration: ωr = ωc − Γωt + ωr × (Γωt)
Note that all the terms with the subscript t are referred to the target satellite.
Substituting the first previous equation in the second brings to
ωr = ωc − Γωt + ωc × (Γωt)− (Γωt)× (Γωt)︸ ︷︷ ︸=0
which, expressed for ωc, can be rewritten as
ωc = ωr + Γωt − ωc × (Γωt) (2.27)
Keeping in mind that ωc = ωr + Γωt, and substituting equation (2.27) in (2.26)
leads to
Ic(ωr + Γωt − ωc × Γωt) + (ωr + Γωt)× Ic(ωr + Γωt) = M c + T c
22
which can be developed and rewritten as follows:
Icωr+IcΓωt−Ic(ωc×Γωt)+ωr×Icωr+ωr×IcΓωt+Γωt×Icωr+Γωt×IcΓωt= M c+T c
After moving some terms to the right and condensing some parts, the equation
can be rearranged as
Icωr + ωr × Icωr = −M g −M ci +M app +M c + T c (2.28)
where
M gcoup = ωr × IcΓωt + Γωt × Icωr
M gc = Γωt × IcΓωt
M g = M gc +M gcoup
M ci = IcΓωt
M app = Icωr × Γωt
M g represents the gyroscopic torques, M ci the target inertial torques and M app
the apparent torques. All these terms influence the relative attitude dynamics of
the two bodies. This vectorial equation describes the time variation of the relative
attitude of the target and chaser with all the disturbances acting on the system.
2.2.4 Rotational Dynamics Equations
As it was illustrated in the Rotational Dynamics section, non only dynamic
was taken into account. Later in this document, the relevance of the kinematic
equations of the MRP will be discovered during the formulation of the complete
problem. Now the fundamental equation regarding the relative rotational part will
be shown, as a brief summary of what was done above. Starting from the Modified
Rodrigues Parameters, their kinematic can be expressed, in vectorial form, by the
following equation
δσ =1
4−2([δω×] + 2[ωt×])δσ + (1− δσ2)δω+
1
2(δωT δσ)δσ
23
or, in scalar form,δσ1 =
1
2[δσ2(δω3 + 2ωt3)−δσ3(δω2 + 2ωt2)]+
1
4(1− δσ2)δω1+
1
2Aδσ1
δσ2 =1
2[δσ3(δω1 + 2ωt1)−δσ1(δω3 + 2ωt3)]+
1
4(1− δσ2)δω2+
1
2Aδσ2
δσ3 =1
2[δσ1(δω2 + 2ωt2)−δσ2(δω1 + 2ωt1)]+
1
4(1− δσ2)δω3+
1
2Aδσ3
(2.29)
where
A = δωTδσ = δω1δσ1 + δω2δσ2 + δω3δσ3
and δω and δσ are defined in equations (2.23) and (2.18) respectively.
For what concerns the dynamic equations, i.e. the Euler equations expressed in
terms of relative motion, their vectorial form is given by
Icωr + ωr × Icωr = −M g −M ci +M app +M c + T c
or, expressed in scalar form,Ic1δω1 + (Ic3 − Ic2)δω2δω3 = −Mg1 −Mc1 +Mapp1 +Mci1 + Tc1
Ic2δω2 + (Ic1 − Ic3)δω1δω3 = −Mg2 −Mc2 +Mapp2 +Mci2 + Tc2
Ic3δω3 + (Ic2 − Ic1)δω1δω2 = −Mg3 −Mc3 +Mapp3 +Mci3 + Tc3
In order to uniform the notations, ωr has been substituted with δω.
In the first instance, the disturbance moment M c, which comprehends solar pres-
sure, J2 effect (due to the non-sphericity of the Earth), drag effect and third body
perturbation, will be be ignored. These parameters, in fact, have a huge effect in
the orbit propagation, but they can be neglected during short maneuvers like the
ones analyzed in this work. Having said that, the previous system can be rewritten
as follows:Ic1δω1 + (Ic3 − Ic2)δω2δω3 = −Mg1 −Mci1 +Mapp1 + Tc1
Ic2δω2 + (Ic1 − Ic3)δω1δω3 = −Mg2 −Mci2 +Mapp2 + Tc2
Ic3δω3 + (Ic2 − Ic1)δω1δω2 = −Mg3 −Mci3 +Mapp3 + Tc3
(2.30)
24
The reference 1, 2 and 3 are used in place of x, y and z in order to avoid confusion
with all the other letters present in the equations.
However, at the end of the simulations the air drag will be taken into account
and the perturbed results will be compared with the unperturbed ones, to see
how the software behaves with an higher level of difficult for the equations and
how the chaser-target system operates under this disturbance. Systems (2.29)
and (2.30) present the fundamental equations needed to represent the relative
rotational dynamic of a rigid body.
2.3 Problem Statement
Before stating the problem there is one last step that needs to be evaluated, i.e.
the coupling. What have been presented till now are just decoupled equations of
translational and rotational dynamics, but in the system considered, translation
and rotation take place simultaneously. What is needed is to couple these two
parts, and this can be done through the control forces acting on the chaser. These
forces, both thrusts and torques, relate translation and rotation through the DCM.
In fact, since they belong to the chaser body frame they need to be rotated and
decomposed along the three main axes of the system on which the equations derived
previously are expressed.
Recalling equation (2.17), the DCM expressed in terms of the MRP can be seen
as
Aσ =
A11 A12 A13
A21 A22 A23
A31 A32 A33
Being F b and T b the forces and torques acting on the chaser satellite expressed in
the body reference frame, their transformation in the global LVLH frame can be
done as follows:
25
F LV LH = AσF b =
A11Fx + A12Fy + A13Fz
A21Fx + A22Fy + A23Fz
A31Fx + A32Fy + A33Fz
T LV LH = AσT b =
A11Tc1 + A12Tc2 + A13Tc3
A21Tc1 + A22Tc2 + A23Tc3
A31Tc1 + A32Tc2 + A33Tc3
(2.31)
Now it is possible to derive the proper dynamic formulation of the problem.
In order to keep the equations light and easy to understand, the symbols δ and
r that stood for ”relative” have been removed. Recalling the systems (2.16),
(2.29) and (2.30), it is possible to proceed with the presentation of the differential
scalar equations that represent the system. Note that the notation (t) will be
removed without any loss of meaning. The complete system of relative dynamics
26
and kinematic equations is given by:
δx = δvx
δy = δvy
δz = δvz
δvx − 3Ω2δx− 2Ωδy =A11Fx + A12Fy + A13Fz
m
δvy + 2Ωδx =A21Fx + A22Fy + A23Fz
m
δvz + Ω2δz =A31Fx + A32Fy + A33Fz
m
δσ1 =1
2[δσ2(δω3 + 2ωt3)−δσ3(δω2 + 2ωt2)]+
1
4(1− δσ2)δω1+
1
2Aδσ1
δσ2 =1
2[δσ3(δω1 + 2ωt1)−δσ1(δω3 + 2ωt3)]+
1
4(1− δσ2)δω2+
1
2Aδσ2
δσ3 =1
2[δσ1(δω2 + 2ωt2)−δσ2(δω1 + 2ωt1)]+
1
4(1− δσ2)δω3+
1
2Aδσ3
Ic1δω1+(Ic3−Ic2)δω2δω3 =(A11Tc1+A12Tc2+A13Tc3)−Mg1−Mci1+Mapp1
Ic2δω2+(Ic1−Ic3)δω1δω3 =(A21Tc1+A22Tc2+A23Tc3)−Mg2−Mci2+Mapp2
Ic3δω3+(Ic2−Ic1)δω1δω2 =(A31Tc1+A32Tc2+A33Tc3)−Mg3−Mci3+Mapp3
(2.32)
where
A = δωTδσ = δω1δσ1 + δω2δσ2 + δω3δσ3
and the terms of the matrix Aσ can be retrieved from equation (2.17). This is the
final set of coupled differential equations that will be written inside the solver and
used to find the solutions of the problem. It can now be seen that the problem
is fully coupled, since in the thrust forces in the translational part there is the
presence of DCM terms that are composed by the MRP of the rotational part.
2.4 Confguration of the Spacecraft
The spacecraft considered for the analysis is a 12U CubeSat, with dimensions
23x24x36 cm. Typically, a satellite with these dimensions has only one thruster
27
Figure 2.7: 12U CubeSat
along a direction: this is called “under-actuated”satellite. A typical representation
of this system is shown in Figure 2.7, with a 2x2x3 disposition of the units. The
“fully actuated”one, instead, is a configuration in which all the three axis of the
spacecraft present actuators in both directions. Clearly, since each thruster usu-
ally occupies one unit of the CubeSat, the fully-actuated case does not represent a
feasible configuration for small-dimensions satellite: the thrusters, in fact, occupy
one unit of the CubeSat each. If it is considered that 2/3 units are destined to
the reaction wheels, the satellite would have only 3/4 units where to store the fuel
and the electronics of the satellite. This problem can be avoided if this concept
is applied to bigger spacecrafts, where there is more space where to fit all these
systems. However, the fully actuated structure will be used as a reference, being
the best controllable spacecraft with all the 6-DOF covered by an actuator: it will
represent the reference for the results, showing how much the under-actuated case
differs from the fully-actuated. The single-thruster configuration, instead, will be
28
evaluated to show the possible results of the current technology. In the analyses
the thrusters will be considered as non-steerable, even if on the market there is
the possibility to find steerable thruster that would give to the overall system an
higher controllability. Typically, for a docking mission like the one performed in
this project, the berthing mechanism is placed on the opposite face of the thruster
in order to have more control during the final maneuvers, as shown in Figure 2.9.
In order to perform docking between two satellites, two mechanisms are needed: a
docking probe on the chaser and a docking cone on the target. A typical design of
these part is shown in Figure 2.8, with a slender part that will be accommodated
in the housing at the bottom of the cone. This configuration is used on multiple
spacecrafts, and also on the Soyuz when it has to dock with the Russian or Inter-
anation Space Station.
Figure 2.8: Docking Cone (left) and Docking Probe (right)
The docking cone allows a small error in the final position of the probe, because it
will guide it in its housing thanks to its shape. However, a good precision in the
orientation of the chaser is needed, because the probe is slender and it can easily
get damaged.
What typically happens is that, at the beginning of the docking maneuver, the
probe is not aligned with the target cone, as shown in Figure 2.9. Moreover, the
initial velocity of the chaser with respect to the target could be different from zero.
The docking problem solved in this work has the goal of bringing the chaser, with
certain initial conditions, to match the orientation and position of the probe with
the cone, having a final value of rotational and translational velocity equal to zero
in order to avoid any stress on the mechanism.
29
Figure 2.9: Docking
2.5 Constraint
Another important aspect that needs to be treated is the the one regarding
the constraints. They are a fundamental part of the overall problem, since they
impose physical and mathematical limitations to the solution.
Physical constraints regard the control torques and forces. For what concerns the
propulsion systems, they have an intrinsic limit that is the maximum amount of
thrust they can provide (wthis value will be called α): it will be considered the
same propulsion system for each thruster and their limits will be expressed as an
inequality, and, whether it presents a fully or under actuated configuration, the
constraints can be written as0 < Fx < α
Fy = 0
Fz = 0
(UNDER− ACTUATED)
30
−α < Fx < α
−α < Fy < α
−α < Fz < α
(FULLY − ACTUATED)
Regarding the control torques, the reaction wheels are the main systems used for
the maintenance of the attitude on CubeSats. The problem rising from exceeding
the limits of the reaction wheels is called saturation: once the physical limit has
been reached (it will be called β the maximum amount of torque they can provide),
the wheels are no more able to provide the control required by the spacecraft. As
for the control thrusts, since the RW can rotate in both directions, the constraint
on the torques for both the fully and under-actuated case can be expressed as−β < Tx < β
−β < Ty < β
−β < Tz < β
These are the main physical constraint on the system, driven by the properties
of the chaser spacecraft. The last thing needed for the solution, since differential
equations are dealt in this work, are initial and final conditions. Whereas the
initial conditions are arbitrary, the finals are not since a docking problem is con-
sidered. All the equations express the relative dynamics of two bodies, so, the final
conditions that represent the docking is to have the final relative position, angular
velocity and attitude equal to zero. This means that at the end of the maneuver,
chaser and target spacecraft will have the same position, orientation and velocity
in space. For what concerns the translational velocities, they do not have to be
necessarily zero. In fact, in some docking problems a small difference in the ve-
locities is needed in order to be able to dock to the target satellite. The relative
angular velocities, instead, must be zero, because during the docking maneuver
undesired moments can damage the mechanism.
31
Chapter 3
Implementation
In this chpater, the implementation of the kinematics and dynamics equation
in the software will be outlined.
First of all, an overview of the state space formulation, necessary to develop the
problem in the software, will be presented, with all the concepts relative to the
optimization: after that, the state space formulation of the system considered will
be derived together with the optimization function needed. Then, a presentation of
the software, PSOPT, will be given and it will be shown how it operates, with the
help of some examples. After these parts, that are an overview of the instruments
needed for the solution, all the assumptions made in the problem will be stated.
With these hypotheses, the complete problem that is required to be written in
PSOPT will be presented and it will be explained how the code is build.
The aim of this chapter is to make the reader understand how the software operates
and how the solution to the problem is computed.
3.1 State Space Formulation and Optimization
Problem
The software used in this project works with the state space formulation, a
typical way of expressing a large dimension problem with high order differential
equations. Before stating the optimization problem, that is the aim of this section,
a brief review of the optimal control theory will be presented.
32
3.1.1 Theoretical Review
The following example will show how the state space formulation works. Given
a general second order differential vectorial equation
Ms(t) +Cs(t) +Ks(t) = F (t)
M , C andK are matrices, F is the matrix of external forces and s(t) is the vector
containing the physical coordinates that vary in time (in this case it could be the
position, the velocity, the angular rate). From this equation a state vector can be
derived, and it has the following form
x(t) =
s(t)
s(t)
=
x1(t)
x2(t)
The advantage of the state vector, and in general of the state space formulation, is
that the higher size problem analyzed, can be reduced to a single order differential
equation problem. The firs equation can be rewritten in terms of u(t) and stated
as follows
s(t) = −M−1Cs(t)−M−1ks(t) +M−1F (t)
Using the definition of state vector, the problem can be written asx1(t) = x2(t)
x2(t) = −M−1Cx2(t)−M−1kx1(t) +M−1F (t)
The most known state space formulation, the matrix one, is given by
x(t) = Ax(t) +Bu(t) (3.1)
where u represents the input matrix that can contain both control and disturbance
forces. Moreover
A =
[0 I
−M−1K −M−1C
]
33
B =
[0
M−1u
]Optimal control problems aim at the minimization of the cost functional, that
formulated in the following way
J = ϕ[x(t0), t0,x(tf ), tf ] +
∫ tf
t0
Λ[x(t),u(t), t] dt (3.2)
where x are the states, u the controls, ϕ the endpoint cost function and Λ the
Lagrangian cost function. The goal of the mission is to minimize the total thrust
during the maneuver in order to save the maximum amount of fuel possible: for
this reason, the endpoint cost function will be zero whereas the integrand cost
function part is expressed as follows:
Λ = uTW uuu (3.3)
Mind that vector u contains both control thrusts and torques and that the propul-
sion system is the only part that needs to be considered in the analyses. The matrix
W uu is a weighting matrix used to give more or less importance in the minimiza-
tion process to certain parameters. In this project no term has to be decreased in
importance, so the matrix W FF will be equal to an identity matrix.
3.1.2 State Space Formulation of the 6-DOF Relative Mo-
tion System
Now that the dynamic problem is completely stated and that the state space
formulation has been presented, the formulation of the 6-DOF relative motion
problem can be stated. As seen in the previous section, the first step is to define
a state vector, that in, for the case considered, is given by
x(t) =δx δy δz δvx δvy δvz δσ1 δσ2 δσ3 δω1 δω2 δω3
T(3.4)
Keeping in mind what was done in the theoretical section of the state space formu-
lation and recalling the equations of system (2.32), the formulation of the problem
34
can be written as follows
δx = δvx
δy = δvy
δz = δvz
δvx = 3Ω2δx+ 2Ωδy +A11Fx + A12Fy + A13Fz
m
δvy = −2Ωδx+A21Fx + A22Fy + A23Fz
m
δvz = −Ω2δz +A31Fx + A32Fy + A33Fz
m
δσ1 =1
2[δσ2(δω3 + 2ωt3)−δσ3(δω2 + 2ωt2)]+
1
4(1− δσ2)δω1+
1
2Aδσ1
δσ2 =1
2[δσ3(δω1 + 2ωt1)−δσ1(δω3 + 2ωt3)]+
1
4(1− δσ2)δω2+
1
2Aδσ2
δσ3 =1
2[δσ1(δω2 + 2ωt2)−δσ2(δω1 + 2ωt1)]+
1
4(1− δσ2)δω3+
1
2Aδσ3
δω1 =(Ic2−Ic3)Ic1
δω2δω3+(A11Tc1+A12Tc2+A13Tc3)
Ic1+Mapp1−Mg1−Mci1
Ic1
δω2 =(Ic3−Ic1)Ic2
δω1δω3+(A21Tc1+A22Tc2+A23Tc3)
Ic2+Mapp2−Mg2−Mci2
Ic2
δω3 =(Ic1−Ic2)Ic3
δω1δω2+(A31Tc1+A32Tc2+A33Tc3)
Ic3+Mapp3−Mg3−Mci3
Ic3
(3.5)
where
A = δωTδσ = δω1δσ1 + δω2δσ2 + δω3δσ3
The last thing that needs to be outlined is the cost function relative to the prob-
lem. As said in the previous section, the inputs of this function will only be the
thrust force. Recalling equations (3.1) and (3.2), the integrand cost function of
the problem can be written as
J =
∫ tf
0
(F 2x + F 2
y + F 2z ) dt (3.6)
where tf is the time required by the maneuver.
System (3.5) shows how the equations must be written in order to make the solver
able to retrieve a solution for the problem and equation (3.5) is the general opti-
35
mization function of the problem considered in this work. The reader has to re-
member that both the under and fully actuated case will be analyzed, and whether
it is used one ore the other, one or three components of the force vector will be
present.
In the next section it will be shown how the software works and how the code of
the system is structured.
3.2 PSOPT
As previously said in the introduction to this chapter, the software used for
the resolution of the problem is PSOPT.
PSOPT (Pseudo Spectral OPTimization) is an open source software written in
C++ aimed at the solution of optimization problems using polynomials to ap-
proximate the time dependant variables: this method is called “Direct Collocation
Method”and it is used for the discretization of differential equations that form the
problem. The discretization is carried out choosing a number of grid points that are
placed in the most relevant points of the functions by a mesh refinement method.
There are different nodes collocation methods built in the software, and they are:
Trapezoidal, Hermite-Simpson, Chebyshev and Legendre (the default one). For
the problem considered, all these four methods have been tested and the results
showed that the trapezoidal and Hermite-Simpson were the fastest converging
ones. Even if the trapezoidal has an accuracy of O(h2) whereas Hermite-Simpson
has O(h4), where h is the local distance between grid points, actual computations
outlined that, since small optimal integral function values are dealt in this work,
the difference between the results was negligible. Anyway, only the trapezoidal
one was used in all the computations because it displayed more robustness with
respect to the Hermite-Simpson for what concerns higher difficult problems.
Once the equations are discretized, a “Non Linear Programming”(NLP) program
is formulated, and it is then solved numerically using a nonlinear sparse program-
ming solver (IPOPT for PSOPOT) that carries out local optimal solution rather
than the absolute one. It is important to understand this aspect, because for such
difficult problems the absolute optimal solution can not be granted.
Apart from PSOPT, one of the most used software on the market is Matlab, which
36
solves differential equations with built-in functions called “ODE”. These systems
work with iterative methods, such as the widely used Runge-Kutta. The reason
why PSOPT rather than Matlab was used for this work must be sought in the dis-
cretization methods. The practice showed that pseudo spectral, in fact, presents
some advantages in the solution of optimization problems [40]:
• Faster rate of convergence
• Better accuracy
• Best suited for optimal control problems
The general optimal control problem in PSOPT is formulated as follows:
Find the control profiles u(t), the state profiles x(t), the static parameters p, with
t ∈ [t0, tf ], and the times t0 and tf to minimize the following cost function
J = ϕ [x(tf ), p, tf ] +
∫ tf
t0
Λ [x(t), u(t), p, t] dt
subjected to the differential equations
x(t) = f [x(t), u(t), p, t], t ∈ [t0, tf ]
the path constraints
hL ≤ h[x(t), u(t), p, t] ≤ hU , t ∈ [t0, tf ]
the event constraints
eL ≤ e [x(t0), u(t0), x(tf ), u(tf ), p, t0, tf ] ≤ eU
and the bound constraints
uL ≤ u(t) ≤ uU , t ∈ [t0, tf ]
xL ≤ x(t) ≤ xU , t ∈ [t0, tf ]
pL ≤ p ≤ pU
37
This formulation is valid for a single phase problem, that is the one considered
in this project. For a multiphase one, instead, the PSOPT manual presents the
general formulation that is similar to the one presented here.
One further clarification on how the code is implemented must be done. In the
analyses, the time is re-parametrized from t0 = 0 to tf = 1: this procedure is widely
used in mathematical problems because it increases the rate of convergence. So,
the problem is reformulated in the following way: given the general differential
equationd
dt(...) = f
the time steps used for the integration are
t0 = 0
tf = T
t = [0, ..., T ]
and the re-parametrized time vector is given by
t = [0, ..., 1]
The integration time can be rewritten as follows
t = T t
The differential of t is given by
dt = T dt
Being said that, the re-parametrized equations can be written as
d
dt(...) =
d
T dt(...) = f → d
dt(...) = T ∗ f
This is how the equations will be written in PSOPT.
Now that a general review of the software has been given, two examples will be
presented to show how the code is implemented.
38
3.2.1 Translational Example
Let’s assume that the satellite has a mass of mass m = 300 kg equipped with
thrusters able to provide the force in all the verses of the main axes xyz. The
total thrust during a maneuver of 10 minutes where the vehicle go from a point
A to a point B, with a certain initial and final velocities, needs to be optimized.
For simplicity, the forces of the body will be considered aligned with the axes of
the inertial reference frame. The maximum amount of force each thrusters can
provide is 1N .
First of all, PSOPT requires the definition of the endpoint cost function and the
integrand cost function. In this case the endpoint will be zero, whereas the inte-
grand, considering the parametrization of the time, is given by
J =
∫ 1
0
T (F 2x + F 2
y + F 2z ) dt
where
T = 600 s
In PSOPT, the code is implemented as follows:
adouble i n t e g r and co s t ( adouble ∗ s t a t e s , adouble ∗ cont ro l s ,
adouble ∗ parameters , adouble& time , adouble ∗ xad , int iphase ,
Workspace∗ workspace )
adouble Fx = con t r o l s [ CINDEX(1) ] ;
adouble Fy = con t r o l s [ CINDEX(2) ] ;
adouble Fz = con t r o l s [ CINDEX(3) ] ;
double T = 600 . 0 ;
return T∗(Fx∗Fx + Fy∗Fy + Fz∗Fz ) ;
The next step is to define the set of differential equations that describe the system
(DAEs). The satellite is moving under the Neton’s second law, with no distur-
bances for simplification. These equationsvexpressed using the state space formu-
39
lation are
x = vx
y = vy
z = vz
vx =Fxm
vy =Fym
vz =Fzm
First of all, each state and control variable is assigned to its command, then
the derivatives of the states (the differential equations) are listed. The code is
produced as follows
void dae ( adouble ∗ de r i v a t i v e s , adouble ∗ path , adouble ∗ s t a t e s ,
adouble ∗ cont ro l s , adouble ∗ parameters , adouble& time ,
adouble ∗ xad , int iphase , Workspace∗ workspace )
adouble Fx = con t r o l s [ CINDEX(1) ] ;
adouble Fy = con t r o l s [ CINDEX(2) ] ;
adouble Fz = con t r o l s [ CINDEX(3) ] ;
adouble x = s t a t e s [ CINDEX(1) ] ;
adouble y = s t a t e s [ CINDEX(2) ] ;
adouble z = s t a t e s [ CINDEX(3) ] ;
adouble vx = s t a t e s [ CINDEX(4) ] ;
adouble vy = s t a t e s [ CINDEX(5) ] ;
adouble vz = s t a t e s [ CINDEX(6) ] ;
double m = 300 . 0 ;
// //////DERIVATIVES OF THE STATES///////////
double T = 600 . 0 ;
d e r i v a t i v e s [ CINDEX(1) ] = T∗( dxdot ) ;d e r i v a t i v e s [ CINDEX(2) ] = T∗( dydot ) ;
40
d e r i v a t i v e s [ CINDEX(3) ] = T∗( dzdot ) ;d e r i v a t i v e s [ CINDEX(4) ] = T∗(Fx/m) ;
d e r i v a t i v e s [ CINDEX(5) ] = T∗(Fy/m) ;
d e r i v a t i v e s [ CINDEX(6) ] = T∗(Fz/m) ;
After that, the events (initial and final conditions) must be assigned to their com-
mand before being defined. This is a typical procedure used in C++ where a new
parameter need to be inserted in the code. Initial and final conditions are set on
all the states, whereas none on the control forces. Thus, the code is expressed as
follows
void events ( adouble ∗ e , adouble ∗ i n i t i a l s t a t e s ,
adouble ∗ f i n a l s t a t e s , adouble ∗ parameters , adouble& t0 ,
adouble& t f , adouble ∗ xad , int iphase , Workspace∗ workspace )
adouble x0 = i n i t i a l s t a t e s [ CINDEX(1) ] ;
adouble y0 = i n i t i a l s t a t e s [ CINDEX(2) ] ;
adouble z0 = i n i t i a l s t a t e s [ CINDEX(3) ] ;
adouble vx0 = i n i t i a l s t a t e s [ CINDEX(4) ] ;
adouble vy0 = i n i t i a l s t a t e s [ CINDEX(5) ] ;
adouble vz0 = i n i t i a l s t a t e s [ CINDEX(6) ] ;
adouble x f = f i n a l s t a t e s [ CINDEX(1) ] ;
adouble y f = f i n a l s t a t e s [ CINDEX(2) ] ;
adouble z f = f i n a l s t a t e s [ CINDEX(3) ] ;
adouble vxf = f i n a l s t a t e s [ CINDEX(4) ] ;
adouble vyf = f i n a l s t a t e s [ CINDEX(5) ] ;
adouble vz f = f i n a l s t a t e s [ CINDEX(6) ] ;
//INITIAL AND FINAL CONDITIONS//
e [ CINDEX(1) ] = x0 ;
e [ CINDEX(2) ] = y0 ;
e [ CINDEX(3) ] = z0 ;
e [ CINDEX(4) ] = vx0 ;
e [ CINDEX(5) ] = vy0 ;
e [ CINDEX(6) ] = vz0 ;
e [ CINDEX(7) ] = xf ;
e [ CINDEX(8) ] = yf ;
41
e [ CINDEX(9) ] = z f ;
e [ CINDEX(10) ] = vxf ;
e [ CINDEX(11) ] = vyf ;
e [ CINDEX(12) ] = vz f ;
The next part of the code contains the call to the solver and the files that need to
be generated. The relevant part of this section is the one were the information of
the system need to be defined, that are number of states (6), number of controls
(3), number of events (12), number of paths (0) and number of nodes (120). The
code is written in the following way:
problem . phases ( 1 ) . n s t a t e s = 6 ;
problem . phases ( 1 ) . n con t r o l s = 3 ;
problem . phases ( 1 ) . nevents = 12 ;
problem . phases ( 1 ) . npath = 0 ;
problem . phases ( 1 ) . nodes = ” [ 1 2 0 ] ” ;
p s op t l e v e l 2 s e t up ( problem , a lgor i thm ) ;
Subsequently the initial and final values and the upper and lower bounds of the
states and controls must be inserted. The following bounds will be considered:
−∞ ≤ x ≤ ∞
−∞ ≤ y ≤ ∞
−∞ ≤ z ≤ ∞
−∞ ≤ vx ≤ ∞
−∞ ≤ vy ≤ ∞
−∞ ≤ vz ≤ ∞
−100N ≤ Fx ≤ 100N
−100N ≤ Fy ≤ 100N
−100N ≤ Fz ≤ 100N
that means no limits are given to the values the states can assume, in order to give
less constraints to the solver and make the problem easier to solve: the physical
42
limit of the thrusters, instead, is stated. Mind that these bounds are not the typical
values for a CubeSat system, but they are valid for this example only. Table 4.2
presents the classic rates expected for a nanosatellite.
Regarding the initial conditions, considering that all the values are expressed in
km and km/s, the following parameters for point A are assumed:
x0 = 0
y0 = 0
z0 = 0
vx0 = 0.02
vy0 = 0.05
vz0 = −0.03
The final conditions for point B, instead, are
xf = 1.2
yf = 2.3
zf = 0.8
vxf = 0
vyf = 0
vzf = 0
These values are assigned to the events and to the states and controls defined above
in the code, so that the source representing these bounds is written as follows:
double x0 = 0 ;
double y0 = 0 ;
double z0 = 0 ;
double vx0 = 0 . 0 2 ;
double vy0 = 0 . 0 5 ;
double vz0 = −0.03;
double xf = 1 . 5 ;
double yf = 2 . 3 ;
double z f = 0 . 8 ;
double vxf = 0 . 0 ;
double vyf = 0 . 0 ;
double vz f = 0 . 0 ;
43
double l owe r l im i t Fx = −0.1; //LOWER AND UPPER PHYSICAL//
double upper l im i t Fx = 0 . 1 ; //LIMITS OF THE THRUSTERS x ///
double l owe r l im i t Fy = −0.1; //LOWER AND UPPER PHYSICAL//
double upper l im i t Fy = 0 . 1 ; //LIMITS OF THE THRUSTERS y///
double l owe r l im i t Fz = −0.1; //LOWER AND UPPER PHYSICAL//
double uppe r l im i t Fz = 0 . 1 ; //LIMITS OF THE THRUSTERS z ///
/////LOWER AND UPPER BOUNDARIES OF THE STATES////////
problem . phases ( 1 ) . bounds . lower . s t a t e s (1 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (2 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (3 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (4 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (5 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (6 ) = − i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (1 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (2 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (3 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (4 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (5 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (6 ) = i n f ;
/////LOWER AND UPPER BOUNDARIES OF THE CONTROLS////////
problem . phases ( 1 ) . bounds . lower . c on t r o l s (1 ) = lowe r l im i t Fx ;
problem . phases ( 1 ) . bounds . lower . c on t r o l s (2 ) = lowe r l im i t Fy ;
problem . phases ( 1 ) . bounds . lower . c on t r o l s (3 ) = l owe r l im i t Fz ;
problem . phases ( 1 ) . bounds . upper . c on t r o l s (1 ) = upper l im i t Fx ;
problem . phases ( 1 ) . bounds . upper . c on t r o l s (2 ) = upper l im i t Fy ;
problem . phases ( 1 ) . bounds . upper . c on t r o l s (3 ) = uppe r l im i t Fz ;
///BOUNDARIES ON THE INITIAL AND FINAL CONDITIONS OF THE STATES////
problem . phases ( 1 ) . bounds . lower . events (1 ) = x0 ;
problem . phases ( 1 ) . bounds . lower . events (2 ) = y0 ;
problem . phases ( 1 ) . bounds . lower . events (3 ) = z0 ;
problem . phases ( 1 ) . bounds . lower . events (4 ) = vx0 ;
44
problem . phases ( 1 ) . bounds . lower . events (5 ) = vy0 ;
problem . phases ( 1 ) . bounds . lower . events (6 ) = vz0 ;
problem . phases ( 1 ) . bounds . lower . events (7 ) = xf ;
problem . phases ( 1 ) . bounds . lower . events (8 ) = yf ;
problem . phases ( 1 ) . bounds . lower . events (9 ) = z f ;
problem . phases ( 1 ) . bounds . lower . events (10) = vxf ;
problem . phases ( 1 ) . bounds . lower . events (11) = vyf ;
problem . phases ( 1 ) . bounds . lower . events (12) = vz f ;
problem . phases ( 1 ) . bounds . upper . events (1 ) = x0 ;
problem . phases ( 1 ) . bounds . upper . events (2 ) = y0 ;
problem . phases ( 1 ) . bounds . upper . events (3 ) = z0 ;
problem . phases ( 1 ) . bounds . upper . events (4 ) = vx0 ;
problem . phases ( 1 ) . bounds . upper . events (5 ) = vy0 ;
problem . phases ( 1 ) . bounds . upper . events (6 ) = vz0 ;
problem . phases ( 1 ) . bounds . upper . events (7 ) = xf ;
problem . phases ( 1 ) . bounds . upper . events (8 ) = yf ;
problem . phases ( 1 ) . bounds . upper . events (9 ) = z f ;
problem . phases ( 1 ) . bounds . upper . events (10) = vxf ;
problem . phases ( 1 ) . bounds . upper . events (11) = vyf ;
problem . phases ( 1 ) . bounds . upper . events (12) = vz f ;
/////LOWER AND UPPER BOUNDARIES OF THE TIME////////
problem . phases ( 1 ) . bounds . lower . StartTime = 0 . 0 ;
problem . phases ( 1 ) . bounds . upper . StartTime = 0 . 0 ;
problem . phases ( 1 ) . bounds . lower . EndTime = 1 . 0 ;
problem . phases ( 1 ) . bounds . upper . EndTime = 1 . 0 ;
As can be seen from the part of code above, the forces have been inserted with
the proper unit of measure: since all the dimensions are in km, the forces need to
be considered in kN (kg km s−2). Note that also the time has been bounded. The
software could have solved the problem for whatever temporal bounds. In this
case the complete time interval has to be considered, going from 0 to 1.
Then, the guess of the states and controls must be given to the software. Typically
what is done is to give PSOPT a vector with all the values that assumes a certain
parameter. For example, for the time a vector t = [0, ..., 1] will be provided, for
the first state variable δx = [δx0, ..., 0], and so on. So, the code looks like this:
45
DMatrix s t a t e gu e s s = ze ro s ( ns tate s , nnodes ) ;
DMatrix c on t r o l g u e s s = ze ro s ( ncontro l s , nnodes ) ;
DMatrix t ime gues s = l i n s p a c e ( 0 . 0 , 1 . 0 , nnodes ) ;
s t a t e gu e s s (1 , co lon ( ) ) = l i n s p a c e ( x0 , xf , nnodes ) ;
s t a t e gu e s s (2 , co lon ( ) ) = l i n s p a c e ( y0 , yf , nnodes ) ;
s t a t e gu e s s (3 , co lon ( ) ) = l i n s p a c e ( z0 , z f , nnodes ) ;
s t a t e gu e s s (4 , co lon ( ) ) = l i n s p a c e ( vx0 , vxf , nnodes ) ;
s t a t e gu e s s (5 , co lon ( ) ) = l i n s p a c e ( vy0 , vyf , nnodes ) ;
s t a t e gu e s s (6 , co lon ( ) ) = l i n s p a c e ( vz0 , vzf , nnodes ) ;
c on t r o l g u e s s (1 , co lon ( ) ) = l i n s p a c e ( l ower l im i t Fx ,
upper l imit Fx , nnodes ) ;
c on t r o l g u e s s (2 , co lon ( ) ) = l i n s p a c e ( l ower l im i t Fy ,
upper l imit Fy , nnodes ) ;
c on t r o l g u e s s (3 , co lon ( ) ) = l i n s p a c e ( l owe r l im i t Fz ,
upper l imi t Fz , nnodes ) ;
Last, but not of least importance, the algorithm informations must be stated.
These mainly consist in the maximum number of iterations, tolerances and collo-
cation method. For this problem, the following parameters have been selected:
a lgor i thm . n lp i t e r max = 10000 ;
a lgor i thm . n l p t o l e r a n c e = 1 . e−5;a lgor i thm . nlp method = ”IPOPT” ;
a lgor i thm . s c a l i n g = ”automatic ” ;
a lgor i thm . d e r i v a t i v e s = ”automatic ” ;
a lgor i thm . co l l o ca t i on method = ” t r ap e z o i d a l ” ;
a lgor i thm . mesh ref inement = ”automatic ” ;
a lgor i thm . ode t o l e r anc e = 1 . e−5;
In this problem the values of the ODE and NLD tolerances are kept small, but
typically the one of the ODE is lower with respect to the one of the NLP because
if the software is dealing with highly non-linear equations, a strict tolerance on
the ODE would increase the rate of convergence and the number of iterations by
a lot.
The solution to this problem gives a cost function of J = 5.082347 achieved in
4.330056e seconds with a maximum relative local error of 3.189276e-06.
Figure 3.1 shows the resulting trajectory of the satellite. From this picture it is
46
not clear if the boundary conditions are satisfied, but from figure 3.2 and 3.3 it
is possible to see that the solver matched the initial and final conditions on both
position and velocity. The last one, figure 3.4, displays the resulting force profile
for each thruster needed to obtained the desired result.
Figure 3.1: Translational Example - Trajectory
47
Figure 3.2: Translational Example - Relative Position Profile
Figure 3.3: Translational Example - Relative Velocity Profiles
48
Figure 3.4: Translational Example - Thrust Profiles
3.2.2 Rotational Dynamics Example
The second example consists in the reorientation of a rigid body around its
principal axes of inertia. The total torque used by the attitude control of satellite
to rotate it needs to be minimized. The spacecraft has dimensions of 6x4x4 meters
and a mass of m = 5000 Kg: as a consequence, the inertia matrix is given by
I =
13333.33 0 0
0 21666.67 0
0 0 21666.67
Kgm2
The maximum torque that can be provided is 100 Nm and the time required for
the rotation is 60 seconds.
As in the previous section, the first step is to define the integrand cost function
(no endpoint because only the torque over the maneuvering time needs to be
49
evaluated), which in this case is given by
J =
∫ 1
0
T (T 21 + T 2
2 + T 23 ) dt
where
T = 60 s
The code responsible for the implementation of this cost function is written as
follows:
adouble i n t e g r and co s t ( adouble ∗ s t a t e s , adouble ∗ cont ro l s ,
adouble ∗ parameters , adouble& time , adouble ∗ xad , int iphase ,
Workspace∗ workspace )
adouble T1 = con t r o l s [ CINDEX(1) ] ;
adouble T2 = con t r o l s [ CINDEX(2) ] ;
adouble T3 = con t r o l s [ CINDEX(3) ] ;
double T = 60 . 0 ;
return T∗(T1∗T1 + T2∗T2 + T3∗T3 ) ;
The rotation will be described using MRP in order to prepare the reader to the
problem of this document. The states vector, for this example, is composed by
MRPs and angular velocities, both considered on the principal axes of inertia. The
time derivative of the MRPs, in the more compact matrix form, can be written as
[37]:
σ =
σ1
σ2
σ3
=1
4
(1 + σ2
1 − σ22 − σ2
3) 2(σ1σ2 − σ3) 2(σ1σ3 + σ2)
2(σ1σ2 + σ3) (1− σ21 + σ2
2 − σ23) 2(σ2σ3 − σ1)
2(σ1σ3 − σ2) 2(σ2σ3 + σ1) (1− σ21 − σ2
2 + σ23)
ω1
ω2
ω3
50
The derivatives of the angular velocities, instead, are expressed through the Euler
Equations, and are given by
ω1 =T1I1
+I2 − I3I1
ω2ω3
ω2 =T2I2
+I3 − I1I2
ω1ω3
ω3 =T3I3
+I1 − I2I3
ω1ω2
The DAE in PSOPT are generated as follows
void dae ( adouble ∗ de r i v a t i v e s , adouble ∗ path , adouble ∗ s t a t e s ,
adouble ∗ cont ro l s , adouble ∗ parameters , adouble& time ,
adouble ∗ xad , int iphase , Workspace∗ workspace )
double T = 60 . 0 ;
adouble T1 = con t r o l s [ CINDEX(1) ] ;
adouble T2 = con t r o l s [ CINDEX(2) ] ;
adouble T3 = con t r o l s [ CINDEX(3) ] ;
adouble P1 = s t a t e s [ CINDEX(1) ] ;
adouble P2 = s t a t e s [ CINDEX(2) ] ;
adouble P3 = s t a t e s [ CINDEX(3) ] ;
adouble om1 = s t a t e s [ CINDEX(4) ] ;
adouble om2 = s t a t e s [ CINDEX(5) ] ;
adouble om3 = s t a t e s [ CINDEX(6) ] ;
double I1 = 13333 . 33 ;
double I2 = 21666 . 67 ;
double I3 = 21666 . 67 ;
d e r i v a t i v e s [ CINDEX(1) ] = T∗ ( 0 . 25∗ (om1∗(1.0+P1∗P1−P2∗P2−P3∗P3)+2.0∗om2∗(P1∗P2−P3)+2.0∗om3∗(P1∗P3+P2 ) ) ) ;
d e r i v a t i v e s [ CINDEX(2) ] = T∗ ( 0 . 2 5∗ ( 2 . 0∗om1∗(P1∗P2+P3)+om2∗(1.0−P1∗P1+P2∗P2−P3∗P3)+2.0∗om3∗(P2∗P3−P1 ) ) ) ;
d e r i v a t i v e s [ CINDEX(3) ] = T∗ ( 0 . 2 5∗ ( 2 . 0∗om1∗(P1∗P3−P2)+2.0∗om2∗(P2∗P3+P1)+om3∗(1.0−P1∗P1−P2∗P2+P3∗P3 ) ) ) ;
d e r i v a t i v e s [ CINDEX(4) ] = T∗ ( ( (T1/ I1 )−(( I3−I2 )/ I1 )∗om2∗om3 ) ) ;
d e r i v a t i v e s [ CINDEX(5) ] = T∗ ( ( (T2/ I2 )−(( I1−I3 )/ I2 )∗om1∗om3 ) ) ;
51
d e r i v a t i v e s [ CINDEX(6) ] = T∗ ( ( (T3/ I3 )−(( I2−I1 )/ I3 )∗om1∗om2 ) ) ;
After the equations of the problem are stated, the boundary conditions must be
stated. The initial conditions for this problem are:
σ1(0) = 0
σ2(0) = 0
σ3(0) = 0
ω1(0) = 0.05 rad/s
ω2(0) = 0.05 rad/s
ω3(0) = 0.05 rad/s
whereas the finals are given by
φ(tf ) =π
6→ σ1(tf ) = tan
(φ
4
)θ(tf ) =
4π
3→ σ2(tf ) = tan
(θ
4
)Ψ(tf ) = −3π
4→ σ3(tf ) = tan
(Ψ
4
)ω1(tf ) = 0
ω2(tf ) = 0
ω3(tf ) = 0
These limits, together with the limits on the maximum control torque, can be
easily written in PSOPT as done in the previous example.
The results to this example give an optimal cost function value of J = 2.514952e+
05 carried out with a computational time of 3.600409 seconds and with a relative
local error of 1.646516e-05.
The resulting MRPs profiles are shown in figure 3.5, whereas the angular velocities
in 3.6. From picture 3.7 it is possible to see the torques profiles during the ma-
neuver. As can be seen, all the boundary conditions are respected and the limits
on the maximum torque available are not exceeded.
52
Figure 3.5: Rotational Example - MRP Profiles
Figure 3.6: Rotational Example - Angular Velocity Profiles
53
Figure 3.7: Rotational Example - Control Torque Profiles
3.3 Assumptions
Typically, when real life problems need to be solved on electronic machines,
some assumptions and simplifications are made. This is done because sometimes
the problem is too difficult and wide to be represented or because the computer is
not able to solve it. What is done is to try to reduce the difficult of the equations
without losing too much details that would give a solution that differs a lot from
the exact one. This has be done also during the production of this work: in this
section all the main changes and hypothesis made are presented.
The first assumption, already presented in chapter 2, is that target and chaser
satellites are on a circular orbit: from this guess, the Clohessy-Wiltshire equa-
tions, the basis for the translational dynamics, were derived.
As you could have read in the presentation of the equations, the perturbations
have been neglected. Disturbances such as third body, solar pressure and J2 effect
become of relevant importance in orbit propagation problems, where the trajec-
tory of the satellites last from several days to years. The maneuvers analyzed
will last maximum one hour, so these effects would not produce a huge effect on
the system. For what concerns the drag effect, the orbit where the spacecraft is
54
inserted is not too low to have huge effect on the body, and this effect would not
anyway be relevant for fast maneuvers.
One important aspect that has not been presented yet is the initial condition of
the chaser at the start of the maneuver. It has been assumed that the CubeSat is
inserted in a periodic bounded orbit around the central target satellite.
Figure 3.8: Bounded Motion of the Chaser Satellite
As explained by Djojodihardjo in his paper [41], the set of solutions to the CW
equations that define a family of bounded periodic trajectories of the chaser satel-
lite is given by x(t) = A0 sin(ωt+ α)
y(t) = 2A0 cos(ωt+ α) + C0
z(t) = B0 sin(ωt+ α)
where A0, B0andC0 are integration constants and α is the phase angle, all depend-
ing on the initial conditions. It can also be said that B0 = 2A0 and, for simplicity,
C0 = 0. in this way, the initial conditions on the position of the chaser satellite
are given by x0 = A0 sin(α)
y0 = 2A0 cos(α)
z0 = 2A0 sin(α)
55
Deriving the first system of equation, the velocities equations for a bounded orbit
of the chaser can be found, and they are given byx(t) = A0ω cos(ωt+ α)
y(t) = −2A0ω sin(ωt+ α)
z(t) = 2A0ω cos(ωt+ α)
that leads to the following initial conditions on the initial velocities:x0 = A0ω cos(α)
y0 = −2A0ω sin(α) = −2ωx0
z0 = 2A0ω cos(α)
In conclusion, the main assumptions made in this work are
• Circular orbit around the Earth
• No perturbations
• Periodic bounded motion of the chaser with respect to the target
In this project A0 = 0.5km, which corresponds to a maximum distance from the
target of 1 km.
3.4 Air Drag
As mentioned in section 2.2.4, air drag will be taken into account at the end of
the unperturbed simulations, in order to provide a comparison between disturbed
and undisturbed model, both for the software and the system itself. For this
reason, a model of the air drag, and how it has been included in the analysis, will
be presented.
The general equation of the drag is given by
D =1
2ρ v2 S CD (3.7)
56
where ρ is the atmosphere density, v the velocity, S the surface and CD the drag
coefficient. The density plays an important role in the drag: even if the spacecraft is
orbiting in space, there is a small amount of particles belonging to the atmosphere
that interfere with the spacecrafts. It is well known that the ISS has to adjust
regularly its orbit due to a decay caused by air drag. However, there is no direct
way to measure the air density as on the Earth, so there is the need to rely
on mathematical models. In their paper [1], Hatten and Russel improved the
robustness and smoothness of the already existing Harris-Priester atmospheric
density model. The output of their work is to provide a air density that is function
of the altitude and solar activity, with the minimum and maximum values that ρ
can assume, and it is shown in picture 3.9.
Figure 3.9: Hatten and Russel minimum and maximum density profiles [1]
For what concerns the velocity, the constant speed of the circular orbit where both
target and chaser are will be considered. As you will see from the results, in fact,
the difference in velocity between the target (that is following a perfect circular
orbit) and the chaser (that is orbiting around the target) is in the order of some
meters per second, three order of magnitude lower than the orbital velocity that
is around 7.5 kilometers per second.
Regarding the drag coefficient, the CD for a parallelepiped-shaped body depends
on the surface considered. The CubeSat considered has a front face (in the x
direction) that is squared and the lateral (y and z directions) that are rectangular,
that give the following values:
• CD Front = 1.05
• CD Lateral = 2.05
57
In order to represent the worst case scenario, the value that will be added to the
dynamics equations as perturbation corresponds to the maximum drag force that
can be generated on each surface. For the disturbance moment deriving from
air drag, the force described above will be considered as applied at the edges of
the body, generating the maximum moment possible on every axes. It has been
used this method because adding the surface as a function of time (the system is
rotating, so the face influenced by the drag is not constant) would have increased
enormously the computational effort.
58
Chapter 4
Optimal Docking Maneuvers
In this chapter the results of the optimization will be presented and discussed.
First, an overview of the hardware of the chaser CubeSat is done in order to define
the spacecraft on which the analysis are performed. Then, a quick evaluation of the
time used in the simulations is done, together with the explanation of the choices.
In order to compare the results, in fact, the different times for the under-actuated
and fully-actuated cases are kept constant for each simulation. Two different times
have been used because, as it was predictable, the under-actuated spacecraft take
much more time to perform the maneuver with respect to the fully-actuated one:
in this work the optimization of the total thrust is performed, but a reasonable
time has been considered. It could be in fact used a very large time for both cases,
reducing the total propulsion consumption, but this would have not led to real life
applications outputs with maneuvers lasting tens of days. The circular orbits on
which the target-chaser system is moving vary for each example: they go from an
altitude of 400 km up to 900 km, a range where most of LEO satellites are orbiting.
In this way, the performance of the system will be outlined in its most suitable
environment. For each altitude, all the results are presented and the resulting
orbits are displayed. Note that the reference frame where the results are plotted
is the LVLH of the target satellite, not the ECI: this means, together with the
assumption of absence of perturbations, that these results can be assumed valid
for every inclination of the circular orbit. Moreover, the target satellite has been
considered as it is performing an earth observation mission, so the only rotation he
59
is having is around its perpendicular-to-orbital-plane axis at the orbital angular
velocity, so that he is always pointing to the earth. This is the typical mission
of LEO spacecrafts: the most common are communications and science of the
earth. This means that the boundary condition on the relative angular velocities
indicate that the chaser satellite is rotating, whereas the target is performing only
its rotation; but since a relative dynamics problem is considered, this could also
represent an unstable rotating target satellite and a still chaser CubeSat at the
beginning of the maneuver.
4.1 Physical Properties of the CubeSat
Parallel to the exponential growth of the CubeSats in the last years, the market
of nanosatellites propulsion systems has developed different alternatives, the most
known of whom are:
• Hall Thrusters: thrust generated by creating and accelrating ionized gas
through magnetic and electrostatic fields.
• FEEP: Electrostatic propulsion system where a liquid metal is ionized with
an electric field and emitted at high velocities.
• Green Monopropellant Thrusters: Hydrazine (toxic) substituted with a
new propellant, AF-M315E (Hydroxylammonium Nitrate), which has higher
density and can provide a better specific impulse than hydrazine.
• ADN-Vacco System: ADN is another substitute of the hydrazine. Vacco
systems use this greener propellant: they are really reliable due to their
simple design.
The main characteristic needed for these systems are: specific impulse, maximum
thrust, weight and density of the propellant. For every satellite category, going
from CubeSats to huge spacecrafts, these numbers can vary a lot. In the following
table the data relative to nano-satellites propulsion systems is provided.
All these systems occupy one unit of a CubeSat, so the dimension of each one is
60
Thruster Isp [s] F [mN] Mass [kg] Power [W] Density [g cm-3]Hall 1500 10-80 1.2 200 0.005366
FEEP 9000 0.01-0.5 1 40 1.84-8GMT 225 50-500 1.5 20 1.84
ADN-Vacco 1000 10-100 1.8 15 1.81
Table 4.1: Thrusters Comparison
not a parameter for comparison. Looking at the power consumption, it can be seen
that the Hall system is the most demanding one, with five times or above the maxi-
mum power request of the others: since nano-satellites that have a limited amount
of power are dealt in this project, Hall thrusters are the less indicated. FEEP
has the highest specific impulse and the lowest mass, but it also has the lowest
maximum thrust: this is the drawback of this system, because if under-actuated
satellites are considered, it is not possible to rely on thrusters that provide a so
small amount of power. Any mission can be achieved with the FEEP, but with this
amount of energy the mission would take a lot of time. GMT and ADN, instead,
are very similar. They both utilize green propellant that substitute hydrazine, the
power demanding is similar, as for the mass, but the specific impulse and, mostly,
the force range are different. The higher specific impulse of the ADN could make
the choice obvious, but if consider the type of spacecraft that is the target of this
work, a wider propulsion power range (this will give more flexibility to the system)
and a save, even if small, in mass make the Green Monopropellant Thruster the
best available option.
For what concerns the attitude control, a set of reaction wheels will be respon-
sible of this aspect. Since the second aim of the mission, after the optimization
of the total thrust, is to limit the time of te maneuver, RWs need to be powerful
enough to reorient the satellite in a limited amount of time. The typical value for
the maximum torque provided by a CubeSat RW is in the order of 2 mN m, with
best performing systems that can achieve up to 20 mN m, which is the value used
in the simulations. Whether the smallest RWs needed a lot of time to reorient the
spacecraft, the biggest ones had great performances and where able to reduce the
time by an order of magnitude.
61
Table 4.2 presents all the physical properties of the chaser satellite that are
used in the simulations.
Dimensions [cm] 23x24x36Mass [kg] 24.42
Isp [s] 225Ix,Iy,Iz [kg m2] 0.1656/0.2671/0.2643
Max F [mN] 500Max T [Nm] 0.02
Table 4.2: Spacecraft Properties
4.2 Pareto Front
As said in the presentation of this chapter, the analysis will be done considering
a fixed time of maneuver for the under-actuated and fully-actuated case. In order
to decide what is the most reasonable time, the Pareto front of the cost function
value versus the maneuver time has been performed. What has been done is to
consider a maneuver with initial and final conditions equal to zero (this was done
in order to reduce the amount of time required by the simulation, that with this
method already took some days), except for the distance and the corresponding
velocity (A0 = 0.5) and to vary at each step the time (+10 s); the lowest time
was computed using PSOPT defining the endpoint cost function equal to the final
time; the reference orbit around the Earth has height 750 km, an intermediate
value that represent low earth orbits, the one dealt in this work. In Figure 4.1
the results of the iterations are displayed. As it could be expected, the lower the
time, the higher the cost function value, and vice versa. As it can bee seen from
the figures above, for lower time, the integrand cost function values do not follow
exactly the theoretical hyperbolic profile, because the solver finds it harder to solve
the problem. This is easier to seen, not only for low times, for the under-actuated
case: the presence of only one thruster, in fact, makes the system harder to be
controlled. Given these profiles, it can be seen, for the one thruster case, that the
results present a huge decrease in the cost function value until 2800 s, whereas,
62
(a) Under-Actuated (b) Fully-Actuated
Figure 4.1: Pareto Front
after that, the decay is really small and not a great difference is worth such an
increase in maneuvering time; the same can be said for 600 s in the fully actuated
case. For these reasons, the time used in the analysis are 600 seconds for the
fully-actuated case and 2800 seconds for the under-actuated.
4.3 Simulations’ Results - Unperturbed
This section is structured in the following way: for each case, the boundary
conditions are stated (these have been chosen with the aim of representing the
most various situations possible), then the results for both under-actuated and
fully actuated are shown. At the end of all the cases, a general outline of the
results is presented.
For all the next analysis some parameters have been kept constant during all the
simulations: these are are the physical properties of the controls (thrusters force
and RW torque). For the under-actuated case (left) and fully actuated (right)
63
0 ≤ Fx ≤ 500 mN
Fy = 0 mN
Fz = 0 mN
−0.02 ≤ T1 ≤ 0.02 Nm
−0.02 ≤ T2 ≤ 0.02 Nm
−0.02 ≤ T3 ≤ 0.02 Nm
−500 ≤ Fx ≤ 500 mN
−500 ≤ Fy ≤ 500 mN
−500 ≤ Fz ≤ 500 mN
−0.02 ≤ T1 ≤ 0.02 Nm
−0.02 ≤ T2 ≤ 0.02 Nm
−0.02 ≤ T3 ≤ 0.02 Nm
For the simulations, the number of nodes (120), the NLP tolerance (1e-5) the
ODE tolerance (1e-2) and the maximum number of iterations (10000) have been
kept constant. A larger number of nodes would for sure have produced a smoother
results, but due to the complexity of the problem and its differential equations the
value has not been increased. This resulted in not smooth profiles, especially for
the under-actuated where these nodes have to be distributed on a larger time span
(2800 s) with respect to the fully actuated case (600 s). Concerning the tolerances,
the ODE one is smaller than the NLP because putting a strong constraint on such
difficult equations would have required too much iterations and time. The results
shown in the picture have been produced using MATLAB because the built-in plot
software of PSOPT had problems in cutting axes and in resolution of the images.
64
4.3.1 Case 1: 400 km Circular Orbit
In this first case, the chaser and target satellites are orbiting on a 400 km circu-
lar orbit around the earth. The initial difference in the roll-pitch-yaw orientation
is -30°, 120° and 40°. The phase angle of the bounded orbit of the chaser is 0°whereas the initial relative angular velocity is 0.05 rad/s for each axis. As a recap,
all the boundary conditions of case 1 are listed in Table 4.3.
δx(0) 500 m δvx(0) 0 m/s δσ1(0) -0.1317 δω1(0) 0.05 rad/sδy(0) 0 m δvy(0) -1.1314 m/s δσ2(0) 0.5774 δω2(0) 0.05 rad/sδz(0) 1000 m δvz(0) 0 m/s δσ3(0) 0.1763 δω3(0) 0.05 rad/sδx(tf ) 0 m δvx(tf ) 0 m/s δσ1(tf ) 0 δω1(tf ) 0 rad/sδy(tf ) 0 m δvy(tf ) 0 m/s δσ1(tf ) 0 δω2(tf ) 0 rad/sδz(tf ) 0 m δvz(tf ) 0 m/s δσ1(tf ) 0 δω3(tf ) 0 rad/s
Table 4.3: Boundary Conditions Case 1
In Table 4.4 the numerical results of the simulation are presented, both for
the under-actuated and fully-actuated cases. Moreover, the average thrust force
during the maneuver has been computed and will be used later in this project
together with the other results.
Under-Actuated Fully-ActuatedtCPU [s] 37.38 31.19
J 2.650e-05 8.339e-06Favg [mN] 66.38 104
Table 4.4: Results Case 1
In the next pages the resulting orbits and profiles of states and controls for case 1
are displayed.
65
Figure 4.2: Case 1 - Orbits Underactuated
Figure 4.3: Case 1 - Orbits Fully Actuated
66
(a) Position Profiles Under-Actuated
(b) Position Profiles Fully-Actuated
Figure 4.4: Case 1 - Position
67
(a) Velocity Profiles Under-Actuated
(b) Velocity Profiles Fully-Actuated
Figure 4.5: Case 1 - Velocity
68
(a) Force Profile Under-Actuated
(b) Force Profiles Fully-Actuated
Figure 4.6: Case 1 - Force Profiles
69
4.3.2 Case 2: 500 km Circular Orbit
In this second case, the chaser and target satellites are orbiting on a 500 km
circular orbit around the earth. The initial difference in the roll-pitch-yaw orien-
tation is 60°, -20° and 200°. The phase angle of the bounded orbit of the chaser
is 0° whereas the initial relative angular velocity is 0.04 rad/s for each axis. As a
recap, all the boundary conditions of case 1 are listed in Table 4.5.
δx(0) 500 m δvx(0) 0 m/s δσ1(0) 0.2679 δω1(0) 0.04 rad/sδy(0) 0 m δvy(0) -1.1068 m/s δσ2(0) -0.0875 δω2(0) 0.04 rad/sδz(0) 1000 m δvz(0) 0 m/s δσ3(0) 1.1918 δω3(0) 0.04 rad/sδx(tf ) 0 m δvx(tf ) 0 m/s δσ1(tf ) 0 δω1(tf ) 0 rad/sδy(tf ) 0 m δvy(tf ) 0 m/s δσ1(tf ) 0 δω2(tf ) 0 rad/sδz(tf ) 0 m δvz(tf ) 0 m/s δσ1(tf ) 0 δω3(tf ) 0 rad/s
Table 4.5: Boundary Conditions Case 2
In Table 4.6 the numerical results of the simulation are presented, both for
the under-actuated and fully-actuated cases. As for the previous case, the average
force of the whole maneuver has been calculated.
Under-Actuated Fully-ActuatedtCPU [s] 72.43 20.19
J 4.099e-05 7.102e-06Favg [mN] 76.69 95.58
Table 4.6: Results Case 2
In the next pages the resulting orbits and profiles of states and controls for case 2
are displayed.
70
Figure 4.7: Case 2 - Orbits Underactuated
Figure 4.8: Case 2 - Orbits Fully Actuated
71
(a) Position Profiles Under-Actuated
(b) Position Profiles Fully-Actuated
Figure 4.9: Case 2 - Position
72
(a) Velocity Profiles Under-Actuated
(b) Velocity Profiles Fully-Actuated
Figure 4.10: Case 2 - Velocity
73
(a) Force Profile Under-Actuated
(b) Force Profiles Fully-Actuated
Figure 4.11: Case 2 - Force Profiles
74
4.3.3 Case 3: 600 km Circular Orbit
In this third case, the chaser and target satellites are orbiting on a 600 km
circular orbit around the earth. The initial difference in the roll-pitch-yaw orien-
tation is 0°, 0° and 180°. The phase angle of the bounded orbit of the chaser is 30°whereas the initial relative angular velocity is 0 rad/s for each axis. As a recap,
all the boundary conditions of case 1 are listed in Table 4.7.
δx(0) 433.01 m δvx(0) -0.2707 m/s δσ1(0) 0 δω1(0) 0 rad/sδy(0) -500 m δvy(0) -0.9379 m/s δσ2(0) 0 δω2(0) 0 rad/sδz(0) 866.02 m δvz(0) -0.5415 m/s δσ3(0) 1 δω3(0) 0 rad/sδx(tf ) 0 m δvx(tf ) 0 m/s δσ1(tf ) 0 δω1(tf ) 0 rad/sδy(tf ) 0 m δvy(tf ) 0 m/s δσ1(tf ) 0 δω2(tf ) 0 rad/sδz(tf ) 0 m δvz(tf ) 0 m/s δσ1(tf ) 0 δω3(tf ) 0 rad/s
Table 4.7: Boundary Conditions Case 3
In Table 4.8 the numerical results of the simulation are presented, both for the
under-actuated and fully-actuated cases. As for the previous cases, the average
force of the whole maneuver has been calculated.
Under-Actuated Fully-ActuatedtCPU [s] 36.54 22.89
J 1.581e-04 7.729e-06Favg [mN] 200.18 102.51
Table 4.8: Results Case 3
In the next pages the resulting orbits and profiles of states and controls for case 3
are displayed.
75
Figure 4.12: Case 3 - Orbits Underactuated
Figure 4.13: Case 3 - Orbits Fully Actuated
76
(a) Position Profiles Under-Actuated
(b) Position Profiles Fully-Actuated
Figure 4.14: Case 3 - Position
77
(a) Velocity Profiles Under-Actuated
(b) Velocity Profiles Fully-Actuated
Figure 4.15: Case 3 - Velocity
78
(a) Force Profile Under-Actuated
(b) Force Profiles Fully-Actuated
Figure 4.16: Case 3 - Force Profiles
79
4.3.4 Case 4: 700 km Circular Orbit
In this fourth case, the chaser and target satellites are orbiting on a 700 km
circular orbit around the earth. The initial difference in the roll-pitch-yaw orien-
tation is -20°, -40° and 80°. The phase angle of the bounded orbit of the chaser
is 330° whereas the initial relative angular velocity is 0.02 rad/s for x-axis, 0.03
rad/s for y-axis and 0.01 rad/s for z-axis,. As a recap, all the boundary conditions
of case 1 are listed in Table 4.9.
δx(0) 433.01 m δvx(0) 0.2651 m/s δσ1(0) -0.0875 δω1(0) 0.02 rad/sδy(0) 500 m δvy(0) -0.9182 m/s δσ2(0) -0.1763 δω2(0) 0.03 rad/sδz(0) 866.02 m δvz(0) 0.5301 m/s δσ3(0) 0.3640 δω3(0) 0.01 rad/sδx(tf ) 0 m δvx(tf ) 0 m/s δσ1(tf ) 0 δω1(tf ) 0 rad/sδy(tf ) 0 m δvy(tf ) 0 m/s δσ1(tf ) 0 δω2(tf ) 0 rad/sδz(tf ) 0 m δvz(tf ) 0 m/s δσ1(tf ) 0 δω3(tf ) 0 rad/s
Table 4.9: Boundary Conditions Case 4
In Table 4.10 the numerical results of the simulation are presented, both for the
under-actuated and fully-actuated cases. As for the previous cases, the average
force of the whole maneuver has been calculated.
Under-Actuated Fully-ActuatedtCPU [s] 37.87 24.48
J 1.111e-05 5.635e-06Favg [mN] 48.77 85.35
Table 4.10: Results Case 4
In the next pages the resulting orbits and profiles of states and controls for case 4
are displayed.
80
Figure 4.17: Case 4 - Orbits Under-Actuated
Figure 4.18: Case 4 - Orbits Fully-Actuated
81
(a) Position Profiles Under-Actuated
(b) Position Profiles Fully-Actuated
Figure 4.19: Case 4 - Position
82
(a) Velocity Profiles Under-Actuated
(b) Velocity Profiles Fully-Actuated
Figure 4.20: Case 4 - Velocity
83
(a) Force Profile Under-Actuated
(b) Force Profiles Fully-Actuated
Figure 4.21: Case 4 - Force Profiles
84
4.3.5 Case 5: 800 km Circular Orbit
In this fourth case, the chaser and target satellites are orbiting on a 800 km
circular orbit around the earth. The initial difference in the roll-pitch-yaw orien-
tation is 50°, 230° and 130°. The phase angle of the bounded orbit of the chaser
is 10° whereas the initial relative angular velocity is 0.05 rad/s for each axis. As a
recap, all the boundary conditions of case 1 are listed in Table 4.11.
δx(0) 492.4 m δvx(0) -0.09 m/s δσ1(0) 0.2217 δω1(0) 0.05 rad/sδy(0) -173.65 m δvy(0) -1.0224 m/s δσ2(0) 1.5697 δω2(0) 0.05 rad/sδz(0) 984.81 m δvz(0) -0.1803 m/s δσ3(0) 0.6371 δω3(0) 0.05 rad/sδx(tf ) 0 m δvx(tf ) 0 m/s δσ1(tf ) 0 δω1(tf ) 0 rad/sδy(tf ) 0 m δvy(tf ) 0 m/s δσ1(tf ) 0 δω2(tf ) 0 rad/sδz(tf ) 0 m δvz(tf ) 0 m/s δσ1(tf ) 0 δω3(tf ) 0 rad/s
Table 4.11: Boundary Conditions Case 5
In Table 4.12 the numerical results of the simulation are presented, both for the
under-actuated and fully-actuated cases. As for the previous cases, the average
force of the whole maneuver has been calculated.
Under-Actuated Fully-ActuatedtCPU [s] 67.04 37.15
J 6.754e-05 7.756e-06Favg [mN] 89.7 99.79
Table 4.12: Results Case 5
In the next pages the resulting orbits and profiles of states and controls for case 5
are displayed.
85
Figure 4.22: Case 5 - Orbits Underactuated
Figure 4.23: Case 5 - Orbits Fully Actuated
86
(a) Position Profiles Under-Actuated
(b) Position Profiles Fully-Actuated
Figure 4.24: Case 5 - Position
87
(a) Velocity Profiles Under-Actuated
(b) Velocity Profiles Fully-Actuated
Figure 4.25: Case 5 - Velocity
88
(a) Force Profile Under-Actuated
(b) Force Profiles Fully-Actuated
Figure 4.26: Case 5 - Force Profiles
89
4.3.6 Case 6: 900 km Circular Orbit
In this fourth case, the chaser and target satellites are orbiting on a 900 km
circular orbit around the earth. The initial difference in the roll-pitch-yaw orien-
tation is 190°, 10° and 30°. The phase angle of the bounded orbit of the chaser is
230° whereas the initial relative angular velocity is 0.05 rad/s for each axis. As a
recap, all the boundary conditions of case 1 are listed in Table 4.13.
δx(0) -321.39 m δvx(0) 0.389 m/s δσ1(0) 1.0913 δω1(0) 0.05 rad/sδy(0) 766.04 m δvy(0) 0.654 m/s δσ2(0) 0.0437 δω2(0) 0.05 rad/sδz(0) 642.79 m δvz(0) 0.779 m/s δσ3(0) 0.1317 δω3(0) 0.05 rad/sδx(tf ) 0 m δvx(tf ) 0 m/s δσ1(tf ) 0 δω1(tf ) 0 rad/sδy(tf ) 0 m δvy(tf ) 0 m/s δσ1(tf ) 0 δω2(tf ) 0 rad/sδz(tf ) 0 m δvz(tf ) 0 m/s δσ1(tf ) 0 δω3(tf ) 0 rad/s
Table 4.13: Boundary Conditions Case 6
In Table 4.14 the numerical results of the simulation are presented, both for the
under-actuated and fully-actuated cases. As for the previous cases, the average
force of the whole maneuver has been calculated.
Under-Actuated Fully-ActuatedtCPU [s] 31.86 20.19
J 9.814e-06 8.625e-06Favg [mN] 42.88 106.34
Table 4.14: Results Case 6
In the next pages the resulting orbits and profiles of states and controls for case 6
are displayed.
90
Figure 4.27: Case 6 - Orbits Underactuated
Figure 4.28: Case 6 - Orbits Fully Actuated
91
(a) Position Profiles Under-Actuated
(b) Position Profiles Fully-Actuated
Figure 4.29: Case 6 - Position
92
(a) Velocity Profiles Under-Actuated
(b) Velocity Profiles Fully-Actuated
Figure 4.30: Case 6 - Velocity
93
(a) Force Profile Under-Actuated
(b) Force Profiles Fully-Actuated
Figure 4.31: Case 6 - Force Profiles
94
4.4 Unperturbed Results’ Output
Altitude [km]Under-Actuated Fully-Actuated
tCPU [s] J Favg [mN] tCPU [s] J Favg [mN]
400 37.38 2.650e-05 66.38 31.19 8.339e-06 104
500 72.43 4.099e-05 76.69 20.19 7.102e-06 95.58
600 36.54 1.581e-04 200.18 22.89 7.729e-06 102.51
700 37.87 1.111e-05 48.77 24.48 5.635e-06 85.35
800 67.04 6.754e-05 89.7 37.15 7.756e-06 99.79
900 31.86 9.814e-06 42.88 20.19 8.625e-06 106.34
Average 47.19 5.234e-05 87.43 26.02 7.531e-06 98.93
Table 4.15: Unperturbed Resulsts’ Summary
From the results obtained, summarized in Table 4.15, it is possible to outline
the general behavior of the CubeSat during these missions. As can be seen from
all the resulting orbits, it is clear that for the fully-actuated cases the resulting
trajectory is more straight with respect to the under-actuated, due to the 3-axis
thrusters that can provide more control on all the directions. The single-thruster
CubeSat has a more rounded orbit, mostly due to the initial spiral velocity of the
bounded orbit around the target: this initial velocity, in fact, is difficult to control
having only a thruster in one direction and for this reason the path to the target
results to be longer.
It can can be noticed that the resulting cost functions have similar values (same
order of magnitude or one of difference) and do not change a lot on the different
orbits; the fact that the under-actuated cost function is always higher than the
fully-actuated one is caused by the choice of the maneuver time done in the “Pareto
Front”section, where comparable cost results but with different time were wanted.
For what concerns the average force during the maneuvers, the results outlined a
similar behavior for all the altitudes and for all the various initial condition, with
a small fluctuations of the values. Whereas the cost function is smaller for the
fully-actuated spacecraft, the average force is smaller for the under-actuated: this
outline that a saving in time and a more controllable system do not correspond to
95
a saving in the propulsion power. The six thrusters of the fully-actuated system
works at a lower average force values with respect to the one thruster CubeSat,
but combined all together they generate a higher amount of power.
The most power demanding maneuver, both for under-actuated and fully-actuated
case corresponds to case 3: in this simulation, in fact, the most difficult situation
for the chaser has been depicted, that at the beginning is oriented in the opposite
direction with respect to the target and has no initial angular velocity that could
have been used to easily re-orient the CubeSat.
What is important to extract from these results is the amount of fuel consumed for
each maneuver. As said before, Green Monopropellant Thrusters, that work with
AF-M315E (Hydroxylammonium Nitrate), which has a density of % = 1.84 g/cm3,
are considered. Being said that the results do not vary a lot in the simulations, an
average value of the forces for both the under and fully-actuated cases across the
LEO altitudes can be extracted, which are:
• Under-Actuated: F undavg = 87.43 mN
• Fully-Actuated: F fulavg = 98.93 mN
The specific impulse of the thruster is 225. From the definition of the specific
impulse
Isp =F
m g0
it is possible to retrieve the mass flux of the propellant, which is
• Under-Actuated: mund = 3.961e-5 kg/s
• Fully-Actuated: mful = 4.482e-5 kg/s
From the mass flux, given time and density of the propellant, it is straight forward
to retrieve the volume of fuel consumed for a single maneuver. This is given by
• Under-Actuated: Vund = 60.27 cm3
• Fully-Actuated: Vful = 14.61 cm3
So, even if the under-actuated satellites require less propulsion power, the higher
time for the maneuver cause an increase of fuel consumption with respect to the
96
fully-actuated one. As said previously in this project, the fully-actuated case was
used as a comparison and it is a more feasible systems on bigger spacecrafts, not
on CubeSats that have a limited amount of space.
The unit of a CubeSat has dimensions of 10× 10× 10 cm typically, equivalent to
a volume of 1000 cm3. If it is assumed, for the under-actuated case, that one unit
of a CubeSat is occupied by a tank of fuel, it could perform approximately 16 of
these maneuvers, whereas an hypothetical fully-actuated satellite could achieve 68
maneuvers with only one unit of fuel. The results, summarized in Table 4.16, show
an higher thrust rate for the fully-actuated case, but the time of the maneuver plays
a big role in the consumption: the one-thruster spacecraft, in fact, takes more than
four times the time taken by the six-thruster satellite to complete the mission.
Under-Actuated Fully-Actuated
Favg [mN] 87.43 98.93
Vman [cm3] 60.27 14.61
mman [g] 110.89 26.88
Maneuvers* 16 68
* Number of maneuvers fo 1U (1000 cm3) of CubeSat
dedicated to the fuel.
Table 4.16: Unperturbed Resulsts’ Summary - Maneuvers
97
4.5 Air Drag Effects
In this section, the effects caused by air drag (presented in section 3.4) will
be displayed for the simulations performed in the previous section of the under-
actuated case only. The only difference with those computations is the addition
of the translational and rotational disturbance due to the presence of atmospheric
particles.
4.5.1 Comparison 1: 400 km Circular Orbit
Unperturbed PerturbedtCPU [s] 37.38 23.07
J 2.650e-05 3.488e-04Favg [mN] 66.38 339.71
Table 4.17: Comparison Case 1
As can be seen from the resulting graphs below and from the results in the
table above, the problem regarding absolute and local optimal solution, outlined
in Section 3.2, emerges. Even if the atmospheric density is really low, this change
in the dynamics of the problem is big enough to make the software diverge from
the local solution found for the unperturbed case, leading to a completely different
result that do not represent the real behavior of the system affected by air drag.
This could also be understood by the fact that the computational time used by
the perturbed case is much lower than the unperturbed case: typically, in fact,
the opposite happens, because some terms are inserted in the already complicated
system of equations. Moreover, the average thrust used during the maneuver
present a huge difference that could no be addressed only to the air drag.
This drastic change in the results is not caused by a wrong choice of tolerances:
they have been in fact tested for multiple values, without any change in the results.
98
Figure 4.32: Case 1 - Relative Orbits Comparison
Figure 4.33: Case 1 - Relative Distances Comparison
99
4.5.2 Comparison 2: 500 km Circular Orbit
Unperturbed PerturbedtCPU [s] 72.43 52.59
J 4.099e-05 1.696e-05Favg [mN] 76.69 58.11
Table 4.18: Comparison Case 2
The same problem presented in the Comparison 1 seems to happen for case 2,
but this visible difference in the results could not be addressed to either a software
different local minimum or a direct effect of air drag.The local optimal solution
computed by the software is much closer to the unperturbed case with respect
to case 1. This is determined by the decrease of the atmospheric density due to
the increase of the altitude, and, subsequently, in the reduction of the disturbance
forces acting on the system. In this case, it seems like the drag is helping the
chaser to close the docking maneuver on the target. The reader has to remember
that the under-actuated CubeSat performs, in all the cases, a spiral-like maneuver
to dock to the target. This trajectory is forced by the initial bounded orbit that
the chaser has around the reference satellite, and it is hard for it to reduce it due
to the presence of one thruster only. The drag, in this case, could have helped the
CubeSat to reduce the amplitude of the spiral in absence of thrusters on the other
axes. In conclusion, there is no possibility to know if this result is close to the
real-life behavior or if it is caused by the choice of a different local optimization
point.
100
Figure 4.34: Case 2 - Relative Orbits Comparison
Figure 4.35: Case 2 - Relative Distances Comparison
101
4.5.3 Comparison 3: 600 km Circular Orbit
Unperturbed PerturbedtCPU [s] 36.54 49.53
J 1.581e-04 1.796e-04Favg [mN] 200.18 217.7
Table 4.19: Comparison Case 3
Looking at Figure 4.36 it could seem that the same problem of Comparison 2
is outlined. Figure 4.37, instead, shows that the differences are not as explicit as
in the previous section, where it peaked with variations of 500 meters. Differently
from Comparison 2, now the CubeSat on the perturbed case needs more propulsive
power to perform the maneuver.
Figure 4.36: Case 3 - Relative Orbits Comparison
102
Figure 4.37: Case 3 - Relative Distances Comparison
4.5.4 Comparison 4: 700 km Circular Orbit
Unperturbed PerturbedtCPU [s] 37.87 62.12
J 1.111e-05 1.076e-05Favg [mN] 48.77 44.82
Table 4.20: Comparison Case 4
At this altitude, the atmosphere is thinner and, consequently, the drag effects
are lower. As can be seen from the results, in fact, the orbits tend to coincide and
the numerical results of the propulsive power are more similar. As in Comparison
2, the drag seems to help the reduction of the spiral amplitude for the docking
maneuver.
103
Figure 4.38: Case 4 - Relative Orbits Comparison
Figure 4.39: Case 4 - Relative Distances Comparison
104
4.5.5 Comparison 5: 800 km Circular Orbit
Unperturbed PerturbedtCPU [s] 67.04 82.46
J 6.754e-05 6.319e-05Favg [mN] 89.71 86.29
Table 4.21: Comparison Case 5
The presence of particles at 800 kilometers is almost naught, and this aspect is
reflected in the results presented in Figure 4.40 and 4.41. Now the orbits almost
coincide and the average thrust is practically the same of the unperturbed case.
Figure 4.40: Case 5 - Relative Orbits Comparison
105
Figure 4.41: Case 5 - Relative Distances Comparison
4.5.6 Comparison 6: 900 km Circular Orbit
Unperturbed PerturbedtCPU [s] 31.86 37.62
J 9.814e-06 9.593e-06Favg [mN] 42.88 42.99
Table 4.22: Comparison Case 6
The same of Comparison 5 can be said for Case 6 at 900 kilometers.Here the
particles are even more rarefied, and almost no difference can be seen between the
perturbed and unperturbed case.
106
Figure 4.42: Case 6 - Relative Orbits Comparison
Figure 4.43: Case 6 - Relative Distances Comparison
107
4.6 Perturbed Results Analysis
Altitude [km]Unperturbed Perturbed
tCPU [s] J Favg [mN] tCPU [s] J Favg [mN]
400 37.38 2.650e-05 66.38 23.07 3.488e-04 339.71
500 72.43 4.099e-05 76.69 52.59 1.696e-05 58.11
600 36.54 1.581e-04 200.18 49.53 1.796e-04 217.7
700 37.87 1.111e-05 48.77 62.12 1.076e-05 44.82
800 67.04 6.754e-05 89.7 82.46 6.319e-05 86.29
900 31.86 9.814e-06 42.88 37.62 9.593e-06 42.99
Average 47.19 5.234e-05 87.43 56.86* 5.602e-05 * 89.98*
* 400 km not considered because the software provided a non-comparable result.
Table 4.23: Air Drag Resulsts’ Summary for Under-Actuated Configuration
As it could be expected, the influence of air drag decreases as the altitude in-
creases. However, this could not be said for sure for the lower case considered (400
and 500 kilometers), because probably the software played a big role in changing
drastically the results. So, if it is possible to say that air drag is negligible for al-
titudes higher than 600 kilometers, this could not be said for the inferior, because
it is not possible to know if the software considered the same local minima for
both computations. Apart from Case 1, where no valid data can be extracted for
the perturbed case, in all the other situations air drag can be neglected without
any huge loss in the meaning of the results, as can be seen from the summary
of the results in Table 4.23, where the average force used in a perturbed LEO
environment differs of only 2 mN with respect to the unperturbed case. The com-
putational time, as it could be expected, is higher for the perturbed case, since
the disturbance terms have been added to the system’s equations.
It could also be noticed that, depending on the initial conditions, the drag either
helps or obstruct the chaser to reach the target. This translates in a decrease or
increase, respectively, of the total thrust power.
It has to be remembered that these computations are done for the worst case sce-
nario. The variation of the disturbance forces and moments was not a function of
108
the actual attitude of the spacecraft (that would have been the best representation
of the real-life behavior) because it would have complicated too much the problem,
with the software not being able of solving the cases.
109
Chapter 5
Conclusion
The main goal of this project was to optimize the total thrust, and, conse-
quently, the fuel consumption, of a 12U under-actuated CubeSat during a docking
maneuver with a spinning body orbiting around the Earth. This was carried out
using a pseudospectral optimal control method, which use polynomials to approx-
imate the differential equations and the cost function. What was shown in the
examples was the starting point of the project: the first step was to evaluate the
simplest problem possible (simple translational dynamics using the second law
of dynamics and reorientation of a rigid body using Euler equations).Then, the
complexity was increased incrementally, first by coupling the translational and
rotational parts and, after that, adding the relative dynamics. The results have
outlined that the controlled under-actuated CubeSat is able to perform docking
maneuvers in a limited amount of time and with a relevant saving in fuel. Typi-
cally the docking process takes a lot of time: the Space Shuttle, for example, took
around 40 minutes to dock when it was 150 meters far from the target, that is
approximately the same time needed by the Soyuz to dock with the ISS. Moreover,
the fuel needed to perform a single docking maneuver is around 150 kilograms for
the Soyuz module. These values are reasonable if the dimensions of the space-
crafts are taken into account: a maximum accuracy, in fact, is needed, because
even a small error can seriously damage the chaser and the target. From a great
accuracy derives a higher time for the maneuver, and, consequently, a greater fuel
consumption. Moreover, the mass of these spacecrafts requires a huge amount of
110
control power to perform the maneuvers, and this coincide with an increase in the
fuel consumption. This problems do not affect CubeSat systems. With their small
dimensions, in fact, they are easier to control and the required time and fuel drop
significantly, with maneuvers lasting around 40 minutes with 110 grams of fuel
consumed per maneuver for an under-actuated CubeSat 1 kilometer away from
the target. For a fully-actuated nanosatellite, time and fuel consumption further
reduce because the system is easier to control, with 10 minutes and 26.8 grams of
fuel burned per maneuver.
From the analyses performed, it can be seen how the fully actuated system is more
efficient with respect to the under-actuated, being easier to control. Tables 4.15
and 4.16 show that, even with a similar force profile during the maneuver, the
fully-actuated provides a huge saving in mass of fuel. Moreover, always for the
easiness of control of the system, the CPU time is lower, being the computational
time of the under-actuated case, however, relatively small. If we consider only the
under-actuated case, which is the most important for CubeSats applications, the
system can perform 16 maneuvers in LEO for each unit of CubeSat dedicated to
the fuel, that correspond to 1.84 kilograms of fuel, almost 10 of the total mass
of the spacecraft. Comparing the unperturbed with the perturbed environment,
it is clear that there is not a huge difference in the results, as it could be expected
being the maneuvers limited in time. The CubeSats, in fact, has a force profile
that is only 2 mN higher with respect to the unperturbed case. Moreover, the
resulting orbits are very similar, except for Case 1 where the software appeared to
have found a different local minimum. This can lead to neglecting air drag per-
turbation, as it was done in the first analyses: it in fact will not affect the general
results of multiple simulations.
5.1 Applications
This project was focused on CubeSats because they can represent a cheaper
solution for actual problems. The field of application of this work is very wide: it
is possible to think of CubeSats that docks to space debris, whether of compara-
ble dimensions or larger. The NASA Orbital Debris Quarterly News of July 2010
estimated 14 000 debris with dimensions greater than 10 cm in LEO, which also
111
includes dead satellites, rocket bodies or payloads. With a CubeSat it would be
possible to dock to these bodies and de-orbit them with their propulsion system.
This could take a lot or less time, depending on the dimensions of the target body.
Another application could be the re-fueling of in-orbit satellites that have to per-
form interplanetary missions or simply that need fuel to end their mission or for
other purposes. If it is considered that two units would be dedicated to the propul-
sion system and the fuel tank, two to the reaction wheels and two to the electronic
and power system, the CubeSat would have 6 liters of remaining space where to
store the target fuel.
These are the main operations that can be done after this study, but of course
there are a lot of applications for space missions.
5.2 Future Works
This is only the first step of a very wide area of work. The main aspect that
can be noticed in this work is that, at this stage, the state of the target must
be known a priori. Once it is known, the optimal maneuver can be computed on
Earth and upload to the on-board system of the CubeSat with a passage on the
ground station or the states can be uploaded from ground to the nanosatellite,
that will perform the computations needed for the maneuver. Thus, the next step
to improve this study and to create a system that is able to provide a real time
attitude estimation of the target would be the tracking of the target body and
the determination of its attitude and position. Scanning Laser Radar [42] allows
the attitude determination of a non-cooperative target and its line-of-sight range
thanks to a laser with a field of view of 30° × 30° and a range of approximately
55 kilometers. Once the attitude and position of the target is determined by
the chaser, the translational and angular velocities can be determined thanks to
multiple measurements, knowing the attitude and position of the chaser. When
the initial conditions are known, the algorithm, already uploaded on the on-board
system of the CubeSat, could perform the computations needed to provide the
thrust and torque profiles of the control systems to perform the optimal docking
maneuver.
Since a docking problem is considered, one work could be focused on the berthing
112
mechanism, in particular how to attach to the target body and the design of
a universal interface for CubeSats and targets, whether re-fueling system, data
exchange or simple physical docking are evaluated.
The simulations performed during this work, as explained in the previous chapter,
used a limited amount of nodes due to the limited computational power of the
machine used: for the same reason, and also because they could be neglected
without any big difference in the results, perturbations were not included in the
dynamics equations. These analysis could be done on very powerful machines
that could provide better results. Note that these results are not far from the
real behavior of the system: they differ because the method used for solving the
equations approximate them using polynomials but the suggestion is to provide
better results and, with a more powerful systems, more simulations from where
significant data could be extracted.
Moreover, only the circular case have been considered in this work, and typically
a lot of satellites have elliptic orbits. That is why the next work could be the
extension of this algorithm to the elliptical case. This will involve a change in the
Clohessy-Wiltshire equations that, as used in this thesis, were based on circular
trajectories.
The quality of the results can be further increased with a better model of air drag,
that takes into account the attitude of the spacecraft. This will translate in a drag
force/torque that will be a function of the time and attitude, increasing by a lot
the computational effort.
As could be seen from the results, Case 1 of the under-actuated case, perturbed
environment, presented a strange behavior. It has to be remembered, in fact, that
the software doe not grant that the solution we have found is the absolute optimal,
but more likely it is a local minimum. For the 400 kilometers case, the presence of
the perturbation, even if small, seems to drive the software to a different minimum
with respect to the one of the unperturbed case, generating a completely different
solution. Thus, this work can be improved with the use of different softwares, in
order to provide more results and compare them to see what the global optimal
solution could be.
113
Bibliography
[1] N. Hatten and R. P. Russell, “A smooth and robust harris-priester atmo-
spheric density model for low earth orbit applications,” Advances in Space
Research, vol. 59, no. 2, pp. 571–586, 2017.
[2] ESA, “What is envisat?” https://earth.esa.int/web/guest/missions/
esa-operational-eo-missions/envisat, 2016.
[3] A. Poghosyan and A. Golkar, “Cubesat evolution: Analyzing cubesat capabil-
ities for conducting science missions,” Progress in Aerospace Sciences, vol. 88,
pp. 59–83, 2017.
[4] P. Dubock, F. Spoto, J. Simpson, D. Spencer, E. Schutte, and H. Sontag,
“The envisat satellite and its integration,” ESA bulletin, vol. 106, pp. 26–45,
2001.
[5] J. Bouwmeester and J. Guo, “Survey of worldwide pico-and nanosatellite
missions, distributions and subsystem technology,” Acta Astronautica, vol. 67,
no. 7-8, pp. 854–862, 2010.
[6] J. Puig-Suari, C. Turner, and R. Twiggs, “Cubesat: The development and
launch support infrastructure for eighteen different satellite customers on one
launch,” 2001.
[7] S. Lee, A. Mehrparvar, D. Pignatelli, J. Carnahan, R. Munakata, W. Lan,
A. Toorian, and A. Hutputanasin, “Cubesat design specification rev. 13 the
cubesat program, cal poly slo,” 2014.
[8] M. Aherne, T. Barrett, L. Hoag, E. Teegarden, and R. Ramadas, “Aeneas–
colony i meets three-axis pointing,” 2011.
i
[9] NASA, “Firefly: An nsf cubesat project,” http://firefly.gsfc.nasa.gov/index.
html, 2016.
[10] C. Sondecker IV, C. La Tour, L. Abramowitz et al., “Sense: The usaf smc/xr
nanosatellite program for space environmental monitoring,” 2013.
[11] M. Bertino and B. Cooper, “Perseus-m on-orbit report and corvus-bc satellite
design, in: 12th annual cubesat developers workshop.” San Luis Obispo, CA,
2015.
[12] R. Liu, H. Chen, Y. Liu, X. Yu, and J. Zhou, “A constrained attitude control
method for aoxiang-sat.” 6th European CubeSat Symposium, Estavayer-le-
Lac, Switzerland, 2014.
[13] B. Blackwell and J. Pereira, “New small satellite capabilities for microwave
atmoshperic remote sensing: The earth observing nanosatellite-microwave,”
2015.
[14] J. Dankanich, H. Kamhawi, M. W. Selby, and L. Byrne, “The iodine satel-
lite (isat) project development through critical design review (cdr),” in 52nd
AIAA/SAE/ASEE Joint Propulsion Conference, 2016, p. 4540.
[15] NASA, “Lunar flashlight,” http://www.jpl.nasa.gov/cubesat/missions/lunar
flashlight.php, 2016.
[16] K. Hambleton, K. Henry, and T. McMahan, “International part-
ners provide science satellites for americas space launch sys-
tem maiden flight,” https://www.nasa.gov/exploration/systems/sls/
international-partners-provide-cubesats-for-slsmaiden-flight, 2016.
[17] K. Antonini, M. Langer, A. Farid, and U. Walter, “Sweet cubesat–water de-
tection and water quality monitoring for the 21st century,” Acta Astronautica,
vol. 140, pp. 10–17, 2017.
[18] C. Underwood, S. Pellegrino, V. J. Lappas, C. P. Bridges, and J. Baker,
“Using cubesat/micro-satellite technology to demonstrate the autonomous
assembly of a reconfigurable space telescope (aarest),” Acta Astronautica,
vol. 114, pp. 112–122, 2015.
ii
[19] S. Flagg, T. Bleier, C. Dunson, J. Doering, L. DeMartini, P. Clarke,
L. Franklin, J. Seelbach, J. Flagg, M. Klenk et al., “Using nanosats as a proof
of concept for space science missions: Quakesat as an operational example,”
2004.
[20] K. Sarda, C. Grant, S. Eagleson, D. Kekez, and R. Zee, “Canadian advanced
nanospace experiment 2: On-orbit experiences with a three-kilogram satel-
lite,” 2008.
[21] JAXA, “Omotenashi cubesat jaxa,” http://www.isas.jaxa.jp/home/
omotenashi/index.html, 2017.
[22] “Omotenashi (outstanding moon exploration technologies demonstrated by
nano semi-hard impactor),” http://space.skyrocket.de/doc sdat/omotenashi.
htm, 2017.
[23] NASA, “Nasa selects lockheed martins skyfire cubesat for
em-1 secondary payload,” https://www.nasa.gov/feature/
nasa-selects-lockheed-martin-s-skyfire-cubesat-for-em-1-secondary-payload,
2018.
[24] D. Osterman, S. Collins, J. Ferguson, W. Good, T. Kampe, R. Rohrschneider,
and R. Warden, “Ciris: Compact infrared radiometer in space,” in CubeSats
and NanoSats for Remote Sensing, vol. 9978. International Society for Optics
and Photonics, 2016, p. 99780E.
[25] A. T. Klesh, J. D. Baker, J. Bellardo, J. Castillo-Rogez, J. Cutler, L. Ha-
latek, E. G. Lightsey, N. Murphy, and C. Raymond, “Inspire: Interplanetary
nanospacecraft pathfinder in relevant environment,” in AIAA SPACE 2013
Conference and Exposition, 2013, p. 5323.
[26] JPL and NASA, “Mars cube one (marco),” https://www.jpl.nasa.gov/
cubesat/missions/marco.php, 2018.
[27] “Equuleus (equilibrium lunar-earth point 6u spacecraft),” http://space.
skyrocket.de/doc sdat/equuleus.htm, 2018.
iii
[28] NASA, “Near-earth asteroid scout,” https://www.nasa.gov/content/
nea-scout, 2018.
[29] “Lunar ice cube,” https://www.nasa.gov/launching-science-and-technology/
multimedia/lunar-icecube.html, 2018.
[30] BluecanyonTech, “Blue canyon technologies, precise 3-axis stellar attitude de-
termination in a micro-package,” http://bluecanyontech.com/portfolio-posts/
attitude-controlsystems/, 2016.
[31] M. Ciarcia and M. Romano, “Spacecraft proximity maneuver guidance based
on inverse dynamic and sequential gradient-restoration algorithm,” 2012.
[32] M. Ciarcia and M. Romano, “Suboptimal guidance for orbital proximity ma-
neuver with path constraints capability,” in AIAA Guidance, Navigation, and
Control Conference, 2012, p. 4920.
[33] M. Ciarcia, A. Grompone, and M. Romano, “A near-optimal guidance for
cooperative docking maneuvers,” Acta Astronautica, vol. 102, pp. 367–377,
2014.
[34] J. Hall and M. Romano, “Robotic testbed for the experimentation of guidance
and control of spacecraft during proximity maneuvers, mechatronic systems,
in-tech, vienna, austria,” ISBN 978-953-7619-46-6, Tech. Rep.
[35] A. Caubet and J. D. Biggs, “An efficient sub-optimal motion planning method
for attitude manoeuvres,” in Astrodynamics Network AstroNet-II. Springer,
2016, pp. 17–34.
[36] J. L. Crassidis and F. L. Markley, “Attitude estimation using modified ro-
drigues parameters,” 1996.
[37] H. Schaub and J. L. Junkins, “Stereographic orientation parameters for atti-
tude dynamics: A generalization of the rodrigues parameters,” Journal of the
Astronautical Sciences, vol. 44, no. 1, pp. 1–19, 1996.
iv
[38] A. B. Younes, D. Mortari, J. D. Turner, and J. L. Junkins, “Attitude error
kinematics,” Journal of Guidance, Control, and Dynamics, vol. 37, no. 1, pp.
330–336, 2013.
[39] M. Massari and M. Zamaro, “Application of sdre technique to orbital and
attitude control of spacecraft formation flying,” Acta Astronautica, vol. 94,
no. 1, pp. 409–420, 2014.
[40] V. M. Becerra, “Psopt optimal control solver user manual,” University of
Reading, 2010.
[41] H. Djojodihardjo, “Influence of the earth’s dominant oblateness parameter on
the low formation orbits of micro-satellites,” International Journal of Auto-
motive and Mechanical Engineering, vol. 9, p. 1802, 2014.
[42] T. Flom and D. Coombes, “Multiple target tracking and target attitude deter-
mination with a scanning laser radar,” Navigation, vol. 21, no. 4, pp. 298–309.
v
Appendix A
The code used in this work is provided down below for anyone who may need
it. The notation ????? must be substituted with the user’s values.
#include ”psopt . h”
// ////////////////////////////////////////////////////////////////
// ///////// Define the end p o i n t ( Mayer ) c o s t f u n c t i o n //////////
// ////////////////////////////////////////////////////////////////
adouble endpo in t co s t ( adouble ∗ i n i t i a l s t a t e s , adouble ∗ f i n a l s t a t e s ,
adouble ∗ parameters , adouble& t0 , adouble& t f ,
adouble ∗ xad , int iphase , Workspace∗ workspace )
return 0 . 0 ;
// //////////////////////////////////////////////////////////////
// /////// Define the i n te gran d ( Lagrange ) c o s t f u n c t i o n //////
// //////////////////////////////////////////////////////////////
adouble i n t e g r and co s t ( adouble ∗ s t a t e s , adouble ∗ cont ro l s ,
adouble ∗ parameters , adouble& time , adouble ∗ xad , int iphase ,
Workspace∗ workspace )
adouble Fx = con t r o l s [ CINDEX(1) ] ; ///CONTROL THRUST///////
adouble Fy = con t r o l s [ CINDEX(2) ] ; ///CONTROL THRUST///////
adouble Fz = con t r o l s [ CINDEX(3) ] ; ///CONTROL THRUST///////
double T = ????? ;
vi
return T∗(Fx∗Fx+Fy∗Fy+Fz∗Fz ) ; //COST FUNCTION//
// //////////////////////////////////
// ////// Define the DAE’ s /////////
// //////////////////////////////////
void dae ( adouble ∗ de r i v a t i v e s , adouble ∗ path , adouble ∗ s t a t e s ,
adouble ∗ cont ro l s , adouble ∗ parameters , adouble& time ,
adouble ∗ xad , int iphase , Workspace∗ workspace )
double T = ????? ; // time reparametr i zed
adouble Fx = con t r o l s [ CINDEX(1) ] ; // //////////////////////
adouble Fy = con t r o l s [ CINDEX(2) ] ; ///CONTROL THRUSTS//////
adouble Fz = con t r o l s [ CINDEX(3) ] ; // //////////////////////
adouble T1 = con t r o l s [ CINDEX(4) ] ; // /////////////////////
adouble T2 = con t r o l s [ CINDEX(5) ] ; ////CONTROL TORQUES////
adouble T3 = con t r o l s [ CINDEX(6) ] ; // /////////////////////
adouble dx = s t a t e s [ CINDEX(1) ] ; // ///////////////////
adouble dy = s t a t e s [ CINDEX(2) ] ; /////POSITION////////
adouble dz = s t a t e s [ CINDEX(3) ] ; // ///////////////////
adouble dxdot = s t a t e s [ CINDEX(4) ] ; // /////////////////////
adouble dydot = s t a t e s [ CINDEX(5) ] ; // ////VELOCITY/////////
adouble dzdot = s t a t e s [ CINDEX(6) ] ; // /////////////////////
adouble dP1 = s t a t e s [ CINDEX(7) ] ; // ///////
adouble dP2 = s t a t e s [ CINDEX(8) ] ; ///MRP///
adouble dP3 = s t a t e s [ CINDEX(9) ] ; // ///////
adouble dom1 = s t a t e s [ CINDEX(10) ] ; // //////////////////////
adouble dom2 = s t a t e s [ CINDEX(11) ] ; ///ANGULAR VELOCITIES///
vii
adouble dom3 = s t a t e s [ CINDEX(12) ] ; // //////////////////////
double I1 = ????? ; //PRINCIPAL INERTIA//
double I2 = ????? ; // /////OF THE////////
double I3 = ????? ; // /////CHASER////////
double m = ????? ; //MASS OF THE CHASER//
double mu = ????? ; //STANDARD GRAVITATIONAL PARAMETER OF THE
PLANET CONSIDERED//
double R = ????? ; //RADIUS OF THE PLANET CONSIDERED//
double h = ????? ; //HEIGHT OF THE CIRCULAR ORBIT//
double omega = sq r t (mu/( (R+h )∗ (R+h )∗ (R+h ) ) ) ; //ANGULAR VELOCITY
OF THE ORBIT//
//DIRECTION COSINE MATRIX//
adouble dPsquare = dP1∗dP1+dP2∗dP2+dP3∗dP3 ;adouble A = dom1∗dP1 + dom2∗dP2 + dom3∗dP3 ;adouble P3orb = tan (omega∗ time / 4 . 0 ) ;
adouble den = 1.0/( (1 .0+dP1∗dP1+dP2∗dP2+dP3∗dP3)∗(1 .0+dP1∗dP1+dP2∗dP2+dP3∗dP3 ) ) ;
adouble sigma = 1.0−dP1∗dP1+dP2∗dP2+dP3∗dP3 ;adouble a11 = den ∗( sigma∗ sigma+4.0∗(dP1∗dP1−dP2∗dP2−dP3∗dP3 ) ) ;adouble a12 = den ∗ (8 . 0∗dP1∗dP2−4.0∗dP3∗ sigma ) ;
adouble a13 = den ∗ (8 . 0∗dP1∗dP3+4.0∗dP2∗ sigma ) ;
adouble a21 = den ∗ (8 . 0∗dP1∗dP2+4.0∗dP3∗ sigma ) ;
adouble a22 = den ∗( sigma∗ sigma+4.0∗(−dP1∗dP1+dP2∗dP2−dP3∗dP3 ) ) ;adouble a23 = den ∗ (8 . 0∗dP3∗dP2−4.0∗dP1∗ sigma ) ;
adouble a31 = den ∗ (8 . 0∗dP1∗dP2+4.0∗dP3∗ sigma ) ;
adouble a32 = den ∗ (8 . 0∗dP3∗dP2−4.0∗dP1∗ sigma ) ;
adouble a33 = den ∗( sigma∗ sigma+4.0∗(−dP1∗dP1−dP2∗dP2+dP3∗dP3 ) ) ;
double omegat1 = ????? ; // ////////////////////////////
double omegat2 = ????? ; //ANGULAR RATE OF THE TARGET//
double omegat3 = ????? ; // ////////////////////////////
// //////DERIVATIVES OF THE STATES///////////
viii
d e r i v a t i v e s [ CINDEX(1) ] = T∗( dxdot ) ;d e r i v a t i v e s [ CINDEX(2) ] = T∗( dydot ) ;d e r i v a t i v e s [ CINDEX(3) ] = T∗( dzdot ) ;d e r i v a t i v e s [ CINDEX(4) ] = T∗ ( ( (Fx∗a11+Fy∗a12+Fz∗a13 )/m)+
2.0∗ omega∗dydot+3.0∗omega∗omega∗dx ) ;d e r i v a t i v e s [ CINDEX(5) ] = T∗ ( ( (Fx∗a21+Fy∗a22+Fz∗a23 )/m)−
2 .0∗ omega∗dxdot ) ;d e r i v a t i v e s [ CINDEX(6) ] = T∗ ( ( (Fx∗a31+Fy∗a32+Fz∗a33 )/m)−
omega∗omega∗dz ) ;d e r i v a t i v e s [ CINDEX(7) ] = T∗ ( 0 . 25∗ ( dP2∗ (2 . 0∗dom3+4.0∗omegat3)−
dP3∗ (2 . 0∗dom2+4.0∗omegat2 )+(1.0−dPsquare )∗dom1)+
0 . 5∗ (A∗dP1 ) ) ;d e r i v a t i v e s [ CINDEX(8) ] = T∗ ( 0 . 25∗ ( dP1∗(−2.0∗dom3−4.0∗omegat3)+
dP3∗ (2 . 0∗dom1+4.0∗omegat1 )+(1.0−dPsquare )∗dom2)+
0 . 5∗ (A∗dP2 ) ) ;d e r i v a t i v e s [ CINDEX(9) ] = T∗ ( 0 . 25∗ ( dP1∗ (2 . 0∗dom2+4.0∗omegat2)−
dP2∗ (2 . 0∗dom1+4.0∗omegat1 )+(1.0−dPsquare )∗dom3)+
0 . 5∗ (A∗dP3 ) ) ;d e r i v a t i v e s [ CINDEX(10) ] = T∗ ( ( ( (T1∗a11+T2∗a12+T3∗a13 )/ I1)−
( ( I3−I2 )/ I1 )∗dom2∗dom3 ) ) ;
d e r i v a t i v e s [ CINDEX(11) ] = T∗ ( ( ( (T1∗a21+T2∗a22+T3∗a23 )/ I2)−( ( I1−I3 )/ I2 )∗dom1∗dom3 ) ) ;
d e r i v a t i v e s [ CINDEX(12) ] = T∗ ( ( ( (T1∗a31+T2∗a32+T3∗a33 )/ I3)−( ( I2−I1 )/ I3 )∗dom1∗dom2 ) ) ;
// //////////////////////////////////////////////////////////////////
// ///////////// Define the e v e n t s f u n c t i o n ////////////////////////
// //////////////////////////////////////////////////////////////////
void events ( adouble ∗ e , adouble ∗ i n i t i a l s t a t e s , adouble ∗ f i n a l s t a t e s ,
adouble ∗ parameters , adouble& t0 , adouble& t f , adouble ∗ xad ,
int iphase , Workspace∗ workspace )
adouble dxi = i n i t i a l s t a t e s [ CINDEX(1) ] ;
adouble dyi = i n i t i a l s t a t e s [ CINDEX(2) ] ;
adouble dz i = i n i t i a l s t a t e s [ CINDEX(3) ] ;
ix
adouble dvxi = i n i t i a l s t a t e s [ CINDEX(4) ] ;
adouble dvyi = i n i t i a l s t a t e s [ CINDEX(5) ] ;
adouble dvz i = i n i t i a l s t a t e s [ CINDEX(6) ] ;
adouble dP1i = i n i t i a l s t a t e s [ CINDEX(7) ] ;
adouble dP2i = i n i t i a l s t a t e s [ CINDEX(8) ] ;
adouble dP3i = i n i t i a l s t a t e s [ CINDEX(9) ] ;
adouble dom1i = i n i t i a l s t a t e s [ CINDEX(10) ] ;
adouble dom2i = i n i t i a l s t a t e s [ CINDEX(11) ] ;
adouble dom3i = i n i t i a l s t a t e s [ CINDEX(12) ] ;
adouble dxf = f i n a l s t a t e s [ CINDEX(1) ] ;
adouble dyf = f i n a l s t a t e s [ CINDEX(2) ] ;
adouble dz f = f i n a l s t a t e s [ CINDEX(3) ] ;
adouble dvxf = f i n a l s t a t e s [ CINDEX(4) ] ;
adouble dvyf = f i n a l s t a t e s [ CINDEX(5) ] ;
adouble dvzf = f i n a l s t a t e s [ CINDEX(6) ] ;
adouble dP1f = f i n a l s t a t e s [ CINDEX(7) ] ;
adouble dP2f = f i n a l s t a t e s [ CINDEX(8) ] ;
adouble dP3f = f i n a l s t a t e s [ CINDEX(9) ] ;
adouble dom1f = f i n a l s t a t e s [ CINDEX(10) ] ;
adouble dom2f = f i n a l s t a t e s [ CINDEX(11) ] ;
adouble dom3f = f i n a l s t a t e s [ CINDEX(12) ] ;
//INITIAL AND FINAL CONDITIONS//
e [ CINDEX(1) ] = dxi ;
e [ CINDEX(2) ] = dyi ;
e [ CINDEX(3) ] = dz i ;
e [ CINDEX(4) ] = dvxi ;
e [ CINDEX(5) ] = dvyi ;
e [ CINDEX(6) ] = dvz i ;
e [ CINDEX(7) ] = dxf ;
e [ CINDEX(8) ] = dyf ;
e [ CINDEX(9) ] = dz f ;
e [ CINDEX(10) ] = dvxf ;
e [ CINDEX(11) ] = dvyf ;
e [ CINDEX(12) ] = dvzf ;
e [ CINDEX(13) ] = dP1i ;
e [ CINDEX(14) ] = dP2i ;
e [ CINDEX(15) ] = dP3i ;
x
e [ CINDEX(16) ] = dom1i ;
e [ CINDEX(17) ] = dom2i ;
e [ CINDEX(18) ] = dom3i ;
e [ CINDEX(19) ] = dP1f ;
e [ CINDEX(20) ] = dP2f ;
e [ CINDEX(21) ] = dP3f ;
e [ CINDEX(22) ] = dom1f ;
e [ CINDEX(23) ] = dom2f ;
e [ CINDEX(24) ] = dom3f ;
// /////////////////////////////////////////////////////////////////
// //////////// Define the phase l i n k a g e s f u n c t i o n ////////////////
// /////////////////////////////////////////////////////////////////
void l i n k ag e s ( adouble ∗ l i nkage s , adouble ∗ xad , Workspace∗ workspace )
// S i n g l e phase problem
// ////////////////////////////////////////////////////////////////
// //////////// Define the main r o u t i n e //////////////////////////
// ////////////////////////////////////////////////////////////////
int main (void )
// /////////////////////////////////////////////////////////////
// ///////////////// Declare key s t r u c t u r e s ///////////////////
// /////////////////////////////////////////////////////////////
Alg algor i thm ;
Sol s o l u t i o n ;
xi
Prob problem ;
// /////////////////////////////////////////////////////////////
// ///////////////// R e g i s t e r problem name ///////////////////
// /////////////////////////////////////////////////////////////
problem . name = ”Rodrigues Parameters ” ;
problem . out f i l ename = ”Solution6T −6. txt ” ;
// //////////////////////////////////////////////////////////////////
// ////// Define problem l e v e l c o n s t a n t s & do l e v e l 1 se tup ////////
// //////////////////////////////////////////////////////////////////
problem . nphases = 1 ;
problem . n l i nkage s = 0 ;
p s op t l e v e l 1 s e t up ( problem ) ;
// ////////////////////////////////////////////////////////////////
//// Define phase r e l a t e d in format ion & do l e v e l 2 se tup //////
// ////////////////////////////////////////////////////////////////
problem . phases ( 1 ) . n s t a t e s = 12 ;
problem . phases ( 1 ) . n con t r o l s = 6 ;
problem . phases ( 1 ) . nevents = 24 ;
problem . phases ( 1 ) . npath = 0 ;
problem . phases ( 1 ) . nodes = ” [ 1 2 0 ] ” ;
p s op t l e v e l 2 s e t up ( problem , a lgor i thm ) ;
// //////////////////////////////////////////////////////////////
// /////////// Enter problem bounds in format ion ////////////////
// //////////////////////////////////////////////////////////////
double mu = ????? ;
double R = ????? ;
xii
double h = ????? ;
double omega = sq r t (mu/( (R+h )∗ (R+h )∗ (R+h ) ) ) ;
double A0 ????? ; //INITIAL CONSTANT THAT DETERMINES INITIAL POSITION
AND VELOCITY ( see below ) //
double alpha = ????? ; //PHASE ANGLE OF THE RELATIVE CW ORBIT//
double dx0 = A0∗ cos ( alpha ) ; // ///////////////////////////////////
double dy0 = −2.0∗A0∗ s i n ( alpha ) ; //INITIAL CONDITIONS THAT CORRESPONDS
double dz0 = 2.0∗A0∗ cos ( alpha ) ; ///TO A CHASER SATELLITE ORBITING////
double du0 = −A0∗omega∗ s i n ( alpha ) ; ///AROUND A FIXED TARGET ONE//////
double dv0 = −2.0∗omega∗dx0 ; // //////////////////////////////////////
double dw0 = −2.0∗A0∗omega∗ s i n ( alpha ) ; // ///////////////////////////
double dxe = 0 . 0 ; // //////////////////////////////////
double dye = 0 . 0 ; ///END CONDITIONS THAT CORRESPONDS//
double dze = 0 . 0 ; ///TO DOCKING //////////////////////
double due = 0 . 0 ; // //////////////////////////////////
double dve = 0 . 0 ; // //////////////////////////////////
double dwe = 0 . 0 ; // //////////////////////////////////
double d r o l l 0 = ????? ; // //////////////////////////////
double dpitch0 = ????? ; // //////////////////////////////
double dyaw0 = ????? ; ////INITIAL AND FINAL DIFFERENCE///
double d r o l l e = ????? ; //IN THE RELATIVE ATTITUDE//
double dpi tche = ????? ; ////OF THE TWO SPACECRAFTS,//
double dyawe = ????? ; ////FIRSTE EXPRESSED IN //
double dP10 = tan ( d r o l l 0 / 4 . 0 ) ; //TERMS OF EULRANGLES
double dP20 = tan ( dpitch0 / 4 . 0 ) ; //AND THEN TRANSFORMED INTO/
double dP30 = tan (dyaw0 / 4 . 0 ) ; //INTO MODIFIED RODRIGUES//
double dP1e = tan ( d r o l l e / 4 . 0 ) ; // ////PARAMETERS//////
double dP2e = tan ( dp i tche / 4 . 0 ) ; // /////////////////////////
double dP3e = tan (dyawe / 4 . 0 ) ; // //////////////////////
double dom10 = ????? ; // ///////////////////////////////////
double dom20 = ????? ; //INITIAL DIFFERENCE IN THE ANGULAR/
double dom30 = ????? ; // //////////////RATE////////////////
double dom1e = ????? ; // //////////////////////////////////////
xiii
double dom2e = ????? ; //FINAL DIFFERENCE IN THE ANGULAR RATE//
double dom3e = ????? ; // //////////////////////////////////////
double l ower l im i t om = ????? ; //LOWER AND UPPER LIMITS OF THE//
double upper l imit om = ????? ; // ////ANGULAR VELOCITIES////
double l owe r l im i t rw = ????? ; //LOWER AND UPPER PHYSICAL//
double uppe r l im i t rw = ????? ; //LIMITS OF THE REACTION WHEELS//
double l owe r l im i t Fx = ????? ; //LOWER AND UPPER PHYSICAL//
double upper l im i t Fx = ????? ; //LIMITS OF THE THRUSTERS x ///
double l owe r l im i t Fy = ????? ; //LOWER AND UPPER PHYSICAL//
double upper l im i t Fy = ????? ; //LIMITS OF THE THRUSTERS y///
double l owe r l im i t Fz = ????? ; //LOWER AND UPPER PHYSICAL//
double uppe r l im i t Fz = ????? ; //LIMITS OF THE THRUSTERS z ///
problem . phases ( 1 ) . bounds . lower . s t a t e s (1 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (2 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (3 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (4 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (5 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (6 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (7 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (8 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (9 ) = − i n f ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (10) = lower l im i t om ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (11) = lower l im i t om ;
problem . phases ( 1 ) . bounds . lower . s t a t e s (12) = lower l im i t om ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (1 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (2 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (3 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (4 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (5 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (6 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (7 ) = i n f ;
xiv
problem . phases ( 1 ) . bounds . upper . s t a t e s (8 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (9 ) = i n f ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (10) = upper l imit om ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (11) = upper l imit om ;
problem . phases ( 1 ) . bounds . upper . s t a t e s (12) = upper l imit om ;
problem . phases ( 1 ) . bounds . lower . c on t r o l s (1 ) = lowe r l im i t Fx ;
problem . phases ( 1 ) . bounds . lower . c on t r o l s (2 ) = lowe r l im i t Fy ;
problem . phases ( 1 ) . bounds . lower . c on t r o l s (3 ) = l owe r l im i t Fz ;
problem . phases ( 1 ) . bounds . lower . c on t r o l s (4 ) = l owe r l im i t rw ;
problem . phases ( 1 ) . bounds . lower . c on t r o l s (5 ) = l owe r l im i t rw ;
problem . phases ( 1 ) . bounds . lower . c on t r o l s (6 ) = l owe r l im i t rw ;
problem . phases ( 1 ) . bounds . upper . c on t r o l s (1 ) = upper l im i t Fx ;
problem . phases ( 1 ) . bounds . upper . c on t r o l s (2 ) = upper l im i t Fy ;
problem . phases ( 1 ) . bounds . upper . c on t r o l s (3 ) = uppe r l im i t Fz ;
problem . phases ( 1 ) . bounds . upper . c on t r o l s (4 ) = upper l im i t rw ;
problem . phases ( 1 ) . bounds . upper . c on t r o l s (5 ) = upper l im i t rw ;
problem . phases ( 1 ) . bounds . upper . c on t r o l s (6 ) = upper l im i t rw ;
problem . phases ( 1 ) . bounds . lower . events (1 ) = dx0 ;
problem . phases ( 1 ) . bounds . lower . events (2 ) = dy0 ;
problem . phases ( 1 ) . bounds . lower . events (3 ) = dz0 ;
problem . phases ( 1 ) . bounds . lower . events (4 ) = du0 ;
problem . phases ( 1 ) . bounds . lower . events (5 ) = dv0 ;
problem . phases ( 1 ) . bounds . lower . events (6 ) = dw0 ;
problem . phases ( 1 ) . bounds . lower . events (7 ) = dxe ;
problem . phases ( 1 ) . bounds . lower . events (8 ) = dye ;
problem . phases ( 1 ) . bounds . lower . events (9 ) = dze ;
problem . phases ( 1 ) . bounds . lower . events (10) = due ;
problem . phases ( 1 ) . bounds . lower . events (11) = dve ;
problem . phases ( 1 ) . bounds . lower . events (12) = dwe ;
problem . phases ( 1 ) . bounds . lower . events (13) = dP10 ;
problem . phases ( 1 ) . bounds . lower . events (14) = dP20 ;
problem . phases ( 1 ) . bounds . lower . events (15) = dP30 ;
problem . phases ( 1 ) . bounds . lower . events (16) = dom10 ;
problem . phases ( 1 ) . bounds . lower . events (17) = dom20 ;
problem . phases ( 1 ) . bounds . lower . events (18) = dom30 ;
xv
problem . phases ( 1 ) . bounds . lower . events (19) = dP1e ;
problem . phases ( 1 ) . bounds . lower . events (20) = dP2e ;
problem . phases ( 1 ) . bounds . lower . events (21) = dP3e ;
problem . phases ( 1 ) . bounds . lower . events (22) = dom1e ;
problem . phases ( 1 ) . bounds . lower . events (23) = dom1e ;
problem . phases ( 1 ) . bounds . lower . events (24) = dom1e ;
problem . phases ( 1 ) . bounds . upper . events (1 ) = dx0 ;
problem . phases ( 1 ) . bounds . upper . events (2 ) = dy0 ;
problem . phases ( 1 ) . bounds . upper . events (3 ) = dz0 ;
problem . phases ( 1 ) . bounds . upper . events (4 ) = du0 ;
problem . phases ( 1 ) . bounds . upper . events (5 ) = dv0 ;
problem . phases ( 1 ) . bounds . upper . events (6 ) = dw0 ;
problem . phases ( 1 ) . bounds . upper . events (7 ) = dxe ;
problem . phases ( 1 ) . bounds . upper . events (8 ) = dye ;
problem . phases ( 1 ) . bounds . upper . events (9 ) = dze ;
problem . phases ( 1 ) . bounds . upper . events (10) = due ;
problem . phases ( 1 ) . bounds . upper . events (11) = dve ;
problem . phases ( 1 ) . bounds . upper . events (12) = dwe ;
problem . phases ( 1 ) . bounds . upper . events (13) = dP10 ;
problem . phases ( 1 ) . bounds . upper . events (14) = dP20 ;
problem . phases ( 1 ) . bounds . upper . events (15) = dP30 ;
problem . phases ( 1 ) . bounds . upper . events (16) = dom10 ;
problem . phases ( 1 ) . bounds . upper . events (17) = dom20 ;
problem . phases ( 1 ) . bounds . upper . events (18) = dom30 ;
problem . phases ( 1 ) . bounds . upper . events (19) = dP1e ;
problem . phases ( 1 ) . bounds . upper . events (20) = dP2e ;
problem . phases ( 1 ) . bounds . upper . events (21) = dP3e ;
problem . phases ( 1 ) . bounds . upper . events (22) = dom1e ;
problem . phases ( 1 ) . bounds . upper . events (23) = dom1e ;
problem . phases ( 1 ) . bounds . upper . events (24) = dom1e ;
problem . phases ( 1 ) . bounds . lower . StartTime = 0 . 0 ;
problem . phases ( 1 ) . bounds . upper . StartTime = 0 . 0 ;
problem . phases ( 1 ) . bounds . lower . EndTime = 1 . 0 ;
problem . phases ( 1 ) . bounds . upper . EndTime = 1 . 0 ;
xvi
// /////////////////////////////////////////////////////////
// //// R e g i s t e r problem f u n c t i o n s ///////////////////////
// /////////////////////////////////////////////////////////
problem . i n t e g r and co s t = &in t e g r and co s t ;
problem . endpo in t co s t = &endpo in t co s t ;
problem . dae = &dae ;
problem . events = &events ;
problem . l i n kag e s = &l i nkag e s ;
// /////////////////////////////////////////////////////////
// //// Define & r e g i s t e r i n i t i a l guess ///////////////////
// /////////////////////////////////////////////////////////
int nnodes = problem . phases ( 1 ) . nodes ( 1 ) ;
int ncon t r o l s = problem . phases ( 1 ) . n con t r o l s ;
int ns t a t e s = problem . phases ( 1 ) . n s t a t e s ;
DMatrix s t a t e gu e s s = ze ro s ( ns tate s , nnodes ) ;
DMatrix c on t r o l g u e s s = ze ro s ( ncontro l s , nnodes ) ;
DMatrix t ime gues s = l i n s p a c e ( 0 . 0 , 1 . 0 , nnodes ) ;
s t a t e gu e s s (1 , co lon ( ) ) = l i n s p a c e ( dx0 , dxe , nnodes ) ;
s t a t e gu e s s (2 , co lon ( ) ) = l i n s p a c e ( dy0 , dye , nnodes ) ;
s t a t e gu e s s (3 , co lon ( ) ) = l i n s p a c e ( dz0 , dze , nnodes ) ;
s t a t e gu e s s (4 , co lon ( ) ) = l i n s p a c e (du0 , due , nnodes ) ;
s t a t e gu e s s (5 , co lon ( ) ) = l i n s p a c e ( dv0 , dve , nnodes ) ;
s t a t e gu e s s (6 , co lon ( ) ) = l i n s p a c e (dw0 , dwe , nnodes ) ;
s t a t e gu e s s (7 , co lon ( ) ) = l i n s p a c e ( dP10 , dP1e , nnodes ) ;
s t a t e gu e s s (8 , co lon ( ) ) = l i n s p a c e ( dP20 , dP2e , nnodes ) ;
s t a t e gu e s s (9 , co lon ( ) ) = l i n s p a c e ( dP30 , dP3e , nnodes ) ;
s t a t e gu e s s (10 , co lon ( ) ) = l i n s p a c e ( dom10 , dom1e , nnodes ) ;
s t a t e gu e s s (11 , co lon ( ) ) = l i n s p a c e ( dom20 , dom2e , nnodes ) ;
s t a t e gu e s s (12 , co lon ( ) ) = l i n s p a c e ( dom30 , dom3e , nnodes ) ;
c on t r o l g u e s s (1 , co lon ( ) ) = l i n s p a c e ( l ower l im i t Fx ,
xvii
upper l imit Fx , nnodes ) ;
c on t r o l g u e s s (2 , co lon ( ) ) = l i n s p a c e ( l ower l im i t Fy , upper l imit Fy ,
nnodes ) ;
c on t r o l g u e s s (3 , co lon ( ) ) = l i n s p a c e ( l owe r l im i t Fz , upper l imi t Fz ,
nnodes ) ;
c on t r o l g u e s s (4 , co lon ( ) ) = l i n s p a c e ( l owe r l im i t rw , upper l imi t rw ,
nnodes ) ;
c on t r o l g u e s s (5 , co lon ( ) ) = l i n s p a c e ( l owe r l im i t rw , upper l imi t rw ,
nnodes ) ;
c on t r o l g u e s s (6 , co lon ( ) ) = l i n s p a c e ( l owe r l im i t rw , upper l imi t rw ,
nnodes ) ;
problem . phases ( 1 ) . guess . s t a t e s = s t a t e gu e s s ;
problem . phases ( 1 ) . guess . c on t r o l s = con t r o l g u e s s ;
problem . phases ( 1 ) . guess . time = t ime gues s ;
// /////////////////////////////////////////////////////
///// Enter a l gor i thm o p t i o n s ///////////////////////
// /////////////////////////////////////////////////////
a lgor i thm . n lp i t e r max = ????? ;
a lgor i thm . n l p t o l e r a n c e = ????? ;
a lgor i thm . nlp method = ”IPOPT” ;
a lgor i thm . s c a l i n g = ”automatic ” ;
a lgor i thm . d e r i v a t i v e s = ”automatic ” ;
a lgor i thm . co l l o ca t i on method = ” t r ap e z o i d a l ” ;
a lgor i thm . mesh ref inement = ”automatic ” ;
a lgor i thm . ode t o l e r anc e = ????? ;
// ///////////////////////////////////////////////////////
// /////// Now c a l l PSOPT to s o l v e the problem ////////
// ///////////////////////////////////////////////////////
psopt ( so lu t i on , problem , a lgor i thm ) ;
xviii
// ///////////////////////////////////////////////////////
// Extrac t r e l e v a n t v a r i a b l e s from s o l u t i o n s t r u c t u r e ///
// ///////////////////////////////////////////////////////
DMatrix s t a t e s , c on t ro l s , t , pos , ve l , x , y , z , F , om,
P, u ;
s t a t e s = s o l u t i o n . g e t s t a t e s i n p h a s e ( 1 ) ;
c on t r o l s = s o l u t i o n . g e t c o n t r o l s i n ph a s e ( 1 ) ;
t = s o l u t i o n . g e t t ime in pha s e ( 1 ) ;
pos = s t a t e s ( co lon (1 , 3 ) , co lon ( ) ) ;
x = pos (1 , co lon ( ) ) ;
y = pos (2 , co lon ( ) ) ;
z = pos (3 , co lon ( ) ) ;
v e l = s t a t e s ( co lon (4 , 6 ) , co lon ( ) ) ;
F = con t r o l s ( co lon (1 , 3 ) , co lon ( ) ) ;
om = s t a t e s ( co lon (10 , 12 ) , co lon ( ) ) ;
P = s t a t e s ( co lon (7 , 9 ) , co lon ( ) ) ;
u = con t r o l s ( co lon (4 , 6 ) , co lon ( ) ) ;
// ////////////////////////////////////////////////////////
// ////// Save s o l u t i o n data to f i l e s i f d e s i r e d /////////
// ////////////////////////////////////////////////////////
s t a t e s . Save ( ” s t a t e s . dat” ) ;
c on t r o l s . Save ( ” c on t r o l s . dat” ) ;
t . Save ( ” t . dat” ) ;
// //////////////////////////////////////////////////////////
// ////// Plo t some r e s u l t s i f d e s i r e d ( r e q u i r e s g n u p l o t ) //
// //////////////////////////////////////////////////////////
double T = ????? ;
p lo t3 (x∗1000 , y∗1000 , z ∗1000 , ” Tra jec tory ” , ”x (m) ” , ”y (m) ” ,
”z (m) ” ) ;
mu l t ip l o t (T∗ t , v e l ∗1000 , ” Ve loc i ty ” , ” time [ s ] ” , ”dvx (m/ s )
dvy (m/ s ) dvz (m/ s ) ” , ”dvx dvy dvz” ) ;
xix
mul t ip l o t (T∗ t ,F∗1000000 , ”Contro l Thrust ” , ” time [ s ] ” , ”Fx [mN]
Fy [mN] Fz [mN] ” , ”Fx Fy Fz” ) ;
mu l t ip l o t (T∗ t ,P, ”Rodrigues Parameters ” , ” time [ s ] ” , ”dP1 dP2
dP3” , ”dP1 dP2 dP3” ) ;
mu l t ip l o t (T∗ t , om, ”Angular V e l o c i t i e s ” , ” time [ s ] ” , ”dom1 dom2
dom3” , ”dom1 dom2 dom3” ) ;
mu l t ip l o t (T∗ t , u , ”Control Torques ” , ” time [ s ] ” , ”T1 T2 T3” ,
”T1 T2 T3” ) ;
p lo t3 (x∗1000 , y∗1000 , z ∗1000 , ” Tra jec tory ” , ”x [m] ” , ”y [m] ” ,
”z [m] ” , ”png” , ” Tra jec tory . png” ) ;
mu l t ip l o t (T∗ t , pos ∗1000 , ” Pos i t i on ” , ” time [ s ] ” , ”dx [m] dy [m]
dz [m] ” , ”dx dy dz” ,3 ,1 , ”png” , ” Po s i t i on s . png” ) ;
mu l t ip l o t (T∗ t , v e l ∗1000 , ” Ve loc i ty ” , ” time [ s ] ” , ”dvx [m/ s ]
dvy [m/ s ] dvz [m/ s ] ” , ”dvx dvy dvz” ,3 , 1 , ”png” , ” V e l o c i t i e s . png” ) ;
mu l t ip l o t (T∗ t ,F∗1000000 , ”Contro l Thrust ” , ” time [ s ] ” , ”Fx [mN]
Fy [mN] Fz [mN] ” , ”Fx [mN] Fy [mN] Fz [mN] ” ,3 , 1 , ”png” ,
”Contro l Thrust . png” ) ;
mu l t ip l o t (T∗ t ,P, ”Rodrigues Parameters ” , ” time [ s ] ” ,
”dP1 dP2 dP3” , ”dP1 dP2 dP3” ,3 , 1 , ”png” ,
”Rodrigues Parameters . png” ) ;
mu l t ip l o t (T∗ t , om, ”Angular V e l o c i t i e s ” , ” time [ s ] ” ,
”dom1 [ rad/ s ] dom2 [ rad/ s ] dom3 [ rad/ s ] ” , ”dom1 dom2 dom3” ,
3 ,1 , ”png” , ” Angu l a r v e l o c i t i e s . png” ) ;
mu l t ip l o t (T∗ t , u , ”Control Torques ” , ” time [ s ] ” , ”T1 [Nm] T2 [Nm]
T3 [Nm] ” , ”T1 T2 T3” ,3 , 1 , ”png” , ”Control Torques . png” ) ;
// //////////////////////////////////////////////////////////
// //////////// END OF FILE ////////////////////////
// //////////////////////////////////////////////////////////
xx