2154 IEEE/ACM TRANSACTIONS ON NETWORKING,VOL.26.NO.5.OCTOBER 2018 By now we have obtained the rotation matrix by rotating the experience a consistent acceleration.We address this issue body frame to align the previous gravity vector g to the current based on the observation that if multiple devices are subject gravity vector g'in the vertical direction.However,there still to a consistent accelerations,then all the accelerometers of exists another degree of freedom in the horizontal direction the devices should experience similar accelerations at a coarse because the body frame can rotate about the current gravity level [29],[30,as the accelerations due to human motions are vector g'by any angle 0'on the horizontal plane.Thus, likely to dominate the accelerations caused by other intra-body we need to further compute the rotation matrix R'with the motions.Thus,for each pair of devices,we compute the cor- rotation angle on the horizontal plane to accurately estimate relation of the measured accelerations at 1-10 Hz frequencies, the rotation matrix At.t+6t.As the body frame is rotated which are the frequency range of human motions.We use a around the current gravity vector g',then the rotation axis Support Vector Machine based classifier to determine whether can be defined by a unit vector u'by normalizing the gravity all devices are subject to a consistent acceleration according vector g',i.e.,u'=According to the Rodrigues'rotation to their pair-wise correlations. formula,suppose the rotation angle in the horizontal plane Direction Change of Consistent Acceleration:During the is 0',we compute the corresponding rotation matrix R'()as process of human motions,the consistent acceleration could be follows: also changing by the human subject over time.The change of R'(@')=I+(sin')U'+(1-cos0')U2 the direction could be performed intentionally when the human (10) subject is turning around or unintentionally when the human where I is a 3x3 unit matrix,and U'denote the cross-product subject is slightly off the straight path.In such situations, matrix for the vector u'.We call the above rotation as the it is essential to synchronize the global frames derived from horizontal rotation.Therefore,the rotation matrix At.t+6t can the consistent acceleration with different directions:otherwise. be estimated as follows: the global coordinates cannot be consistent with each other. We address this issue as follows:Suppose that all devices are At.:+61(0')=RR'(0') (11) subject to two different forwarding accelerations with different Fig.12 illustrates the two rotations for estimating the rotation directions at time tk-1 and tk,respectively.After PCA. matrix At.t+6t. for each device.we obtain the two forwarding accelerations based on the reference local coordinate,i.e.,fe()and B.Calibration With MMSE Estimator fe(tk),respectively.We calculate the angle deviation between fe(tk-1)and fe(tk)on the horizontal plane as ni for each According to the observations in previous work [6].[7] device.After that,we compute the average value from all and the analysis in Section 4,we know that after a long m devices to mitigate the variances in estimating the angle period of tracking,there could be a fairly large error for deviation.Then,we use the angle deviation n as the direction the estimator At.t+6t of gyroscope tracking.Fortunately. change of the consistent acceleration to further calibrate the we have already calculated a rotation matrix At.t+6t() rotation matrix for space synchronization. from the rotation-based model.As the gravity direction can be accurately extracted through low pass filters such as the B.Limitations Butterworth filter,we actually obtain an accurate formulation Limitation to the Potential Application Scenarios:MOSS of the rotation matrix At.t+6t with an unknown variable 0'. uses an estimator to derive a consistent direction on the Thus,to estimate the rotation angle according to the horizontal plane,such as the moving direction.Combined estimator At.t+6t from the gyroscope tracking,we leverage the with the gravity direction,MOSS build synchronized coor- Minimal Mean Squared Error (MMSE)estimator.We define dinates among different mobile devices.Hence,a consistent the estimation error matrix as E=At.t+6t-At.t+6t,where acceleration on the horizontal plane for multiple devices is the mean squared error(MSE)e is: essential for space synchronization.This requirement may not 3 be satisfied for all applications.In some applications,e.g., (E()2=∑∑ (A-A(0)2 when a human subject is jumping up and down with multiple i=1j= devices,the consistent acceleration only exist on the vertical We then compute the optimal value of that achieves the plane,which does not help to build synchronized coordinates minimal mean squared error for the estimator At.t+6t: among these devices.Besides,even if there exists a consistent acceleration for multiple devices on the horizontal plane,when 0*=argminge(') (12) the consistent acceleration changes from time to time in a Thus,after computing the optimal value 0',we use the frequent manner,the time window to collect the samplings of rotation matrix At.t+t()as the calibrated estimator for the the acceleration might be too small,such that the consistent acceleration cannot be effectively extracted from the limited rotation matrix At.t+6t. time window.Thus,the application scope of MOSS does have VIII.DISCUSSIONS AND LIMITATIONS some limitations in the property of consistent acceleration. Vulnerability to Sudden Activities:MOSS achieves good A.Discussions performance when the human subject is performing regular Timing for Space Synchronization:During the process of free activities,such as walking,jumping,and running,in which human motions.we need to find the time that all devices the arm's or hand's movements in these activities are relatively2154 IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 26, NO. 5, OCTOBER 2018 By now we have obtained the rotation matrix by rotating the body frame to align the previous gravity vector g to the current gravity vector g’ in the vertical direction. However, there still exists another degree of freedom in the horizontal direction because the body frame can rotate about the current gravity vector g’ by any angle θ on the horizontal plane. Thus, we need to further compute the rotation matrix R’ with the rotation angle θ on the horizontal plane to accurately estimate the rotation matrix At,t+δt. As the body frame is rotated around the current gravity vector g’, then the rotation axis can be defined by a unit vector u’ by normalizing the gravity vector g’, i.e., u’ = g’ g’ . According to the Rodrigues’ rotation formula, suppose the rotation angle in the horizontal plane is θ , we compute the corresponding rotation matrix R’(θ ) as follows: R (θ ) = I + (sin θ )U + (1 − cos θ )U2 (10) where I is a 3×3 unit matrix, and U denote the cross-product matrix for the vector u’. We call the above rotation as the horizontal rotation. Therefore, the rotation matrix A t,t+δt can be estimated as follows: At,t+δt(θ ) = RR (θ ) (11) Fig. 12 illustrates the two rotations for estimating the rotation matrix A t,t+δt. B. Calibration With MMSE Estimator According to the observations in previous work [6], [7] and the analysis in Section 4, we know that after a long period of tracking, there could be a fairly large error for the estimator A t,t+δt of gyroscope tracking. Fortunately, we have already calculated a rotation matrix At,t+δt(θ ) from the rotation-based model. As the gravity direction can be accurately extracted through low pass filters such as the Butterworth filter, we actually obtain an accurate formulation of the rotation matrix At,t+δt with an unknown variable θ . Thus, to estimate the rotation angle θ according to the estimator A t,t+δt from the gyroscope tracking, we leverage the Minimal Mean Squared Error (MMSE) estimator. We define the estimation error matrix as E = A t,t+δt − At,t+δt, where the mean squared error (MSE) e is: e(θ ) = 3 i=1 3 j=1 (Ei,j (θ ))2 = 3 i=1 3 j=1 (A i,j − Ai,j (θ ))2 We then compute the optimal value of θ that achieves the minimal mean squared error for the estimator A t,t+δt: θ∗ = argminθe(θ ) (12) Thus, after computing the optimal value θ∗, we use the rotation matrix At,t+δt(θ∗) as the calibrated estimator for the rotation matrix At,t+δt. VIII. DISCUSSIONS AND LIMITATIONS A. Discussions Timing for Space Synchronization: During the process of human motions, we need to find the time that all devices experience a consistent acceleration. We address this issue based on the observation that if multiple devices are subject to a consistent accelerations, then all the accelerometers of the devices should experience similar accelerations at a coarse level [29], [30], as the accelerations due to human motions are likely to dominate the accelerations caused by other intra-body motions. Thus, for each pair of devices, we compute the correlation of the measured accelerations at 1-10 Hz frequencies, which are the frequency range of human motions. We use a Support Vector Machine based classifier to determine whether all devices are subject to a consistent acceleration according to their pair-wise correlations. Direction Change of Consistent Acceleration: During the process of human motions, the consistent acceleration could be also changing by the human subject over time. The change of the direction could be performed intentionally when the human subject is turning around or unintentionally when the human subject is slightly off the straight path. In such situations, it is essential to synchronize the global frames derived from the consistent acceleration with different directions; otherwise, the global coordinates cannot be consistent with each other. We address this issue as follows: Suppose that all devices are subject to two different forwarding accelerations with different directions at time tk−1 and tk, respectively. After PCA, for each device, we obtain the two forwarding accelerations based on the reference local coordinate, i.e., fc(tk−1) and fc(tk), respectively. We calculate the angle deviation between fc(tk−1) and fc(tk) on the horizontal plane as ηi for each device. After that, we compute the average value η¯ from all m devices to mitigate the variances in estimating the angle deviation. Then, we use the angle deviation η¯ as the direction change of the consistent acceleration to further calibrate the rotation matrix for space synchronization. B. Limitations Limitation to the Potential Application Scenarios: MOSS uses an estimator to derive a consistent direction on the horizontal plane, such as the moving direction. Combined with the gravity direction, MOSS build synchronized coordinates among different mobile devices. Hence, a consistent acceleration on the horizontal plane for multiple devices is essential for space synchronization. This requirement may not be satisfied for all applications. In some applications, e.g., when a human subject is jumping up and down with multiple devices, the consistent acceleration only exist on the vertical plane, which does not help to build synchronized coordinates among these devices. Besides, even if there exists a consistent acceleration for multiple devices on the horizontal plane, when the consistent acceleration changes from time to time in a frequent manner, the time window to collect the samplings of the acceleration might be too small, such that the consistent acceleration cannot be effectively extracted from the limited time window. Thus, the application scope of MOSS does have some limitations in the property of consistent acceleration. Vulnerability to Sudden Activities: MOSS achieves good performance when the human subject is performing regular free activities, such as walking, jumping, and running, in which the arm’s or hand’s movements in these activities are relatively