Hacker News new | ask | show | jobs
by 4gotunameagain 1204 days ago
when discussing about optimality, it is worth specifying what are you optimising for.

time optimal landing lends techniques from bang-bang control (e.g. starting with v=0, max thrust towards the target, before flipping around half way and max thrust away from target)

fuel optimal landing (incuding RCS) technique would depend on the available time to turn retrograde (pointy end pointing away from direction of movement). if the duration before the decelerating burn is T1 (so t1 = t0+T1), the smallest possible rcs impulse would be applied so that at t1-T_st the lander is pointing retrograde (retrograde at t1), with T_st being the time needed to cancel the initial rcs impulse. For the deceleration of the lander, fuel optimal landing includes a single burn, constantly retrograde, so that at t_end the lander altitude is 0, and both the vertical and horizontal velocity components are 0.

The time t1 to start that burn depends on the maximum thrust available, the rate of mass change when firing the rocket (not modelled in the game), the initial velocity etc.

in this simple case, model predictive control is not needed, and an LQR (linear quadratic regulator) is sufficient to achieve optimality

source: rocket scientist with control theory background. I remember this example (a bit more realistically modelled) being a project during my studies

1 comments

In implementing an AI to achieve orbit in a Spacewar-style simulation with gravity, I ended up with a brute-force constraint optimizer that resembles MCP(I've never studied the theory): for each timestep, predict the solutions resulting for each combination of digital thrust inputs(left, right, forward, backwards). Then predict ahead several more steps with additional permutations of input. Then evaluate distance to goal and rank final solution by distance to target orbit and velocity match.

In doing this, it results in a few hundreds to thousands of solutions to test per timestep, which modern CPUs can shrug off easily. Not nearly as elegant as closed-form control theory systems, but easy to tune and give different goals.

replace the brute-force with a linear constraint solver, and you got yourself an MPC !

non-linear constraint solvers are not used because they cannot guarantee a time to solution, hence useless for control applications