4th April 2005 Colloquium on Predictive Control, Sheffield 1 Nonlinear Model Predictive Control using Automatic Differentiation Yi Cao Cranfield University,

Slides:



Advertisements
Similar presentations
Courant and all that Consistency, Convergence Stability Numerical Dispersion Computational grids and numerical anisotropy The goal of this lecture is to.
Advertisements

Multi-Layer Perceptron (MLP)
Yi Heng Second Order Differentiation Bommerholz – Summer School 2006.
Chapter 6 Differential Equations
Colloquium on Optimization for Control 1 Dynamic Optimization and Automatic Differentiation Yi Cao School of Engineering Cranfield University.
Zhen Lu CPACT University of Newcastle MDC Technology Reduced Hessian Sequential Quadratic Programming(SQP)
Running a model's adjoint to obtain derivatives, while more efficient and accurate than other methods, such as the finite difference method, is a computationally.
July 31, 2013 Jason Su. Background and Tools Cramér-Rao Lower Bound (CRLB) Automatic Differentiation (AD) Applications in Parameter Mapping Evaluating.
EKF, UKF TexPoint fonts used in EMF.
P. Venkataraman Mechanical Engineering P. Venkataraman Rochester Institute of Technology DETC2014 – 35148: Continuous Solution for Boundary Value Problems.
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Prof. Chung-Kuan Cheng 1.
Dynamics of Learning VQ and Neural Gas Aree Witoelar, Michael Biehl Mathematics and Computing Science University of Groningen, Netherlands in collaboration.
Ordinary Differential Equations
July 11, 2006 Comparison of Exact and Approximate Adjoint for Aerodynamic Shape Optimization ICCFD 4 July 10-14, 2006, Ghent Giampietro Carpentieri and.
P. Venkataraman Mechanical Engineering P. Venkataraman Rochester Institute of Technology DETC2011 –47658 Determining ODE from Noisy Data 31 th CIE, Washington.
Engineering Optimization – Concepts and Applications Engineering Optimization Concepts and Applications Fred van Keulen Matthijs Langelaar CLA H21.1
Classification and Prediction: Regression Via Gradient Descent Optimization Bamshad Mobasher DePaul University.
1cs542g-term Notes  Extra class this Friday 1-2pm  Assignment 2 is out  Error in last lecture: quasi-Newton methods based on the secant condition:
280 SYSTEM IDENTIFICATION The System Identification Problem is to estimate a model of a system based on input-output data. Basic Configuration continuous.
Supervised learning 1.Early learning algorithms 2.First order gradient methods 3.Second order gradient methods.
INTEGRATED DESIGN OF WASTEWATER TREATMENT PROCESSES USING MODEL PREDICTIVE CONTROL Mario Francisco, Pastora Vega University of Salamanca – Spain European.
NORM BASED APPROACHES FOR AUTOMATIC TUNING OF MODEL BASED PREDICTIVE CONTROL Pastora Vega, Mario Francisco, Eladio Sanz University of Salamanca – Spain.
Before we start ADALINE
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
CHAPTER 11 Back-Propagation Ming-Feng Yeh.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Taylor Series.
A Brief Overview of Methods for Computing Derivatives Wenbin Yu Department of Mechanical & Aerospace Engineering Utah State University, Logan, UT.
A Framework for Distributed Model Predictive Control
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
Computing a posteriori covariance in variational DA I.Gejadze, F.-X. Le Dimet, V.Shutyaev.
SIS Sequential Importance Sampling Advanced Methods In Simulation Winter 2009 Presented by: Chen Bukay, Ella Pemov, Amit Dvash.
Nonlinear least squares Given m data points (t i, y i ) i=1,2,…m, we wish to find a vector x of n parameters that gives a best fit in the least squares.
Computational Methods for Design Lecture 4 – Introduction to Sensitivities John A. Burns C enter for O ptimal D esign A nd C ontrol I nterdisciplinary.
Efficient Integration of Large Stiff Systems of ODEs Using Exponential Integrators M. Tokman, M. Tokman, University of California, Merced 2 hrs 1.5 hrs.
Integration of 3-body encounter. Figure taken from
Derivatives In modern structural analysis we calculate response using fairly complex equations. We often need to solve many thousands of simultaneous equations.
Scientific Computing Numerical Solution Of Ordinary Differential Equations - Euler’s Method.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Optimization & Constraints Add mention of global techiques Add mention of calculus.
Efficient computation of Robust Low-Rank Matrix Approximations in the Presence of Missing Data using the L 1 Norm Anders Eriksson and Anton van den Hengel.
Xianwu Ling Russell Keanini Harish Cherukuri Department of Mechanical Engineering University of North Carolina at Charlotte Presented at the 2003 IPES.
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Texas A&M University, Department of Aerospace Engineering AN EMBEDDED FUNCTION TOOL FOR MODELING AND SIMULATING ESTIMATION PROBLEMS IN AEROSPACE ENGINEERING.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Perfidious Polynomials and Elusive Roots Zhonggang Zeng Northeastern Illinois University Nov. 2, 2001 at Northern Illinois University.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Numerical Analysis. Numerical Analysis or Scientific Computing Concerned with design and analysis of algorithms for solving mathematical problems that.
Chapter 2-OPTIMIZATION G.Anuradha. Contents Derivative-based Optimization –Descent Methods –The Method of Steepest Descent –Classical Newton’s Method.
Dr. Mujahed AlDhaifallah ( Term 342)
2/25/2001Industrial Process Control1 Dynamic Matrix Control - Introduction Developed at Shell in the mid 1970’s Evolved from representing process dynamics.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Ordinary Differential Equations
NUMERICAL DIFFERENTIATION or DIFFERENCE APPROXIMATION Used to evaluate derivatives of a function using the functional values at grid points. They are.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Anders Nielsen Technical University of Denmark, DTU-Aqua Mark Maunder Inter-American Tropical Tuna Commission An Introduction.
1 Nonlinear Sub-optimal Mid Course Guidance with Desired Alinement using MPQC P. N. Dwivedi, Dr. A.Bhattacharya, Scientist, DRDO, Hyderabad-,INDIA Dr.
Numerical Methods for Inverse Kinematics Kris Hauser ECE 383 / ME 442.
Part 7 - Chapter 25.
Class Notes 18: Numerical Methods (1/2)
Collaborative Filtering Matrix Factorization Approach
Part 7 - Chapter 25.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L2.
August 8, 2006 Danny Budik, Itamar Elhanany Machine Intelligence Lab
Computer Animation Algorithms and Techniques
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Derivatives and Gradients
Presentation transcript:

4th April 2005 Colloquium on Predictive Control, Sheffield 1 Nonlinear Model Predictive Control using Automatic Differentiation Yi Cao Cranfield University, UK

4th April 2005Colloquium on Predictive Control, Sheffield2 Outline  Computation in MPC  Dynamic Sensitivity using AD  Nonlinear Least Square MPC  Error Analysis and Control  Evaporator Case Study  Performance Comparison  Conclusions

4th April 2005Colloquium on Predictive Control, Sheffield3 Computation in Predictive Control  Predictive control: at t k, calculate OC for t k · t· t k+P, apply only u(t k ), repeat at t k+1  Prediction: online solving ODE  Optimization: repeat prediction, sensitivity required.  Typically, over 80% time spend on solving ODE + sensitivity

4th April 2005Colloquium on Predictive Control, Sheffield4 Current Status  Linear MPC successfully used in industry  Most systems are nonlinear. NMPC desired.  Computation: solving ODE and NLP online.  Difficult to get gradient for large ODE systems.  Finite difference: inefficient and inaccurate  Sensitivity equation: n×m ODE’s  Adjoint system: TPB problem  Other methods: sequential linearization and orthogonal collocation

4th April 2005Colloquium on Predictive Control, Sheffield5 Automatic Differentiation  Limitation of finite and symbolic difference  Function = sequence of fundamental OP  Derivatives of fundamental OP are known  Numerically apply chain rules  Basic modes: forward and reverse  Implementation:  operating overloading  Source translation

4th April 2005Colloquium on Predictive Control, Sheffield6 ODE and Automatic Differentiation  z(t)=f(x), x(t)=x 0 +x 1 t+x 2 t 2 +…+x d t d  z(t)=z 0 +z 1 t+z 2 t 2 +…+z d t d  AD forward: z k = z k (x 0,x 1,…,x k )  AD reverse:  z k /  x j =  z k-j /  x 0 = A k-j  f’(x)=A 0 +A 1 t+  +A d t d  ODE: dx/dt=f(x), dx/dt=z(t), x k+1 =z k /(k+1).  x 0 =x(t 0 ), x 1 =z 0 (x 0 ), x 2 =z 1 (x 0,x 1 ), …  Sensitivity: B k =dx k /dx 0 =1/k  k i=0 A k-i-1 B i, B 0 =I  dB/dt=f’(x), B=B 0 +B 1 t+  +B d t d  x(t 0 +1)=  d i=0 x i, dx(t 0 +1)/dx 0 =  d i=0 B i

4th April 2005Colloquium on Predictive Control, Sheffield7 Non-autonomous Systems I  For control systems: dx/dt=f(x,u)  u(t)=u 0 +u 1 t+u 2 t 2 +…+u d t d  (x 0, u(t)) → x(t), dx(t)/du k =?  Method I: Augmented system:  dv 1 /dt=v 2, …, dv d+1 /dt=0, v k+1 (t 0 )=u k, u=v 1  X=[x T v T ] T, dX/dt=F(X) (autonomous)  High dimension system, n+md  Not suitable for systems with large m

