# Optical Enhancement of Exoskeleton-Based Estimation of Glenohumeral Angles

Authors: Camilo Cortés; Luis Unzueta; Ana de los Reyes-Guzmán; Oscar E. Ruiz; Julián Flórez
Journal: Applied Bionics and Biomechanics
 (2016)

---

## Abstract

In Robot-Assisted Rehabilitation (RAR) the accurate estimation of the patient limb joint angles is critical for assessing therapy efficacy. In RAR, the use of classic motion capture systems (MOCAPs) (e.g., optical and electromagnetic) to estimate the Glenohumeral (GH) joint angles is hindered by the exoskeleton body, which causes occlusions and magnetic disturbances. Moreover, the exoskeleton posture does not accurately reflect limb posture, as their kinematic models differ. To address the said limitations in posture estimation, we propose installing the cameras of an optical marker-based MOCAP in the rehabilitation exoskeleton. Then, the GH joint angles are estimated by combining the estimated marker poses and exoskeleton Forward Kinematics. Such hybrid system prevents problems related to marker occlusions, reduced camera detection volume, and imprecise joint angle estimation due to the kinematic mismatch of the patient and exoskeleton models. This paper presents the formulation, simulation, and accuracy quantification of the proposed method with simulated human movements. In addition, a sensitivity analysis of the method accuracy to marker position estimation errors, due to system calibration errors and marker drifts, has been carried out. The results show that, even with significant errors in the marker position estimation, method accuracy is adequate for RAR.


---

## Body

## 1. Introduction

The application of robotics and Virtual Reality (VR) to motor neurorehabilitation (Figure1) has been beneficial for patients, as they receive intensive, repetitive, task-specific, and interactive treatment [1–4].Figure 1
Robotic and VR-based rehabilitation.The assessment of (a) patient movement compliance with the prescribed exercises and (b) patient long-term improvement is critical when planning and evaluating the efficacy of RAR therapies. In order to obtain the patient motion data to conduct the said assessments, one has to estimate patient posture (i.e., the joint angles of the limbs). Patient posture estimation methods need to be practical and easy to set up for the physician, so that the said assessments can indeed be an integral part of the therapy.Current methods for estimating patient posture are either cumbersome or not accurate enough in exoskeleton-based therapies. In order to overcome such limitations, we propose a method where low-cost RGB-D cameras (which render color and depth images) are directly installed in the exoskeleton and colored planar markers are attached to the patient’s limb to estimate the angles of the GH joint, thereby overcoming the individual limitations of each of these systems.


## 2. Literature Review

Optical, electromagnetic, and inertial MOCAPs have been used in many rehabilitation scenarios for accurate posture estimation [5]. However, the use of the said MOCAPs in exoskeleton-based rehabilitation is limited by the factors discussed below:(1)
Optical marker-based systems (e.g., Optotrak, CODA, Vicon) are considered the most accurate for human motion capture [5]. Reference [6] reports Optotrak errors of 0.1–0.15 mm. However, in the specific case of exoskeleton-based therapy, these systems require redundant sensors and markers to cope with occlusions caused by the exoskeletal body. Therefore, their specific usage for therapy is limited. Besides, the cost of these systems is high (50 K–300 K USD [7]) compared to nonoptical MOCAPs.
(2)
Electromagnetic systems do not suffer from optical occlusions. However, they are easily perturbed by surrounding metallic objects (e.g., exoskeletal body) and electric/magnetic fields [5]. An additional drawback of these systems is their limited detection volume when compared to optical systems.
(3)
Inertial and Magnetic Measurement Systems are robust, handy, and economical for full-body human motion detection (upper limb tracking in [8, 9]). With the use of advanced filtering techniques, inertial sensor drift errors are reduced and a dynamic accuracy of 3 deg. RMS [5] is achieved. However, these systems require patients to perform calibration motions/postures, which may not be suitable for those with neuromotor impairments.In exoskeleton-based rehabilitation, the prevailing approach to estimate human limb joint angles (e.g., [10–13]) is to approximate them with the angles of the exoskeleton joints. However, misalignment between the axes of the exoskeleton and human joints may produce large estimation errors [14, 15]. Accurate estimation of GH joint angles is hard to achieve using this approach, since it requires an exoskeleton with a complex kinematic structure that considers the concurrent motion of the sternoclavicular and acromioclavicular joints.Recognizing the differences in the kinematic structures of the limb and exoskeleton, [16] presents a computational method which considers the limb and exoskeleton parallel kinematic chains related by the cuff constraints joining them together. Then, the IK problem of the parallel kinematic chain can be solved to find the limb joint angles. A limitation of this method is that its performance has been demonstrated solely for analytic (1-DOF) movements of the elbow and wrist joints. The estimation accuracy of the GH joint angles has yet to be determined.Reference [17] presents a computational method based on the estimation of the arm swivel angle (which parametrizes arm posture) for exoskeleton-based therapy. The arm IK is solved with a redundancy resolution criterion that chooses a swivel angle that allows the subject to retract the palm to the head efficiently. The approach in [17] extends their previous work in [18, 19] by considering the influence of the wrist orientation on the swivel angle estimation. Although the error of the swivel angle estimation (mean error ≈ 4 deg.) has been reported for compound movements [17], individual errors in the wrist, elbow, and GH joint angles are not indicated.Reference [20] extends the method in [17] to estimate the wrist angles and assesses its performance for compound movements (mean RMSE ≈ 10 deg. in the swivel angle estimation). Reference [20] reports the individual errors of the arm joint angles solely for the movement task where the swivel angle was best estimated (mean RMSE ≈ 5 deg. in the swivel angle estimation). No errors of the arm joint angles were discussed for the other cases. A limitation of the work in [20] is that the MOCAP used to obtain the reference angles to assess their method performance is a custom-made inertial system with no reported measurement accuracy.


### 2.1. Conclusions of the Literature Review

We remind the reader that the general context of this paper is the estimation of the GH joint angles.(1)
As per our literature review, no MOCAPs have been developed for the specific scenario of exoskeleton-based rehabilitation. Even if current MOCAPs and the exoskeleton could be set up for simultaneous use (e.g., [15, 16]), the setup protocol and operation are intricate and conflicting with the usual time and resources available for patient treatment.
(2)
Exoskeleton-based posture estimations present limitations in their accuracy due to kinematic mismatch of the limb and exoskeleton [15, 16].
(3)
The accuracy of the GH joint angle estimations provided by computational methods in [16, 17] is unknown. Reference [20] extends the work in [17] by estimating the wrist angles. Reference [20] solely reports the estimation accuracy of the GH angles for the best-case scenario and the precision of its ground-truth is not indicated.


### 2.2. Contributions of This Paper

In response to the limitations discussed in the estimation of patient joint angles in exoskeleton-based therapy (Sections2 and 2.1), this paper introduces a hybrid approach to estimate, in real-time, the GH joint angles. This hybrid system is composed of a low-cost marker-based vision system and the rehabilitation robot, overcoming the individual limitations of its constitutive subsystems:(a)
Occlusions are minimized, which are a major limitation of optical systems.
(b)
Accuracy of joint angle estimation is improved, which is a major limitation of exoskeleton-based systems.This paper presents the implementation and assessment of our method using simulated human motion data. In addition, a sensitivity analysis of our method accuracy to marker position estimation errors is carried out.We have considered the following scenarios of application for the proposed method in the RAR domain:(A)
Precise estimation of GH joint angles during rehabilitation or evaluation sessions of GH joint analytic movements.
(B)
Acquisition of GH joint movement data enabling validation and improvement of other posture estimation methods without using expensive redundant optical MOCAPs.


## 2.1. Conclusions of the Literature Review

We remind the reader that the general context of this paper is the estimation of the GH joint angles.(1)
As per our literature review, no MOCAPs have been developed for the specific scenario of exoskeleton-based rehabilitation. Even if current MOCAPs and the exoskeleton could be set up for simultaneous use (e.g., [15, 16]), the setup protocol and operation are intricate and conflicting with the usual time and resources available for patient treatment.
(2)
Exoskeleton-based posture estimations present limitations in their accuracy due to kinematic mismatch of the limb and exoskeleton [15, 16].
(3)
The accuracy of the GH joint angle estimations provided by computational methods in [16, 17] is unknown. Reference [20] extends the work in [17] by estimating the wrist angles. Reference [20] solely reports the estimation accuracy of the GH angles for the best-case scenario and the precision of its ground-truth is not indicated.


## 2.2. Contributions of This Paper

In response to the limitations discussed in the estimation of patient joint angles in exoskeleton-based therapy (Sections2 and 2.1), this paper introduces a hybrid approach to estimate, in real-time, the GH joint angles. This hybrid system is composed of a low-cost marker-based vision system and the rehabilitation robot, overcoming the individual limitations of its constitutive subsystems:(a)
Occlusions are minimized, which are a major limitation of optical systems.
(b)
Accuracy of joint angle estimation is improved, which is a major limitation of exoskeleton-based systems.This paper presents the implementation and assessment of our method using simulated human motion data. In addition, a sensitivity analysis of our method accuracy to marker position estimation errors is carried out.We have considered the following scenarios of application for the proposed method in the RAR domain:(A)
Precise estimation of GH joint angles during rehabilitation or evaluation sessions of GH joint analytic movements.
(B)
Acquisition of GH joint movement data enabling validation and improvement of other posture estimation methods without using expensive redundant optical MOCAPs.


## 3. Methods

### 3.1. Problem Definition

This section presents the problem of estimating the patient limb GH joint angles during the GH joint RAR using the proposed hybrid motion capture system (a detailed version of the problem definition is presented in the Appendix). This problem can be stated as follows.Given. Consider the following:(1)
Patient: (a) the kinematic model (e.g., the Denavit-Hartenberg parameters [21]) of the human upper limb (H) (Figure 2(a)).
(2)
Exoskeleton: (a) the kinematic model of the exoskeleton (E) and (b) the exoskeleton joint angles at any instant of the therapy (v
E
(
t
)) (Figure 2(b)).
(3)
Marker-based optical motion capture system (R): (a) color and depth information captured by the RGB-D cameras installed in the exoskeleton links and (b) geometry and color of the markers attached to the patient upper limb (Figure 2(c)).Figure 2
Components of the GH joint angles estimation system: (a) human kinematic model, (b) exoskeleton kinematic model, (c) marker-based optical motion capture system, and (d) hybrid GH joint angles estimation system.Goal. The goal is to estimate the patient GH joint angles (v
G
H
(
t
)) with minimum error during the GH joint rehabilitation exercises.


### 3.2. Kinematic Models

This section discusses the main features of the kinematic models of the human limb and exoskeleton used for the posture estimation method.


#### 3.2.1. Kinematic Model of the Human Upper Body

The human kinematic model is denoted byH
(
L
H
,
J
H
), where L
H and J
H are the sets of links and joints, respectively. We use the human upper body model presented in [16] (Figure 2(a)), which includes joints of the spine, scapuloclavicular system, and arm. The upper limb is modeled with 9 DOFs: 2 DOFs of the scapuloclavicular system, 3 DOFs of the GH joint (spherical joint), 2 DOFs of the elbow, and 2 DOFs of the wrist (see further details in the Appendix). This model presents the following advantages:(a)
It can be easily implemented in robotic simulators and similar tools.
(b)
It is suitable for simulating human-robot interaction in real-time [16].
(c)
The spherical model of the GH joint avoids limitations of other representations of such joint, like the Gimbal lock that occurs when using the three concurrent and orthogonal 1-DOF revolute joints’ model [22].


#### 3.2.2. Kinematic Model of the Exoskeleton

The exoskeleton kinematic model is denoted byE
(
L
E
,
J
E
), where L
E and J
E are the sets of links and joints, respectively. In this research, the rehabilitation exoskeleton used is the Armeo Spring (Figure 2(b)), which is a passive system that supports the weight of the patient’s arm [23] with springs. The Armeo kinematic structure includes rotational joints (equipped with encoders [24, 25]) and prismatic joints (enabling exoskeleton adjustment to the size of each patient). We use the Armeo Spring kinematic model presented in [16], which includes both types of joints (see further details in the Appendix).


### 3.3. GH Joint Angles Estimation Method

