Page 263 - Numerical Methods for Chemical Engineering
P. 263
252 5 Numerical optimization
set
2 set
−2
−
−1 − 1
Figure 5.15 Optimal feedback control law.
MATLAB summary
The optional MATLAB optimization toolkit contains useful routines for finding local min-
ima. fminsearch uses the nonlinear simplex method, but for unconstrained problems, fmi-
nunc is preferred. The latter uses either a gradient method or a trust-region Newton method
depending upon the size of the problem and the level of information about the gradi-
ent and Hessian supplied by the user. fmincon finds a local minimum in the presence
of linear and nonlinear equality and inequality constraints. The syntax of these routines
is detailed in the corresponding sections of this chapter. If the optimization toolkit is not
available, gradient minimizer.m can be used to perform unconstrained minimizations. Con-
straints could then be handled explicitly using the augmented Lagrangian method described
above. optimal control.m uses a direct approach to solve open-loop optimal control
problems.
Problems
2
5.A.1. Compute by hand a minimum of the cost function, for x ∈
2
F(x) = (x 1 − 3) + (x 2 − 1) + (x 1 − 1) + (x 2 − 3) 2 (5.173)
Check your results by solving the problem numerically.
2
5.A.2. Compute the point x ∈ that minimizes the cost function
−2 31
1
F(x) = g · x + x · Hx g = H = (5.174)
2 1 12
Now, compute the constrained minimum subject to
2
2
x + x = 1 (5.175)
1 2