## 3 Frame Optimization Design
### Size Optimization  
#### 3.3.1 Sensitivity Analysis  
The sensitivity analysis of the frame involves examining the impact of changes in technical parameters on design variables. It is performed based on the optimization design approach. By conducting sensitivity analysis, we can determine the level of influence that design variables have on the design response, which helps in clarifying improvement plans. Sensitivity refers to the partial derivative of the design response with respect to a particular design variable. It represents the extent of change in the objective function when the design variable is altered, and the weight of the variable is obtained through this sensitivity. Design sensitivity, on the other hand, refers to the partial derivative of the design response with respect to optimization variables. For optimization problems with a large number of design variables and fewer constraints, such as topology optimization and topography optimization, the adjoint variable method can be used to calculate sensitivity. The adjoint variable method enables the simultaneous processing of multiple variables. When there are more design variables than responses, the adjoint variable method proves to be more efficient compared to other methods. This feature makes it particularly suitable for analyzing sensitivity issues in large structures [34]. In the following sections, the method will be described in detail.  
1. Solving the original finite element model: According to the geometric parameters and material parameters of the original finite element model, the numerical solution of the target physical quantity represented by the displacement field is obtained by solving the static, dynamic, or steady-state analysis problems. This numerical solution is used to solve the following adjoint problem;
2. Establish the motion balance equation: There is a relationship between the structural performance parameter g and displacement as follows: \[\mathbf{f}=\mathbf{K}\mathbf{u}\] (12) where \(\mathbf{K}\) represents the stiffness matrix and \(\mathbf{f}\) represents the load space vector of a unit node.
3. Lagrange equation: According to the Lagrange equation, the kinematic equation of the system is expressed as a differential equation of generalized coordinates and generalized velocities. The following formula is as follows: \[\mathrm{L}(\mathrm{X},\,\lambda)=\mathrm{f}(\mathrm{X})+\lambda\mathrm{h}( \mathrm{X})\] (13)  
Figure 15: Rear compartment model of the frame after topology optimization.  
where \(\lambda\) is the Lagrange multiplier, the structural design variable X, h(X) is the constraint function, and L(X, \(\lambda\)) is the Lagrange function.
4. Solving the adjoint problem: Suppose there is the following relationship between the structural performance parameter g and the displacement: \[\text{g}=\mathbf{q^{T}u}\] (14) where \(\mathbf{q}\) represents the adjoint displacement vector and \(\mathbf{u}\) represents the vector of the element displacement node.  
The sensitivity of the structural response to the structural design variable X is expressed as [35]:  
\[\frac{\partial\text{g}}{\partial\text{X}}=\frac{\partial\mathbf{q^{T}}}{ \partial\text{X}}\mathbf{u}+\frac{\partial\mathbf{u}}{\partial\text{X}} \mathbf{q^{T}} \tag{15}\]
5. Calculation of generalized displacement gradient: For the optimization problem with many design variables and few design tube bundles, the adjoint variable a is introduced to make \[\mathbf{q}=\mathbf{K}\mathbf{a}\] (16) From Equations (12) to (16), it can be concluded that: \[\frac{\partial\text{g}}{\partial\text{X}}=\frac{\partial\mathbf{q^{T}}}{ \partial\text{X}}\mathbf{u}+\mathbf{a^{T}}(\frac{\partial\mathbf{f}}{ \partial\text{X}}-\frac{\partial\text{K}}{\partial\text{X}}\mathbf{u})\] (17)