The aim of the method is to estimate the GH joint angles with respect to (w.r.t.) a coordinate system (CS) attached to the scapuloclavicular system. Figure2(d) shows the proposed system for the GH joint angle estimation. Our approach is based on the estimation of the upper arm orientation w.r.t. the acromion (Figure 3(a)). According to such requirements, the rationale to install the markers of the optical MOCAP R is as follows:(a)
Markerm
0 is rigidly installed in the acromion, so the estimated upper arm orientation can be expressed w.r.t. the m
0 CS (and therefore w.r.t. the scapuloclavicular system).
(b)
Markerm
1 is rigidly installed in the upper arm, so that all the rotations of the upper arm are captured by m
1. The region that was chosen to attach m
1 to the upper arm by using a custom-made fixation (Figure 2(d)) is the distal part of the humerus (near the elbow). Elbow rotations do not affect the orientation of m
1.Figure 3
(a) Schematic diagram of the hybrid GH joint angles estimation system and (b) high-level operation of the system.
(a)
(b)Reference [26] reports a five-marker installation procedure. This reference explicitly mentions five markers as an acceptable number for clinical upper limb tracking. In this paper, we report the usage of two markers for upper arm tracking. It is not possible to compare the performance of the marker placement protocol proposed here with the one in [26] because the work in [26] addresses (a) non-RAR scenarios, (b) tracking of the entire upper limb, and (c) protocol sensitivity w.r.t. its application on the dominant/nondominant arm and w.r.t. the age of test subjects. However, the work in [26] helps to establish the number of markers compatible with the clinical application of upper limb tracking.The cameras of the optical motion capture systemR are rigidly attached (using custom-made supports) to exoskeleton links so that camera r
0 detects marker m
0 and camera r
1 detects marker m
1 during the GH joint training. Camera r
0 is mounted on link l
0
E and camera r
1 is mounted on link l
8
E (Figure 3(a)).The cameras used in our system are of low cost. Commercial cameras that present similar specifications to the ones simulated here (Table1) are Intel® SR300 (99 USD) [27, 28], DepthSense® 525 (164 USD) [29, 30], and CamBoard p
i
c
o
S (690 USD) [28, 31].Table 1
Vision sensor features.
Color camera resolution (px)
128
×
128
Depth camera resolution (px)
128
×
128
Field of view (deg.)
Horizontal = 45; vertical = 45
Minimum sensing distance (meters)
0.05
Maximum sensing distance (meters)
0.3Figure3(b) shows an overview of the operation of the estimation method. In order to estimate the upper arm pose, the poses of the markers need to be expressed w.r.t. a common CS. A suitable CS to conduct such estimation is the exoskeleton base.A summary of the steps to estimate the GH joint angles is as follows:(1)
Estimate the pose of the markers w.r.t. the cameras.
(2)
Estimate the pose of the cameras w.r.t. the exoskeleton.
(3)
Estimate the pose of the markers w.r.t. the exoskeleton.
(4)
Estimate the upper arm pose w.r.t. the exoskeleton.
(5)
Refer the GH joint angles w.r.t. the acromion (markerm
0 CS).The details of the mentioned steps are presented in the following sections.


#### 3.3.1. Estimation of the Pose of the Markers w.r.t. the Cameras

The purpose of this step is to estimate the position and orientation of the markers (Figure4) w.r.t. the CSs of the cameras using the color and depth images provided by each camera r
i:(A)
The RGB image isI
i
c (A
×
B pixels). The pixel coordinates (
u
,
v
) take values 0
≤
u
≤
A
-
1 and 0
≤
v
≤
B
-
1. C
i (1
×
3
∗
A
∗
B) contains the RGB color associated with each pixel (
u
,
v
)
∈
I
i
c.
(B)
The depth image associated with the scene inI
i
c is I
i
d (L
×
N pixels); L
≤
A and N
≤
B. The pixel coordinates (
u
,
v
) in I
i
d take values 0
≤
u
≤
L
-
1 and 0
≤
v
≤
N
-
1. The CS of images I
i
c and I
i
d is coincident. D
i (1
×
L
∗
N
∗
3) contains the (x
,
y
,
z) coordinates of the object in each pixel (
u
,
v
)
∈
I
i
d w.r.t. the r
i CS.Figure 4
Schematic diagram of the iterative estimation of the pose of the markers.The pose estimation of the markers w.r.t. the cameras is based on the reconstruction of the 3D position of the colored disks on the markers. The following steps are taken to estimate the marker pose:(1)
Estimation of disk coordinates in color image (Figure5): the purpose of this step is to find the approximate (
u
,
v
) coordinates of the centers of the marker disks in image I
i
c. The following steps are carried out:
(a)
Color segmentation in imageI
i
c: image regions containing the colors of the marker disks are preserved and the other regions are colored in white. The resulting image is defined as I
i
s
c.
(b)
Blob extraction on imageI
i
s
c: blob extraction consists of finding the connected regions in the image I
i
s
c sharing the same color and labeling them according to their color.
(c)
Disk center coordinates estimation: for eachj (j
=
0
,
…
,
n) blob extracted from I
i
c, the position p
~
j
I
i
c
∈
Z
2 of the center of a bounding box for the blob is obtained. This point approximates the actual center of disk p
j
I
i
c (Figure 5). The resulting set of the approximate coordinates of disk centers in I
i
c is P
~
I
i
c
=
p
~
0
I
i
c
,
…
,
p
~
j
I
i
c
,
…
,
p
~
n
I
i
c. The Z
2 center coordinates are referenced w.r.t. the internal image CS. Blobs are extracted with standard connected-component labeling algorithms.
(2)
Estimation of disk coordinates in the camerar
i CS: this step converts disk coordinates in the internal image CS into the R
3 ones w.r.t. the r
i sensor CS, as follows:
(a)
Convert the positions(
u
,
v
) of the disk centers in set P
~
I
i
c into the image I
i
d CS. The CSs of images I
i
c and I
i
d match. Hence,(1)
p
~
j
I
i
d
=
L
-
1
A
-
1
0
0
N
-
1
B
-
1
p
~
j
I
i
c
.
(b)
Compute the indicesa
j
I
i
d of the (x
,
y
,
z) coordinates of point p
~
j
I
i
d in array D
i as follows:(2)
a
j
I
i
d
x
=
3
∗
p
~
j
I
i
d
u
+
L
∗
p
~
j
I
i
d
v
a
j
I
i
d
y
=
3
∗
p
~
j
I
i
d
u
+
L
∗
p
~
j
I
i
d
v
+
1
a
j
I
i
d
z
=
3
∗
p
~
j
I
i
d
u
+
L
∗
p
~
j
I
i
d
v
+
2
.
The pointp
~
j
r
i contains the (x
,
y
,
z) coordinates of point p
~
j
I
i
d w.r.t. the r
i CS. The coordinates of point p
~
j
r
i are obtained as follows:(3)
p
~
j
r
i
x
=
D
i
a
j
I
i
d
x
p
~
j
r
i
y
=
D
i
a
j
I
i
d
y
p
~
j
r
i
z
=
D
i
a
j
I
i
d
z
.
The approximate marker disk centers detected by camerar
i form the set P
~
r
i
=
p
~
0
r
i
,
…
,
p
~
j
r
i
,
…
,
p
~
n
r
i.
(3)
Computation of the markerm
i CS in the r
i camera CS: an S
O
(
3
) coordinate frame T
m
i
r
i
=
V
x
^
V
y
^
V
z
^
O
m
i is attached to each marker:
(a)
Make(4)
O
m
i
=
1
n
+
1
∑
j
=
0
n
p
~
j
r
i
.
(b)
Use the four disk centers in the marker (Figure5) as follows:(5)
V
x
→
=
1
2
p
~
0
r
i
-
p
~
1
r
i
+
p
~
2
r
i
-
p
~
3
r
i
V
y
→
=
1
2
p
~
2
r
i
-
p
~
0
r
i
+
p
~
3
r
i
-
p
~
1
r
i
V
z
^
=
V
x
^
×
V
y
^
.
The submatrixV
x
^
V
y
^
V
z
^ is normalized to guarantee its S
O
(
3
) nature. The frame T
~
m
i
r
i describes the estimated pose of marker m
i w.r.t. the CS of the camera r
i.Figure 5
Estimation of disk coordinates in color image. (a) Simulated RBG image, (b) result of the color segmentation (zoomed image), and (c) result of the blob extraction (zoomed image).
(a)
(b)
(c)


#### 3.3.2. Estimation of the Pose of the Cameras w.r.t. the Exoskeleton

The goal of this step is to find the transformationT
r
i
E, which expresses the pose of the camera r
i w.r.t. the base of the exoskeleton (Figure 6).Figure 6
Schematic diagram of the iterative estimation of the pose of the cameras.The rigid transformation matricesT
r
0
l
0
E and T
r
1
l
8
E
∈
R
4
×
4, which describe the pose of the cameras r
i w.r.t. the CS of the link where they are installed, are estimated during system calibration (the calibration matrix can be obtained by camera detection of a 2D/3D calibration object mounted on a known location of the exoskeleton). The poses T
l
0
E
E and T
l
8
E
E of the exoskeleton links l
0
E and l
8
E w.r.t. to the exoskeleton base CS are computed using the Forward Kinematics of exoskeleton E. Then, T
r
0
E and T
r
1
E are estimated as follows:(6)
T
~
r
0
E
=
T
~
l
0
E
E
∗
T
~
r
0
l
0
E
T
~
r
1
E
=
T
~
l
8
E
E
∗
T
~
r
1
l
8
E
.


#### 3.3.3. Estimation of the Pose of the Markers w.r.t. the Exoskeleton

The objective of this step is to estimate the transformation (T
m
i
E) that describes the pose of marker m
i w.r.t. the exoskeleton base CS (Figure 7). Transformations T
m
i
E are estimated as follows:(7)
T
~
m
0
E
=
T
~
r
0
E
∗
T
~
m
0
r
0
T
~
m
1
E
=
T
~
r
1
E
∗
T
~
m
1
r
1
.Figure 7
Schematic diagram of the iterative estimation of the pose of the markers w.r.t. the exoskeleton CS.


#### 3.3.4. Estimation of the Upper Arm Pose w.r.t. the Exoskeleton

The purpose of this step is to estimate the upper arm pose (T
a
r
m
E) w.r.t. the exoskeleton base CS using the marker poses T
m
i
E (Figure 8). The upper arm direction vector is computed from the estimated position of the end-points of the upper arm (GH and elbow joint centers) as follows (CSs in Figure 9):(1)
Estimate the position of the GH joint center: the rigid transformation matrixT
G
m
0, which expresses the pose of the GH joint CS w.r.t. the m
0 CS, is estimated during the calibration process of the system. Hence, the GH joint center is estimated as follows:
(a)
EstimateT
G
E, which is the pose of the GH joint CS w.r.t. the exoskeleton E base CS (see (8)).
(b)
Extractp
G
E from T
G
E. The point p
G
E is the position of the center of the GH joint seen from the E CS:(8)
T
~
G
E
=
T
~
m
0
E
∗
T
~
G
m
0
.
(2)
Estimate the position of the elbow joint center: the rigid transformation matrixT
e
l
w
m
1 (elbow joint CS w.r.t. the m
1 CS) is estimated during the calibration process of the system. Hence, the elbow joint center is computed as follows:
(a)
EstimateT
e
l
w
E, which is the pose of the elbow joint CS w.r.t. the exoskeleton E base CS (see (9)).
(b)
Extractp
e
l
w
E from T
e
l
w
E. The point p
e
l
w
E is the position of the center of the elbow joint seen from the E CS:(9)
T
~
e
l
w
E
=
T
~
m
1
E
∗
T
~
e
l
w
m
1
.
(3)
Estimate the upper arm position:
(a)
Estimate the arm direction vector asV
^
a
r
m
=
(
p
~
G
E
-
p
~
e
l
w
E
)
/
p
~
G
E
-
p
~
e
l
w
E.
(b)
Estimate the origin of the upper arm CS asp
~
a
r
m
E
=
1
/
2
∗
V
→
a
r
m
∗
V
^
a
r
m
+
p
~
e
l
w
E.
(4)
Estimate the upper arm orientation: the estimated orientation of the upper arm is computed using Euler angley
x
z decomposition w.r.t. the base CS of exoskeleton E:
(a)
Estimate the rotation of the arm around they-axis of the E CS using the projection of V
^
a
r
m on the x
-
z plane of the fixed E CS.
(b)
Compute the rotation of the arm around the mobilex-axis of E CS from the inner product of V
^
a
r
m with the mobile z-axis of E CS.
(c)
Estimate the rotation of the upper arm around its longitudinal axisV
→
a
r
m as the rotation of the marker m
1 around vector V
^
a
r
m. This angle is the one between (i) the mobile x-axis of E CS and (ii) the projection of x-axis of marker m
1 CS onto the x
-
y plane of E CS.
(5)
Express the pose of the upper arm w.r.t. theE base CS as the 4
×
4 rigid transformation T
a
r
m
E.Figure 8
Schematic diagram of the iterative estimation of the upper arm pose.Figure 9
Coordinate systems for the upper arm pose estimation.


