Consider the setup depicted in Figure 1. Assume that each IMU provides 3D accelerometer readings **a**(*t*) as well as 3D gyroscope readings **g**(*t*) at a measurement sampling interval of *t*_{s} = 0.02 s. Since we have no prior knowledge about the sensor-to-segment orientations, we only use the Euclidean norms of the measured vectors. To minimize the influence of signal fluctuation, we always apply sufficient low-pass filtering to these norm signals. We denote the low-pass filtered norms by

$${\stackrel{~}{a}}_{i}\left(t\right)=\frac{1}{20}{\sum}_{k=-9}^{10}{||{\mathbf{a}}_{i}\left(t+k{t}_{\text{s}}\right)||}_{2}-9.8,$$(1)

$${\stackrel{~}{g}}_{i}\left(t\right)=\frac{1}{20}{\sum}_{k=-9}^{10}{||{\mathbf{g}}_{i}\left(t+k{t}_{\text{s}}\right)||}_{2},$$(2)

$${\stackrel{~}{j}}_{i}\left(t\right)=\frac{1}{20}{\sum}_{k=-9}^{10}{||\frac{{\mathbf{a}}_{i}\left(t+k{t}_{\text{s}}\right)-{\mathbf{a}}_{i}\left(t+k{t}_{\text{s}}-{t}_{\text{s}}\right)}{{t}_{\text{s}}}||}_{2}.$$(3)

We denote the six sensors by an arbitrary but fixed enumeration $i\in \mathbb{S},\mathbb{S}:=\{1,\mathrm{\dots},6\}\in \mathbb{N}$. Furthermore, we define six locations (p,s) consisting of a segment position *p* ∈ {thigh, shank, foot} and a side *s* ∈ {side 1, side 2}.

The final goal is to assign every sensor number *i* to a location (p,s). E.g. we use the notation S^{(shank, side 1)} = 2 to indicate that the shank sensor of side 1 was found to be the sensor with number *i* = 2.

In order to achieve this goal, we divide this task by its dimensions. To this end, we define sets *𝕊*^{foot}, *𝕊*^{shank} and *𝕊*^{thigh}, each containing two sensors, such that

$${\mathbb{S}}^{\text{foot}}\cup {\mathbb{S}}^{\text{shank}}\cup {\mathbb{S}}^{\text{thigh}}=\mathbb{S},$$

$${\mathbb{S}}^{\text{foot}}\cap {\mathbb{S}}^{\text{shank}}={\mathbb{S}}^{\text{foot}}\cap {\mathbb{S}}^{\text{thigh}}={\mathbb{S}}^{\text{shank}}\cap {\mathbb{S}}^{\text{thigh}}=\mathrm{\varnothing}.$$

To keep the mathematical notations short, we define an operator that returns the sensor number *i* of the sensor that is associated with the *k*^{th}-largest entry of a given set of real values.

**Definition 1** Let **c** ∈ *ℝ*^{n} be a set of n real values, each of which is uniquely associated with one sensor, and let $l\in \{1,2,\mathrm{\dots},n\}\subset \mathbb{N}$ be a natural number. Then the operator ${\u3008\mathbf{c}\u3009}_{l}:{\mathbb{R}}^{n}\times \{1,2,\mathrm{\dots},n\}\to \{1,\mathrm{\dots},6\}$ returns the sensor number of the sensor to which the *l*^{th}-largest entry of the set **c** is associated.

For example, let the set *c* = {1.2, 0.3, 4.8} contain the angular rate norms of sensors *i* = 4, 6, 5. Then ${\u3008\mathbf{c}\u3009}_{2}=4$.

In order to find robust criteria for the sensor-to-segment pairing, we only consider relative comparisons of characteristic signal values, since absolute values and thresholds typically change with gait velocity as well as from subject to subject.

We analyzed a large number of characteristics and features in the signals recorded during gait. For the sake of brevity, we present only the most useful and robust features in the present contribution. The proposed sensor-to-segment pairing algorithm consists of the following steps:

Identification of the *foot* sensors

Identification of the *shank* and *thigh* sensors

Pairing the *shank* sensors to their related *foot* sensors

Pairing the *thigh* sensors to their related *foot* sensors

All of these steps shall be performed by processing the IMU measurements that are collected during 3 s of gait. Let ${t}_{\text{0}}\in {\mathbb{R}}^{\ge 0}$ be the start point and ${t}_{\text{f}}>{t}_{\text{0}}\in {\mathbb{R}}^{\ge 0}$ be the end point of the data collection.

With respect to Step 1, consider the following feature:

**Feature 1:** Foot sensors have the highest all-time-maximum of low-pass-filtered acceleration.

Note that the *all-time-maximum* is the maximum over the 3 s of collected data.To exploit this feature, we define a set ${\stackrel{~}{\mathbf{a}}}_{\text{max}}\in {\mathbb{R}}^{6}$ with

$${\stackrel{~}{\mathbf{a}}}_{\text{max}}:=\{\underset{t\in \{{t}_{\text{0}},\mathrm{\dots},{t}_{\text{f}}\}}{\mathrm{max}}{\stackrel{~}{a}}_{i}\left(t\right),i\in \mathbb{S}\}$$(4)

$$\Rightarrow \mathit{\hspace{1em}}{\mathbb{S}}^{\text{foot}}=\{{\u3008{\stackrel{~}{\mathbf{a}}}_{\text{max}}\u3009}_{1},{\u3008{\stackrel{~}{\mathbf{a}}}_{\text{max}}\u3009}_{2}\}.\mathit{\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}}$$(5)

