If you are using pattern search, check that you have
specified appropriate maximum and minimum values for all your tuned
parameters or compensator elements. The pattern search method looks
inside these bounds for a solution. When they are set to their default
method searches within ±100% of the initial values of the parameters.
In some cases this region is not large enough and changing the maximum
and minimum values can expand the search region.
Your optimization problem might have local minima. Consider running one of the search-based methods first to get closer to an acceptable solution.
Reduce the number of tuned parameters and compensator elements by removing from the design variables or from the Compensators pane (when using a SISO Design Task) those parameters that you know only mildly influence the optimized responses. After you identify reasonable values for the key parameters, add the fixed parameters back to the tunable list and restart the optimization using these reasonable values as initial guesses.
The software may have encountered errors during the optimization. Review the errors to determine if you can make changes to improve the optimization results. Changes may require modifications to the model, requirements, or optimization settings.
In the Response Optimization tool, the software creates
a structure named
EvalErrors in the Data area
when the optimization completes with errors. Export this structure
to the MATLAB® workspace and examine its contents at the command
EvalErrors has two fields,
containing the errors encountered during optimization and the corresponding
design variable values. To reproduce a specific error, use
sdo.setValueInModel to run the model using
the design variables that correspond to the error.
At the command line, the second output of
is a structure that provides information regarding the optimization.
the reason the optimization terminated. For more information regarding
exit flags, see Exit Flags and Exit Messages.
It might not be possible to achieve your specifications. Try relaxing the constraints or design requirements that the response signals violate the most. After you find an acceptable solution to the relaxed problem, tighten some constraints again and restart the optimization.
The optimization might have converged to a local minimum that is not a feasible solution. Restart the optimization from a different initial guess and/or use one of the search-based methods to identify another local minimum that satisfies the constraints.
In a Response Optimization tool, click Stop to interrupt the optimization when you think the current optimized response signals are acceptable.
When you use a SISO Design Task, click Stop Optimization in the Optimization panel of the Response Optimization node in the Control and Estimation Tools Manager, when you think the current optimized response signals are acceptable.
If you use the gradient descent method, try restarting the optimization. Restarting resets the Hessian estimate and might speed up convergence.
Increase the convergence tolerances in the Optimization Options dialog to force earlier termination.
Relax some of the constraints or design requirements to increase the size of the feasibility region.
While the optimization formulation has explicit safeguards against unstable or divergent response signals, the optimization can sometimes venture into an unstable region where simulation results become erratic and gradient methods fail to find a way back to the stable region. In these cases, you can try one of the following solutions:
Add or tighten the lower and upper bounds on compensator element and parameter values. Instability often occurs when you allow some parameter values to become too large.
Use a search-based method to find parameter values that stabilize the response signals and then start the gradient-based method using these initial values.
When optimizing responses in a SISO Design Task, you can try adding additional design requirements that achieve the same or similar goal. For example, in addition to a settling time design requirement on a step response plot, you could add a settling time design requirement on a root-locus plot that restricts the location of the real parts of the poles. By adding overlapping design requirements in this way, you can force the optimization to meet the requirements.