Problem 1 Convexity Property

Similar documents
Module 04 Optimization Problems KKT Conditions & Solvers

Semidefinite Programming Basics and Applications

Tutorial on Convex Optimization: Part II

I.3. LMI DUALITY. Didier HENRION EECI Graduate School on Control Supélec - Spring 2010

3.7 Constrained Optimization and Lagrange Multipliers

Lecture Note 5: Semidefinite Programming for Stability Analysis

Written Examination

AM 205: lecture 18. Last time: optimization methods Today: conditions for optimality

Review of Optimization Methods

Examination paper for TMA4180 Optimization I

14. Duality. ˆ Upper and lower bounds. ˆ General duality. ˆ Constraint qualifications. ˆ Counterexample. ˆ Complementary slackness.

Maximum likelihood estimation

Convex Optimization & Lagrange Duality

Exam in TMA4180 Optimization Theory

Optimization for Communications and Networks. Poompat Saengudomlert. Session 4 Duality and Lagrange Multipliers

Problem 1 Cost of an Infinite Horizon LQR

In view of (31), the second of these is equal to the identity I on E m, while this, in view of (30), implies that the first can be written

A : k n. Usually k > n otherwise easily the minimum is zero. Analytical solution:

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

Generalization to inequality constrained problem. Maximize

Here each term has degree 2 (the sum of exponents is 2 for all summands). A quadratic form of three variables looks as

ECE580 Exam 1 October 4, Please do not write on the back of the exam pages. Extra paper is available from the instructor.

Lecture 3 Interior Point Methods and Nonlinear Optimization

Optimization Problems with Constraints - introduction to theory, numerical Methods and applications

Homework Set #6 - Solutions

Optimization. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

TMA 4180 Optimeringsteori KARUSH-KUHN-TUCKER THEOREM

Extreme Abridgment of Boyd and Vandenberghe s Convex Optimization

MIT Algebraic techniques and semidefinite optimization February 14, Lecture 3

MATH2070 Optimisation

Lecture 18: Optimization Programming

Math 164-1: Optimization Instructor: Alpár R. Mészáros

Lecture 7: Convex Optimizations

Math 164 (Lec 1): Optimization Instructor: Alpár R. Mészáros

SECTION C: CONTINUOUS OPTIMISATION LECTURE 11: THE METHOD OF LAGRANGE MULTIPLIERS

10725/36725 Optimization Homework 4

EE 227A: Convex Optimization and Applications October 14, 2008

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

ISM206 Lecture Optimization of Nonlinear Objective with Linear Constraints

Constrained Optimization

Paul Schrimpf. October 17, UBC Economics 526. Constrained optimization. Paul Schrimpf. First order conditions. Second order conditions

HW3 - Due 02/06. Each answer must be mathematically justified. Don t forget your name. 1 2, A = 2 2

N. L. P. NONLINEAR PROGRAMMING (NLP) deals with optimization models with at least one nonlinear function. NLP. Optimization. Models of following form:

Duality. Geoff Gordon & Ryan Tibshirani Optimization /

Constrained Optimization and Lagrangian Duality

An Introduction to Linear Matrix Inequalities. Raktim Bhattacharya Aerospace Engineering, Texas A&M University

Convex Optimization M2

8 A First Glimpse on Design with LMIs

Machine Learning And Applications: Supervised Learning-SVM

A : k n. Usually k > n otherwise easily the minimum is zero. Analytical solution:

Lecture 13: Constrained optimization

UC Berkeley Department of Electrical Engineering and Computer Science. EECS 227A Nonlinear and Convex Optimization. Solutions 5 Fall 2009

Duality Theory of Constrained Optimization

5.6 Penalty method and augmented Lagrangian method

Optimization. Yuh-Jye Lee. March 21, Data Science and Machine Intelligence Lab National Chiao Tung University 1 / 29

UNDERGROUND LECTURE NOTES 1: Optimality Conditions for Constrained Optimization Problems

Math 5311 Constrained Optimization Notes

Appendix A Taylor Approximations and Definite Matrices

Linear and non-linear programming

Symmetric Matrices and Eigendecomposition