Once we know the *foot* sensors, the *shank* and *thigh* are distinguished by exploiting the following feature:

**Feature 2:** Shank sensors have higher all-time-maximum of low-pass-filtered angular rates than thigh sensors.

We exploit this feature by defining a set ${\stackrel{~}{\mathbf{g}}}_{\text{max}}\in {\mathbb{R}}^{4}$ with

$${\stackrel{~}{\mathbf{g}}}_{\text{max}}=\{\underset{t\in \{{t}_{\text{0}},\mathrm{\dots},{t}_{\text{f}}\}}{\mathrm{max}}{\stackrel{~}{g}}_{i}\left(t\right),i\in \mathbb{S}\setminus {\mathbb{S}}^{\text{foot}}\}$$(6)

$$\Rightarrow \mathit{\hspace{1em}}{\mathbb{S}}^{\text{shank}}=\{{\u3008{\stackrel{~}{\mathbf{g}}}_{\text{max}}\u3009}_{1},{\u3008{\stackrel{~}{\mathbf{g}}}_{\text{max}}\u3009}_{2}\}.$$(7)

Once we know the *foot* and *shank* sensors, we consequently know the *thigh* sensors:

$${\mathbb{S}}^{\text{thigh}}=\mathbb{S}\setminus \left({\mathbb{S}}^{\text{foot}}\cup {\mathbb{S}}^{\text{shank}}\right).$$(8)

For Step 3 and 4, we must identify the sides. Without prior knowledge, we have no means to distinguish both legs in terms of *left* and *right*. Note that one might assume that both feet exhibit more inversion than eversion or that both thighs exhibit more abduction than adduction during swing phase. However, these assumptions might easily be violated in pathological gaits. Therefore, we refrain from assuming any of such assumptions. Instead, we let the two *foot* sensors represent one leg each. Thus, we must find out which *shank* and *thigh* sensor belongs to which of the two *foot* sensors, in the following.

This goal is achieved by exploiting some fundamental characteristics of gait: In general, gait means that both legs alternate between stance and swing. During swing, both the *shank* and the *foot* of the swinging leg rotate quickly. Let us approximate the swing phase of one leg by the period of time in which the angular rate of the *foot* sensor is higher than the all-time maximum angular rate of both *shank* sensors. We denote the duration of this time interval by *T*_{≈swing}.

**Feature 3:** During swing phase of one leg, the shank sensor of that leg measures a higher low-pass-filtered angular rate than the other shank sensor (see Figure 2a).

Figure 2 (A) Low-pass-filtered angular rates for one foot sensor and both shank sensors. Green dots indicate when the angular rate of the foot rises/falls above/below the all-time maximum angular rate (horizontal line) of both shank sensors. These events define the beginning and the end of the approximate swing phase (vertical lines). Integrating the signals over this time interval allows evaluation of Feature 3. (B) Low-pass-filtered zero-mean jerk of both thigh sensors. The integration interval that is used for evaluation of Feature 4 is shifted by 70% of *T*_{≈swing} as indicated by the green arrow.

Denote the side of the leg that undergoes the first swing-phase (within the collected data) by side 1 and assign the foot sensors to the sides 1 and 2 accordingly. We compare the integrals of both angular rates of the *shank* sensors during *T*_{≈swing}. Define *G*^{shank} ∈ *ℝ*^{2}, with ${G}^{\text{shank}}=\{{\int}_{{T}_{\approx swing}}{\stackrel{~}{g}}_{i}\left(t\right)\text{d}t,i\in {\mathbb{S}}^{\text{shank}}\}$. Then

$${\text{S}}^{\text{(shank, side 1)}}={\u3008{G}^{\text{shank}}\u3009}_{1},$$(9)

$${\text{S}}^{\text{(shank, side 2)}}={\mathbb{S}}^{\text{shank}}\setminus {\text{S}}^{\text{(shank, side 1)}}.$$(10)

For the final step of pairing a *thigh* sensor to its related *foot* sensor, the zero-mean jerk

$${\stackrel{~}{j}}_{-i}\left(t\right)={\stackrel{~}{j}}_{i}\left(t\right)-\frac{1}{{t}_{\text{f}}-{t}_{0}}{\int}_{{t}_{0}}^{{t}_{\text{f}}}{\stackrel{~}{j}}_{i}\left(t\right)\text{d}t$$(11)

was found to be a useful signal. Just like the angular rates for *foot* and *shank* sensors, the jerk of the *thigh* sensors alternates between high phases and low phases. These high-*thigh*-jerk phases appear a little later than the (approximated) swing phases of the corresponding foot. We quantify this time-shift to be approximately 70% of the swing duration *T*_{≈swing} and denote it by *T̂*_{≈swing}.

**Feature 4:** Near the end of the swing phase of one leg, the thigh sensor of that leg measures a higher low-pass-filtered zero-mean jerk than the other thigh sensor.

For illustration, see Figure 2b. We define *J*^{thigh} ∈ *ℝ*^{2} with ${J}^{\text{thigh}}=\{{\int}_{{\widehat{T}}_{\approx swing}}{\underset{\xaf}{\overset{~}{j}}}_{i}\left(t\right)\text{d}t,i\in {\mathbb{S}}^{\text{thigh}}\}$. Then

$${\text{S}}^{\text{(thigh, side 1)}}={\u3008{J}^{\text{thigh}}\u3009}_{1},$$(12)

$${\text{S}}^{\text{(thigh, side 2)}}={\mathbb{S}}^{\text{thigh}}\setminus {\text{S}}^{\text{(thigh, side 1)}}.$$(13)

## Comments (0)