\documentclass{beamer}
\usetheme{Antibes}

\usepackage{xfrac}

\definecolor{color1}{HTML}{3A4040}
\definecolor{color2}{HTML}{F5F2F8}
\definecolor{color3}{HTML}{C47B6E}
\definecolor{color4}{HTML}{B6AD96}
\definecolor{color5}{HTML}{B65D4E}

\setbeamercolor*{structure}{bg=color3,fg=color3}
\setbeamercolor*{palette primary}{fg=color1,bg=color4}
\setbeamercolor*{palette secondary}{fg=color1,bg=color4}
\setbeamercolor*{palette tertiary}{fg=color1,bg=color3}
\setbeamercolor*{palette quaternary}{fg=color1,bg=color5}
\setbeamercolor{alerted text}{fg=color1,bg=color3}
\setbeamercolor{titlelike}{bg=color2,fg=color1}
\setbeamercolor*{titlelike}{bg=color2,fg=color1}
\setbeamercolor{frametitle}{bg=color1,fg=color2}
\setbeamercolor{background canvas}{bg=color2,fg=color2}

\title{Designing Optimal Low-Thrust Interplanetary Trajectories Utilizing Monotonic Basin Hopping}
\author{Richard Connor Johnstone}
\institute{University of Colorado -- Boulder}
\date{\today}

\begin{document}

\begin{frame}
	\titlepage
\end{frame}

\section{Introduction}

	\subsection{Motivation}

		% \begin{frame} \frametitle{Motivation}
		% 	How can we leverage existing technologies and techniques to determine
		% 	optimally-controlled trajectories to targets in interplanetary space?
		% \end{frame}

		\note{Today I'll be discussing my research in determining optimal trajectories
		for interplanetary mission objectives. Numerous scientific and engineering advances have
		been made possible by the recognition of optimal trajectories in interplanetary space.}

		\begin{frame} \frametitle{Voyager}
			\begin{figure}
				\centering
				\includegraphics[height=0.6\paperheight]{LaTeX/fig/voyager}
				\caption{Voyager mission trajectory\cite{nasa_voyager}}
			\end{figure}
		\end{frame}

		\note{For instance, the Voyagers I and II missions were launched in 1977 because of a
		once-in-a-lifetime window in which the spacecraft were able to, on a single tour, visit all
		four gas giant outer planets. These tours were only made possible because of the ability to
		compute planetary ephemeris and map out a chain of gravity assists.}

		\begin{frame} \frametitle{Bepi-Colombo}
			\begin{figure}
				\centering
				\includegraphics[height=0.6\paperheight]{LaTeX/fig/bepicolombo}
				\caption{Bepi-Colombo mission trajectory\cite{jehnBepi}}
			\end{figure}
		\end{frame}

		\note{More recently, ESA has also been able to take advantage of gravity assists to send the
		spacecraft Bepi-Colombo into a trajectory that rendezvous 6 times with Mercury. While this
		mission did utilize a number of gravity assists, it also utilized another technology
		well-suited to interplanetary travel: low-thrust electric propulsion systems}

	\subsection{Context}

		\begin{frame} \frametitle{Low Thrust Electric Propulsion}
			Allows for some advantages in achieving more interesting mission objectives:
			\begin{itemize}
				\item Much higher thrusting efficiency (in terms of fuel usage) compared to high
					thrust propulsive systems
				\item Allows for a greater overall $\Delta V$ budget for a given mission
			\end{itemize}

			\pause
			But requires some additional considerations:
			\begin{itemize}
				\item Requires significantly more time to achieve the same velocity change
				\item Defines a new system dynamics control, which must be accounted for
					continuously at each point in time, requiring additional computation for
					optimization
			\end{itemize}
		\end{frame}

		\note{Thanks to their ability to provide thrust extremely efficiently, these low-thrust
		engines can be a powerful tool for enabling impressive scientific objectives, but they do
		provide an additional layer of complexity for the mission designer, as their continuous
		thrust nature changes the underlying system dynamics that would have been used to optimize a
		mission such as Voyager, which did not employ low-thrust engines.}

		\begin{frame} \frametitle{Problem Statement}
			For a given low-thrust engine, spacecraft parameters, and planetary flyby selections,
			what is the optimal control thrusting profile, launch conditions, and flyby parameters
			to arrive at a target outer planet?
		\end{frame}

