Sequential Linear Quadratic Optimal Control for Nonlinear Switched Systems