Juraj Števek Intelligent Embedded Systems. Dissertation thesis

Size: px
Start display at page:

Download "Juraj Števek Intelligent Embedded Systems. Dissertation thesis"

Transcription

1 Juraj Števek Intelligent Embedded Systems Dissertation thesis SLOVAK UNIVERSITY OF TECHNOLOGY BRATISLAVA, SLOVAKIA SEPTEMBER 2

2

3 Juraj Števek Intelligent Embedded Systems Dissertation thesis This thesis is submitted in fulfilment of the requirements for the degree of philosophiae doctor (PhD.) in the field of Applied Informatics Study program: Applied Informatics Institute of Applied Informatics Faculty of Informatics and Information Technologies Slovak University of Technology Supervisor: Prof. Štefan Kozák September 2

4 Author: Juraj Števek Faculty of Informatics and Information Technologies Slovak University of Technology Ilkovičová Bratislava, Slovakia Supervisor: Reviewers: Prof. Štefan Kozák (Slovak University of Technology, Bratislava) Assoc. Prof. Ivan Sekaj (Slovak University of Technology, Bratislava) Assoc. Prof. Tibor Krajčovič (Slovak University of Technology, Bratislava) Keywords: embedded system, neural network, orthogonal polynomials, multiparametric programming, non-linear system, PWA approximation, hybrid system, model predictive control ACM Subject Classification: G..2 [Approximation] Linear approximation; G..6 [Optimization] Integer programming, Constrained optimization; G.4 [Mathematical Software] Algorithm design and analysis; I.6.7 [Simulation and Modeling] Simulation support systems; I.6.4 [Simulation and Modeling] Model validation and analysis; I.2.6 [Artificial Intelligence] Parameter learning; Copyright 2 by Juraj Števek Slovak University of Technology, Bratislava, Slovakia All rights reserved. Subject to exceptions provided for by law, no part of this thesis may reproduced, stored in retrieval systems, or transmitted in any form by any means, mechanical, photocopying, recording, or otherwise, without written consent of the author. No part of this publication may be adapted in whole or in part without the prior written permission of the author.

5 Abstract This thesis describes a modelling method for a non-linear system which is based on a multi-point linear approximation for a model predictive control purpose. The method is derived from artificial neural network techniques and exploits good properties of a Orthogonal Activation Function based Neural Network (OAF-NN). According to the proposed procedure, a software implementation is discussed in form of a Matlab toolbox. The Matlab toolbox serves as fast and user-friendly tool for identification, simulation and analysis of a static or a dynamic system. Model predictive control (MPC) is one of the widespread modern control principle in area of applied informatics. In recent years, the range of applications of MPC has been extended from constrained linear time-invariant system (LTI) to non-linear, so-called hybrid systems. A hybrid system is a dynamic system that exhibits both continuous and discrete dynamic behavior - a system that can both flow and jump. When this extension is made, binary variables are introduced in the problem. As a consequence, the Quadratic programming (QP) problem has to be replaced by a far more challenging Mixed Integer Quadratic Programming (MIQP) problem. Generally, for this type of optimization problems, the computational complexity is exponential in the number of binary optimization variables. There are many problems related to a algorithm design for a hardware platform with limited resources, i.e low frequency (tenths of Mhz) and limited program memory (kilobytes). Such limitations disqualify the platform from use of a sophisticated and a complex MPC based algorithms. In literature, many advance control algorithms were developed that accept the limitations. In this thesis, we describe a technique of a Explicit-MPC (EMPC) which performance, ease of implementation and extension for the hybrid system gives promising direction of the algorithm design for the embedded systems (ES). The proposed modelling procedure is characterized by fast training property and wide applicability in medical systems, automotive, power-electronics industry etc.. Linearity of the model allows to transform into a Piecewise Affine (PWA) system structure and to exploit existing algorithms for the EMPC design. The applicability of the technique was evaluated on the hybrid system examples from automotive and thermal industry by means of existing software tools for MPC design.

6

7 Juraj Števek Inteligentné vnorené systémy Dizertačná práca Dizertačná práca na získanie vedecko-akademickej hodnosti philosophiae doctor (PhD.) v odbore Aplikovaná Informatika Študijný program: Aplikovaná Informatika Ústav Aplikovanej Informatiky Fakulta Informatiky a Informačných Technológií Slovenská Technická Univerzita Školiteľ: Prof. Štefan Kozák September 2

8 Autor: Juraj Števek Fakulta Informatiky a Informačných Technológií Slovenská Technická Univerzita Ilkovičová Bratislava, Slovensko Školiteľ: Prof. Štefan Kozák (Slovak University of Technology, Bratislava) Oponenti: Doc. Ing. Ivan Sekaj, Ph.D. (Slovenská Technická Univerzita, Bratislava) Doc. Ing. Tibor Krajčovič, Ph.D. (Slovenská Technická Univerzita, Bratislava) Kľúčové slová: vnorený systém, neurónová sieť, ortogonálne polynómy, multiparametrické programovanie, nelineárny systém, lineárna aproximácia, hybridný system, prediktívne riadenie ACM Klasifikácia pojmov: G..2 [Aproximácia] Lineárna aproximácia; G..6 [Optimalizácia] Celočíselné programovanie, Optimalizácia; G.4 [Mathematický Softvér] Analýza a návrh algoritmov; I.6.7 [Modelovanie a Simulácia] Programové podporné systémy; I.6.4 [Modelovanie a Simulácia] Analýza a overenie modelu; I.2.6 [Umelá inteligencia] Idenifikácia parametrov; Copyright 2 by Juraj Števek Slovenská Technická Univerzita v Bratislave, Slovensko Všetky práva vyhradené. Reprodukcia, prenos, šírenie, alebo ukladanie časti alebo celého obsahu tejto práce v akejkoľvek forme bez predchádzajúceho písomného súhlasu autora je zakázané.

9 Abstrakt Práca sa venuje modelovaniu nelineárnych systémov. Práca opisuje nový prístup viacbodovej linearizácie pre účely prediktívneho riadenia. Prezentovaná metóda je odvodená z teórie umelých neurónových sieti a využíva dobré vlastnosti neurónovej siete s ortogonálnymi aktivačnými funkciami (OAF-NN). Navrhnutý linearizačný prístup bol implementovaný vo forme Matlab toolbox-u. Súčasťou toolbox-u je GUI aplikácia, ktorá slúži ako rýchly a uživateľsky jednoduchy nástroj pre identifikáciu, simuláciu a analýzu statických a dynamických systémov. Prediktívne riadenie (MPC) je jedným z najrozšírenejších moderných princípov rozhodovania v oblasti aplikovanej informatiky. V poslednom období boli navrhnuté rozšírenia tradičného MPC pre nelineárne systémy, tzv. hybridné systémy. Hybridný systém je dynamický systém, ktorý sa vyznačuje spojitým aj skokovým správaním. Pri tomto rozšírení sú do optimalizačnej úlohy zahrnuté binárne premenné. Úloha kvadratického programovania rozšírená o binárne premenné sa mení na náročný optimalizačný problém zmiešaného celočíselného programovania. Výpočtová náročnosť takejto úlohy rastie exponenciálne s každou pridanou optimalizačnou premennou. S vývojom algoritmov pre mikropočítačové platformy s nízko frekvenciou (desiatky Mhz) a s malou operačnou pamäťou (rádovo kb) súvisia viaceré problémy. Takéto ohraničenia diskvalifikujú tieto systémy pri použití vyspelých a komplexných algoritmov. V literatúre bolo publikovaných množstvo riadiacich prístupov, ktoré rešpektujú spomenuté ohraničenia. Táto práca sa venuje technike Explicit-MPC (EMPC), ktorá sa vyznačuje vysokou kvalitou riadenia, jednoduchosťou implementácie a taktiež je navrhnutá aj pre hybridné systémy. EMPC, vďaka spomenutým vlastnostiam, dáva sľubný smer vývoja algoritmov pre vnorené systémy (embedded systems). Navrhnutá aproximačná metóda sa vyznačuje rýchlym trénovaním a poskytuje široké použitie pre systémy automobilového priemyslu, zdravotníctva, silnoprúdovej elektroniky a pod.. Linearita tohto modelu umožňuje pretranformovať sieť do po častiach affinej (PWA) systémovej štruktúry a využiť existujúce algoritmy pre návrh prediktívneho riadenia (MPC). Použiteľnosť opísaných metód bola vyhodnotená na príkladoch hybridných systémov z oblasti automobilového priemyslu a tepelného hospodárstva.

10

11 Acknowledgements I would like to thank Štefan Kozák, my supervisor, for his many suggestions and constant support during this research. Of course, I am grateful to my parents for their patience and love. Without them this work would never have come into existence (literally). This work was supported by the Scientific Grant Agency of the Slovak Republic under the grants /822/8 and /5/. Bratislava, Slovakia September, 2 Juraj Števek

12

13 Table of Contents Table of Contents Notation i v Introduction. Thesis objectives Thesis hypotheses Thesis structure I Background 7 2 Polytopes and convex functions 9 2. Definitions Basic polytope manipulation Convex Functions Constrained Optimisation 5 3. Definitions Linear Programming Quadratic Programming Mixed-Integer Linear Programming Mixed-Integer Quadratic Programming Multi-Parametric programming 9 4. Definitions Properties of Multi-Parametric Solutions mpqp Algorithm Hybrid systems Piecewise Affine Systems Mixed Logical Dynamical (MLD) Systems

14 II Model Predictive Control of Constrained Systems 35 6 Introduction 37 7 Constrained Finite-Time Optimal Control Optimal control for LTI systems Optimal control for PWA Systems Explicit Model Predictive Control Examples Complexity of explicit MPC [49] Stability and Robustness of explicit MPC for PWA systems Implementation of Control Law Introduction Implementation and available software tools III Neural network based PWA linear model 65 Introduction 67 Orthogonal Activation Function based Neural Network 69. Introduction Least-squares learning Properties of OAF based neural networks Piecewise Affine OAF Neural Network (PWA OAF NN) Linear approximation Optimization of linearization points Transformation of input variables State space model form of PWA OAF Neural Network Number of linearization points in MPC problem Accuracy of the PWA-OAF-NN technique THE PWA-OAF Identification Toolbox 9 3. Introduction Polynomial model structure Normalization of input-output data Command-line Interface Graphical User Interface Examples

15 4 Case study - Anti-lock brake system Introduction Vehicle dynamics and tire-friction model Control design PWA-OAF-NN identification Case study - Current-Voltage characteristic 3 5. Introduction Nonlinear model Concluding remarks - PWA OAF modelling 9 7 Conclusion and contributions of the thesis 2 Bibliography 23 IV Appendices 35 A PWA-OAF identification toolbox manual 37 A. About the toolbox A.2 Hardware and software requirements A.3 Installation A.4 First start A.4. Guidelines for modelling a nonlinear system by the OAF based neural network A.4.2 The PWA GFS approximation A.4.3 The PWA OAF approximation A.5 The System model A.5. The model parameters A.6 Piecewise affine linear OAF model A.7 Examples A.7. The car speed profile example A.7.2 The friction example B Publications by author 53 C Software tool - CD 55

16

17 Notation Sets R N R n R n m I n n Set of real numbers Set of non-negative integers Real vectors with n elements Real matrices with n rows and m columns Identity matrix of dimension n n Algebraic Operators A T A A (i) x (i) x x x 2 x x x p Transpose of matrix A Inverse of matrix A i-th row of matrix A i-th element of the vector Element wise absolute value Any vector norm x Euclidian norm of vector x Sum of absolute elements of vector x R n, x := n x(i) i= Largest absolute value of the vector x R n, x := max x(i) i {,...,n} p-norm of a vector x R n ni=, x p := p x(i) p Dynamical Systems x(t) Measurement of state x at time t x + Successor of vector x, i.e. if x = x(t) then x + = x(t + ) Ω Maximal positive invariant set Ω Maximal robust positive invariant set

18 Acronyms BMI BST CFTOC EMPC ES FPGA LMI LP LQR LTI MILP MIQP MLD MPC mplp mpqp PLC PWA QP SDP NP-hard Bilinear Matrix Inequality Binary search-tree Constrained Finite Time Optimal Control Explicit Model Predictive Control Embedded systems Field Programmable Gateway Array Linear Matrix Inequality Linear Program(ming) Linear Quadratic Regulator Linear Time Invariant Mixed Integer Linear Program(ming) Mixed Integer Quadratic Program(ming) Mixed Logical Dynamical Model Predictive Control multi-parametric Linear Program(ming) multi-parametric Quadratic Program(ming) Programmable Logic Controller Piecewise Affine Quadratic Program(ming) Semi Definite Program(ming) Non-deterministic polynomial-time hard

19 Chapter Introduction An embedded system is, in recent time, inherent component of many tech gadgets and appliances which serve people in everyday life, i.e. washing machine, digital camera, cell phone, mp3 player, vehicle, thermostat etc.. The embedded system is a computer system designed to perform one or a few dedicated functions [36] often with real-time computing constraints. In the washing machine, the embedded system controls washing routines with constraints of water volume and washing temperature. In a vehicle, the embedded systems control a engine performance, a air-conditioning, a stabilization and many other functions. Such an electronic system is embedded as part of a complete device often including hardware and mechanical parts. The key properties of embedded system are: Purpose orientation - Embedded systems are designed to do some specific task. Some of them also have real-time performance constraints that must be met for reasons such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs. Hierarchy - network orientation - Embedded systems are not always stand-alone devices. Many embedded systems consist of small, computerized parts which together perform one complex function. Simplicity, low cost - The program instructions written for embedded systems are referred to as firmware and are stored in read-only memory or Flash memory chips. They run with limited computer hardware resources: little memory, small or non-existent keyboard and/or screen. The program for embedded system is usually developed with low level programming language (assembler) but some commercial systems offer special programming languages or even higher programming languages. The speed of program execution depends on the programming language and a computational performance of the embedded system. The computational "power" of the embedded system is the main

20 2 Introduction limitation for using of advanced control algorithms. This thesis addresses the domain of the control algorithms for embedded systems which use means of artificial intelligence (fuzzy systems, artificial neural networks, genetic algorithms). The fuzzy logic [] is popular technique which can be used to implement decision rules in human thinking fashion into computer system algorithm. Systems for solving difficult decision problems, which were previously controlled by skilled expert, are called expert systems. Fuzzy logic offers valuable framework for realization of the expert systems. Fuzzy control algorithms serve especially in complex non-linear system control in industry when it is not possible or difficult to obtain mathematical model of a process. Many fuzzy logic frameworks have been developed for selected embedded systems which offer flexible development of fuzzy control with excellent performance. Since the research in the area of fuzzy control for embedded systems is abundant we have avoided this direction in this work and we have focused on implementation possibilities of a artificial neural network. New decision methods based on tactical approach were developed in recent research which were developed to control fast non-linear processes with optimized control law. A notion tactical qualifies methods which try to "look ahead" and take account of future evolution of controlled system. These methods were initially developed for linear systems and then extended on piecewise linear, hybrid and timed event systems. The principal advantage of the new decision methods is simplified form of decision law what determines these approaches for implementation in embedded systems. The mentioned methods arise from popular model predictive control methodology which features good aspects in constraint handling and optional complexity tuning. The simplified form of decision law called in literature explicit MPC has inherited all stability and performance properties of academic model predictive control but can be implemented without any involved on-line computation. A linear model can be obtained by linearizing the original non-linear system around operating point. The linear model has been widely used for prediction of the system evolution in MPC concept. The main drawback of the linear model is its decreasing accuracy when system operates in distant from linearization point. To overcome this handicap, the concept of a Piecewise Affine (PWA) system was introduced [82]. A next-state and a output of the PWA system are both described by piecewise linear maps, i.e., by maps which are affine on each of the components of a finite polyhedral partition. In [3] the authors introduced the concept of hybrid systems, which encapsulate continuous dynamics and discrete logic in unique

21 Thesis objectives 3 model structure, so called mixed logical dynamical (MLD) system. It is shown in [37] that MLD, PWA and several additional classes of hybrid systems are equivalent. PWA-based MPC problems can be formulated as mixed integer problems, for which efficient solvers exist. Unfortunately, to the best of our knowledge, there are few results on system identification and explicit controller design for neural network based models. Modelling frameworks mentioned above belong to deterministic modelling techniques based on differential or difference equations, typically derived from physical laws. Most important aspect of created model is its linearity. On the other hand, neural network belongs to black box modelling techniques which exploit non-linear relations in neural network structure to model non-linear characteristics of real processes. To overcome this problem we propose original method for linearizing special case neural network, well known as the Orthogonal Activation Function based Neural Network (OAF-NN). The linearized neural network is equivalent to PWA system and all derived theoretical properties and existing tools for analysis and control design can be bring to bear.. Thesis objectives The main goal of this work is to improve predictive control of hybrid systems for embedded systems using neural network techniques. To achieve this objective we have defined following subtasks: An improvement of a existing control approaches for embedded systems. In the last decade, the optimal control methods give promising results in a nonlinear and especially hybrid control. Our goal is to analyse a suitable optimal control methods and propose a utilization of these methods in embedded systems. The amount of literature dedicated to stability and robustness of the optimal control is abundant. Our goal is to propose the method for robust control of Explicit-MPC based on the analysis of existing approaches for achieving the stability and robustness. We assume that the properties of the OAF neural network can simplify linearization of the model. Our goal is to analyse structure of the network and propose adjustments which may lead to a linear piecewise affine structure of the network.

22 4 Introduction Experimental evaluation of the proposed methods includes fast and simple model identification from input-output data. Our goal is to develop software toolbox for support of proposed modelling method in Matlab environment. Simulation evaluation of proposed modelling technique on various hybrid models..2 Thesis hypotheses The main inspiration to exploit model predictive control in embedded system is one of the first publications which discuss Explict-MPC [4] as a novel approach for evaluating mpc control law. Hypothesis No. Model predictive controller can takes the form of a look-up table, which encodes the optimal control input as a piecewise affine function of the state. Suitably defined objectives in optimal control can give excellent real-time control performance. However, definition of objective constraints results from detailed knowledge of system dynamics. Hypothesis No.2: The more accurate the model of system the better control performance we are able to achieve. Extension of MPC for hybrid system give new opportunities in area of fast realtime control. This approach requires sophisticated modelling techniques of hybrid systems. Hybrid systems are characterized by complex non-linear relations which are hard to identify from input-output data measurement. Computational burden of complex system identification is significant. Complexity of the identification increases with every added degree of freedom (variable). To overcome this problem we will follow this hypothesis: Hypothesis No.3: A problem of multi-variable system approximation can be fragmented to a approximation of a sum of single-variable functions..3 Thesis structure The Part I is devoted to necessary theoretical overview of constrained optimisation, multi-parametric programming and notion of hybrid system. First chapter present

23 Thesis structure 5 key definitions from convex analysis as the one of the main concepts in optimisation theory. Second chapter states principal formulations in constrained optimization as a basis for multi-parametric programming presented in fourth chapter. Short introduction to most popular hybrid model structures is given in fifth chapter. In the second part, first we present the elements of classical optimal theory for LTI systems and extension for PWA systems. The eight chapter is dedicated to explicit model predictive control as a novel approach to fast evaluation of classical optimal control. At the end of chapter we review stability and propose a method to robust design of explicit MPC. The efficient implementation of PWA function defined on polyhedral partitioning is discussed in ninth chapter. Part III deals with novel identification method of non-linear systems based on neural networks with orthogonal activation function. In chapter eleven we present theoretical background for OAF-NN modelling and point out the benefits of OAF-NN framework. The piecewise affine linearization of orthogonal activation functions leads to PWA-OAF-NN model structure, discussed in twelfth chapter. Most of the results in this part are accompanied with simulation examples evaluated using PWA-OAF Identification Toolbox which is presented in thirteenth chapter. The end of the part is dedicated to Anti-lock brake system study case where are presented applicability of studied methods.

