Notebook 7.3 - Tutorial Solutions using Python and Gekko

Question 1

The following equations describe the movement of a vehicle:

(1)dxdt=vcosθ(2)dydt=vsinθ(3)dvdt=av(4)dvdt=h(x,y)+ueub+f(v)(5)dθdt=ϕ

where x,y denote the position of the vehicle, v is velocity and acceleration is a. For simplicity, ue and ub are combined into a single variable uv. In addition, a region is created that must be avoided based on the grid for part c). The region is represented as 3 circular obstacles of radius = 6.5. The following equation is used to ensure the vehicle does not collide with the obstacle:

(6)(xxo)2+(yyo)2ro2

Question 2

The following equations describe the movement of the rocket:

(7)dsdt=v(8)dvdt=u0.2v2mv(9)dmvdt=0.01u2

where x denotes the position of the rocket, v is velocity and fuel mass is mv. The propulsion force u controls the vehicle movement.