SMS: Optimal control and estimation