Accelerating the pace of engineering and science

# Documentation

For the Gradient descent (fmincon) optimization solver, the gradients are computed using numerical perturbation:

$\begin{array}{l}dx=\sqrt[3]{eps}×\mathrm{max}\left(|x|,\frac{1}{10}{x}_{typical}\right)\\ dL=\mathrm{max}\left(x-dx,{x}_{\mathrm{min}}\right)\\ dR=\mathrm{min}\left(x+dx,{x}_{\mathrm{max}}\right)\\ {F}_{L}=opt_fcn\left(dL\right)\\ {F}_{R}=opt_fcn\left(dR\right)\\ \frac{dF}{dx}=\frac{\left({F}_{L}-{F}_{R}\right)}{\left(dL-dR\right)}\\ \end{array}$

• x is a scalar design variable.

• xmin is the lower bound of x.

• xmax is the upper bound of x.

• xtypical is the scaled value of x.

• opt_fcn is the objective function.

dx is relatively large to accommodate simulation solver tolerances.

If you want to compute the gradients in any other way, you can do so in the cost function you write for performing design optimization programmatically. See sdo.optimize and GradFcn of sdo.OptimizeOptions for more information.