4th April 2005Colloquium on Predictive Control, Sheffield8 Non-autonomous Systems II  Method II: nonsquare AD  Let v=[u 0 T, u 1 T, …, u d T ] T  x k+1 = z k (x 0,x 1,…,x k,v)/(k+1)  A k =[A kx | A kv ] := [  z k /  x 0 |  z k /  v]  B k =[B kx | B kv ] := [dx k /dx 0 | dx k /dv]  B k = A k-1 +  k-1 j=1 A (k-j-1)x B j, B 0 =[I | 0]  x(t 0 +1)=  d k=0 x k,  dx(t 0 +1)/dv=  d k=0 B kv, dx(t 0 +1)/dx(t 0 )=  d k=0 B kx

4th April 2005Colloquium on Predictive Control, Sheffield9 Nonlinear Least Square MPC  Φ=½∑ P k=0 (x(t k )-r k ) T W k (x(t k )-r k ) s.t. dx/dt=f(x,u,d), t  [t 0, t P ], x(t 0 ) given, u j =u(t j )=u(t), t  [t j, t j+1 ], u j =u M-1, j  [M, P-1], L≤u≤V, scale  t=t j+1 -t j =1.  Nonlinear LS: min L≤U≤V Φ=½E(U) T E(U)  Jacobian: J(U)=∂E/∂U  Gradient: G(U)=J T (U)E(U)  Hessian: H(U)=J T (U)J(U)+Q(U)≈J T (U)J(U)

4th April 2005Colloquium on Predictive Control, Sheffield10 ODE and Jacobian using AD  Efficient algorithm requires efficient J(U)  Difficult: E(U) is nonlinear dynamic  J i,j =W i ½ dx(t i )/du j-1 for i≥j, otherwise, J i,j =0  Algorithm: for k=0:P-1, x 0 =x(t k )  Forward AD: x i, i=1,…,d, → x(t k+1 )  Reverse AD: A ix, A iu  Accumulate: B ix, B iu, → B u (k)=  B iu, B x (k)=  B ix  J (k+1)j =W k+1 ½ B x (k)…B x (j)B u (j-1), j=1,…,k+1  K=k+1

4th April 2005Colloquium on Predictive Control, Sheffield11 NLS MPC using AD  Collect information: x, d, r, etc.  Nonlinear LS to give a guess u  Solve ODE and calculate J  Update u and check convergence  Implement the first move

4th April 2005Colloquium on Predictive Control, Sheffield12 Error Analysis  Taylor coefficients by AD is accurate.  x(t k )=  x k has truncation error, e k (local).  e k will propagated to k+1, …, P (global).  Local error controllable by order and step  Global error depend on sensitivity dx k1 /dx k  Remainder:  k ≈C(h/r) k+1  Convergence radius: r ≈ r k =|x k-1 |/|x k |   k-1 =  k (r/h)=  k +|x k | →  k =|x k |/(r/h-1)

4th April 2005Colloquium on Predictive Control, Sheffield13 Error Control  Tolerance  <  d  Increase order, d or decrease step, h?  Decrease h by h/c (c>1):  =  d (1/c) d+1  c=(  d /  ) 1/(d+1), increase op by factor c  Increase d to d+p (p>0):  =  d (h/r) p  p=ln(  /  )/ln(h/r), increase op by (1+p/d) 2  c<(1+p/d) 2 decrease h,  otherwise increase d

4th April 2005Colloquium on Predictive Control, Sheffield14 Case Study  Evaporator process Evaporator process Evaporator process  3 measurable states: L2, X2 and P2  3 manipulates: 0≤F2≤4, 0≤P100,F200≤400  Set point change:X2 from 25% to 15% P2 from 50.5 kPa to 70 kPa  Disturbance: F1, X1, T1 and T200  20%  All disturbance unmeasured.  T=1 min, M=5 min, P=10 min, W=[100,1,1]

4th April 2005Colloquium on Predictive Control, Sheffield15 Evaporation Process

4th April 2005Colloquium on Predictive Control, Sheffield16 Simulation Results

4th April 2005Colloquium on Predictive Control, Sheffield17 Performance Comparison  CVODES, a state-of-the-art solver for dynamic sensitivity.  Simultaneously solves ODE and sensitivity  Two approaches: full & partial integration.  Three approaches programmed in C  Tested on Windows XP P-IV 2.5GHz  Solve evaporator ODE + sensitivity using input generated by NMPC.

4th April 2005Colloquium on Predictive Control, Sheffield18 Accuracy and Efficiency Taylor AD CVODES P CVODES F ToldtimeerrortimeerrortimeError 1e e e e-3 1e e e e-5 1e e e e-6 1e e e e-11

4th April 2005Colloquium on Predictive Control, Sheffield19 Conclusions  AD can play an important role to improve nonlinear model predictive control  Efficient algorithm to integrate ODE at the same time to calculate sensitivity  Error analysis and control algorithm  Efficiency validated via comparison with state-of-the-art software.  Satisfactory performance with Evaporator study