You are on page 1of 42

Lecture 23

Static Optimization: An Overview


Dr. Radhakant Padhi
Asst. Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore

Topics
z

Unconstrained optimization

Constrained optimization with equality


constraints

Constrained optimization with inequality


constraints

Numerical examples

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

Unconstrained Optimization
Dr. Radhakant Padhi
Asst. Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore

Static Optimization
J2 (x)

Observation for: J1 ( x )
Point 1: Local maximum
Point 2: Point of inflexion
Point 3: Local minimum
Point 4: Local maximum

Point 3: Global minimum


Point 4: Global maximum

J1(x)

1
J1(x)

2
3

J2 (x)

xa

xb

dJ ( x)
=0
At all minima/maxima:
dx
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

Necessary and Sufficient


Conditions for Optimality
Scalar Case:
Performance Index J (x) : An analytic function x of
Taylor series:
2
dJ
1
d
J
2

J ( x + x ) J ( x ) =
x
x

+
(
)
2

dx *
2! dx x = x
x= x
Necessary Condition:
*
If J ( x ) is a minimum irrespective of the sign of x,
d
J
then
=0
d x x = x
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

Necessary and Sufficient


Conditions for Optimality
Sufficient Condition:
2
1
d
J
J ( x + x ) J ( x ) =

2! dx 2

( x )

+ HOT

x = x

J ( x + x ) > J ( x ) , irrespective of the sign of x

dJ
>0
2
dx x=x
2

if

d 2J
Similarly, if
dx 2

(sufficiency condition for local minimum)

< 0, it leads to a local maximum


x = x
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

Necessary and Sufficient


Conditions for Optimality
dJ
dx

Q-1: What if
Answer:

x = x

3
d
J
1

J ( x + x ) J ( x ) =
3! dx 3

Necessary condition
Sufficient condition

d 2J
= 2
dx

=0 ?
x = x

4
d
J
1
3
(x ) +
4

4
!
dx
x= x

d 3J
dx 3
d 4J
dx 4

x =x

x =x

(x ) +
4

x = x

=0
>0

(for minimization)

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

Necessary and Sufficient


Conditions for Optimality
dJ
d 2J
= 2
Q-2: What if
dx x= x dx

x = x

=0

but

d 3J
dx3

0?
x = x

Then x = x is a point of inflexion


J = x4

Example 1:
dJ / dx = 4x3 = 0
x = 0,0,0
d2 J
dx2

= 12x2 = 0 ,
x =0

d3 J
dx3

= 24x = 0 ,
x* =0

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

d4 J
dx4

= 24 > 0
x* =0

minimum
8

Necessary and Sufficient


Conditions for Optimality
Example 2:

J=x

dJ / dx = 3 x 2 = 0
x = 0, 0
d 2J
dx 2

= 6 x = 0 ,
x = 0

d 3J
dx 3

=60
x* = 0

Hence, x is a point of inflexion.


ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

Necessary and Sufficient


Conditions for Optimality
Vector case
J(X )

Minimize

where

By definition,

J
X

J
x
1

xn

2 J
X 2

2 J
x 2
1

2
J
x x
n 1

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

2 J
x1xn

2
J
xn2
10

Necessary and Sufficient


Conditions for Optimality
J ( X ) = J ( X + X )
J
= J (X ) +
X

For minimization,

2
1
T J

X + (X ) 2
2!
X
X

J ( X + X ) J ( X ) > 0

X +
X*

( irrespective of sign of X )

Necessary Condition:

J = 0
X X

Sufficient Condition:

2 J
X 2 > 0 (positive definite)

Remark: Further Conditions are difficult to use in practice!


ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

11

Necessary and Sufficient


Conditions for Optimality
Example 1:

1 2
J ( X ) = ( x1 + x22 )
2

Necessary Condition

J = 0
X X

0
x
1
1

= =

J
x
2 0
x
2 X*
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

12

Necessary and Sufficient


Conditions for Optimality
Sufficient Condition:
2 J
X 2

X*

2 J
x 2
1
= 2
J

x2 x1

2 J
x1x2
1 0
=

0
1
J

2
x2 X *

Eigenvalues: 1,1 at X = X

2
0 is a minimum

(positive definite). So X =
>
0
2
0 point
X X

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

13

Necessary and Sufficient


Conditions for Optimality
Example 2:
Solution:

J ( x ) = 1 x12 x22
2

J
=0
X

0
x

1
X = * =
x2 0

2 J 1 0
Eigenvalues: 1, 1
=

X 2 0 1
2 J
is neither positive definite, nor negetive definite
i.e.
2
X
Hence X = 0 is a 'saddle point'.
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

14

Constrained Optimization with