#### 3.3.5. Refer the Angles of the GH Joint w.r.t. the Acromion

Sincem
0 is rigidly attached to the acromion, the upper arm orientation can be expressed w.r.t. the acromion by using the inverse of T
m
0
E:(10)
T
~
a
r
m
m
0
=
T
~
E
m
0
∗
T
~
a
r
m
E
.


### 3.4. Implementation and Simulation

The arm posture estimation method was implemented by using the V-REP robotics simulator [32]. In the simulator, the scene in Figure 2(d) is created, which includes the models of (a) a human patient, (b) an Armeo Spring, (c) the RGB-D vision sensors with the couplings to attach them to the exoskeleton, and (d) the planar markers with the couplings to attach them to the human arm. The configuration of the simulated vision sensors is summarized in Table 1.For the estimation of the coordinates of disk centersP
I
i
c in the image I
i
c, color segmentation and blob detection algorithms available in the simulator were used. Additional code was written to sort blob centers by color. All additional code was written in LUA (lightweight embeddable scripting language) scripts.


#### 3.4.1. Generation of the Ground-Truth Poses of the Patient Upper Limb during RAR

The accuracy of the proposed method is determined by comparing its estimations of the upper arm poses with the ones of the simulated human patient (ground-truth values ofT
a
r
m
m
0). To generate movements of the simulated patient that resemble the ones of therapy, we performed the next steps:(1)
Armeo movement generation: we recorded 4 time sequence datasets of the actual Armeo joint measurements (sampled at 66.6 Hz) while performing the following shoulder movements (Figure10): (a) shoulder horizontal abduction-adduction (SAbAd), (b) shoulder flexion-extension (SFE), (c) shoulder internal rotation (SIR), and (d) a combination of all the mentioned movements (COMB). These movement history datasets are used to guide a simulation of the Armeo model.
(2)
Patient movement generation: the movements of the patient upper limb that correspond to the recorded movements of the Armeo are computer-generated with the method in [16]. The said method provides an estimation of the patient posture given the joint angles of the exoskeleton by using an inverse kinematics approach.Figure 10
GH joint movements: (a) shoulder flexion-extension (SFE), (b) shoulder horizontal abduction-adduction (SAbAd), and (c) shoulder internal rotation (SIR).
(a)
(b)
(c)In this way, four sets (one per movement dataset) of known poses of the upper arm are obtained by simulating patient movement and compared here against those estimated with our method. Our method accuracy is assessed without compensating any time offsets between the reference and estimated angles. In this way, real-time accuracy of the method is assessed. Table2 presents the approximate amplitudes of the y
x
z Euler angle decomposition of the GH joint movements of the simulated patient w.r.t. its local CS.Table 2
Movement dataset features.
Movement dataset
Amplitude (deg.)
Samples
SAbAd
(6°, 31°, 10°)
1000
SFE
(31°, 8°, 1°)
1000
SIR
(3°, 3°, 34°)
1000
COMB
(40°, 90°, 60°)
2000


#### 3.4.2. Measurement of the Estimation Performance

(1)
Error in the estimation of the markers position: the error in the position estimation of markersm
i is computed as the RMS of expression e
p
o
s
m
i
=
p
m
i
E
-
p
~
m
i
E, where i
∈
0,1.
(2)
Error in the estimation of the arm pose: the error in the arm position estimation for a GH joint movement dataset (e
p
o
s
a
r
m) is computed as the RMS of p
a
r
m
m
0
-
p
~
a
r
m
m
0 for all samples in the movement dataset.
To quantify the error in the arm orientation estimation (e
o
r
i
a
r
m), the next steps are carried out:
(a)
Compute the matrix of rotation errorR
o
t
e
r
r
o
r
=
R
o
t
a
r
m
m
0
∗
R
o
t
~
a
r
m
m
0
-
1, where R
o
t
a
r
m
m
0 and R
o
t
~
a
r
m
m
0 are the rotation submatrices of transformation matrices T
a
r
m
m
0 and T
~
a
r
m
m
0, respectively.
(b)
ExpressR
o
t
e
r
r
o
r in exponential map notation [22] as e
o
r
i
a
r
m
→
∈
R
3.
(c)
Computee
o
r
i
a
r
m as the RMS of e
o
r
i
a
r
m
→ for all samples in the movement dataset.


### 3.5. Sensitivity Analysis

A sensitivity analysis is carried out to study the influence of relevant parameters on the method accuracy. Formally, the sensitivity analysis determines the effect of the perturbation of the parameterQ on the objective function F
(
Q
). The relative sensitivity of F
(
Q
) w.r.t. Q, S
Q
F, is given by (11) [33]. The value of S
Q
F is the ratio (dimensionless) between the percentual changes in F and Q:(11)
S
Q
F
=
∂
F
/
F
∂
Q
/
Q
=
∂
ln
⁡
F
∂
ln
⁡
Q
.The upper arm pose accuracy (and, therefore, that of the GH joint angles) relies on the precise estimation of the position of the centers of the elbow and GH joints (p
~
e
l
w
E and p
~
G
E) (Section 3.3.4), which ultimately depend on the following transformations involving the markers:(a)
T
~
m
0
E and T
~
m
1
E (markers w.r.t. exoskeleton).
(b)
T
G
m
0 and T
e
l
w
m
1 (GH and elbow joints w.r.t. markers).The conducted sensitivity analysis focuses on errors inT
G
m
0 and T
e
l
w
m
1, given that errors in the estimation of T
~
m
0
E and T
~
m
1
E (Section 4.2) are small. Possible causes of errors in T
G
m
0 and T
e
l
w
m
1 are as follows:(1)
Inaccurate computation ofT
G
m
0 and T
e
l
w
m
1 during the system calibration.
(2)
Relative displacement of the markers w.r.t. the GH and elbow joints due to skin movement.In the sensitivity analysis, translations errors in matricesT
G
m
0 and T
e
l
w
m
1 are induced by disturbing the location of the markers m
k (k
=
0,1) w.r.t. the CSs of the GH and elbow joints. Since orientation information in T
G
m
0 and T
e
l
w
m
1 is not used to estimate the upper arm pose, it is excluded from the sensitivity analysis.For the sensitivity analysis (see (11)), the vector-valued function F
(
q
) quantifies the estimation error of the arm position and orientation (see (12)) and the parameter set q represents the marker translation errors. The parameter set q is defined as q
=
q
1
,
q
2
,
q
3
,
q
4
,
q
5
,
q
6, where each q
j
∈
q is a scalar representing the magnitude of a translation of a specific marker along a prescribed direction. Table 3 describes the meaning of each parameter in set q:(12)
F
q
=
e
p
o
s
a
r
m
q
,
e
o
r
i
a
r
m
q
;
F
q
:
R
6
⟶
R
2
.Table 3
Parameters of functionF
(
q
) (error in the position and orientation estimation of the upper arm (see (12))) to study in the sensitivity analysis.
Parameter
Meaning
CS of reference
q
1
Translation with magnitudeq
1 of m
0 along x-axis
GH joint
q
2
Translation with magnitudeq
2 of m
0 along y-axis
GH joint
q
3
Translation with magnitudeq
3 of m
0 along z-axis
GH joint
q
4
Translation with magnitudeq
4 of m
1 along x-axis
Elbow joint
q
5
Translation with magnitudeq
5 of m
1 along y-axis
Elbow joint
q
6
Translation with magnitudeq
6 of m
1 along z-axis
Elbow jointThe sensitivity analysis procedure (Figure11) entails the following steps:(1)
Load the movement dataset of the GH joint to test (SFE, SAbAd, SIR, and COMB).
(2)
Select the parameterq
j
∈
q to perturb (selection of a marker and a direction of translation). Marker m
0 translates along axes of the GH joint CS. Marker m
1 translates along axes of the elbow joint CS (Figure 12).
(3)
Apply the translation indicated byq
j to the corresponding marker. The marker perturbation q
j is applied for the complete movement dataset.
(4)
Compute the estimation errors of the upper arm position and orientationF
i
(
q
)
=
(
e
p
o
s
a
r
m
i
(
q
)
,
e
o
r
i
a
r
m
i
(
q
)
) as the simulated patient moves according to the chosen GH joint movement dataset. The current iteration of the process is indicated by index i.
(5)
Compute the position and orientation components ofS
q
j
F as per (11). The derivative of F
(
q
) w.r.t. q
j is given by (13). The required derivatives are computed numerically [34, 35]:(13)
∂
F
q
∂
q
j
=
∂
e
p
o
s
a
r
m
q
∂
q
j
,
∂
e
o
r
i
a
r
m
q
∂
q
j
.
(6)
Incrementq
j by Δ
q and go to step (
3
). Repeat the process until the desired number of iterations i of the procedure is reached.Figure 11
Sensitivity analysis steps.Figure 12
Sensitivity analysis. Coordinate systems of reference for the translations of (a) markerm
0 and (b) marker m
1.
(a)
(b)The complete sensitivity analysis was performed for each movement dataset (SFE, SAbAd, SIR, and COMB). The directions in which marker translations occur (Table3) are chosen so that the markers do not leave the detection volume of the cameras. Table 4 summarizes the parameters of the sensitivity analysis. Translation units are in meters (mts).Table 4
Parameters of the sensitivity analysis.
Minimum marker translationq
m
i
n (mts)
0
Maximum iterations of the sensitivity analysisi
m
a
x
10
Increment of marker translation in each iterationΔ
q (mts)
0.002
Movement datasets evaluated
4


## 3.1. Problem Definition

This section presents the problem of estimating the patient limb GH joint angles during the GH joint RAR using the proposed hybrid motion capture system (a detailed version of the problem definition is presented in the Appendix). This problem can be stated as follows.Given. Consider the following:(1)
Patient: (a) the kinematic model (e.g., the Denavit-Hartenberg parameters [21]) of the human upper limb (H) (Figure 2(a)).
(2)
Exoskeleton: (a) the kinematic model of the exoskeleton (E) and (b) the exoskeleton joint angles at any instant of the therapy (v
E
(
t
)) (Figure 2(b)).
(3)
Marker-based optical motion capture system (R): (a) color and depth information captured by the RGB-D cameras installed in the exoskeleton links and (b) geometry and color of the markers attached to the patient upper limb (Figure 2(c)).Figure 2
Components of the GH joint angles estimation system: (a) human kinematic model, (b) exoskeleton kinematic model, (c) marker-based optical motion capture system, and (d) hybrid GH joint angles estimation system.Goal. The goal is to estimate the patient GH joint angles (v
G
H
(
t
)) with minimum error during the GH joint rehabilitation exercises.


## 3.2. Kinematic Models

This section discusses the main features of the kinematic models of the human limb and exoskeleton used for the posture estimation method.


### 3.2.1. Kinematic Model of the Human Upper Body

The human kinematic model is denoted byH
(
L
H
,
J
H
), where L
H and J
H are the sets of links and joints, respectively. We use the human upper body model presented in [16] (Figure 2(a)), which includes joints of the spine, scapuloclavicular system, and arm. The upper limb is modeled with 9 DOFs: 2 DOFs of the scapuloclavicular system, 3 DOFs of the GH joint (spherical joint), 2 DOFs of the elbow, and 2 DOFs of the wrist (see further details in the Appendix). This model presents the following advantages:(a)
It can be easily implemented in robotic simulators and similar tools.
(b)
It is suitable for simulating human-robot interaction in real-time [16].
(c)
The spherical model of the GH joint avoids limitations of other representations of such joint, like the Gimbal lock that occurs when using the three concurrent and orthogonal 1-DOF revolute joints’ model [22].


### 3.2.2. Kinematic Model of the Exoskeleton

The exoskeleton kinematic model is denoted byE
(
L
E
,
J
E
), where L
E and J
E are the sets of links and joints, respectively. In this research, the rehabilitation exoskeleton used is the Armeo Spring (Figure 2(b)), which is a passive system that supports the weight of the patient’s arm [23] with springs. The Armeo kinematic structure includes rotational joints (equipped with encoders [24, 25]) and prismatic joints (enabling exoskeleton adjustment to the size of each patient). We use the Armeo Spring kinematic model presented in [16], which includes both types of joints (see further details in the Appendix).