24 6 Introduction

25 Part I Background

26

27 Chapter 2 Polytopes and convex functions 2. Definitions The convex polytopes or convex polyhedral sets are already integral part of most standard optimization problems. There is a big divide between convex problems and non-convex problems, rather than between, say, linear and non-linear problems. Thus, understanding the notion of convexity can be a crucial step in solving many real world problems [32]. We make introduction to convex polytopes, polytope computation and convex functions in this section. For additional details on polytope computation and convex functions we refer the reader to [4, 34, 29, 67] Definition 2... (Convex set, [9]): A set S R n is convex if the line segment joining any two points of the set also belongs to the set. In other words, if x, x 2 S then λx + ( λ)x 2 must also belong to S for each λ [, ]. Figure 2. below illustrates the notion of convex and non-convex sets. Note that in Figure 2.b, the line segment joining x and x 2 does not lie entirely in the set. Definition (Neighborhood, [93]): The neighborhood of a point x R n is the set of points inside an hyperball with center x and radius ɛ > Definition (Closed set, [93]): A set S is closed if every point outside S has a neighborhood disjoint from S. Definition (Bounded set, [93]): A set in R n is bounded if it is contained inside some ball B ɛ = {x R n x 2 ɛ} of radius ɛ

28 Polytopes and convex functions x 2 x 2 x x (a) Convex (b) noncovex Figure 2.: Illustration of a convex and a nonconvex set. Definition (Compact set, [93]): A set in R n is compact if it is bounded and closed. Definition (Half-space, [93]): S = {x : p T x α}, where p is a nonzero vector in R n, and α is a scalar. Definition (H-polyhedron, [34]): A convex set Q R n given as an intersection of a finite number of closed half-spaces is called H-polyhedron. Q = {x R n Q x x Q c } (2..) Definition (H-polytope, [34]): A bounded polyhedron P R n is called H-polytope. P = {x R n P x x P c } (2..2) Definition (V-polytope, [34]): A polytope can also be represented by means of a convex combinations of its vertices V p : { v p v p } P = x R n x = α i V p (i), α i, α i = (2..3) i= where V (i) p denotes the i-th vertex of P, and v p is the total number of vertices of P. It is obvious from the above definitions that every polytope represents a convex, compact set. We say that a polytope P R n, P = {x R n P x x P c } is full dimensional if x R n : P x x P c. Furthermore, if (P x ) i =, where (P x ) i denotes i-th row of a matrix P x, we say that the polytope P is normalized. i=

29 Basic polytope manipulation P 2 2 R R 4 x 2 P x 2 R R x (a) Polytopes P and P x (b) Set difference R = i {,...,} R i = P 2 \ P Figure 2.2: Illustration of set-difference operation Definition 2... (Minimal representation, [49]) We say that a polytope P R n, P = {x R n P x x p o } is in a minimal representation if the removal of any of the rows in P x x P o would change it (i.e., there are no redundant half-spaces). 2.2 Basic polytope manipulation The Set-Difference of two polytopes P and Q is a union of polytopes R = i R i R = P \ Q = {x R n x P, x Q} (2.2.) The Pontryagin-Difference of two polytopes P and W is a polytope P W = {x R n x + w P, w W} (2.2.2) The Minkowski-Addition of two polytopes P and W is a polytope P W = {x + w R n x P, w W} (2.2.3) The convex hull of a union of polytopes P i R n, i =,..., p, is a polytope ( p ) { p hull P i = x R n x = α i x i, x i P i, α i, i= i= } p α i = i= (2.2.4) An illustration of the convex hull operation is given in Figure 2.4b.

30 2 Polytopes and convex functions x Q P Q x P Q Q.5 P.5 P (a) Pontryagin difference of two polytopes P Q x (b) Minkowski sum of two polytopes P Q x Figure 2.3: Illustration of the Pontryagin difference and Minkowski sum operations P P 2.5 hull(p, P 2 ).5 env(p, P 2 ) x 2 x 2 x x (a) Polytopes P and P x (b) Convex hull(p, P 2 ) x (c) Envelope env(p, P 2 ) Figure 2.4: Illustration of the convex hull and envelope operation The envelope of two H-polyhedra P = {x R n P x x P c } and Q = {x R n Q x x Q c } is an H-polyhedron env(p, Q) = { x R n P x x P c, Qx x Q c} (2.2.5) where P x x P c is the subsystem of P x x P c obtained by removing all the inequalities not valid for the polyhedron Q, and Q x x Q c are defined in the similar way with respect to Q x x Q c and P. An illustration of the envelope operation is depicted in Figure 2.4c.

31 Convex Functions 3 f f f x λx +( λ)x 2 x 2 (a) Convex function x λx +( λ)x 2 x 2 (b) Concave function x x 2 (c) Neither convex nor concave Figure 2.5: Examples of convex and concave functions. 2.3 Convex Functions Convex functions have many important properties for optimisation problems. For example, any local minimum of a convex function over a convex set is also a global minimum. We present here some properties of convex functions, beginning with their definition. Definition (Convex function, [67]): Let f : S R, where S is a nonempty convex set in R n. The function f is convex on S if f(λx + ( λ)x 2 ) λf(x ) + ( λ)f(x 2 ) (2.3.) for each x, x 2 S and for each λ (, ). The function f is strictly convex on S if the above inequality is true as a strict inequality for each distinct x, x 2 S and for each λ (, ). The function f is (strictly) concave on S if f is (strictly) convex on S. The geometric interpretation of a convex function is that the value of f at the point λx + ( λ)x 2 is less than the height of the chord joining the points [x, f(x )] and [x 2, f(x 2 )]. For the concave function, the chord is below the function itself. Figure 2.5 shows some example of convex and concave functions. The following are useful properties of convex functions. (i) Let f, f 2,..., f k : R n R be convex functions. Then f(x) = k j= α j f j (x), where α j > for j =, 2,..., k, is a convex function; f(x) = max{f (x), f 2 (x),..., f k (x)} is a convex function.

32 4 Polytopes and convex functions (ii) Suppose that g : R n R is concave function. Let S = {x : g(x) > }, and define f : S R as f(x) = /g(x). Then f is convex over S. (iii) Let g : R R be a nondecreasing, univariate, convex function, and let h : R n R be a convex function. Then the composite function f : R n R defined as f(x) = g(h(x)) is a convex function. (iv) Let g : R m R be a convex function, and let h : R n R be an affine function of the form h(x) = Ax + b, where A is an m n matrix, and b is an m vector. Then the composite function f : R n R defined as f(x) = g(h(x)) is a convex function.

33 Chapter 3 Constrained Optimisation 3. Definitions A general constrained optimization problem may be written as follows: min f(u) (3..a) u subj. to: u S. (3..b) Here the vector u R n denotes the optimization variable, f : R n R is the objective function, and S is constraint set. Definition 3... (Feasible and Optimal Solutions) Let f : R n R and consider the constrained optimisation problem (3..), where S is a nonempty set in R n. A point u S is called a feasible solution to problem (3..). If ū S and f(u) f(ū) for each u S, then ū is called an optimal solution, a global optimal solution, or simply a solution to the problem. The collection of optimal solutions is called the set of alternative optimal solutions. If ū S and if there exists an ɛ-neighborhood N ɛ (ū) around u such that f(u) f(ū) for each u S N ɛ (ū), then ū is called a local optimal solution. If ū S and if f(u) > f(ū) for each u S N ɛ (ū), u ū, for some ɛ >, then ū is called a strict local optimal solution.

34 6 Constrained Optimisation Figure 3. illustrates examples of local and global minima. Properties of the objective function f and the constraint set S give rise to specific forms of the optimization problem (3..). 3.2 Linear Programming If f is linear and S is defined by set of linear inequalities f i (u), i =,..., m, problem (3..) can be formulated and solved as a linear programming (LP) problem. min c T u (3.2.a) u subj. to: Au b, (3.2.b) A eq u = b eq, (3.2.c) where c R n, A R m n, b R m, A eq R meq n, and b eq R meq. Here, m and m eq denote the number of inequality and equality constraints, respectively. There are two fundamentally different types of algorithms for solving LPs: simplex and interior-point methods [4]. The simplex method has exponential worst-case complexity [47]. However, a average-case complexity is polynomial-time. While runtime for the interior-point methods is polynomial in the worst case [45]. The fact is that the efficiency of good implementations of simplex-based methods and interior point methods are similar for routine applications of linear programming. 3.3 Quadratic Programming If f is convex and quadratic and S is defined by set of linear inequalities f i (u), i =,..., m, problem (3..) is referred to as a quadratic programming (QP) problem: f A Global minimum B C D E Local minima S Figure 3.: Local and global minima

35 Mixed-Integer Linear Programming 7 min u 2 ut Hu + c T u (3.3.a) subj. to: Au b, (3.3.b) A eq u = b eq, (3.3.c) For positive definite H, the interior point methods solve the problem in polynomial time [48]. If, on the other hand, H is indefinite, then the problem is NP-hard [78]. In fact, even if H has only one negative eigenvalue, the problem is NP-hard. 3.4 Mixed-Integer Linear Programming If the vector u of optimization variables is composed of real and a binary part, i.e. u = [u T r, u T b ] T with u r R nr and u b {, } n b, and the objective function f is linear and constraint set S defined by linear inequalities f i (u), i =,..., m, problem (3..) is referred to as a Mixed Integer Linear Program (MILP). Formally it can be stated as min c T u r u r + c T b u b (3.4.a) subj. to: A r u r + A b u b b, (3.4.b) A eq,r u r + A eq,b u b = b eq, u b {, } n b. (3.4.c) (3.4.d) These problems involve binary variables, which makes the problem much harder to solve than an ordinary LP problem. If computational burden is not considered, the most straightforward approach to compute the optimal solution to an optimization problem involving binary variables is to enumerate all possible combinations of the binary variables, and for each such combination, compute the optimal solution of any real variables also included in the problem. As there are n b binaries, this would require 2 n b LP problems to be solved, in the worst case. Commonly used MILP solvers, such as CPLEX [4], in addition, use Branch&Bound or Branch&Cut methods can find the optimal solution without enumerating all possible combinations of the binary variables.

36 8 Constrained Optimisation 3.5 Mixed-Integer Quadratic Programming If the vector u of optimization variables is composed of real and a binary part, i.e. u = [u T r, u T b ] T with u r R nr and u b {, } n b, and the objective function f is quadratic and constraint set S defined by linear inequalities f i (u), i =,..., m, problem (3..)is referred to as a Binary Quadratic Program (BQP) or a Mixed Integer Quadratic Program (MIQP). Formally it can be stated as min u u T r H u r + u T r H 2 u b + u T b H 3 u b + c T r u r + c T b u b (3.5.a) subj. to: A r u r + A b u b b, (3.5.b) A eq,r u r + A eq,b u b = b eq, u b {, } n b. (3.5.c) (3.5.d) As in the case of MILP problem, binary variables make the problem harder to solve than an ordinary QP problem. Using brute-force approach again, it is possible to enumerate all feasible combinations of binary variables and then solve an QP problem for each such combination. The Branch&Bound method is mostly employed in MIQP solvers. In [5] preprocessing algorithm for MIQP was presented with focus on MPC problems.

37 Chapter 4 Multi-Parametric programming In following chapter we introduce theoretical background of multi-parametric programming. We start with necessary definitions and then we present main steps of algorithm for multi-parametric quadratic program based upon the Karush-Kuhn- Tucker optimality conditions. A detailed insight of multi-parametric programs is given in [6, 7]. Useful handouts in multi-parametric programming were presented in [49]. 4. Definitions Here we present friendly introduction to the problem of multi-parametric programming as was given in [49]. Consider the following modification of the linear programming problem (3.2.) where the objective function and the right-hand-side of the constraints are perturbed by a symbolical parameter x R p : J (x) = min c T u + d T x u (4..a) subj. to: Au b + Ex, (4..b) where u R n, c R n, d R p, A R m n, b R m, and E R m p. If the value of x would be known, problem (4..) could be solved straight away. In multi-parametric programming [6], on the other hand, the objective is to obtain the optimizer u (x) as an explicit function of all possible values of x which satisfy (4..b). The advantage of such a solution concept becomes prominent in situations where the optimization problem (4..) needs to be solved many times for different values of x. If the explicit representation of the optimizer is obtained by multi-parametric linear programming (mplp), calculating u (x) for a give value of x reduces to simple function evaluation.

38 2 Multi-Parametric programming Similarly to the mplp (4..) we can also define a multi-parametric equivalent to quadratic programming problems (3.3.) as J (x) = min u 2 ut Hu + x T F u (4..2a) subj. to: Au b + Ex, (4..2b) whereby this problem will be refer to as a multi-parametric Quadratic Program (mpqp). Again, the objective is to solve (4..2) for all admissible values of the parameter x and to obtain the optimizer as an explicit function of the form u (x). A multi-parametric equivalent to the MILP problem (3.4.) is referred to as a multi-parametric Mixed Integer Linear Program (mpmilp) and is stated as follows min c T u r u r + c T b u b (4..3a) subj. to: A r u r + A b u b b + Ex, (4..3b) u b {, } n b. (4..3c) In the following sections we illustrate basic properties of explicit solutions to mplp, mpqp, and mpmilp optimization problems and provide detailed overview of the construction of such solutions. Definition 4... (Feasible Set) We define the feasible set X R p as the set of parameters x for which the optimization problems (4..) and (4..2) are feasible, i.e. X = {x R p Au b + Ex}. (4..4) Definition (Polytopic/Polyhedral partition) A collection of polytopic (polyhedral) sets {P r } R r= = {P,..., P R } is a polytopic (polyhedral) partition of a polytopic (polyhedral) set x if (i) R r= P r = x, (ii) (P r \ P r ) (P q \ P q ) =, r q, where denotes the boundary. Definition (PWA function) A function f : X R d with d N + is piecewise affine (PWA), if a partition {P r } R r= of set X exists, such that f(x) = L r x + C r if x P r. Definition (PWQ function) A function f : X R is piecewise quadratic (PWQ), if a partition {P r } R r= of set X exists, such that f(x) = x T Q r x + L r x + C r if x P r.

39 Properties of Multi-Parametric Solutions 2 Definition (Active constraints A(x)) The set of active constraints A(x) at point x of problems (4..) and (4..2) is defined as A(x) = {i J A (i) u (x) b (i) E (i) x = }, J = {, 2,..., m} (4..5) where the subindex (i) denotes the i-th row of the corresponding matrix, and m represents the number of constraints, i.e. b R m. 4.2 Properties of Multi-Parametric Solutions This section summarizes the main properties which characterize explicit solutions to the mplp, mpqp, and mpmilp problems (4..), (4..2) and (4..3). Theorem (Properties mpqp, [4, 6]) Consider the multi-parametric Quadratic Program (4..2). Then:. The set of feasible parameters X (4..4) is a convex polyhedron. 2. The set X is partitioned into R N + polyhedral regions. P r = {x R p H r x K r }, r =,..., R (4.2.) 3. The optimizer u : X R n is continuous and piecewise affine (PWA) function of the parameter x, i.e. u (x) = F r x + G r, if x P r. (4.2.2) 4. The optimal value function J : X R is continuous, convex and piecewise quadratic, i.e. J (x) = x T Q r x + L r x + C r, if x P r (4.2.3) Definition (Region) Each polyhedron P r of the polyhedral partition {P r } R r= is referred to as a region. Theorem (Properties mplp, [6]) Consider the optimization problem (4..). Then, the set of feasible parameters X is convex, it is partitioned into R N + polyhedral regions, there exists an optimizer u : X R n which is continuous and piecewise affine (PWA), i.e. u (x) = F r x + G r if x P r, and the value function J : X R is continuous, convex and piecewise affine, i.e. J (x) = L r x + C r if x P r.

40 22 Multi-Parametric programming Theorem (Properties mpmilp, [6]) Consider the MILP (3.4.). Then, the set of feasible parameters X is a (possibly non-convex) collection of polyhedra, it is partitioned into R N + polyhedral regions, there exists an optimizer u (x) = F r x+g r if x P r, and the value function J : X R is piecewise affine (possibly non-convex and discontinuous), i.e. J (x) = L r x + C r if x P r. Notice that (4..3) for a fixed value of u b reduces to a multi-parametric linear program in the form of (4..). Therefore a solution to (4..3) can be obtained by solving (4..) for all feasible combinations of the binary vector u b. For each such "local" solution, the PWA optimizer u (x) = F r x + G r, along with a PWA cost function J i (x) = L r x + C r is obtained. The task then is to identify portions of the "local" solutions which dominate all others (in the sense that they feature a lower value of the cost function). This is formally captured by 4.3 mpqp Algorithm u (x) = arg min i J i (x) (4.2.4) A brief outline of a generic mpqp algorithm will be given next. This section is written based on [49]. Before reviewing the algorithm, it is useful to define z = u + H F T x (4.3.) and to transform the QP formulation (4..2) such that the vector of parameters x only appears in the constraints, i.e. J (x) = min z z T Hz (4.3.2a) subj. to Az b + Sx (4.3.2b) with S = E + AH F T. An mpqp computation scheme then consist of the following three steps:. Active Constraint Identification: A feasible parameter ˆx is determined and problem (4..2) is solved as a QP (3.3.) by setting x = ˆx in (4..2b). This will yield the optimizer z and the set of constraints A(ˆx) that are active at optimal solution, i.e. A(ˆx) = {i J A (i) z = b (i) + S (i)ˆx}, J = {, 2,..., m}, (4.3.3) The rows indexed by the active constraints A(ˆx) are extracted from the constraint matrices A, b and S to form the matrices A A, b A and S A.

41 mpqp Algorithm Region computation: Next, Karush-Kuhn-Tucker (KKT) optimality conditions are exploited to obtain an explicit representation of the optimizer u (x) which is valid in some neighborhod of ˆx. For the problem (4..2) the KKT conditions read Hz + A T λ = λ T (Az b Sˆx) = λ Az b + Sˆx (4.3.4a) (4.3.4b) (4.3.4c) (4.3.4d) where λ is the vector of Lagrange multipliers obtained by solving (4.3.4) as a QP for x = ˆx. From (4.3.4a) we can now obtain a relation between z and λ: z = H A T λ. (4.3.5) Notice now that (4.3.4b) can be satisfied in two cases: either λ = or Az b Sˆx =. The first case occurs for constraints which are not active at ˆx, i.e. for λ mathcali. If, however, certain constraints are active (which corresponds to a strictly positive value of λ A ), we can substitute for z from (4.3.5) into Az b Sˆx = which gives A A H A T Aλ A b A S Aˆx = (4.3.6) and yields an expression for active Lagrange multipliers which can be expanded into λ A = ( A A H A T A) (ba + S Aˆx), (4.3.7) λ A = ( A A H A T A) ba ( A A H A T A) SAˆx. (4.3.8) Since A A, H, b A, ands A are all known, relation (4.3.8) is an affine function in ˆx. By back-substituting (4.3.8) into (4.3.5) we then get z = H A T A ( AA H A T A) (ba + S Aˆx), (4.3.9) which again is an affine function in ˆx. Finally, we can substitute back for z from (4.3.9) into (4.3.2) and we obtain u = H A T A ( AA H A T A) (ba + S Aˆx) H F T ˆx = F rˆx + G r, (4.3.)