Optimization for Machine Learning

CSCI 1951-G Optimization Methods in Finance Part 10: Conic Optimization

Computational Optimization. Mathematical Programming Fundamentals 1/25 (revised)

Robust and Optimal Control, Spring 2015

Solution Methods. Richard Lusby. Department of Management Engineering Technical University of Denmark

Intro to Nonlinear Optimization

ECE580 Fall 2015 Solution to Midterm Exam 1 October 23, Please leave fractions as fractions, but simplify them, etc.

EE Applications of Convex Optimization in Signal Processing and Communications Dr. Andre Tkacenko, JPL Third Term

IE 5531 Midterm #2 Solutions

Convex Optimization. Dani Yogatama. School of Computer Science, Carnegie Mellon University, Pittsburgh, PA, USA. February 12, 2014

Optimality, Duality, Complementarity for Constrained Optimization

Convex Optimization Overview (cnt d)

Lecture Notes on Numerical Optimization (Preliminary Draft)

Example: feasibility. Interpretation as formal proof. Example: linear inequalities and Farkas lemma

LMI Methods in Optimal and Robust Control

A Customized ADMM for Rank-Constrained Optimization Problems with Approximate Formulations

5. Duality. Lagrangian

Computational Finance

ECON 5111 Mathematical Economics

Numerical Optimization

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,

Laboratory 4: Optimal Filter Design. Miki Lustig

Support Vector Machines

Lecture 22: Variance and Covariance

1 Computing with constraints

Motivation. Lecture 2 Topics from Optimization and Duality. network utility maximization (NUM) problem:

Algorithms for constrained local optimization

Math/Phys/Engr 428, Math 529/Phys 528 Numerical Methods - Summer Homework 3 Due: Tuesday, July 3, 2018

CALIFORNIA INSTITUTE OF TECHNOLOGY Control and Dynamical Systems

CHAPTER 2: QUADRATIC PROGRAMMING

Selected Examples of CONIC DUALITY AT WORK Robust Linear Optimization Synthesis of Linear Controllers Matrix Cube Theorem A.

Seminars on Mathematics for Economics and Finance Topic 5: Optimization Kuhn-Tucker conditions for problems with inequality constraints 1

Optimization Theory. Lectures 4-6

An Introduction to CVX

EE5585 Data Compression April 18, Lecture 23

1 Strict local optimality in unconstrained optimization

Additional Exercises for Introduction to Nonlinear Optimization Amir Beck March 16, 2017

Functions of Several Variables

Chap 2. Optimality conditions

1 Convexity, concavity and quasi-concavity. (SB )

Transcription:

THE UNIVERSITY OF TEXAS AT SAN ANTONIO EE 5243 INTRODUCTION TO CYBER-PHYSICAL SYSTEMS H O M E W O R K # 4 Hafez Bazrafshan October 1, 2015 To facilitate checking, questions are color-coded blue and pertinent answers follow in regular font. The printed version however, will be in black and white. Problem 1 Convexity Property A function f : R n R is continuously differentiable. Also, assume that f (x) is concave on a convex set X. Given the aforementioned properties of f (x), prove that for all x 1, x 2 X, f (x) satisfies this property: f (x 2 ) f (x 1 ) + D f (x 1 )(x 2 x 1 ). Hint: Back to basics what is the basic definition of a derivative? Response. First assume f : R R is continously differentiable and concave (which implies its domain X is convex). Since f is concave, for any t [0, 1] and x 1, x 2 X the following holds: We can easily rearrange (1) to obtain the following f (x 1 + t(x 2 x 1 )) t f (x 2 ) + (1 t) f (x 1 ). (1) which yields: f (x 1 + t(x 2 x 1 )) t 1 t t f (x 1 ) f (x 2 ). (2) f (x 1 + t(x 2 x 1 )) f (x 1 ) t Taking the limit of both sides of (3) when t 0 yields the desired result: + f (x 1 ) f (x 2 ). (3) f (x 1 )(x 2 x 1 ) + f (x 1 ) f (x 2 ) x 1, x 2 X. (4) Now we prove the general case for f : R n R, f concave and differentiable. For a given x 1, x 2 X define g(t) = f (x 1 + t(x 2 x 1 )) for t [0, 1]. Notice that g(1) = f (x 1 + x 2 x 1 ) = f (x 2 ), g(0) = f (x 1 ) and g (0) = D f (x 1 )(x 2 x 1 ). Also notice that g(t) is concave since for any t 1, t 2 [0, 1] and θ [0, 1] we have the following: θt 1 + (1 θ)t 2 0 (5) θt 1 + (1 θ)t 2 θ + (1 θ)1 = 1 (6) θt 1 + (1 θ)t 2 [0, 1]. (7) g(θt 1 + (1 θ)t 2 ) = f [x 1 + (θt 1 + (1 θ)t 2 )(x 2 x 1 )] = f [θx 1 + θt 1 (x 2 x 1 ) + (1 θ)x 1 + (1 θ)t 2 (x 2 x 1 )] θ f (x 1 + t 1 (x 2 x 1 )) + (1 θ) f (x 1 + t 2 (x 2 x 1 )) (due to concavity of f ) θg(t 1 ) + (1 θ)g(t 2 )(by definition of g(t)). (8) Since g(t) is concave on t [0, 1] we can use the result in (4) for t 1 = 0 and t 2 = 1: g(1) g (0)(1 0) + g(0) f (x 2 ) D f (x 1 )(x 2 x 1 ) + f (x 1 ). (9) This proof is almost identical to the proof of first-order conditions by Convex Optimization book by Boyd, except that I prove why g is concave. 1