## 3.2.1. Kinematic Model of the Human Upper Body

The human kinematic model is denoted byH
(
L
H
,
J
H
), where L
H and J
H are the sets of links and joints, respectively. We use the human upper body model presented in [16] (Figure 2(a)), which includes joints of the spine, scapuloclavicular system, and arm. The upper limb is modeled with 9 DOFs: 2 DOFs of the scapuloclavicular system, 3 DOFs of the GH joint (spherical joint), 2 DOFs of the elbow, and 2 DOFs of the wrist (see further details in the Appendix). This model presents the following advantages:(a)
It can be easily implemented in robotic simulators and similar tools.
(b)
It is suitable for simulating human-robot interaction in real-time [16].
(c)
The spherical model of the GH joint avoids limitations of other representations of such joint, like the Gimbal lock that occurs when using the three concurrent and orthogonal 1-DOF revolute joints’ model [22].


## 3.2.2. Kinematic Model of the Exoskeleton

The exoskeleton kinematic model is denoted byE
(
L
E
,
J
E
), where L
E and J
E are the sets of links and joints, respectively. In this research, the rehabilitation exoskeleton used is the Armeo Spring (Figure 2(b)), which is a passive system that supports the weight of the patient’s arm [23] with springs. The Armeo kinematic structure includes rotational joints (equipped with encoders [24, 25]) and prismatic joints (enabling exoskeleton adjustment to the size of each patient). We use the Armeo Spring kinematic model presented in [16], which includes both types of joints (see further details in the Appendix).


## 3.3. GH Joint Angles Estimation Method

The aim of the method is to estimate the GH joint angles with respect to (w.r.t.) a coordinate system (CS) attached to the scapuloclavicular system. Figure2(d) shows the proposed system for the GH joint angle estimation. Our approach is based on the estimation of the upper arm orientation w.r.t. the acromion (Figure 3(a)). According to such requirements, the rationale to install the markers of the optical MOCAP R is as follows:(a)
Markerm
0 is rigidly installed in the acromion, so the estimated upper arm orientation can be expressed w.r.t. the m
0 CS (and therefore w.r.t. the scapuloclavicular system).
(b)
Markerm
1 is rigidly installed in the upper arm, so that all the rotations of the upper arm are captured by m
1. The region that was chosen to attach m
1 to the upper arm by using a custom-made fixation (Figure 2(d)) is the distal part of the humerus (near the elbow). Elbow rotations do not affect the orientation of m
1.Figure 3
(a) Schematic diagram of the hybrid GH joint angles estimation system and (b) high-level operation of the system.
(a)
(b)Reference [26] reports a five-marker installation procedure. This reference explicitly mentions five markers as an acceptable number for clinical upper limb tracking. In this paper, we report the usage of two markers for upper arm tracking. It is not possible to compare the performance of the marker placement protocol proposed here with the one in [26] because the work in [26] addresses (a) non-RAR scenarios, (b) tracking of the entire upper limb, and (c) protocol sensitivity w.r.t. its application on the dominant/nondominant arm and w.r.t. the age of test subjects. However, the work in [26] helps to establish the number of markers compatible with the clinical application of upper limb tracking.The cameras of the optical motion capture systemR are rigidly attached (using custom-made supports) to exoskeleton links so that camera r
0 detects marker m
0 and camera r
1 detects marker m
1 during the GH joint training. Camera r
0 is mounted on link l
0
E and camera r
1 is mounted on link l
8
E (Figure 3(a)).The cameras used in our system are of low cost. Commercial cameras that present similar specifications to the ones simulated here (Table1) are Intel® SR300 (99 USD) [27, 28], DepthSense® 525 (164 USD) [29, 30], and CamBoard p
i
c
o
S (690 USD) [28, 31].Table 1
Vision sensor features.
Color camera resolution (px)
128
×
128
Depth camera resolution (px)
128
×
128
Field of view (deg.)
Horizontal = 45; vertical = 45
Minimum sensing distance (meters)
0.05
Maximum sensing distance (meters)
0.3Figure3(b) shows an overview of the operation of the estimation method. In order to estimate the upper arm pose, the poses of the markers need to be expressed w.r.t. a common CS. A suitable CS to conduct such estimation is the exoskeleton base.A summary of the steps to estimate the GH joint angles is as follows:(1)
Estimate the pose of the markers w.r.t. the cameras.
(2)
Estimate the pose of the cameras w.r.t. the exoskeleton.
(3)
Estimate the pose of the markers w.r.t. the exoskeleton.
(4)
Estimate the upper arm pose w.r.t. the exoskeleton.
(5)
Refer the GH joint angles w.r.t. the acromion (markerm
0 CS).The details of the mentioned steps are presented in the following sections.


### 3.3.1. Estimation of the Pose of the Markers w.r.t. the Cameras

The purpose of this step is to estimate the position and orientation of the markers (Figure4) w.r.t. the CSs of the cameras using the color and depth images provided by each camera r
i:(A)
The RGB image isI
i
c (A
×
B pixels). The pixel coordinates (
u
,
v
) take values 0
≤
u
≤
A
-
1 and 0
≤
v
≤
B
-
1. C
i (1
×
3
∗
A
∗
B) contains the RGB color associated with each pixel (
u
,
v
)
∈
I
i
c.
(B)
The depth image associated with the scene inI
i
c is I
i
d (L
×
N pixels); L
≤
A and N
≤
B. The pixel coordinates (
u
,
v
) in I
i
d take values 0
≤
u
≤
L
-
1 and 0
≤
v
≤
N
-
1. The CS of images I
i
c and I
i
d is coincident. D
i (1
×
L
∗
N
∗
3) contains the (x
,
y
,
z) coordinates of the object in each pixel (
u
,
v
)
∈
I
i
d w.r.t. the r
i CS.Figure 4
Schematic diagram of the iterative estimation of the pose of the markers.The pose estimation of the markers w.r.t. the cameras is based on the reconstruction of the 3D position of the colored disks on the markers. The following steps are taken to estimate the marker pose:(1)
Estimation of disk coordinates in color image (Figure5): the purpose of this step is to find the approximate (
u
,
v
) coordinates of the centers of the marker disks in image I
i
c. The following steps are carried out:
(a)
Color segmentation in imageI
i
c: image regions containing the colors of the marker disks are preserved and the other regions are colored in white. The resulting image is defined as I
i
s
c.
(b)
Blob extraction on imageI
i
s
c: blob extraction consists of finding the connected regions in the image I
i
s
c sharing the same color and labeling them according to their color.
(c)
Disk center coordinates estimation: for eachj (j
=
0
,
…
,
n) blob extracted from I
i
c, the position p
~
j
I
i
c
∈
Z
2 of the center of a bounding box for the blob is obtained. This point approximates the actual center of disk p
j
I
i
c (Figure 5). The resulting set of the approximate coordinates of disk centers in I
i
c is P
~
I
i
c
=
p
~
0
I
i
c
,
…
,
p
~
j
I
i
c
,
…
,
p
~
n
I
i
c. The Z
2 center coordinates are referenced w.r.t. the internal image CS. Blobs are extracted with standard connected-component labeling algorithms.
(2)
Estimation of disk coordinates in the camerar
i CS: this step converts disk coordinates in the internal image CS into the R
3 ones w.r.t. the r
i sensor CS, as follows:
(a)
Convert the positions(
u
,
v
) of the disk centers in set P
~
I
i
c into the image I
i
d CS. The CSs of images I
i
c and I
i
d match. Hence,(1)
p
~
j
I
i
d
=
L
-
1
A
-
1
0
0
N
-
1
B
-
1
p
~
j
I
i
c
.
(b)
Compute the indicesa
j
I
i
d of the (x
,
y
,
z) coordinates of point p
~
j
I
i
d in array D
i as follows:(2)
a
j
I
i
d
x
=
3
∗
p
~
j
I
i
d
u
+
L
∗
p
~
j
I
i
d
v
a
j
I
i
d
y
=
3
∗
p
~
j
I
i
d
u
+
L
∗
p
~
j
I
i
d
v
+
1
a
j
I
i
d
z
=
3
∗
p
~
j
I
i
d
u
+
L
∗
p
~
j
I
i
d
v
+
2
.
The pointp
~
j
r
i contains the (x
,
y
,
z) coordinates of point p
~
j
I
i
d w.r.t. the r
i CS. The coordinates of point p
~
j
r
i are obtained as follows:(3)
p
~
j
r
i
x
=
D
i
a
j
I
i
d
x
p
~
j
r
i
y
=
D
i
a
j
I
i
d
y
p
~
j
r
i
z
=
D
i
a
j
I
i
d
z
.
The approximate marker disk centers detected by camerar
i form the set P
~
r
i
=
p
~
0
r
i
,
…
,
p
~
j
r
i
,
…
,
p
~
n
r
i.
(3)
Computation of the markerm
i CS in the r
i camera CS: an S
O
(
3
) coordinate frame T
m
i
r
i
=
V
x
^
V
y
^
V
z
^
O
m
i is attached to each marker:
(a)
Make(4)
O
m
i
=
1
n
+
1
∑
j
=
0
n
p
~
j
r
i
.
(b)
Use the four disk centers in the marker (Figure5) as follows:(5)
V
x
→
=
1
2
p
~
0
r
i
-
p
~
1
r
i
+
p
~
2
r
i
-
p
~
3
r
i
V
y
→
=
1
2
p
~
2
r
i
-
p
~
0
r
i
+
p
~
3
r
i
-
p
~
1
r
i
V
z
^
=
V
x
^
×
V
y
^
.
The submatrixV
x
^
V
y
^
V
z
^ is normalized to guarantee its S
O
(
3
) nature. The frame T
~
m
i
r
i describes the estimated pose of marker m
i w.r.t. the CS of the camera r
i.Figure 5
Estimation of disk coordinates in color image. (a) Simulated RBG image, (b) result of the color segmentation (zoomed image), and (c) result of the blob extraction (zoomed image).
(a)
(b)
(c)


### 3.3.2. Estimation of the Pose of the Cameras w.r.t. the Exoskeleton

The goal of this step is to find the transformationT
r
i
E, which expresses the pose of the camera r
i w.r.t. the base of the exoskeleton (Figure 6).Figure 6
Schematic diagram of the iterative estimation of the pose of the cameras.The rigid transformation matricesT
r
0
l
0
E and T
r
1
l
8
E
∈
R
4
×
4, which describe the pose of the cameras r
i w.r.t. the CS of the link where they are installed, are estimated during system calibration (the calibration matrix can be obtained by camera detection of a 2D/3D calibration object mounted on a known location of the exoskeleton). The poses T
l
0
E
E and T
l
8
E
E of the exoskeleton links l
0
E and l
8
E w.r.t. to the exoskeleton base CS are computed using the Forward Kinematics of exoskeleton E. Then, T
r
0
E and T
r
1
E are estimated as follows:(6)
T
~
r
0
E
=
T
~
l
0
E
E
∗
T
~
r
0
l
0
E
T
~
r
1
E
=
T
~
l
8
E
E
∗
T
~
r
1
l
8
E
.


### 3.3.3. Estimation of the Pose of the Markers w.r.t. the Exoskeleton

The objective of this step is to estimate the transformation (T
m
i
E) that describes the pose of marker m
i w.r.t. the exoskeleton base CS (Figure 7). Transformations T
m
i
E are estimated as follows:(7)
T
~
m
0
E
=
T
~
r
0
E
∗
T
~
m
0
r
0
T
~
m
1
E
=
T
~
r
1
E
∗
T
~
m
1
r
1
.Figure 7
Schematic diagram of the iterative estimation of the pose of the markers w.r.t. the exoskeleton CS.


### 3.3.4. Estimation of the Upper Arm Pose w.r.t. the Exoskeleton

