Nonlinear Control Design Blockset | ![]() ![]() |
Running the Optimization
After adjusting the constraint bounds in the Nonlinear Control Design Blockset constraint figure and declaring the tunable variables using the Optimization Parameters dialog box, you are ready to begin the optimization. You can start an optimization by clicking the Start button on the Nonlinear Control Design Blockset Control panel or by selecting Start from the Optimization menu.
When you start the optimization, the Nonlinear Control Design Blockset automatically converts the constraint bound data and tunable variable information into a constrained optimization problem. It then invokes the Optimization Toolbox routine constr
. The routine adjusts the tunable variables in an attempt to better achieve the constraints on system signals defined by the Nonlinear Control Design Blockset main interface. The routine constr
solves constrained optimization problems using a sequential quadratic programming (SQP) algorithm and quasi-Newton gradient search techniques. See the section "Solving the Optimization Problem" for more information on how the Nonlinear Control Design Blockset uses constr
to optimize the tunable variables. In short, the optimization problem formulated by the Nonlinear Control Design Blockset minimizes the maximum constraint violation. The number of iterations necessary for the optimization to converge and the final values of the tunable variables depend not only on the specific problem but also on the computer system.
For the problem posed above, the output on a PC running WindowNT4.0 is as follows.
To inspect the new value of the tunable variable, simply type the variable name at the MATLAB prompt.
During optimization, the Nonlinear Control Design Blockset first displays information about plant uncertainty, a topic discussed in the next subsection. Next the blockset displays information regarding the number of constraints per simulation and simulations conducted. To determine the total number of constraints to be met, multiply the constraints generated per simulation by the number of simulation per cost function call. Information regarding the progress of the optimization follows.
The first column of output shows the total number of cost function calls. To calculate the total number of simulations conducted, multiply the number of function calls by the number of simulations per cost function call. The second column (max{g}
) shows the maximum (weighted) constraint violation (i.e., the cost function). This number should decrease during the optimization. When max{g}
becomes negative, all constraints have been met. In the case above, a negative max{g}
shows that all constraints were met after the ninth function call and the optimization then proceeded to overachieve. The third column (STEP) displays the step size used by the line search algorithm. The last column shows special messages related to the quadratic programming subproblem. If the termination criteria are met, the optimization ends with the message Optimization Converged Successfully
. Note that this does not imply that all constraints have been met.
Finally, the optimization displays an encoded list of the active constraints (i.e., which constraints prohibit further decrease in the cost function). For detailed information on the optimization algorithm, see the Appendix. The command window display can be disabled by unchecking the Display optimization information check box on the Optimization Parameters dialog box.
When the Nonlinear Control Design Blockset begins the optimization, it plots the initial response in white. To view the (initial) response without beginning the optimization, select Initial response from the Options menu. Viewing the initial response may help you define better constraint bounds. At each iteration the optimization plots an intermediate response. You can terminate the optimization at any time and recover intermediate results by clicking the Stop push button or selecting Stop from the Optimization menu.
Because of different numerical precision, the results of the optimization may differ slightly across different platforms.
![]() | Adjusting Constraints | Adding Uncertainty | ![]() |