Skip to content

IsaacTroche1/MPC_ARPO_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

til

Overview

Codebase for the project described in these slides.

Implements a custom offset-free Model Predictive Control (MPC) algortihm for the autonomous guidance of a 0-dimensional chaser spacecraft performing terminal RPO manuevers, under coplanar and circular orbit assumptions.

User-defined functionality for the following is included:

  • Discrete and continuous-time simulation
  • Linear and nonlinear plant models
  • Continuous acceleration and impulsive delta-v input models
  • MPC with and without integral action (disturbance rejection)
  • Basic 3D animations of trajectories in Vpython
  • Automated simulation runs and cataloging

Minimal documentation is provided within the source code itself.

The MPC algorithm implements the Operator-Splitting Quadratic Program (QP) solver, OSQP.

It utilizes Vpython for rough 3D animations of generated trajectories.

For literature sources, please see the "References" section at the end of the slides.

src/ Directory

This directory contains the necessary code for the algorithm and simulation.

For a general idea of code functionality, pictured below is a block diagram describing the operation of src/trajectorySimulateC.py- currently the most complex simulation in the repo:

alt text

This module defines various objects used for handling the many simulation and controller parameters associated with the algorithm.

It also contains a function for plotting general simulation results.

This function is used to perfrom discrete-time simulations of the MPC algorithm on a linear plant (Clohessy-Wiltshire eqns.).

This module contains helper functions used by the simulation for organization/readability.

This function is used to perfrom continuous-time simulations of the MPC algorithm on a nonlinear plant.

This function is used to generate basic low-fidelity animations of a given trajectory in Vpython.

test/ Directory

This directory contains very roughly constructed scripts used offline to generate and reduce the data shown in MPC_ARPO_Slides.pptx.

These can be optimized signifcantly, and should only be used as rough guides for source code use.

This script was used to construct simulations with varying parameters utilizing #src/simulateTrajectory.py.

This script was used to construct simulations with varying parameters utilizing #src/simulateTrajectoryC.py.

This script was was used similarly to test/traj_eval_radial.py, only for simulation runs in the in-track direction.

Script that was used to compare the performance of an MPC controller using offset-free methodologies vs a "normal" MPC controller, as noise becomes more constant in time.

Script used to create Vpython animations from stored simulation runs that were generated automatically over time.

misc/ Directory

These files are relics from before the codebase was organized and version control was implemented.

I have included them here purely as an insight into the stream-of-consciousness developing that the final project evolved from. They are rough and completely unorganized, and serve only as potentially interesting snapshots of my thought process.

About

Repository for a personal project implementing MPC on spacecraft relative motion models.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages