Nonlinear Control Design Blockset    

Optimization

Problem: The optimization appears to only find a local minimum.

Recommendation: The Nonlinear Control Design Blockset optimization does not guarantee finding a global optimum. In general, the problems formulated by the Nonlinear Control Design Blockset are nonconvex. If you suspect that the answer returned by the Nonlinear Control Design Blockset is not the global minimum (i.e., that it is possible to better meet the constraint bounds) consider starting the optimization from a different initial condition (i.e., use a different first guess for tunable variables).

Problem: The constrained signals have different response scales. Do the signals need to be normalized?

Recommendation: Yes. For systems containing multiple NCD blocks, the signals should be normalized. We suggest using Gain blocks to normalize signals before inputting them to the NCD block. The inverted pendulum example of Chapter 2, "Tutorial" provided an example of such normalization. Alternately, you can normalize the signals by weighting all the constraint bound segments of that signal using the Constraint Editor dialog box. We recommend the convention of reserving the use of constraint segment weighting for weighting of one constraint relative to another.

Problem: The tunable parameters possess different magnitudes. Do the parameters need to be normalized?

Recommendation: No. The optimization automatically perturbs the variables in proportion to their magnitude.

Problem: What happens if the system has discontinuous blocks?

Recommendation: Blocks containing discontinuities can be placed in the Simulink system. As long as the output of a block does not feed directly into a constrained signal, the Nonlinear Control Design Blockset optimization should proceed normally. When the output of a block does feed directly to a constrained signal, gradient calculations may be inaccurate, causing the optimization to perform more iterations. Small step sizes are a typical sign of this type of difficulty.

Problem: The optimization seems to go on forever.

Recommendation: As previously explained, the time required to run the optimization is proportional to the number of tunable parameters multiplied by the number of uncertain plants constrained multiplied by the duration of a single simulation. To decrease optimization runtime, you should tune few variables as possible, constrain as few plants as possible, and run the optimization for over as small a simulation time as possible. The duration of a single simulation is a function of the complexity of the system and the length (in system time) of the simulation.

If the output to the MATLAB command window shows that no simulations are being completed (and the display option in the Tunable Variables dialog box is "on"), check the start and stop time of the system. The time response of the system should be constrained over the minimal period possible while still guaranteeing that the dynamics of interest are observed. If the optimization previously improved the system response, but continues running with little improvement in the cost function, consider relaxing the termination criterion using the Tunable Parameters dialog box.

Remember that you can stop the optimization and recover an intermediate result using the Stop button. If the optimization continues but you observe little change in system response and cost function, consider stopping the optimization. Note that it may take a little while to process the stop.

Problem: The optimization displays the message ill posed in the MATLAB command window.

Recommendation: This problems typically arises when the tunable variables do not affect the cost function. Check for typographical errors in your
Simulink system or the Tunable Variables dialog box. Alternately, nonlinearities in the Simulink model may make the constrained signal response independent of the value of the tunable parameters. If you suspect this is the case, change the value of the tunable variables at the command line and verify no change occurs in the constrained signals. Possibly the optimization does not significantly perturb the tunable variables during its finite difference calculations. Try increasing the minimum and maximum perturbation elements of the options vector from the MATLAB command line. Type help foptions or see the Optimization Toolbox documentation for more information.

Problem: The optimization displays the message infeasible in the MATLAB command window.

Recommendation: Sometimes the quadratic programming subproblem solved at each iteration of the optimization may not have a feasible solution. As long as the optimization continues (i.e., as long as it does not terminate with the infeasible message) you can ignore the message. Alternately, inconsistent constraints also produce such a message. The simplest example constrains x<X1 and x>X2 where X2>X1. Check that lower and upper constraint bounds do not cross. Also lower bounds on tunable variables must be less than upper bounds.

Problem: The tunable variables do not change during optimization.

Recommendation: The problem is most likely ill posed. See above.

Problem: The step response seems to become more unstable as the optimization progresses.

Recommendation: This problem typically arises because of an unachievable rise time constraint. In an attempt to better meet the rise time constraint, the optimization begins to violate the overshoot constraint. Try relaxing your rise time constraint and restarting the optimization.

Problem: Nothing happens when I start the optimization.

Recommendation: A previous error may have left the Nonlinear Control Design Blockset in a nebulous state. Select Refresh from the Options menu and try again.

Problem: The optimization crashes with an Out of memory error.

Recommendation: Although out of memory errors can occur for a number of reasons (see the appropriate section in the MATLAB documentation), the most likely cause of this error while using the Nonlinear Control Design Blockset is a small ratio of discretization interval to length of simulation. Either decrease the length of the simulation or increase the discretization interval.

Problem: The optimization terminates by saying that Optimization converged successfully, but all the constraints have not been met.

Recommendation: Convergence of the optimization and successfully meeting all constraints are independent of each other. When the optimization reaches what it thinks is a (local) minimum, it terminates with the Optimization converged successfully message. It has met the constraint bounds as best it can given the initial conditions (initial guesses for the tunable variables). If you think that a better local (or global) minimum exists, consider starting the optimization with a different initial guess for the tunable variables. Alternately, the performance objectives may be overly stringent for the control structure used. If your closed loop system must meet the constraint bounds, consider changing your control structure (increase the order and/or complexity of the controller, use more powerful actuators, or add sensors to provide real measurements of estimated states).

Problem: Can the Simulink Accelerator make the Nonlinear Control Design Blockset optimization run faster?

Recommendation: Yes, if you have the Simulink Accelerator, simply check Accelerate on your Simulink system Simulation menu and the Nonlinear Control Design Blockset will run with the C code generated by the Simulink Accelerator. Because the majority of Nonlinear Control Design Blockset optimization time is spent conducting simulations, using the Simulink Accelerator could greatly decrease the amount of time it takes to perform an optimization. Remember that to get the most speed from the Simulink Accelerator, you should close all Scope blocks and either remove M-file function blocks or replace them with Fcn blocks.


  Control and Identification Nonlinear Control Design Blockset Interface