Towards Human Capture Movement: Estimation of Anatomical Movements of the Shoulder

In this paper we focus on the human arm motion capture, which is motivated by the requirements in physical rehabilitation and training of stroke patients in the same way as monitoring of elderly person activities. The proposed methodology uses a data fusion of low-cost and low-weight MEMS sensors jointly to an a priori knowledge of the arm anatomy. The main goal is to estimate the arm position, the anatomical movements of the shoulder and its accelerations. We propose a discrete optimization based-approach which aims to search the optimal attitude ambiguity directly without decorrelation of ambiguity


Introduction
Many different disciplines, such as computer character animation or virtual reality use motion capture systems to capture movement and posture of human body.However, the human motion capture can be used in the care of individuals with physical recovery, rehabilitation, and training needs.The study of human-robot interaction (HRI) for assistive robotics applications is a new, growing, and increasingly popular research area at the intersection of a number of fields, including robotics, control, medicine, psychology, neuroscience, and cognitive sciences.In contrast to interactive robotics, which aims to entertain and create simple basic relationships with human users, assistive robotics focuses on aiding human users with special needs in their daily activities [1].
Robotic technology has great potential to benefit the lives of people with disabilities [2].Not only in the obvious role as a manipulator, whether mounted on a desk, wheelchair, mobile base, or body worn, but also as an aid to mobility, education, and communication.Assistive robotics is the bringing together of several technologies with the needs of people with various disabilities; in this paper, we present our research approach in assistive robots via motion capture.
During the rehabilitation process, the movement of stroke patients needs to be localized and learned so that incorrect movements can be instantly modified or tuned.Therefore, tracking these movements becomes vital and necessary during the course of rehabilitation.The most popular tracking systems are the mechanical trackers, the active magnetic trackers, and the optical tracking systems [3].
Mechanical trackers systems [4] utilize an exoskeleton that is attached to the articulated structure to be tracked.Goniometers within the skeletal linkages measure joint angles that are used with kinematics algorithms to determine body posture.While mechanical trackers are precise, they are worn; moreover, the alignment of the goniometers is difficult.Active magnetic tracking systems [5] determine both position and orientation by using small magnetics sensors mounted on a rigid body to sense a set of generated magnetic fields; this kind of systems have several weaknesses, namely, field distortion and limited measured volume.Optical tracking systems [6] may be separated into two basic categories: pattern recognition and image-based systems.Pattern recognition systems sense an artificial pattern of lights and use this information to determine position and/or orientation.Image-based systems determine position by using multiple cameras to track predesignated points on moving objects within a working volume.Although optical tracking systems provide accurate orientation and position information, they have some important limitations.Limitations include occlusion (line of sight) problems whenever a required light path is blocked, interference from other light sources, limited measured volume and the most important, high cost.
The use of (microelectromechanical Systems) (MEMS) sensors in human movement analysis has gained substantial ground.Although accelerometers and rate gyros have been used in applications such as seismic analysis, aerospace navigation, and robotics, recently they are used in application such as monitoring of human activities [7,8] and measurement of neurological disorders [9].In other, the advent of motion inertial capture systems offers a convenient means for acquiring realistic motion data [10].Due to the success of such systems, realistic and highly detailed motion clips are commercially available and widely used for producing visually convincing animations of human-like 3D characters in a variety of applications, such as animation films and video games.
Research in human motion capture has concentrated on the articulated-model based approach in order to produce a general full-body tracker enough to handle realistic realworld applications.However, the problem with using articulated models is the high dimensionality of the configuration space and the exponentially increasing computational cost that results.
In order to circumvent the problem that represent the use of mechanical, active magnetic, and the optical tracking systems, a technique based on inertial tracking system can be used.The technique consists of placing MEMS sensors (rate gyros, accelerometers, and magnetometers) units on each body segments to be tracked.The articulated structures are describe as nonrigid objects.However, each structure separately can be seen as rigid body [3].The lengths of body segments between rotational joints therefore remain constant over time, connected by articulations having each one one or more degrees of freedom (DOF).The measurements are made in reference to the local axes roll, pitch, and yaw.The clinical reference system provides anatomically meaningful definitions of main segmental movements (e.g., flexionextension, abduction-adduction, or supination-pronation) in the case of the arm, the reference point is the shoulder (see Figure 1).
Consequently, using this technique, the human motion capture is in the framework of the attitude estimation, from three rate gyros, three accelerometers, and three magnetometers sensors, mounted orthogonally.This combination is also known as an attitude and heading reference system (AHRS) [11].In the last decade, the attitude estimation problem has been applied to new fields such as, for example, ground and aerial robotics [12,13].The attitude estimation is carried out by means of data fusion from rate gyros, accelerometers, and magnetometers.Actually, rate gyros provide continuous attitude information with good short-term stability when their measurements are numerically integrated.However, since rate gyros measurements are affected by drifts, the attitude estimation based on these sensors slowly diverges from the real attitude.On the other hand, linear accelerometers measure the vector sum of acceleration ⃗  and gravitational acceleration ⃗  in sensors coordinate.When the gravitational acceleration component ⃗  is sensing dominant, it provides inclination information.Thus, it can be used to correct the drifted orientation estimate from rate gyros.Since accelerometers cannot detect rotation about the vertical axis, magnetic sensors can be added, which allows to sense the earth magnetic field, and they can thus be used to correct drift of the rate gyro about the vertical axis, [14].In general, the idea has been to implement filters in which accelerometers and magnetometers are used for low frequency components of orientation and rate gyros for to measure faster changes in orientation.In the above cited approaches, the data fusion is carried out by means of the implementation of extended Kalman filters (EKF).The major feature of EKF's concerns the ability to fuse signals acquired from different sensor types.However, the linearization process renders difficult to guarantee the global convergence at the truth attitude.Moreover, since the sensors measurements noise encountered in practice is in general non-Gaussian the filter behavior can become poor.Recently, nonlinear approaches for the attitude estimation using accelerometer, magnetometers and rate gyros have been proposed.In [15], the authors propose a nonlinear observer, and they exploit the (3) group in order to estimate the attitude matrix.In the attitude nonlinear observers approach, the convergence of the attitude error to zero is proved in a Lyapunov sense.
For discrete element modeling (DEM), though, there are typically no large angle displacements between time steps, which relaxes many of the constraints of the algorithms just discussed.In DEM and several other particle methods, the time step must be chosen to be relatively small to accurately resolve highly nonlinear, inter-body contact, and explicit integration schemes are often used to update the motion of the discrete elements.Indeed, implicit time-stepping algorithms have been shown by [16] to be often suboptimal in discrete element applications.
In all these mentioned approaches, the acceleration component ⃗  is modeled as a first-order low-pass filtered white noise process, that is, the accelerometer is used as an inclinometer.Thus, a problem arises when the acceleration is not small in comparison to the gravity.In fact, these approaches do not consider the problem of attitude estimation which takes the body nonweak accelerations into account.Few publications have treated this problem [17,18], where the robot's Kinematic model is taken into account and ground-directed rate sensors are added.In [19], a fuzzy logic expert rule-based system is designed to identify the status of vehicle motion and fuse the data from these different sensor modalities.Unfortunately, these algorithms are a combination of linear Kalman Filters and Extended Kalman filter, and as it has been mentioned, this fact renders difficult to guarantee global convergence.
The goal of assistive technology is to develop advanced technical aids for promoting independent living and improving quality of life of persons who have chronic or degenerative impairment in motor, sensory, communication, and/or cognitive abilities.The aim of this paper is to describe the results of our research activities in robotics with applications to people affected by disability and by older people with degenerative disorders due to the natural course of aging.
In the present work, our typical capture configuration relies primarily on the arm.The motivation arises of the requirement in physical rehabilitation and training of stroke patients in the same way as monitoring of elderly person activities which may assist clinicians in the early recognition of potential pathology.The objective is to estimate the arm position and the movements of the shoulder (see Figure 4) with respect to an inertial frame, represented by the human body.Therefore, a module containing three rate gyros, three accelerometers, and three magnetometers assembled in tri-axis, is positioned in the extreme of the arm, in the articulation proximal of the hand.The attitude for the coordinate reference sensors is estimated.The combination of this information jointly to a priori knowledge of the anatomy of the arm makes possible to obtain information on the posture of arm and the anatomical movements of the shoulder.In this first stage, the elbow flexion-extension is not considered.
The attitude estimator uses quaternion representation.Two approaches are jointly used, namely, a nonlinear observer and a discrete linear quadratic minimization technique.The nonlinear observer is performed in order to produce an estimate of the gyro bias and of the attitude quaternion.Thus, no assumptions of the weakness (or not) of the accelerations are done, and no switching procedure from one observer to another one is necessary.The main advantage of the approach presented in this paper compared to others approaches is that the estimated attitude remains valid even in the presence of high accelerations over long time periods.Moreover, the gyro bias is estimated online, and the algorithms and methodology can be embedded in micromechanic system or robotic systems.
In this paper, a discrete linear quadratic (DLQ) optimization is proposed to track the desired trajectory.The parameters are optimized such that the tracking error is minimized since it is a model-free approach.However, the particle swarm optimization requires a repeatable certain model and the optimal control design is an off-line type.
The present paper is organized as follows.In Section 2, a mathematical background is given.The problem statement is formulated in Section 3. The nonlinear observer is presented in Section 4. The use of the discrete optimization algorithm together with the nonlinear observer is explained in Section 5. Experimental results are given in Section 6.The paper ends with some concluding remarks given in Section 7.