\section{Trajectory Optimization Background}

	\subsection{System Dynamics}

		\begin{frame} \frametitle{Dynamical Model: Two Body Problem}
			\begin{columns}
					\begin{column}{0.45\paperwidth}
						Assumptions:
						\begin{itemize}
							\item There are only two bodies in the system
							\item The only force acting between the two bodies is gravitational
							\item The two masses are to be modeled as constant point masses
						\end{itemize}
					\end{column}
					\begin{column}{0.45\paperwidth}
						\begin{figure}
							\centering
							\includegraphics[width=0.45\paperwidth]{LaTeX/fig/2bp}
						\end{figure}
					\end{column}
			\end{columns}
		\end{frame}

		\note{In order to understand how to optimize these trajectories, we'll first have to
		understand the underlying system dynamics. I won't spend too long on this, as most of you
		should have a good grasp on spacecraft dynamics, but we'll briefly analyse the most basic
		model for spaceflight dynamics: the two body problem. This model requires us to make a
		couple of basic assumptions. First that we are only concerned with the gravitational
		influence between the nominative two bodies: the spacecraft and the planetary body around
		which it is orbiting. Secondly, both of these bodies are modeled as point masses with
		constant mass. This removes the need to account for non-uniform densities and asymmetry.}

		\begin{frame} \frametitle{Dynamical Model: Two Body Problem}
			\begin{columns}
					\begin{column}{0.45\paperwidth}
						\begin{align*}
							m_2 \ddot{\vec{r}}_2 &= - \frac{G m_1 m_2}{r^2} \frac{\vec{r}}{\left| r \right|} \\
							m_1 \ddot{\vec{r}}_1 &= \frac{G m_2 m_1}{r^2} \frac{\vec{r}}{\left| r \right|}
						\end{align*}
					\end{column}
					\begin{column}{0.45\paperwidth}
						\begin{figure}
							\centering
							\includegraphics[width=0.45\paperwidth]{LaTeX/fig/2bp}
						\end{figure}
					\end{column}
			\end{columns}
		\end{frame}

		\note{From Newton's second law and the law of universal gravitation, we can then model this
		force with this equation. Where...}

		\begin{frame} \frametitle{Dynamical Model: Two Body Problem}
			\begin{columns}
					\begin{column}{0.45\paperwidth}
						\begin{equation*}
							\ddot{\vec{r}} = \ddot{\vec{r}}_2 - \ddot{\vec{r}}_1 =
							- \frac{G \left( m_1 + m_2 \right)}{r^2} \frac{\vec{r}}{\left| r \right|}
						\end{equation*}
					\end{column}
					\begin{column}{0.45\paperwidth}
						\begin{figure}
							\centering
							\includegraphics[width=0.45\paperwidth]{LaTeX/fig/2bp}
						\end{figure}
					\end{column}
			\end{columns}
		\end{frame}

		\note{Dividing by the mass, we can derive the acceleration...}

		\begin{frame} \frametitle{Dynamical Model: Two Body Problem}
			\begin{columns}
					\begin{column}{0.45\paperwidth}
						\begin{align*}
							\mu &= G (m_1 + m_2) \approx G m_1 \\
							\ddot{\vec{r}} &= - \frac{\mu}{r^2} \hat{r}
						\end{align*}
					\end{column}
					\begin{column}{0.45\paperwidth}
						\begin{figure}
							\centering
							\includegraphics[width=0.45\paperwidth]{LaTeX/fig/2bp}
						\end{figure}
					\end{column}
			\end{columns}
		\end{frame}

		\note{Finally, we'll make the assumption that the mass of the spacecraft, is significantly
		smaller than the mass of the planet. This allows us to represents the gravitational
		parameter as a function of the planetary mass alone, rather than both combined. With this
		assumption, we can model the system dynamics with this analytically solvable equation}

		\begin{frame} \frametitle{Dynamical Model: Kepler's Laws}
			\begin{itemize}
				\item Each planet's orbit is an ellipse with the Sun at one of the foci.
				\item The area swept out by the imaginary line connecting the primary and secondary
					bodies increases linearly with respect to time.
				\item The square of the orbital period is proportional to the cube of the semi-major
					axis of the orbit, regardless of eccentricity.
			\end{itemize}
		\end{frame}

		\note{In the early 1600s, Johannes Kepler determined three laws in order to describe the
		motion of a satellite. These are:}

		\begin{frame} \frametitle{Dynamical Model: Kepler's Laws}
			\begin{equation*}
				r = \frac{\sfrac{h^2}{\mu}}{1 + e \cos(\theta)}
			\end{equation*}

			\vspace{1em}

			\begin{equation*}
				\frac{\Delta t}{T} = \frac{E - e \sin E}{2 \pi}
			\end{equation*}

			\vspace{1em}

			\begin{equation*}
				T = 2 \pi \sqrt{\frac{a^3}{\mu}}
			\end{equation*}
		\end{frame}

		\note{By utilizing these laws and some geometric properties of conic sections, we can
		actually take them a step further, producing the following extremely useful equations for
		representing spacecraft motion:}

		\begin{frame} \frametitle{Dynamical Model: Kepler's Equation}
			\begin{equation*}
				\frac{\Delta t}{T} = \frac{E - e \sin E}{2 \pi}
			\end{equation*}

			\vspace{1em}

			\begin{equation*}
				T = 2 \pi \sqrt{\frac{a^3}{\mu}}
			\end{equation*}

			\vspace{1em}

			\begin{equation*}
				M = \sqrt{\frac{\mu}{a^3}} \Delta t = E - e \sin E
			\end{equation*}
		\end{frame}

		\note{The second of these, which we'll take particular notice of, is considered Kepler's
		equation. It provides a method for relating the time since periapsis of a satellite in an
		orbit to the satellite's position along that orbit. The solution to this equatin can then be
		used to solve for a spacecraft's position, which is very useful for direct optimization
		methods.}

		% \note{Finally, though, we'll need to actually solve Kepler's equation. For this purpose
		% we'll use a generic root-finding method first proposed by Laguerre in the 19th century.
		% Conway first explored its application on Kepler's equation in the 1980s and found it to be
		% more robust at converging to a solution, with similar convergence speed, to the more common
		% variations of the Newton-Raphson method}

	\subsection{Interplanetary Trajectories}

		\begin{frame} \frametitle{Interplanetary Trajectories: Patched Conics}
			\begin{figure}[H]
				\centering
				\includegraphics[height=0.7\paperheight]{LaTeX/fig/patched_conics}
			\end{figure}
		\end{frame}

		\note{Now that we have a grasp on the underlying system dynamics, we can consider the
		additions needed for interplanetary travel specifically. To this end, we'll consider the
		method of patched conics, a technique for reconciling the fact that the spacecraft will not
		be under the influence of a single body, but actually a number of different bodies over the
		course of its trajectory. To achieve this, we'll break the trajectory up into different
		sub-trajectories, each governed by a distinct single body when the spacecraft is within the
		sphere of influence of that particular body...}

		\begin{frame} \frametitle{Interplanetary Trajectories: Gravity Assist}
			\begin{figure}[H]
				\centering
				\includegraphics[height=0.7\paperheight]{LaTeX/fig/flyby}
			\end{figure}
		\end{frame}

		\note{You'll notice, though, that the trajectories within the sphere of influence aren't
		elliptical orbits. They're hyperbolic. Because of this fact, we can take advantage of the
		gravity flyby effect. Because of the nature of the hyperbolic arc the spacecraft takes
		around the planet, the spacecraft leaves in a different direction than it arrives. This
		effect can be targeted up to a point, and a free "maneuver" can be achieved, changing the
		direction of the spacecraft's motion relative to the Sun.}

	\subsection{Low Thrust Trajectories}

		\begin{frame} \frametitle{Low Thrust Trajectories: Sims-Flanagan Transcription}
			\begin{columns}
					\begin{column}{0.45\paperwidth}
						\begin{itemize}
							\item Each trajectory broken into $n$ segments
							\item Impulsive thrust at the center of each one, assuming equal thrust
								over the segment
							\item Mass decremented over the duration of the segment
						\end{itemize}
					\end{column}
					\begin{column}{0.45\paperwidth}
						\begin{figure}
							\centering
							\includegraphics[width=0.45\paperwidth]{LaTeX/fig/sft}
						\end{figure}
					\end{column}
			\end{columns}
		\end{frame}

		\note{We'll also need to discretize the low-thrust controls in order to apply a direct
		optimization. This is achieved, in this thesis and many other implementations, with the
		Sims-Flanagan transcription. The trajectory is broken up into a number of smaller
		trajectories with a single impulsive thrust in the center of each. Effectively, this
		allows...}

		\begin{frame} \frametitle{Low Thrust Trajectories: Control Vector Description}
			\begin{columns}
					\begin{column}{0.45\paperwidth}
						\begin{align*}
							F_r &= F \cos(\beta) \sin (\alpha) \\
							F_\theta &= F \cos(\beta) \cos (\alpha) \\
							F_h &= F \sin(\beta)
						\end{align*}
					\end{column}
					\begin{column}{0.45\paperwidth}
						\begin{figure}
							\centering
							\includegraphics[width=0.45\paperwidth]{LaTeX/fig/thrust_angle}
						\end{figure}
					\end{column}
			\end{columns}
		\end{frame}

		\note{Finally, in order to better understand the thrust control vector, we need a useful
		frame. For this purpose, I use the r theta h frame in which the r axis is... This is useful
		because the theta axis is aligned fairly close to the velocity direction. That allows for a
		useful framework in which to analyze the control thrusts. Thrusts with a low alpha angle are
		useful for raising the energy of the orbit, while other thrusts (either alpha around pi/2 or
		high beta) are useful for steering controls.}

\section{Algorithm Overview}

	\subsection{Trajectory Composition}

		\begin{frame} \frametitle{Input Description}
			\footnotesize{
			\begin{itemize}
				\item \textbf<1>{Spacecraft dry mass in kilograms}
				\item \textbf<1>{Total starting mass of the Spacecraft in kilograms}
				\item \textbf<2>{Thruster Specific Impulse in seconds}
				\item \textbf<2>{Thruster Maximum Thrusting Force in Newtons}
				\item \textbf<2>{Thruster Duty Cycle Percentage}
				\item \textbf<2>{Number of Thrusters on Spacecraft}
				\item \textbf<3>{The Launch Window Boundaries}
				\item \textbf<3>{The Latest Arrival Date}
				\item \textbf<4>{A Maximum Acceptable $V_\infty$ at arrival in kilometers per
					second}
				\item \textbf<4>{A Maximum Acceptable $C_3$ at launch in kilometers per second
					squared}
				\item \textbf<4>{A cost function relating the mass usage, $v_\infty$ at arrival, and
					$C_3$ at launch to a cost}
				\item \textbf<5>{A list of flyby planets starting with Earth and ending with the
					destination}
			\end{itemize}
			}
		\end{frame}

		\note{In order to fully understand the optimization algorithm, it makes sense to first
		understand the variables that won't be optimized. These will represent the mission
		parameters used as inputs to the algorithm. These first two will essentially size the
		spacecraft that we'll be using. Then the next groups will define the thrusters, the launch
		and arrival windows, the cost function to be used by the direct optimizer, and finally the
		flybys that the spacecraft will leverage on its trajectory.}

	\subsection{Inner Loop Implementation}

		\begin{frame} \frametitle{Non-Linear Programming Approach - Definition}
			A Non-Linear Programming Problem involves finding a solution that optimizes a function:

			\begin{equation*}
				f(\vec{x})
			\end{equation*}

			Subject to constraints:
			\begin{align*}
				\vec{g}(\vec{x}) &\le 0 \\
				\vec{h}(\vec{x}) &= 0
			\end{align*}

		\end{frame}

		\note{Now we'll treat the trajectory as a direct non-linear programming optimization
		problem. This provides a general approach to determining a local optima to a scalar function
		f of a vector-valued input, x, subject to constraints g and h, defined as can be seen here.}

		\begin{frame} \frametitle{Non-Linear Programming Approach - Input Vector}
			\begin{figure}
				\centering
				\includegraphics[height=0.7\paperheight]{LaTeX/flowcharts/nlp}
			\end{figure}
		\end{frame}

		\note{So we need simply to define the function, constraints, and the input vector. Starting
		with the input vector, we need to determine...}

		\begin{frame} \frametitle{Non-Linear Programming Approach - Constraints}
			\begin{itemize}
				\item For every phase other than the final:
					\begin{itemize}
						\item The minimum periapsis of the hyperbolic flyby arc must be above some
							user-specified minimum safe altitude.
						\item The magnitude of the incoming hyperbolic velocity must match the magnitude
							of the outgoing hyperbolic velocity.
						\item The spacecraft position must match the planet's position (within bounds)
							at the end of the phase.
					\end{itemize}
				\item For the final phase:
					\begin{itemize}
						\item The spacecraft position must match the planet's position (within bounds)
							at the end of the phase.
						\item The final mass must be greater than the dry mass of the craft.
					\end{itemize}
			\end{itemize}
		\end{frame}

		\note{And we can also determine a series of constraints...}

		\begin{frame} \frametitle{Non-Linear Programming Approach - Cost Function}
			\begin{equation*}
				J(\vec{x}, m_{dry}, C_{3,max}) = 3 \left| \frac{m(\vec{x})}{m_{dry}} \right| +
				\left| \frac{C_3(\vec{x})}{C_{3,max}} \right|
			\end{equation*}
		\end{frame}

		\note{Finally, the cost function was designed to be user-specified. However, for the
		implementation of this particular project, I utilized a combination of the normalized fuel
		usage and launch c3. Now we have a fully-defined non-linear programming problem that can be
		optimized using any direct method optimization scheme.}

	\subsection{Outer Loop Implementation}

		\begin{frame} \frametitle{Monotonic Basin Hopping}
			\begin{figure}
				\centering
				\includegraphics[height=0.7\textheight]{LaTeX/flowcharts/mbh}
			\end{figure}
		\end{frame}

		\note{Now we have a method for finding local optima in the vicinity of an input vector, but
		what we're after is the global optima, meaning that we need a method for testing a variety
		of input vectors, each of which could either fail to produce a valid trajectory after the
		inner loop or produce a valid solution that may or may not be in a "basin", or collection of
		nearby valid solutions with a single "regional" optimum. In order to approach this problem,
		I've employed a Monotonic Basin Hopping algorithm. (Step through each of the steps)}

		\begin{frame} \frametitle{Monotonic Basin Hopping - Perturbation PDF}
			Pareto Distribution:
			\begin{equation*}
				1 +
				\left[ \frac{s}{\epsilon} \right] \cdot
				\left[ \frac{\alpha - 1}{\frac{\epsilon}{\epsilon + r}^{-\alpha}} \right]
			\end{equation*}
		\end{frame}

\section{Sample Mission Analysis}

	\subsection{Mission Scenario}

		\begin{frame} \frametitle{Mission Scenario}
			\begin{itemize}
				\item Spacecraft starting mass: 3500 kg
				\item Thruster Specific Impulse: 3200 s
				\item Thruster Maximum Thrusting Force: 250 mN
				\item Thruster Duty Cycle: 100\%
				\item Number of Thrusters: 1
				\item The Launch Window: 2023 and 2024
				\item The Latest Arrival Date: December 31st, 2044
				\item Maximum $C_3$ at launch: $100 \frac{\text{km}^2}{\text{s}^2}$
			\end{itemize}
		\end{frame}

		\begin{frame} \frametitle{Flybys Analyzed}
			\begin{itemize}
				\item EJS
				\item EMJS
				\item EMMJS
				\item EMS
				\item ES
				\item EVMJS
				\item EVMS
				\item EVVJS
			\end{itemize}
		\end{frame}

	\subsection{Trajectory 1}

		\begin{frame} \frametitle{Trajectory 1 - Earth → Mars → Saturn}
			\begin{figure}
				\includegraphics<1>[height=0.5\paperheight]{LaTeX/fig/EMS_plot}
				\includegraphics<2>[height=0.5\paperheight]{LaTeX/fig/EMS_plot_noplanets}
				\includegraphics<3>[height=0.5\paperheight]{LaTeX/fig/EMS_thrust_mag}
				\includegraphics<4>[height=0.5\paperheight]{LaTeX/fig/EMS_thrust_components_vnb}
			\end{figure}
			\vspace{-1em}
			\begin{table}\begin{tiny}
				\begin{tabular}{ | c c c c c c | }
					\hline
					\bfseries Flyby Selection &
					\bfseries Launch Date &
					\bfseries Mission Length &
					\bfseries Launch $C_3$ &
					\bfseries Arrival $V_\infty$ &
					\bfseries Fuel Usage \\
					&  & (years) & $\left( \frac{km}{s} \right)^2$ & ($\frac{km}{s}$) & (kg) \\
					\hline
					EMS & 2024-06-27 & 7.9844 & 60.41025 & 5.816058 & 446.9227 \\
					\hline
				\end{tabular}
			\end{tiny}\end{table}
		\end{frame}

	\subsection{Trajectory 2}

		\begin{frame} \frametitle{Trajectory 2 - Earth → Mars → Jupiter → Saturn}
			\begin{figure}
				\includegraphics<1>[height=0.5\paperheight]{LaTeX/fig/EMJS_plot}
				\includegraphics<2>[height=0.5\paperheight]{LaTeX/fig/EMJS_plot_noplanets}
				\includegraphics<3>[height=0.5\paperheight]{LaTeX/fig/EMJS_thrust_mag}
				\includegraphics<4>[height=0.5\paperheight]{LaTeX/fig/EMJS_thrust_components_vnb}
			\end{figure}
			\vspace{-1em}
			\begin{table}\begin{tiny}
				\begin{tabular}{ | c c c c c c | }
					\hline
					\bfseries Flyby Selection &
					\bfseries Launch Date &
					\bfseries Mission Length &
					\bfseries Launch $C_3$ &
					\bfseries Arrival $V_\infty$ &
					\bfseries Fuel Usage \\
					&  & (years) & $\left( \frac{km}{s} \right)^2$ & ($\frac{km}{s}$) & (kg) \\
					\hline
					EMJS & 2023-11-08 & 14.1072 & 40.43862 & 3.477395 & 530.6683 \\
					\hline
				\end{tabular}
			\end{tiny}\end{table}
		\end{frame}

	\subsection{Results Analysis}

		\begin{frame} \frametitle{Results Review}
			\begin{table}\begin{tiny}
				\begin{tabular}{ | c c c c c c | }
					\hline
					\bfseries Flyby Selection &
					\bfseries Launch Date &
					\bfseries Mission Length &
					\bfseries Launch $C_3$ &
					\bfseries Arrival $V_\infty$ &
					\bfseries Fuel Usage \\
					&  & (years) & $\left( \frac{km}{s} \right)^2$ & ($\frac{km}{s}$) & (kg) \\
					\hline
					EMS & 2024-06-27 & 7.9844 & 60.41025 & 5.816058 & 446.9227 \\
					EMJS & 2023-11-08 & 14.1072 & 40.43862 & 3.477395 & 530.6683 \\
					\hline
				\end{tabular}
			\end{tiny}\end{table}
		\end{frame}

\section{Conclusion}

	\begin{frame} \frametitle{Conclusion}
		\begin{itemize}
			\item Validation of direct approach to optimizing interplanetary, low-thrust
				trajectories as non-linear programming problems
			\item Validation of Monotonic Basin Hopping algorithm for finding global optima in the
				same scenario
			\item Application in a realistic sample mission revealed two effective trajectory
				possibilities
		\end{itemize}
	\end{frame}

	\begin{frame} \frametitle{Future Work}
		\begin{itemize}
			\item Outer loop which chooses optimal flyby trajectories for increased automation
			\item Parallelization would be effective for this problem
			\item Better quantification of search space ``coverage'' by the monotonic basin hopping
				algorithm
		\end{itemize}
	\end{frame}

	\begin{frame}
		\begin{center}
		\begin{Huge}
			Thank You!
		\end{Huge}
		\end{center}
	\end{frame}

	\bibliographystyle{plain}
	\bibliography{LaTeX/presentation}

\end{document}