42 24 Multi-Parametric programming which clearly again is an affine dependence between x and ˆx with F r =H A T A ( AA H A T A) SA H F T, (4.3.) G r =H A T A ( AA H A T A) ba. (4.3.2) It remains to determine the neighborhood of ˆx in which the optimizer z(x) satisfies the same set of active constraints and remains optimal. It turns out that such a neighborhood can be characterized by the two remaining KKT conditions (4.3.4c) and (4.3.4d). By substituting for λ from (4.3.8) into (4.3.4c) and for z from (4.3.9) into (4.3.4d) it turns out that the neighborhood is an H-polyhedron P r = {x H r x K r } with [ A(Fr + K H r = F T ] ) S (A A H A T A) S A [ ] b + AG K r = r (A A H A T A) b A (4.3.3a) (4.3.3b) To summarize, by solving (4..2)for x = ˆx one obtains one obtains numerical representation of the matrices F r and G r which define the explicit representation of the optimizer u (x) = F r x + G r, which is valid (i.e. is optimal and satisfies all constraints) for all parameters from the region P r. 3. State Space Exploration: Once the controller region is computed, the algorithm proceeds iteratively until the entire feasible state space X is covered with regions P r, i.e. X = r=,...,r P r. This is done by selecting a new starting point ˆx outside of P r and repeating Step 2. Remark The number of rows in H r is equal to the number of initial constraints (4..2), i.e. H r consists of m rows if b R m. Some of these constraints, however, will be redundant which often leads to increased complexity of the algorithm. Therefore it is a standard practice to compute the minimal representation of the polytopes P r = {x H r x K r }, r =,..., R by removing redundant rows from H r and K r.

43 Chapter 5 Hybrid systems The label Hybrid system, in recent time, represents nonlinear dynamical system of heterogenous continuous and discrete character. The specifity of the hybrid system is the interaction between continuous dynamic (described by differential or difference equations) and discrete dynamic and logic rules (described by temporal logic, finite state machine, if-then-else conditions, discrete events, etc.) and discrete components (on/off switches, selectors, digital circuitry, software code, etc.). The hybrid system switches among many operating modes, where each mode is governed by its own characteristic dynamical laws. Mode transitions are triggered by variables crossing specific thresholds (state events), by the elapse of certain time periods (time events), or by external inputs (input events)[7]. A typical example of hybrid systems are embedded systems, constituted by dynamical components governed by logical/discrete decision components. We consider a dynamical system which process model is defined in the discretetime domain by a state-update equation x(t + ) = f(x(t), u(t)). (5..) Here, x(t) R n is the state vector at time instance t N +, x(t + ) denotes the successor state, u(t) R m is the vector of control inputs, and f( ) is the stateupdate function. It is assumed that states and inputs are subject to constraints x(t) X R n, u(t) U R m, (5..2a) (5..2b) where these constraints should hold t. In the most general setup the state-update function f(x(t), u(t)) can be arbitrary, e.g. linear, piecewise linear, nonlinear, discontinuous, non-differentiable, etc.

44 26 Hybrid systems 5. Piecewise Affine Systems The linear time-invariant (LTI) system is defined in discrete-time domain by its state space representation x(k + ) =Ax(k) + Bu(k) y(k) =Cx(k) + Du(k) (5..a) (5..b) where A R n n, B R m m, C R m n and D R m m are referred to as stateupdate matrices whose entries do not depend on time t. The main benefit of employing LTI description of the plant in optimal control is the resulting optimization problem is relatively easy to solve due to the underlying linear nature of the process model. The main drawback is the inherited low accuracy property. Such models only provide accurate approximation of the nonlinearity when the plant operates close to the chosen linearization point. As the plant drifts away, accuracy of such an approximation deteriorates quickly, having negative impact on the performance of the control scheme. The accuracy of the approximation of f( ) can be significantly increased if the function is linearized around multiple distinct linearization points. This methodic leads to a Piecewise Affine (PWA) linear system. The PWA system offers framework for modelling hybrid or common non-linear systems. Dynamical behavior of such systems is captured by relations of the following form: x(k + ) = A i x(k) + B i u(k) + f i y(k) = C i x(k) + D i u(k) + g i (5..2a) (5..2b) subjet to: y min y(k) y max (5..2c) u min u(k) u max u min u(k) u(k ) u max (5..2d) (5..2e) Each dynamic i is active in a polyhedral partition bounded by the so-called guardlines: guardx i x(k) + guardu i u(k) guardc i (5..3) Definition 5... The PWA system 5..2 is well-posed [3] if its domain D X U is partitioned into regions D i such that D = i D i and the regions do not overlap, i.e. D i Dj =, j i.

45 Piecewise Affine Systems 27 The well-possedness property basically says that the evolution of the system is uniquely determined for a given x and u and hence behaves in a deterministic fashion. If the regions D i are convex polytopes, defined as an intersection of finitely many half-spaces, i.e. H i = [ ] x K u i (5..4) and they can be found as the cells of the corresponding Voronoi diagram [4] of n L linearization points. The properties of Voronoi cells directly fulfill the well-posedness requirement of non-overlapping regions [4]. Linearization in multiple points can be done using Taylor series technique ( ) ( ) f(x, u) f(x, u) f Lin (x, u) = f(x i, u i ) + (x x i ) + (u u i ). (5..5) x x i,u i x x i,u i where f Lin (x, u) is tengent hyperplane to original nonlinear function f(x, u) in linearization point (x i, u i ). Another way to approximate nonlinear function by hyperplanes is based on solving set of optimization problems in least square fashion. Consider nonlinear function of one variable y = f(x). To find linearization parameters we solve optimization problem: P N J(a i, b i ) = (yj i a i x i j b i ) 2 (5..6a) i= j= subject to: a i x i N + b i = a i+ x i+ + b i+ (5..6b) where {(x i, y i ), (x i 2, y i 2),..., (x i N, y i N)} denotes points of i th interval of linearization and P is total number of intervals. To illustrate both approaches, consider function f(x) = x 2 and assume this function to be linearized around two points x =.3 and x 2 =.8. From (5..5) we have f Lin,i = (x i ) 2 + 2x i (x x i ), i =, 2. The linearizations are depicted in Figure 5.a. Using LSQ method, two intervals are defined int = (,.5), int 2 = (.5, ). Solving (4.2.5) we get linearization depicted in Figure 5.b. In [9] was presented hybrid modelling of thermal process consisting of several heat exchangers. Dynamics of heat exchangers are derived from following differentials dt prim,o dt + c ṁ prim (T prim,o T prim,i ) = f (ṁ prim, ṁ sec )(T sec,o T prim,o ) (5..7a) dt sec,o dt + c 2 ṁ sec (T sec,o T sec,i ) = f 2 (ṁ prim, ṁ sec )(T sec,o T prim,o ) (5..7b)

46 28 Hybrid systems f(x).5.4 f(x) f(x) f Lin (x) f Lin2 (x).2. f Lin (x) f Lin2 (x) f(x) x (a) Taylor series approach x (b) Least square approach Figure 5.: PWA approximation of f(x) = x 2 where subscripts prim, sec, i, o indicate primary, secondary, input and output respectively. T indicates temperature and ṁ is mass flow. Constants c, c 2 together with non-linear functions f, f 2 characterize type of heat exchanger. The scheme of hybrid model of simple air-handling unit consisting of two exchangers is captured in Figure 5.2. Simple AHU consist of air-to-air heat exchanger (AAE), cooling-coil unit (CCU), cooling water pump, fan speed switcher and bypass damper. Continuous input signals of the model are T chw,i - cooling water inlet temperature, T oa - outside air temperature, T s,i - building exhaust temperature. Binary input signals of the model are s - fan speed switcher, Cr - cooling water pump and BD - regenerator bypass damper. The Output temperatures of the model are T a, i - AAE output air temperature, T a - supply air temperature and T chw,o - CCU output water temperature. Resulting state-space PWA model has eight dynamics, four states, six inputs, one output and dynamic selection is made according to binary inputs: A x(k) + B u(k) AAE (BD=;Cr=;s=) A 2 x(k) + B 2 u(k) AAE+CCU (BD=;Cr=;s=) A 3 x(k) + B 3 u(k) CCU (BD=;Cr=;s=) A x(k + ) = 4 x(k) + B 4 u(k) AAE (BD=;Cr=;s=) (5..8) A 5 x(k) + B 5 u(k) AAE+CCU (BD=;Cr=;s=) A 6 x(k) + B 6 u(k) CCU (BD=;Cr=;s=) A 7 x(k) + B 7 u(k) (BD=;Cr=;s=) A 8 x(k) + B 8 u(k) (BD=;Cr=;s=)

47 Mixed Logical Dynamical (MLD) Systems 29 T oa T s,i T s,o T a,i - T a AAE T chw,i T chw,o Pump CCU 3-way control valve Figure 5.2: Symbolic scheme of air-handling unit 5.2 Mixed Logical Dynamical (MLD) Systems MLD model, as was defined in [3], allows modelling wide class spectrum of systems: Linear hybrid systems Sequential logical systems (Finite State Machines) Nonlinear dynamic systems, where the nonlinearity can be expressed through combinational logic Some classes of discrete event systems Constrained linear systems Linear systems In [], the formal equivalence between MLD systems and PWA systems is established and also effective algorithms were developed for transformation from one model structure to another [88, 8]. In [37], the equivalence between the following five classes of hybrid systems is, under certain conditions, established: MLD systems, Linear Complementarity (LC) systems, Extended Linear Complementarity (ELC) systems, PWA systems and Max-Min-Plus-Scaling (MMPS) systems. The important result of these equivalences resides in derived theoretical properties and tools which can be easily transferred from one class to another. MLD systems are represented by a state-update equation combined with a set of constraints: x(t + ) = A t x(t) + B t x(t) + B 2t δ(t) + B 3t z(t) y(t) = C t x(t) + D t u(t) + D 2t δ(t) + D 3t z(t) E 2t δ(t) + E 3t z(t) E t u(t) + E 4t x(t) + E 5t (5.2.a) (5.2.b) (5.2.c)

48 3 Hybrid systems where t Z, x = [ x c, x l ] T, xc R nc, x l {, } n l, n = nc + n l is a system state, whose components are devided into continuous x c and x l ; y = [ y c, y l ] T, yc R pc, y l {, } p l, p = pc + p l is output vector, u = [ ] T u c, u l, uc R mc, u l {, } m l, m = mc + m l is control input which includes analog u c and binary (On/Off) inputs u l ; δ, n a z R rc represents auxiliary variables. This technique allows to exploit the algorithms of matlab toolboxes, i.e. [7, 5]. For encoding of complex system into MLD model structure, Hybrid Description Language (HYSDEL) has been developed [87]. Hysdel allows describing the hybrid dynamics in a textual form, and a related compiler automatically compiles different model representations of the given hybrid dynamics In recent times, Hysdel has been extended by new functionalities with emphasis to support complex hybrid model structure [38]. An example of model definition in HYSDEL is car dynamic model with turbo. The model has one additional boolean input, which denoted the "turbo". If this input is, influence of u() in the state update equation is doubled. There is a hard limit on how many times the "turbo" can be used - this is given by bounds on the 3rd state variable. Every time the "turbo" is used, x(3) is decremented by. Lower limits is hence set to, upper limit can vary between and 5 (only integer values are allowed). SYSTEM turbo_car { INTERFACE { STATE { REAL position [-5, 5]; REAL velocity [-, ]; REAL turbocount [, 5]; } INPUT { REAL acc [-, ]; BOOL turbo; } OUTPUT { REAL y; } } IMPLEMENTATION { AUX { REAL aux_acc; } DA { aux_acc = {IF turbo THEN 2*acc ELSE acc};

49 Mixed Logical Dynamical (MLD) Systems 3 } } } CONTINUOUS { position = position + velocity + aux_acc; velocity = velocity +.5*aux_acc; turbocount = turbocount - (REAL turbo); } OUTPUT { y = position; } In next example, a satellite control problem is presented [5]. The satellite controls its attitude by accelerating a reaction wheel inside the satellite and by using external thrusters. When the wheel is accelerated a counter torque is produced. If several adjustments in the same direction are made, the angular velocity of the wheel finally becomes very high. To be able to slow down the wheel without affecting the attitude of the satellite, the external thrusters have to be used to compensate when the wheel is braked. The wheel is assumed to be controlled continuously by an electric engine. Its control signal is denoted u c. The satellite is also assumed to be equipped with two external thrusters, one in each direction. These are assumed to be controlled binary, that is, either they give full thrust or no thrust at all. The binary control signals for the thrusters are denoted u b, and u b,2. A continuous-time state space description for the system with satellite attitude x, satellite angular velocity x 2 and internal wheel velocity x 3 is ẋ = x y = [ ] x u c u b, u b,2 (5.2.2) To obtain a system on the form (5..), forward Euler approximation dx dx, with the sampling time T s =. s, has been used. x(k+) x(k) T s. u c (k) x(k + ) = x(k) u b, (k) u b,2 (k) y = [ ] x (5.2.3)

50 32 Hybrid systems x 2 x 3 u b,2 u b, u c x Figure 5.3: This figure illustrates the satellite modeled in (5.2.2), where x is the satellite attitude, x 2 is the satellite angular velocity and x 3 the angular velocity of the reaction wheel. The control signals are u c, u b, and u b,2, which control the electric engine and the two oppositely directed thrusters respectively. Presence of binary inputs in the model makes hybrid character of the model. It is possible to encode the model using HYSDEL: SYSTEM satellite { INTERFACE { STATE { REAL att [-2, 2]; REAL velo [-5, 5]; REAL wheel_velo [-, ]; } INPUT { REAL wheel [-, ]; BOOL thr_; BOOL thr_2; } OUTPUT { REAL y; } } IMPLEMENTATION { AUX { REAL aux_thr, aux_thr2;

51 Mixed Logical Dynamical (MLD) Systems 33 } } } DA { aux_thr = {IF thr_ THEN ELSE }; aux_thr2 = {IF thr_2 THEN - ELSE }; } CONTINUOUS { att = att +.*velo; velo = velo +.25*wheel +.*aux_thr +.*aux_thr2; wheel_velo = wheel_velo - wheel; } OUTPUT { y = att; }

52 34 Hybrid systems

53 Part II Model Predictive Control of Constrained Systems

54

55 Chapter 6 Introduction Model predictive control (MPC) has become the accepted standard for complex constrained multi-variable control problems in the process industries. Here, at each sampling time, starting on the measurements x(t) of plant s states, mathematical model of plant is used to predict the evolution of the plant up to time t + N in openloop optimal control problem. At the next time step, the computation is repeated starting from the new measured state x(t + ) and over a shifted horizon, leading to a receding horizon policy. The solution relies on a linear dynamic model, respects all input and output constraints, and optimizes a quadratic (or linear) performance index. In each time step, only first element of the optimal control sequence is used to the plant and the rest is discarded. This repetitive optimization is used to introduce feedback into control scheme such that effects of unpredicted disturbances can be mitigated. Since the MPC algorithm is executed on-line, it is of great relevance to be able to quickly solve the optimization problem. It is the amount of consumed time that limits the use of MPC. As the optimization routines get more efficient, implementations at faster sampling rates, on slower hardware and for larger systems is possible. For linear MPC, solvers with high performance exist today. Because of the increased complexity, this is even more important for MIQP problem. It can, for example, be solved using a branch and bound algorithm where QP relaxations are solved in the nodes [5]. Several approaches were proposed to decrease complexity of the calculations of the search directions in the Interior-Point algorithm []. Another way of reducing the on-line computational effort is to precalculate the control law. Briefly, the procedure can be explained as given the state of the system, the controller gain is retrieved from a table. The control law is computed off-line by solving a multi-parametric programming problem, where multi-parametric means

56 38 Introduction that the problem depends on a vector of parameters [4]. This type of MPC is often referred to as explicit MPC. The advantage of this scheme is that no time consuming on-line optimization needs to be performed and the control input can be computed with low hardware cost and small computation time. A drawback with explicit MPC is that the complexity of the state space partition often increases rapidly with the number of states. In literature, many examples of successful implementation in automotive[9, 7, 2], control of mechanical [68, 2, 9], electrical [5, 6] and many other systems were published. In following chapters we make introduction to model predictive control as was given in [66, 32, 49]

57 Chapter 7 Constrained Finite-Time Optimal Control 7. Optimal control for LTI systems We introduce the basics of the optimal control for linear time-invariant system as was given in [32]. We consider a dynamical system (5..), where x(k) R n is the state, u(k) R m is control input, y(k) R m is the output. We assume that D =, there is no direct influence on output vector from control input. We assume that (A, B, C) is socialisable and detectable and, for the moment, that one is not eigenvalue of A. Thus, we consider the problem where the output y(k) in (5..) is required to track a constant reference y. This problem is referred in literature as a tracking problem. That is, we wish to regulate, to zero, the output error e(k) y(k) y = Cx(k) y. (7..) Let u s, x s, y s and e s denote the setpoints, or desired steady state values for u(k),x(k),y(k) and e(k), respectively. We then have that and hence y s =y = Cx s (7..2) e s =, (7..3) u s = [ C(I A) B) ] y (7..4) x s =(I A) Bu s. (7..5) Without loss of generality, we take the current time as zero. Our aim is to find, for the system (5..), (7..), the M-move control sequence {u(),..., u(m )}, and