The purpose of this step is to estimate the upper arm pose (T
a
r
m
E) w.r.t. the exoskeleton base CS using the marker poses T
m
i
E (Figure 8). The upper arm direction vector is computed from the estimated position of the end-points of the upper arm (GH and elbow joint centers) as follows (CSs in Figure 9):(1)
Estimate the position of the GH joint center: the rigid transformation matrixT
G
m
0, which expresses the pose of the GH joint CS w.r.t. the m
0 CS, is estimated during the calibration process of the system. Hence, the GH joint center is estimated as follows:
(a)
EstimateT
G
E, which is the pose of the GH joint CS w.r.t. the exoskeleton E base CS (see (8)).
(b)
Extractp
G
E from T
G
E. The point p
G
E is the position of the center of the GH joint seen from the E CS:(8)
T
~
G
E
=
T
~
m
0
E
∗
T
~
G
m
0
.
(2)
Estimate the position of the elbow joint center: the rigid transformation matrixT
e
l
w
m
1 (elbow joint CS w.r.t. the m
1 CS) is estimated during the calibration process of the system. Hence, the elbow joint center is computed as follows:
(a)
EstimateT
e
l
w
E, which is the pose of the elbow joint CS w.r.t. the exoskeleton E base CS (see (9)).
(b)
Extractp
e
l
w
E from T
e
l
w
E. The point p
e
l
w
E is the position of the center of the elbow joint seen from the E CS:(9)
T
~
e
l
w
E
=
T
~
m
1
E
∗
T
~
e
l
w
m
1
.
(3)
Estimate the upper arm position:
(a)
Estimate the arm direction vector asV
^
a
r
m
=
(
p
~
G
E
-
p
~
e
l
w
E
)
/
p
~
G
E
-
p
~
e
l
w
E.
(b)
Estimate the origin of the upper arm CS asp
~
a
r
m
E
=
1
/
2
∗
V
→
a
r
m
∗
V
^
a
r
m
+
p
~
e
l
w
E.
(4)
Estimate the upper arm orientation: the estimated orientation of the upper arm is computed using Euler angley
x
z decomposition w.r.t. the base CS of exoskeleton E:
(a)
Estimate the rotation of the arm around they-axis of the E CS using the projection of V
^
a
r
m on the x
-
z plane of the fixed E CS.
(b)
Compute the rotation of the arm around the mobilex-axis of E CS from the inner product of V
^
a
r
m with the mobile z-axis of E CS.
(c)
Estimate the rotation of the upper arm around its longitudinal axisV
→
a
r
m as the rotation of the marker m
1 around vector V
^
a
r
m. This angle is the one between (i) the mobile x-axis of E CS and (ii) the projection of x-axis of marker m
1 CS onto the x
-
y plane of E CS.
(5)
Express the pose of the upper arm w.r.t. theE base CS as the 4
×
4 rigid transformation T
a
r
m
E.Figure 8
Schematic diagram of the iterative estimation of the upper arm pose.Figure 9
Coordinate systems for the upper arm pose estimation.


### 3.3.5. Refer the Angles of the GH Joint w.r.t. the Acromion

Sincem
0 is rigidly attached to the acromion, the upper arm orientation can be expressed w.r.t. the acromion by using the inverse of T
m
0
E:(10)
T
~
a
r
m
m
0
=
T
~
E
m
0
∗
T
~
a
r
m
E
.


## 3.3.1. Estimation of the Pose of the Markers w.r.t. the Cameras

The purpose of this step is to estimate the position and orientation of the markers (Figure4) w.r.t. the CSs of the cameras using the color and depth images provided by each camera r
i:(A)
The RGB image isI
i
c (A
×
B pixels). The pixel coordinates (
u
,
v
) take values 0
≤
u
≤
A
-
1 and 0
≤
v
≤
B
-
1. C
i (1
×
3
∗
A
∗
B) contains the RGB color associated with each pixel (
u
,
v
)
∈
I
i
c.
(B)
The depth image associated with the scene inI
i
c is I
i
d (L
×
N pixels); L
≤
A and N
≤
B. The pixel coordinates (
u
,
v
) in I
i
d take values 0
≤
u
≤
L
-
1 and 0
≤
v
≤
N
-
1. The CS of images I
i
c and I
i
d is coincident. D
i (1
×
L
∗
N
∗
3) contains the (x
,
y
,
z) coordinates of the object in each pixel (
u
,
v
)
∈
I
i
d w.r.t. the r
i CS.Figure 4
Schematic diagram of the iterative estimation of the pose of the markers.The pose estimation of the markers w.r.t. the cameras is based on the reconstruction of the 3D position of the colored disks on the markers. The following steps are taken to estimate the marker pose:(1)
Estimation of disk coordinates in color image (Figure5): the purpose of this step is to find the approximate (
u
,
v
) coordinates of the centers of the marker disks in image I
i
c. The following steps are carried out:
(a)
Color segmentation in imageI
i
c: image regions containing the colors of the marker disks are preserved and the other regions are colored in white. The resulting image is defined as I
i
s
c.
(b)
Blob extraction on imageI
i
s
c: blob extraction consists of finding the connected regions in the image I
i
s
c sharing the same color and labeling them according to their color.
(c)
Disk center coordinates estimation: for eachj (j
=
0
,
…
,
n) blob extracted from I
i
c, the position p
~
j
I
i
c
∈
Z
2 of the center of a bounding box for the blob is obtained. This point approximates the actual center of disk p
j
I
i
c (Figure 5). The resulting set of the approximate coordinates of disk centers in I
i
c is P
~
I
i
c
=
p
~
0
I
i
c
,
…
,
p
~
j
I
i
c
,
…
,
p
~
n
I
i
c. The Z
2 center coordinates are referenced w.r.t. the internal image CS. Blobs are extracted with standard connected-component labeling algorithms.
(2)
Estimation of disk coordinates in the camerar
i CS: this step converts disk coordinates in the internal image CS into the R
3 ones w.r.t. the r
i sensor CS, as follows:
(a)
Convert the positions(
u
,
v
) of the disk centers in set P
~
I
i
c into the image I
i
d CS. The CSs of images I
i
c and I
i
d match. Hence,(1)
p
~
j
I
i
d
=
L
-
1
A
-
1
0
0
N
-
1
B
-
1
p
~
j
I
i
c
.
(b)
Compute the indicesa
j
I
i
d of the (x
,
y
,
z) coordinates of point p
~
j
I
i
d in array D
i as follows:(2)
a
j
I
i
d
x
=
3
∗
p
~
j
I
i
d
u
+
L
∗
p
~
j
I
i
d
v
a
j
I
i
d
y
=
3
∗
p
~
j
I
i
d
u
+
L
∗
p
~
j
I
i
d
v
+
1
a
j
I
i
d
z
=
3
∗
p
~
j
I
i
d
u
+
L
∗
p
~
j
I
i
d
v
+
2
.
The pointp
~
j
r
i contains the (x
,
y
,
z) coordinates of point p
~
j
I
i
d w.r.t. the r
i CS. The coordinates of point p
~
j
r
i are obtained as follows:(3)
p
~
j
r
i
x
=
D
i
a
j
I
i
d
x
p
~
j
r
i
y
=
D
i
a
j
I
i
d
y
p
~
j
r
i
z
=
D
i
a
j
I
i
d
z
.
The approximate marker disk centers detected by camerar
i form the set P
~
r
i
=
p
~
0
r
i
,
…
,
p
~
j
r
i
,
…
,
p
~
n
r
i.
(3)
Computation of the markerm
i CS in the r
i camera CS: an S
O
(
3
) coordinate frame T
m
i
r
i
=
V
x
^
V
y
^
V
z
^
O
m
i is attached to each marker:
(a)
Make(4)
O
m
i
=
1
n
+
1
∑
j
=
0
n
p
~
j
r
i
.
(b)
Use the four disk centers in the marker (Figure5) as follows:(5)
V
x
→
=
1
2
p
~
0
r
i
-
p
~
1
r
i
+
p
~
2
r
i
-
p
~
3
r
i
V
y
→
=
1
2
p
~
2
r
i
-
p
~
0
r
i
+
p
~
3
r
i
-
p
~
1
r
i
V
z
^
=
V
x
^
×
V
y
^
.
The submatrixV
x
^
V
y
^
V
z
^ is normalized to guarantee its S
O
(
3
) nature. The frame T
~
m
i
r
i describes the estimated pose of marker m
i w.r.t. the CS of the camera r
i.Figure 5
Estimation of disk coordinates in color image. (a) Simulated RBG image, (b) result of the color segmentation (zoomed image), and (c) result of the blob extraction (zoomed image).
(a)
(b)
(c)


## 3.3.2. Estimation of the Pose of the Cameras w.r.t. the Exoskeleton

The goal of this step is to find the transformationT
r
i
E, which expresses the pose of the camera r
i w.r.t. the base of the exoskeleton (Figure 6).Figure 6
Schematic diagram of the iterative estimation of the pose of the cameras.The rigid transformation matricesT
r
0
l
0
E and T
r
1
l
8
E
∈
R
4
×
4, which describe the pose of the cameras r
i w.r.t. the CS of the link where they are installed, are estimated during system calibration (the calibration matrix can be obtained by camera detection of a 2D/3D calibration object mounted on a known location of the exoskeleton). The poses T
l
0
E
E and T
l
8
E
E of the exoskeleton links l
0
E and l
8
E w.r.t. to the exoskeleton base CS are computed using the Forward Kinematics of exoskeleton E. Then, T
r
0
E and T
r
1
E are estimated as follows:(6)
T
~
r
0
E
=
T
~
l
0
E
E
∗
T
~
r
0
l
0
E
T
~
r
1
E
=
T
~
l
8
E
E
∗
T
~
r
1
l
8
E
.


## 3.3.3. Estimation of the Pose of the Markers w.r.t. the Exoskeleton

The objective of this step is to estimate the transformation (T
m
i
E) that describes the pose of marker m
i w.r.t. the exoskeleton base CS (Figure 7). Transformations T
m
i
E are estimated as follows:(7)
T
~
m
0
E
=
T
~
r
0
E
∗
T
~
m
0
r
0
T
~
m
1
E
=
T
~
r
1
E
∗
T
~
m
1
r
1
.Figure 7
Schematic diagram of the iterative estimation of the pose of the markers w.r.t. the exoskeleton CS.


## 3.3.4. Estimation of the Upper Arm Pose w.r.t. the Exoskeleton

The purpose of this step is to estimate the upper arm pose (T
a
r
m
E) w.r.t. the exoskeleton base CS using the marker poses T
m
i
E (Figure 8). The upper arm direction vector is computed from the estimated position of the end-points of the upper arm (GH and elbow joint centers) as follows (CSs in Figure 9):(1)
Estimate the position of the GH joint center: the rigid transformation matrixT
G
m
0, which expresses the pose of the GH joint CS w.r.t. the m
0 CS, is estimated during the calibration process of the system. Hence, the GH joint center is estimated as follows:
(a)
EstimateT
G
E, which is the pose of the GH joint CS w.r.t. the exoskeleton E base CS (see (8)).
(b)
Extractp
G
E from T
G
E. The point p
G
E is the position of the center of the GH joint seen from the E CS:(8)
T
~
G
E
=
T
~
m
0
E
∗
T
~
G
m
0
.
(2)
Estimate the position of the elbow joint center: the rigid transformation matrixT
e
l
w
m
1 (elbow joint CS w.r.t. the m
1 CS) is estimated during the calibration process of the system. Hence, the elbow joint center is computed as follows:
(a)
EstimateT
e
l
w
E, which is the pose of the elbow joint CS w.r.t. the exoskeleton E base CS (see (9)).
(b)
Extractp
e
l
w
E from T
e
l
w
E. The point p
e
l
w
E is the position of the center of the elbow joint seen from the E CS:(9)
T
~
e
l
w
E
=
T
~
m
1
E
∗
T
~
e
l
w
m
1
.
(3)
Estimate the upper arm position:
(a)
Estimate the arm direction vector asV
^
a
r
m
=
(
p
~
G
E
-
p
~
e
l
w
E
)
/
p
~
G
E
-
p
~
e
l
w
E.
(b)
Estimate the origin of the upper arm CS asp
~
a
r
m
E
=
1
/
2
∗
V
→
a
r
m
∗
V
^
a
r
m
+
p
~
e
l
w
E.
(4)
Estimate the upper arm orientation: the estimated orientation of the upper arm is computed using Euler angley
x
z decomposition w.r.t. the base CS of exoskeleton E:
(a)
Estimate the rotation of the arm around they-axis of the E CS using the projection of V
^
a
r
m on the x
-
z plane of the fixed E CS.
(b)
Compute the rotation of the arm around the mobilex-axis of E CS from the inner product of V
^
a
r
m with the mobile z-axis of E CS.
(c)
Estimate the rotation of the upper arm around its longitudinal axisV
→
a
r
m as the rotation of the marker m
1 around vector V
^
a
r
m. This angle is the one between (i) the mobile x-axis of E CS and (ii) the projection of x-axis of marker m
1 CS onto the x
-
y plane of E CS.
(5)
Express the pose of the upper arm w.r.t. theE base CS as the 4
×
4 rigid transformation T
a
r
m
E.Figure 8
Schematic diagram of the iterative estimation of the upper arm pose.Figure 9
Coordinate systems for the upper arm pose estimation.


