# The discrete adjoint method for parameter identification in multibody system dynamics

- 730 Downloads
- 1 Citations

## Abstract

The *adjoint method* is an elegant approach for the computation of the gradient of a cost function to identify a set of parameters. An additional set of differential equations has to be solved to compute the adjoint variables, which are further used for the gradient computation. However, the accuracy of the numerical solution of the adjoint differential equation has a great impact on the gradient. Hence, an alternative approach is the *discrete adjoint method*, where the adjoint differential equations are replaced by algebraic equations. Therefore, a finite difference scheme is constructed for the adjoint system directly from the numerical time integration method. The method provides the exact gradient of the discretized cost function subjected to the discretized equations of motion.

## Keywords

Adjoint method Discrete adjoint method Parameter identification## 1 Introduction

In the last few years the complexity of the multibody systems has grown tremendously. In particular, industrial simulations of large systems include a high number of bodies, resulting in a vast number of degrees of freedom. In general, the bodies are linked to the ground or to other bodies by formulating algebraic constraint equations.

Various authors formulate the parameter identification problem as an optimization task. Vyasarayani et al. [21] solve the underlying optimization problem using a combination of the Gauss–Newton and single shooting methods. Therein, homotopy continuation is used to find a global minimum of the cost function. The gradient is computed by the sensitivities, and the Hessian is only of first-order accuracy since second-order terms are neglected.

Serban et al. [19] also realized the parameter identification in multibody systems by minimizing a cost function by the Levenberg–Marquardt method. The derivatives that are required for the optimization are computed through sensitivity analysis. In addition, a local identifiability test is developed in this contribution.

Oberpeilsteiner et al. [15] designed an optimal input by maximizing the information content of the parameters to identify. The required Jacobian matrix are computed with the adjoint method, and the optimization is done with the gradient method. Finally, the optimal input is used for a parameter identification.

Apart from the previous described methods, the adjoint method is already used in a wide range of parameter identification problems in engineering sciences. Especially, in the field of multibody systems, the computation of the gradient of the cost function, as, for example, in (2), is often the bottleneck for computational efficiency, and the adjoint method serves as the most efficient strategy in this case. The basic idea of the adjoint method is the introduction of additional *adjoint* variables determined by a set of adjoint differential equations from which the gradient can be computed straightforwardly. This main idea directly corresponds to the gradient technique for trajectory optimization pioneered by Bryson and Ho [3]. There are two strategies for this purpose: the equations of motion of the multibody system and adjoint equations may either be separately discretized from their representations as differential-algebraic equations, or, alternatively, the equations of motion of the multibody system may be discretized first, whereas the discrete adjoint equations are derived directly from the discrete multibody system equations; for more details, see [3].

The piecewise adjoint method presented in [18] formulates the coordinate partitioning underlying ordinary differential equations as a boundary value problem, which is solved by multiple shooting methods. The sensitivity analysis for differential-algebraic and partial differential equations using adjoint methods has also been in the focus of the group around Petzold, Cao, Li, and Serban [16]. The adjoint method has been used for sensitivity analysis in multibody systems as well by Eberhard [4], presenting a continuous, hybrid form of automatic differentiation. In [20], the use of the adjoint method for solving dynamical inverse problems is described, but rather academic examples are discussed. A recent paper [11] shows how the adjoint method can be applied efficiently to a multibody system described by differential-algebraic equations of index three. It also presents the structure of the adjoint equations depending on the Jacobian matrices of the system equations. However, the numerical solution of the adjoint system presented in [11] raises several questions concerning stability and accuracy with respect to time discretization.

An alternative and more natural approach is the discrete adjoint method (DAM), which constructs a finite difference scheme for the adjoint system directly from the numerical procedure used to solve the equations of motion. The method delivers the exact gradient of the discretized cost function subjected to the discretized equations of motion. Instead of using automatic differentiation techniques [1], the Jacobian matrices can be determined analytically for multibody systems in a very simple structure if redundant generalized coordinates are used to describe the motion of the bodies. In [7] the discrete adjoint method is derived and applied for optimal control problems only, focusing especially on the description of the adjoint method for explicit and implicit solvers for optimal control applications, as well as the interpolation of the gradients and the Hessian (BFGS).

The current paper focuses on parameter identification of multibody systems. The discrete adjoint equations are derived for the computation of the gradient of the cost function using the HHT-solver [6, 13] for the solution of the system equations.

The advantage of the presented method is that the cost function may also depend on the accelerations if the discrete adjoint method is used. The reason is that the accelerations are included in the state vector of the HHT-solver. In contrast to the discrete adjoint method, in the continuous approach, the accelerations have to be expressed by the equations of motion, leading to a complex Jacobian matrix [12]. Practically speaking, the new approach allows us to use measured data from acceleration sensors in a straightforward manner as a reference trajectory in the cost function for the parameter identification.

## 2 Discrete adjoint method for implicit time integration methods

*adjoint variables*. Due to (3), \(\bar{J}\) and \(J\) are equal for any choice of the adjoints, and so the corresponding gradients with respect to the parameters to identify are also equal. We will further choose \(\mathbf{p}_{i}\) such that the gradient computation becomes as easy as possible. Hence, the variation of the cost function is given by

The gradient information can be used in various ways to find a set of parameters that minimizes the cost function. In the simplest form, the parameters are updated by walking in the direction of the negative gradient \(-\partial J/\partial\mathbf{u}\), that is, by setting \(\mathbf{u}^{\text{new}} = \mathbf{u}- \kappa ( \partial J/\partial\mathbf{u} ) \). If the number \(\kappa> 0\) is sufficiently small, then the updated set of parameters always reduces the cost function \(J\) (steepest-descent method).

It should be noted that the convergence of a quasi-Newton method is much better than the convergence of the steepest-descent method, especially near the optimum. Hence, it is recommended to use a quasi-Newton method where the Hessian is approximated from the gradient information, for example, with the BFGS formula. The Hessian could also be estimated from the first-order sensitivity matrix [19], but as the adjoint method circumvents its computation, this approach seems not appropriate in this context.

## 3 Application to the HHT solver

In this section the implicit iteration scheme (3) is specified for the HHT-solver, which is a widely used time integration method in multibody system dynamics. The Jacobian matrices required for the computation of the discrete adjoint variables, and further for the gradient computation, are derived in this section.

## 4 The discrete adjoints for a simple harmonic oscillator

_{4}is not required, and therefore the dimension of the Jacobian is reduced. Moreover, all terms related to the constraints equation \(\mathbf{C}(\mathbf{q}_{i}) = \mathbf{0}\) are zero. Hence, the Jacobian matrices (16) and (17) can be simply rewritten as

## 5 Example: engine mount

Parameters for numerical simulation

Parameter | Value | |
---|---|---|

\(m_{L}\) | 20 kg | |

\(m_{H}\) | 0.0019 kg | |

\(m_{M}\) | 0.002 kg | |

\(c_{H}\) | 375 N/mm | |

\(d_{H1}\) | \({0.8} \cdot10^{-4}~\mbox{Ns/mm}\) | |

\(c_{M}\) | 9 N/mm | |

\(d_{M}\) | 0.01 Ns/mm | |

| 95 mm | |

| 3.6 mm | |

| \(9.81~\mbox{m/s}^{2}\) | |

Par. to identify | Optimal value | Initial value |

\(d_{H2}\) | \(2 \cdot10^{-9}~\mbox{N}^{3}\,s^{3}/\mbox{mm}^{3}\) | \({1.2}\cdot10^{-9}~{\mbox{N}^{3}\,\mbox{s}^{3}/\mbox{mm}^{3}}\) |

\(c_{E1}\) | \(123~\mbox{N/mm}\) | \(73.8~\mbox{N/mm}\) |

\(c_{E2}\) | \(2.5~\mbox{N/mm}\) | \(4~\mbox{N}^{3}/\mbox{mm}^{3}\) |

\(d_{E}\) | \({5} \cdot10^{-3}~{\mbox{Ns/mm}}\) | \({5} \cdot 10^{-4}~\mbox{Ns/mm}\) |

## 6 Conclusion

In this paper, we show a new approach for the computation of the gradient of a cost function associated with a dynamical system for a parameter identification problem. We present the discrete adjoint method for an implicit discretization scheme and the required Jacobian matrices in detail for the HHT-solver as a representative of a widely used implicit solver in multibody dynamics. Note that the discrete adjoint system depends on the integration scheme of the system equations.

The presented method has two main advantages in comparison with the traditional adjoint method in the continuous case (see, e.g., [11, 20]): First, no separate solver is required to solve the adjoint differential algebraic system backward in time. The computation of the adjoint variables depends only on the recursive iteration scheme used to solve the system equations. Hence, only a system of algebraic equations has to be solved successively. The second advantage is that in combination with the HHT-solver, the cost function may also depend on the accelerations, if the discrete adjoint method is used. The reason is that the accelerations are included in the state vector of the solver method. Hence, the Jacobian matrices that are necessary for the discrete adjoint computations remain similar to the Jacobian matrices that are required for the HHT-solver. Otherwise, in the continuous case, the accelerations are not included in the state vector, but have to be expressed by the motion equations in the cost function, which lead to complex Jacobian matrices [12]. The straightforward and efficient considerations of the acceleration in the cost function have the advantage that the measured signals from acceleration sensors can be used directly for parameter identification in practice. Due to the simple use and low price of acceleration sensors, this strategy is a promising approach in the field of parameter identification.

The theory described in this paper is a powerful tool for parameter identification in time domain. In most cases the results lead to a best-fit solution, which means that high-frequency components with low amplitudes are not considered. However, the discrete adjoint method can also be used to identify parameters influencing the system at special frequencies. Hence, the basic idea is to compute the Fourier coefficients for the relevant oscillations and include the amplitude spectrum in the cost function. In [8] the parameters of a torsional vibration damper of a four-cylinder combustion engine are identified in combination with adjoint Fourier coefficient and the discrete adjoint method.

## Notes

### Acknowledgement

Open access funding provided by University of Applied Sciences Upper Austria. K. Nachbagauer acknowledges support from the Austrian Science Fund (FWF): T733-N30.

## References

- 1.Alexe, M., Sandu, A.: On the discrete adjoints of adaptive time stepping algorithms. J. Comput. Appl. Math.
**233**(4), 1005–1020 (2009) MathSciNetCrossRefzbMATHGoogle Scholar - 2.Amelunxen, H.: Fahrdynamikmodelle für Echtzeitsimulationen im komfortrelevanten Frequenzbereich. Ph.D. thesis, Universität Paderborn, Paderborn (2013) Google Scholar
- 3.Bryson, A.E., Ho, Y.C.: Applied Optimal Control. Hemisphere, Washington, DC (1975) Google Scholar
- 4.Eberhard, P.: Adjoint variable method for sensitivity analysis of multibody systems interpreted as a continuous, hybrid form of automatic differentiation. In: Proc. of the 2nd Int. Workshop on Computational Differentiation, Santa Fe, pp. 319–328. SIAM, Philadelphia (1996) Google Scholar
- 5.Gavrea, B., Negrut, D., Potra, F.A.: The Newmark integration method for simulation of multibody systems: analytical considerations. In: Design Engineering, Parts A and B, ASME International (2005) Google Scholar
- 6.Hilber, H., Hughes, T., Taylor, R.: Improved numerical dissipation for time integration algorithms in structural dynamics. Earthq. Eng. Struct. Dyn.
**5**(3), 283–292 (1977) CrossRefGoogle Scholar - 7.Lauß, T., Oberpeilsteiner, S., Steiner, W., Nachbagauer, K.: The discrete adjoint gradient computation for optimization problems in multibody dynamics. J. Comput. Nonlinear Dyn.
**12**(3), 031016 (2016) CrossRefGoogle Scholar - 8.Lauß, T., Oberpeilsteiner, S., Steiner, W., Nachbagauer, K., Reichl, S.: Parameter identification of a torsional vibration damper in frequency domain using adjoint Fourier coefficients. In: Proceedings of the ECCOMAS Thematic Conference Multibody Dynamics 2017, Prague, Czech Republic, 19–22 June 2017 (2017) Google Scholar
- 9.Mitschke, M., Wallentowitz, H.: Dynamik der Kraftfahrzeuge. Springer, Berlin (2014) CrossRefGoogle Scholar
- 10.Mrazek, T.: Modellierung nichtlinearer Elemente zur Schwingungsdämpfung in Mehrkörpersystmen. Ph.D. thesis, Johannes Kepler Universität, Linz (2005) Google Scholar
- 11.Nachbagauer, K., Oberpeilsteiner, S., Sherif, K., Steiner, W.: The use of the adjoint method for solving typical optimization problems in multibody dynamics. J. Comput. Nonlinear Dyn.
**10**(6), 061011 (2015) CrossRefGoogle Scholar - 12.Nachbagauer, K., Oberpeilsteiner, S., Steiner, S.: Enhancement of the adjoint method by error control of accelerations for parameter identification in multibody dynamics. Univ. J. Control Autom.
**3**(3), 47–52 (2015) CrossRefGoogle Scholar - 13.Negrut, D., Rampalli, R., Ottarsson, G., Sajdak, A.: On an implementation of the Hilber–Hughes–Taylor method in the context of index 3 differential-algebraic equations of multibody dynamics (DETC2005-85096). J. Comput. Nonlinear Dyn.
**2**(1), 73–85 (2007) CrossRefGoogle Scholar - 14.Newmark, N.: A method of computation for structural dynamics. J. Eng. Mech. Div.
**85**(3), 67–94 (1959) Google Scholar - 15.Oberpeilsteiner, S., Lauß, T., Nachbagauer, K., Steiner, W.: Optimal input design for multibody systems by using an extended adjoint approach. Multibody Syst. Dyn., 1–12 (2016) Google Scholar
- 16.Petzold, L., Li, S., Cao, Y., Serban, R.: Sensitivity analysis for differential-algebraic equations and partial differential equations. Comput. Chem. Eng.
**30**, 1553–1559 (2006) CrossRefGoogle Scholar - 17.Pfeffer, P., Hofer, K.: Einfaches nichtlineares Modell für Elastomer und Hydrolager zur Optimierung der Gesamtfahrzeug-Simulation. ATZ, Automobiltech. Z.
**104**(5), 442–451 (2002) CrossRefGoogle Scholar - 18.Schaffer, A.: On the adjoint formulation of design sensitivity analysis of multibody dynamics. Ph.D. thesis, University of Iowa (2005) Google Scholar
- 19.Serban, R., Freeman, J.: Identification and identifiability of unknown parameters in multibody dynamic systems. Multibody Syst. Dyn.
**5**(4), 335–350 (2001) CrossRefzbMATHGoogle Scholar - 20.Steiner, W., Reichl, S.: The optimal control approach to dynamical inverse problems. J. Dyn. Syst. Meas. Control
**134**(2), 021010 (2012) CrossRefGoogle Scholar - 21.Vyasarayani, C., Uchida, T., McPhee, J.: Nonlinear parameter identification in multibody systems using homotopy continuation. J. Comput. Nonlinear Dyn.
**7**(1), 011012 (2012) CrossRefGoogle Scholar

## Copyright information

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.