58 4 Constrained Finite-Time Optimal Control corresponding state sequence {x(),..., x(n)} and error sequence {e(),..., e(n ), that minimize the finite horizon objective function: J N,M ({x(k)}, {u(k)}, {e(k)}) 2 (x(n) x s) T P (x(n) x s ) + 2 M (u(k) u s ) T R(u(k) u s ), 2 k= N k= e(k) T Qe(k)+ (7..6) where P, Q, R >. In (7..6), N is the prediction horizon, M N is the control horizon, and u s, x s are the input and state setpoints given by (7..4) and (7..5), respectively. The control is set equal to its steady state setpoint after M steps, that is u(k) = u s for all k M. To simplify problem (7..6), we set prediction and control horizon equal N = M, we replace output error e(k) by state vector x(k) and introduce general expression for norm p, where p = {, 2, }. Then Constrained Finite-Time Optimal Control (CFTOC) problem for LTI system can be written as: N JN (x()) min P (x(n) x s ) U p + Q x (x(k) x s ) p + R(u(k) u s ) p, N k= (7..7a) subj. to: x(k + ) = Ax(k) + Bu(k), (7..7b) x(k) X, (7..7c) u(k) U, (7..7d) Lx(N) W (7..7e) where J N(x()) R denotes the optimal value of the objective function (7..7a), U N denotes the N-move control sequence {u(),..., u(n )}, Q x = C T QC and x(n) is final predicted state. P is the terminal penalty matrix, Q x and R are weighting matrices for state and control vectors, respectively. Inequality (7..7e) defines terminal set constraint satisfying certain properties which is useful to establish closed loop stability [6,, 3]. The aim is to solve the CFTOC problem (7..7) as an optimization problem for any x() X N, i.e. to find the optimal input sequence U N such that constraints (7..7a) (7..7e) are satisfied and the performance criterion in (7..7a) is minimized.

59 Optimal control for LTI systems 4 Definition 7... (Feasible Set X N ) We define the N-step feasible set X N R n as the set of initial states x() for which the optimal control problem (7..7) is feasible, i.e. X N = {x() R n U N = [u(),..., u(n )] T, (7..7a) (7..7e) hold} (7..8) In tracking problem it is often useful to replace u(k) u s statement in (7..7a) by statement u(k) = u(k) u(k ). Minimizing over u(k) is often recommended because it introduces integral action and hence mitigates the steady-state offset [49]. There are two different ways how to transform problem (7..7) into a standard QP form. First option is to consider both u(),..., u(n ) as well as x(),..., x(n) as a optimization variables, i.e. V N [U T N, X T N] T R N(m+n) with U N [u(),..., u(n )] T R Nm and X N [x(),..., x(n)] T R Nn. The relation between x(k), u(k) and x(k + ) represented by (7..7b) is kept in form of equality constraint in the form G eq V N = W eq + E eq x(). Constraints (7..7b) (7..7e) then translates into GV N W + Ex(). Therefore problem (7..7) can be cast a QP problem J N(x()) = min V N V T N QV N, (7..9a) subj.to GV N W + Ex() (7..9b) G eq V N = W eq + E eq x() (7..9c) In following part, we will show how to transform problem (7..7) to standard quadratic programming problem using second option, replacing equality constraint x(k + ) = Ax(k) + Bu(k) in (7..7b) by an implicit representation x(k) = A k x() + k j= A j Bu k j [32]. We start by writing, from (5..) with x() = x, and using the constraint that u(k) = u s for all k M, the following set of equations: x() = Ax + Bu(), x(2) = A 2 x + ABu() + Bu(). x(n) = A N x + A N Bu() Bu(N ), (7..) Using x s = Ax s +Bu s from (7..5) recursively, we can write a similar set of equations

60 42 Constrained Finite-Time Optimal Control for x s as follows: x s = Ax s + Bu s, x s = A 2 x s + ABu s + Bu s,. x s = A N x s + A N Bu s Bu s, (7..) We now subtract the set of equations (7..) from the set (7..), and rewrite the resulting difference in vector form to obtain x x s = Γ(u u s ) + Ω(x x s ), (7..2) where x() x(2) x., x(n) x s x x s s., x s u() u u()., u(n ) u s u u s s., (7..3) u s (x s is an nn vector, and u s is an nn vector), and where B... A AB B... Γ , Ω A 2. A N B A N 2 B... AB B A N (7..4) We also define the matrices Q diag{q x,..., Q x, P }, R diag{r,..., R}, (7..5a) (7..5b) (7..5c) where diag{a, A 2,..., A p } denotes a block diagonal matrix having the matrices A i as its diagonal blocks. Next, adding Cx s + y = to (7..), we can express the error as e(k) = C(x k x s ) (7..6) We now substitute (7..6) into the objective function (7..7), and rewrite it using the vector notation (7..3) and (7..5), as follows: J N = 2 e()t Qe() + 2 (x x s) T Q(x x s ) + 2 (u u s) T R(u u s ) (7..7)

61 Optimal control for LTI systems 43 Next, we substitute (7..2) into (7..7) to yield J N = J + 2 ut (Γ T QΓ + R)u + u T Γ T QΩ(x x s ) u T (Γ T QΓ + R)u s J + 2 ut Hu + u T [F (x x s ) Hu s ], (7..8) where J is independent of u and H Γ T QΓ + R, F Γ T QΩ. (7..9) Note that H in (7..9) is positive definite because we have assumed R > in the objective function (7..7). From (7..8) it is clear that, if the problem is unconstrained, J N is minimized by taking u = u OP T UC H [F (x x s ) Hu s ]. (7..2) The vector is formed by the first n components of (7..2), u OP T,UC has a linear timeinvariant feedback structure of the form u OP T,UC = K(x x s ) + u s, (7..2) where K is defined as the first n rows of the matrix H F. The control law (7..2) is the control used by the RHC algorithm if the problem is unconstrained. We now introduce inequality constraints into the problem formulation. Magnitude and rate constraints on the plant input and output can be expressed as follows: u min u(k) u max, k =,..., M (7..22a) y min y(k) y max, k =,..., N (7..22b) δu min u(k) u(k ) δu max, k =,..., M (7..22c) where u( ) is the input used in the previous step of the receding horizon implementation, which has to be stored for use in the current fixed horizon optimisation. More generally, we may require to impose state constraints of the form x(k) X k for k =,..., N, (7..23) where X k is a polyhedral set of the form (2..). For example, the constraint x N X f, where X f is a set satisfying certain properties, is useful to establish closed loop stability [6,, 3].

62 44 Constrained Finite-Time Optimal Control The constraints (7..22)-(7..23) can be written as linear constraints on u of the form Lu W, (7..24) where L = I Nm Ψ E I Nm Ψ Ẽ L, W = u max y max δu max u min y min δu min W. (7..25) In (7..25), I Nm is the Nm Nm identity matrix (where N is the prediction/control horizon and m is the number of inputs). Ψ is the following (N )m (N )m matrix: CB... CAB CB... Ψ =..... (7..26).. CA N B CA N 2 B... CAB CB E is the following Nm Nm matrix: I m... I m I m... E = I m I m where I m is the m m identity matrix; and (7..27) L diag{l, L 2,..., L N }Γ (7..28) where L,..., L N are the state constraint matrices of the form (2..) and Γ is given in (7..4). The vectors forming W in (7..25) are as follows u max = u max. u max, u min = u min., u min u( ) + δu max u( ) δu min δu max δu max =., δu δu min min =., δu max δu min (7..29a) (7..29b)

63 Optimal control for PWA Systems 45 y max CAx y max =., y max CA N x y min + CAx y min =., y min + CA N x Ax W diag{l, L 2,..., L N }. + A N x W W 2., W N (7..29c) (7..29d) where x is the initial state, u max, u min, δu max, δu min, y max, y min are the vectors of constraint limits defined in (7..22) and L,..., L N, W,..., W N are the matrices and vectors of the state constraint polyhedra (2..). 7.2 Optimal control for PWA Systems We introduce the basics of the optimal control for linear Piecewise affine system based on [49, 3]. If we choose PWA system (5..2) as a prediction model, optimal control problem can be written as: J N,M ({x(k)}, {u(k)}}) P x(n) p + N k= Q x x(k) p + M k= Ru(k) p, (7.2.a) subj. to: x(k + ) = n L i= x(k) X, u(k) U, Lx(N) W. δ i (A i x(k) + B i u(k) + f i ), (7.2.b) (7.2.c) (7.2.d) (7.2.e) where p denotes p-norm, for p = {, }. Binary selectors δ i = {, }, i =,..., n L are defined such that: ([ ] ) x(k) (δ i = ) D u(k) i (7.2.2)

64 46 Constrained Finite-Time Optimal Control In [3] was introduced method for transforming IF-THEN logic statements into equivalent linear inequalities. By this technique, expression (4.3.2) can be written by [ ] x(k) H i K u(k) i M i ( δ i ), i =,..., n L (7.2.3a) with n L i= M i = δ i =, max x X,u U H i (7.2.3b) [ ] x(k) K u(k) i. (7.2.4) Equation (7.2.b) is nonlinear due to the product between δ i and the states and inputs, but it can be converted [3] into linear form by x(k + ) (A i x(k) + B i u(k) + f i ) M i ( δ i ), x(k + ) (A i x(k) + B i u(k) + f i ) m i ( δ i ), (7.2.5a) (7.2.5b) where M i = m i = max x X,u U A ix + B i u + f i min x X,u U A ix + B i u + f i (7.2.6a) (7.2.6b) Therefore the IF-THEN-based PWA model (5..2) can be equivalently written as a set of constraints (7.2.3) and (7.2.5), all linear in the decision variables, some of them being binary. Therefore the optimization problem (7.2.) can be stated, for p = {, }, as J N,M ({x(k)}, {u(k)}}) P x(n) p + subj. to: N k= Q x x(k) p + M k= [ ] x(k) H i K u(k) i M i ( δ i ), n L i= δ k,i =, x(k + ) (A i x(k) + B i u(k) + f i ) M i ( δ k,i ), x(k + ) (A i x(k) + B i u(k) + f i ) m i ( δ k,i ), x(k) X, u(k) U, Lx(N) W. Ru(k) p, (7.2.7a) (7.2.7b) (7.2.7c) (7.2.7d) (7.2.7e) (7.2.7f) (7.2.7g) (7.2.7h)

65 Optimal control for PWA Systems 47 where constraints (7.2.7c) (7.2.7e) must be imposed for all i =,..., n L. Note that separate binary selectors δ k,i, need to be introduced for each prediction step k. Therefore the total number of binary variables amounts to Nn L. As the objective function (7.2.7a) as well as all constraints are linear, problem (7.2.7) can be cast as a mixed-integer linear program (3.4.).

66 48 Constrained Finite-Time Optimal Control

67 Chapter 8 Explicit Model Predictive Control In [4] was shown that solution of the multi-parametric problem can be expressed as a piecewise affine function over convex polyhedral region set. This result allows to express solution of the MPC problem as a explicit state-feedback regulator. This state-feedback regulator is a linear piecewise affine function of the state variables with defined polyhedral partitioning of the state space. The explicit-mpc brings new possibilities for MPC implementation. All computations are moved off-line and solution is formulated as a lookup table. The necessary on-line implementation effort thus reduces to a identification of a active polyhedral set based on the current state and evaluation a associated affine feedback law. The controller inherits all the stability and performance properties of the classic MPC but can be implemented without any involved on-line computations. Therefore it is possible to use hardware platform with lower computation power and by lower amount of the available storage space, and decrease the price of control system hardware. A light insight of the technique is outlined in the section Examples Consider the specific linear system x(k + ) = Ax(k) + Bu(k), y(k) = Cx(k), with A = [ ], B = [ ].5, C = [ ],

68 5 Explicit Model Predictive Control which is the zero-order hold discretisation with sampling period of the double integrator d 2 y(t) dt 2 = u(t). Solving mpqp, we will design piecewise affine feedback controller. We use a prediction horizon N = and minimise, for the initial state x(), the one-step objective function: J (x()) = 2 x(2)t P x(2) + x(k) T Q x x(k) + u(k) T Ru(k), 2 k= (8..a) subj.to : x(k + ) = Ax(k) + Bu(u), (8..b) [ ] 2 x(k), (8..c) 2 u(k), (8..d) By solving this mpqp using the function mpt_mpqp of the MPT toolbox [5], one obtains the explicit representation of the optimizer u (x()) as the following PWA function of the parameter x(), defined over five polytopic regions P i = {x H i x K i }: [.52 ] if x P J2 (x()) = x + if x P.94 2 [ ].52 x if x P.94 3 [ ]. x. if x P.54 4 [ ]. x +. if x P.54 5 (8..2) The 2-dimensional polytopic regions P i are depicted in Figure 8.a, while J (x) is vizualized in Figure 8.b. The PWA representation of state feedback controller u x (x()) is shown in Figure 8.2a. Next,we will design explicit controller for satellite positioning hybrid system (5.2.2). In order to design a model-based controller with MPT toolbox, we need to convert the HYSDEL model into an equivalent Piecewise-Affine (PWA) model

69 Examples P 5 5 Speed.5.5 P 2 P P 3 J * (x) 5.5 P Position 2 speed 2 2 position 2 (a) Regions P, P 2, P 3, P 4 andp 5 (b) Value function J (x()) Figure 8.: Regions and the optimal value function of the mpqp solution. (5.2.2). After conversion the model has four dynamics:. u c (k) x(k + ) = x(k) +.25 u b, (k) + u b,2 (k) y = [ ] x u(2).5 u(3).5. u c (k) x(k + ) = x(k) +.25 u b, (k) +. u b,2 (k) y = [ ] x u(2).5 u(3).5. u c (k) x(k + ) = x(k) +.25 u b, (k) +. u b,2 (k) y = [ ] x u(2).5 u(3).5 (8..3a) (8..3b) (8..3c)

70 52 Explicit Model Predictive Control U * (x).2 Speed Speed 2 2 Position Position (a) PWA function u (x()) (b) Closed-Loop Trajectory for initial state (-.939,.9589) Figure 8.2: Optimizer u (x()) and closed loop trajectory.. u c (k) x(k + ) = x(k) +.25 u b, (k) + u b,2 (k) y = [ ] x u(2).5 u(3).5 (8..3d) Now, we define the optimization problem. Our objective is to obtain a controller which stabilizes satellite on reference attitude, in our case x ref =.5. Our controller will predict system behavior 4 sampling times into the future, choosing such control actions which minimize the difference between the predicted output and our given reference. The cost function used in this example is of the form (7.2.7) with added output term N k= Q yy(k) p, with p = and Q x = [ ], R = 5 [ ], P = [ ], Q y = 5. Explicit controller is generated over 2 regions. Simulation results are captured in Figure 8.3. The right-top corner plot shows how the attitude of the satellite (solid), follows the sampled reference signal (dashed), when the calculated optimal control signal sequence is applied to the continuous model of the system. The lefttop corner plot shows the control signals, u c (solid), u b, (dashed-purple) and u b,2 (dash-dotted-red). The left-bottom corner plot shows the active dynamics during

71 Complexity of explicit MPC [49] 53.5 u u 2 u y r Inputs Sampling Instances (a) Evolution of control moves Outputs Sampling Instances (b) Evolution of output 3 Active dynamics 2.5 Dynamics Sampling Instances (c) Active dynamics (d) State space partitioning Figure 8.3: Performance of the explicit control of the hybrid system (5.2.2) the system performance. The right-bottom corner plot shows the regions of state space partitioning. 8.2 Complexity of explicit MPC [49] Considering computational effort of explicit MPC we have to distinguish between complexity of the off-line computation and complexity of the on-line implementation of the control law.

72 54 Explicit Model Predictive Control Off-line complexity of specific control problem depends on type of the used multiparametric specification. Some control problems can be solved as a linear mp problems which are less computational demanding than mp problems with quadratic criterion. Also, complexity linearly depends on the number of PWA dynamics (hybrid case) and exponentially grows with prediction horizon number N. Now, we summarize the complexity of mpqp as was derived in [6, 49]. If the multi-parametric program is non-degenerate [6], at most m constraints can be active in each region. As the number of l combinations of constraints out of a set of m is ( ) m l = m!, the number of possible combinations of active constraints (m l)!l! at the solution of a QP is at most R = ( ) m m l= l = 2 m. It should, however, be noted that not all such p-combinations of the constraints have to be feasible [3], and therefore R R for most practical applications. The total number of QPs is proportional to total number of generated regions R. In every step of state space exploration (step 3 in Algorithm 4.3) a new point outside of the active/critical region needs to be found in order to discover remaining regions. During this procedure center of each polyhedron edge (facet) is computed, whereas each such central point can be found by solving a linear program. This procedure needs to be repeated for all regions, therefore the total number of LPs to be solved is given by Rn f, where n f = ( r f r )/R denotes the average number of edges (facets) of all regions, where f r denotes the number of constraints defining the r-th region. The redundant constraints in the definition of the region P r can prohibitively increase amount of memory for storing the solution. Therefore it is a standard practice in multi-parametric programming to remove such redundant constraints. This procedure requires Rm LPs to be solved. The efficient polytope reduction algorithm was presented in [84]. To sum up, the off-line complexity of a given mpqp program is represented by O(RO(QP n,m ) + R(n f + m)o(lp p,m )), where O(QP n,m ) denotes the complexity of solving a QP with n variables and m constraints, and O(LP p,m ) denotes the complexity of a linear program in p variables and m constraints [49]. Actually, off-line complexity plays the least important role in the explicit MPC synthesis. In real-time implementation of explicit MPC it must be possible to store all parameters of the PWA function in the memory of the target hardware platform (space complexity) and it must be possible to evaluate control law for any x() = x(t) within one sampling time using the hardware at hand. As the memory storage storage of any control platform is limited, there will always exist the upper bound on the total number of regions which can be stored. Execution

73 Stability and Robustness of explicit MPC for PWA systems 55 of demanded control law covers two tasks: (i) find the index r of the region which contains x(); (ii) evaluate the corresponding affine feedback law F r x() + G r. In literature, many techniques were reported for reducing online complexity and complexity of optimal control at all. Here, we will point out on some of them. In order to deal with the computational burden of optimal control, it is common practice to reduce the degrees of freedom by fixing the input or its derivatives to be constant over several time-steps. This policy is referred to as move blocking [22]. Another approach to reduce complexity of optimal control is concept of minimumtime control [52]. Instead of solving one problem of horizon N, in minimum-time control N problems with horizon are solved in a dynamic programming fashion, i.e. backwards in time. The approach produces feedback controllers which guarantee all-time feasibility and closed-loop exponential stability by construction. A frequent case in explicit MPC is situation when multiple regions share the same control law. In literature, policy for eliminating of this effect is called region merging [5]. Another option to reduce space complexity was presented in [5]. The idea of this method is to approximate the optimal control law defined over state space regions by a higher degree polynomial which then guarantees closed-loop stability, constraint satisfaction, and a bounded performance decay. The advantage of the method lies in faster controller evaluation and lower storage demand. Reduction of the execution time of the implemented control law lies in effective solution of point location problem. An approache based on search tree was reported in [86]. 8.3 Stability and Robustness of explicit MPC for PWA systems In this section we review a method to obtain stability guarantees for general receding horizon control of PWA systems. Next, we extend this method for PWA system with defined parametric uncertainties and show robustness for such system. The scheme for computing stability guarantee was published in [33] and was based on the results in [65, 74]. For general dynamic systems, stability is guaranteed if an invariant set is imposed as a terminal state constraint (7.2.e) and the terminal cost in (7.2.a) corresponds to a Lyapunov function for that set [64]. Definition (Invariant set) A set X inv is (positively) invariant for a dynamical

74 56 Explicit Model Predictive Control system if once the state x(t) enters that set at any given time t, it remains in it for all future time, i.e., x(t ) X inv x(t) X inv t t. Definition (Maximal positively invariant set [74]) The maximal positively invariant set, Ω, for discrete time system x(k + ) = (A i + B i K i )x subject to the constraints (x k X, k ) is defined as Ω {x X φ(k; x ) X, k N} (8.3.) where φ(k; x ) denotes the solution of x(k + ) = (A i + B i K i )x at time k if the initial state is x and X denotes set of x containing origin. Following policy is based on the assumption that the origin is equilibrium state of the PWA system. If this assumption is not satisfied, the approach will fail. In a first step a stabilizing piecewise linear feedback controller, of the form u = K i x if x D i is computed. A set of indices I denotes dynamics which contain the origin in their respective interiors, i.e. I {i I D i } (8.3.2) To get feedback controllers K i and a matrix P of associated quadratic Lyapunov function V (x) = x T P s we need to find solution of following bilinear inequalities x T P x, x X, (8.3.3a) x T (A i + B i K i ) T P (A i + B i K i )x x T P x x T Q x x x T K T i RK i x, x D i, i I. (8.3.3b) If the conditions (8.3.3) are relaxed by setting D i = R n, i I, the problem can be rewritten as an SDP by using Schur complements and introducing the new variables Y i = K i Z and Z = γ P (see [8, 65] for details) min γ Y i,z,γ (8.3.4a) subj. to Z >, (8.3.4b) Z (A i Z + B i Y i ) (Qx.5 Z) T (R.5 Y i ) T (A i Z + B i Y i ) T Z (Q.5 x Z) γi, i I. (8.3.4c) (R.5 Y i ) γi Note that it may not be possible to make relaxation, in practice, D i = R n, since in the original PWA model (5..2) not all dynamics i are defined over the entire state