Problem 2 Convexity of a Disc Show that the set Ω given by Ω = {y R 2 ; y 2 4} is convex, where y 2 = y y. Hint: Show that if z = βx + (1 β)y, then z 2 4. You might find the submultiplicative matrixvector property to be useful too. Response. Assume x, y Ω so we know x 2 4 and y 2 4. Also note that this implies x 2 and y 2. Now assume θ [0, 1] and let s assess what the value of θx + (1 θ)y 2 will be. θx + (1 θ)y 2 = [θx + (1 θ)y] T [θx + (1 θ)y] = θ 2 x 2 + 2θ(1 θ)x T y + (1 θ) 2 y 2 (10) θ 2 4 + 2θ(1 θ)x T y + (1 θ) 2 4. (11) Due to Cauchy-Shwartz inequality, we know that x T y x y 2 2 = 4. Hence we can extend (11) to the following: θx + (1 θ)y 2 θ 2 4 + 2θ(1 θ) 4 + (1 θ) 2 4 = 4(θ 2 + 2θ(1 θ) + (1 θ) 2 ) = 4(θ + 1 θ) 2 = 4 (12) Hence θx + (1 θ)y 2 4 which means θx + (1 θ)y Ω. I did not use the hint since I didn t know what sub-multiplicative property was. Problem 3 Minimizing a Function Given a multivariable function f (x), many optimization solvers use the following algorithm to solve min x f (x): 1. Choose an initial guess, x (0) 2. Choose an initial real, symmetric positive definite matrix H (0) 3. Compute d (k) = H (k) x f (x (k) ) 4. Find β (k) = arg min β f (x (k) + β (k) d (k) ), β 0 5. Compute x (k+1) = x (k) + β (k) d (k) For this problem, we assume that the given function is a typical quadratic function (x R n ), as follows: Answer the following questions: f (x) = 1 2 x Qx x b + c, Q = Q 0. 1. Find f (x (k) + β (k) d (k) ) for the given quadratic function. 2. Obtain x f (x (k) ) for f (x). 3. Using the chain rule, and given that β (k) = arg min β f (x (k) + β (k) d (k) ), find a closed form solution for β (k) in terms of the given matrices (H (k), f (x (k) ), d (k), Q). 4. Since it is required that β (k) 0, provide a sufficient condition related to H (k) that guarantees the aforementioned condition on β (k). Response. 2