Equality Constraints
Dr. Radhakant Padhi
Asst. Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore

Constrained Optimization:
Equality Constraint
Problem: Minimize
Subject to

J (X )

(X )
n

f (X ) = 0

where, f ( X ) = f1 ( X )

f m ( X )
T

Solution Procedure:
Formulate an augmented cost function
J ( X , )

J ( X ) + T f ( X )

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

16

Constrained Optimization:
Equality Constraint
Necessary Conditions:
T

J
J f
=0
=
+

X
X X

n equations

J
= f (X ) = 0
m equations

Hence, it lead to ( n + m ) equations


with ( n + m ) variables. Solve it!
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

17

Constrained Optimization with


Equality Constraint: An Example
Minimize
Subjected to:

Solution:

1 2 2
x1 + x2
2
f ( X ) = x1 + x2 2 = 0
J (X )=

J X = 1 x12 + x22 + x1 + x2 2

J / x1 x1 + 0

1
x


1
J / x2 = x2 + = 0 , x = = 1

J / x1 + x2 2 0 2

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

18

Constrained Optimization with


Equality Constraint: Another Example
Minimize
Subject to

2
2
1 x1 x2
J ( X ) = +
2 a b

x1 + mx2 c = 0
where a, b, m, c are Constants

Solution:

x
1 x
J = + + ( x1 + mx2 c )
2 a b
2
1
2

2
2
2

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

19

Constrained Optimization with


Equality Constraint: Another Example

Solve:

0
x

J
1
+

a

x1
x2

J
0

+
2

=
=
b

x2

J
x + mx c 0

2
1


( x1 , x2 , )

2
2

ac
b mc *
c

x1 = 2
, x2 = 2
, = 2
2 2
2 2
2 2
a +m b
a +m b
a +m b

Remark: has no physical meaning. It only helps to solve the problem.


ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

20

Constrained Optimization with


Equality Constraint: Sufficiency Condition

If the equation

T
2 J
f
2 I
X = 0
X
f


0
X

has only positive roots

Minimum

has only negative roots

Maximum

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

21

Example 1
Problem:
Solution:

J=

(x

1
2

2
1

+x

2
2

),

f ( x1 , x2 ) = x1 x2 5 = 0

J = 12 ( x 21 + x22 ) + ( x1 x2 5 )

Necessary condition:

x1 + 0
x = 0
2

x1 x2 5 0

= 52 , x1 = 52 , x2 = 52
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

22

Example 1
Sufficient condition:
2 J 1 0
=
,
2

X
0 1
0
1
det 0
1

1
1

The Solution

f 1
=
X 1

1
1 = 0

x1 = 52 , x2 = 52

=1> 0
is a minimum.

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

23

Example 1: Some Remarks


In this example, x1, x2 and do not appear in
the equation for . Moreover, the solution is the
only solution. Hence, the result is global.
In general, however will be a function of
X and . Hence, various conclusions have to
be derived on case-to-case basis.

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

24

Example 2
Problem:
Solution:

J = x1 x22 ,

f ( X ) = x12 + x22 1 = 0

J = x1 x2 + ( x1 + x2 1)
2

Necessary condition:

1 + 2x1 0
2 x ( 1) = 0
22 2
x1 + x2 1 0

2
2

Sufficient condition:
=
2
X
0

0 f 2 x1
,
=

2( 1) X 2 x2

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

25

Example 2
2
0
2x1

det 0
2 2 2x2 = 0
2x

x
2
0
1
2

x1

x2

1
-1
-1/2

0
0
1.73

-1/2
1/2
1

-3
-1
3/2

Conclusion
Maximum
Maximum
Minimum

-1/2

-1.73

3/2

Minimum

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

26

Constrained Optimization with


Inequality Constraints
Dr. Radhakant Padhi
Asst. Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore

Constrained Optimization with


Inequality Constraints: A nave approach
Remark: One way of dealing with inequality
constraints for the variables is as follows:
Let ximin xi xi

max

Replace: xi = xi

min

Consider

(Important for control problems)

+ ximax xi

min

sin 2 i

as a free variable.

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

28

Optimization with
Inequality Constraints
n
R
R
Maximize
/
Minimize:
J
X

,
X

(
)
Problem:

Subject to:

g(X )

g1 ( X ) 0


g m ( X ) 0

Solution: First, introduce "slack variables" 1 , , m to convert


ineqaulity constraints to equality constraints as follows:
fg ( X , )

g1 ( X ) + 12 0

=
g m ( X ) + m2 0

Then follow the routine procedure for the equality constraints.


ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

29

Optimization with
Inequality Constraints
Augmented PI: J ( X , , ) = J ( X ) +

g
X