75 Stability and Robustness of explicit MPC for PWA systems 57 space. In that case it is necessary to introduce region information into SDP using ellipsoidal approximation and S-procedure [56, 8]. In next step, the terminal set constraint X set = Ω is computed according to [74]. Terminal set constraint X set along with the terminal Lyapunov cost P in (7.2.a) guarantee asymptotic stability of closed loop system. Many practical systems are always subject to various kinds of uncertainties and the PWA systems are not exception. Although a rich theory has been developed for the robust control of linear systems, relatively few results exist for the robust control of constrained linear systems and even less for hybrid systems. Few results have also been obtained on robust optimal controller design for uncertain continuous-time PWA systems. In [77] the robust RHC problem, with norm-bounded uncertainties, was written as mixed integer semi-definite programming problem (MISDP) and on-line computational scheme proposed. In [5, 96] authors study robust model predictive control for PWA systems with polytopic uncertainties. The Lyapunov difference with PWA system with polytopic uncertainties lead to bilinear matrix inequalities which can be transformed into LMI and in every step of RHC algorithm SDP is solved. In [5], in order to reduce the on-line computation, an improved robust MPC algorithm was proposed extra. The problem of robust optimal control with the emphasis on the explicit solution was studied in [74]. The key concept of the algorithms is a maximal robust invariant set, i.e. a set of states for which infinite time feasibility is guaranteed for a specific type of disturbances/uncertainties. The algorithms are indifferent to considered disturbances/uncertainties. In [56] robust control was synthesized for PWA systems with polytopic time-varying uncertainties and for PWA systems with norm-bounded uncertainties respectively. These methods can be used in following algorithm for Maximal Robustly Positively Invariant Set computation. Algorithm (Maximal Robustly Positively Invariant Set). Identify all dynamics i which contain the origin, i.e. i I {i N + D i }. 2. Solve SDP corresponding to specific disturbance definition (polytopic or normbounded) [56] for all i I, to obtain K i and P. If SDP is infeasible, abort the algorithm. 3. Compute the maximal robustly positively invariant set Ω corresponding to the closed loop system x(k + ) = (A i + B i K i )x(k), if x D i with the method in [74].

76 58 Explicit Model Predictive Control 4. Return the calculated Ω, the feedback laws K i and associated matrix P. In [74] authors showed method which could be used to obtain robust state feedback controllers for PWA systems in combination with multi-parametric programming techniques with reduced complexity control design [33].

77 Chapter 9 Implementation of Control Law 9. Introduction In literature many successful applications of MPC were presented. Because of computational burden of classical MPC the applications were applied mostly in slow processes typical for chemical industry [2, 73]. Sampling time for such processes varies from 3 to 2 seconds. The classical MPC requires computationally powerful controllers to achieve the optimization results in real time. This limitations have prevented the wider spread of MPC scheme in industry. The explicit model predictive control (EMPC) was presented as suitable control scheme for high-sampling frequency operation [6, 6,, 3]. The problem constraints are naturally respected by including them into the optimal control problem. At run time, the EMPC algorithm iterates through a binary search-tree (BST) to find a active region in the state space and selects the associated feedback control law to apply in order to obtain the optimal control action. In order to reduce control computation time, the trend is today to move controller implementation from micro-controllers or DSP to FPGA or dedicated silicon devices. From the hardware synthesis viewpoint, [42] showed that explicit MPC solutions can be implemented in an application specific integrated circuit (ASIC) with about 2, gates, leading to computation times in order of µs Table 9. shows the progress of the MPC in high-sampling time applications. The fastest EMPC application is operating with nanoseconds sampling time. In the application the temperature regulation of a multi-core processor is performed minimizing power usage subject to temperature limitations. The storage of the control law required 7kB and the online computation using BST required 73 FLOPS.

78 6 Implementation of Control Law Table 9.: The table shows the progress of the MPC in high-frequency applications Sample time Application Institute 8 ns Multi-core thermal management [] EPFL µs Voltage source inverters [62] ETHZ 25 µs Direct torque control [3] ABB 5 µs AC / DC converters [75] ETHZ 2 ms Traction control [7] FORD 3 ms Ball and plate [49] ETHZ 5 ms Building climate control using weather forecast [69] Siemens 9.2 Implementation and available software tools The explicit control law is given by u(k) = K r x(k) + G r (9.2.) where the index r denotes the active region, i.e. the region which contains the given state x(k). The evaluation of explicit MPC controller turns into simple procedure where simple membership-test returns active control law for given state x(k) and control action is calculated according (9.2.) and applied to the system [49]. Algorithm (Algorithm for evaluation of explicit MPC [49]) Input: Polyhedral partition P, PWA control law K,G, matrices of the cost expression A,B,C. Output: Optimal control action u associated to a given state, index of the active region r.. Identify regions of P which contain the point x. Denote array of the associated regions by R. 2. IF R =, return ERROR - No associated control law found. 3. Set J = 4. FOR each element of R DO (a) J = x T A r x + B r x + C r ; (b) Add the ordered pair {J, r} to J 5. END FOR

79 Implementation and available software tools 6 (a) Two-dimension controller with 7 regions (b) Binary search tree associated to the controller of Fig. 9.a h i features hyperplane i, l j control law j Figure 9.: This figure shows an example of search tree construction for EMPC 6. Identify the minimal cost from the set of ordered pairs J 7. Extract from J the region r associated to the minimal cost. 8. Compute the optimal input sequence u = K r x + G r. 9. Return u,r. The first step of the algorithm (9.2.) can be performed using sequential search or binary search-tree. The sequential search is very simple and works for all problems. Potentially faster is binary search-tree technique [86]. At each node of the search tree, an affine expression of the controller state is evaluated on each side of the boundary the state is to select the next node and repeat the procedure until the region is found. A binary search tree associated to the state space partition of Fig. 9.a is shown in Fig. 9.b. To build a BST requires significant offline processing for the problems of many regions. To built a BST is reasonable for problems < regions. There are many other options of point locations for special cases. A linear function is evaluated at each iteration (represented with circles in Fig. 9.2). The linear function coefficients are stored in memories. The pointer that selects the memory address is initialized to the top of the memory at each sampling period and updated at each iteration of the tree depicted in Fig. 9.2 depending on the sign of the result. The number of variables that are combined in the linear functions depends on the type of controller. A trade off between speed and silicon usage must be done to evaluate this linear function.

80 62 Implementation of Control Law observer binary search tree control law Figure 9.2: Observer and controller: each circle corresponds to the evaluation of a linear function and a linear test for the binary search tree circles (search tree corresponds to example of Fig. 9.a MPT toolbox [5] allows to export explicit controllers to a standalone C-code which can then be linked together with the application. To export a controller, call >> mpt_exportc(ctrl) A file called mpt_getinput.h will be created in the working directory which contains parameters of polyhedral set P and control law matrices K,G. The header file is then compiled along with mpt_getinput.c and the target application. If a binary search tree was calculated for a given controller by calling mpt searchtree, it is possible to export such tree into a standalone C-file by calling >> mpt_exportst(ctrl, filename) In [6] the control algorithms are implemented in C using integer arithmetic on a 6-b fixed-point Analog Device Blackfin DSP [72]. The optimal control problem is formulated and solved using Yalmip [59] and MPT [5] toolboxes in Matlab. The binary search tree was also built using MPT and subsequently transformed into a set of C code arrays that are used by the EPMC algorithm. Comparing the proposed control scheme with a classical approach such as a PI [89], it might seem relatively complex. Beyond the additional performance this control scheme provides, comparing the overall control scheme comprising all the necessary additional functions that are necessary to make a classical controller operate properly under all operating condition, the proposed control compares favorably, even from the implementation point of view. Offset free control is inherently enforced through the integrated observer/controller scheme. Windup is also practically impossible, which makes the corresponding anti-windup function unnecessary. Duty cycle limitation is inherently enforced, which avoids the need of clipping mechanism.

81 Implementation and available software tools 63 These two aspects preserve the system against overflows, which is a serious asset, especially for FPGA implementations [6]. The optimization of EMPC control law was addressed in [5]. To decrease a overall number of control laws (storage demand) authors proposed approximation of control laws defined over state space regions by a higher degree polynomial which then guarantees closed-loop stability, constraint satisfaction, and a bounded performance decay.

82 64 Implementation of Control Law

83 Part III Neural network based PWA linear model

84

85 Chapter Introduction In recent research, several methods were developed for identifying a hybrid system or a common non-linear system in the hybrid model structure (MLD, PWA, MMPS) [76, 28, 43]. This chapter is dedicated to a issue of the non-linear system approximation by the Piecewise Affine (PWA) linear model. The identification of the non-linear system is based on a novel method of PWA modelling by a Generalized Fourier Series [9]. The approach provides the identification of the non-linear function of an arbitrary number of variables and identification of non-linear dynamical system in a polynomial model structure from input-output measurements. The identification problem is transformed into a series of one-dimensional approximations. This approach belongs to a black-box approximation methods of a general non-linear system [8]. The PWA linear approximation of the hybrid system depends on defining guard lines of the PWA mapping. If guard lines are known, the problem of identifying PWA system can be easily resolved using standard techniques for linear systems [76]. The method based on finding the mapping guard lines is suitable for linear system with non-linear discrete parts, like switches which change system behavior in step. Other methods a priori assume that the system dynamics is continuous [28]. Both mentioned approaches use for identification a clustering-based algorithm. The clustering-based algorithm was employed in traditional identification of PWA map. The driving idea of the clustering-based procedure resides in local linearity of PWA map. Then, if the local models around two data points are similar, it is likely that the data points belong to the same mode. The clustering-based algorithm consists of four basic steps [28]: a) Associate to each data point a local affine model; b) Aggregate local models with similar features into clusters;

86 68 Introduction c) Classify in the same way data points corresponding to the local models in the same cluster; d) Estimate parameter vectors and regions. This approach is suitable for two and more dimensional problem too. Disadvantages are complexity and heuristic character of the procedure. As will be pointed out, non-linear identification technique can be used under a specific condition in order to obtain a linear PWA model. In [54] orthogonal polynomials were used as activation functions for special case of neural network with one hidden layer - an Orthogonal Activation Function based Neural Network (OAF NN). For this type of neural network a online and a off-line training algorithm have been defined with fast convergence properties. After a simple modification of OAF- NN it is possible to use this technique for PWA approximation of a common non-linear system. The key idea stems from the fact that a function of one variable is easier linearizable than complex function of many variables. Similarly as a Taylor series, it is possible to define any non-linear function as a series of non-linear algebraic functions. This approach leads to the Generalized Fourier polynomial series. The Generalized Fourier series (GFS) is based on a set of one-dimensional orthonormal functions φ (N) i defined as x2 φ (N) i (x)φ (N) j (x) = δ ij (..) x where δ ij is the Kronecker delta function and [x, x 2 ] is the domain of interest. Several examples of orthonormal functions are the normalized Fourier (harmonic) functions, Legendre polynomials, Chebyshev polynomials and Laguerre polynomials [54]. In this paper only the Chebyshev polynomials will be discussed. The Orthogonal Activation Function based Neural Network (OAF-NN) is employed in the task of non-linear approximation. The PWA approximation of each used orthonormal polynomial creates Piecewise Affine Orthogonal Activation Function based Neural Network (PWA-OAF-NN).

87 Chapter Orthogonal Activation Function based Neural Network. Introduction The network uses orthogonal activation functions that allow significant reducing of a computational complexity. Another advantage is a numerical stability, because the system of orthonormal functions is linearly independent by definition. A learning procedure for proposed ANN with guaranteed convergence to the global minimum of a error function in the parameter space is developed. An apparent advantage is easier implementation and lower computational load in comparison to the conventional neural network architecture. The orthogonal activation function based neural network is a three-layer neural structure with an input layer, an output layer and a hidden layer as shown in Fig..a for a multi-input-single-output (MISO) system. The hidden layer consists of neurons with orthogonal (preferably orthonormal) activation functions. The activation functions for these neurons belong to the same class of orthogonal functions and no two neurons have the same order of activation function. The input and output layers consist of linear neurons. The weights between the input and the hidden layer are fixed, and depend on the orthogonal activation functions. The nodes on the right of the orthogonal neurons implement the product (Π). Each node has m input signals from different input blocks. The nodes are considered as part of the hidden layer because there is no weighting operation between orthogonal neurons and nodes (Fig..a).

88 7 Orthogonal Activation Function based Neural Network x Orthogonal neurons Π Π Product ŵ... x π 2x π 2 ( x ) 2 2 π Ππ Ππ Ππ x 2 Input block Π ŵ... ˆ w n.. n i.. n m ˆ w N.. N i.. n m Output neuron y m - 3 ( x x) π Input block π Ππ Ππ Ππ y x m Input block 2 Input block m Π Π ˆ w N.. N i.. N m Training method Input layer Hidden layer Output layer e y p + x 2 2x π 2 ( x ) 2 2 π 3 ( x x) π Input block Ππ Ππ Ππ Ππ (a) OAF NN structure (b) Adjusted OAF NN structure Figure.: Orthogonal Activation Function Neural Network The network output is defined by a linear combination of the network weights ŷ( x, ˆ w) = N N m n = n m= ŵ n...n m φ nr...n m ( x) = Φ T ( x) ˆ w, (..) where x = [x, x 2,..., x m ] is m-dimensional input vector, N i is the neuron number of i-th input and ˆ w between the hidden and output layers. Functions φ n...n m ( x) are orthogonal functions in m-dimensional space given by m φ n...n m ( x) = φ n (x i ), (..2) i where φ i ( x) are one-dimensional orthogonal functions implemented by each hidden layer neuron. A straightforward approach to get a sum of single-variable algebraic expressions lies in removing the connections into which increase dimension of the function (..2). Then we get the Generalized Fourier series of a optional non-linear system (Fig..b). A system of one-dimensional functions φ i (x) is orthogonal/orthonormal in <

89 Introduction 7 x, x 2 > if if i = j φ i (x)φ j (x) = x if i j x2 K 2 i (..3) where x2 K i = x (φ i (x)) 2 dx (..4) is a norm of the orthogonal function. In case of orthonormal functions K i =. The orthonormal system φ normi (x) is obtained from the orthogonal one φ i (x) by dividing by the norm φ normi (x) = φ i (x)/k i. In the examples we have used the Chebyshev polynomials which are orthogonal in <, > and the weighting function is / x 2. The Chebyshev polynomials of the first kind can be defined by the trigonometric identity T n (x) = cos(n arccos(x)) (..5) with the norm defined as follows (T x 2 n(x)) 2 dx = π n = π/2 n A recursive generating formula for the Chebyshev polynomials is T (x) =, T (x) = x, T n+ (x) = 2xT n (x) T n (x), T n (x) = U n+ (x) U n (x). (..6) (..7a) (..7b) (..7c) (..7d) where U n is the Chebyshev polynomial of the second kind generated by the recursive formula U (x) =, U (x) = 2x, U n+ (x) = 2xU n (x) U n (x), The first five Chebyshev polynomials of the first kind are T (x) =, T (x) = x, T 2 (x) = 2x 2 T 3 (x) = 4x 3 3x T 4 (x) = 8x 4 8x 2 +. (..8a) (..8b) (..8c) (..9a) (..9b) (..9c) (..9d) (..9e)

90 72 Orthogonal Activation Function based Neural Network Figure.2: Chebyshev Polynomials of the st Kind The first five Chebyshev polynomials of the second kind are U (x) =, U (x) = 2x, U 2 (x) = 4x 2 U 3 (x) = 8x 3 4x U 4 (x) = 6x 4 2x 2 +. (..a) (..b) (..c) (..d) (..e).2 Least-squares learning In parameter identification of ANN a selection of suitable training input-output measurements and a network topology are important. The training data must represents a dynamic behavior of a plant in a specific range. In literature it is possible to find suggestions for choosing the topology and the number of hidden neurons [83]. There were also reported many methods for a neural network training. For OAF-NN parameter identification the least-squares estimator is used [44]. If the plant is observed during N periods then we can formulate the following matrix equation Y N = Φ N θ + Ξ N (.2.) where Y N = [y(), y(2),..., y(n)] T, Φ N = [ φ T (), φ T (2),..., φ T (N) ] T and ΞN = [ξ(), ξ(2),..., ξ(n)] T For particular vector of parameters W the output prediction of k-th step is ŷ(k, W ) = φ T (k)w (.2.2)

91 Least-squares learning 73 The prediction error is defined as Then we define a performance index ɛ(k, W ) = y p (k) ŷ m (k, W ) (.2.3) or in the matrix form: N J N = /2 ɛ 2 (k, W ) (.2.4) i= J N = /2(Y N Φ N ) T (Y N Φ N ) (.2.5) The least squares estimator minimizes the performance index and is described by the well known formula Ŵ = [ Φ T NΦ N ] Φ T N Y N (.2.6) Next we derive a recursive formula for online adaptation of the network weights [94]. To come in line with standard literature, we introduce P (k) = [ Φ T NΦ N ] (.2.7) then we can write P (k) = [ Φ T k Φ k + φ(k)φ T (k) ] = [ P (k ) + φ(k)φ T (k) ] (.2.8) In order to get a direct update from P (k ) to P (k) we need to apply the Matrix Inversion Lemma: After inversion we get (A + BCD) = A A B(C + DA B) DA (.2.9) P (k) = P (k ) P (k )φ(k)φt (k)p (k ) + φ T (k)p (k )φ(k) (.2.) Next we introduce vector K(k) = P (k)φ(k) which can be expressed from (.2.) as P (k )φ(k) K(k) = (.2.) + φ T (k)p (k )φ(k) From (.2.6) and (.2.7) we can express parameter of the estimation W (k) in k th step [ k k ] W (k) = P (k)φ T k Y k = P (k) φ(i)y p (i) = P (k) φ(i)y p (i) + φ(k)y p (k) i= i= (.2.2)

92 74 Orthogonal Activation Function based Neural Network where k i= φ(i)y p (i) = P (k)w (k ) φ(k)φ T (k)w (k ). (.2.3) The final estimator is defined as follows W (k) = W (k ) P (k)φ(k)φ T (k)w (k ) + P (k)φ(k)y p (k) = W (k ) + P (k)φ(k) [ y p (k) φ T (k)w (k ) ] = W (k ) + P (k)φ(k)ε(k, W (k )).3 Properties of OAF based neural networks (.2.4) Many good properties speak for exploiting of the OAF based neural network in system identification and control [54]: Function approximation capability Any arbitrary function (at least piecewise continuous) can be approximated by the network to any desired level of accuracy. The approximation error is inversely proportional to the number of neurons. Computational parallelism The OAF NN possesses a computational parallelism defined by its topological structure, Fig... Every input signal takes an equal amount of computational time. This computational parallelism allows the OAF NN to have very fast learning with parallel processing computer hardware. Learning stability for the Gradient Descent Rule In [54] the Lyapunov approach is used to investigate the learning stability of Fourier harmonic function based NN when applying the delta rule to govern the learning. It was validated that square of neural network learning error always changes in a negative gradient direction. Absence of local minima The error surface (cost function) for OAF NN is a hyperparabola in n-dimensional space. In other words, cost function is convex function with no local minima irrespective of the choice of activation functions. If the activation functions are linearly independent and training is sufficiently exciting, there exist a unique global minimum [2]; otherwise there are an infinite number of possible global minima. Parameter convergence The weights in a network, using OAF with sufficient training always converge to the unique global minimum defined by the optimum weight vector.

93 Properties of OAF based neural networks 75 Rate of Convergence The OAF NNs have a much higher learning speed than the multilayered feed-forward networks Model Generalization Generalization is the capability which allows a trained neural network model to respond appropriately when presented with unfamiliar inputs in the sense that they are not used for the neural network training. There exist a "rule of thumb" for estimating highest order of orthogonal activation and number of neurons in hidden layer analogous to the Shannon sampling theorem [54]

94 76 Orthogonal Activation Function based Neural Network

