Aida Makni
email: aidamakni@gmail.com

Grégoire Lefebvre
email: gregoire.lefebvre@orange.com

Attitude Estimation for Posture Detection in eHealth Services

Keywords: Inertial Measurement Unit, Attitude Estimation, Posture Detection, eHealth, Actigraphy

We investigate the influence of two attitude estimation methods for human posture detection. In the context of ADL (i.e. Activities of Daily Living) we analyze inertial sensors to reveal uncomfortable situations. Quantifying postures such as standing up, walking, lying down or sitting may feature people autonomy and well being. We report comparisons between two main attitude estimation strategies. Our experimental protocol uses a precise ground truth obtained from two annotators. The dataset involves 9 participants and provides 50 various data sequences. We discuss the obtained promising results, analyze advantages and limits when using attitude estimation in this context.

I. INTRODUCTION

Nowadays, eHeath services based on inertial sensors increasingly rely on methods for detecting human postures and actions. Human action recognition based on inertial sensors has been an active area of research due to its success in robotics [START_REF] Ojeda | Flexnav: fuzzy logic expert rulebased position estimation for mobile robots on rugged terrain[END_REF], human computer interaction [START_REF] Hürst | Gesture-based interaction via finger tracking for mobile augmented reality[END_REF], guidance [START_REF] Lee | Selective device activation for power reduction in accelerometer-based wearable guidance systems for the blind[END_REF], etc. Actions may be viewed as sequences of static and dynamic postures during the time. Nevertheless, human posture detection remains challenging, in particular for eHealth applications [START_REF] Berenguer | Evolution of activities of daily living using inertia measurements: The lunch and dinner activities[END_REF]. Indeed, posture analysis in Activities of Daily Living (ADL) is crucial because it may reveal a disease, a loss of autonomy, difficult working conditions, etc. In this case, device attitude estimation (i.e. device orientation with respect to Earth's local frame [START_REF] Wahba | A least squares estimate of satellite attitude[END_REF]) is fundamental.

Modern IMUs (Inertial Measurement Units) embed accelerometer, gyroscope, and magnetometer sensors which enable methods for attitude estimation. These methods investigate various domains such as: aerospace [START_REF] Lefferts | Kalman filtering for spacecraft attitude estimation[END_REF], unmanned aerial vehicles [START_REF] Euston | A complementary filter for attitude estimation of a fixedwing uav[END_REF], indoor positioning [START_REF] Renaudin | Magnetic, Acceleration Fields and Gyroscope Quaternion (MAGYQ) Based Attitude Estimation with Smartphone Sensors for Indoor Pedestrian Navigation[END_REF], etc. Moreover, the particular context of smartphones carried by people in their everyday lives brings new challenges for detecting their postures. If people let their phone on a pocket, upsidedown or in their backpack, attitude estimation is relevant to transform input data in a reference orthonormal coordinate system such as a torso relative one. In a torso linked referential, postures as standing up or lying down are indeed easier to detect. External accelerations, gyroscope variations and magnetic perturbations need to be controlled when attitude estimation is realized to prevent additional issues.

Our contributions are the investigation of a posture detection system precision in the context of everyday life scenarios. We consider classical postures (such as lying down, sitting, standing up, walking, etc.) with various human behaviors in an indoor environment. We then analyze, compare and evaluate two state-of-the-art methods for attitude estimation. One originality is an indirect evaluation of attitude estimation methods with posture detection error quantification in regards to a human-made ground truth. The optimal automatic system should be as smart as human perception of postures.

The paper is organized as follows: the next section briefly reviews the state of the art of posture detection systems and models. In section 3, we review two classical attitude estimation methods. In section 4, we describe our experimental protocol and results are presented. Finally, Section 5 summarizes our contributions and concludes the paper.

II. HUMAN POSTURE DETECTION

Human posture detection based on IMU data may be described as challenging sequential pattern recognition. The main objective is to determine as precise as possible starting and ending timestamp of a labeled posture. Classically, as in [START_REF] Boulay | Human Posture Recognition for Behaviour[END_REF], postures are defined as a hierarchical representation from a root posture as standing up to more precise situations as standing with right arm up or lying down with curled up legs on right side (see Fig. 1). Generally, automatic posture detection systems use 3 main strategies based on: heuristics, statistical inference or machine learning.

In the first strategy, heuristics from IMU data are built to detect postures. For instances, in [START_REF] Yoon | Estimation of sleep posture using a patch-type accelerometer based device[END_REF], the authors develop a sleep posture estimator using 3-axis accelerometer data in order to prevent Obstructive Sleep Apnea Syndrome (OSAS). Likewise, when a device is worn on the torso such as a necklace, and if the z accelerometer axis is collinear to the gravity force, some rules may be provided. For example, the detection of the standing up position is when z accelerometer data are around g and x accelerometer are around 0. In the same way, the detection of the lying down position is when z accelerometer data are around 0 and x 3D Posture Avatar accelerometer are around g. Of course, threshold parameters should be fixed in advance, which is a real drawback for uncontrolled real life situations.

The second strategy suggests modeling the temporal structure of postures, with Hidden Markov Models (HMM). For instance, hand gestures in [START_REF] Pylvänäinen | Accelerometer Based Gesture Recognition Using Continuous HMMs[END_REF], which may be viewed as body postures, are modeled class by class from finite samples and the detection process consists of maximizing the likelihood of each class model outputs from input data.

The third method is to learn specialized classifiers (e.g. Support Vector Machine (SVM), Neural Networks (NN), etc.), which detect specific human posture from IMU data. In [START_REF] Nelson | Tracking indoor activities of patients with mild cognitive impairment using motion sensors[END_REF], Nelson et al. study how to maintain a healthy living for patients with Mild Cognitive Impairment (MCI). Their system based on IMU data models people activities with SVM based on their posture feature vectors.

In this study, we investigate the coupling between a posture detection method and two attitude estimators. Consequently, we build a posture detection algorithms based on the first strategy with heuristics in order to evaluate the attitude estimator added values. Fig. 2 shows our design. First, classical signal processing methods are applied to filter and denoise raw IMU data (i.e. a Butterworth filter with a Cutoff frequency of 0.01). Then, an attitude estimator is computed (see Section III) in order to calibrate data in a torso based referential. Following the next steps, rules are combined to classify IMU data to 5 human postures: walking, bending, lying down, standing up and sitting. From accelerometer data, dynamic versus static phase is obtained by thresholding data variation on a sliding window. For dynamic phases, we label temporal segments as walking and bending in regard to a step detector. Here, successive peaks on accelerometer energies with a frequency between 0.6 Hz and 2.5 Hz define a walking step. For static phases, we test first a lying and in second a standing pattern detectors based on samples revealing these situations. Finally, if no label is assigned after the lying and standing detectors, then the remain segments are classified as sitting postures. The schema relies then on a device attitude estimator, which may strongly influence the automatic posture detection accuracy.

III. DEVICE ATTITUDE ESTIMATION

A. Background

Attitude estimation using IMU data is an important task in order to give an accurate posture detection for ADL monitoring. The 3-dimensional attitude of a rigid body is determined as the axes orientation of the body frame

B(X B , Y B , Z B ) with respect to a local Earth-fixed frame N (X N , Y N , Z N ).
It can be generally represented in 3 principal forms: Euler angles, quaternion, or Direction Cosine Matrix (DCM). The quaternion representation offers a linear formulation of the attitude dynamics in contrary to the other representations. In this paper, the unit norm quaternion is used to represent the attitude. It is defined as:

q = [q 0 q T ] T = [q 0 q 1 q 2 q 3 ] T ∈ R 4 , (1)
where q 0 and q are the scalar and the vector parts of the quaternion, respectively. For IMU sensors, we consider a triad of sensors consisting of a gyroscope measuring the angular velocity, an accelerometer measuring the sum of the gravity and the device external acceleration and a magnetometer measuring the magnetic field. The classical kinematic equation to describe the variation of the attitude in term of quaternion is defined as follows [START_REF] Shuster | Survey of attitude representations[END_REF]:

q = 1 2 q ⊗ ω, (2)
where ω = [0 ω T ] T is the quaternion representation of the angular velocity ω = [ω x ω y ω z ] T expressed in B.

The literature proposes different methods for attitude estimation [START_REF] Hua | Implementation of a nonlinear attitude estimator for aerial robotic vehicles[END_REF], [START_REF] Mahony | Nonlinear Complementary Filters on the Special Orthogonal Group[END_REF]- [START_REF] Moeini | Global estimation of rigid-body attitude/position using a single landmark and biased velocity measurements[END_REF], [START_REF] Vasconcelos | Discrete-time complementary filters for attitude and position estimation: Design, analysis and experimental validation[END_REF]. In the following, we report the two different methods used in this study, exploiting firstly complementary filters [START_REF] Mahony | Nonlinear Complementary Filters on the Special Orthogonal Group[END_REF] and secondly Kalman filters [START_REF] Makni | Energyaware Adaptive Attitude Estimation Under External Acceleration for Pedestrian Navigation[END_REF].

B. Complementary Filters (CF)

Figure 3: CF block diagram algorithm [START_REF] Mahony | Nonlinear Complementary Filters on the Special Orthogonal Group[END_REF].

In the study of Mahony et al. [START_REF] Mahony | Nonlinear Complementary Filters on the Special Orthogonal Group[END_REF], attitude estimation is performed from low cost IMU sensors. The input data is then very noisy with sampling period variations. In order to resolve these issues, the authors write the filtering problem as deterministic observers, linked on the Special Orthogonal group SO(3), driven by reconstructed attitude and angular velocity measurements. This method leads to determine two non-linear observers on SO(3), termed the direct CF and passive CF.

As described in the Fig. 3, the main idea is to calculate the error by cross-multiplying measured and estimated vectors. Then a correction step is used to correct the measured angular velocity. Again the quaternion propagation is integrated to obtain an estimate of the orientation.

The direct CF proposes non-linear observers using quaternion representations. The passive CF is derived from the reconstructed attitude based on the gyroscope measurements, avoiding coupling the constructed attitude error with the predictive velocity update. Additionally, the authors propose a formulation of the passive CF into an explicit CF from gravitational and magnetic field measurements that do not require online algebraic attitude reconstruction, which is a weakness for embedded systems. In this method, the attitude detector accuracy depends mainly on the K p gain parameter. Their experimental results appear very challenging on a robot and an unmanned aerial vehicle.

C. Quaternion Adaptive Kalman Filters (q-AKF) Likewise, Makni et al. [START_REF] Makni | Energyaware Adaptive Attitude Estimation Under External Acceleration for Pedestrian Navigation[END_REF] consider the challenge of rigid object attitude estimation under external acceleration using IMU data. Their study focuses on attitude estimation during dynamic phases. Consequently, for compensating the external accelerations, a quaternion-based Adaptive Kalman filter (q-AKF) is designed (see Fig. 4).

First, a detector decides if the object is in a static or dynamic phase. Then, the external acceleration covariance matrix is estimated to feature the filter gain. The second challenge tacked in this study is the energy consumption issue when using a gyroscope. For preserving IMU battery life, the authors design a switching policy in order to exploit gyroscope data only when it is useful. The efficiency of the two contributions shows challenging results and the attitude detector accuracy depends mainly on the P parameter, the initial value of the covariance matrix corresponding to the estimation error.

IV. EXPERIMENTS A. Dataset 1) Proposed scenario: The objective of the scenario in [START_REF] Kim | Extraction de caracteristiques de lactivite ambulatoire du patient par fusion dinformations de centrales inertielles[END_REF] is to collect inertial data of many participants in a reallife scenario (cf. Fig. 5). As activities of daily living are composed of 4 main postures (e.g. standing up, sitting, lying down, walking), the participants were asked to follow a particular protocol for about 12 minutes. Each participant performs a specific posture sequence in a particular order as follows: (standing up -walking -standing up -sitting). This sequence is repeated 6 times and may be preceded by a lying down posture or followed by a (standing up -walking -standing up -lying down) sequence. Each data sequence represents then human behaviors similar to an everyday life, but condensed in 12 minutes. 2) Protocols: 9 participants (5 males and 4 females) were recruited to participate in the experiment [START_REF] Kim | Extraction de caracteristiques de lactivite ambulatoire du patient par fusion dinformations de centrales inertielles[END_REF]. The study was limited to French native participants in order to have homogeneous behavioral patterns and a standard annotation protocol. Ages are ranged from 22 to 55 years old with an average of 38. Participants had different functions: interns, developers, PhD students, researchers, ergonomists and project managers.