Mathematical Background
As mentioned in the introduction, the attitude of a rigid body can be represented by an unit quaternion, consisting of an  unit vector ⃗ , known as the Euler axis, and a rotation angle  about this axis.The quaternion  is then defined as follows: where and  0 are known as the vector and scalar parts of the quaternion, respectively.In human motion tracking applications, the unit quaternion represents the rotation from an inertial coordinate system (  ,   ,   ) located at some point in the space (for instance, the earth  frame) to the body coordinate system (  ,   ,   ) located on the center of the mass of a rigid body.
If ⃗  is a vector expressed in , then its coordinates in  are expressed by: where  = [0 ⃗   ]  and  = [0 ⃗   ]  are the quaternions associated to vectors ⃗  and ⃗ , respectively, ⊗ denotes the quaternion multiplication, and  is the conjugate quaternion of  follows defined as: The rotation matrix () corresponding to the attitude quaternion  is computed as follows: where  3 is the identity matrix and [ × ] is a skew symmetric tensor associated with the axial vector  as follows: Thus, the coordinate of vector ⃗  expressed in the  frame is given by: The quaternion attitude error used to quantify the mismatch between two attitudes  1 and  2 is computed by: Denoting by ⃗  = [ 1  2  3 ]  the angular velocity vector of the body frame  relative to the inertial frame , expressed in , the kinematics equation is given by: 2.1.Modeling Sensors 2.1.1.Rate Gyros.The angular velocity ⃗  = [ 1  2  3 ]  is measured by the rate gyros, which are supposed to be orthogonally mounted.The output signal of a rate gyro is influenced by various factors, such as bias drift and noise.In the absence of rotation, the output signal can be modeled as the sum of a white Gaussian noise and of a slowly varying function.Since an integration step is required in order to obtain the current attitude quaternion (9), even the smallest variation of the rate gyro measurement will produce a wrong estimation of the attitude.The bias is denoted by ⃗ , belonging to space R 3 .The rate gyro measurements are modeled by [20]: .
where ⃗   and ⃗   ∈ R 3 are supposed by Gaussian white noises and  =  3 is a diagonal matrix of time constants.In this case, the constant  has been set to  = 100 s.The bias vector ⃗  will be estimated online, using the observer presented in the following section.