1. f (x (k) + β (k) d (k) ) = 1 2 [x(k) + β (k) d (k) ] T Q[x (k) + β (k) d (k) ] [x (k) + β (k) d (k) ] T b + c. (13) 2. x f (x (k) ) = Qx (k) b. (14) 3. We find β (k) by setting the derivative of (13) to zero, which results in the following equation: (x (k) ) T Qd (k) + β (k) (d (k) ) T Qd (k) (d (k) ) T b = 0 (15) In (15), we replace d (k) with its equivalent d (k) = H (k) x f (x (k) ), which will yield the following: β (k) [H (k) x f (x (k) )] T Q[H (k) x f (x (k) )] = (x (k) ) T Q[H (k) x f (x (k) )] b T [H (k) x f (x (k) )] (16) β (k) = [(x(k) ) T Q b T ]H (k) x f (x (k) ) [H (k) x f (x (k) )] T Q[H (k) x f (x (k) )]. (17) Notice in (17) that (x (k) ) T Q b T = x f (x (k) ) T according to (14). Finally we find the best β (k) as: β (k) = x f (x (k) ) T H (k) x f (x (k) ) [H (k) x f (x (k) )] T Q[H (k) x f (x (k) )]. (18) 4. Since Q 0, the denominator of (18) is always positive. Therefore, in order to have β (k) 0, it is sufficient to have H (K) 0. Problem 4 KKT Conditions, 1 Using the KKT conditions discussed in class, obtain all the candidate strict local minima for the following nonlinear optimization problem: max x1 2 2x2 2 subject to x 1 + x 2 3 x 2 x 2 1 1 There are many cases to consider. Make sure that you don t miss any. After solving the problem analytically, code the problem on NEOS solver (http://www.neos-server. org/neos/solvers/index.html), using any solver of your choice and any modeling language (GAMS, AMPL,...). Show your code and outputs. Response. We can write the problem as a minimization problem and convert it to a standard form (for using Lagrange multipliers): The Lagrangian is given as: The KKT conditions: min x 2 1 + 2x2 2 subject to x 1 x 2 + 3 0 µ 1 x 2 1 x 2 + 1 0 µ 2 L(x, µ 1, µ 2 ) = x 2 1 + 2x2 2 + µ 1( x 1 x 2 + 3) + µ 2 (x 2 1 x 2 + 1) (19) 1. 2x1 µ x L(x, µ 1, µ 2 ) = 1 + 2µ 2 x 1 = 4x 2 µ 1 µ 2 0. (20) 0 3

2. µ 1, µ 2 0. (21) 3. µ 1 ( x 1 x 2 + 3) = 0 (22) µ 2 (x 2 1 x 2 + 1) = 0. (23) 4. x 1 x 2 + 3 0 (24) x 2 1 x 2 + 1 0. (25) 5. 2 xl is always positive semidefinite since µ 2 0. 2 2 + 2µ2 0 xl = 0. (26) 0 4 We solve the KKT conditions by conditioning µ 1, µ 2 based on (22) and (23), and solving the remaining equations as follows: 1. Case µ 1 = µ 2 = 0 x 1 = 0, x 2 = 0. This is not acceptable since (24) and (25) are violated. 2. Case µ 1 = 0 µ 2 = 4 x 1 = 0, x 2 = 1. This is not acceptable since (24) is violated. 3. Case µ 2 = 0 µ 1 = 4 x 1 = 2, x 2 = 1. This is not acceptable since (25) is violated. 4. Case µ 1, µ 2 = 0. In this case, due to (22) and (23) we have: The system above has two sets of answers: x 1 x 2 + 3 = 0 (27) x 2 1 x 2 + 1 = 0 (28) (a) x 1 = 2, x 2 = 5 µ 1 = 28, µ 2 = 8. This is not acceptable since it contradicts condition (21). (b) x 1 = 1, x 2 = 2 µ 1 = 6, µ 2 = 2. This is an acceptable answer. To summarize, we found that x 1 = 1, x 2 = 2 is the minimizer (or the maximizer for the original problem). Since the problem is convex (concave for the original), this minimizer is the global minimum of the problem. The code for this problem is pasted below (using AMPL with Filter in NEOS): # model f i l e : var x1 ; var x2 ; minimize c : x1 ˆ2+2 x2 ˆ 2 ; s u b j e c t to A: x1+x2 >=3; s u b j e c t to B : x2 x1 ˆ2 >=1; # command f i l e : solve ; display x1, x2 ; 4

# NEOS email : Using 64 b i t binary F i l e e x i s t s You are using the s o l v e r f i l t e r. Executing AMPL. processing data. processing commands. Executing on neos 5.neos server. org 2 v a r i a b l e s, a l l nonlinear 2 c o n s t r a i n t s ; 4 nonzeros 1 nonlinear c o n s t r a i n t 1 l i n e a r c o n s t r a i n t 2 i n e q u a l i t y c o n s t r a i n t s 1 nonlinear o b j e c t i v e ; 2 nonzeros. f i l t e r S Q P ( 2 0 0 2 0 3 1 6 ) : Optimal s o l u t i o n found, o b j e c t i v e = 9 4 i t e r a t i o n s (0 f o r f e a s i b i l i t y ) Evals : obj = 5, c o n s t r = 6, grad = 6, Hes = 5 x1 = 1 x2 = 2 Problem 5 KKT Conditions, 2 Using the KKT conditions discussed in class, obtain all the candidate strict local minima for the following nonlinear optimization problem: min x 1 + x2 2 subject to x 1 x 2 = 5 x 2 1 + 9x2 2 36 There are many cases to consider. Make sure that you don t miss any. After solving the problem analytically, code the problem on NEOS solver, using any solver of your choice. Show your code and outputs. Response. The Lagrangian is as follows: The KKT conditions are given: min x 1 + x2 2 subject to x 1 x 2 = 5 λ x 2 1 + 9x2 2 36 µ L(x, λ, µ) = x 1 + x2 2 + λ(x 1 x 2 5) + µ(x1 2 + 9x2 2 36) (29) 1. 2. 1 + λ + 2µx1 x L(x, λ, µ) = = 2x 2 λ + 18µx 2 0 0 (30) µ 0 (31) 5

3. µ(x1 2 + 9x2 2 36) = 0 (32) 4. x1 2 + 9x2 2 36 0 (33) 5. 6. 2 xl(x, λ, µ) 0 always holds since µ 0. 2 xl(x, λ, µ) = We solve this problem by conditioning µ using (32): x 1 x 2 5 = 0 (34) 2µ 0 0. (35) 0 2 + 18µ 1. Case µ = 0 λ = 1, x 1 = 9 2, x 2 = 1 2. This is acceptable since it does not violate any other KKT. 2. Case µ = 0. Thus we have the following system: x1 2 + 9x2 2 = 36 (36) x 1 = x 2 + 5 (37) This system has two sets of solutions, both of which are not acceptable: (a) x 1 = 45 10 + 135 10, x 2 = 5 10 + 135 10 µ = 1 2x 2 2x 1 +18x 2 < 0. (b) x 1 = 45 10 135 10, x 2 = 5 10 135 10 µ = 1 2x 2 2x 1 +18x 2 < 0. The code for this problem is pasted below: # model f i l e : var x1 ; var x2 ; minimize c : x1+x2 ˆ 2 ; s u b j e c t to A: x1 x2 5=0; s u b j e c t to B : x1 ˆ2+9 x2ˆ2 36<=0; # command f i l e : solve ; display x1, x2 ; # NEOS email : Using 64 b i t binary F i l e e x i s t s You are using the s o l v e r f i l t e r. Executing AMPL. processing data. processing commands. 6

Executing on neos 5.neos server. org 2 v a r i a b l e s, a l l nonlinear 2 c o n s t r a i n t s ; 4 nonzeros 1 nonlinear c o n s t r a i n t 1 l i n e a r c o n s t r a i n t 1 e q u a l i t y c o n s t r a i n t 1 i n e q u a l i t y c o n s t r a i n t 1 nonlinear o b j e c t i v e ; 2 nonzeros. f i l t e r S Q P ( 2 0 0 2 0 3 1 6 ) : Optimal s o l u t i o n found, o b j e c t i v e = 4. 7 5 1 i t e r a t i o n s (0 f o r f e a s i b i l i t y ) Evals : obj = 2, c o n s t r = 3, grad = 3, Hes = 2 x1 = 4. 5 x2 = 0.5 Problem 6 Convexity Range For the following function, find the set of values for β such that the function is convex. f (x, y, z) = x 2 + y 2 + 5z 2 2xz + 2βxy + 4yz Response. We can organize f (x, y, z) as f (x, y, z) = [x, y, z]p x y where z P = 1 β 1 β 1 2. (38) 1 2 5 For f (x, y, z) to be convex, P needs to be postivie semidefinite. Necessary and sufficient condition for positive semidefinite symmetic matrices is that all of its principal minors be non-negative. Matrix P is a 3 3 matrix and has 7 principal minors, 5 of which are independent of β and (straightforward to check) positive. Only the determinant, and one of the principal minors of order 2 are dependent on β: 3 = det(p) = 1 2 2 5 β β 2 1 5 + ( 1) β 1 1 2 0 4 5 β 0 (39) 2 = 1 β 2 0 1 β 1. (40) Thus, for 4 5 β 0 the function is convex. Problem 7 CVX Programming The objective of this problem is to get you started with CVX the convex optimization solver on MAT- LAB. Do the following: 1. Watch this CVX introductory video: https://www.youtube.com/watch?v=n2b_b4tnfum 2. Download and install CVX on your machine: http://cvxr.com/cvx/download/ 3. Read the first few pages of the CVX User s Guide: http://web.cvxr.com/cvx/doc/ 4. Solve Problems 4 and 5 using CVX. Show your code and outputs. Response. Code for problem 4: 7

cvx begin v a r i a b l e s x1 x2 maximize( x1 2 x2 ˆ 2 ) s u b j e c t to : x1+x2 >=3; x2 x1 ˆ2 >=1; cvx end S t a t u s : Solved Optimal value ( cvx optval ) : 9 x1 = 1.0000 x2 = 2.0000 Code for problem 5: cvx begin v a r i a b l e s x1 x2 minimize ( x1+x2 ˆ 2 ) s u b j e c t to : x1 x2 5==0 x1+9 x2ˆ2 36<=0; cvx end S t a t u s : Solved Optimal value ( cvx optval ) : +4.75 x1 = 4.5000 x2 = 0.5000 8

Problem 8 Solving LMIs using CVX Using CVX, solve the following LMI for P: Show your code and outputs. A P + PA < 0 B P + PB < 0 P = P > 0.1I, where: 3 1 A = 0 1 2 0 B = 1 1 What happens if you try to solve the same LMI when B = Justify the results. Response. 2 0 For B = : 1 1 2 3? 1 1 A=[ 3 1 ; 0 1]; B=[ 2 0 ; 1 1]; cvx begin sdp v a r i a b l e P ( 2, 2 ) symmetric ; minimize ( 0 ) s u b j e c t to : A. P +P A < 0 ; B. P+P B < 0 ; P >= 0. 1 eye ( 2 ) ; cvx end S t a t u s : Solved Optimal value ( cvx optval ) : +0 eig (A. P +P A ) ans = 17.8518 10.2769 eig ( B. P+P B ) ans = 14.6261 7.6468 9

eig ( P ) ans = 2.6109 6.6896 For B = 2 3 : 1 1 A=[ 3 1 ; 0 1]; B=[ 2 3 ; 1 1]; cvx begin sdp v a r i a b l e P ( 2, 2 ) symmetric ; minimize ( 0 ) s u b j e c t to : A. P +P A < 0 ; B. P+P B < 0 ; P >= 0. 1 eye ( 2 ) ; cvx end S t a t u s : I n f e a s i b l e Optimal value ( cvx optval ) : + I n f According to Lyapenov s theorem, real parts of the eigenvalues of matrices A, B are negative if and ONLY if there exists a symmetric positive definite matrix P such that: A P + PA < 0 (41) B P + PB < 0. (42) The B in the first problem has negative eigenvalues and hence there exists a positive definite matrix P. The B in the second problem has a positive eigenvalue and hence the problem will become infeasible. eig ([ 2 0 ; 1 1]) ans = 1 2 eig ([ 2 3 ; 1 1]) ans = 3.3028 0.3028 10