95 Chapter 2 Piecewise Affine OAF Neural Network (PWA OAF NN) 2. Linear approximation A proper piecewise linear approximation of orthogonal activation functions plays a key role in a effective modelling. Next, PWA approximation is showed for the Chebyshev polynomials. Similar procedure can be used for another type of orthogonal polynomials (Legendre, Laguerre, etc.). A convenient feature of all Chebyshev polynomials is their symmetry. All polynomials of even order are symmetrical by the vertical axis and all polynomial of odd order are symmetrical by the origin. These properties allow to decrease the number of linearization points to half and simplify the optimization problem (4.2.5). To get the lowest number of shift cases of the final PWA model we linearize the polynomials in the same points. The term linearization point denotes the interval division point where the PWA function breaks. We perform the linear approximation of the polynomials by solving a LSQ problem (4.2.5) in the positive half plane for a finite number of linearization intervals. The PWA approximation of first six Chebyshev polynomials is captured in Figure 2.. The polynomials are linearized in three points x =.5, x 2 =, x 3 =.5. But thanks to the symmetry feature the LSQ problem (4.2.5) is solved only in one point. The total number of the shifting cases for the resulting PWA state space model is (n u ) lp+ where n u is the number of neural network inputs and l p is the number of the linearization points.

96 78 Piecewise Affine OAF Neural Network (PWA OAF NN) T (x) T 3 (x) T 5 (x) x x x T 2 (x) T 4 (x) T 6 (x) x x x Figure 2.: PWA approximation of first six Chebyshev polynomials 2.2 Optimization of linearization points In this section we will discuss how to optimize the location of the linearization points in order to refine the accuracy of the approximation. It can be seen in Figure 2. that there is a chance to improve approximation by moving linearization point. In Figure 2.2, the optimized position of the breaking point is captured (compare with fig. 2.). It is hardly to recognize but the total linearization error for the first six polynomials has decreased. It is important to remark that total error depends on the values of the network gains. Neurons with gains of a higher absolute value need finer approximation than another ones. If we want to make a straightforward optimization it is need to construct a total error function for all used orthogonal polynomials. In [85] an approach to find parameters of PWA model using available optimization procedures was presented. The

97 Optimization of linearization points 79 T (x) x T 2 (x) x T 3 (x).5 T 4 (x) x x T 5 (x) x T 6 (x) x Figure 2.2: Figure shows PWA approximation of first six Chebyshev polynomials with optimized location of breaking points. technique is based on a solution of the following optimization problem min a i,c i,r i ( N i i= r i (f(z) (a i z + c i )) 2 dz s.t.: z min r... r N z max, a i r i + c i = a i+ r i + c i+, i =,..., N. ) (2.2.a) (2.2.b) (2.2.c) where N denotes number of the linearization points and a i, c i, r i are the unknown parameters. Thanks to the knowledge of algebraic form of f(z) it is possible to express the integral (2.2.a) in an analytical form with unknowns a i, c i, r i. The problem (2.2.) can be solved to a local optimality e.g. by using the fmincon solver of Matlab [85]. Considering f(z) as a single Chebyshev polynomial and extending the problem (2.2.) for a finite number of polynomials we can specify following optimization

98 8 Piecewise Affine OAF Neural Network (PWA OAF NN) problem [ P N ( i min g j a i,j,c i,j,r i j=2 i= r i (T j (z) (a i,j z + c i,j )) 2 dz s.t.: z min r... r N z max, a i,j r i + c i,j = a i+,j r i + c i+,j, i =,..., N, j = 2,..., P. )] (2.2.2a) (2.2.2b) (2.2.2c) where P is number of the Chebyshev polynomials and g 2, g 3,..., g P are gain coefficients which are equal to the network parameters. Through the many optimization variables this problem is becoming computational demanding and numerical algorithm often stuck in a suboptimal solution. Tab. 2. gives overview of run times for various parameters. Run time of a gradient method also depends on a initial point x. A suitable initialization speeds up the non-linear program. For a low number of linearization segments (up to four) it is possible to get the optimal solution in a satisfactory time. For higher number of the linearization segments and increasing number of the polynomials it is worth to consider a stochastic search based on genetic laws. However the objective of PWA modelling is to find a slim model with a satisfactory accuracy. The number of shifting cases of the PWA model grows exponentially with the number of linearization points. Therefore we will use only low number of linearization points. In examples it will be shown that one or two linearization points will satisfy our demands in most of the cases. Table 2.: Optimization run times No. of polynomials No. of linear. segments Gains Run time (s) Solution 4 3 ones OPT 4 4 ones.34 OPT 4 5 ones OPT 5 3 ones.34 OPT 5 4 ones OPT 5 5 ones SUB-OPT 6 3 ones OPT 6 4 ones OPT 6 5 ones OPT 2.3 Transformation of input variables A weakness of the GFS modelling technique consist in the missing mixed terms the OAF network. The notion mixed term indicates the product neuron which multiplies

99 Transformation of input variables f(x,y) 4 f(x,y) PWA ydata x data ydata x data (a) Non-linear function (2.3.) (b) PWA approximation of (2.3.) using transformation (2.3.2) Figure 2.3: In this figure, an example of the use of transformation (2.3.2) is given. Function (2.3.) is plotted over range [.4, ] [, 8] the orthogonal functions from different inputs. Lets consider the following approximation problem f(x, y) = xy (2.3.) The function (2.3.) is captured in Fig. 2.3a. If we use the PWA GFS identification method directly we get poor results since the adjusted OAF network does not contain any mixed term. Therefore we introduce the following linear transformation [85] of input variables. x = (x + y) x 2 = (x y) (2.3.2) This transformation changes only character of input variables of the linear model. The function values will remain unchanged. The main idea of the transformation (2.3.2) embodies in curving the linear surface by one of the input variable. f(x, y) = c + c 2 x + c 3 y (2.3.3) g(x, y) = c + c 2 xy + c 3 y (2.3.4) The non-linear term xy can be expressed as 2 (u2 u 2 2) where u = (x + y) and u 2 = (x y). The quadratic terms are already part of the PWA OAF network.

100 82 Piecewise Affine OAF Neural Network (PWA OAF NN) NNARX u(k-nk) OAF u(k-nk-nu) y(k-) Neural network y(k) q - q -2 y(k-) y(k-2) u(k-) OAF ARX y(k) y(k-ny) u(k-2) (a) Common NN ARX structure (b) OAF ARX model for na = 2, nb = 2, nk = or nk = Figure 2.4: Neural Network ARX structure The same technique was studied in the approximation technique [85]. The Drawback of the approach [85] is a necessity of a priori knowledge of a algebraic non-linear formula and a requirement of algebraic modification. But the technique leads to a series of one-dimensional functions and offers very good accuracy. 2.4 State space model form of PWA OAF Neural Network If we consider the neural network in a ARX or a OE model structure with na, nb, nk parameters (Fig. 2.4a) we get the network output difference equation: y = w p +... π 2 [w π p 2 T (y(k )) + + w n T n (y(k ))] π p [w i T (y(k na)) + + w i2 T n (y(k na))] π p [w i3 T (u(k nk)) + + w i4 T n (u(k nk))] π p [w i5 T (u(k i 7 )) + + w i6 T n (u(k i 7 ))]. (2.4.)

101 State space model form of PWA OAF Neural Network 83 where i = (na )(n ) + 2 i 2 = na(n ) + i 3 = nb(n ) + 2 i 4 = (nb + )(n ) + i 5 = (nb + na )(n ) + 2; i 6 = (nb + na)(n ) + ; i 7 = nk + nb p = na + nb (2.4.2) Every Chebyshev polynomial is approximated by a set of lines (Fig. 2.) T n (x) a i x + b i for i = {, 2,..., n div } (2.4.3) The difference equation (2.4.) can be easily transformed to a state space form (5..2). Every difference equation can be expressed by a discrete transfer function. It is possible to use the transformation function tf2ss in Matlab. But this policy doesn t lead to the desired state space PWA form. The correct state space form has to keep all outputs of the difference equation (2.4.) in the state vector. So we can correctly define a guard line inequality (5..3). Here we present a transformation example for the system with parameters na=2, nb=2, nk= or nk= (Fig.2.4b). Difference equation: y(k) = c (i) + c (i) y y(k ) + c (i) y 2 y(k 2)+ c (i) u u(k ) + c u 2u(k (i) 2) (2.4.4) where i denotes coefficients of i th dynamic. In PWA form (5..2) the guard lines are defined for x = u(k 2), x2 = y(k 2), x3 = y(k ) and u = u(k ).

102 84 Piecewise Affine OAF Neural Network (PWA OAF NN) The PWA state space model: x(k + ) = A i x(k) + B i u(k) + f i (2.4.5a) y(k) = C i x(k) + D i (k) + g i (2.4.5b) A i = (2.4.5c) B i = c (i) u 2 c (i) u c (i) y 2 c (i) y (2.4.5d) C i = [ ] (2.4.5e) D i = (2.4.5f) f i = (2.4.5g) c (i) g i = ; (2.4.5h) x (3 ) (2.4.5i) 2.5 Number of linearization points in MPC problem In the previous section we have evaluated the number of linearization regions as n u l p+, where n u is the number of the neural network inputs and l p is the number of the linearization points. The number of regions for the standard PWA state space model grows exponentially. This fact does not speak for the general applicability of the proposed technique. For instance, if we approximate a non-linear dynamical SISO system depicted in figure 2.4b by four linearization points for every input of neural network we get 4 5 = 24 linearization regions. If we use such model for the purpose of control design, the complexity of the model can be prohibitive for the multi-parametric problem. In fact the solution of this problem is quite simple. Actually, we do not need to cut up the state space along the linearization points. We can define own mpc [59] with simple constraints defined by the linearization points for every neural network s input particularly. To illustrate this idea lets consider the following example. Example We have identified model of a non-linear dynamic SISO system depicted in Fig. 2.5a. The input edge of the model possess two previous outputs

103 Number of linearization points in MPC problem 85 q - q -2 y(k-) y(k-2) u(k-) OAF ARX y(k) y (k 2).5.5 y (k ) u (k ) (a) Example (2.5.): OAF ARX model (b) Example (2.5.): State space partition of the model. Figure 2.5: The figure shows the state space partitioning for model of dynamic system with one input and two delayed output (one linearization point). y(k ), y(k 2) and input u(k ). The limits for input and output are normalized to the range < ; >. The each input of the PWA-OAF-NN model is linearized in the single point p =. The final PWA state space model is defined over eight polytopes (Fig. 2.5b). The simple tracking MPC problem definition for standard PWA state space model follows from (7.2.) with eight binary selectors δ i = {, }. J N ({y(k)}, {u(k)}}) subj. to: x(k + ) = N k= 8 i= y(k) = Cx(k), Q y (y(k) y ref ) p, δ i (A i x(k) + B i u(k) + f i ), x(k) < ; > < ; >, u(k) < ; >, (2.5.a) (2.5.b) (2.5.c) (2.5.d) (2.5.e) However, the final PWA-OAF-NN model is a linearly separable polynomial function. Therefore we can reduce the total number of binary selectors by simple redefinition of the MPC problem. The difference equation of the model is in following

104 86 Piecewise Affine OAF Neural Network (PWA OAF NN) form y(k) = c + ca (i) y y(k ) + cb (i) y ca (i) u u(k ) + cb (i) + ca (i) y 2 y(k 2) + cb (i) y 2 (2.5.2) u where ca is a slope and cb is a offset of the linear model for each input. The MPC problem can be defined effectively with six binary selectors as follows J N ({y(k)}, {u(k)}}) subj. to: h (k) = h 2 (k) = y(k + ) = N k= 2 i= 2 i= 2 i= y(k) < ; >, u(k) < ; >, Q y (y(k) y ref ) p, (2.5.3a) δ i (ca (i) y y(k ) + cb (i) y + c), (2.5.3b) γ i (ca (i) y 2 y(k 2) + cb (i) y 2 ), β i (h (k) + h 2 (k) + ca (i) u u(k ) + cb (i) u ), (2.5.3c) (2.5.3d) (2.5.3e) (2.5.3f) Remark The number of binary selectors in MPC problem definition is equal to sum of linearization regions of all inputs of PWA-OAF-NN model. 2.6 Accuracy of the PWA-OAF-NN technique Until now we have considered the OAF neural network without mixed Π terms (.b) and its PWA linearization. In fact it is a Generalized Fourier Series approximation. The Fourier series takes the form (2.4.). It is the sum of one dimensional function and it is the main advantage of the form (2.4.). To be able to pass all the properties of the OAF neural network we cannot remove the mixed terms from the network. The most important quality of the neural network technique lies in the universal approximation theorem [26]. The universal approximation theorem claims that the standard multi-layer feedforward network with a single hidden layer that contains finite number of hidden neurons, and with arbitrary activation function is a universal approximator on a compact subset of R n. If we keep all the mixed terms in the neural network we will need to find the way how to linearize it. The goal is to effectively linearize the mixed terms in the OAF neural network.

105 Accuracy of the PWA-OAF-NN technique 87 In section 2.3 we have presented the simple transformation which is the basis for achieving the goal. In [85] was developed an approach of PWA linearization of a multivariable function. The authors showed that the multi-variable function f(x,..., x n ) could be transformed to a additive separable form [97] using the transformation (2.3.2) if the function satisfied the following assumption. Assumption The function f(x,..., x n ) can be written as n i= α i ( qi j=p i f j (x j ) ). The assumption says that the algebraic formula has to be linearly separable function. Actually, the Orthogonal Activation Function based neural network is a type of feed-forward neural networks which have the ability to transform the non-linear input space into higher dimensional-space where linear separability is possible [27]. Therefore, the OAF neural network (..) satisfies the assumption (2.6.). So we can define the following algorithm for identifying PWA model from input-output measurements.. Normalize the I/O data into range [ ; ] (range of or- Algorithm thogonality). 2. Train the OAF neural network with necessary number of hidden neurons. 3. Prune the network. Remove the neurons with low valued weights (weak parameters). 4. Get the shortest algebraic formula of the pruned network. 5. Linearize all the terms of the algebraic formula using procedure [85]. The final number of linearization points will increase in comparison with the Generalized Fourier Series approach. In return we can achieve an arbitrary accuracy limiting a accuracy of the OAF neural network. As was shown in previous section we can afford to define more linearization points in comparison with the standard PWA state space model. We will demonstrate the procedure on next example. Example Consider a two-variable non-linear static function depicted in Figure 2.6a. We assume that the function formula is unknown and we have got just an input-output data measurement. The plotted data are already normalized into the range of orthogonality [-;].

106 88 Piecewise Affine OAF Neural Network (PWA OAF NN).5.5 F(z,z 2 ) F oaf (z,z 2 ) z 2.5 z.5 z 2.5 z (a) Non-linear static function (b) OAF approximation na =, nb = 2 Figure 2.6: The figure shows non-linear static function for example (2.6.) and its approximation by OAF neural network The training of the OAF network was performed with 2 neurons in hidden layer. We pruned 7 neurons which contribution were negligible. The final formula of the OAF network remained as follows F OAF =z ( 2.34z z z 2.52 ) + + z ( z z z 2.3 ) + z ( 3.32z z 2.66 ) z z z z z z (2.6.) The formula (2.6.) consist of 5 terms where each term will be linearized independently. Last two terms are easy linearizable. The first three terms are linearly separable and they are processed by the procedure [85]. The final PWA surface is depicted in Figure 2.7. The linearization was performed with 42, 36, and 26 linearization segments. The approximation benchmark for various number of linearization points is presented in Tab First row contains the total number of linearization segments. The next five rows contain number of linearization segments for each term of (2.6.). The MSE is mean square error and the Time indicates the computation time. The

107 Accuracy of the PWA-OAF-NN technique F oaf (z,z 2 ) PWA(z,z 2 ) z 2.5 z.5 z 2.5 z (a) OAF approximation na =, nb = 2 (b) PWA approximation, 42 linearization segments.5.5 PWA(z,z 2 ) PWA(z,z 2 ) z 2.5 z.5 z 2.5 z (c) PWA approximation, 36 linearization segments (d) PWA approximation, 26 linearization segments Figure 2.7: The figure shows OAF approximation for example (2.6.) and its PWA approximation

108 9 Piecewise Affine OAF Neural Network (PWA OAF NN) Table 2.2: Example 2.6. benchmark results No. of segments term. term 2. term 3. term 4. term 5. MSE Time e s e s e 2.22 s e s e s e s e s table 2.2 shows that we can achieve optional accuracy by increasing or decreasing the number of linearization segments. Remark If we want to achieve even lower number of linearization segments we could use the same technique as was presented in section (2.2). All the functions of the same variable would be linearized in the same breaking points.

109 Chapter 3 THE PWA-OAF Identification Toolbox 3. Introduction Next, we present a software implementation of the approximation technique described in previous chapters. The implementation is provided in a form of an open-source MATLAB toolbox, called PWA-OAF Identification Toolbox (PWA-OAF-IT).The main aim of the PWA-OAF Identification Toolbox is to provide efficient tools for analysis, identification and simulation of PWA-OAF models. The toolbox offers two types of user interfaces, Command-Line Interface and Graphical User Interface (GUI). Matlab functions together with the GUI simplify and accelerate identification and analysis. The implemented transformation to the standard PWA state space form (5..2) allows to exploit existing tools for designing Model Predictive Control (MPC) or Explicit-MPC (EMPC). In the following chapter we introduce toolbox functionality on several identification examples. More detailed insight into the PWA-OAF-IT can be found in the manual of the toolbox, see Appendix A. 3.2 Polynomial model structure The PWA-OAF-NN model form is based on the popular Autoregressive Exogenous (ARX) model structure, Fig. 2.4a. The ARX model structure is a polynomial model structure [58] with following discrete-time form: y(t) = nu i= B i (q) A i (q) u i(t nk i ) + e(t) (3.2.) A(q) This model is the simplest model that incorporates the stimulus signal,

110 92 THE PWA-OAF Identification Toolbox Table 3.: Examples of a ARX Model Parameters System inputs na nb nk u (k),u 2 (k) [] [ ] [ ] u(k),u(k ) [] [2] [] u(k),y(k ) [] [] [] u (k),u 2 (k),y(k ) [] [ ] [ ] The PWA-OAF-NN model is defined by na, nb and nk parameters the same way like the idpoly object in Matlab Identification Toolbox [57]. Tab. 3. gives examples of a ARX model parametrization. The same form is used in the PWA- OAF-NN model. 3.3 Normalization of input-output data The Chebyshev polynomials are orthogonal in the domain [-; ]. The OAF based neural network requires normalized signals on the network inputs. In PWA-OAF-IT, the measurements are automatically normalized in a Max-Min fashion. The Max- Min normalization transforms a value A to B which fits in the range [C,D]. It is given by the following formula B = A min A (D C) + C (3.3.) max A min A Each input and output is treated separately (i.e. linear map is unique for each input and output of the network) in order to get a uniform spread in working domain. There is a possibility that a predicted state of PWA-OAF-NN model exceeds working range, especially for the input-output data from the edge of the domain. Therefore, the inputs of the network are linearly mapped into the range ( + α; α). The constant α serves as a fall-back for such cases. 3.4 Command-line Interface To demonstrate command-line usage we consider a single-variable approximation example. We consider following function:

111 Command-line Interface y 35 3 DATA OAF PWA OAF x Figure 3.: -D function example y = a e ((x b )/c ) 2 + a 2 e ((x b 2)/c 2 ) a 3 e ((x b 3)/c 3 ) 2 + a 4 e ((x b 4)/c 4 ) 2 a = 53.4, b = 5.65, c = 8.85, a 2 = 3.25, b 2 = 8.69, c 2 = 5.9, a 3 = 2.2, b 3 = 3.89, c 3 = 2.38, a 4 = 4.36, b 4 = 9.864, c 4 =.992, (3.4.) To approximate function (3.4.) in the interval {7, 22}, one proceeds as follows: x = 7:.2:22; y = Dfun(x); [yn,un,ypar,upar] = oafdatanorm(y,u); param.npoly = 4; param.ndiv = ; modelstruct.na = ; modelstruct.nb = ; modelstruct.nk = ; model = pwagfsid(yn,un,modelstruct,param); The sample measurements were made in interval {7, 22} (Fig. 3.). In the example we made approximation in one point, by two lines. Before parameter estimation, it was necessary to normalize the data into the interval [, ] where the Chebyshev polynomials are orthogonal. We used the first four Chebyshev polynomials T T 3. The Mean square error for this approximation is mse =

112 94 THE PWA-OAF Identification Toolbox In PWA-OAF-IT the model is represented by the following fields of the model structure: model.na - Number of past output terms model.nb - Number of past input terms model.nk - Delay from input to the output model.npoly - Number of Chebys. polynomials model.ndiv - Division of {,} interval model.fi - Connection matrix of network model.w - Network parameters model.type - Type of polynomials Cebys model.const - Constant in difference equation model.yconst - Y-cons in difference equation model.uconst - U-const in difference equation model.sysstruct - PWA state space struct model.ynorm - Normalized output data model.unorm - Normalized input data model.u - Input data model.y - Output data model.ypar - Normalization param. of output model.upar - Normalization param. of input model.newnet - Structure of OAF-NN model In order to evaluate identified PWA model and plot to compare with the original it is needed to type as follows: yout = pwagfssim(model.newnet, xn, param.ndiv); ypwa = yout/model.ypar(,)+model.ypar(,2); plot(x,ypwa,x,y,'r '); 3.5 Graphical User Interface The GUI allows to perform the approximation in an easily accessible manner where all data can be entered conveniently without a need to remember the exact calling syntax of individual approximation functions. The main window of GUI is shown in Figure 3.2. The user starts by selecting the type of approximation from application menu. Then, he load identification data file, choosing Load IO data [u,y] from popup-menu OAF model. After, user setup the identification parameters (number

113 Examples 95 Figure 3.2: PWA-OAF Identification Studio - Main window of orthogonal polynomials, number of linearization segments,...). The approximation is computed by selecting Identification from popup-menu OAF model and pressing button EVAL. A progress bar of PWA simulation then appear and results are plotted in the main window. The model structure can be exported to the workspace by choosing Save to WS from popup-menu OAF model and pressing button EVAL. It should be noted that the GUI is still subject to active development and substantial modifications are expected within next following months. 3.6 Examples Next we present examples achieved using PWA-OAF-ID Studio. Consider a 2-D nonlinear function defined as f( x) = 2(sin(x + 4x 2 )) 2 cos(2x + 3x 2 ) 3 sin(2x x 2 ) + 4 cos(x 2x 2 ) x {, }, x 2 {, }, (3.6.) We used the first six Chebyshev polynomials, up to the fifth order T T 5, linearized in point, each polynomial by two lines. The total number of shifting cases for the resulting PWA function is n lp+ u where n u is the number of neural network inputs and

Prediktivno upravljanje primjenom matematičkog programiranja

Prediktivno upravljanje primjenom matematičkog programiranja Prediktivno upravljanje primjenom matematičkog programiranja Doc. dr. sc. Mato Baotić Fakultet elektrotehnike i računarstva Sveučilište u Zagrebu www.fer.hr/mato.baotic Outline Application Examples PredictiveControl

More information

LMI Methods in Optimal and Robust Control

LMI Methods in Optimal and Robust Control LMI Methods in Optimal and Robust Control Matthew M. Peet Arizona State University Lecture 02: Optimization (Convex and Otherwise) What is Optimization? An Optimization Problem has 3 parts. x F f(x) :

More information

ECE7850 Lecture 9. Model Predictive Control: Computational Aspects

ECE7850 Lecture 9. Model Predictive Control: Computational Aspects ECE785 ECE785 Lecture 9 Model Predictive Control: Computational Aspects Model Predictive Control for Constrained Linear Systems Online Solution to Linear MPC Multiparametric Programming Explicit Linear

More information

Constrained Optimization and Lagrangian Duality

Constrained Optimization and Lagrangian Duality CIS 520: Machine Learning Oct 02, 2017 Constrained Optimization and Lagrangian Duality Lecturer: Shivani Agarwal Disclaimer: These notes are designed to be a supplement to the lecture. They may or may

More information

Online Model Predictive Torque Control for Permanent Magnet Synchronous Motors

Online Model Predictive Torque Control for Permanent Magnet Synchronous Motors Online Model Predictive Torque Control for Permanent Magnet Synchronous Motors Gionata Cimini, Daniele Bernardini, Alberto Bemporad and Stephen Levijoki ODYS Srl General Motors Company 2015 IEEE International

More information

IMPROVED MPC DESIGN BASED ON SATURATING CONTROL LAWS

IMPROVED MPC DESIGN BASED ON SATURATING CONTROL LAWS IMPROVED MPC DESIGN BASED ON SATURATING CONTROL LAWS D. Limon, J.M. Gomes da Silva Jr., T. Alamo and E.F. Camacho Dpto. de Ingenieria de Sistemas y Automática. Universidad de Sevilla Camino de los Descubrimientos

More information

EE C128 / ME C134 Feedback Control Systems

EE C128 / ME C134 Feedback Control Systems EE C128 / ME C134 Feedback Control Systems Lecture Additional Material Introduction to Model Predictive Control Maximilian Balandat Department of Electrical Engineering & Computer Science University of

More information

Nonlinear Programming Models

Nonlinear Programming Models Nonlinear Programming Models Fabio Schoen 2008 http://gol.dsi.unifi.it/users/schoen Nonlinear Programming Models p. Introduction Nonlinear Programming Models p. NLP problems minf(x) x S R n Standard form:

More information

Appendix A Solving Linear Matrix Inequality (LMI) Problems

Appendix A Solving Linear Matrix Inequality (LMI) Problems Appendix A Solving Linear Matrix Inequality (LMI) Problems In this section, we present a brief introduction about linear matrix inequalities which have been used extensively to solve the FDI problems described

More information

MPC: Tracking, Soft Constraints, Move-Blocking

MPC: Tracking, Soft Constraints, Move-Blocking MPC: Tracking, Soft Constraints, Move-Blocking M. Morari, F. Borrelli, C. Jones, M. Zeilinger Institut für Automatik, ETH Zürich Institute for Dynamic Systems and Control, ETH Zürich UC Berkeley EPFL Spring

More information

Lecture 18: Optimization Programming

Lecture 18: Optimization Programming Fall, 2016 Outline Unconstrained Optimization 1 Unconstrained Optimization 2 Equality-constrained Optimization Inequality-constrained Optimization Mixture-constrained Optimization 3 Quadratic Programming

More information

Lecture Notes on Support Vector Machine

Lecture Notes on Support Vector Machine Lecture Notes on Support Vector Machine Feng Li fli@sdu.edu.cn Shandong University, China 1 Hyperplane and Margin In a n-dimensional space, a hyper plane is defined by ω T x + b = 0 (1) where ω R n is

More information

Appendix A Taylor Approximations and Definite Matrices

Appendix A Taylor Approximations and Definite Matrices Appendix A Taylor Approximations and Definite Matrices Taylor approximations provide an easy way to approximate a function as a polynomial, using the derivatives of the function. We know, from elementary

More information

Course Summary Math 211

Course Summary Math 211 Course Summary Math 211 table of contents I. Functions of several variables. II. R n. III. Derivatives. IV. Taylor s Theorem. V. Differential Geometry. VI. Applications. 1. Best affine approximations.

More information

Review of Optimization Methods

Review of Optimization Methods Review of Optimization Methods Prof. Manuela Pedio 20550 Quantitative Methods for Finance August 2018 Outline of the Course Lectures 1 and 2 (3 hours, in class): Linear and non-linear functions on Limits,

More information

Assignment 1: From the Definition of Convexity to Helley Theorem

