This is a Python Gym environment to simulate a 6 degrees of freedom rocket.
- full 6DOF rocket landing environment
- realistic dynamics equation modeled on a rigid body assumption
- interactive 3D visualization through PyVista
- actuators available:
- thruster
- fins
- Wandb logging wrapper
The environment employes a continuous action space, with the engine allowed to throttle between maxThrust
and minThrust
. The thrust was normalized to lie in the range [-1, +1]
as best practice for convergence of the algorithms suggest. The engine is gimbaled by two angles
Research question:
- Is there a reduction in fuel consumption when the thruster is aided by fins? Quantify it.
-
Pitch plane (
x
-z
) corresponding toi={1,2}
: -
Yaw plane (
x
-y
) corresponding toi={3,4}
:
To compute the force generated by the fin i
in body axis we have to:
-
Neglecting wind, we can compute the air velocity of the center of mass of the vehicle as:
$$ \vec{v}^B_{air} = R_{I \rightarrow B}\vec{v}^I$$
-
Compute the velocity vector at each fin location
i
(denoted by itsposition vector
in body coordinates$\vec{x}^{B,i}$ ), taking into account the rotation of the rocket:$$ \vec{v}^{B,i}{air} = \vec{v}^B{air} + \vec{\omega}^B \times \left[ \vec{x}^{B,i} - \vec{x}^{B,CG}\right] $$
-
Compute the aerodynamic angles at the location of each fin
i
:-
x
-z
plane aerodynamic angle:$$\alpha^i = \arctan 2 \left[ \frac{v_z^{B,i}}{v_x^{B,i}} \right]$$ -
x
-y
plane aerodynamic angle:$$ \beta^i = \arcsin \left[ \frac{v_y^{B,i}}{||\vec{v}^{B,i}||} \right] $$
-
-
Input the angle of deflection from the longitudinal axis of the fin
$\beta_{fin,i}$ (i.e. the control input). -
Compute the angle of attack
$AoA$ of each fini
:-
Yaw plane (
x
-y
):$$AoA_i = -\beta_{fin,i} - \beta^i$$ -
Pitch plane (
x
-z
):$$AoA_i = \beta_{fin,i} - \alpha^i$$
-
-
Compute the aerodynamic pressure
$$q=\frac{1}{2}\rho(x)||\vec{\vec{v}^{B,i}_{air}}||$$ -
Compute the normal force coefficient
$C_f$ :$$ C_f(AoA_i)=\bar{C_f} \sin{AoA_i} $$
-
Compute the aerodynamic force at each fin
i
:-
Yaw plane (
x
-y
):$$ \vec{F}^B_{fin,i} = qS_{fin}C_f\left(AoA_i\right) \begin{bmatrix} \sin{\beta_{fin,i}} & \cos{\beta_{fin,i}} & 0 \end{bmatrix}^T$$
-
Pitch plane (
x
-z
):$$ \vec{F}^B_{fin,i} = qS_{fin}C_f\left(AoA_i\right) \begin{bmatrix} -\sin{\beta_{fin,i}} & 0 & \cos{\beta_{fin,i}} \end{bmatrix}^T$$
-
-
Compute the aerodynamic torque for each fin
i
:$$ M^i = \left[ \vec{x}^{B,i} - \vec{x}^{B,CG}\right] \times \vec{F}^B_{fin,i} $$