# Data-Driven and Machine-Learning-Based Real-Time Viscosity Measurement Using a Compliant Mechanism
## 3 Numerical Simulations and ML Models  
### Finite Element Analysis  
The mechanical structure with the complaint mechanism is operated using the vibration exciter at a forcing frequency of 210 Hz. To ensure better working of the viscosity measurement device, it is necessary to avoid inducing a resonant frequency in the mechanical structure around the exciter's forcing frequency. Therefore, a Finite Element Analysis (FEA) was performed to estimate the resonant frequency of the mechanical structure. An ADAMS View simulation was used to investigate the modal vibration characteristics of the compliant mechanism. A simple dynamic analysis with rotary joints and rigid links is not sufficient for the research presented in this paper due to the presence of flexible joints between the rigid links. Therefore, a modal vibration analysis with the CAD model, with the rigid links interconnected by flexible joints, was performed using the FEA approach. The objective of the FEA was to estimate the first resonant frequency of the mechanical structure with the compliant joints. To perform the FEA simulation, the CAD model of the complaint mechanism was imported from the Creo software (version 9.0 released in 2022). A few simplifications \begin{table}
\begin{tabular}{l l} \hline \hline
**Element** & **Parameters** \\ \hline \multirow{4}{*}{Vibration exciter} & Type: Micro-vibration motor \\  & Size: 10 mm diameter, 3.4 mm thickness \\  & Voltage and current: 3.3 V and 90 mAmp \\  & Peak harmonic force amplitude: 0.05 N \\  & Frequency: 210 Hz \\ \hline \multirow{2}{*}{Piezoelectric sensor} & Dimensions: 7 mm \(\times\) 2 mm \(\times\) 0.3 mm \\  & Material: PZT Piezoceramic, Grade: SP-8 \\ \hline Power supply & 5 V, 50 mAmp \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameters of the vibration exciter and the piezoelectric sensor. were used in the CAD model: suppression of the mounting holes in the top rigid link, absence of the micro-motor and piezoelectric sensor mass at the central rigid link. These simplifications were required to facilitate the conversion of the model into a neutral format, which, in this case, was the STEP format. In order to perform the vibration analysis, the CAD file was imported into ADAMS View software (Figure 4). After importing the CAD model into ADAMS View software (version 2022.1), the top rigid link was fixed in space. Additional markers were created at the central rigid link to facilitate placement of the equivalent masses of the vibration actuator and the vibration sensor. The equivalent point masses were defined for the micro-motor and the piezoelectric sensor at the central link, as shown in Figure 4. The View Flex module in ADAMS View software was used to convert the interconnecting joints between the rigid links into flexible geometries. View Flex enables transformation of joints from rigid parts into flexible bodies with finite elements so that a modal vibration analysis can be performed. This approach, with the use of the View Flex module, enables the creation of flexible joints in an efficient and streamlined manner. The following parameters were specified when transforming the joints into flexible geometries:  
Material properties of the structure with rigid links and flexible joints  
Number of modes to be evaluated: 1  
Element type at the flexible geometry: shell with tetrahedron shape  
Element size: 0.5 mm  
After defining the geometry with rigid and flexible links, the ADAMS Vibration module was used to perform the vibration analysis and determine the first resonant frequency. During the analysis, the harmonic force was applied at the vibration exciter within a test frequency range from 0 to 400 Hz. This frequency range facilitated the estimation of possible resonant frequency/frequencies around the operating frequency of the vibration exciter, which was 210 Hz. The vibration response at the location of the piezoelectric sensor was measured during the simulation, and the maximum vibration amplitude was plotted along the frequency range.