Parameter Optimization: Constrained
Total Page:16
File Type:pdf, Size:1020Kb
ECE5570: Optimization Methods for Systems and Control 4–1 Parameter Optimization: Constrained Many of the concepts which arise in unconstrained parameter optimization are also important in the study of constrained optimization, so we will build on the material presented in Chapter 3. Unlike unconstrained optimization, however, it is more difficult to generate consistent numerical results; hence the choice of a suitable algorithm is often more challenging for the class of constrained problems. The general form of most constrained optimization problems can be ! expressed as: n min L.u/ u R 2 subject to ci .u/ 0; i E D 2 ci .u/ 0; i I " 2 where E and I denote the set of equality and inequality constraints, respectively. Any point u0 satisfying all the contraints is said to be a feasible point; ! the set of all such points defines the feasible region, R. Let’s consider an example for the n 2 case where L.u/ u1 u2 D D C subject to constraints: 2 c1.u/ u2 u D # 1 2 2 c2.u/ 1 u u D # 1 # 2 This situation is depicted in Fig 4.1 below. Lecture notes prepared by M. Scott Trimboli. Copyright c 2013, M. Scott Trimboli $ ECE5570, Parameter Optimization: Constrained 4–2 Figure 4.1: Constrained Optimization Example Equality Constraints: Two-Parameter Problem Consider the following two-parameter problem: ! T – Find the parameter vector u u u to minimize L.u/ subject D 1 2 to the constraint c.u/ ! h i D – Question: why must there be at least two parameters in this problem? From the previous chapter, we know that the change in L caused by ! changes in the parameters u1and u2 in a neighborhood of the optimal solution is given approximately by: @L @L 1 @2L L u u uT u 1 2 2 4 % @u1 4 C @u2 4 C 24 @u 4 ˇ ˇ Ä " ˇ& ˇ& – but as we changeˇ.u1;u2/ we mustˇ ensure that the constraint ˇ ˇ remains satisfied – to first order, this requirement means that @c @c c u1 u2 0 4 D @u 4 C @u 4 D 1 ˇ 2 ˇ ˇ& ˇ& Lecture notes prepared by M. Scott Trimboli. Copyright cˇ 2013, M. Scott Trimboliˇ $ˇ ˇ ECE5570, Parameter Optimization: Constrained 4–3 – so u1 (or u2 ) is not arbitrary; it depends on u2 (or u1 ) 4 4 4 4 according to the following relationship: @c =@u2 u1 j& u2 @c 4 D# =@u1 4 # j& $ ) @c @L @L =@u2 L u2 @c 4 % @u2 # @u1 =@u1 4 # Ä "$& 2 2 @c 2 @c 2 1 @ L @ L =@u2 @ L =@u2 2 2 u2 C2 @u2 # @u @u @c=@u C @u2 @c=@u 4 ( 2 1 2 Ä 1 " 1 Ä 1 " ) & – but, u2 is arbitrary; so how do we find the solution? 4 coefficient of first-order term must be zero ı coefficient of second-order term must be greater than or equal ı to zero So, we can solve this problem by solving ! @L @L @c=@u 2 0 @u # @u @c=@u D 2 ˇ 1 Ä 1 " ˇ& – but this is only one equationˇ in two unknowns; where do we get the ˇ rest of the information required to solve this problem? from the constraint: ı c.u1;u2/ ! D Although the approach outlined above is straightforward for the ! 2-parameter and 1- constraint problem, it becomes very difficult to implement as the dimensions of the problem increase For this reason, it would be nice to develop an alternative approach ! that can be extended to more difficult problems Lecture notes prepared by M. Scott Trimboli. Copyright c 2013, M. Scott Trimboli $ ECE5570, Parameter Optimization: Constrained 4–4 Is this possible? ! YESŠ ) Lagrange Multipliers: Two-Parameter Problem Consider the following cost function: ! L L.u1;u2/ # c.u1;u2/ ! N D C f # g where # is a constant that I am free to select – since c ! 0, this cost function will be minimized at precisely the # D same points as L.u1;u2/ – so, a necessary condition for a local minimum of L.u1;u2/ is: L0 L # c 0 4 D4 C 4 D @L @c @L @c # u1 # u2 0 @u C @u 4 C @u C @u 4 D # 1 1 $ # 2 2 $ but because of the constraint, u1 and u2 are not ı 4 4 independent; so it is conceivable that this result could be true even if the two coefficients are not zero. however, # is free to be chosen: ı @L =@u1 Let # # @c D =@u1 @L @c then # 0 @u2 C @u2 D and c.u1;u2/ 0 D result 3 equations, 3 unknowns ı ) Comments: ! – Is this a new result? No Lecture notes prepared by M. Scott Trimboli. Copyright c 2013, M. Scott Trimboli $ ECE5570, Parameter Optimization: Constrained 4–5 if you substute the expression for # into the second equation, ı you get the same result as developed previously – So why do it? @L @c # 0 @u1 C @u1 D @L @c # 0 @u2 C @u2 D these two equations are precisely the ones I would have ı obtained if I had assumed u1 and u2 were independent 4 4 so the use of Lagrange multipliers allows me to develop the ı necessary conditions for a minimum using standard unconstrained parameter optimization techniques, which is a significant simplification for complicated problems Example 4.1 Determine the rectangle of maximum area that be inscribed inside a ! circle of radius R. Figure 4.2: Example - Constrained Optimization Lecture notes prepared by M. Scott Trimboli. Copyright c 2013, M. Scott Trimboli $ ECE5570, Parameter Optimization: Constrained 4–6 Generate objective function, L.x; y/: ! A 4xy L 4xy D ) D# Formulate constraint equation, c.x; y/: ! c.x; y/ x2 y2 R2 D C D Calculate solution ) @L 4y @x D# @c 2x @x D @L 4x @y D# @c 2y @y D x2 y2 R2 C D 4x 4y.2y=2x/ 0 # C D ) x2 y2 R2 C D x2 y2 0 # D R 2 x y A& 2R ) D D p2 ) D Lagrange multiplier ! x2 y2 R2 C D 4y #2x 0 # C D 4x #2y 0 # C D Lecture notes prepared by M. Scott Trimboli. Copyright c 2013, M. Scott Trimboli $ ECE5570, Parameter Optimization: Constrained 4–7 ) y # 2 D x y2 4x 4 0 x2 y2 0 )# C x D ) # D ) R 2 x y A& 2R D D p2 ) D # 2 D Is the fact that # 2 important? ! D Multi-Parameter Problem The same approach used for the two-parameter problem can also be ! applied to the multi-parameter problem But now for convenience, we’ll adopt vector notation: ! – Cost Function: L.x; u/ – Constraints: c.x; u/ !, where c is dimension n 1 D ' – by convention, x will denote the set of dependent variables and u will denote the set of independent variables – how many dependent variables are there? n (why?) x .n 1/ u .m 1/ ) Á ' Á ' Method of First Variations: ! @L @L L x u 4 % @x 4 C @u 4 @c @c c x u 4 % @x4 C @u4 Lecture notes prepared by M. Scott Trimboli. Copyright c 2013, M. Scott Trimboli $ ECE5570, Parameter Optimization: Constrained 4–8 1 @c # @c x u )4 D# @x @u4 # $ – NOTE: x must be selected so that @c=@x is nonsingular; for well-posed systems, this can always be done. – using this expression for x, the necessary conditions for a 4 minimum are: 1 @L @L @c # @c 0 @u # @x @x @u D # $ c.x; u/ ! D giving .m n/ equations in .m n/ unknowns. C C Lagrange Multipliers: ! L L.x; u/ "T c.x; u/ ! N D C f # g where " is now a vector of parameters that I am free to pick. @L T @c @L T @c T L0 " x " u c.x; u/ ! " 4 N D @x C @x 4 C @u C @u 4 C f # g 4 # $ # $ – and because I’ve introduced these Lagrange multipliers, I can treat all of the parameters as if they were independent. – so necessary conditions for a minimum are: Lecture notes prepared by M. Scott Trimboli. Copyright c 2013, M. Scott Trimboli $ ECE5570, Parameter Optimization: Constrained 4–9 @L @L @c N "T 0 @x D @x C @x D @L @L @c N "T 0 @u D @u C @u D T @L N c.x; u/ ! 0 (@") D # D which gives .2n m/ equations in .2n m/ unknowns. C C NOTE: solving the first equation for " and substituting this result into ! the second equation yields the same result as that derived using the Method of First Variations. Using Lagrange multipliers, we transform the problem from one of ! minimizing L subject to c ! to one of minimizing L without D N constraints. Sufficient Conditions for a Local Minimum Using Lagrange multipliers, we can develop sufficient conditions for a ! minimum by expanding L to second order: 4 N 1 L L x L L x L u T T N xx N xu N N x N u x u 4 4 D 4 C 4 C 2 4 4 " Lux Luu #" u # h i N N 4 where @2L @2L Lxx N Luu N N D @x2 N D @u2 @ @L T Lxu Lux N D @u @x D N # $ Lecture notes prepared by M. Scott Trimboli. Copyright c 2013, M. Scott Trimboli $ ECE5570, Parameter Optimization: Constrained 4–10 – for a stationary point, Lx Lu 0 N D N D and 1 x c# cu u h:o:t: 4 D# x 4 C – substituting this expression into L and neglecting terms higher 4 N than second order yields: 1 1 L L c# c L uT T T N xx N xu x u u N cu cx# Im m # 4 D 24 # ' " Lux Luu #" Im m # 4 h i N N ' 1 T L u L& u 4 N D 24 N uu4 where 1 T T T T 1 L& Luu Luxc# cu c c# Lxu c c# Lxxc# cu N uu D N # N x # u x N C u x N x – so, a sufficient condition for a local minimum is that L Š N uu& is positive definite Example 4.2 Returning to the previous problem of a rectangle within a circle, we ! have Lxx 2# Lyx 4cx 2x N D N D# D Lxy 4 Lyy 2#cy 2y N D# N D D Let y be the independent variable: ! 4y 4y 2#y2 L& 2# # # N yy D # x # x C x2 R At the minimum (?), x y # 2 ! D D p2 D L& 16 > 0 ) N yy D Lecture notes prepared by M.