# Additive Manufacturing for Sensors: Piezoresistive Strain Gauge with Temperature Compensation
## 3 Results
### D2: Displacement Profile of 12 Cycles (Range: 0.7 mm, 114 g)  
One hundred sixty-nine labels are identified through segmentation for test D2, composed of two series of 6 cycles following the strain profile of test D1 with a longer step duration and with a long pause of 60 min between the two series. The temperature range during the test was about 7.2 \({}^{\circ}\)C considering all cycles, 5.4 \({}^{\circ}\)C for the first six cycles, and 5.0 \({}^{\circ}\)C for the last six cycles, and \(R_{a}\) showed the highest correlation with \(R_{d}\) (Table 1). As in test D1, the correlation with the digital temperature sensors increases and reaches a value comparable to the dummy sensor due to the isolation provided by the plastic barrier. Three data elaborations are performed: (i) on the first series of cycles, (ii) on the second series of cycles, (iii) on both series of cycles. In all cases, the first cycle has been excluded from fitting to focus on compensation rather than viscoelasticity, as done in the previous test. Figure 5f shows the resistance \(R_{c}\) after temperature compensation is applied to the first series of cycles, the effect of temperature is mitigated, and the force/displacement is reconstructed (Figure 5g) by fitting a 1 st-degree polynomial since 3 rd- and 2 nd-degree polynomials led to comparable results. No significant differences are found when calibrating with respect to force than displacement, as can be observed in Figure 5g. When considering only one series, the performance metrics improve, particularly for the first series, where RMSE and \(r\) are lower than 6.9% and 4.6% of the considered range, respectively, when applying temperature compensation (Tables 2 and 3). This could be explained by observing Figure 5a, where the temperature change for the first series is monotonous, whereas it rapidly increases for the last two cycles of the second series. This indicates that when \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Trait** & **Metric** & **Test F1** & **Test D1** & & **Test D2** & \\ \hline  & & & & **1 st Series** & **2 nd Series** & **All Cycles** \\ \hline Increasing & RMSE & 13.5 & 7.9 & 6.3 & 11.9 & 12.5 \\  & \(r\) & 9.1 & 4.9 & 4.1 & 7.2 & 10.3 \\ Decreasing & RMSE & 11.8 & 7.3 & 5.6 & 8.1 & 13.6 \\  & \(r\) & 7.7 & 3.0 & 4.4 & 6.4 & 11.7 \\ Whole & RMSE & 13.1 & 9.8 & 6.8 & 12.0 & 13.7 \\ cycle & \(r\) & 9.0 & 4.6 & 4.4 & 8.1 & 11.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of results obtained for the three tests by applying the proposed temperature compensation approach based on dummy sensor resistance \(R_{d}\). Calibration is with respect to displacement. Values are expressed as a percentage of the range. temperature variation is slow and monotonous, its compensation is easier to be performed, and small force steps can be easily detected and measured with better accuracy. This behavior suggests that the performance of temperature compensation should be verified in conditions similar to the target application. Again, as observed in test D1, the force for a given displacement decreases as long as the test proceeds from cycle to cycle, which is clearly shown in Figure 6. It can be seen that the largest difference, of about 6 g, is between the first and the second cycle and becomes smaller subsequently. Hence, the first cycle has been discarded from calibration data. Moreover, during each step in which the displacement is held constant, it is observed that force can decrease up to 3 g. Within each cycle, multiple force values are measured at  
Figure 5: From top to bottom: (**a–d**) \(T_{2},\ R_{d},\ R_{d}\), and \(R_{d}\) detail vs. time; (**e**) \(R_{d}\) vs. \(R_{d}\), and performed fitting \(R_{a}=f(R_{d})\); (**f**) \(R_{c}\) vs. time (2 nd to 6 th cycle), force (**g**) and displacement (**h**) vs. time, after temperature compensation (true and estimated values are in blue and red, respectively). All data are referred to as test D2.