# istellartech/OpenGoddard

Trajectory Optimization for Python
Python Makefile
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
 Failed to load latest commit information. OpenGoddard Mar 13, 2017 docs Mar 13, 2017 docs_sphinx Mar 13, 2017 examples Mar 24, 2017 .gitignore Mar 6, 2017 LICENSE.txt Mar 6, 2017 MANIFEST.in Mar 6, 2017 README.rst Mar 13, 2017 make_docs.py Mar 6, 2017 setup.cfg Mar 6, 2017 setup.py Mar 13, 2017

## OpenGoddard - Trajectory Optimization for Python

OpenGoddard is a open source python library designed for solving general-purpose optimal control problems. OpenGoddard is based on the pseudospectral optimal control theory.

### What sort of problems does OpenGoddard solve?

Generally speaking, it can adapt to open-loop nonlinear optimal control problems such as aerospace, robot, industry, energy, chemistry etc. In the field of aerospace, for example, it is possible to generate the optimum trajectory of the spacecraft.

### Examples

1. Brachistochrone problem
2. Goddard problem (optimal rocket ascent problem)
3. Launch vehicle trajectory optimization
4. Low thrust spacecraft trajectory transition problem

### Features

• Easy to install
• Lots of examples
• Pseudospectral method of Legendre-Gauss-Lobatto
• Pseudospectral knotting-method
• Easy to scale variable
• use SLSQP(in scipy) for solving nonlinear programming problem (NLP)

### Installation

```\$ pip install OpenGoddard
```

### Usage

```from OpenGoddard.optimize import Problem, Guess, Condition, Dynamics
```
1. Make object that has methods and variables to optimize trajectory
2. Equation of motion
3. Constraint
4. Evaluation function
5. Instantiation of Problem class
6. Installation of an object class that optimizes trajectory
7. Set canonical unit of optimization variable (optional)
8. Guess initial values and set it (optional)
9. Set Problem.functions and knotting condition
10. Solve
11. Post process (visualization)

## OpenGoddard - 連続時間の非線形最適制御問題のためのpythonライブラリ

OpenGoddardはオープンソースな連続時間の非線形最適制御問題を解くpythonライブラリです。 数値解法としては擬スペクトル法を採用しています。

### 例

1. 最速降下問題
2. ゴダード問題（ロケットの最適上昇制御問題）
3. ロケットの最適軌道生成
4. 低推力軌道遷移問題

### 特徴

• 簡単なインストール - pythonのnumpy, scipy, matplotlibにしか依存していません。
• 複数の例題
• ソースコードの高い可読性
• 非線形最適制御を数値解法のうち、直接法の中の擬スペクトル法を採用
• Legendre-Gauss-Lobattoの擬スペクトル法
• pseudospectral knotting-method
• 簡易な変数スケーリング
• 非線形計画問題（NLP）を解くのはScipyの逐次二次計画法（SLSQP）

### インストール

```\$ pip install OpenGoddard
```

### 使い方

```from OpenGoddard.optimize import Problem, Guess, Condition, Dynamics
```
1. 軌道の最適化をする物体クラスのメソッドと変数の記述
2. 運動方程式の関数
3. 拘束条件の関数
4. 評価関数の関数
5. Problemインスタンス生成
6. 軌道の最適化をする物体インスタンスの生成
7. 最適化変数の正規化のための単位設定（任意）
8. 初期値の推定と設置（任意）
9. 関数の指定とknotting条件の指定
10. solve
11. ポストプロセス（可視化）

### ライセンス

OpenGoddardはMITライセンスのオープンソースプロジェクトです。

### References

Fariba Fahroo and I. Michael Ross. "Costate Estimation by a Legendre Pseudospectral Method", Journal of Guidance, Control, and Dynamics, Vol. 24, No. 2 (2001), pp. 270-277. http://dx.doi.org/10.2514/2.4709

I. Michael Ross and Fariba Fahroo. "Pseudospectral Knotting Methods for Solving Nonsmooth Optimal Control Problems", Journal of Guidance, Control, and Dynamics, Vol. 27, No. 3 (2004), pp. 397-405. http://dx.doi.org/10.2514/1.3426

Qi Gong, Fariba Fahroo, and I. Michael Ross. "Spectral Algorithm for Pseudospectral Methods in Optimal Control", Journal of Guidance, Control, and Dynamics, Vol. 31, No. 3 (2008), pp. 460-471. http://dx.doi.org/10.2514/1.32908

Isaac Ross, Christopher D'Souza, Fariba Fahroo, and Jim Ross. "A Fast Approach to Multi-Stage Launch Vehicle Trajectory Optimization", AIAA Guidance, Navigation, and Control Conference and Exhibit, Guidance, Navigation, and Control and Co-located Conferences, http://dx.doi.org/10.2514/6.2003-5639

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

Rao, Anil V., et al. "Algorithm 902: Gpops, a matlab software for solving multiple-phase optimal control problems using the gauss pseudospectral method." ACM Transactions on Mathematical Software (TOMS) 37.2 (2010): 22. http://s3.amazonaws.com/researchcompendia_prod/articles/595f4b3cca056a0f35655cad73868234-2013-12-23-01-43-18/a22-rao.pdf