Lecture 23 : Optimization
Objectives
In this lecture you will learn the following
How does one solve a constrained optimization problem ?
An illustrative example
Unconstrained and Constrained Optimization
In an unconstrained system, the usual approach to minimize the cost function is to set the function derivatives to
zero and then solve for the control and auxiliary variables from the set of resulting equations, i.e., if we wish to
Minimize J(u)
then the solution is obtained by setting the partial derivative of J with respect to every control variable u to zero.
The number of equations will be equal to the number of control variables.
Suppose we wish to minimize a cost function subject to some equality and inequality constraints. If constraints
are specified, then the the above-mentioned procedure will not work because the solution obtained from the
procedure may not satisfy the constraints. Therefore an alternative method is required in order to take
constraints into account.
Let us first consider the case wherein only equality constraints are present:
Minimize
subject to
In such a case the procedure is to form a composite cost function
C = J(x,u) - l' * g(x,u)
where l' is a row vector of the variables called the Lagrange Multipliers. The number of
multipliers is equal to the number of equality constraints g(x,u) =0.
The composite cost function is minimized by treating the Lagrange mulitpliers as additional variables. This
solution is a minimum solution which satisfies the equality constraints.
We shall now illustrate this using a simple example.
Equality Constrained Optimization
We will use the same example as in the previous lecture, but solve it by using the formal Lagrange Multipliers
formulation.
Consider two generators with the following cost functions:
, C1 = 50 *P1 + 3 * P1²
C2 = 50 *P2 + 2.5 * P2²
Let us assume that the generators (G1 and G2) do not have any maximum limits. Find the least cost schedule
if a load demand of 550 MW is to be met.
Total cost is given by : C1+C2 which is to be minimized.
subject to P1+P2 - 550 =0
The composite cost function is given by : C = C1+C2 - l * (P1+P2-550)
Since there is only one constraint equation, l is a scalar. In this example, P1 and P2 are the
control variables and there are no auxiliary variables (to keep things simple!).
Now by differentiating with the reference to the control, auxiliary (there are none in this
example) and l , and equating all derivatives to zero, we obtain :
dC/dP1 = 50 + 6* P1 - l = 0 , dC/dP2 = 50 + 5* P2 - l = 0, and dC/dl = - (P1+P2-550) = 0, or equivalently
These are three independent equations in three variables and can be solved by pre-multiplying the column
vector on the RHS by the inverse of the matrix on the LHS. Verify that that P1=250 MW, P2=300 MW, and l =
Rs 1550 / MW-hr is the solution.
Also note that since at the optimum solution, dC/dP1 = dC1/dP1 - l =0 = dC/dP2 = dC2/dP2 - l. In
other words, at the optimum solution, dC1/dP1 = dC2/dP2 = l
The equality of dC1/dP1 = dC2/dP2 was an observation that we made in the previous lecture too.
It is not difficult to see why this is true at the optimum (least cost) solution. If dC1/dP1 >
dC2/dP2 at a certain value of P1 and P2, then it would be possible to reduce total cost by slightly increasing
P2, and reducing P1 by the same amount. Therefore these values of P1 and P2 CANNOT be the least cost
solution. The same can be argued for values of P1 and P2 such that dC1/dP1 < dC2/dP2.
Only if dC1/dP1 = dC2/dP2 can we state that no improvement in cost will result for (small) changes in P1 and
P2.
General Constrained Optimization with Inequality Constraints
What happens variables are constrained by an inequality constraint ?
An inequality constraint usually arises when one wants to place some limits on the value of a variable. For
example, power output of a generator is limited by its capacity. A simple and approximate way of ensuring that
limits are not hit (i.e. inequality constraints are not violated) is to augment the composite cost function
discussed earlier, so that costs become extremely high if any limit is violated.
Consider the following problem:
Minimize
subject to