Main Content

Gradient Computations

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

dx=eps3×max(|x|,110xtypical)dL=max(xdx,xmin)dR=min(x+dx,xmax)FL=opt_fcn(dL)FR=opt_fcn(dR)dFdx=(FLFR)(dLdR)

  • 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.

See Also

Related Topics