## 3.3.5. Refer the Angles of the GH Joint w.r.t. the Acromion

Sincem
0 is rigidly attached to the acromion, the upper arm orientation can be expressed w.r.t. the acromion by using the inverse of T
m
0
E:(10)
T
~
a
r
m
m
0
=
T
~
E
m
0
∗
T
~
a
r
m
E
.


## 3.4. Implementation and Simulation

The arm posture estimation method was implemented by using the V-REP robotics simulator [32]. In the simulator, the scene in Figure 2(d) is created, which includes the models of (a) a human patient, (b) an Armeo Spring, (c) the RGB-D vision sensors with the couplings to attach them to the exoskeleton, and (d) the planar markers with the couplings to attach them to the human arm. The configuration of the simulated vision sensors is summarized in Table 1.For the estimation of the coordinates of disk centersP
I
i
c in the image I
i
c, color segmentation and blob detection algorithms available in the simulator were used. Additional code was written to sort blob centers by color. All additional code was written in LUA (lightweight embeddable scripting language) scripts.


### 3.4.1. Generation of the Ground-Truth Poses of the Patient Upper Limb during RAR

The accuracy of the proposed method is determined by comparing its estimations of the upper arm poses with the ones of the simulated human patient (ground-truth values ofT
a
r
m
m
0). To generate movements of the simulated patient that resemble the ones of therapy, we performed the next steps:(1)
Armeo movement generation: we recorded 4 time sequence datasets of the actual Armeo joint measurements (sampled at 66.6 Hz) while performing the following shoulder movements (Figure10): (a) shoulder horizontal abduction-adduction (SAbAd), (b) shoulder flexion-extension (SFE), (c) shoulder internal rotation (SIR), and (d) a combination of all the mentioned movements (COMB). These movement history datasets are used to guide a simulation of the Armeo model.
(2)
Patient movement generation: the movements of the patient upper limb that correspond to the recorded movements of the Armeo are computer-generated with the method in [16]. The said method provides an estimation of the patient posture given the joint angles of the exoskeleton by using an inverse kinematics approach.Figure 10
GH joint movements: (a) shoulder flexion-extension (SFE), (b) shoulder horizontal abduction-adduction (SAbAd), and (c) shoulder internal rotation (SIR).
(a)
(b)
(c)In this way, four sets (one per movement dataset) of known poses of the upper arm are obtained by simulating patient movement and compared here against those estimated with our method. Our method accuracy is assessed without compensating any time offsets between the reference and estimated angles. In this way, real-time accuracy of the method is assessed. Table2 presents the approximate amplitudes of the y
x
z Euler angle decomposition of the GH joint movements of the simulated patient w.r.t. its local CS.Table 2
Movement dataset features.
Movement dataset
Amplitude (deg.)
Samples
SAbAd
(6°, 31°, 10°)
1000
SFE
(31°, 8°, 1°)
1000
SIR
(3°, 3°, 34°)
1000
COMB
(40°, 90°, 60°)
2000


### 3.4.2. Measurement of the Estimation Performance

(1)
Error in the estimation of the markers position: the error in the position estimation of markersm
i is computed as the RMS of expression e
p
o
s
m
i
=
p
m
i
E
-
p
~
m
i
E, where i
∈
0,1.
(2)
Error in the estimation of the arm pose: the error in the arm position estimation for a GH joint movement dataset (e
p
o
s
a
r
m) is computed as the RMS of p
a
r
m
m
0
-
p
~
a
r
m
m
0 for all samples in the movement dataset.
To quantify the error in the arm orientation estimation (e
o
r
i
a
r
m), the next steps are carried out:
(a)
Compute the matrix of rotation errorR
o
t
e
r
r
o
r
=
R
o
t
a
r
m
m
0
∗
R
o
t
~
a
r
m
m
0
-
1, where R
o
t
a
r
m
m
0 and R
o
t
~
a
r
m
m
0 are the rotation submatrices of transformation matrices T
a
r
m
m
0 and T
~
a
r
m
m
0, respectively.
(b)
ExpressR
o
t
e
r
r
o
r in exponential map notation [22] as e
o
r
i
a
r
m
→
∈
R
3.
(c)
Computee
o
r
i
a
r
m as the RMS of e
o
r
i
a
r
m
→ for all samples in the movement dataset.


## 3.4.1. Generation of the Ground-Truth Poses of the Patient Upper Limb during RAR

The accuracy of the proposed method is determined by comparing its estimations of the upper arm poses with the ones of the simulated human patient (ground-truth values ofT
a
r
m
m
0). To generate movements of the simulated patient that resemble the ones of therapy, we performed the next steps:(1)
Armeo movement generation: we recorded 4 time sequence datasets of the actual Armeo joint measurements (sampled at 66.6 Hz) while performing the following shoulder movements (Figure10): (a) shoulder horizontal abduction-adduction (SAbAd), (b) shoulder flexion-extension (SFE), (c) shoulder internal rotation (SIR), and (d) a combination of all the mentioned movements (COMB). These movement history datasets are used to guide a simulation of the Armeo model.
(2)
Patient movement generation: the movements of the patient upper limb that correspond to the recorded movements of the Armeo are computer-generated with the method in [16]. The said method provides an estimation of the patient posture given the joint angles of the exoskeleton by using an inverse kinematics approach.Figure 10
GH joint movements: (a) shoulder flexion-extension (SFE), (b) shoulder horizontal abduction-adduction (SAbAd), and (c) shoulder internal rotation (SIR).
(a)
(b)
(c)In this way, four sets (one per movement dataset) of known poses of the upper arm are obtained by simulating patient movement and compared here against those estimated with our method. Our method accuracy is assessed without compensating any time offsets between the reference and estimated angles. In this way, real-time accuracy of the method is assessed. Table2 presents the approximate amplitudes of the y
x
z Euler angle decomposition of the GH joint movements of the simulated patient w.r.t. its local CS.Table 2
Movement dataset features.
Movement dataset
Amplitude (deg.)
Samples
SAbAd
(6°, 31°, 10°)
1000
SFE
(31°, 8°, 1°)
1000
SIR
(3°, 3°, 34°)
1000
COMB
(40°, 90°, 60°)
2000


## 3.4.2. Measurement of the Estimation Performance

(1)
Error in the estimation of the markers position: the error in the position estimation of markersm
i is computed as the RMS of expression e
p
o
s
m
i
=
p
m
i
E
-
p
~
m
i
E, where i
∈
0,1.
(2)
Error in the estimation of the arm pose: the error in the arm position estimation for a GH joint movement dataset (e
p
o
s
a
r
m) is computed as the RMS of p
a
r
m
m
0
-
p
~
a
r
m
m
0 for all samples in the movement dataset.
To quantify the error in the arm orientation estimation (e
o
r
i
a
r
m), the next steps are carried out:
(a)
Compute the matrix of rotation errorR
o
t
e
r
r
o
r
=
R
o
t
a
r
m
m
0
∗
R
o
t
~
a
r
m
m
0
-
1, where R
o
t
a
r
m
m
0 and R
o
t
~
a
r
m
m
0 are the rotation submatrices of transformation matrices T
a
r
m
m
0 and T
~
a
r
m
m
0, respectively.
(b)
ExpressR
o
t
e
r
r
o
r in exponential map notation [22] as e
o
r
i
a
r
m
→
∈
R
3.
(c)
Computee
o
r
i
a
r
m as the RMS of e
o
r
i
a
r
m
→ for all samples in the movement dataset.


## 3.5. Sensitivity Analysis

A sensitivity analysis is carried out to study the influence of relevant parameters on the method accuracy. Formally, the sensitivity analysis determines the effect of the perturbation of the parameterQ on the objective function F
(
Q
). The relative sensitivity of F
(
Q
) w.r.t. Q, S
Q
F, is given by (11) [33]. The value of S
Q
F is the ratio (dimensionless) between the percentual changes in F and Q:(11)
S
Q
F
=
∂
F
/
F
∂
Q
/
Q
=
∂
ln
⁡
F
∂
ln
⁡
Q
.The upper arm pose accuracy (and, therefore, that of the GH joint angles) relies on the precise estimation of the position of the centers of the elbow and GH joints (p
~
e
l
w
E and p
~
G
E) (Section 3.3.4), which ultimately depend on the following transformations involving the markers:(a)
T
~
m
0
E and T
~
m
1
E (markers w.r.t. exoskeleton).
(b)
T
G
m
0 and T
e
l
w
m
1 (GH and elbow joints w.r.t. markers).The conducted sensitivity analysis focuses on errors inT
G
m
0 and T
e
l
w
m
1, given that errors in the estimation of T
~
m
0
E and T
~
m
1
E (Section 4.2) are small. Possible causes of errors in T
G
m
0 and T
e
l
w
m
1 are as follows:(1)
Inaccurate computation ofT
G
m
0 and T
e
l
w
m
1 during the system calibration.
(2)
Relative displacement of the markers w.r.t. the GH and elbow joints due to skin movement.In the sensitivity analysis, translations errors in matricesT
G
m
0 and T
e
l
w
m
1 are induced by disturbing the location of the markers m
k (k
=
0,1) w.r.t. the CSs of the GH and elbow joints. Since orientation information in T
G
m
0 and T
e
l
w
m
1 is not used to estimate the upper arm pose, it is excluded from the sensitivity analysis.For the sensitivity analysis (see (11)), the vector-valued function F
(
q
) quantifies the estimation error of the arm position and orientation (see (12)) and the parameter set q represents the marker translation errors. The parameter set q is defined as q
=
q
1
,
q
2
,
q
3
,
q
4
,
q
5
,
q
6, where each q
j
∈
q is a scalar representing the magnitude of a translation of a specific marker along a prescribed direction. Table 3 describes the meaning of each parameter in set q:(12)
F
q
=
e
p
o
s
a
r
m
q
,
e
o
r
i
a
r
m
q
;
F
q
:
R
6
⟶
R
2
.Table 3
Parameters of functionF
(
q
) (error in the position and orientation estimation of the upper arm (see (12))) to study in the sensitivity analysis.
Parameter
Meaning
CS of reference
q
1
Translation with magnitudeq
1 of m
0 along x-axis
GH joint
q
2
Translation with magnitudeq
2 of m
0 along y-axis
GH joint
q
3
Translation with magnitudeq
3 of m
0 along z-axis
GH joint
q
4
Translation with magnitudeq
4 of m
1 along x-axis
Elbow joint
q
5
Translation with magnitudeq
5 of m
1 along y-axis
Elbow joint
q
6
Translation with magnitudeq
6 of m
1 along z-axis
Elbow jointThe sensitivity analysis procedure (Figure11) entails the following steps:(1)
Load the movement dataset of the GH joint to test (SFE, SAbAd, SIR, and COMB).
(2)
Select the parameterq
j
∈
q to perturb (selection of a marker and a direction of translation). Marker m
0 translates along axes of the GH joint CS. Marker m
1 translates along axes of the elbow joint CS (Figure 12).
(3)
Apply the translation indicated byq
j to the corresponding marker. The marker perturbation q
j is applied for the complete movement dataset.
(4)
Compute the estimation errors of the upper arm position and orientationF
i
(
q
)
=
(
e
p
o
s
a
r
m
i
(
q
)
,
e
o
r
i
a
r
m
i
(
q
)
) as the simulated patient moves according to the chosen GH joint movement dataset. The current iteration of the process is indicated by index i.
(5)
Compute the position and orientation components ofS
q
j
F as per (11). The derivative of F
(
q
) w.r.t. q
j is given by (13). The required derivatives are computed numerically [34, 35]:(13)
∂
F
q
∂
q
j
=
∂
e
p
o
s
a
r
m
q
∂
q
j
,
∂
e
o
r
i
a
r
m
q
∂
q
j
.
(6)
Incrementq
j by Δ
q and go to step (
3
). Repeat the process until the desired number of iterations i of the procedure is reached.Figure 11
Sensitivity analysis steps.Figure 12
Sensitivity analysis. Coordinate systems of reference for the translations of (a) markerm
0 and (b) marker m
1.
(a)
(b)The complete sensitivity analysis was performed for each movement dataset (SFE, SAbAd, SIR, and COMB). The directions in which marker translations occur (Table3) are chosen so that the markers do not leave the detection volume of the cameras. Table 4 summarizes the parameters of the sensitivity analysis. Translation units are in meters (mts).Table 4
Parameters of the sensitivity analysis.
Minimum marker translationq
m
i
n (mts)
0
Maximum iterations of the sensitivity analysisi
m
a
x
10
Increment of marker translation in each iterationΔ
q (mts)
0.002
Movement datasets evaluated
4


