Hamiltonian Decomposition for Online Implementation of Model Predictive Control

Hamiltonian Decomposition for Online Implementation of Model Predictive Control

Hamiltonian Decomposition for Online Implementation of Model Predictive Control A thesis submitted to the University of Manchester for the degree of Doctor of Philosophy in the Faculty of Science and Engineering 2018 Eduardo N. Poupard Supervised by Prof. William P. Heath School of Electrical and Electronic Engineering Contents 1 Introduction 17 1.1 Background and motivation . 17 1.2 Statement of originality and thesis outline . 18 1.2.1 Part I . 19 1.2.2 Part II . 19 1.2.3 Part III . 21 1.2.4 Additional work . 22 1.2.5 Mathematical tools . 22 I Unconstrained Optimal Control Problem 23 2 Free-final State Optimal Control Problem 24 2.1 Continuous-time analysis . 24 2.1.1 Problem formulation . 24 2.1.2 Two-point boundary-value problem . 25 2.2 Discrete-time analysis . 26 2.2.1 Problem formulation . 27 2.2.2 Two-point boundary-value problem . 28 3 Linear Quadratic Regulator 29 3.1 Finite-horizon formulation . 29 3.1.1 Linear system of equations . 31 3.2 Solution via Riccati equation . 32 3.2.1 Derivation via linear system of equations . 33 3.3 Solution via eigenvalue decomposition . 34 3.3.1 Receding horizon control implementation . 37 3.3.2 The case of A being singular . 38 4 LQ Tracking Problem 41 4.1 Finite-horizon formulation . 41 4.1.1 Linear system of equations . 42 4.2 Solution via Riccati equation . 43 4.2.1 Derivation via linear system of equations . 44 4.3 Solution via eigenvalue decomposition . 46 4.3.1 Receding horizon control implementation . 49 2 II Constrained Optimal Control Problem 52 5 Model Predictive Control Framework 53 5.1 Fundamentals . 54 5.1.1 Sparse formulation . 55 5.1.2 Necessary conditions . 57 5.2 Interior point method . 57 5.2.1 Primal-dual interior point algorithm . 58 5.2.2 Mehrotra's predictor-corrector algorithm . 59 6 Newton system factorization 62 6.1 General system decomposition . 62 6.1.1 Hamiltonian decomposition . 64 6.2 Riccati recursion method . 66 6.2.1 Algorithm . 68 6.2.2 Numerical example . 69 6.3 Eigenvalue factorization method . 70 6.3.1 Algorithm . 70 6.4 Splitting method implementation . 72 6.4.1 Algorithms . 74 6.4.2 Numerical experiment . 75 7 Fast Hamiltonian/GMRES solver 79 7.1 Incomplete LU factorization . 80 7.1.1 Tailor-made preconditioners . 80 7.2 Companion-like matrix . 83 7.2.1 Algorithm . 86 7.2.2 Recursion sequence structure on the companion-like matrix . 87 7.2.3 Nonsingular matrix ZN guarantee . 88 7.2.4 Flop count . 89 7.2.5 Direct method comparison . 90 7.3 GMRES method application . 91 7.3.1 Convergence . 92 7.3.2 Algorithm . 94 7.3.3 Flop count . 94 7.4 Numerical experiments . 96 7.4.1 Experiment 1: Feasibility . 96 7.4.2 Experiment 2: Convergence verification under rounding errors . 97 7.4.3 Experiment 3: Convergence subject to different horizons . 99 7.4.4 Experiment 4: Comparison . 100 7.4.5 Experiment 5: Numerical issue . 102 7.5 The case of A being singular . 105 7.5.1 Formulation . 105 7.5.2 Numerical example . 106 7.5.3 Eigenvalue trajectories . 108 3 7.5.4 Convergence experiment . 109 8 Conclusions of part I and II 112 8.1 Comments on novel methods (part I) . 112 8.2 Further work on novel methods (part II) . 113 8.2.1 On the splitting methods . 113 8.2.2 On the Hamiltonian recursion solver . 113 8.2.3 On the Hamiltonian/GMRES solver . 114 III Embedded Model Predictive Control 115 9 Festo AG & Co.KG Collaboration 116 9.1 The Company . 116 9.2 Why Model Predictive Control (MPC)? . 117 9.2.1 MPC offered by major control-systems vendors . 118 9.3 Programmable Logic Controller platform (PLC) . 120 9.3.1 Embedded MPC on PLCs . 120 9.3.2 Comparison between different PLC platforms . 121 9.3.3 Some commercial embedded APC software for PLCs . 122 10 Optimization Solver Engine 123 10.1 Tracking and Disturbances Framework on MPC . 123 10.1.1 Coordinate transformation and steady-state target problem . 124 10.1.2 Dynamic regulation problem . 125 10.1.3 Constant disturbances and zero offset . 125 10.2 Case Study: Flotation-Cell System . 127 10.2.1 Single-tank model . 128 10.3 Numerical experiment: Flotation-cell system . 130 10.3.1 Control design objective and settings . 131 10.3.2 Simulation . 133 10.4 Optimization Code Generation . 136 11 Hardware-in-the-loop Test (HIL) 138 11.1 PLCs Test Rig . 138 11.1.1 HIL test diagram . 139 11.2 Industrial experiment 1: Flotation-cell system . 140 11.2.1 Feasibility of the Hamiltonian recursion method . 140 11.2.2 Hamiltonian Recursion vs. Riccati Recursion . 143 11.3 Industrial experiment 2: Continuous stirred tank reactor (CSTR) . 146 11.3.1 Control design objective and settings . 147 11.3.2 Simulation . 149 11.3.3 Real-time controller test . 151 12 Conclusions of part III 153 12.1 Further work . 153 4 A Relevant code for parts II and III 155 A.1 HQ preconditioner function . 155 A.2 D~hqr companion-like matrix recursion function . 157 A.3 D~hqr companion-like vector recursion function . 159 A.4 HR preconditioner function . 160 A.5 Application of GMRES method for companion-like matrix D~hqr ....... 161 A.6 S-Function for Flotation-cell system . 163 A.7 S-Function for Continuous stirred tank reactor (CSTR) . 165 B Double-tank model 167 54; 359 words 5 List of Figures 1.1 Layout of the novel contribution presented in part II, and its place within the Model Predictive Control (MPC) framework. 21 3.1 Computation of gain matrix P1 for the receding horizon control on the LQR. Comparison between the Riccati equation (red) and the eigendecomposition approach from Algorithm 3.2 (blue). 38 4.1 Computation of gain matrix P1 and gain vector π1 for the receding hori- zon control on the LQ tracking problem. Comparison between the Riccati equation (red) and the eigendecomposition approach from Algorithm 4.2 (blue). 51 6.1 Simulation with MPC controller using the Riccati recursion method. 69 6.2 Comparison of the computational time during the simulation of the online part of the MPC controller using the Riccati recursion and eigenvalue method. 76 6.3 Convergence of a naive implementation of the splitting method on system (6.23). The number of iterations on the splitting method was set at i = 30. Each line represents a vector whose length is the number of k−iterations of the Mehrotra's algorithm (Algorithm 5.1). The elements of the vector correspond to the residual norm after i−iterations. 78 7.1 Relative error corresponding to the optimal solution vector, p = [x; u; λ, µ, t], during a closed-loop MPC simulation on a second order plant. The x axis corresponds to the sample time t. The y axis represents the interior-point iterations, k. The relative error (z axis) is computed by ρ = kpcom − prick1=kprick1 at each (t; k)........................... 90 7.2 Comparison of the computational time during the simulation of the MPC controller on system (7.1) between the Hamiltonian recursion (blue) and the Riccati recursion (red) methods. 91 7.3 MPC simulation for the oscillating-masses example with nx = 40 states using the Hamiltonian/GMRES solver within an interior-point algorithm. First plot shows the evolution of the states xk subject to constraints, with initial conditions xk = 3:5 for the displacements, and xk = 0 for the veloci- ties. Second plot shows the profile of the control inputs subject to constraints. 97 6 7.4 Convergence of the Hamiltonian/GMRES solver for the oscillating-masses example with nx = 40 states..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    175 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us