Solving Sub-Problem for OpenAI Lunar Lander v2: Seeking Advice

Click For Summary
SUMMARY

The forum discussion focuses on solving a sub-problem related to the OpenAI Lunar Lander v2 project, specifically in a 2D context. The user seeks assistance in determining the magnitudes of main engine thrust (Fe) and side engine thrust (Fs), as well as the tilted angle of the main engine nozzle (φ), based on given parameters such as expected accelerations (ax, ay), current mass (m), and moment of inertia (IC). The user presents a set of equations governing the dynamics of the lander, highlighting the complexity of solving for the unknowns. The discussion emphasizes the need for numerical methods to find solutions, with a preference for analytical approaches if feasible.

PREREQUISITES
  • Understanding of classical mechanics and dynamics
  • Familiarity with Newton's laws of motion
  • Knowledge of rotational dynamics and moment of inertia
  • Experience with numerical methods for solving equations
NEXT STEPS
  • Research numerical methods for solving nonlinear equations, such as the Newton-Raphson method
  • Explore the use of simulation tools like MATLAB or Python's SciPy for dynamic modeling
  • Learn about coordinate transformations in physics to simplify force and torque equations
  • Investigate analytical techniques for solving systems of equations in mechanics
USEFUL FOR

This discussion is beneficial for robotics engineers, physics students, and developers working on simulation projects involving dynamics and control systems, particularly those interested in aerospace applications.

genxium
Messages
137
Reaction score
2
I'm currently working on a pet project which is similar to the OpenAI Lunar Lander v2 (hence the problem is in a 2D context), and seeking help for a sub-problem that's been blocking me for a while.

At any instant of time, I'm to find
  • Fe: magnitude of main engine thrust, must be >0
  • Fs: magnitude of side engine thrust (>0 to point to the "right w.r.t. lander body", and < 0 to point to opposite direction),
  • φ: tilted angle of main engine nozzle w.r.t. lander body, should be within [-π/2, +π/2]

, given
  • ax: the expected x-acceleration of COG (center of gravity, same below)
  • ay: the expected y-acceleration of COG
  • βC: the expected angular acceleration w.r.t axis through COG and perpendicular to the plane (this screen)
  • m: current mass of the whole lander
  • IC: current moment of inertia of the whole lander w.r.t. same axis of βC
  • θ: current tilted angle of the lander body w.r.t. the fixed gravity direction
  • h: current distance of COG and the nozzle hinge as shown in the figure below
  • g: fixed gravity acceleration
  • H: total height of the lander body
lunarlander_rotation-lunarlander_forces.jpg


To my understanding, the dynamics are (don't know whether I can use TeX here, tried wrapping with $$ and ## but preview didn't work)
  • -Fe*sin(θ+φ) + Fs*cosθ = ax*m
  • Fe*cos(θ+φ) + Fs*sinθ - g*m = ay*m
  • Fe*sinφ*h + Fs*(H-h) = βC*IC
and the "to find variables (in red)" seem non-trivial to solve for.

Is there any advice for solving them at least numerically? An analytical solution will certainly be much appreciated but not a pursuit here.
 
Last edited:
Physics news on Phys.org
At a glance it appears your equations can be simplified a bit by expressing the force and torque equations using body coordinates in which input acceleration and gravity are rotated by ##\theta##.