Skip to content

jordan787878/solar-sail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solar Sail Navigation

SetRRT Solution Visualization

The spacecraft is initially at a periodic orbit (black dash). SetRRT finds the state and control trajectory from the initial orbit to an asteroid (green ball). During planning, it does not consider any uncertainty.

Four different initial orbits and environments are included. The blue line is the nominal controlled trajectory. The red dash line is the controlled trajectory with process noise. The first row has no unsafe space. The second row has multiple unsafe space.

  1. unconstrained state space
Image 1 Image 2 Image 1 Image 2
  1. state space with circular unsafe regions
Image 1 Image 2 Image 1 Image 2
  1. 10 Unsafe Regions: State and Control Trajectory
Image 1 Image 2
  1. Animation
solarsail.mp4

Generalize to other Problem

The framework can be applied to other problems, provided their ODEs.

Marine Vessel Navigation

A marine vessel controlled by forward velocity (u1) and yaw rate (u3). The mission is to reach the green goal and avoid the red unsafe regions.

Image 1 Image 2

Animation

marine_vessel_2.mp4

Cart and Inverted Pendulum

An inverted pendulum is attached to a cart. The cart is controlled by a horizontal force u. The system has four states: angle and angular rate of the inverted pendulum; position and velocity of the cart. The goal is to:

  1. swing up the inverted pendulum such that it is at the upright position.
  2. the position and the velocity of the cart should also reach a certain region.
Image 1 Image 2

Animation

cart x = 0Image 1 cart x = 1Image 2

Optimization

We can further optimize the controlled trajectory using the Set-RRT-AO planner. The -AO stands for asymptotically optimal.

Minimize Total Time of Control

The cost measure is the total time of the controlled trajectory. We can obtain a faster solution to reach the goals. Below we show the examples of: solar sail, marine vessel, and cart inverted pendulum.

  1. Solar Sail
time: bigImage 1 time: smallImage 2
  1. Marine Vessel
time: bigImage 1 time: smallImage 2
  1. Cart Inverted Pendulum
time: bigImage 1 time: smallImage 2

Run-Time Control with Uncertainty

Motion Planner and online LQR update

Consider now the system is influenced by process noise. We employ a LQR control to update the control signals of the motion planner in run-time: $u_{\text{online}} = u_{\text{planner}} + \delta u_{\text{LQR}}$, where $\delta u_{\text{LQR}} = -K \delta x$. The gain $K$ is computed by solving the dicrete-time algebraic Riccati equations.

First, we show the animation of the (blue) ideal trajectory generated by the motion planner (without process noise), and (red) run-time trajectory using motion planner + LQR update to address process noise.

invert_pendulum_simple.mp4

Secondly, we compare the results of (Purple) only motion planner, (Red) motion planner + LQR update, and (Orange) only LQR, for run-time control under process noise. The below animation shows why we need (motion planner + LQR update).

Purple: only motion planner. Red: motion planner + LQR update Image 1 Orange: only LQR. Red: motion planner + LQR update Image 2

Note, however, that this approach does not guarantee to satify the control goal (state and control within the domain). The below animation shows the same simulation setup, but this time the cart position state exceeds the feasible domain [-2,2]. This motivates other approaches.

invert_pendulum_simple.mp4

C++

build the project

cd root folder
cmake -B build .
cmake --build build
./build/bin/test_main

Docker

build dockerfile

docker build -t jordan787878/solarsail:tag .

run dockerfile to init develop environment

docker run -it --name solarsail-dev --rm -v $(pwd):/develop jordan787878/solarsail:tag

build after coding

cd build
cmake ..
make

push dockerfile

docker push jordan787878/solarsail:tag

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages