## 2 Topology Optimization for the Synthesis of Compliant Mechanisms
### Design Sensitivity Analysis via Adjoint Methodology  
In topology optimization, the problem is typically formulated with constraint aggregation so that the number of design variables is magnitudes greater than the sum of the number of objectives and constraints. Therefore, an adjoint sensitivity methodology has higher efficiency than direct sensitivity analysis. A thorough reference to sensitivity analysis within the framework of structural design optimization was put forth by [PERSON] and [PERSON] [48]. The adjoint equations, based on early works by [PERSON] [49], [PERSON] and [PERSON] [50], [PERSON] [51] and further elaborated upon by [PERSON] et al. [52], [PERSON] and [PERSON] [53], can be derived via Lagrangian multipliers. The Lagrangian multipliers are solved for by taking advantage of the derivatives of the function of interest with respect to the state variable. Below, we show the adjoint sensitivity analysis for an arbitrary functional \(f\) used in topology optimization with nonlinear finite-element analysis, which is needed for the specific functionals in the following sections. We define the general functional as  
\[f(\underline{u}(\underline{x}),\underline{x}) \tag{31}\]  
Figure 1: Example of displacement element and density elements for multiresolution topology optimization with four Gauss integration points. and its total sensitivity as  
\[\frac{\mathrm{d}f}{\mathrm{d}\underline{x}}=\frac{\partial f}{\partial\underline{x }}+\frac{\partial f}{\partial\underline{u}}\frac{\mathrm{d}\underline{u}}{ \mathrm{d}\underline{x}}. \tag{32}\]  
The adjoint sensitivity analysis based on the Lagrangian equation for a calculation at the \(k\)th iteration,  
\[\underline{x}(\underline{x},\underline{u}_{k},\lambda_{k})=f(\underline{x}, \underline{u}_{k}(\underline{x}))+\underline{\lambda}_{k}^{\mathsf{T}}R_{k}( \underline{u}_{k}(\underline{x}),\underline{x}), \tag{33}\]  
to which the functional is added to the vector of Lagrangian multipliers \(\underline{\lambda}\) multiplied by the vector of residuals \(\underline{R}_{k}\), which is equal to zero when perfectly converged. The total derivative is  
\[\frac{\mathrm{d}f}{\mathrm{d}\underline{x}}\equiv\frac{\mathrm{d}\underline{x }}{\mathrm{d}\underline{x}}=\frac{\partial f}{\partial\underline{x}}+\frac{ \partial f}{\partial\underline{u}_{k}}\frac{\mathrm{d}\underline{u}_{k}}{ \mathrm{d}\underline{x}}+\underline{\lambda}_{k}^{\mathsf{T}}\left(\frac{ \partial\underline{R}_{k}}{\partial\underline{x}}+\frac{\partial R_{k}}{ \partial\underline{u}_{k}}\frac{\mathrm{d}\underline{u}_{k}}{\mathrm{d} \underline{x}}\right). \tag{34}\]  
After substituting \(\frac{\partial\underline{R}_{k}}{\partial\underline{u}_{k}}=\underline{K}_{ \mathsf{T}}\) (see Equation (6)) and reorganizing to give  
\[\frac{\mathrm{d}f}{\mathrm{d}\underline{x}}=\frac{\partial f}{\partial \underline{x}}+\left(\frac{\partial f}{\partial\underline{u}_{k}}+\underline{ \lambda}_{k}^{\mathsf{T}}\underline{K}_{\mathsf{T},k}\right)\frac{\mathrm{d} \underline{u}_{k}}{\mathrm{d}\underline{x}}+\underline{\lambda}_{k}^{\mathsf{ T}}\frac{\partial\underline{R}_{k}}{\partial\underline{x}}, \tag{35}\]  
the Lagrangian multipliers \(\underline{\lambda}_{k}^{\mathsf{T}}\) are now chosen to eliminate the implicit sensitivity of the second term (and specifically \(\frac{\mathrm{d}\underline{u}_{k}}{\mathrm{d}\underline{x}}\)), by solving the so-called adjoint equation  
\[\underline{\lambda}_{k}^{\mathsf{T}}\underline{K}_{\mathsf{T},k}=-\frac{ \partial f}{\partial\underline{u}_{k}}, \tag{36}\]  
where \(\underline{K}_{\mathsf{T},k}\) can be extracted from the finite-element analysis so that we can solve for \(\underline{\lambda}\) if we have \(\frac{\partial f}{\partial\underline{u}_{k}}\).