# Finite Differencing

As the name implies, this approach uses finite differencing to compute $\frac{\Delta y}{\Delta b}$

First, a change in $b$ , $\Delta b$ is selected. Then the change in the output $\frac{\Delta y}{\Delta b}$ is computed as shown below.(1)

This approach is quite labor intensive and is typically used only for small-scale design sensitivity analysis (~ 20 variables). For a system with Nb design variables, this approach requires $2\left({N}_{b}+1\right)$ simulations. Two simulations are needed to compute . Nb +1 simulations are needed to compute $,k=1...{N}_{b}$ . In other words, one for each design variable and one single simulation for the current design.

When finite differencing, MotionSolve provides parallel processing as an option to compute the sensitivity matrix $\left[\frac{\Delta y}{\Delta b}\right]$ . See the example below for more details on how to use the parallel approach.

The major challenge with finite differencing is selecting the right $\Delta b$ . If this is too small, the sensitivities get lost in the numerical error in the solution. If these are too large, the nonlinearity of the solution is overlooked. In both cases, the sensitivities can have significant error. The perturbation $\Delta b$ is also dependent on the scale and units of the system. In MotionSolve, $\Delta b$ is calculated by the following formula:(2)
$\Delta b=\text{Optimizer}\text{.fd_step}×\text{max}\left(1,b\right)$

This means you can change the perturbation step by providing different value to Optimizer.fd_step. In summary, finite differencing is applicable only for small problems and there are some hard-to-solve issues regarding what the perturbations $\Delta b$ should be.