计算机应用 ›› 2016, Vol. 36 ›› Issue (2): 301-306.DOI: 10.11772/j.issn.1001-9081.2016.02.0301

• 第三届CCF大数据学术会议(CCF BigData 2015) • 上一篇    下一篇

手机内置加速度传感器数据的空间坐标转换算法

赵宏, 郭立渌   

  1. 兰州理工大学 计算机与通信学院, 兰州 730050
  • 收稿日期:2015-08-29 修回日期:2015-09-15 出版日期:2016-02-10 发布日期:2016-02-03
  • 通讯作者: 赵宏(1971-),男,甘肃西和人,教授,博士,CCF会员,主要研究方向:并行与分布式处理、嵌入式系统、系统建模与仿真。
  • 作者简介:郭立渌(1989-),男,河南南阳人,硕士研究生,主要研究方向:嵌入式系统、室内定位。
  • 基金资助:
    国家自然科学基金资助项目(61262016);甘肃省自然科学基金资助项目(1208RJZA239)。

Space coordinate transformation algorithm for built-in accelerometer data of smartphone

ZHAO Hong, GUO Lilu   

  1. College of Computer and Communication, Lanzhou University of Technology, Lanzhou Gansu 730050, China
  • Received:2015-08-29 Revised:2015-09-15 Online:2016-02-10 Published:2016-02-03

摘要: 手机内置加速度传感器坐标系固定于设备自身,其采集的数据因手机姿态的改变而不断发生漂移,受此影响即使同一运动过程,加速度数据也难以同前一个时刻保持一致。为解决该问题,提出利用空间坐标转换算法将加速度数据从手机坐标系映射至惯性坐标系,从而确保数据在手机任意姿态下均能准确反映实际的运动状态。为验证该方法的有效性,设计一种手机传感器数据在线采集与实时处理新方法,实现Matlab中数据动态特征的实时观测及算法性能的在线评估。利用此方法,在旋转实验中分别测试方向余弦与四元数两种算法的可行性,并在计步器实验中进一步测试四元数算法性能。实验结果表明,基于方向传感器数据的方向余弦算法因测量范围限制,不能实现全方位空间坐标转换;而基于旋转矢量传感器数据的四元数算法则能够实现全方位转换,且转换后的加速度对步态识别率达到95%以上,较准确地反映了实际运动状态。

关键词: 手机内置传感器, 数据漂移, 空间坐标转换, 四元数法, 计步器实验

Abstract: The coordinate system for smartphones' built-in acceleration sensor is fixed on the equipment itself, the data collected by the smartphone is constantly drifting due to the change of smartphone's posture. Affected by this, even the same movement process, the acceleration is difficult to keep consistent with the previous one. To solve this problem, the acceleration was mapped from smartphone to inertial coordinate system by using space coordinate transformation algorithm, to ensure that the sensor data can accurately reflect actual motion state no matter in what gesture the smartphone is. To verify the effectiveness of this method, a new method for online acquiring and real-time processing smartphone's sensor data was designed. With this method, the feasibilities of direction cosine algorithm and quaternion algorithm were tested in rotation experiments. Then, the performance of quaternion algorithm was further tested in pedometer experiments. The experimental results show that the direction cosine algorithm fails to achieve comprehensive coordinate transformation due to the measurement range limit; while the quaternion algorithm based on rotation vector sensor data can achieve full conversion, and the recognition rate of gait using transformed acceleration is over 95%, which can accurately reflect the actual state of motion.

Key words: smartphone built-in sensor, data drift, space coordinate transformation, quaternion algorithm, pedometer experiment

中图分类号: