# Dynamic Time Warping methods to assess similarity of shoulder movements using IMUs, in participants with subacromial pain syndrome: a pilot study

Adrien Beaud, Antoine Mazarguil, Quentin Lejeune, Josette Bertheau, Hélène Pillet, Marie-Martine Lefèvre-Colau, Alexandra Rören

<figure><img src="image_1.png" /></figure>

## ► To cite this version:

Adrien Beaud, Antoine Mazarguil, Quentin Lejeune, Josette Bertheau, Hélène Pillet, et al. Dynamic Time Warping methods to assess similarity of shoulder movements using IMUs, in participants with subacromial pain syndrome: a pilot study. Multidisciplinary Biomechanics Journal, 2025, 49th congress of the Société de Biomécanique, 10.46298/mbj.14480. hal-04737954v2

HAL Id: hal-04737954

https://hal.science/hal-04737954v2

Submitted on 31 Jan 2025

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Dynamic Time Warping methods to assess similarity of shoulder movements using IMUs, in participants with subacromial pain syndrome: a pilot study

Adrien Beaud<sup>a*</sup>, Antoine Mazarguil<sup>b</sup>, Quentin Lejeune<sup>c</sup>, Josette Bertheau<sup>c</sup>, Hélène Pillet<sup>d</sup>, Marie-Martine Lefèvre-Colau<sup>e</sup>, Alexandra Rören<sup>e</sup>

a INSERM UMR1153, Equipe ECAMO & Arts et Métiers Institute of Technology, IBHGC, Paris, France

b Centre Giovanni Alfonso Borelli, ENS Paris-Saclay, France

c Service de MPR, Hôpital Cochin, Paris, France

d Arts et Métiers Institute of Technology, IBHGC, Paris, France

e Faculté de santé, Université Paris Cité, Paris, France

* Corresponding author: adrien69.beaud@hotmail.fr

Received date: 07/04/2024

Accepted date: 28/06/2024

Publication date: 31/01/2025

**Keywords:** DTW, IMU, kinematics, rehabilitation, shoulder

© 2025 The Authors

Licence CC-BY 4.0

Published by Société de Biomécanique

## 1. Introduction

Assessing movement quality is a challenge as it is a complex multiparametric notion, including metrics of speed, trajectory and smoothness. Inertial sensors (IMUs) have recently enabled clinicians to have access to kinematic movement analyses (De Baets et al., 2017) but have no mathematical tools to compare movement curves accurately. Similarity, quantifying how closely curve shapes match, could help analyze movement quality.

Dynamic Time Warping (DTW) is a nonlinear curve alignment method to measure the similarity of 2 time series with different lengths (Senin, 2008). It allows for point-by-point comparisons between curves despite temporal misalignments. Shape-DTW considers local structural information around each point for better curve alignment (Zhao & Itti, 2018). Shape-DBA (Dynamic Barycenter Averaging) gives an average of time series while accounting for temporal misalignments (Ismail-Fawaz et al., 2023).

Subacromial pain syndrome (SPS), which includes all rotator cuff disorders, affects shoulder and scapula motions. Particularly, SPS is characterized by decreased active global shoulder elevation (GSE) range of motion and abnormal scapula kinematic patterns, including reduced scapula lateral rotation (SLR), during active arm elevation (Ludewig & Braman, 2011).

The study aimed to use Shape-DTW to assess the changes in similarity of GSE and SLR movements after rehabilitation, in participants with SPS compared to

asymptomatic participants. We hypothesized that the similarity of GSE and SLR between the SPS and the asymptomatic group would improve after rehabilitation.

## 2. Material & Methods

We conducted a single-center prospective pilot study at Cochin Hospital's Motion Analysis Lab. We included 8 adult participants (9 shoulders) with SPS [2 males, 7 right-handed, Mean (SD): 55.2 (14) years old, BMI: 24.6 (2.3) kg.m⁻²]. The control group included 17 asymptomatic participants (34 shoulders) [10 males, 16 right-handed, 29.8 (9.2) years old, BMI: 22.7 (2.6) kg.m⁻²]. The study was approved by the local ethics committee (CER APHP, Ref. 2023-06-01).

We used 8 Mtw Awinda XSens® sensors following the reference protocol for placement and orientation of Cutti et al., (2008). Only forearms (for calibration), arms and scapulae sensors data were used in the present study. Signals were acquired at 100 Hz. All participants performed 15 different arm movements twice, in about 10s (5s per arm raising and lowering phases), with a 3s interval between repetitions. Only the 2nd trial of bilateral sagittal arm elevation was considered, the 1st trial was considered a training trial. Symptomatic participants had 2 recording sessions, 1 before and 1 after 4 rehabilitation sessions lasting about 2.5 hours each over a 2-3 weeks period.

A subject frame (x-axis orthogonal to the frontal plane, z-axis vertical) was derived from the participant's resting
position. Angle time series were computed using IMU rotation matrices. GSE and SLR represent, respectively, the angles between the arm sensor's x-axis and the subject frame's z-axis, and between the scapula sensor's x-axis and the subject frame's z-axis. Initial amplitudes were set to 0°. All asymptomatic angle time series were linearly interpolated to the median time length.

A Shape-DBA algorithm averaged the asymptomatic angle time series into 1 GSE and 1 SLR curve template for both right and left sides. Pathological curves (for each symptomatic shoulder) were aligned with the corresponding template of the same side (for both GSE and SLR) using Shape-DTW. Parameters for Shape-DTW were: subsequence width 20, descriptors: Slope (window size 5, weight 2.0), Piecewise Aggregate Approximation (window size 5, weight 1.0). For Shape-DBA: 5 iterations used and a medoid approximation for the initialization. We computed the total distance between two curves (A & B) by summing the signed amplitude difference of each aligned points and normalizing it by the sum of the sequence lengths, as follows:

$$DTW \text{ signed distance}^{(A,B)} = \frac{\sum_{i=1}^{N} (A_{\text{aligned}[i]} - B_{\text{aligned}[i]})}{\text{len}(A) + \text{len}(B)}$$

A positive distance indicates a higher global amplitude of the pathological curve compared to the corresponding template. DTW signed distances were expressed by median and interquartile range [IQR].

The paired Wilcoxon test was used to compare the pre and post rehabilitation distances for GSE and SLR

## 3. Results and Discussion

In accordance with our hypothesis, our results showed improvement in similarity of GSE and SLR during sagittal elevation after rehabilitation for most symptomatic participants (8/9 and 6/9, respectively), (Table 1). DTW signed distances for both GSE (p=0.012) and SLR (p=0.039) significantly improved after rehabilitation, showing a kinematic normalization (Ludewig & Braman, 2011), although the range of changes was heterogeneous.

Our study has limitations: short term assessment, small sample size, no age matching between the 2 groups and heterogeneity in clinical and kinematic participants' profile. The Shape-DBA algorithm produces artefacts (peaks) that are not in the original set of asymptomatic curves (Figure 1), which might impact Shape-DTW matching.

<figure><img src="image_3.png" /><figcaption>**Figure 1.** a. Shape-DBA between asymptomatic global shoulder elevation (GSE) curves, b. Shape-DTW alignment between the scapula lateral rotation (SLR) template and a SLR pathological curve.</figcaption></figure>

<table><caption>**Table 1.** DTWsigned distances (°) for global shoulder elevation (GSE) and scapula lateral rotation (SLR), pre & post rehabilitation.</caption><thead><tr><th>Symptomatic Shoulders</th><th>GSE Pre</th><th>GSE Post</th><th>SLR Pre</th><th>SLR Post</th></tr></thead><tbody><tr><td>1</td><td>-1.30</td><td>-0.19</td><td>1.01</td><td>1.93</td></tr><tr><td>2</td><td>-3.10</td><td>-1.18</td><td>1.64</td><td>3.43</td></tr><tr><td>3</td><td>-0.37</td><td>-0.35</td><td>0.01</td><td>-0.29</td></tr><tr><td>4</td><td>-0.81</td><td>-0.76</td><td>-0.48</td><td>-0.61</td></tr><tr><td>5</td><td>-0.25</td><td>-0.13</td><td>-0.66</td><td>4.32</td></tr><tr><td>6</td><td>-5.20</td><td>0.01</td><td>-0.03</td><td>1.97</td></tr><tr><td>7</td><td>-0.59</td><td>-0.62</td><td>-1.36</td><td>-0.1</td></tr><tr><td>8</td><td>-0.69</td><td>0.06</td><td>-2.23</td><td>-2.23</td></tr><tr><td>9</td><td>-0.37</td><td>0.08</td><td>-0.94</td><td>0.35</td></tr><tr><td>Median</td><td>-0.69</td><td>-0.19</td><td>-0.48</td><td>0.35</td></tr><tr><td>[IQR]</td><td>[0.93]</td><td>[0.63]</td><td>[0.95]</td><td>[2.26]</td></tr></tbody></table>

## 4. Conclusion

Shape-DTW is an novel method that can be used as a similarity measure to assess shoulder movement in SPS
participants. It may be useful to assess more complex trajectories than SLR or GSE. Coupling it with other metrics, a quality score for shoulder movement could be developed.

## Conflict of Interest Statement

The authors report no conflicts of interest.

## References

Cutti, A. G., Giovanardi, A., Rocchi, L., Davalli, A., & Saccshoulder and elbow kinematics through inertial and magnetic sensors. Medical & Biological Engineering & Computing, 46(2), 169–178. https://doi.org/10.1007/s11517-007-0296-5

De Baets, L., Van Der Straaten, R., Matheve, T., & Timmermans, A. (2017). Shoulder assessment functioning by means of inertial sensor technologies: A systematic review. Gait & Posture, 57, 278–294. https://doi.org/10.1016/j.gaitpost.2017.06.025

Ismail-Fawaz, A., Fawaz, H. I., Petitjean, F., Devanne, M., Weber, J., Berretti, S., Webb, G. I., & Forestier, G. (2023). ShapeDBA: Generating Effective Time Series Prototypes using ShapeDTW Barycenter Averaging. https://doi.org/10.48550/ARXIV.2309.16353

Ludewig, P. M., & Braman, J. P. (2011). Shoulder impingement: Biomechanical considerations in rehabilitation. Manual Therapy, 16(1), 33–39. https://doi.org/10.1016/j.math.2010.08.004

Senin, P. (2008). Dynamic Time Warping Algorithm Review. https://seninp.github.io/assets/pubs/senin_dtw_litr eview_2008.pdf

Zhao, J., & Itti, L. (2018). shapeDTW: Shape Dynamic Time Warping. Pattern Recognition, 74, 171–184. https://doi.org/10.1016/j.patcog.2017.09.020