# Real-Time Feedback in Swimming Exercises Using Embedded Devices in Water
## 4 Discussion
The system was tested on a single subject; comprehensive testing involving individuals of varying ages, heights, and swimming skill levels will be addressed in future work. A related study utilizing this device, involving multiple tests and two subjects, is presented in \"Learning Swimming Techniques by Means of Real-Time Monitoring with Embedded Devices\" paper. In the presence of differences between movement patterns on land and in water, regarding the training phase, methods to optimize the system for better adaptation to these variations can be explored. This can improve the accuracy and reliability of the application in aquatic environments. The process can be implemented using machine learning algorithms. When employing edge computing, more expensive controllers are required to process results locally based on a stored database and newly acquired movement data. Alternatively, cloud computing can be utilized by sending information from the master node to a cloud-based AI agent during the voting phase. However, this approach may increase response time for the user in water, as latency becomes a significant issue. Verification of training movements from water samples can be performed individually using the Dynamic Time Warping (DTW) algorithm, rather than averaging all ten data series from the training phase. This approach enables evaluation of a movement during the voting phase against a comprehensive database of movements, although it will increase computation time. Future studies could explore this logical implementation and its impact on system performance. DTW was used primarily as a baseline approach for evaluating movement similarity. Further optimization may be achieved through parameter tuning, such as applying time constraints or adjusting pattern characteristics (based on different swimming strokes). Additionally, incorporating preliminary verification of the incoming data to decide whether a movement requires full DTW analysis could reduce CPU load on the controller. Integrating machine learning architectures has the potential to further enhance the accuracy of swimming movement recognition. Decision Trees or k-Nearest Neighbors classifiers can be employed for preliminary verification to efficiently determine whether full DTW analysis is necessary [34; 35; 36]. While it is not mandatory to record 10 iterations during training, since a single perfect repetition by the user can serve as the movement pattern, collecting multiple movements and computing their mean enhances the reliability and robustness of the movement template. This can be configured into an interface used with the master node in the future. Effective classification of swimming movements relies on accurately distinguishing genuine arm stroke deviations from confounding motion artifacts such as gyroscope drift and body-induced rotations (e.g., body roll and forward motion). These artifacts can obscure stroke-specific features essential for Dynamic Time Warping (DTW) analysis, reducing its robustness. To address this, a comprehensive signal preprocessing pipeline is employed, including drift correction via sensor fusion, reference frame alignment, high-pass filtering to suppress low-frequency and translational noise, segmentation based on motion events, movement onset detection, and feature normalization. These preprocessing steps--particularly sensor fusion, orientation compensation, and filtering--significantly improve data quality by minimizing external motion disturbances. Furthermore, this approach enhances the system's generalizability and lays the groundwork for handling previously untested edge cases, ultimately increasing the reliability and adaptability of stroke error identification in diverse real-world conditions. Conceptualization, V.-A.D.; methodology, S.F., I.-M.D. and R.S. ; software, V.-A.D.; validation, V.-A.D., R.S., I.-M.D. and S.F. ; formal analysis, I.-M.D. and S.F. ; investigation, V.-A.D. and R.S. ; resources, V.-A.D. and R.S. ; data curation, S.F.