## 7 Use Case 1: CNN for Damage Location Regression and Classification
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Nr.** & **1/Ax** & **RA** & **RB** & **RC** \\ \hline
1 & 1 & 0.5 & 3 & 7 \\
2 & 3 & 0.5 & 3 & 7 \\
3 & 5 & 0.5 & 3 & 7 \\
4 & 7 & 0.5 & 3 & 7 \\
5 & 10 & 0.5 & 3 & 7 \\
6 & 10 & 0.7 & 3 & 7 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Different discretization parameters chosen for the activation functions. ## 9 Discussion

The two use cases clearly showed the benefit of the proposed scaling approach and the simplicity of the VM programming for classification and regression models, including CNN architectures. The results can be summarized as follows:

1. The prediction error of the discretized model compared with the continuous model is comparable if there is no high non-linearity (use case 1) but significantly higher if there is a higher degree of non-linearity (use case 2). 2. Dynamic scaling compared to static scaling shows no significant improvement, only for very low default \(s_{0}\) scaling factors. 3. Model optimization with respect to the average classification or RMSE and peak regression errors is possible via the optimization of the non-linear piecewise-segmented and LUT-based activity functions (_sigmoid, tanh_). The optimization requires the modification of function approximation parameters, but these functions are statically built into the VM (as a service). 4. Even if the micro-controller provides an FPU, the VM should continue using 16-bit integer arithmetic to satisfy the still remaining hard memory limits. Moreover, the JIT run-time compiler translates text-to-byte-code in place. For instance, a constant value \"0\" can always be replaced by a binary 16 Bit container since tokens are separated by space or newline characters. A 32-bit engine using the FPU would make this

Figure 16: (**Top**) Analysis of the ANN FP and DS models comparing RMSE and E\({}_{\text{max}}\) values for different configurations of the activation function approximation, including an FPU replacement. (**Bottom**) Selected prediction results are shown with discontinuities in the top plot using ActDS configuration 5 and without using the FPU replacement for the tanh function. approach impossible, and the memory footprint would increase significantly (doubles at maximum). 5. The REXA VM implementation of the discretized models requires typical code sizes (including data) of about 1-20k Bytes, which can be transferred using (RFID) wireless communication. Even more complex models can be processed by a 16-bit VM with a code segment size limit of 32k Bytes. 6. The average computation times of models with the REXA VM range from 1 to 100 ms, which is fully sufficient even for ad-hoc remotely powered sensor nodes via RFID fields. ## 10 Conclusions

In previous work [6], we investigated the effect of ML model discretization in only classification tasks. This work investigated the effect of integer-scaled discretization for regression tasks with two use cases as well and presented the model transformation and scaling algorithms in detail. The first use case considers time-dependent ultrasonic signals as an input for a damage location regression model. The second use case uses synthetic data from a highly non-linear polynomial function to investigate the impact of discretization of the non-linear activation functions. Static (one scaling factor for the entire model) was surprisingly fully sufficient, and dynamic fine-grained scaling of different stages of the model does not improve the overall prediction accuracy of the model. The highest impact on the model accuracy is the discretization and step-wise approximation of non-linear (activation) functions. As an outlook, the model activation functions could be generated for a specific model at run-time by the VM based on parameters provided by the transformed model. However, the generation of the approximated functions requires floating-point versions of at least the _log_ and \(e\) functions, optimally by the floating-point version of the activation functions.