PlanetPhysics/2D With Drag Airship Optimal Control

2D with Drag and No Wind
{\mathbf Disclaimer}: This is a work in progress... \\

The force due to drag in 2D is given by

$$F_d = \frac{1}{2} C_d \rho A v^2$$

Unlike the 1D case, which uses the absolute value, the direction of the drag force in 2D is taken into account by the magnitude of the velocity times the component velocities such that the x and y components of the drag force are

$$F^x_d = -\frac{1}{2} C_d \rho A \dot{x} \sqrt{\dot{x}^2 + \dot{y}^2}$$ $$F^y_d = -\frac{1}{2} C_d \rho A \dot{y} \sqrt{\dot{x}^2 + \dot{y}^2}$$

The equations of motion for this problem are

$$\dot{x} = \dot{x}$$ $$\dot{y} = \dot{y}$$ $$\ddot{x} = F^x_d + \frac{T}{m} \cos \alpha$$ $$\ddot{y} = F^y_d + \frac{T}{m} \sin \alpha$$

where T is the applied Torque in Newtons, $$\alpha$$ is the angle of applied torque counter clockwise from the negative x-axis and $$m$$ is the mass of the airship.

The performance measure for the minimum energy problem assuming there is no effort required to change the angle of attack

$$ J = \int_0^{t_f} \frac{T^2}{m^2} dt $$

The Hamiltonian for this optimal control problem

$$ \mathcal{H} = \frac{T^2}{m^2} + p_1 \dot{x} + p_2 \dot{y} + p_3 \left ( F^x_d + \frac{T}{m} \cos \alpha \right) + p_4 \left ( F^y_d + \frac{T}{m} \sin \alpha \right ) $$ The neccessary conditions for the unconstrained control inputs

$$ \frac{\partial \mathcal{H}}{\partial \alpha} = 0 $$ $$ \frac{\partial \mathcal{H}}{\partial T} = 0 $$ \\ $$ \frac{\partial \mathcal{H}}{\partial \alpha} = -p_3 \frac{T}{m} \sin \alpha + p_4 \frac{T}{m} \cos \alpha = 0$$ $$ \frac{p_4 T}{m}\cos \alpha = \frac{p_3 T}{m} \sin \alpha $$ $$ \frac{p_4}{p_3} = \frac{\sin \alpha}{\cos \alpha} $$ $$ \tan \alpha = \frac{p_4}{p_3} $$

$$ \frac{\partial \mathcal{H}}{\partial T} = \frac{2T}{m^2} + \frac{p_3}{m} \cos{\alpha} + \frac{p_4}{m}{sin \alpha} = 0 $$ $$ \frac{2T}{m} + p_3 \cos{\alpha} + p_4{sin \alpha} = 0 $$ $$ \frac{2T}{m} = -\left (p_3 \cos{\alpha} + p_4{sin \alpha} \right ) $$ $$ T = -\frac{m}{2}\left (p_3 \cos{\alpha} + p_4{sin \alpha} \right ) $$

The neccessary conditions for the costates are

$$ \dot{p_1} = -\frac{\partial \mathcal{H}}{\partial x} = 0 $$ $$ \dot{p_2} = -\frac{\partial \mathcal{H}}{\partial y} = 0 $$ $$ \dot{p_3} = -\frac{\partial \mathcal{H}}{\partial \dot{x}} = -p_1 + \frac{1}{2} p_3 C_d \rho A \sqrt{\dot{x}^2 + \dot{y}^2} + \frac{p_3 C_d \rho A \dot{x}^2}{\sqrt{\dot{x}^2 + \dot{y}^2}} +  \frac{p_4 C_d \rho A \dot{x} \dot{y}}{\sqrt{\dot{x}^2 + \dot{y}^2}} $$ $$ \dot{p_4} = -\frac{\partial \mathcal{H}}{\partial \dot{y}} = -p_2 + \frac{1}{2} p_4 C_d \rho A \sqrt{\dot{x}^2 + \dot{y}^2} + \frac{p_4 C_d \rho A \dot{y}^2}{\sqrt{\dot{x}^2 + \dot{y}^2}} +  \frac{p_3 C_d \rho A \dot{x} \dot{y}}{\sqrt{\dot{x}^2 + \dot{y}^2}} $$