Accelerometers.
Since the 3-axis accelerometer is fixed to the body, the measurements are expressed in the body frame .Thus, the accelerometer output can be written as follows: where ⃗  = [0 0 ]  and ⃗  ∈ R 3 are the gravity vector and the inertial accelerations of the body, respectively.Both are expressed in frame . = 9.81 m/sec 2 denotes the gravitational constant, and ⃗   ∈ R 3 is the vector of noises that are supposed to be white Gaussian.

Magnetometers. The magnetic field vector ⃗
ℎ  is expressed in the  frame; it is supposed to be ⃗ ℎ  = [ℎ   0 ℎ   ]  .Since the measurements take place in the body frame , they are given by: where ⃗   ∈ R 3 denotes the perturbing magnetic field.This perturbation vector is supposed to be modeled by Gaussian white noises.

Problem Statement
The objective is to estimate the arm attitude and the anatomical movements of the shoulder, namely, extension-flexion, abduction-adduction, and Internal-External rotations (see Figures 2 and 4).The elbow Flexion-Extension is not considered.
A module containing three rate gyros, three accelerometers, and three magnetometers assembled in tri-axis is positioned in the shoulder and in the extreme of the arm, in the articulation proximal of the hand (see Figure 3).The problem becomes in the attitude estimation of the coordinate reference module sensors ( 1 ).The magnetometers sense the earth magnetic field in the body frame  1 .Their measurements are noted ⃗   (Figure 2).The accelerometers measure the sum of all arm acceleration and of the gravity field.Then, the influence of the arm accelerations must be removed from the accelerometer measurements.Their measurements are expressed in  1 and are denoted by ⃗   .The rate gyro measures the rotational motion.The measurements ⃗   present a good short-term stability and a low noise level.However, rate gyro measurements are affected by inherent drifts which result in slow divergence of attitude over time, since an integration step is required.Hence, the bias of the rate gyro must be estimated online and will be subtracted to the rate gyro measurements.
Once that the attitude of the coordinate reference module sensors is obtained, it will be combined with a priori knowledge of the anatomy of the arm making possible to obtain information on the posture of arm and the movements of the shoulder ( 2 ).
The limitations in rotation of the shoulder are summarized in the Table 1 [21].

