12.07.2015 Views

What Is Optimization Toolbox?

What Is Optimization Toolbox?

What Is Optimization Toolbox?

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Examples That Use Standard AlgorithmsNote The call to sim results in a call to one of the Simulink ordinarydifferential equation (ODE) solvers. A choice must be made about the type ofsolver to use. From the optimization point of view, a fixed-step solver is thebest choice if that is sufficient to solve the ODE. However, in the case of a stiffsystem,avariable-stepmethodmight be required to solve the ODE.The numerical solution produced by a variable-step solver, however, is not asmooth function of parameters, because of step-size control mechanisms. Thislack of smoothness can prevent the optimization routine from converging. Thelack of smoothness is not introduced when a fixed-step solver is used. (For afurther explanation, see [1].)The Simulink Response <strong>Optimization</strong> is recommended for solvingmultiobjective optimization problems in conjunction with variable-step solversin Simulink. It provides a special numeric gradient computation that workswith Simulink and avoids introducing a problem of lack of smoothness.Simulink Example Using fminimaxAnother approach to optimizing the control parameters in the Simulink modelshowninPlantwithActuator Saturation on page 2-27 is to use the fminimaxfunction. In this case, rather than minimizing the error between the outputand the input signal, you minimize the maximum value of the output at anytime t between 0 and 100.The code for this example, shown below, is contained in the functionruntrackmm, in which the objective function is simply the output youtreturned by the sim command. But minimizing the maximum output at alltimestepsmightforcetheoutputtobefarbelowunityforsometimesteps.To keep the output above 0.95 after the first 20 seconds, the constraintfunction trackmmcon contains the constraint yout >= 0.95 from t=20 tot=100. Because constraints must be in the form g

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!