scieee AI-readable full text Open interactive document viewer

Proactive prevention of work-related musculoskeletal disorders using a motion capture system and time series machine learning

Matos, Luís Miguel; Dias, Paula; Matta, Arthur; Machado, Dário; Sampaio, Rosane; Pilastri, André; Cortez, Paulo

Abstract

In this paper, we propose a proactive method to prevent Work-related MusculoSkeletal Disorders (WMSDs) in manufacturing industries. The integrated method includes a Motion Capture System (MCS) for data collection, a Time Series Forecasting (TSF) module using Machine Learning (ML) algorithms, a WMSD risk assessment module based on ergonomic standards, and a safety mechanism (e.g., alarm sound). We evaluated the method by analyzing shoulder abduction, rotation, and flexion movements of 12 participants working with textile machines. The computational experiments included a comparison of four ML algorithms and a baseline Naive method using a 12-fold participant cross-validation approach. Overall, the best Ahead-of-Time (AoT) TSF and WMSD risk detection empirical results were obtained by a Support Vector Machine (SVM), which required a reasonable training computational effort and provides an interesting performance for AoT TSF and high risk WMSD detection.

Full text

Contents lists available at ScienceDirect Engineering Applications of Artificial Intelligence journal homepage: www.elsevier.com/locate/engappai Proactive prevention of work-related musculoskeletal disorders using a motion capture system and time series machine learning Luís Miguel Matos c, Paula Diasa, Arthur Mattaa, Dário Machadob, Rosane Sampaiob, André Pilastria, Paulo Cortezc,a,∗ aEPMQ – IT Engineering Maturity and Quality Lab, CCG ZGDV Institute, Campus de Azurém, Guimarães, 4804-533, Braga, Portugal bHTIR – Human-Technology Interaction and Robotics Lab, CCG ZGDV Institute, Campus de Azurém, Guimarães, 4804-533, Braga, Portugal cALGORITMI/LASI Center – Dep. Information Systems, University of Minho, Campus de Azurém, Guimarães, 4804-533, Braga, Portugal ARTICLE INFO Keywords: Time series forecasting Work-related musculoSkeletal disorders Machine learning ABSTRACT In this paper, we propose a proactive method to prevent Work-related MusculoSkeletal Disorders (WMSDs) in manufacturing industries. The integrated method includes a Motion Capture System (MCS) for data collection, a Time Series Forecasting (TSF) module using Machine Learning (ML) algorithms, a WMSD risk assessment module based on ergonomic standards, and a safety mechanism (e.g., alarm sound). We evaluated the method by analyzing shoulder abduction, rotation, and flexion movements of 12 participants working with textile machines. The computational experiments included a comparison of four ML algorithms and a baseline Naive method using a 12-fold participant cross-validation approach. Overall, the best Ahead-of-Time (AoT) TSF and WMSD risk detection empirical results were obtained by a Support Vector Machine (SVM), which required a reasonable training computational effort and provides an interesting performance for AoT TSF and high risk WMSD detection. 1. Introduction In several manufacturing industries, including the textile and garment sectors, the production process often involves collaboration between human operators and machines. Under this context, industrial workers often execute repetitive movements that can increase the risk of developing Work-related MusculoSkeletal Disorders (WMSDs) (Lind et al.,2023). WMSDs pose a significant threat to the health and safety of the workers, as well as impacting productivity and product quality, also causing absenteeism and early retirement (Kok et al.,2019;Kumar, 2001). As shown in Section 2, there has been a growing interest in using Machine Learning (ML) to forecast human high risk movements in diverse contexts (e.g., ergonomics (Fernandes et al.,2022), robotics (Dey and Schilling,2023), posture (Li et al.,2023)). There are several related works that use a Motion Capture System (MCS), such as based on Optoelectronic Measurement Systems (OMS) or Inertial Measurement Units (IMU), to capture relevant human movement data attributes. Using this type of MCS data, several works have adopted ML to recognize human movements in different application domains, such as health (Ameli et al.,2017), biometrics (Liao et al.,2020) and sports (Mundt et al., 2021). ∗Corresponding author. E-mail address: [email protected] (P. Cortez). In this paper, we target an important and scarcely studied human movement domain: WMSD risk in industrial environments. In particular, we analyze recently MCS collected data related with the upper limbs of twelve workers from a textile industry and three types of high risk movements (abduction, rotation and flexion). Each angular value is recorded every 0.1 s. Thus, the analyzed time series are quite large, presenting a length that ranges from 17 to 20 thousand values. The proposed proactive WMSD risk prevention method assumes two sequential modules: a Time Series Forecasting (TSF) component, that receives MCS angular time series data, trains a supervised Machine Learning (ML) model and then predicts several Ahead-of-Time (AoT) movements; and a WMSD alarm component, that combines historical data with AoT forecasts and then classifies a WMSD movement risk based on a set of rules, such as defined by the International Organization for Standardization (ISO) regulations. The usage of the two separate but sequential modules provides two main advantages. Firstly, it provides two interesting outputs: predictions of the worker movements and classification of an WMSD risk. Secondly, it is a more flexible method in terms of its development maintenance, since any of the two modules can be changed in an independent way, without requiring any other module changes. In particular, using the same forecasts, different sets of WMSD rules can be triggered (e.g., for high or medium risk). As for https://doi.org/10.1016/j.engappai.2024.109353 Received 24 July 2023; Received in revised form 26 August 2024; Accepted 16 September 2024 Engineering Applications of Articial Intelligence 138 (2024) 109353 Available online 25 September 2024 0952-1976/© 2024 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY license ( http://creativecommons.org/licenses/by/4.0/ ). L.M. Matos et al. Table 1 Summary of the related work. Study AoT 𝑁𝑝𝑎𝑟𝑡 Body part Context Field ML algorithm Measure ML task Mod. MCS Ameli et al. (2017)✗4 Full body PPS tool for quantitative measurement of fatigue Health MML,GMM EM Reg. ✗IMU Yan et al. (2017)✗1 Back limb Real-time WMSD warning equipment Industry ✗ ✗ ✗ ✗ IMU Lee et al. (2020)✗39 Lower limbs Evaluate squat exercises Sports CNN,LSTM,RF ACC BC ✗IMU Hua et al. (2020)✗50 Upper limbs Effective exercise programs Sports K-NN,DT, RF,SVM,MLP ACC,RC,F1 MC ✗IMU Liao et al. (2020)✗1138 Full Body Gait recognition method Biometrics VTM,GP+CCA, C3A,GEI+PCA, GG RR MC ✗DVC Mundt et al. (2021)✗116 Lower limbs Angular joint prediction Sports MLP,CNN,LSTM RMSE Reg. ✗IMU Santos et al. (2021)✗6 Dominant upper limb Prevent WMSD Industry SSM ACC BC ✓IMU Dey and Schilling (2023)✓7 Foot Position and trajectory planning Robotics; Health TCN R2; NRMSE Reg. ✗IMU Fernandes et al. (2022)✓10 Arm movements Prevent WMSD Industry MLR,RF, SVM,LSTM R2,RMSE,MAE,MSE TS,BC ✓IMU This work ✓12 Left upper limbs Prevent WMSD Industry SVM,XG, LSTM,MLP F1,MCC,MSSE TS,BC ✓OMS Legend: ACC – Accuracy; BC – Binary Classification; CNN – Convolutional neural network; DT – Decision Tree; DVC – Digital Video Camera; EM – Expectation Maximization; F1 – F1-Score; GEI – Gait Energy Image; GG – Gait Generative Adversarial Network; GMM – Gaussian Mixture Model; IMU – Inertial Measurement Unit; K-NN – k-Nearest-Neighbors; LSTM – Long-Short Term Memory; MAE – Mean Absolute Error; MAPE – Mean Absolute Percentage Error; MC – Multi-class classification; MCC – Matthews correlation coefficient; MLP – Multilayer Perceptrons; MML – Minimum Message Length encoding; MSE – Mean Squared Error; NB – Naive Bayes; NDCG – Normalized Discounted Cumulative Gain; NMAE – Normalized Mean Absolute Error; NRMSE – Normalized Root Mean Squared Error; OMS – Optoelectronic Measurement System; PCA – Principal component analysis; PPS – Physical Performance Status; RC – Recall; Reg. – Regression; RF – Random Forest; RMSE – Root Mean Squared Error; SSM – Self-Similarity Matrix; SVM – Support Vector Machines; TS – Time Series; TCN – Temporal Convolutional Network; VTM – View Transformation Model; XG – XGboost. the proactive behavior, it is a natural result of the computation of ML AoT forecasts, allowing the WMSD risk to be detected several time steps in advance. The proposed WMSD prevention method is inserted within a larger R&D project that aims to create a textile worker exoskeleton, which will use the AoT WMSD risk predictions to activate mechanical actuators, thus preventing worker injuries. In terms of ML, we adapt and compare four distinct algorithms that require a reasonable computational effort for the analyzed large datasets: Support Vector Machine (SVM), a Multilayer Perceptron (MLP), eXtreme Gradient boosting (XG) and a deep Long Short-Term Memory (LSTM) neural network. For baseline comparison purposes, we adopt the Naive random-walk TSF method, which predicts all future movements as the last known value. The empirical comparison assumes a robust participant cross-validation, requiring several iterations in which all data from one participant is used as the test set. Moreover, the result analysis includes both TSF and WMSD risk measures for different AoT values (from 0.1 s to 4.0 s). The paper is structured as follows. Section 2describes the related work. Section 3presents the collected data, the proposed proactive method and the evaluation methodology. Then, Section 4analyzes the obtained results. Lastly, the main conclusions are discussed in Section 5. 2. Related work The related works that use MCS data are summarized in Table 1, which assumes a chronological order. Each research study is characterized in terms of: if an Ahead of Time (AoT) prediction or detection was addressed; the number of human participants used in the empirical study (𝑁𝑝𝑎𝑟𝑡); the Body Part that was addressed; the application domain Context of the study; the application Field (e.g., Health, Sports); the Machine Learning (ML) algorithms (ML alg.) used; the Measures used to evaluate the models; the ML task (e.g., binary classification, regression); if the proposed system is Modular (Mod.), meaning that it separates the movement forecasts from the movement risk assessment; and the type of MCS adopted. The related works analysis is firstly performed by considering the first 8 works from Table 1, which were executed by other authors. Then, we explain the differences between this (last row of the table) and our previous work (Fernandes et al.,2022). Most of the 8 state-of-the-art studies do not perform an AoT movement detection, which is valuable to execute proactive actions, such as issuing an alarm prior to a high risk movement. In effect, as also shown in the survey of Liu et al. (2023), most research works that consider MCS only detect human actions when they occur (e.g., human fall). From the related works shown in Table 1, only Dey and Schilling (Dey and Schilling,2023) have performed an AoT focused on predicting the gait variables, aimed to proactively control a prosthetic feet with a look-back of 15 ms and AoT forecasts of 10 ms. Our work presents an AoT approach to detect and forecast upper limb WMSDs for textile workers. When compared with Dey and Schilling (2023), we consider a substantially larger (thus more difficult to predict) AoT range that goes up to 4 s in advance, using a look-back window of 4 s. Regarding the type of MCS adopted, almost all related works use IMUs. The exception is the study of Liao et al. (2020), which uses a two-dimensional Digital Video Camera (DVC) recording, extracting estimated three-dimensional motion features by using the OpenPose software.1In this research, we use a passive marker OMS, namely the Vicon system (see Section 3.1). When compared with other MCS approaches (IMU, DVC), OMS are much more precise, being considered the gold standard in motion capture (Corazza et al.,2010). We highlight that in our research, the textile workers perform complex 1https://github.com/CMU-Perceptual-Computing-Lab/openpose. Engineering Applications of Articial Intelligence 138 (2024) 109353 2 L.M. Matos et al. three-dimensional upper limb movements (particularly when concerning rotation), thus the high precision provided by the adopted OMS is highly valuable for our AoT analysis. Furthermore, only two studies presented computational systems that attempt to detect WMSDs in a industrial environment, which is targeted by our research. This is an important issue, since MCS data is more difficult to collect in industrial environments, due to lack of volunteers, restricted shop floor space or presence of magnetic machines that can affect some MCS (such as IMUs but not the adopted Vicon OMS) when compared with other application sectors, such as sports. In effect, few human participants were used by the related industrial WMSD works. Yan et al. (2017) only collected data from one human participant, while Santos et al. (2021) recorded movements from 6 workers. In contrast, in this work we managed to collect movement data from a larger number of participants, namely all 12 workers from the analyzed textile company. Moreover, Yan et al. (2017) did not use any ML algorithm. Instead, they developed a rigid mathematical formula to assess the risk of individuals developing WMSDs. As for Santos et al. (2021), the authors only employed one ML algorithm, a Self-Similarity Matrix (SSM). In this work, we explore and compare 4 distinct supervised ML algorithms. Moreover, we employ a novel modular approach, in which we separate the movement forecasts (using a TSF ML modeling) from the WMSD risk assessment (based on standard rules). Regarding our previous work (Fernandes et al.,2022), it is related with a preliminary research study that used a public domain dataset collected in a laboratory environment related with human participants that mimicked short working movements (around 70 s) related with an automotive industry. Moreover, the previous work only considered a single IMU placed on the right arm, in order to model one movement (shoulder abduction). Also, risk was assessed by considering a simple real-time rule (risk if the angle was higher than 60 degrees). In contrast, in this research, we analyze private data measured from twelve workers inserted in a real textile industrial environment. Each worker had several optoelectronic markers (used by the Vicon MCS) placed on the left upper limbs (as exemplified in Section 3.2). The digital recording was executed during some portions of a single working day. For each working movement, angular data was obtained every 0.1 s and it was recorded during a larger time period (around half an hour) when compared with Fernandes et al. (2022), thus producing larger datasets, with around 20 thousand values. In this paper, we also model more movements (abduction, rotation and flexion) and employ a richer set of WMSD risk rules, which require a sliding time window of body part movements. Finally, the WMSD risk analysis performed in Fernandes et al. (2022) was limited to just three high risk periods, while in this work we consider the full MCS collected data for a single participant. 3. Materials and methods 3.1. Proposed method The proposed proactive detection method is shown in Fig. 1. It includes several components: a MCS, an angular storage database and two sequential detection modules (TSF and WMSD detection). While several MCS could be used (e.g., IMU), in this research we adopt the popular Vicon2OMS for the MCS, due to its high precision to capture complex three-dimensional movements (as explained in Section 2). This MCS was used to capture data in a digital form on the rotation, abduction and flexion of the worker left upper limbs (as detailed in Section 3.2). The collected MCS data is directly given as Euler angles, stored in a database and sent to the TSF module. Then, the produced AoT forecasts are combined with historical movement data, in order to feed the WMSD rule, which triggers a risk based on standard rules. 2https://www.vicon.com/. As shown in Fig. 1, via a graphical interface, the WMSD decision maker can visualize both AoT forecasts and risk labels. Moreover, the AoT WMSD risk labels can be sent in real-time to a safety mechanism (e.g., alarm sound, mechanical actuator). As explained in Section 1, the sequential usage of two independent modules, one specialized in the TSF and the other in the WMSD rule risk activation, provides two types of insights for the user: AoT forecasts and WMSD risk labels. Moreover, it allows a more flexible deployment update of the overall method. For instance, a new ML algorithm could be added to the TSF module without requiring any WMSD module changes. Also, different ISO rules, for high or medium risk, could be applied in the WMSD module and the rules could easily be updated when newer ISO standards are proposed. 3.2. Industrial worker data In this work, we use private data, collected using a Vicon MCS installed in an industrial textile environment. In particular, we analyze the movement of the left upper limb of twelve participants working in four machines: flatlock, Cut-Sew, Lockstitch and Tapping. Three relevant WMSD high risk movements are targeted, regarding abnormal angular actions of the left shoulder’s abduction, rotation and flexion. The Vicon MCS uses infrared light digital cameras to track the movement of optoelectronic markers attached to an object or person. The cameras take images of the markers at a high rate (e.g., 120 frames per second). Then, the Vicon software is used to process the images and track three-dimensional positions of the markers in each frame. The main advantage of the optoelectrical system is the high precision in capturing tridimensional movements, although it is necessary to provide a controlled environment within the testing area. In particular, we used five strategically spread Vicon cameras that allow a full 360 degree upper limb movement capturing, which diminishes occlusion problems. In some cases the metallic reflections from the textile machines would occlude the Vicon markers and, therefore, it was necessary to cover some machine metallic areas with a non reflective tape (as recommended by the Vicon solution). Finally, the few remaining occlusion errors were solved by pre-processing the collected data using the Nexus3movement analysis software. Fig. 2 presents an example of the data collection process on a textile workers using different textile machines. The angular data was collected for twelve participants and three types of movements, thus resulting in 36 different time series. Before collecting the data, the human participants signed informed consent forms. Moreover, the collected data that was used for this research only included raw positioning data and it did not include any sensitive data attributes that would allow an identification of the worker. Repetitive work activities are a high risk factor for WMSDs. In particular, there is s strong link between biomechanical actions (e.g., as produced by physical therapists, janitorial or textile workers) and WMSDs to the upper extremities (Kumar,2001;Liu et al.,2022). Thus, in the analyzed industrial textile environment, analyzing rotation, abduction, and flexion movements of upper-limb angles is critical for preventing risk in textile workers, which tend to produce repetitive muscular arm movements (e.g., keeping the arms raised for prolonged periods), thus potentially leading to WMSDs due to excessive fatigue. The rotation (exemplified in Fig. 3) of a person can be applied in a textile working environment in various ways. For instance, a person may rotate their body to access different areas of the fabric they are working on. This could involve rotating their arms, torso, or entire body to reach a particular section of the fabric, especially when working on larger pieces of material. In addition, a person may need to rotate their body while operating a textile machine or tool, such as a loom or sewing machine. For example, a seamstress may rotate their body slightly to adjust the angle of their needle or to better guide the fabric through the machine. 3https://www.vicon.com/software/nexus/. Engineering Applications of Articial Intelligence 138 (2024) 109353 3 L.M. Matos et al. Fig. 1. Schematic of the proposed proactive WMSD detection method. Fig. 2. Vicon system applied to textile workers on their working posts. Fig. 3. Rotation angular movement time series for one textile worker. The red colored dots signal angular sequences associated with a high WMSD risk when adopting the rules of Table 2. Engineering Applications of Articial Intelligence 138 (2024) 109353 4 L.M. Matos et al. Fig. 4. Abduction and flexion angular movement time series for one textile worker. An example of an abduction movement is shown in the left of Fig. 4. This movement is related to human parts that get further away from the middle of the body. In a textile working environment, abduction occurs when a person needs to work on the side of the fabric or machine that is away from their body. For example, a seamstress may need to abduct their arm away from their body to reach the opposite side of a large piece of fabric while sewing. Alternatively, a person may need to abduct their leg while standing on one foot to adjust a textile machine or tool. The flexion movement is shown in the right of Fig. 4. It refers to the movement of a body part towards the center of the body or towards another joint. Flexion can occur in a textile industrial setting when a person needs to reach a lower or more forward position while working on the fabric or machine. For example, a seamstress may need to flex their elbow and wrist while sewing to reach a lower section of the fabric, or to adjust the position of the sewing machine. Similarly, a textile worker may need to flex their knees and hips while standing or sitting to adjust their position relative to the textile machine or tool. 3.3. TSF module The TSF module receives an angular time series related with a particular movement (abduction, rotation or flexion) from several human participants, which corresponds to the training data. Then, a ML algorithm is applied, allowing to create a TSF model. Once the model is created, and when needed, several AoT (or multi-step ahead) forecasts are executed, feeding the WMSD risk detection module. In this work, we adapt and compare four distinct ML models, namely: SVM, XG, MLP and a deep LSTM. These particular four ML algorithms were selected due to two main reasons. Firstly, they are capable of a flexible nonlinear learning, with several of these algorithms obtaining better TSF results when compared with conventional TSF methods (e.g., ARIMA) (Cortez and Donate,2014). Secondly, they require a reasonable computational effort when modeling our large time series datasets. For example, in preliminary results we explored a deep Temporal Convolutional Neural Network (TCNN) (Dudukcu et al.,2023), but the computational cost to generate a TSF was prohibitive when using our computational resources, namely an Intel Xeon 1.70 GHz server with 56 cores and 2 TB of disk space. For example, more than 9 h of training time were required by the TCNN to train a single time series. In contrast, the adopted SVM model required a training time of just 1.6 min when trained with all eleven time series (as required by the cross-validation external evaluation procedure, see Table 5). All algorithms were implemented using the Python programming language, using the scikit-learn (SVM, XG and MLP) and Tensorflow (LSTM) modules. All ML computational experiments adopted when possible the default scikit-learn and Tensorflow hyperparameter values due to two main reasons. Firstly, it allows a fair comparison, as the experimentation is not biased towards a particular ML algorithm. Secondly, it allows to reduce the computational effort. We note that the ML models are fit using multiple person training time series, each including from 17 to 20 thousand observations. Let 𝜃𝑖,𝑡 = (𝑦𝑖,1, 𝑦𝑖,2,…, 𝑦𝑖,𝑚)denote a univariate time series of angular observations for the 𝑖th worker, each recorded at a specific time 𝑡∈ {1,…, 𝑚}. In our datasets, the observations are generated every 0.1 s and there are twelve human participants (𝑖∈ {1,2,…,12}). A TSF model is fit by using several participant time series 𝑖∈𝐼, where 𝐼 denotes a subset of angular time series. Under the adopted participantfold cross-validation, 𝐼has always a length of eleven, i.e., all time series except one are used to train . As a preprocessing stage, all training time series are first transformed into tabular supervised datasets by adopting the popular sliding window scheme (Cortez and Donate,2014). The tabular data includes up to 𝐾sequential lagged inputs from several workers. For a particular participant 𝑖, the goal is to model: 𝑦𝑖,𝑇 +ℎ=𝑓tsf(𝐴, 𝑦𝑖,𝑇 , 𝑦𝑖,𝑇 −1,…, 𝑦𝑖,𝑇 −𝐾+1)(1) where 𝑇denotes the current time, ℎ∈ {1,2,…, 𝐻}represents the AoT time or multi-step ahead value, up to a maximum forecasting horizon of 𝐻,𝑦𝑖,𝑇 +ℎis the predicted value for participant 𝑖and time 𝑇+ℎ, and 𝑓tsf is the TSF learning function of that is implicit in the training data. It should be noted that the recurrent LSTM model directly computes several AoT forecasts, as defined in Eq. (1). However, the non recurrent ML algorithms (SVM, XG and MLP) generate only 1-step ahead predictions, thus the exact computed function is: 𝑦𝑖,𝑇 +1 =𝑓(𝑦𝑖,𝑇 , 𝑦𝑖,𝑇 −1,…, 𝑦𝑖,𝑇 −𝐾+1)(2) Nevertheless, multi-step ahead (AoT) forecasts can easily be achieved for these supervised learning methods by iteratively using the previous obtained 1-ahead predictions as the next lagged inputs (Cortez and Donate,2014). The SVM model assumes the popular 𝜖–insensitive loss function and Gaussian kernel in order to perform regression tasks (Cortez and Donate,2014). The default adopted SVM hyperparameters are 𝜎= 3.0, 𝐶= 1.0and 𝜖= 0.1(Fernandes et al.,2014). XG is a recently proposed ensemble tree algorithm that has obtained quality results in a variety of predictive modeling tasks (Chen and Guestrin,2016). The adopted XG default values include an ensemble with 100 trees and a Mean Squared Error (MSE) loss function. The adopted MLP corresponds to a standard neural network model for regression (Hastie et al.,2009). The MLP includes one hidden layer with 100 nodes, all assuming the tanh activation function, and one output layer with one node that computes the linear function. The MLP is trained with the LBFGS algorithm (Malouf,2002) assuming the MSE loss function. Engineering Applications of Articial Intelligence 138 (2024) 109353 5 L.M. Matos et al. Table 2 Adopted ground truth WMSD RULA and ISO 11226 high risk rules. Event Flexion Duration (s) Abduction Duration (s) Rotation Duration (s) High risk 𝜃𝑖,𝑡 >40◦4𝜃𝑖,𝑡 >40◦4|𝜃𝑖,𝑡|>15◦4 Finally, for the LSTM model we adopted the Seq2Seq architecture described in Fernandes et al. (2022). This architecture comprises an encoder–decoder design, consisting of one model for reading and encoding the input sequence, and a second model for decoding and generating predictions. This approach is commonly used in the field of sequence-to-sequence modeling (Kang et al.,2022). Similarly to the other TSF models, the LSTM has a total of 𝐾lagged inputs. The learning model includes two LSTM layers (each with 𝐿=100 nodes), one repeat vector layer which repeats the incoming inputs for up to 𝐾times, and one time distributed layer, to process the output from the LSTM hidden layer and generate up to 𝐻sequential output values. 3.4. WMSD module The WMSD detection module uses a set of rules to associate a binary risk label 𝑅𝑖,𝑡 ∈{‘‘normal’’, ‘‘risk’’} for participant 𝑖at time 𝑡. Typically, WMSD is measured by considering a sequence of 𝑃past angular observations 𝜃𝑖,𝑡 = (𝑦𝑖,𝑇 , 𝑦𝑖,𝑇 −1,…, 𝑦𝑖,𝑇 −𝑃+1)related with a human part movement, such that: 𝑅𝑖,𝑇 =𝑓risk(𝑦𝑖,𝑇 , 𝑦𝑖,𝑇 −1,…, 𝑦𝑖,𝑇 −𝑃+1)(3) where 𝑓risk is the risk function computed by the set of WMSD rules and 𝑅𝑖,𝑇 denotes the WMSD risk for time 𝑇and the 𝑖th human participant. In this work, the risk parameters were proposed on the basis of the Rapid Upper Limb Assessment (RULA) (McAtamney and Corlett,1993) method and the ISO 112264standards. As a method for analyzing and defining risks, RULA is a powerful tool for assessing postural risks, making it possible to identify high risk postures and the need for ergonomic interventions. Studies have consistently used RULA in several sectors (Shaikh et al.,2003;Gholami et al.,2014;Ryu et al.,2021; Maurer-Grubinger et al.,2021), including sewing workers (Öztürk and Esin,2011;Dianat et al.,2015;Gahlot et al.,2016;Jadhav et al., 2019;Traumann et al.,2020). In addition, in research assessing the ergonomic impact of exoskeletons on workers, RULA has been a frequently used and recognized tool (Gillette and Stephenson,2019;Dahmen and Constantinescu,2020;Peláez et al.,2021). As for the use of ISO standards, they were considered in order to anticipate compliance with the labor regulations that the exoskeleton (to be developed in the future) may have to meet when it is implemented on the market. Table 2 summarizes the adopted set of ground truth WMSD RULA and ISO 11226 high risk rules (the most impacting ones in terms of potential injuries), which assume a maximum value of 4 s for the past angular values, thus 𝑃= 40 for the MCS data that was collected for every 0.1 s. For instance, the rules state that there is a high risk for the flexion movement if the upper limb produced 4 s of consecutive angular values above 40◦. The application of the WMDS high risk rules is also exemplified in Fig. 3 for the rotation movement, as signaled by the red colored dots. It should be noted that these high risk WMSD rules are particularly relevant for the textile working context, since high risk postures produce more worker physical injuries. Nevertheless, the WMSD module could be easily updated to include other types of rules (e.g., associated with medium risk or with newer standards). The direct application of the risk WMSD rules to historical data only allows to perform a risk detection, i.e., to compute a risk label when the wrong movement has already occurred, thus probably producing a physical injury. A more interesting prevention approach is to perform 4https://www.iso.org/obp/ui/#iso:std:iso:11226:ed-1:v1:en. an early (AoT) risk detection, which can be achieved by combining historical observations with AoT forecasts, namely:  𝑅𝑖,𝑇 +𝐴=𝑓risk(𝑦𝑖,𝑇 +𝐴, 𝑦𝑖,𝑇 +𝐴−1,…, 𝑦𝑖,𝑇 +1, 𝑦𝑖,𝑇 , 𝑦𝑖,𝑇 −1,…, 𝑦𝑖,𝑇 −𝑀)(4) where  𝑅𝑖,𝑇 +𝐴is the predicted risk for time 𝑇+𝐴, computed at the current time 𝑇(associated with the last known value) for the 𝑖th participant, 𝐴denotes the maximum AoT predicted value, 𝑦𝑖,𝑇 +𝐴, 𝑦𝑖,𝑇 +𝐴−1,…, 𝑦𝑖,𝑇 +1 represent the AoT forecasts, 𝑀=𝑃−𝐴−1 is a constant value that sets the length of all 𝑓risk inputs (combination of forecasts and historical values) equal to 𝑃. For example, let 𝑦𝑖,𝑡 = (15,16,17,…,55) denote a simple sequential angular time series for the rotation movement and the participant 𝑖. For 𝐴= 0 (pure detection), at time 𝑇= 41 (𝑦𝑖,𝑇 = 55) there are 𝑃= 40 historical angular observations above 15◦, where 𝑓risk(55,54,53,…,16) and thus the rotation high risk rule is true. For 𝐴= 2 (AoT of 0.2 s), let 𝑦𝑖,𝑇 +1 = 54.1and 𝑦𝑖,𝑇 +2 = 55.1denote the AoT forecasts computed at time 𝑇= 39. In this case, the risk rule is estimated by using the 2 AoT forecasts and 38 historical observations, namely 𝑓risk(55.1,54.1,53,…,16). 3.5. Evaluation To evaluate both TSF and WMSD risk modules, in this work a robust 12-fold cross-validation procedure (Hastie et al.,2009) is adopted, where each fold corresponds to the angular time series for each available human participant (textile worker) collected data. The goal is to iteratively select one participant full time series movement as the (unseen) test set, using the remainder data (total of 11 time series, related with the other textile workers) for training. Thus, the 12-fold procedure is applied three times for each ML algorithm, for each of the three analyzed movements (rotation, abduction and flexion). Besides the four ML TSF methods (SVM, XG, MLP and LSTM), as a baseline method, we also test a Naive random-walk TSF method that predicts all future observations as the current known value. In order to evaluate the predictive time series performance, we adopt the Mean Squared Scaled Error (MSSE), which is computed as follows (Hyndman and Koehler,2006): MSSE =MSE MSE𝑁𝑎𝑖𝑣𝑒 (5) where MSEand MSE𝑁𝑎𝑖𝑣𝑒 denote the Mean Squared Error (MSE) associated with the analyzed TSF () and Naive models. The MSSE measure presents two advantages. Firstly, it directly compares the ML method with the adopted Naive baseline. Secondly, it is a scale independent measure, which facilitates the comparison of results among the different types of movements, which can be associated to different angular scales. In this work, the WMSD risk predictive performance measures (F1, MCC) are applied to two types of test data: to all time series test values (by default); and to a filtered Selective Sample (SS). The second SS set is also adopted because in this domain it is more important to detect a normal to risk stage change than to predict a continuous risk state or a risk to normal alteration. In effect, once a safety mechanism (e.g., alarm sound) is triggered due to a risk prediction, the human can immediately move its body part in order to avoid the risk. Thus, the SS set only contains the sequences of movements from the full test time series that start with a normal state until the first high risk event occurs, discarding all further and sequential high risk states. For the zoomed rotation movement example shown on the right of Fig. 3, the SS filters the three segments that include a sequence of blue points and one red point. Regarding the WMSD risk predictive performance, we use two popular classification measures: the F1-score (Li et al.,2023) and the Engineering Applications of Articial Intelligence 138 (2024) 109353 6 L.M. Matos et al. Fig. 5. Rotation risk prediction results (F1-Scores, 𝑦-axis) for distinct AoT values (𝐴,𝑥-axis) for participant #1. Matthews correlation coefficient (MCC) (Chicco and Jurman,2020). For a test set of predicted binary labels, the known confusion matrix contains four types of elements: True Positives (TP), True Negatives (TN), False Positives (FP) and False Negatives (FN). The F1-score computes an harmonic mean of the Precision and Recall measures and it can be computed as: 𝐹1 = 𝑇 𝑃 𝑇 𝑃 +1 2 ⋅(𝐹 𝑃 +𝐹 𝑁) (6) The F1-score ranges from 0% to 100%, the higher the value, the better is the predictive performance. As for the MCC, is its computed as: 𝑀𝐶𝐶 =𝑇 𝑃 ⋅𝑇 𝑁 −𝑇 𝑃 ⋅𝐹 𝑁 √(𝑇 𝑃 +𝐹 𝑃 )⋅(𝑇 𝑃 +𝐹 𝑁)⋅(𝑇 𝑁 +𝐹 𝑃 )⋅(𝑇 𝑁 +𝐹 𝑁) (7) The MCC score varies from −1 (worst result) to 1(best possible classification), with a random classifier tending to produce a MCC value of 0. There is an individual predictive performance measure for each of the 12 iterations of the cross-validation procedure. The overall crossvalidation results are aggregated by computing the median of the 12 individual measures (e.g.,  𝐹1is used for the F1 measure) and statistical significant is measured by adopting the nonparametric Wilcoxon test (Hollander et al.,2013). We note that the median statistic is less sensitive to outliers when compared with the average aggregation function. Moreover, all predictive performance measures (MSSE, F1 and MCC) are computed for a particular AoT value (𝐴). The full AoT analysis is produced by measuring the performance of a ML method for distinct AoT values, such that 𝐴∈ {1,2,…, 𝐻}. When needed, the aggregated AoT measures are also computed as the median of the different 12-fold median 𝐴values (denoted here as  𝐴). 4. Experimental results As explained in Section 3.4, the adopted high risk upper limb WMSD rules assume a time window of 4 s of angular observations (Table 2), thus 𝑃=40. Thus, we have set the input lagged data size (𝐾) and maximum AoT length (𝐻) to the same value (𝐾= 40,𝐻= 40). For each type of movement (rotation, abduction and flexion), we executed the 12-fold participant cross-validation procedure for all four ML algorithms (SVM, XG, MLP and LSTM) and the Naive baseline. For each model, a full AoT analysis was executed (𝐴∈ {1,2,…, 𝐻}) for both TSF and WMSD risk assessment performance. The obtained results are summarized in Table 3 in terms of the median AoT values (the adopted  𝐴notation) predictive performance values. When analyzing the results, it becomes clear that the SVM provides the best TSF and WMSD risk assessment results, since it always Table 3 Summary of the AoT median 12-fold results (  𝐴values, best values in bold). Movement ML TSF Risk MSSE F1 MCC Rotation SVM 0.92a89.50%b0.80b XG 1.13 83.50% 0.69 MLP 3.07 75.50% 0.54 LSTM 1.24 69.50% 0.43 Naive 1.00 79.50% 0.67 Abduction SVM 0.98a92.00%b0.85b XG 1.29 90.00% 0.81 MLP 7.94 46.00% 0.11 LSTM 1.36 87.00% 0.78 Naive 1.00 87.00% 0.77 Flexion SVM 0.99c89.50%b0.82d XG 1.29 84.00% 0.71 MLP 5.58 47.50% 0.17 LSTM 3.19 46.50% 0.00 Naive 1.00 78.50% 0.67 aStatistically significant when compared with XG, MLP and LSTM. bStatistically significant when compared with XG, MLP, LSTM and Naive. cStatistically significant when compared with MLP and LSTM. dStatistically significant when compared with MLP, LSTM and Naive. obtains the best median (  𝐴) MSSE, F1 and MCC measures. Moreover, in most cases the median differences are statistically significant. In particular, the AoT WMSD risk prediction results are of quality, with F1-Scores above 89% and MCC equal or higher than 0.8. for all three movements. In order to provide more detailed results, Fig. 5 shows for the participant #1 test set, the rotation WMSD risk performance (F1-Score, 𝑦-axis) for distinct AoT values (𝐴,𝑥-axis) for all learning methods. For this test set example, the SVM method produces superior F1-Score values for almost all AoT values (namely 𝐴∈ {1,2,…,39}). The second best WMSD risk performance is obtained by the LSTM model, followed by XG. Table 4 provides the median 12-fold results for both MSSE and F1 measures (  𝑀𝑆𝑆𝐸 and  𝐹1) and some selected AoT values (𝐴∈ {1,10,20,30,40}). The detailed table results tend to favor the SVM method, which in most cases presents statistically significant better  𝑀𝑆𝑆𝐸 and  𝐹1values. Regarding the computational effort, all experiments were executed using the Python programming language and an Intel Xeon 1.70 GHz server. Table 5 shows the median 12-fold time elapsed values required by each ML algorithm in terms of: training effort (training data related with 11 human participants, in s); and prediction times (𝐴= 1 – compute just one AoT forecast; 𝐴=40 – compute a 4 s AoT forecast). In terms of training time, SVM is the fastest method, requiring Engineering Applications of Articial Intelligence 138 (2024) 109353 7 L.M. Matos et al. Table 4 Median 12-fold results for some selected AoT (𝐴) values (best values in bold). Movement ML A =1 A =10 A =20 A =30 A =40 MSSE F1 MSSE F1 MSSE F1 MSSE F1 MSSE F1 Rotation SVM 0.88a99.39%f1.00c94.86%e0.91b90.04%e0.91g83.65%e0.95a64.73%h XG 0.69 99.20% 1.30 90.74% 1.12 83.22% 1.07 78.09% 1.07 69.28% MLP 2.92 98.75% 3.61 83.83% 2.97 76.29% 2.74 63.52% 2.92 49.85% LSTM 15.18 84.15% 1.68 76.49% 1.10 68.93% 0.83 65.02% 0.77 61.21% Naive 1.00 99.24% 1.00 91.88% 1.00 80.92% 1.00 69.78% 1.00 55.12% Abduction SVM 0.52a99.67%e1.06c97.23%e0.97b93.34%e0.93b87.87%d0.97b70.83%c XG 0.77 99.45% 1.45 94.37% 1.27 90.44% 1.21 85.79% 1.19 74.93% MLP 33.90 92.07% 10.56 48.47% 7.28 45.58% 6.49 44.62% 5.55 44.33% LSTM 33.58 99.42% 1.98 94.71% 1.19 88.51% 0.93 80.40% 0.84 71.66% Naive 1.00 99.43% 1.00 94.15% 1.00 87.76% 1.00 79.98% 1.00 68.55% Flexion SVM 0.43a99.52%a1.01c95.83%e0.99a91.58%d0.99g82.72%e1.05a55.71%d XG 0.79 99.35% 1.44 91.46% 1.26 82.79% 1.19 77.18% 1.17 66.95% MLP 11.00 93.94% 7.07 49.78% 5.30 46.62% 4.34 46.48% 3.64 46.48% LSTM 52.54 46.49% 4.62 46.49% 2.69 46.49% 2.08 46.49% 1.89 46.49% Naive 1.00 99.23% 1.00 91.88% 1.00 80.14% 1.00 68.41% 1.00 55.43% aStatistically significant when compared with LSTM and MLP. bStatistically significant when compared with MLP and XG. cStatistically significant when compared with LSTM, MLP and XG. dStatistically significant when compared with LSTM, MLP and Naive. eStatistically significant when compared with all models. fStatistically significant when compared with LSTM. gStatistically significant when compared with MLP. hStatistically significant when compared with MLP and Naive. Table 5 Computational effort (median time elapsed, best values in bold). ML Training Prediction time (ms) Time (s) A =1 A =40 SVM 96.3 3.60 145.2 XG 199.9 1.00 40.4 MLP 148.9 0.10 4.0 LSTM 229.3 0.84 33.5 a median time of around 1.6 min, while the deep learning method (LSTM) demands the highest computational effort (around 4 min). As for the inference time (to compute one forecast, 𝐴= 1), MLP is the fastest method, followed by the LTSM and XG. While SVM requires the highest inference time (3.6 ms), it is still useful in practice, as it can be used in real-time (e.g., requiring 0.145 s when producing an AoT warning of 4 s). Furthermore, we note that in a real online scenario, the ML code could be further optimized, such as by adopting the Mojo programming language (https://www.modular.com/max/mojo), which has the potential to highly reduce the computational effort. Overall, the textile WMSD AoT results favored the SVM model and thus we present and analyze further SVM results in this section. The obtained SVM empirical performance is consistent with other recent TSF comparison studies (e.g., Atique et al. (2020), Badiane and Cunningham (2022)). Indeed, the SVM algorithm presents some theoretical advantages when compared with the other ML algorithms (MLP, XG, LSTM), such as guaranteed convergence of an optimal solution and reduced number of hyperparameters. Nevertheless, we note that given the black-box nature of the compared ML algorithms, it is nontrivial to exactly identify the reasons for the high SVM performance in our experiments and it could be the case that a different ML algorithm would produce better results when performing WMSD AoT forecasts for other types of workers and industries. Fig. 6 shows the SVM predictive risk performance (F1-Scores, 𝑦axis) for distinct AoT values (𝐴,𝑥-axis) for all 12-fold test participants. The plot shows a clear and naturally expected pattern: for smaller AoT values, a high risk prediction capability is achieved (F1 values higher than 90%), while the performance degrades for increasing values of 𝐴. Nevertheless, it is interesting to notice that for most AoT values, the decrease in performance is very slight. In effect, there is only an Fig. 6. SVM rotation risk prediction results (F1-Scores, 𝑦-axis) for distinct AoT values (𝐴,𝑥-axis) and all participants (test sets). abrupt decay in the F1-Scores for the last AoT horizon (𝐴=40). For demonstration purposes, Fig. 7 plots an example of 10 multi-step ahead forecasts (𝐴=10) that were produced by the SVM TSF model for the rotation movement and participant #1. In this example, the SVM forecasts are aligned with the true movement values, producing a fit that is much better when compared with the baseline Naive method. Finally, the Selective Sampling (SS) 12-fold test results are presented in Table 6, which compares the selected SVM approach with the Naive baseline. Similarly to the default full test set results, the SVM method obtains a significantly better WMSD predictive performance for all selected AoT values, when considering the AoT median (  𝐴) and all three movements. Overall, and as expected, the obtained SS results (  𝐹1 and  𝑀𝐶𝐶) are below the ones obtained when using the full test data (which includes several continuous high risk conditions). Nevertheless, the obtained SS MCC scores are positive for all AoT values, thus the risk performance is better than a random classifier. It also should be noted that for small AoT values (𝐴∈ {1,10}) the SS percentage point (pp) difference between SVM and the baseline method is higher. For instance, the SS F1-Score difference between SVM and Naive for the rotation movement is 14.92 pp, while the same difference when using the full test data is just 0.15 pp. Engineering Applications of Articial Intelligence 138 (2024) 109353 8 L.M. Matos et al. Table 6 Median 12-fold results for some selected AoT (𝐴) values when adopting the Selective Sampling (SS) test filter (best values in bold). Movement ML A =1 A =10 A =20 A =30 A =40  𝐴 F1 MCC F1 MCC F1 MCC F1 MCC F1 MCC F1 MCC Rotation SVM 98.19%a0.96a68.33%a0.46a57.59%a0.27a53.12%a0.19a45.86%a0.08a57.33%a0.27a Naive 83.27% 0.71 56.14% 0.27 50.74% 0.17 47.16% 0.11 40.15% 0.07 50.59% 0.16 Abduction SVM 98.93%a0.98a66.90%a0.45a55.59%a0.28a51.08%a0.18a42.05%a0.08 55.34%a0.27a Naive 83.14% 0.70 56.01% 0.28 50.26% 0.18 46.38% 0.12 40.28% 0.08 50.01% 0.17 Flexion SVM 99.02%a0.98a67.67%a0.45a57.61%a0.29a53.13%a0.20a40.63% 0.06a57.32%a0.28a Naive 83.23% 0.71 56.19% 0.28 50.52% 0.17 45.83% 0.11 39.26% 0.07 50.30% 0.17 aStatistically significant when compared with the Naive baseline. Fig. 7. Example of 𝐴=10 rotation movement forecasts for participant #1 and the selected SVM TSF method. 5. Conclusion and future work In this paper, we have proposed a proactive method to perform an early detection of high risk industrial worker movements. In particular, we perform an AoT WMSD risk detection for the textile industry, aiming to improve the health and safety conditions of textile workers. The proposed method includes two main modules, an angular movement TSF based on ML algorithms and a WMSD rule based risk detection. Using real-world data, collected from 12 participants and related with three upper limb movements, we have performed a detailed experimental analysis, demonstrating the suitability of the proposed method in terms of an AoT TSF movement and WMSD risk detection. For the tested textile working environment, the best overall empirical results were obtained by a SVM, which outperformed three other ML algorithms and also a Naive random-walk baseline. In particular, high quality risk prediction performances were obtained. For instance, the method produced F1-scores higher than 98% for an AoT of 0.1 s and higher than 67% for an AoT of 1 s when analyzing the SS test results, which more realistically measure the value of the WMSD risk predictions in a real scenario. The proposed WMSD prevention method provides several innovations and advantages. Firstly, the Motion Capture System (MCS) is based on a controlled Vicon camera environment, which provides precise three-dimensional upper limb angular movement data. Secondly, we perform a multi-step-ahead TSF that is capable of a proactive AoT WMSD risk detection, allowing to trigger a safety mechanism (e.g., alarm sound, mechanical actuator) in order to prevent the occurrence of a WMSD. Thirdly, by separating the TSF task from the WMSD risk analysis, a higher modularity is gained, where one of the modules (TSF or WMSD risk) can be updated without requiring any other changes. Fourthly, we performed an extensive and robust empirical study that considered large real-world datasets from textile workers and four distinct ML algorithms. Finally, by assuming MCS data and an angular TSF approach, the proposed method could be easily adapted to prevent WMSDs related with other body parts (e.g., legs) or with workers from other industries (e.g., automotive assembly units). The presented research also contains a few limitations. For instance, all computational experiments were performed off-line, after the collection of the MCS data. Moreover, we have only addressed upper left limb movements related with 12 participants from a particular textile company and explored at most four ML algorithms. To address these limitations, in future work we intend to deploy the proactive method in a real working environment, in order to effectively measure its value to prevent WMSD and get further feedback from the textile workers. This would allow us to collect MCS data from more human participants. Furthermore, we intent to measure the utility of distinct safety mechanisms (e.g., alarm sound, exoskeleton suit with a muscle blocking actuator). Also, we wish to extend the proposed proactive method to perform a multi-class WMSD risk detection (e.g., no risk, medium and high risk), explore more ML algorithms (e.g., TCNN), to capture more body parts (e.g., legs) and to perform experiments using workers from other industries. CRediT authorship contribution statement Luís Miguel Matos: Writing – review & editing, Writing – original draft, Visualization, Validation, Software, Methodology, Investigation, Formal analysis, Conceptualization. Paula Dias: Writing – review & editing, Writing – original draft, Software, Investigation, Data curation, Conceptualization. Arthur Matta: Writing – review & editing, Writing – original draft, Validation, Software, Investigation, Formal analysis, Data curation, Conceptualization. Dário Machado: Validation, Methodology, Investigation, Data curation, Conceptualization. Rosane Sampaio: Validation, Investigation, Formal analysis, Data curation, Conceptualization. André Pilastri: Writing – review & editing, Writing – original draft, Validation, Supervision, Project administration, Methodology, Investigation, Formal analysis, Conceptualization. Paulo Cortez: Writing – review & editing, Writing – original draft, Visualization, Validation, Supervision, Project administration, Methodology, Investigation, Funding acquisition, Formal analysis, Conceptualization. Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Data availability Data will be made available on request. Engineering Applications of Articial Intelligence 138 (2024) 109353 9