A device, named SK6 [START_REF] Williamson | Shoogle: Excitatory multimodal interaction on mobile devices[END_REF], as shown in Fig. 6, was fixed on the participant and collect inertial data. 3D accelerometer, 3D gyroscope, 3D magnetometer data are sampled every 100 ms, as shown in Fig. 7. The mean duration of each sequence is about 7643 samples (i.e. 13 minutes and 14 seconds long).

3) Data Annotation: One independent annotator segments manually each posture on the posture sequences in regards to the scenario, shown in Fig. 5. A second annotator validates the provided labels. This process was used for all inertial features in order to establish our ground truth (GT). The 4 main postures (i.e. lying down, sitting, standing up, walking) are labeled and also a bending label is added to mark the transition postures between lying down and sitting or standing up situations. These particular transition postures are indeed more fuzzy situations. This experiment design was thought to handle a list of classical postures known to largely contribute on activities of daily living. Finally, each sequence presents then around 35 annotated segments.

B. Results

Fig. 8 presents raw data of one session and the filtered data, obtained before the attitude estimation phase, used for posture detection. We observe that the low-pass filter on the z-axis data provides a smoother signal, denoising then some interferences. The posture detector is then facilitated when automatically labeling walking or standing up signal segments. Likewise, signal processing on y-axis reveals clearly situations when participants are lying down (i.e. in the beginning of the scenario and around 500 seconds. The two resulting postures, namely sitting and bending are then deduced from the 3 previous ones, as described in Fig. 2.

Each labeled segments build finally a specific APD (Automatic Posture Detector-based) posturogram that is compared to the specific GT (Ground Truth) posturogram for each participant. Fig. 9 shows two posturograms for one participant and the superposition of the two previous ones.

It is then notable that on this user session, the automatic posture detector performs well, underlying the ground truth. Some errors appears when distinguishing standing up and bending postures. These two postures are quite similar in real life, and these errors are due to some standing detector imprecisions. Sometimes, some errors show light delays when detecting postures. These time variations may be caused by some issues to determine precisely starting times of a new posture. Again, bending postures are less marked situations and consequently more difficult to detect because they often result from transfer phases between two marked situations (i.e. between standing up and sitting postures or between standing up and walking postures).

Posture detection evaluation is then performed by computing a (i.e. Dynamic Time Warping) based metric. In order to compare the precision of the APD posturogram in regards to the ground truth, this metric measures similarity between the two temporal sequences. Table I presents our evaluation with 3 configurations: firstly, with no attitude estimation before our posture detector, secondly with Complementary Filter (CF) attitude estimator (see III-B), and thirdly with q-AKF attitude estimator (see III-C). An average posture detection error is computed from a 5-cross validation process. 5 validation datasets are used to optimize CF and q-AKF methods while 5 test datasets are used to evaluate blindly the precision of the full posture detection process (i.e. including attitude estimation performances). One repetition contains 25 sequences from random participants.

In Table I, we observe that the minimal average error is performed by the q-AKF attitude estimator and our posture detector with a score of 0.192646 ± 0.023791. This means that around 80.74% of the posture sequences were correctly classified. This score is better than using CF attitude estimator (0.197152 ± 0.0.021079) or no attitude estimator (0.216408 ± 0.0009055). It reveals that using an attitude estimator is relevant for posture detection and that CF attitude estimation is less adequate in this context. Particularly, our protocol gives significance for dynamic phases, which may correspond better to q-AKF attitude estimation design. The main remaining confusions concern standing up and sitting postures and standing up and bending postures. On the contrary, the walking and lying down postures are mainly correctly classified by our specific detectors. As a complement, Fig. 10a presents the influence of the parameter K p , representing the gain in the CF formulation, on posture detection accuracy. The average minimal error over the 5 validation datasets is 0.197685 ± 0.023632 obtained for K p = 0.8. Likewise, Fig. 10b shows the posture detection accuracy when the parameter P varies over the 5 validation datasets and the mean minimal reached error is 0.190133 ± 0.025875 obtained for P = 4 × 10 -5 . P is the initial values of the covariance matrix used in the q-AKF attitude estimator.

V. CONCLUSIONS AND PERSPECTIVES

We investigate the influence of two attitude estimation methods for posture detection in the particular context of everyday indoor situations. We propose an experiment based on 9 participants for evaluating the precision of posture detection. Our experiments shed light on the relative impacts of the attitude estimation computation on inertial data based posture detection. The best overall result obtains 0.192646 of errors, which is very promising to feature human behavior when performing activities of daily living. Some challenges remain opened with large scaled datasets and environment perturbations as biases or acceleration noises due to means of transports in outdoor situations, for instance.

Figure 4 . 8 :

 48 Figure 4.8: Hierarchical representation of the postures of interest

Figure 1 :

 1 Figure 1: Hierarchical representation of human postures (extracted from [3]).

Figure 2 :

 2 Figure 2: Posture Detection Automate with classic heuristics.

Figure 4 :

 4 Figure 4: q-AKF block diagram extracted from [10].

Figure 5 :

 5 Figure 5: One sample posture sequence to be performed.

Figure 6 :

 6 Figure 6: SK6 device.

Figure 7 :

 7 Figure 7: Accelerometer, gyroscope and magnetometer data for one participant during one IMU data acquisition.

Figure 8 :

 8 Figure 8: Raw and filtered accelerometer data for one participant.

Figure 9 :

 9 Figure 9: Posturogram alignments between the Ground Truth (GT) and the Automatic Posture Detection (APD).

Table I :

 I Average posture detection errors.

	Methods		Validation	Test
	No attitude	Mean	0.210572	0.216408
	estimation	Standard Deviation	0.005730	0.009055
	(CF) [9]	Mean	0.197685	0.197152
		Standard Deviation	0.023632	0.021079
	(q-AKF) [10]	Mean	0.190133	0.192646
		Standard Deviation	0.025875	0.023791


Mostafa Ameli

Jean-Patrick Lebacque

Ludovic Leclercq

Multi-Attribute

Multi-attribute

Keywords: Multi-class, Trip-Based, Multi-modal Traffic Network Equilibrium Model

HAL is

Multi-attribute, Multi-class, Trip-Based, Multi-modal Traffic Network Equilibrium Model Ameli M. 1,2, * , Lebacque J. P. 1 , and Leclercq L. 2 1 Universite Paris-Est, IFSTTAR, GRETTIA 2 Universit de Lyon, IFSTTAR, ENTPE, LICIT *mostafa.ameli@ifsttar.fr

In this work we consider a trip-based multi-modal approach to network equilibrium. We assume that mode and path choice are carried out at the same level, therefore travel time (T T ) depends on travel path and the mode(s) attributes of travelers. This study develops a multi-class model with several parameters per class. Most multi-class flow models, classify travelers by identifying traveler attributes. In the literature, this classification process identifies seven categories of information about travelers: 1-risk taking attitude, 2-economic attributes, 3-general cost function, 4-choice function, 5-knowledge level of network, 6-cost function and 7-social class. Some research uses hybrid classification [START_REF] Jiang | Multi-class dynamic traffic assignment with physical queues: intersectionmovement-based formulation and paradox[END_REF]. In order to describe the traveler behavior, a general cost function that taking into account four of these information (2, 3, 6 and 7), is used. Typically the general cost function (GC) will integrate T T and travel cost (T C), and will take into account the class-dependent Value of time (VOT) [START_REF] Zhang | Dynamic pricing, heterogeneous users and perception error: Probit-based bi-criterion dynamic stochastic user equilibrium assignment[END_REF] denoted α i for class i, and a vector β i of economic and social class parameters. Hence the general cost of path p is

GC p (α i , β i ) = T C p (β i ) + α i .T T p (1)
The vector of parameters β i includes the mode(s) and social attributes of a traveler. This study presents a formulation of conditions for user equilibrium based on finitedimensional variational inequality (in the static case) with qualitative analysis of existence (which is usually straightforward) and unicity (which is usually not satisfied in the multi-modal case). Further we present a formulation for dynamic traffic assignment (DTA) and analyze the equilibrium in test cases by a simulation based approach with the gap function-based method [START_REF] Lu | Equivalent gap function-based reformulation and solution algorithm for the dynamic user equilibrium problem[END_REF]. The unicity in the static case is analyzed analytically [START_REF] Nagurney | A multiclass, multicriteria traffic network equilibrium model with elastic demand[END_REF]. We examine by simulation the formation of the equilibrium when the structure of the demand is given and the level of demand increases. The equilibrium changes qualitatively when the demand is increasing, which results in break points for the demand level at which the equilibrium solution changes significantly.

[

  This work has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement No 646592 -MAGnUM project)]