# Additive Manufacturing for Sensors: Piezoresistive Strain Gauge with Temperature Compensation
## 4 Discussion  
Temperature highly affects the resistance of the FFF sensors, causing resistance variations up to 12 \(\Omega\)/\({}^{\circ}\)C. The temperature was not controlled during experiments to make it vary (reaching a range of 7.2 \({}^{\circ}\)C, with a maximum slope of 4.4 \({}^{\circ}\)C/h), thus analyzing a variation of properties due to temperature and finding a model to suitably describe this relationship. Covering the experimental set-up to reduce rapid temperature changes and provide uniform temperature conditions inside the test area allowed better results in terms of temperature compensation. In particular, using a dummy sensor as a reference for temperature compensation proved more effective than using temperature sensors since the dummy sensor exhibits the same response to temperature changes as the sensor under test. Moreover, we observed that slow and monotonous temperature variations led to enhanced temperature compensation, improving the accuracy of force estimation. In contrast, fast and sudden temperature variations (e.g., variation of the slope sign) reduced the compensation results. This is probably related to the dynamic behavior of the material, as well as to hysteresis when the slope of the temperature signal changes sign. Hence, the tests should be performed in conditions similar to the target application to obtain reproducible performance. It should be noted that a temperature increase may arise if the sensor is solicited with higher forces or elongations and with faster loading cycles. This is common behavior of many polymers, such as polyethylene [31], and has been studied, for bulk TPU, in [32], where higher stress and strain levels have been applied with respect to the ones considered in this paper. The best performance metrics (RMSE = 6.9% and \(r\) = 4.5% of the force range, and RMSE = 6.8% and \(r\) = 4.4% of the displacement range) are obtained when considering the first series of cycles of test D2 and excluding the first cycle: this generally improves results, since during the first cycle the sensor under test is in a settling phase. This is common behavior of polymer materials such as TPU and doped polymers such as PLA doped with CNT, which exhibit phenomena of viscoelasticity, a combination of permanent and recoverable changes, and the Mullins effect [33; 34]. Modeling these effects is difficult  
Figure 6: Applied force vs. displacement, considering the increasing traits of the 1 st series of cycles of test D2. For increasing cycle index, the force reduces for a given strain, and this gap is higher than the 1 st cycle, which is excluded from the analysis. Moreover, within each cycle, multiple force values are measured at the same displacement step due to the force settling time caused by the viscoelasticity of the TPU structure. Since strain changes in steps of 0.1 mm, the force between steps is linearly interpolated in the plot. since the results depend on time-varying stress and strain, on material fabrication, and the proposed sensor may also depend on the interaction between the TPU substrate and the conductive PLA. Calibration with respect to force and displacement led to similar results. For the first series of cycles of test D2 (which led to the best performance metrics), the following linear relationship was found between applied force and compensated resistance (3 rd and 2 nd-degree polynomials led to comparable results):  
\[F=f(R_{c})=a_{1}R_{c}+a_{2} \tag{3}\]  
where \(a_{1}=13.05\) g \(\Omega^{-1}\) and \(a_{2}=1.96\) g, and \(R_{c}\) is obtained as a function of \(R_{1}\) with a cubic relationship:  
\[R_{c}=R_{a}-\left(b_{1}R_{d}^{3}+b_{2}R_{d}^{2}+b_{3}R_{d}+b_{4}\right) \tag{4}\]  
where \(b_{1}=7.3941\cdot 10^{-5}\)\(\Omega^{-2}\), \(b_{2}=-0.5693\)\(\Omega^{-1}\), \(b_{3}=1461.6641\), and \(b_{4}=-129465.2842\)\(\Omega\). The metric \(r\) for Equation (4) is 4.5% of the range of the compensated resistance \(R_{c}\).