## 4. Results and Discussion

This section presents and discusses the results of (a) estimation accuracy of the marker 3D position, (b) estimation accuracy of the upper arm pose, and (c) sensitivity analysis of the estimation accuracy of the upper arm pose w.r.t. translation errors inT
G
m
0 and T
e
l
w
m
1.


### 4.1. Results of Marker Position Estimation

Table5 presents the RMS of the estimation errors of the position of the markers m
i per movement dataset. The mean RMS errors of the position estimation of m
0 and m
1 for all movement datasets are 0.00083 and 0.00208 mts, respectively.Table 5
RMS of errors (and standard deviation in parentheses) in the position estimation of markersm
i in the datasets of GH joint movements.
Movement
m
0 [mts]
m
1 [mts]
SAbAd
0.00089 (0.0001)
0.00175 (0.001)
SFE
0.00060 (0.0002)
0.00197 (0.0008)
SIR
0.00088 (0.0001)
0.00135 (0.0007)
COMB
0.00097 (0.0003)
0.00324 (0.002)Figure13 shows the box plots of the estimation errors in the marker positions for all movement datasets. A greater variation in the position estimation accuracy of marker m
1, in comparison to that of m
0, is observed. We have attributed this to (a) the higher linear and rotational velocities and likewise (b) the larger translations and rotations that m
1 undergoes compared to m
0.Figure 13
Box plots of estimation errors in markers position and upper arm position and orientation for all movement datasets.


### 4.2. Results of Upper Arm Pose Estimation

The RMS of errors in the upper arm pose estimation are presented in Table6. By averaging the results of all movement datasets, errors of 0.00110 mts and 0.88921 deg. in the upper arm position and orientation estimation are obtained. Figure 13 shows the box plots of the estimation errors in the upper arm position and orientation for all movement datasets.Table 6
RMS (and standard deviation in parentheses) of errors in the upper arm position and orientation estimation in the assessed movement datasets.
Movement
Position [mts]
Orientation [deg.]
SAbAd
0.00109 (0.0005)
0.92039 (0.4842)
SFE
0.00094 (0.0004)
0.83796 (0.3763)
SIR
0.00091 (0.0002)
0.73465 (0.4156)
COMB
0.00145 (0.0008)
1.0638 (0.5238)In motor rehabilitation, angular errors in the range of 3–5 degrees are considered acceptable for mobility evaluation of patients [6, 36, 37]. Figure 13 shows that our arm orientation estimation accuracy is adequate for exoskeleton-assisted rehabilitation.


### 4.3. Results of the Sensitivity Analysis

The results of the sensitivity analysis per movement dataset of the shoulder are presented in Figures14, 15, 16, and 17. In each figure, the following subfigures are presented:(a)
Error in upper arm position estimation (e
p
o
s
a
r
m) versus total marker translation (q
j): this figure shows the evolution of the absolute error in the upper arm position estimation as the error in the translation components of matrices T
G
m
0 and T
e
l
w
m
1 increases.
(b)
Error in upper arm orientation estimation (e
o
r
i
a
r
m) versus total marker translation (q
j): this figure shows the evolution of the absolute error in the upper arm orientation estimation as the error in the translation components of matrices T
G
m
0 and T
e
l
w
m
1 increases.
(c)
Position component ofS
q
j
F versus total marker translation (q
j): this figure shows the evolution of the relative sensitivity metric corresponding to the error in the upper arm position estimation as the error in the translation components of matrices T
G
m
0 and T
e
l
w
m
1 increases.
(d)
Orientation components ofS
q
j
F versus total marker translation (q
j): this figure shows the evolution of the relative sensitivity metric corresponding to the error in the upper arm orientation estimation as the error in the translation components of matrices T
G
m
0 and T
e
l
w
m
1 increases.Figure 14
Results of the sensitivity analysis with the SAdAd movement dataset (q
j: m
0-x movement/m
0-y movement/m
0-z movement/m
1-x movement/m
1-y movement/m
1-z movement).
(a)
e
p
o
s
a
r
m versus q
j
(b)
e
o
r
i
a
r
m versus q
j
(c)
Position component ofS
q
j
F versus q
j
(d)
Orientation component ofS
q
j
F versus q
jFigure 15
Results of the sensitivity analysis with the SFE movement dataset (q
j: m
0-x movement/m
0-y movement/m
0-z movement/m
1-x movement/m
1-y movement/m
1-z movement).
(a)
e
p
o
s
a
r
m versus q
j
(b)
e
o
r
i
a
r
m versus q
j
(c)
Position component ofS
q
j
F versus q
j
(d)
Orientation component ofS
q
j
F versus q
jFigure 16
Results of the sensitivity analysis with the SIR movement dataset (q
j: m
0-x movement/m
0-y movement/m
0-z movement/m
1-x movement/m
1-y movement/m
1-z movement).
(a)
e
p
o
s
a
r
m versus q
j
(b)
e
o
r
i
a
r
m versus q
j
(c)
Position component ofS
q
j
F versus q
j
(d)
Orientation component ofS
q
j
F versus q
jFigure 17
Results of the sensitivity analysis with the COMB movement dataset (q
j: m
0-x movement/m
0-y movement/m
0-z movement/m
1-x movement/m
1-y movement/m
1-z movement).
(a)
e
p
o
s
a
r
m versus q
j
(b)
e
o
r
i
a
r
m versus q
j
(c)
Position component ofS
q
j
F versus q
j
(d)
Orientation component ofS
q
j
F versus q
j


#### 4.3.1. Sensitivity in Arm Position Estimation

Regarding the arm position estimation, one can observe that translations of markerm
0 produce larger absolute errors than translations of marker m
1. This difference is due to the fact that the translations of m
0 produce a larger change in V
→
a
r
m when compared to the one produced by translations of m
1. Note that since p
~
a
r
m
E is computed by using V
→
a
r
m, any modification in V
→
a
r
m directly affects the accuracy of p
~
a
r
m
E.Observing the behavior of the position component ofS
q
j
F, one can conclude that all translations of the markers m
0 and m
1 contribute similarly to the error in the arm position estimation. The curves obtained for the position component of S
q
j
F resemble a logarithmic function with an asymptote along the value 1 of the ordinate axis. A value of 1 in the magnitude of the position component of S
q
j
F means that a percentage change in the magnitude of the marker translation produced the same percentage change (also matching the sign) in the magnitude of the error in the arm position estimation.


#### 4.3.2. Sensitivity in Arm Orientation Estimation

In Figures14, 15, 16, and 17, one can observe that the translations of marker m
1 produce larger absolute errors in the upper arm orientation estimation when compared to those produced by translations of marker m
0. Notice that the x-axis and z-axis of the elbow joint CS are always perpendicular to the upper arm vector (V
→
a
r
m) (Figure 12(b)). When the position of m
1 is perturbed along the said axes, the angle between (i) the actual upper arm vector (V
→
a
r
m) and (ii) the estimated upper arm vector (V
~
a
r
m) (which is inaccurate due to the perturbation of the marker position) is maximal.A side effect of the marker position perturbation is that the markerm
i suffers modifications of scale and changes in the level of perspective distortion in the images of camera r
i, affecting the accuracy of the system. This situation can be observed in Figures 14(b), 15(b), 16(b), and 17(b), where translations of m
1 along the y-axis of the elbow joint CS should not produce variations in the orientation estimation error. However, on the contrary, slight variations in the accuracy of the orientation estimation are indeed present in the mentioned figures.


#### 4.3.3. Robustness of the Upper Arm Pose Estimation Method

In Figures14(c), 14(d), 15(c), 15(d), 16(c), 16(d), 17(c), and 17(d) one can observe that the position component of S
q
j
F increases faster than the orientation component of S
q
j
F. The behavior of S
q
j
F observed remains across the datasets used. Hence, the orientation estimation of the upper arm is more robust than the position estimation w.r.t. errors in the translational components of matrices T
G
m
0 and T
e
l
w
m
1.The results of the sensitivity analysis show that the assumption that transformationsT
G
m
0 and T
e
l
w
m
1 are rigid is reasonable. Even with marker drifts of 0.02 mts, the GH joint angles can be estimated with an accuracy (RMSE 3.6 deg.) appropriate for the mobility evaluation of patients (in the range of 3–5 deg.).Marker drifts must be mitigated by the marker attachments to the human body. Furthermore, marker attachments should be designed to minimize the effect of errors inT
G
m
0 and T
e
l
w
m
1 on the method accuracy. For example, notice how the attachment of marker m
1 (Figure 12(b)) locates marker m
1 with an offset w.r.t. the elbow joint center along the direction which least affects the upper arm orientation estimation.The results presented suggest that the method we implemented is a feasible alternative for estimating the GH joint angles in a RAR scenario.


### 4.4. Comparison to Related Works

The literature review provided no references other than [16–20] for upper limb posture estimation (including the GH joint) in exoskeleton-based rehabilitation using computational methods. Among the mentioned works, only [20] reports the errors (mean RMSE 4.8 deg.) in the GH joint angles estimation. Reference [20] reports RMSE values of the GH joint angles only for the best-case scenario (swivel angle mean RMSE 5 deg.). For all the movement tasks tested, the method in [20] presents a mean RMSE of 10 deg. for the swivel angle estimations. Given that global errors of the swivel angle double those of the best-case scenario, a report of global errors of GH joint angle estimations of the method in [20] is required to reach a conclusion regarding its suitability for clinical use.Table7 summarizes the comparison of our contributions w.r.t. comparable works (i.e., [20]).Table 7
Contributions of this paper w.r.t. comparable works.
Work
Method
Method evaluation
Accuracy of GH joint angles
[20]
IK-based swivel angle estimation
(1) Studied angles: swivel angle plus the shoulder, elbow, and wrist joint angles(2) Reference angles: obtained from custom-made inertial MOCAP; homologation-calibration of the readings is not reported(3) Movements: compound movements(4) Sensitivity analysis: no
Mean RMSE: 4.8 deg. (best-case scenario)
This paper
Hybrid exoskeleton-optical MOCAP
(1) Studied angles: shoulder angles(2) Reference angles: simulated(3) Movements: 1-DOF and multi-DOF shoulder movements(4) Sensitivity analysis: method accuracy w.r.t. marker position errors produced by marker drift or calibration errors
(a) Mean RMSE: 0.9 deg. (assuming no marker drift or calibration errors) (b) Mean RMSE: 3.6 deg. (with marker drift or calibration errors up to 20 mm)


## 4.1. Results of Marker Position Estimation

Table5 presents the RMS of the estimation errors of the position of the markers m
i per movement dataset. The mean RMS errors of the position estimation of m
0 and m
1 for all movement datasets are 0.00083 and 0.00208 mts, respectively.Table 5
RMS of errors (and standard deviation in parentheses) in the position estimation of markersm
i in the datasets of GH joint movements.
Movement
m
0 [mts]
m
1 [mts]
SAbAd
0.00089 (0.0001)
0.00175 (0.001)
SFE
0.00060 (0.0002)
0.00197 (0.0008)
SIR
0.00088 (0.0001)
0.00135 (0.0007)
COMB
0.00097 (0.0003)
0.00324 (0.002)Figure13 shows the box plots of the estimation errors in the marker positions for all movement datasets. A greater variation in the position estimation accuracy of marker m
1, in comparison to that of m
0, is observed. We have attributed this to (a) the higher linear and rotational velocities and likewise (b) the larger translations and rotations that m
1 undergoes compared to m
0.Figure 13
Box plots of estimation errors in markers position and upper arm position and orientation for all movement datasets.


## 4.2. Results of Upper Arm Pose Estimation

The RMS of errors in the upper arm pose estimation are presented in Table6. By averaging the results of all movement datasets, errors of 0.00110 mts and 0.88921 deg. in the upper arm position and orientation estimation are obtained. Figure 13 shows the box plots of the estimation errors in the upper arm position and orientation for all movement datasets.Table 6
RMS (and standard deviation in parentheses) of errors in the upper arm position and orientation estimation in the assessed movement datasets.
Movement
Position [mts]
Orientation [deg.]
SAbAd
0.00109 (0.0005)
0.92039 (0.4842)
SFE
0.00094 (0.0004)
0.83796 (0.3763)
SIR
0.00091 (0.0002)
0.73465 (0.4156)
COMB
0.00145 (0.0008)
1.0638 (0.5238)In motor rehabilitation, angular errors in the range of 3–5 degrees are considered acceptable for mobility evaluation of patients [6, 36, 37]. Figure 13 shows that our arm orientation estimation accuracy is adequate for exoskeleton-assisted rehabilitation.


