# Correction of Thermal Errors in Machine Tools by a Hybrid Model Approach
## 5 Structural Model  
The structural model is an essential component of the hybrid correction approach. It entails the responsibility to provide on-demand evaluations of the current load case to the decision algorithm for validity and accuracy checks. The structural model was built in MATLAB from a reduced CAD model and allows structure changes during simulation. Figure 11 provides an overview on the implementation process of the structural model, divided into five steps. The first step was to create a 3D CAD model of the machine and reduce the overall machine based on relative movements and static assembly parts. The demonstrator machine DMU 80 was reduced to six parts as illustrated in Figure 12. Once the machine was divided based on relative movements, it was necessary that each assembly part (AP) was meshed in ANSYS individually based on linear tetrahedral elements and shared topology. For external heat flow to another AP, conformity is not recommended for sliding interactions  
Figure 11: Structural model implementation. due to unsteady heat flow (e.g., all six parts as in Figure 12 should have non-conformity with respect to each other; therefore, specific moving contact scripts were produced). The second step involved preparing the model for export by performing individual exports for each AP. Ansys Parametric Design Language (APDL) scripts were used to export the geometrical and material parameters required for the processing of structural model blocks in MATLAB. Once all generated files were gathered, the process flow of the machine was implemented along with the control's data, experiment data, and process parameters onto the physical blocks in a structural model framework accordingly, which was basically parameterization and implementation (steps three and four). The structural model was generally a block diagram simulation (BDS) made of various blocks as defined in [47]. Each of these blocks defines a specific task to do, and steps three and four (Figure 11) mainly happen in this framework. A rough illustration of the used framework of the structural model to calculate thermal load for two assembly parts (AP1 and AP2) moving against each other with input load case data is shown in Figure 13.  
Figure 12: Machine assembly reduction based on relative movements. Figure 13: Framework of MOR-based structural model (code-based blocks in MATLAB). Table 2 highlights an outline of the key features exhibited by significant components of the structural model. Step five finally involves transitioning the structural model into Run Mode after ensuring the readiness of the parameters, blocks, functions, and data. Once the model is error-free, executable, and validated with the FE model on static boundary conditions, the machine controls data are incorporated. The load (control) data consist of current, position, speed (\(l\), \(x\), and \(v\)), and ambient temperature. Data tracing from the machine is performed at a sampling interval of 4 ms (\(t_{\text{data}}\)). Conventional methods for implementing relative movements between assemblies to generate position-dependent load profiles often involve detecting contact positions at each position change, which can be computationally intensive and slow for online correction. However, the presented approach eliminates the need for physical movement between assemblies altogether, providing a more efficient and faster alternative. The idea is to continuously collect data in a solver block at the given data sampling rate and average the collected data signals to calculate position-dependent loads through the pre-programmed moving contact scripts as concluded in [41]. Figure 14 shows a graphical representation of the mentioned approach. The moving contact scripts incorporate heat equations to calculate thermal loads accordingly with changing thermal conductions and are case-dependent based on active-passive AP movement. In FE simulation, segments are created, and a similar approach is used in structural modeling.