Human Model.
For the application and its model, this is based on an articulated arm, because one seeks the motion capture of the human movement.For this purpose, a model is extracted from the robots denominated "light, " robots in which all the actuators are attached within the robot's armor in order to limit the movement of the masses of the different elements.Although the developed tools are valid for all the parallel types of robots, the model is based on robots of rotular type 3 ( for rotation) that offer a special interest for this particular application, since the joints that one wants to consider of the human body can be modeled (cf. Figure 4) by pivots joints, and in the shoulder, it can be modeled via prismatic-rotule articulations 2.

Nonlinear Attitude Observer
The attitude nonlinear observer that includes the bias and the error update is given by: .

̂⃗ 𝜈 = −𝑇
where  has been defined in (11) and   ,  = 1, 2 are positive matrixes.q is the prediction of the attitude at time .It this obtained via the integration of the kinematics equation ( 14) using the measured angular velocity ⃗   , the bias estimate ν, and ⃗  = ⃗   which is the vector part of the quaternion error   .Remember that   measures the discrepancy between q and the pseudomeasured attitude   (16).In this paper,   is obtained thanks to an appropriate treatment of the accelerometer and magnetometer measurements via a discrete optimization, and it will be explained in the next section.
Proof.Consider the candidate Lyapunov function , which is positive definite, radially unbounded and which belongs to the class  2 : The derivative of ( 21), together with ( 17) and ( 16), is given by: .
Since ⃗  = ⃗   and ν ⃗   = ⃗    ν, it comes that Thus, ⃗   → 0. Consequently,   0 → ±1.However, if the initial conditions of the error model lie everywhere except on the two equilibrium points, the observer error will asymptotically converge to the point (  0 = 1, ⃗   = 0, ν = 0), where  = . = 0.In fact, this equilibrium point is considered as an attractor point, whereas the point ( 0 = −1, ⃗  = 0, ⃗  = 0) is considered as an repeller point.From (21), it can be noticed that if the states of the error model are at the repeller equilibrium point, they remain in this point for  > 0. Nevertheless, if any small perturbation Δ  0 is present (maintaining the condition −1 ≤  0 ≤ 1), it will produce a decrease in the value of , and since . < 0 for any point (except the equilibrium points where . = 0), one obtains   0 → 1, that concludes the proof.