## 4.3. Results of the Sensitivity Analysis

The results of the sensitivity analysis per movement dataset of the shoulder are presented in Figures14, 15, 16, and 17. In each figure, the following subfigures are presented:(a)
Error in upper arm position estimation (e
p
o
s
a
r
m) versus total marker translation (q
j): this figure shows the evolution of the absolute error in the upper arm position estimation as the error in the translation components of matrices T
G
m
0 and T
e
l
w
m
1 increases.
(b)
Error in upper arm orientation estimation (e
o
r
i
a
r
m) versus total marker translation (q
j): this figure shows the evolution of the absolute error in the upper arm orientation estimation as the error in the translation components of matrices T
G
m
0 and T
e
l
w
m
1 increases.
(c)
Position component ofS
q
j
F versus total marker translation (q
j): this figure shows the evolution of the relative sensitivity metric corresponding to the error in the upper arm position estimation as the error in the translation components of matrices T
G
m
0 and T
e
l
w
m
1 increases.
(d)
Orientation components ofS
q
j
F versus total marker translation (q
j): this figure shows the evolution of the relative sensitivity metric corresponding to the error in the upper arm orientation estimation as the error in the translation components of matrices T
G
m
0 and T
e
l
w
m
1 increases.Figure 14
Results of the sensitivity analysis with the SAdAd movement dataset (q
j: m
0-x movement/m
0-y movement/m
0-z movement/m
1-x movement/m
1-y movement/m
1-z movement).
(a)
e
p
o
s
a
r
m versus q
j
(b)
e
o
r
i
a
r
m versus q
j
(c)
Position component ofS
q
j
F versus q
j
(d)
Orientation component ofS
q
j
F versus q
jFigure 15
Results of the sensitivity analysis with the SFE movement dataset (q
j: m
0-x movement/m
0-y movement/m
0-z movement/m
1-x movement/m
1-y movement/m
1-z movement).
(a)
e
p
o
s
a
r
m versus q
j
(b)
e
o
r
i
a
r
m versus q
j
(c)
Position component ofS
q
j
F versus q
j
(d)
Orientation component ofS
q
j
F versus q
jFigure 16
Results of the sensitivity analysis with the SIR movement dataset (q
j: m
0-x movement/m
0-y movement/m
0-z movement/m
1-x movement/m
1-y movement/m
1-z movement).
(a)
e
p
o
s
a
r
m versus q
j
(b)
e
o
r
i
a
r
m versus q
j
(c)
Position component ofS
q
j
F versus q
j
(d)
Orientation component ofS
q
j
F versus q
jFigure 17
Results of the sensitivity analysis with the COMB movement dataset (q
j: m
0-x movement/m
0-y movement/m
0-z movement/m
1-x movement/m
1-y movement/m
1-z movement).
(a)
e
p
o
s
a
r
m versus q
j
(b)
e
o
r
i
a
r
m versus q
j
(c)
Position component ofS
q
j
F versus q
j
(d)
Orientation component ofS
q
j
F versus q
j


### 4.3.1. Sensitivity in Arm Position Estimation

Regarding the arm position estimation, one can observe that translations of markerm
0 produce larger absolute errors than translations of marker m
1. This difference is due to the fact that the translations of m
0 produce a larger change in V
→
a
r
m when compared to the one produced by translations of m
1. Note that since p
~
a
r
m
E is computed by using V
→
a
r
m, any modification in V
→
a
r
m directly affects the accuracy of p
~
a
r
m
E.Observing the behavior of the position component ofS
q
j
F, one can conclude that all translations of the markers m
0 and m
1 contribute similarly to the error in the arm position estimation. The curves obtained for the position component of S
q
j
F resemble a logarithmic function with an asymptote along the value 1 of the ordinate axis. A value of 1 in the magnitude of the position component of S
q
j
F means that a percentage change in the magnitude of the marker translation produced the same percentage change (also matching the sign) in the magnitude of the error in the arm position estimation.


### 4.3.2. Sensitivity in Arm Orientation Estimation

In Figures14, 15, 16, and 17, one can observe that the translations of marker m
1 produce larger absolute errors in the upper arm orientation estimation when compared to those produced by translations of marker m
0. Notice that the x-axis and z-axis of the elbow joint CS are always perpendicular to the upper arm vector (V
→
a
r
m) (Figure 12(b)). When the position of m
1 is perturbed along the said axes, the angle between (i) the actual upper arm vector (V
→
a
r
m) and (ii) the estimated upper arm vector (V
~
a
r
m) (which is inaccurate due to the perturbation of the marker position) is maximal.A side effect of the marker position perturbation is that the markerm
i suffers modifications of scale and changes in the level of perspective distortion in the images of camera r
i, affecting the accuracy of the system. This situation can be observed in Figures 14(b), 15(b), 16(b), and 17(b), where translations of m
1 along the y-axis of the elbow joint CS should not produce variations in the orientation estimation error. However, on the contrary, slight variations in the accuracy of the orientation estimation are indeed present in the mentioned figures.


### 4.3.3. Robustness of the Upper Arm Pose Estimation Method

In Figures14(c), 14(d), 15(c), 15(d), 16(c), 16(d), 17(c), and 17(d) one can observe that the position component of S
q
j
F increases faster than the orientation component of S
q
j
F. The behavior of S
q
j
F observed remains across the datasets used. Hence, the orientation estimation of the upper arm is more robust than the position estimation w.r.t. errors in the translational components of matrices T
G
m
0 and T
e
l
w
m
1.The results of the sensitivity analysis show that the assumption that transformationsT
G
m
0 and T
e
l
w
m
1 are rigid is reasonable. Even with marker drifts of 0.02 mts, the GH joint angles can be estimated with an accuracy (RMSE 3.6 deg.) appropriate for the mobility evaluation of patients (in the range of 3–5 deg.).Marker drifts must be mitigated by the marker attachments to the human body. Furthermore, marker attachments should be designed to minimize the effect of errors inT
G
m
0 and T
e
l
w
m
1 on the method accuracy. For example, notice how the attachment of marker m
1 (Figure 12(b)) locates marker m
1 with an offset w.r.t. the elbow joint center along the direction which least affects the upper arm orientation estimation.The results presented suggest that the method we implemented is a feasible alternative for estimating the GH joint angles in a RAR scenario.


## 4.3.1. Sensitivity in Arm Position Estimation

Regarding the arm position estimation, one can observe that translations of markerm
0 produce larger absolute errors than translations of marker m
1. This difference is due to the fact that the translations of m
0 produce a larger change in V
→
a
r
m when compared to the one produced by translations of m
1. Note that since p
~
a
r
m
E is computed by using V
→
a
r
m, any modification in V
→
a
r
m directly affects the accuracy of p
~
a
r
m
E.Observing the behavior of the position component ofS
q
j
F, one can conclude that all translations of the markers m
0 and m
1 contribute similarly to the error in the arm position estimation. The curves obtained for the position component of S
q
j
F resemble a logarithmic function with an asymptote along the value 1 of the ordinate axis. A value of 1 in the magnitude of the position component of S
q
j
F means that a percentage change in the magnitude of the marker translation produced the same percentage change (also matching the sign) in the magnitude of the error in the arm position estimation.


## 4.3.2. Sensitivity in Arm Orientation Estimation

In Figures14, 15, 16, and 17, one can observe that the translations of marker m
1 produce larger absolute errors in the upper arm orientation estimation when compared to those produced by translations of marker m
0. Notice that the x-axis and z-axis of the elbow joint CS are always perpendicular to the upper arm vector (V
→
a
r
m) (Figure 12(b)). When the position of m
1 is perturbed along the said axes, the angle between (i) the actual upper arm vector (V
→
a
r
m) and (ii) the estimated upper arm vector (V
~
a
r
m) (which is inaccurate due to the perturbation of the marker position) is maximal.A side effect of the marker position perturbation is that the markerm
i suffers modifications of scale and changes in the level of perspective distortion in the images of camera r
i, affecting the accuracy of the system. This situation can be observed in Figures 14(b), 15(b), 16(b), and 17(b), where translations of m
1 along the y-axis of the elbow joint CS should not produce variations in the orientation estimation error. However, on the contrary, slight variations in the accuracy of the orientation estimation are indeed present in the mentioned figures.


## 4.3.3. Robustness of the Upper Arm Pose Estimation Method

In Figures14(c), 14(d), 15(c), 15(d), 16(c), 16(d), 17(c), and 17(d) one can observe that the position component of S
q
j
F increases faster than the orientation component of S
q
j
F. The behavior of S
q
j
F observed remains across the datasets used. Hence, the orientation estimation of the upper arm is more robust than the position estimation w.r.t. errors in the translational components of matrices T
G
m
0 and T
e
l
w
m
1.The results of the sensitivity analysis show that the assumption that transformationsT
G
m
0 and T
e
l
w
m
1 are rigid is reasonable. Even with marker drifts of 0.02 mts, the GH joint angles can be estimated with an accuracy (RMSE 3.6 deg.) appropriate for the mobility evaluation of patients (in the range of 3–5 deg.).Marker drifts must be mitigated by the marker attachments to the human body. Furthermore, marker attachments should be designed to minimize the effect of errors inT
G
m
0 and T
e
l
w
m
1 on the method accuracy. For example, notice how the attachment of marker m
1 (Figure 12(b)) locates marker m
1 with an offset w.r.t. the elbow joint center along the direction which least affects the upper arm orientation estimation.The results presented suggest that the method we implemented is a feasible alternative for estimating the GH joint angles in a RAR scenario.


## 4.4. Comparison to Related Works

The literature review provided no references other than [16–20] for upper limb posture estimation (including the GH joint) in exoskeleton-based rehabilitation using computational methods. Among the mentioned works, only [20] reports the errors (mean RMSE 4.8 deg.) in the GH joint angles estimation. Reference [20] reports RMSE values of the GH joint angles only for the best-case scenario (swivel angle mean RMSE 5 deg.). For all the movement tasks tested, the method in [20] presents a mean RMSE of 10 deg. for the swivel angle estimations. Given that global errors of the swivel angle double those of the best-case scenario, a report of global errors of GH joint angle estimations of the method in [20] is required to reach a conclusion regarding its suitability for clinical use.Table7 summarizes the comparison of our contributions w.r.t. comparable works (i.e., [20]).Table 7
Contributions of this paper w.r.t. comparable works.
Work
Method
Method evaluation
Accuracy of GH joint angles
[20]
IK-based swivel angle estimation
(1) Studied angles: swivel angle plus the shoulder, elbow, and wrist joint angles(2) Reference angles: obtained from custom-made inertial MOCAP; homologation-calibration of the readings is not reported(3) Movements: compound movements(4) Sensitivity analysis: no
Mean RMSE: 4.8 deg. (best-case scenario)
This paper
Hybrid exoskeleton-optical MOCAP
(1) Studied angles: shoulder angles(2) Reference angles: simulated(3) Movements: 1-DOF and multi-DOF shoulder movements(4) Sensitivity analysis: method accuracy w.r.t. marker position errors produced by marker drift or calibration errors
(a) Mean RMSE: 0.9 deg. (assuming no marker drift or calibration errors) (b) Mean RMSE: 3.6 deg. (with marker drift or calibration errors up to 20 mm)


## 5. Conclusions and Future Work

In the context of RAR, this paper presents the formulation, implementation, and assessment, in silico, of a novel accurate method to estimate the patient GH joint angles during therapy. Our method does not require redundant markers or cameras and relies on simple geometric relationships and tools of standard robotics and computer vision libraries. These characteristics make it economical and readily applicable in RAR.The accuracy and the robustness of our method are evaluated using computer-generated human movement data corresponding to actual movement datasets of the Armeo Spring. We present a formal sensitivity analysis of the pose estimation accuracy w.r.t. marker position estimation errors produced by (a) system calibration errors and (b) marker drifts (due to skin artifacts). This analysis indicates that even in the presence of large marker position errors our method presents an accuracy that is acceptable for patient mobility appraisal.Future work includes (a) implementation of the method using commercially available RGB-D vision sensors, (b) evaluation of the method accuracy with actual human movement data, (c) adaptation of the method using solely RGB cameras, and (d) extension of our method to address other limbs.



---

*Source: 5058171-2016-06-15.xml*