Tutorial: Problem Set 6 - Numerical Methods J. Jerez Institut für Automatik ETH Zürich Spring Semester 2016 J. Jerez Tutorial: Problem Set 6 - Numerical Methods Spring Semester 2016 Example MPC problem min u s.t. N −1 X > (xk> Qxk + uk> Ruk ) + xN PxN k=0 umin ≤ uk ≤ umax xk+1 = Axk + Buk xmin ≤ xk ≤ xmax where 0.7115 A= 0.4345 −0.4345 , 0.8853 0.2173 0 B= , x0 = , 0.0573 6 −∞ ∞ umin = −5, umax = 5, xmin = , xmax = , −∞ ∞ 10 0 N = 10, Q = , R = 1, P = PLQR , 0 10 and in case of state constraints xmin,2 = 0 . J. Jerez Tutorial: Problem Set 6 - Numerical Methods Spring Semester 2016 Overview Develop algorithms in MATLAB Exercise 1 Exercise 2 Exercise 3 Use software to create production code controllers Exercise 4 J. Jerez Tutorial: Problem Set 6 - Numerical Methods Spring Semester 2016 Exercise 1 - Primal Gradient Method in MATLAB MATLAB programming exercise Write a solver based on the primal gradient method Solve input-constrained MPC problem formulated as a dense QP Analyze the sensitivity of the solver Use the lecture notes from this morning Suggested amount of time to solve the exercise: 45 min J. Jerez Tutorial: Problem Set 6 - Numerical Methods Spring Semester 2016 Exercise 2 - Barrier Interior-Point Method in MATLAB MATLAB programming exercise Write a solver based on the primal barrier interior-point method Test your solver on example random problems and visualize its behaviour Analyze the sensitivity of the solver Use the lecture notes from this morning Suggested amount of time to solve the exercise: 45 min J. Jerez Tutorial: Problem Set 6 - Numerical Methods Spring Semester 2016 Exercise 3 - Dual ADMM in MATLAB MATLAB programming exercise Write a solver based on the Alternating Direction Method of Multipliers Solve input- and state-constrained MPC problems formulated as sparse QPs Analyze the sensitivity of the solver Use the lecture notes from this morning Suggested amount of time to solve the exercise: 60 min J. Jerez Tutorial: Problem Set 6 - Numerical Methods Spring Semester 2016 Exercise 4 - Code Generation for Various Methods Software tools exercise Use different interfaces to generate high-performance C code based on the Primal-Dual Interior-Point Method and ADMM Solve input- and state-constrained MPC problems formulated as sparse QPs Compare the performance of different solvers Use online documentation C compiler needed Suggested amount of time to solve the exercise: 45 min J. Jerez Tutorial: Problem Set 6 - Numerical Methods Spring Semester 2016