(
)
j j
j j
j =1

Necessary Conditions:

g j
J J m
=
+ j
= 0, i = 1, , n
xi xi j =1 xi

( n equations )

J
= g j ( X ) + 2j = 0,
j

j = 1, , m

( m equations )

J
= 2 j j = 0,
j

j = 1, , m

( m equations )

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

30

Optimization with
Inequality Constraints
J
= g j ( X ) + 2j = 0
j
g j ( X ) = 2j

j g j = j ( j j )
J
= 2 j j = 0
j
Hence, j g j = 0

This leads to the conclusion that


either j = 0 or g j = 0
i.e.
If a constraint is strictly an inequality
constraint, then the problem can be
solved without considering it.
Otherwise, the problem can be solved
by considering it as an equality
constraint.

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

31

Necessary Conditions
(Kuhn-Tucker Conditions)
g j
J J m
=
+ j
= 0, i = 1, , n
xi xi j =1 xi

j g j ( X ) = 0,

j = 1, , m

( n equations )

( m equations )

For J ( X ) to be MINIMUM

For J ( X ) to be MAXIMUM

if g j ( X ) 0 then j 0

if g j ( X ) 0 then j 0

if g j ( X ) 0 then j 0

if g j ( X ) 0 then j 0

(opposite sign)

(same sign)

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

32

Optimization with
Inequality Constraints: Comments
z

One should explore all possibilities in the


Kuhn-Tucker conditions to arrive at an
appropriate conclusion

Kuhn-Tucker conditions are only


necessary conditions

Sufficiency check demands the concept


of convexity
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

33

Convex/Concave Function f (x)


z

A function is called convex, if


a straight line drawn between
any two points on the surface
generated by the function lies
completely above or on the
surface.
If the line lies strictly above the
surface, then the function is
called strictly convex.

f ( x)

x
Strictly convex

f ( x)

If the line lies below the


surface, then the function is
called a concave.

x
Strictly concave

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

34

Result for Local


Convexity/Concavity of f (X ) at X*
2 f
2
X X *

Definition
Strictly convex
Convex
Strictly concave
Concave
No classification

Eigenvalues

Positive definite

i > 0, i

Positive
Semi-definite

i 0, i

Negative definite

i < 0, i

Negative
Semi-definite

i 0, i

Indefinite

Some i > 0. Rest are 0

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

35

Conditions for which Kuhn-Tucker


Conditions are also Sufficient
Condition

J (X )

All g j ( X )

Maximum

Strictly concave

Convex

Minimum

Strictly convex

Convex

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

36

Example
Problem:

Minimize: J ( X ) = ( x12 + x22 )


Subject to:

Solution:

( x1 x2 ) 5
( x1 x2 ) 1

g1 ( X ) = ( x1 x2 5 ) 0
g 2 ( X ) = ( x1 + x2 + 1) 0

J = ( x12 + x22 ) + 1 ( x1 x2 5 ) + 2 ( x1 + x2 + 1)
ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

37

Example: Kuhn-Tucker Conditions


J
= 2 x1 + 1 2 = 0
x1

1 ( x1 x2 5 ) = 0

J
= 2 x2 1 + 2 = 0
x2

2 ( x1 + x2 + 1) = 0

( x1 x2 5) 0
( x1 + x2 + 1) 0

Note: x2 = x1

1 0
2 0

All possible solutions should be investigated

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

38

Feasible Solution of
Kuhn-Tucker Conditions
1
1
z Case 1: 1 = 0, 2 0, Feasible: x1 = , x2 =
2
2
z

Case 2: 1 = 0, 2 = 0, Not Feasible: x1 = x2 = 0


5
5
1 0, 2 = 0, Not Feasible: x1 = , x2 =
2
2

Case 3:

Case 4: 1 0, 2 0, Not Feasible: No Solution !


ADVANCED CONTROL SYSTEM DESIGN
Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

39

Sufficiency condition
J ( X ) = ( x12 + x22 ) is strictly convex. g1 ( X ) , g 2 ( X ) are also convex.
Hence, the Kuhn-Tucker conditions are both Necessary and Sufficient.

2 J 2 0
Moreover,
=
> 0 and it doesnot depend on the value of X .

2
X
0 2
Hence, X * = [1/ 2 1/ 2] is the GLOBAL minimum!
T

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

40

References
z

T. F. Elbert, Estimation and Control Systems,


Von Nostard Reinhold, 1984.

S. S. Rao, Optimization Theory and


Applications, Wiley, Second Edition, 1984.

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

41

ADVANCED CONTROL SYSTEM DESIGN


Dr. Radhakant Padhi, AE Dept., IISc-Bangalore

42

You might also like