Assignment 1: From the Definition of Convexity to Helley Theorem Assignment 1: From the Definition of Convexity to Helley Theorem Exercise 1 Mark in the following list the sets which are convex: 1. {x R 2 : x 1 + i 2 x 2 1, i = 1,..., 10} 2. {x R 2 : x 2 1 + 2ix 1x

More information

Absolute Value Programming

Absolute Value Programming O. L. Mangasarian Absolute Value Programming Abstract. We investigate equations, inequalities and mathematical programs involving absolute values of variables such as the equation Ax + B x = b, where A

More information

UNDERGROUND LECTURE NOTES 1: Optimality Conditions for Constrained Optimization Problems

UNDERGROUND LECTURE NOTES 1: Optimality Conditions for Constrained Optimization Problems UNDERGROUND LECTURE NOTES 1: Optimality Conditions for Constrained Optimization Problems Robert M. Freund February 2016 c 2016 Massachusetts Institute of Technology. All rights reserved. 1 1 Introduction

More information

Example of Multiparametric Solution. Explicit Form of Model Predictive Control. via Multiparametric Programming. Finite-Time Constrained LQR

Example of Multiparametric Solution. Explicit Form of Model Predictive Control. via Multiparametric Programming. Finite-Time Constrained LQR Example of Multiparametric Solution Multiparametric LP ( ø R) 6 CR{,4} CR{,,3} Explicit Form of Model Predictive Control 4 CR{,3} CR{,3} x - -4-6 -6-4 - 4 6 x via Multiparametric Programming Finite-Time

More information

Convex envelopes, cardinality constrained optimization and LASSO. An application in supervised learning: support vector machines (SVMs)

Convex envelopes, cardinality constrained optimization and LASSO. An application in supervised learning: support vector machines (SVMs) ORF 523 Lecture 8 Princeton University Instructor: A.A. Ahmadi Scribe: G. Hall Any typos should be emailed to a a a@princeton.edu. 1 Outline Convexity-preserving operations Convex envelopes, cardinality

More information

Module 04 Optimization Problems KKT Conditions & Solvers

Module 04 Optimization Problems KKT Conditions & Solvers Module 04 Optimization Problems KKT Conditions & Solvers Ahmad F. Taha EE 5243: Introduction to Cyber-Physical Systems Email: ahmad.taha@utsa.edu Webpage: http://engineering.utsa.edu/ taha/index.html September

More information

Support Vector Machines: Maximum Margin Classifiers

Support Vector Machines: Maximum Margin Classifiers Support Vector Machines: Maximum Margin Classifiers Machine Learning and Pattern Recognition: September 16, 2008 Piotr Mirowski Based on slides by Sumit Chopra and Fu-Jie Huang 1 Outline What is behind

More information

The general programming problem is the nonlinear programming problem where a given function is maximized subject to a set of inequality constraints.

The general programming problem is the nonlinear programming problem where a given function is maximized subject to a set of inequality constraints. 1 Optimization Mathematical programming refers to the basic mathematical problem of finding a maximum to a function, f, subject to some constraints. 1 In other words, the objective is to find a point,

More information

5. Duality. Lagrangian

5. Duality. Lagrangian 5. Duality Convex Optimization Boyd & Vandenberghe Lagrange dual problem weak and strong duality geometric interpretation optimality conditions perturbation and sensitivity analysis examples generalized

More information

minimize x x2 2 x 1x 2 x 1 subject to x 1 +2x 2 u 1 x 1 4x 2 u 2, 5x 1 +76x 2 1,

minimize x x2 2 x 1x 2 x 1 subject to x 1 +2x 2 u 1 x 1 4x 2 u 2, 5x 1 +76x 2 1, 4 Duality 4.1 Numerical perturbation analysis example. Consider the quadratic program with variables x 1, x 2, and parameters u 1, u 2. minimize x 2 1 +2x2 2 x 1x 2 x 1 subject to x 1 +2x 2 u 1 x 1 4x

More information

Semidefinite Programming

Semidefinite Programming Semidefinite Programming Notes by Bernd Sturmfels for the lecture on June 26, 208, in the IMPRS Ringvorlesung Introduction to Nonlinear Algebra The transition from linear algebra to nonlinear algebra has

More information

DECENTRALIZED CONTROL DESIGN USING LMI MODEL REDUCTION

DECENTRALIZED CONTROL DESIGN USING LMI MODEL REDUCTION Journal of ELECTRICAL ENGINEERING, VOL. 58, NO. 6, 2007, 307 312 DECENTRALIZED CONTROL DESIGN USING LMI MODEL REDUCTION Szabolcs Dorák Danica Rosinová Decentralized control design approach based on partial

More information

Piecewise-affine functions: applications in circuit theory and control

Piecewise-affine functions: applications in circuit theory and control Piecewise-affine functions: applications in circuit theory and control Tomaso Poggi Basque Center of Applied Mathematics Bilbao 12/04/2013 1/46 Outline 1 Embedded systems 2 PWA functions Definition Classes

More information

Optimality, Duality, Complementarity for Constrained Optimization

Optimality, Duality, Complementarity for Constrained Optimization Optimality, Duality, Complementarity for Constrained Optimization Stephen Wright University of Wisconsin-Madison May 2014 Wright (UW-Madison) Optimality, Duality, Complementarity May 2014 1 / 41 Linear

More information

CO 250 Final Exam Guide

CO 250 Final Exam Guide Spring 2017 CO 250 Final Exam Guide TABLE OF CONTENTS richardwu.ca CO 250 Final Exam Guide Introduction to Optimization Kanstantsin Pashkovich Spring 2017 University of Waterloo Last Revision: March 4,

More information

Optimality Conditions for Constrained Optimization

Optimality Conditions for Constrained Optimization 72 CHAPTER 7 Optimality Conditions for Constrained Optimization 1. First Order Conditions In this section we consider first order optimality conditions for the constrained problem P : minimize f 0 (x)

More information

Shiqian Ma, MAT-258A: Numerical Optimization 1. Chapter 4. Subgradient

Shiqian Ma, MAT-258A: Numerical Optimization 1. Chapter 4. Subgradient Shiqian Ma, MAT-258A: Numerical Optimization 1 Chapter 4 Subgradient Shiqian Ma, MAT-258A: Numerical Optimization 2 4.1. Subgradients definition subgradient calculus duality and optimality conditions Shiqian

More information

Minimizing Cubic and Homogeneous Polynomials over Integers in the Plane

Minimizing Cubic and Homogeneous Polynomials over Integers in the Plane Minimizing Cubic and Homogeneous Polynomials over Integers in the Plane Alberto Del Pia Department of Industrial and Systems Engineering & Wisconsin Institutes for Discovery, University of Wisconsin-Madison

More information

Convex Optimization M2

Convex Optimization M2 Convex Optimization M2 Lecture 3 A. d Aspremont. Convex Optimization M2. 1/49 Duality A. d Aspremont. Convex Optimization M2. 2/49 DMs DM par email: dm.daspremont@gmail.com A. d Aspremont. Convex Optimization

More information

Numerical Optimization. Review: Unconstrained Optimization

Numerical Optimization. Review: Unconstrained Optimization Numerical Optimization Finding the best feasible solution Edward P. Gatzke Department of Chemical Engineering University of South Carolina Ed Gatzke (USC CHE ) Numerical Optimization ECHE 589, Spring 2011

More information

CHAPTER 2: QUADRATIC PROGRAMMING

CHAPTER 2: QUADRATIC PROGRAMMING CHAPTER 2: QUADRATIC PROGRAMMING Overview Quadratic programming (QP) problems are characterized by objective functions that are quadratic in the design variables, and linear constraints. In this sense,

More information

Structural and Multidisciplinary Optimization. P. Duysinx and P. Tossings

Structural and Multidisciplinary Optimization. P. Duysinx and P. Tossings Structural and Multidisciplinary Optimization P. Duysinx and P. Tossings 2018-2019 CONTACTS Pierre Duysinx Institut de Mécanique et du Génie Civil (B52/3) Phone number: 04/366.91.94 Email: P.Duysinx@uliege.be

More information

MATHEMATICAL ECONOMICS: OPTIMIZATION. Contents

MATHEMATICAL ECONOMICS: OPTIMIZATION. Contents MATHEMATICAL ECONOMICS: OPTIMIZATION JOÃO LOPES DIAS Contents 1. Introduction 2 1.1. Preliminaries 2 1.2. Optimal points and values 2 1.3. The optimization problems 3 1.4. Existence of optimal points 4

More information

Regional Solution of Constrained LQ Optimal Control

Regional Solution of Constrained LQ Optimal Control Regional Solution of Constrained LQ Optimal Control José DeDoná September 2004 Outline 1 Recap on the Solution for N = 2 2 Regional Explicit Solution Comparison with the Maximal Output Admissible Set 3

More information

CHAPTER 2: CONVEX SETS AND CONCAVE FUNCTIONS. W. Erwin Diewert January 31, 2008.

CHAPTER 2: CONVEX SETS AND CONCAVE FUNCTIONS. W. Erwin Diewert January 31, 2008. 1 ECONOMICS 594: LECTURE NOTES CHAPTER 2: CONVEX SETS AND CONCAVE FUNCTIONS W. Erwin Diewert January 31, 2008. 1. Introduction Many economic problems have the following structure: (i) a linear function

More information

EE/ACM Applications of Convex Optimization in Signal Processing and Communications Lecture 17

EE/ACM Applications of Convex Optimization in Signal Processing and Communications Lecture 17 EE/ACM 150 - Applications of Convex Optimization in Signal Processing and Communications Lecture 17 Andre Tkacenko Signal Processing Research Group Jet Propulsion Laboratory May 29, 2012 Andre Tkacenko

More information

Lecture Note 5: Semidefinite Programming for Stability Analysis

Lecture Note 5: Semidefinite Programming for Stability Analysis ECE7850: Hybrid Systems:Theory and Applications Lecture Note 5: Semidefinite Programming for Stability Analysis Wei Zhang Assistant Professor Department of Electrical and Computer Engineering Ohio State

More information

Appendix PRELIMINARIES 1. THEOREMS OF ALTERNATIVES FOR SYSTEMS OF LINEAR CONSTRAINTS

Appendix PRELIMINARIES 1. THEOREMS OF ALTERNATIVES FOR SYSTEMS OF LINEAR CONSTRAINTS Appendix PRELIMINARIES 1. THEOREMS OF ALTERNATIVES FOR SYSTEMS OF LINEAR CONSTRAINTS Here we consider systems of linear constraints, consisting of equations or inequalities or both. A feasible solution

More information

AM 205: lecture 19. Last time: Conditions for optimality, Newton s method for optimization Today: survey of optimization methods

AM 205: lecture 19. Last time: Conditions for optimality, Newton s method for optimization Today: survey of optimization methods AM 205: lecture 19 Last time: Conditions for optimality, Newton s method for optimization Today: survey of optimization methods Quasi-Newton Methods General form of quasi-newton methods: x k+1 = x k α

More information

GLOBAL ANALYSIS OF PIECEWISE LINEAR SYSTEMS USING IMPACT MAPS AND QUADRATIC SURFACE LYAPUNOV FUNCTIONS

GLOBAL ANALYSIS OF PIECEWISE LINEAR SYSTEMS USING IMPACT MAPS AND QUADRATIC SURFACE LYAPUNOV FUNCTIONS GLOBAL ANALYSIS OF PIECEWISE LINEAR SYSTEMS USING IMPACT MAPS AND QUADRATIC SURFACE LYAPUNOV FUNCTIONS Jorge M. Gonçalves, Alexandre Megretski y, Munther A. Dahleh y California Institute of Technology

More information

Fast Algorithms for SDPs derived from the Kalman-Yakubovich-Popov Lemma

Fast Algorithms for SDPs derived from the Kalman-Yakubovich-Popov Lemma Fast Algorithms for SDPs derived from the Kalman-Yakubovich-Popov Lemma Venkataramanan (Ragu) Balakrishnan School of ECE, Purdue University 8 September 2003 European Union RTN Summer School on Multi-Agent

More information

Symmetric Matrices and Eigendecomposition

Symmetric Matrices and Eigendecomposition Symmetric Matrices and Eigendecomposition Robert M. Freund January, 2014 c 2014 Massachusetts Institute of Technology. All rights reserved. 1 2 1 Symmetric Matrices and Convexity of Quadratic Functions

More information

Lagrange Duality. Daniel P. Palomar. Hong Kong University of Science and Technology (HKUST)

Lagrange Duality. Daniel P. Palomar. Hong Kong University of Science and Technology (HKUST) Lagrange Duality Daniel P. Palomar Hong Kong University of Science and Technology (HKUST) ELEC5470 - Convex Optimization Fall 2017-18, HKUST, Hong Kong Outline of Lecture Lagrangian Dual function Dual

More information

Indicator Constraints in Mixed-Integer Programming

Indicator Constraints in Mixed-Integer Programming Indicator Constraints in Mixed-Integer Programming Andrea Lodi University of Bologna, Italy - andrea.lodi@unibo.it Amaya Nogales-Gómez, Universidad de Sevilla, Spain Pietro Belotti, FICO, UK Matteo Fischetti,

More information

6-1 The Positivstellensatz P. Parrilo and S. Lall, ECC

6-1 The Positivstellensatz P. Parrilo and S. Lall, ECC 6-1 The Positivstellensatz P. Parrilo and S. Lall, ECC 2003 2003.09.02.10 6. The Positivstellensatz Basic semialgebraic sets Semialgebraic sets Tarski-Seidenberg and quantifier elimination Feasibility

More information

Linear & nonlinear classifiers

Linear & nonlinear classifiers Linear & nonlinear classifiers Machine Learning Hamid Beigy Sharif University of Technology Fall 1396 Hamid Beigy (Sharif University of Technology) Linear & nonlinear classifiers Fall 1396 1 / 44 Table

More information

AM 205: lecture 19. Last time: Conditions for optimality Today: Newton s method for optimization, survey of optimization methods

AM 205: lecture 19. Last time: Conditions for optimality Today: Newton s method for optimization, survey of optimization methods AM 205: lecture 19 Last time: Conditions for optimality Today: Newton s method for optimization, survey of optimization methods Optimality Conditions: Equality Constrained Case As another example of equality

More information

Kernel Methods. Machine Learning A W VO

Kernel Methods. Machine Learning A W VO Kernel Methods Machine Learning A 708.063 07W VO Outline 1. Dual representation 2. The kernel concept 3. Properties of kernels 4. Examples of kernel machines Kernel PCA Support vector regression (Relevance

More information

Gradient Descent. Dr. Xiaowei Huang

Gradient Descent. Dr. Xiaowei Huang Gradient Descent Dr. Xiaowei Huang https://cgi.csc.liv.ac.uk/~xiaowei/ Up to now, Three machine learning algorithms: decision tree learning k-nn linear regression only optimization objectives are discussed,

More information

Support Vector Machine (SVM) and Kernel Methods

Support Vector Machine (SVM) and Kernel Methods Support Vector Machine (SVM) and Kernel Methods CE-717: Machine Learning Sharif University of Technology Fall 2015 Soleymani Outline Margin concept Hard-Margin SVM Soft-Margin SVM Dual Problems of Hard-Margin

More information

Continuing Quadratic/Polynomial Real-World Problems

Continuing Quadratic/Polynomial Real-World Problems Algebra 1, Quarter 3, Unit 3.1 Continuing Quadratic/Polynomial Real-World Problems Overview Number of instructional days: 15 (1 day = 45 60 minutes) Content to be learned Understand closed operations.

More information

A Brief Review on Convex Optimization

A Brief Review on Convex Optimization A Brief Review on Convex Optimization 1 Convex set S R n is convex if x,y S, λ,µ 0, λ+µ = 1 λx+µy S geometrically: x,y S line segment through x,y S examples (one convex, two nonconvex sets): A Brief Review

More information

Verification of analog and mixed-signal circuits using hybrid systems techniques

Verification of analog and mixed-signal circuits using hybrid systems techniques FMCAD, November 2004, Austin Verification of analog and mixed-signal circuits using hybrid systems techniques Thao Dang, Alexandre Donze, Oded Maler VERIMAG Grenoble, France Plan 1. Introduction 2. Verification

More information

Interior-Point Methods for Linear Optimization

Interior-Point Methods for Linear Optimization Interior-Point Methods for Linear Optimization Robert M. Freund and Jorge Vera March, 204 c 204 Robert M. Freund and Jorge Vera. All rights reserved. Linear Optimization with a Logarithmic Barrier Function

More information

Lecture 1: Entropy, convexity, and matrix scaling CSE 599S: Entropy optimality, Winter 2016 Instructor: James R. Lee Last updated: January 24, 2016

Lecture 1: Entropy, convexity, and matrix scaling CSE 599S: Entropy optimality, Winter 2016 Instructor: James R. Lee Last updated: January 24, 2016 Lecture 1: Entropy, convexity, and matrix scaling CSE 599S: Entropy optimality, Winter 2016 Instructor: James R. Lee Last updated: January 24, 2016 1 Entropy Since this course is about entropy maximization,

More information

Lecture Support Vector Machine (SVM) Classifiers

Lecture Support Vector Machine (SVM) Classifiers Introduction to Machine Learning Lecturer: Amir Globerson Lecture 6 Fall Semester Scribe: Yishay Mansour 6.1 Support Vector Machine (SVM) Classifiers Classification is one of the most important tasks in

More information

An Introduction to Model-based Predictive Control (MPC) by

An Introduction to Model-based Predictive Control (MPC) by ECE 680 Fall 2017 An Introduction to Model-based Predictive Control (MPC) by Stanislaw H Żak 1 Introduction The model-based predictive control (MPC) methodology is also referred to as the moving horizon

More information

A Hierarchy of Suboptimal Policies for the Multi-period, Multi-echelon, Robust Inventory Problem

A Hierarchy of Suboptimal Policies for the Multi-period, Multi-echelon, Robust Inventory Problem A Hierarchy of Suboptimal Policies for the Multi-period, Multi-echelon, Robust Inventory Problem Dimitris J. Bertsimas Dan A. Iancu Pablo A. Parrilo Sloan School of Management and Operations Research Center,

More information

Decentralized Stabilization of Heterogeneous Linear Multi-Agent Systems

Decentralized Stabilization of Heterogeneous Linear Multi-Agent Systems 1 Decentralized Stabilization of Heterogeneous Linear Multi-Agent Systems Mauro Franceschelli, Andrea Gasparri, Alessandro Giua, and Giovanni Ulivi Abstract In this paper the formation stabilization problem

More information

In English, this means that if we travel on a straight line between any two points in C, then we never leave C.

In English, this means that if we travel on a straight line between any two points in C, then we never leave C. Convex sets In this section, we will be introduced to some of the mathematical fundamentals of convex sets. In order to motivate some of the definitions, we will look at the closest point problem from

More information

minimize x subject to (x 2)(x 4) u,

minimize x subject to (x 2)(x 4) u, Math 6366/6367: Optimization and Variational Methods Sample Preliminary Exam Questions 1. Suppose that f : [, L] R is a C 2 -function with f () on (, L) and that you have explicit formulae for

More information

Chapter 1 Computer Arithmetic

Chapter 1 Computer Arithmetic Numerical Analysis (Math 9372) 2017-2016 Chapter 1 Computer Arithmetic 1.1 Introduction Numerical analysis is a way to solve mathematical problems by special procedures which use arithmetic operations

More information

DELFT UNIVERSITY OF TECHNOLOGY

DELFT UNIVERSITY OF TECHNOLOGY DELFT UNIVERSITY OF TECHNOLOGY REPORT -09 Computational and Sensitivity Aspects of Eigenvalue-Based Methods for the Large-Scale Trust-Region Subproblem Marielba Rojas, Bjørn H. Fotland, and Trond Steihaug

More information

FPGA Implementation of a Predictive Controller

FPGA Implementation of a Predictive Controller FPGA Implementation of a Predictive Controller SIAM Conference on Optimization 2011, Darmstadt, Germany Minisymposium on embedded optimization Juan L. Jerez, George A. Constantinides and Eric C. Kerrigan

More information

Critical Reading of Optimization Methods for Logical Inference [1]

Critical Reading of Optimization Methods for Logical Inference [1] Critical Reading of Optimization Methods for Logical Inference [1] Undergraduate Research Internship Department of Management Sciences Fall 2007 Supervisor: Dr. Miguel Anjos UNIVERSITY OF WATERLOO Rajesh

More information

Duality Theory of Constrained Optimization

Duality Theory of Constrained Optimization Duality Theory of Constrained Optimization Robert M. Freund April, 2014 c 2014 Massachusetts Institute of Technology. All rights reserved. 1 2 1 The Practical Importance of Duality Duality is pervasive

More information

Structured Problems and Algorithms

Structured Problems and Algorithms Integer and quadratic optimization problems Dept. of Engg. and Comp. Sci., Univ. of Cal., Davis Aug. 13, 2010 Table of contents Outline 1 2 3 Benefits of Structured Problems Optimization problems may become

More information

Support Vector Machine (SVM) and Kernel Methods

Support Vector Machine (SVM) and Kernel Methods Support Vector Machine (SVM) and Kernel Methods CE-717: Machine Learning Sharif University of Technology Fall 2014 Soleymani Outline Margin concept Hard-Margin SVM Soft-Margin SVM Dual Problems of Hard-Margin

More information

Scientific Computing: Optimization

Scientific Computing: Optimization Scientific Computing: Optimization Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Spring 2012 March 8th, 2011 A. Donev (Courant Institute) Lecture

More information

EE613 Machine Learning for Engineers. Kernel methods Support Vector Machines. jean-marc odobez 2015

EE613 Machine Learning for Engineers. Kernel methods Support Vector Machines. jean-marc odobez 2015 EE613 Machine Learning for Engineers Kernel methods Support Vector Machines jean-marc odobez 2015 overview Kernel methods introductions and main elements defining kernels Kernelization of k-nn, K-Means,

More information

Lecture 3. Optimization Problems and Iterative Algorithms

Lecture 3. Optimization Problems and Iterative Algorithms Lecture 3 Optimization Problems and Iterative Algorithms January 13, 2016 This material was jointly developed with Angelia Nedić at UIUC for IE 598ns Outline Special Functions: Linear, Quadratic, Convex

More information

Convex Optimization Boyd & Vandenberghe. 5. Duality

Convex Optimization Boyd & Vandenberghe. 5. Duality 5. Duality Convex Optimization Boyd & Vandenberghe Lagrange dual problem weak and strong duality geometric interpretation optimality conditions perturbation and sensitivity analysis examples generalized

More information

Lecture 1 Introduction

Lecture 1 Introduction L. Vandenberghe EE236A (Fall 2013-14) Lecture 1 Introduction course overview linear optimization examples history approximate syllabus basic definitions linear optimization in vector and matrix notation

More information

Course on Model Predictive Control Part II Linear MPC design

Course on Model Predictive Control Part II Linear MPC design Course on Model Predictive Control Part II Linear MPC design Gabriele Pannocchia Department of Chemical Engineering, University of Pisa, Italy Email: g.pannocchia@diccism.unipi.it Facoltà di Ingegneria,

More information

Subgradient. Acknowledgement: this slides is based on Prof. Lieven Vandenberghes lecture notes. definition. subgradient calculus

Subgradient. Acknowledgement: this slides is based on Prof. Lieven Vandenberghes lecture notes. definition. subgradient calculus 1/41 Subgradient Acknowledgement: this slides is based on Prof. Lieven Vandenberghes lecture notes definition subgradient calculus duality and optimality conditions directional derivative Basic inequality

More information

Part 4: Active-set methods for linearly constrained optimization. Nick Gould (RAL)

Part 4: Active-set methods for linearly constrained optimization. Nick Gould (RAL) Part 4: Active-set methods for linearly constrained optimization Nick Gould RAL fx subject to Ax b Part C course on continuoue optimization LINEARLY CONSTRAINED MINIMIZATION fx subject to Ax { } b where

More information

Pattern Classification, and Quadratic Problems

Pattern Classification, and Quadratic Problems Pattern Classification, and Quadratic Problems (Robert M. Freund) March 3, 24 c 24 Massachusetts Institute of Technology. 1 1 Overview Pattern Classification, Linear Classifiers, and Quadratic Optimization

More information

Chapter 2: Unconstrained Extrema

Chapter 2: Unconstrained Extrema Chapter 2: Unconstrained Extrema Math 368 c Copyright 2012, 2013 R Clark Robinson May 22, 2013 Chapter 2: Unconstrained Extrema 1 Types of Sets Definition For p R n and r > 0, the open ball about p of

More information

On-off Control: Audio Applications

On-off Control: Audio Applications On-off Control: Audio Applications Graham C. Goodwin Day 4: Lecture 3 16th September 2004 International Summer School Grenoble, France 1 Background In this lecture we address the issue of control when

More information

m i=1 c ix i i=1 F ix i F 0, X O.

m i=1 c ix i i=1 F ix i F 0, X O. What is SDP? for a beginner of SDP Copyright C 2005 SDPA Project 1 Introduction This note is a short course for SemiDefinite Programming s SDP beginners. SDP has various applications in, for example, control

More information

Convex Programs. Carlo Tomasi. December 4, 2018

Convex Programs. Carlo Tomasi. December 4, 2018 Convex Programs Carlo Tomasi December 4, 2018 1 Introduction In an earlier note, we found methods for finding a local minimum of some differentiable function f(u) : R m R. If f(u) is at least weakly convex,

More information

Nonlinear Model Predictive Control Tools (NMPC Tools)

Nonlinear Model Predictive Control Tools (NMPC Tools) Nonlinear Model Predictive Control Tools (NMPC Tools) Rishi Amrit, James B. Rawlings April 5, 2008 1 Formulation We consider a control system composed of three parts([2]). Estimator Target calculator Regulator

More information

Course Outline. FRTN10 Multivariable Control, Lecture 13. General idea for Lectures Lecture 13 Outline. Example 1 (Doyle Stein, 1979)

Course Outline. FRTN10 Multivariable Control, Lecture 13. General idea for Lectures Lecture 13 Outline. Example 1 (Doyle Stein, 1979) Course Outline FRTN Multivariable Control, Lecture Automatic Control LTH, 6 L-L Specifications, models and loop-shaping by hand L6-L8 Limitations on achievable performance L9-L Controller optimization:

More information

CSCI : Optimization and Control of Networks. Review on Convex Optimization

CSCI : Optimization and Control of Networks. Review on Convex Optimization CSCI7000-016: Optimization and Control of Networks Review on Convex Optimization 1 Convex set S R n is convex if x,y S, λ,µ 0, λ+µ = 1 λx+µy S geometrically: x,y S line segment through x,y S examples (one

More information

8. Geometric problems

8. Geometric problems 8. Geometric problems Convex Optimization Boyd & Vandenberghe extremal volume ellipsoids centering classification placement and facility location 8 Minimum volume ellipsoid around a set Löwner-John ellipsoid

More information

Announcements. Review: Lyap. thms so far. Review: Multiple Lyap. Fcns. Discrete-time PWL/PWA Quadratic Lyapunov Theory

Announcements. Review: Lyap. thms so far. Review: Multiple Lyap. Fcns. Discrete-time PWL/PWA Quadratic Lyapunov Theory EECE 571M/491M, Spring 2007 Lecture 11 Discrete-time PWL/PWA Quadratic Lyapunov Theory http://www.ece.ubc.ca/~elec571m.html moishi@ece.ubc.ca Meeko Oishi, Ph.D. Electrical and Computer Engineering University

More information

Nonconvex Quadratic Programming: Return of the Boolean Quadric Polytope

Nonconvex Quadratic Programming: Return of the Boolean Quadric Polytope Nonconvex Quadratic Programming: Return of the Boolean Quadric Polytope Kurt M. Anstreicher Dept. of Management Sciences University of Iowa Seminar, Chinese University of Hong Kong, October 2009 We consider

More information

Lecture: Duality.

Lecture: Duality. Lecture: Duality http://bicmr.pku.edu.cn/~wenzw/opt-2016-fall.html Acknowledgement: this slides is based on Prof. Lieven Vandenberghe s lecture notes Introduction 2/35 Lagrange dual problem weak and strong

More information

Preliminaries and Complexity Theory

Preliminaries and Complexity Theory Preliminaries and Complexity Theory Oleksandr Romanko CAS 746 - Advanced Topics in Combinatorial Optimization McMaster University, January 16, 2006 Introduction Book structure: 2 Part I Linear Algebra

More information

Lecture 1. 1 Conic programming. MA 796S: Convex Optimization and Interior Point Methods October 8, Consider the conic program. min.

Lecture 1. 1 Conic programming. MA 796S: Convex Optimization and Interior Point Methods October 8, Consider the conic program. min. MA 796S: Convex Optimization and Interior Point Methods October 8, 2007 Lecture 1 Lecturer: Kartik Sivaramakrishnan Scribe: Kartik Sivaramakrishnan 1 Conic programming Consider the conic program min s.t.

More information

Probabilistic Controllability Analysis of Sampled-Data/Discrete-Time Piecewise Affine Systems

Probabilistic Controllability Analysis of Sampled-Data/Discrete-Time Piecewise Affine Systems Probabilistic Controllability Analysis of Sampled-Data/Discrete-Time Piecewise Affine Systems Shun-ichi Azuma Jun-ichi Imura Toyo Institute of Technology; 2-12-1, O-oayama, Meguro-u, Toyo 152-8552, Japan

More information

Linear & nonlinear classifiers

Linear & nonlinear classifiers Linear & nonlinear classifiers Machine Learning Hamid Beigy Sharif University of Technology Fall 1394 Hamid Beigy (Sharif University of Technology) Linear & nonlinear classifiers Fall 1394 1 / 34 Table

More information

Primal-Dual Interior-Point Methods for Linear Programming based on Newton s Method

Primal-Dual Interior-Point Methods for Linear Programming based on Newton s Method Primal-Dual Interior-Point Methods for Linear Programming based on Newton s Method Robert M. Freund March, 2004 2004 Massachusetts Institute of Technology. The Problem The logarithmic barrier approach

More information

NONLINEAR CLASSIFICATION AND REGRESSION. J. Elder CSE 4404/5327 Introduction to Machine Learning and Pattern Recognition

NONLINEAR CLASSIFICATION AND REGRESSION. J. Elder CSE 4404/5327 Introduction to Machine Learning and Pattern Recognition NONLINEAR CLASSIFICATION AND REGRESSION Nonlinear Classification and Regression: Outline 2 Multi-Layer Perceptrons The Back-Propagation Learning Algorithm Generalized Linear Models Radial Basis Function

More information

MIT Algebraic techniques and semidefinite optimization February 14, Lecture 3

MIT Algebraic techniques and semidefinite optimization February 14, Lecture 3 MI 6.97 Algebraic techniques and semidefinite optimization February 4, 6 Lecture 3 Lecturer: Pablo A. Parrilo Scribe: Pablo A. Parrilo In this lecture, we will discuss one of the most important applications

More information