Design Sensitivity Analysis

The sensitivity of an output y(u) to an input u is defined as the change in y due to a unit change in u.

(1)
Δ y Δ u = ( y u )   +  higher order terms

The quantity ( y u ) is called the first order sensitivity of the quantity y to the input u.

Sensitivity analysis is the study of how the change or uncertainty in the output of a mathematical model or system (y) can be apportioned to different sources of change or uncertainty in its inputs (u).

For Design Sensitivity Analysis, the quantity u is not an input, but the design b. Here we are asking the question: For a given change in the design b, how does the response y change.

In a multibody simulation, the response y is typically a function of the system states x and x ˙ , and, perhaps, explicitly on the design b. The system states x consist of (a) Displacements, (b) Velocities, (c) Lagrange Multipliers (or constraint reaction forces), (d) User defined differential equations, (e) User defined algebraic equations originating from Variables and LSE/GSE/TFSISO outputs, and, (f) Internally created intermediate states that simplify computation. The system states, x (the system response), is implicitly dependent on b. Thus x = x ( b ) .

In mathematical terms: (2)
y = y ( x ( b ) , x ˙ ( b ) , b ) Δ y Δ b = ( y x ) x b + ( y x ˙ ) x ˙ b + y b  + higher order terms

The equations of motion provide an implicit relationship between (x and b) and (and (x, b)). The quantities x b x ˙ b  and  y b need to be computed first. Once these are known, the design sensitivity, Δ y Δ b , can be computed.

The calculation of Δ y Δ b is called DSA (Design Sensitivity Analysis) in MotionSolve. This is a new analysis method in MotionSolve. It always accompanies a regular analysis, such as static analysis, quasi-static analysis, kinematic analysis, dynamic analysis or linear analysis. The job of the regular analysis is to compute the states z, z ˙ and the outputs y for a given design b. Once these are known, the DSA analysis will compute the sensitivity, Δ y Δ b . When there are Ny responses and Nb design variables, [ Δ y Δ b ] is a matrix of dimension Ny x Nb.

There are three well-known methods for computing design sensitivity. These are briefly discussed below.

Finite Differencing

As the name implies, this approach uses finite differencing to compute Δ y Δ b . First, a change in b , Δ b is selected. Then the change in the output, Δ y Δ b is computed as shown below.(3)
Δ y Δ b     y ( x ( b + Δ b ) , x ˙ ( b + Δ b ) , b + Δ b ) y ( x ( b ) , x ˙ ( b ) , b ) Δ b

This is the approach used by HyperStudy, and it can only be used for small-scale design sensitivity analysis (usually 20-30 variables). For a system with Nb design variables, this approach requires ( N b + 1 ) simulations. One simulation is required to compute y ( x ( b ) , x ˙ ( b ) , b ) . Nb simulations are required to compute y ( x ( b + Δ b k ) , x ˙ ( b + Δ b k ) , b + Δ b k ) , k = 1... N b , in other words, once for each design variable.

The major issue with this approach is selecting the right Δ b k . If this is too small, the sensitivities get lost in the numerical error in the solution. If these are too large, the non-linearity of the solution is overlooked. The perturbation Δ b k is also dependent on the scale and units of the system. In summary, this approach is applicable only for small problems and there are some unresolvable issues about what the perturbations Δ b should be.

Direct Differentiation

In this approach, the equations of motion are analytically differentiated with respect to each design variable bi, i=1... Nb. At each point in time, after an analysis step is complete, Nb sets of DAE are solved numerically to yield the required values Δ y Δ b . This approach is quite robust and is used when the numbers of design variables Nb are not too large. As the number of design variables increase, the cost of the solution also increases.

Adjoint Approach

This is also an analytical approach where finite differencing is not used. The cost of this method, however, is proportional to the number of response variables in the model. The number of design variables does not govern the cost. This approach is quite robust and is used when the numbers of design variables Nb are large.

The example below illustrates how DSA may be performed using the MotionSolve Python Interface. The dsa="AUTO" setting will select the best approach based on the problem characteristics.
if __name__ == "__main__": 
m = sliding_block("lugre1")
m.simulate (type=" STATIC ", dsa="AUTO", end=4, dtout=.01)

m.lugre.mus=0.5
m.simulate (type="STATIC", dsa="AUTO", end=8, dtout=.01)
At this time, MotionSolve supports DSA only for Kinematic, Static and Quasi-static analyses.
Important: DSA is not supported for Dynamic or Linear analyses.

Note also, that in order to compute the sensitivities, MotionSolve needs to know what the design variables are, how the model is parameterized with these design variables and what the response variables are. DSA will yield correct answers only when the model is "designable". For non-designable models, it will return ZERO as the answer.