Remark 2. In practice a zero physical attitude error (either
is desired in a minimum time and with minimum effort, starting from any initial condition.In fact, the equilibrium point (  0 = −1, ⃗   = 0, ν = 0) can be considered as an attractor equilibrium point for the error model if the measurement update ⃗  = − ⃗   is used.Thus, using .

Discrete Optimization of the Pseudomeasurement Quaternion and Acceleration Estimation
The attitude estimator uses quaternion representation.Two approaches are jointly used, namely, an estimation with a constraint least-square minimization technique and a prediction of the estate at the instant .The prediction is performed in order to produce a pseudo-estimate of the accelerations and the attitude quaternion.This prediction is driven by a estate which is obtained from the quaternion propagated through the kinematic equation and the one obtained via the constraint minimization problem.The pseudomeasurement quaternion   is computed from the accelerometer and magnetometer measurements.Actually, the accelerometers are sensitive not only to the gravity vector but also to the body accelerations.In the case when the accelerations ⃗  are not weak, the attitude computed using these direct measurement sensors is far from the true attitude vector.Therefore, an optimization problem is formulated which is divided in three steps.
Firstly, one seeks to estimate the inertial body accelerations from accelerometer measurements and the quaternion q obtained from (14).In this way, the quaternion that is obtained by the estimation with a constraint least square is insensitive to the body accelerations.Thus, no assumptions of the weakness (or not) of the accelerations are done, and no switching procedure from one model to another one is necessary.Therefore, the main advantage of the approach presented in this paper compared to others approaches is that the estimated attitude remains valid even in the presence of high accelerations over long time periods.The measures obtained by the accelerometers and the magnetometers are modeled by ( 12) and ( 13), respectively.Thus, the following cost function is proposed In fact, this optimization problem has an explicit solution which is obtained by the following: Once the acceleration vector ⃗ â is estimated, it is removed from the accelerometer measurements in order to use only the information of the field gravity vector projected in the body frame  1 .Therefore, an optimal attitude quaternion   is found by means of an optimization criteria that takes into account the evolution of the attitude state via the determination of  = [ 0 ,  1 ,  2 ,  3 ,   ,   ,   ]  in the function ().The minimum error is chosen by taking into account the prediction of the state x and the coefficients weight for the estate  and the measures estimated (MesEstimated = MS) at the instant , that is, subject to the constraint This nonlinear least-square problem can be easy solved using a quasi-Newton's method instead of classical Gauss-Newton's one.In fact, quasi-Newton's method shows faster and more stable local convergence properties than Gauss-Newton's one [22].This method requires the knowledge of the first and the second derivative of the function to minimize with respect to each element ( 0 ,  1 ,  2 ,  3 ,  1 ,  2 , and  3 ).The process of estimation and prediction needs the determination of his gradient.In order to compute such a gradient, the following definitions will be needed.
The gradient of the quaternion is determined via the following: For the acceleration, his gradient is given as follows: Finally, the gradient is given by: This discrete optimization leads to a simplified calculation of the Hessian: Remark 3.For the prediction's process of x, the cubic spline method can be applied.
The minimization of ( 26) and (28) using numerical software and a linear-quadratic regulator ad hoc function, with the knowledge of the derivative (faster), will take a mean of 0.85 sec, which can be compared to the 0.025 sec that are needed for the Newton's algorithm.This result could be even more improved with an optimization of the computation.All computations were done on a PC at 1.6 GHz with 1Go Ram.
It can be proved that the problem (28) admits two global solutions, namely,   and −  [3].Actually, both   and −  give the same orientation of the rigid body in the physical space.The optimization routine is initialized by q which is obtained by the integration of ( 14).Then, thanks to an appropriate choice of the sampling period, the quaternion obtained by solving (28) is always nearest to q.Therefore,   does not exhibit jumps as it is observed with others techniques used to compute the quaternion attitude from accelerometer and magnetometer measurements.Moreover, the chosen algorithm guarantees the quaternion norm constraint.
The performances of the proposed method are similar to those of the Extended Kalman Filter (multiplicative and additive); the results are depicted in Figure 5.However, for the extreme errors, the convergence rate for our estimationprediction is higher.
The schema describing the full estimator (q, ⃗ , ν) is given in Figure 6.The algorithm in the upper box attempts to find the "best" quaternion that relates the gravity field and the earth magnetic field measurements in the body coordinate frame to well known values in the earth coordinate frame.Remember that the inertial body accelerations have been removed from the directs accelerometer measurements.This pseudomeasured quaternion   is compared to q obtained by the integration of the dynamics equation of the observer (24), in order to compute the error ⃗ .
Remark 4. In general, a nonlinear observer is not robust to measurement disturbance in the sense that arbitrarily small disturbance may results in a blowup of error state.
Recently in [11] we have shown that the error dynamics in the proposed attitude observer is passive.Motivated by this fact, the robustness of the proposed observer can be showed, considering that the proposed observer is input-tostate stable when the measurement disturbance is seen as input and the error state as the state [23].

Simulated Data.
In this section, some simulation results are presented in order to illustrate the performance of the proposed method.A rigid body with low moment inertia is taken as the experimental system; in our case the movement of the shoulder is carried out.In fact, the low moment of inertia makes the system vulnerable to high angular accelerations which proves the importance of applying the method.
In order to verify the performance of the proposed discrete optimization, several simulation cases are carried out.In this paper only one of them is shown.
The movement of the shoulder is oscillatory, for the estimation and prediction algorithm, the conditions point is "far" from the theoretical point in orden to observe the convergence of the methodology proposed.The simulated acceleration ⃗  is depicted in Figure 7.As can be seen, it exhibits transients and steps values, and the discrete optimization (estimation and prediction) is shown in Figure 7.It is evident that ⃗  cannot be considered as weak.For the case of the quaternion estimated and predicted, the results of the methodology proposed are shown in Figure 7, and as expected the attitude converges to the movement simulated.

Application to Real Data
In this part of the work, some numerical implementations of the observer are presented.Moreover, the estimation methodology proposed in this work is implemented and evaluated with real data, in order to assess its effectiveness.
The discrete-time model that describes the attitude kinematics is expressed by The vector ⃗   is the quaternion at the time instant   , where   is the system's sampling period.Observe that (34)   is valid provided that the angular velocity ⃗   measured at the time instant   is assumed to be constant in the time interval [  , ( + 1)  ].The process of computing the initial condition ⃗  0 is usually called alignment.Once (34) is solved, the attitude matrix can be updated via (5).
The attitude estimate is used twice during positioning estimation.The accelerometer senses the body's own (nongravitational) acceleration and the projection of the gravitational acceleration (12).
The next step requires integration of ⃗   () = [ ⃗ ()]  ⃗   () to derive the position estimate A numerical integration routine such as the trapezoidal rule can be used to solve (35) numerically.The normalized quaternion ⃗   moves the unit sphere along an arc connecting ⃗  0 to ⃗   .Finally, the desired expression of the interpolated quaternion, which fulfils the initial and end conditions for a stride, is as follows: The gravity-compensated acceleration is then single time integrated; the initial and end conditions are imposed to avoid drift (null velocity), before positioning estimation.
The angular velocity ⃗  is obtained by finite differences at the instants  and  − 1 ( estimation instant) as follows: A commercial attitude unit (CAU) is used to acquire the sensor data described in Section 3.This CAU may provide the Euler's angles.Remember that the attitude estimate is computed using a unit quaternion formulation.For comparison purpose, the estimated quaternion is converted into Euler's angles.
During this test, the CAU is placed in the hand and in the shoulder (Figure 3).The Euler's angles provided by the CAU (named CAU angles) together with the 9 measurements are recorded.The CAU angles are compared to the angles corresponding to the attitude quaternion estimated with the proposed methodology (named  angles).The movement of the hand is composed of circular movements in each axe and the movement of the shoulder are Flexion-Extension, Abduction-Adduction, and Internal-External.As can be seen in Figure 8, the states provided by the algorithm in Figure 6 converge to their expected values.The roll angle remain nearly constant which is consistent with the movement that has been performed.Note that the comparison between the CAU angles and the  angles is difficult because the CAU cannot be considered as a reference attitude measurement system.Actually, no information about the algorithm embedded in the CAU is available.Moreover, the CAU system does not directly provide the body accelerations.In Figure 8, the accelerations are given in the inertial frame .As expected, the components of ⃗  are consistent with the circular movement.
The sensor module which combines three angular rate gyros, three orthogonal DC accelerometers, and three orthogonal magnetometers was designed and constructed; the noise characteristic of the senors is show in Table 2.The 9 orthogonal sensors measurements are obtained at an sample rate of 60 Hz, and they are transmitted to the PC by means of the serial port.In order to have a friendly interface, the acquisition protocol is put in a dynamic-link library (DLL) which can be used during off-line analysis or during realtime application using any numerical software and simulation environment platform.

Trial Description.
The analysis performance of the proposed observer can be split into two stages.The ability of the observer to estimate the rate gyro bias and the quality of the attitude (orientation) estimation towards nonweak accelerations.In order to show the effectiveness of the observer, a trial was realized, the sensors data were recorded, and an off-line analysis were carried out.The trial is described as follows: (1) The sensor module (SM) was placed to a well-known orientation  0 = [1 0 0 0]  (the SM is still in the horizontal, and it is headed toward the magnetic  north) which correspond to shoulder angular position (, , ) = (0, 0, 0).
(2) The SM is still at  0 for 10 sec.
(3) The SM is turned in all directions to different angular velocities for 20 sec.Shoulder Extension-Flexion, Abduction-Adduction, and Internal-External rotation  = 90 ∘ .
(4) The SM is placed at its initial angular position such that the final and initial orientations are identical.
(5) For all the simulation time span, the signal ⃗  int = [2 1.5 sin(2  ) 0]  m/sec 2 is added to accelerometers channels (that is done in order to show the ability of the proposed approach to estimate the acceleration and in the same way to depict the insensibility to nonweak acceleration).( 6) For all the simulation time span, the vector ⃗  int = [0.1 0.5 sin(2  ) (1/) +   ]  was added to the vector of the rate gyro measurements, in order to test the ability to estimate and compensate the rate gyro bias.
The initial conditions for the observer state are: q( 0 ) = [0.470.19 0.38 0.76]  and ⃗ ν( 0 ) = [0 0 0]  .In Figure 9, the estimated quaternion q and the pseudomeasured quaternion   associates to the shoulder angular position are depicted.As expected, the attitude estimate reaches the true attitude (which in this case it is well known and represented by:  0 = [1 0 0 0]  ) in suitable time for practical implementation.In this trial, after the shoulder The ability of the observer to estimate the bias is showed in Figure 9, where the added bias vector ⃗  int and its estimate ν are depicted.
The acceleration actuating in the sensor coordinate system (the signal added to accelerometers channels), expressed in the inertial coordinate system, is depicted in Figure 10.That demonstrates the capabilities of the proposed observer to estimate together the attitude and the acceleration.This last fact allows to obtain an attitude quaternion insensitive to nonweak accelerations.
Finally, the estimated movements of the shoulder: Extension-Flexion, Abduction-Adduction, and Internal-External rotation are showed in Figure 11.These results show the effectiveness of the estimation schema.The attitude estimation observer proposed in this paper has been implemented in language , where efficient methods have been applied for computing the quaternion-based attitude.The implemented observer is also put in a dynamiclink library (DLL) which can be used during real-time application, as show in Figure 12, where we can see the virtual human model tracks the movement of the person and move the robot in the laboratory (remote assistive robot Figure 12).

Conclusion and Future Works
In this paper, a new approach to estimate together attitude and accelerations of a body is presented.The orientation of the rigid body has been parameterized by unit quaternion in order to avoid the singularities of the Euler's angles.The attitude estimation unit is made of nine sensors, namely, a triaxis accelerometer, three magnetometers and three rate gyros that are orthogonally mounted.A nonlinear observer is implemented, and its convergence is proved.A quaternion pseudomeasurement is obtained from the accelerometer and magnetometer measurements using a discrete optimization technique with constraints.Note that the influence of the body accelerations is removed from the accelerometer measurements.Thus, the quaternion pseudomeasurement does not depend on the acceleration values.Therefore, the classical hypothesis " ⃗  is weak", is no more necessary.Moreover, only one observer is used and it does not depend on the acceleration amplitude.
The proposed nonlinear observer together with its pseudomeasurement computation is tested on simulated and real data.The results obtained are really encouraging, because the observer error is very small with a low computational cost.Moreover, a version of the algorithm for attitude and acceleration estimation is applied to interacts with a virtual 3D model of robot in the laboratory 6 that enable "touch" a virtual world.
In further work, the results obtained with the proposed methodology will be compared to those provided by a visionbased human motion capture system that will be used as a reference attitude estimation system and embedded in robots to assist people and improve human performance in daily and task-related activities, focusing in particular on populations with special needs, including those convalescing from trauma, rehabilitating from cognitive and/or physical injury, aging in place or in managed care, and suffering from developmental or other social, cognitive, or physical disabilities.Robotics has the potential to both (1) serve as a tool for principled, analytical study of human behavior and (2) provide unique assistive technologies to improve quality of life.

Figure 2 :Figure 3 :
Figure 2: Shoulder region and example of body and inertial coordinate system.
Model of the human body

Figure 4 :
Figure 4: Shoulder movements and human model.

Figure 5 :
Figure 5: Comparison of the algorithm versus extended Kalman Filter.

Figure 9 :Figure 10 :
Figure 9: Estimation of the quaternion and the gyro bias.

Figure 12 :
Figure 12: Anatomical movements of the shoulder: real-time Validation.