Optimal propellant control in hybrid rocket engines