How to use OpenGoddard 3-python library for nonlinear optimal control and orbit generation

https://github.com/istellartech/OpenGoddard https://istellartech.github.io/OpenGoddard/

How to use OpenGoddard 1 How to use OpenGoddard 2 How to use OpenGoddard 3 ← Now here How to use OpenGoddard 4

Optimal rocket climb (1st stage)

As a combination of the normalization (scaling) and knotting method that we have tried so far, thrust control optimization is performed with a value close to that of an actual rocket.

As a reference problem, refer to the optimal rocket climb problem described in the following paper. The algorithm inside also uses the same Legendre-Gauss-Lobatto pseudo-spectral method as Open Goddard.

Rea, Jeremy Ryan. A legendre pseudospectral method for rapid optimization of launch vehicle trajectories. Diss. Massachusetts Institute of Technology, 2001. http://hdl.handle.net/1721.1/8608

The equation of motion is almost the same as How to use 2. Change only the value. Don't forget to normalize, as changing the value will require a number for normalization.

After that, write it in a good way SOLVE!

3_Single_.png

The graph is similar to the paper. (It differs slightly depending on how the convergence value is set)

Optimal rocket climb (2 steps)

The thrust control optimization of the two-stage rocket is performed using the knotting method. The main changes are as follows. The default solution (Guess part) has also been changed a little.

time_init = [0.0, 300, 600]
n = [25, 25]
num_states = [3, 3]
num_controls = [1, 1]
max_iteration = 30
prob = Problem(time_init, n, num_states, num_controls, max_iteration)
prob.dynamics = [dynamics, dynamics]
prob.knot_states_smooth = [False]

The state variable (mass here) is defined as discontinuous. Add the following to the constraints:

# knotting condition
R1 = prob.states(0, 0)
v1 = prob.states(1, 0)
m1 = prob.states(2, 0)
R2 = prob.states(0, 1)
v2 = prob.states(1, 1)
m2 = prob.states(2, 1)
result.add(R1[-1] - R2[0])
result.add(v1[-1] - v2[0])
result.add(m1[-1] - m2[0] - 1200)

If you put in, the altitude and velocity are continuous, and you can define the mass loss (discontinuous) at the time of separation.

3_TwoStage_.png

Two-stage rocket in two-dimensional coordinates

The example of OpenGoddard includes an example assuming the orbit insertion of a rocket into low earth orbit in two dimensions (polar coordinate system).

3_TSTO_-0.png 3_TSTO_-1.png

The result of Open Goddard is that it is best to stop the upper stage rocket and reignite it in order to insert it into orbit. Space engineers around the world are developing rockets, etc. based on the results of these optimal orbits.

By the way

The method that does not reignite is called the direct burn method, but the required technical level is lower for the direct burn, and in reality, the direct burn may be adopted due to communication with the ground or technical problems. In reality, it is required to create an orbit with various restraint conditions.

Recommended Posts

OpenGoddard How to use 2-python library for nonlinear optimal control and orbit generation
How to use OpenGoddard 3-python library for nonlinear optimal control and orbit generation
How to use OpenGoddard 4-python library for nonlinear optimal control and orbit generation
How to use OpenGoddard 1-python library for nonlinear optimal control and orbit generation
How to use Requests (Python Library)
[python] How to use the library Matplotlib for drawing graphs
How to install and use pandas_datareader [Python]
[Python] Organizing how to use for statements
python: How to use locals () and globals ()
How to use "deque" for Python data
How to use Python zip and enumerate
How to use is and == in Python
How to use the C library in Python
How to use Python Image Library in python3 series
[Python] How to use hash function and tuple.
Tips for those who are wondering how to use is and == in Python
How to use Service Account OAuth and API with Google API Client for python
[BigQuery] How to use BigQuery API for Python -Table creation-
[For beginners] How to use say command in python!
[Python] [Django] How to use ChoiceField and how to add options
[Python] How to use the graph creation library Altair
Python # How to check type and type for super beginners
python3: How to use bottle (2)
[Python] How to use list 1
How to use Python argparse
Python: How to use pydub
[Python] How to use checkio
[Python] How to use input ()
How to use Python lambda
[Python] How to use virtualenv
python3: How to use bottle (3)
python3: How to use bottle
How to use Python bytes
[Introduction to Udemy Python 3 + Application] 36. How to use In and Not
How to learn TensorFlow for liberal arts and Python beginners
[Python] Summary of how to use split and join functions
How to use machine learning for work? 03_Python coding procedure
Comparison of how to use higher-order functions in Python 2 and 3
I didn't know how to use the [python] for statement
Python: How to use async with
How to install and use Tesseract-OCR
[Python] How to use Pandas Series
How to use SQLite in Python
[Python] How to import the library
How to use .bash_profile and .bashrc
How to install and use Graphviz
[Python] How to use list 3 Added
How to use Mysql in python
How to use OpenPose's Python API
How to use ChemSpider in Python
How to use FTP with Python
Python: How to use pydub (playback)
How to use PubChem in Python
How to use python zip function
[Python] How to use Typetalk API
How to use functions in separate files Perl and Python versions
How to use Serverless Framework & Python environment variables and manage stages
[Introduction to Python] How to use the in operator in a for statement?
[For beginners] How to register a library created in Python in PyPI
How to use an external editor for Python development with Grasshopper
How to use Python with Jw_cad (Part 2 Command explanation and operation)