加速度定向多传感器计步器应用设计和实现外文翻译资料

 2022-12-25 14:10:58

2011 International Conference on Instrumentation, Measurement, Computer, Communication and Control

Acceleration and Orientation Multisensor Pedometer Application Design and Implementation on the Android Platform

Wang Hongman

Zhu Xiaocheng

Chang Jiangbo

National Key Lab. of Switching

National Key Lab. of Switching

Shanghai CINTel Intelligent Telecom

Technology and Telecommunication

Technology and Telecommunication

System Co., Ltd, Beijing branch,

Networks,

Networks,

Beijing, China,

Beijing University of Posts and

Beijing University of Posts and

Jiangbo.chang@cintel.com.cn

Telecommunications,

Telecommunications,

Beijing, China

Beijing, China

wanghm@bupt.edu.cn

xiaocheng.cherry@gmail.com

Abstract

This paper presents an Android platformrsquo;s pedometer application design which uses SOLite database to provide the historical data query function and bases on the acceleration sensor and the orientation sensor. This paper first introduces the background of the application and the principle of Android platform pedometer. In addition, it also analyzes and compares the different design between the single acceleration sensor pedometer and the multi-sensor pedometer, which proves the advantage of this design. And then, on this basis, this paper describes three main functionsrsquo; designs which are step count function, history query function and health test function. . This paper also describes the implementation and results of this application design and proves the designrsquo;s feasibility and correctness.

Keywords-Android; Sensor; Steps Calculation Principle; Pedometer

  1. INTRODUCTION

In thousands of years ago, walk was called 'mans best medicine' by Hippocrates who is the father of medicine, and the World Health Organization explicitly pointed out that 'the worlds best sport is to walk.' in 1992. With the development of society, people pay more attention to making life healthy, and walking tools-pedometer is becoming more and more popular. At present, many entitative pedometer equipments have already appeared in the market, such as Citizen, Omron and so on. Nowadays, such entitative pedometers are mainly divided into two kinds--mechanical and electronic [1]. Mechanical pedometer makes use of the vibration generated by human walking to make pedometer internal spring lamination or elastic ball vibration to produce electronic pulse. And then, internal processor judges the electronic pulse to achieve count steps function. The cost of this mechanical pedometer is lower, but its accuracy and sensitivity are very low. Electronic pedometer make use of the acceleration sensor[2] made by the new technology which is the combination of MEMS[3] and CMOS[4], such as ADXL330, ADXL340, measure the acceleration of the human walking to count steps.

With development of mobile network, people want to achieve more tools software implementation on mobile phones for convenience. Android[5] mobile phone platform is open enough to meet the requirements.. The existing Android platform pedometer usually uses the single

acceleration sensor to count walking steps. According to the human body walk process, Pedometer establishes count steps model through analyzing the regularity of acceleration change in the gravity direction. But only using the acceleration data collected by single sensor is difficult to accurately reflect acceleration changes in the gravity direction. This paper discusses a pedometer application making use of both of the orientation sensor and the acceleration sensor, in which orientation sensor maps acceleration to the gravity direction to achieve the accurate gravity acceleration change.

    1. ANDROID PLATFORM PEDOMETER OVERVIEW
  1. Android Overview

Announced by Google in November 5, 2007, Android is

an open-source mobile operating system based on Linux platform. This platform is composed of the operating system, the middleware, userrsquo;s interface and application software. At present the latest version is 3.0. The greatest characteristic of Android is open-source which makes application developers master the development details more accurately, and develop higher level and more discriminating applications.

Android platform uses software stack structure which is mainly divided into three parts. The bottom layer is Linux kernel. The middle is called middleware layer. The top is application software layer.

Compared with other mobile operating systems, Android has a broader market. Such as Microsoftrsquo;s Windows Mobile, The operators should to pay license fees to Microsoft. However, Android breaks certain restrictions by open-source. In addition, Google is also responsible for setting up Open mobile phone Alliance [6](Open Handset Alliance) to support and help Google to develop Android system and its application software. In view of the above advantage, Android gradually becomes the mainstream platform of mobile development, and, as a result, many personalized Android applications are generated.

B. Sensor Overview

The sensor is defined by the national standard GB7665-87 as: 'Sensor is which can feel the specified measured signal which is converted into usable signal according to certain rules. Sensor usually is comprised of sensitive components and conversion components'. Sensor is a detect

剩余内容已隐藏,支付完成后下载完整资料


加速度定向多传感器计步器应用设计和实现

摘要:

本文提出了一种Android平台下基于加速度传感器和方位传感器的计步器应用设计,利用SQLite数据库提供历史数据查询功能。本文首先介绍了Android平台计步器的应用背景和工作原理,并对单加速度传感器计步器和多加速度传感器计步器进行了分析比较,证明了该设计的优越性。然后,在这个基础上,本文介绍了三种主要功能的设计,即计算步数功能、历史查询功能、健康测试功能。本文还介绍了该应用程序设计的实现和结果,证明了该设计的可行性和正确性。

关键词:Android;传感器;步进计算原理;计步器

1.介绍

几千年前,步行被医学之父希波克拉底称为“人类最好的药”,世界卫生组织明确指出“世界上最好的运动就是走路”。随着社会的发展,人们更加注重使生命健康,而步行工具——计步器正变得越来越流行。目前,市场上已经出现了许多有力的计步器设备,如西铁城,欧姆龙等。如今,这种固定式计步器主要分为机械式和电子式两种[1]。机械计步器利用人行走产生的振动,使计步器内部弹簧分层或弹性球振动产生电子脉冲。然后,内部处理器判断电子脉冲以实现计数步数功能。这种机械计步器的成本较低,但其精度和灵敏度非常低。电子计步器利用新技术制造的加速度传感器[2],它是MEMS [3]和CMOS [参4]的结合,如ADXL330,ADXL340,通过测量人行走的加速度来计步数。随着移动网络的发展,人们希望在手机上实现更多的工具软件实现以方便使用。Android [5]手机平台足够开放以满足要求。现有的Android平台计步器通常使用单个加速度传感器来计算步行步数。根据人体行走过程,计步器通过分析重力方向加速度变化的规律性来建立计步模型。 但是仅使用单个传感器收集的加速度数据难以准确地反映重力方向上的加速度变化。 本文讨论了一种利用方向传感器和加速度传感器的计步器应用,其中方向传感器将加速度映射到重力方向,以实现精确的重力加速度变化。

2.Android平台计步器概述

A)Android由Google于2007年11月5日发布,是一个基于Linux平台的开源移动操作系统。该平台由操作系统、中间件、用户界面和应用软件组成。目前最新版本是3.0。 Android的最大特点是开源,使应用程序开发人员能够更准确地掌握开发细节,并开发更高级别和更具辨别力的应用程序。Android平台采用软件堆栈结构,主要分为三个部分。底层是Linux内核,中间称为中间件层,顶部是应用软件层。与其他移动操作系统相比,Android拥有更广阔的市场。如微软的Windows Mobile,运营商应向微软支付许可费。但是,Android打破了开源的某些限制。此外,谷歌还负责建立开放手机联盟[6],以支持和帮助谷歌开发Android系统及其应用软件。鉴于以上优势,Android以及它的应用软件逐渐成为手机发展的主流平台,因此,产生了许多个性化的Android应用程序。

B)传感器由国家标准GB7665-87定义为:“传感器可以感受到指定的测量信号,根据一定的规则将其转换为可用信号。传感器通常由敏感元件和转换元件组成”。传感器是一种检测设备,可以感知被测信息,并可以将信息转换为电信号或其他所需的信号形式。这是实现自动检测和自动控制的前提。根据工作原理,传感器可分为物理传感器和化学传感器:物理传感器的应用是基于物理效应,如压电效应、远离极化、热功率以及光电,磁电效应等。化学传感器包括化学吸附、电化学反应传感器。大多数传感器都是基于物理原理来操作的。最常见的物理传感器有压力传感器、力传感器、位置传感器、液位传感器、能耗传感器、加速度传感器等。本文所述的计步器应用基于Android平台上的智能移动终端传感器芯片,提供步行信息,实现计数步数功能。

C)Android平台传感器Android平台开发的特殊之处在于Android可以让开发人员方便地访问低级硬件。Android SDK提供面向硬件的特性。目前,可以支持传感器访问的Android平台[7]包括:方向传感器、加速度传感器、光传感器、磁场传感器、接近传感器、温度传感器等。但不是全部这些设备支持Android开发平台中定义的所有传感器。如果传感器不能用于某些设备,则相关应用程序也不能在此设备上使用。

3.Android平台多传感器计步器应用程序设计

所谓的多传感器是相对于单传感器而言的。现在,Android计步器应用程序大多使用单个加速度传感器来收集数据,并实现计数步数功能。本文介绍了Android平台的计步器应用设计,并以加速度传感器和方向传感器为基础。

A. 单传感器计步器的实现原理。单传感器的实现主要基于以下计步器原理:当人们行走时,会有一个上升和下降过程,也就是说,重力加速度值的方向将呈现为上升和下降。通过对加速度变化的分析,可以识别人们的步行速度,从而实现计步功能。从硬件传感器到识别人工步数,整个过程可分为三个阶段:

1)数据采集:使用Android平台接口访问硬件收集传感器数据。这里的传感器主要包括加速度传感器,本文增加了方向传感器数据采集,使计数步数更加准确,可以反映手机的状态。收集频率由人类行走的一般特征决定。一般来说,人类步行每秒0.5~2步,最多不超过5步,即步行频率为0.5~5Hz[1]。根据香农定理,采集频率应至少为2*Fmax(最大频率),即10Hz,考虑到应用的准确性和效率,选择频率为20Hz。

2)步数特征提取:根据上述数据的公式化,可以得到人行走时加速度变化的规律性特征。通常,根据人类行走中存在的起点和标记点状态,如果公式是正确的,并且结果中的加速度变化曲线形似正弦曲线,那么这就是建立模型的步数特征。

3)构建步数模型:在人行走过程中,波从波的顶部(底部)提取特征。通过筛选顶部(底部)加速度,可以确认为行走了一步。筛选条件为:

(1)加速波的顶部(底部)应满足一定的阈值,因为手机的任何移动都可能引起加速度的变化。使用阈值可以过滤这些数据干扰。

(2)连续计数步时间间隔必须为0.2~2秒,这符合人类一般的步行频率。有两种方法可以确定阈值。一种方法是通过测试数据的数量来确定固定的阈值,另一种方法是通过实时数据采集,确定动态阈值等。满足上述两个条件的波的顶部(底部)可以被识别一步。

B.多传感器计步器设计多传感器计步器应用程序使用方向传感器将加速度映射到重力方向,并获得准确的重力加速度变化。这种方法更具有联合理论支持,在实践中更加准确。与单传感器计步器类似,多传感器计步器也分为三个过程,包括基于多传感器的数据采集、基于多传感器的步数特征提取和基于多传感器的构建步数模型。每个流程设计如下:

1)基于多传感器的数据收集

图1传感器坐标系

加速度传感器的主要作用是获得手机的运动,该传感器获取三个参数。即加速度的三个分量,它们分别等于三个坐标系的加速度分量。

用X,Y,Z轴的加速度分量减去相应轴上的重力加速度分量。加速度坐标系与手机屏幕坐标系之间的关系如图1所示。与手机屏幕坐标系不同,传感器以左下角为原点,X轴沿屏幕向右,Y轴沿屏幕向下,Z轴始终垂直到手机屏幕从下到上。传感器数据的变化关系如下:手机屏幕向上水平放置:(x,y,z)=(0,0,-10);抬起手机顶部:Y的值减小,为负值;提升手机右侧:X值减小,为负值;手机屏幕向上水平放置:z = -10。定向传感器的主要作用是获取移动电话的方向变化并获取三个参数。它们是偏航轴、俯仰轴和滚动轴的旋转角度。方位坐标系与手机屏幕坐标系之间的关系如图1所示。偏航轴方向为重力方向的负方向,保持不变。俯仰轴的方向通过手机沿偏航轴旋转而变化,并与偏航轴保持90度角。 Roll轴的方向沿着手机屏幕向下移动并保持不变。根据应用程序编程接口,Android平台提供的可收集数据定义如下:

表1:传感器数据表

传感器类型

数据

描述

加速度传感器

X

X轴的加速度值

Y

Y轴的加速度值

Z

Z轴的加速度值

方向传感器

yaw

偏航轴的旋转角度

pitch

俯仰轴的旋转角度

roll

滚动轴的旋转角度

利用Android平台提供的硬件访问接口实现上述传感器数据的获取,可实现数据采集功能。

2)基于多传感器的步数特征提取。单个加速度传感器的步数特征提取是分析加速度的绝对值以确定波峰(波谷)。 加速度的定义绝对值如下:

(1)

与上述方法不同,组合方位传感器的方法是使用方位传感器使加速度映射到重力方向。 这里,分别将重力加速度方向上的X,Y,Z加速度的分量作为变量ay,ax,az

(2)

使用以上两种方式计算的加速度波形对比图2所示。

图2加速度波形图

在图2中,Gv是多传感器波形图,Ga是单传感器。该图显示两种方法的波动趋势近似但不完全相等。表示重力方向加速度的Gv更符合人行走的上升和下降原理,并且比Ga更精确。在图2中,Ga和Gv分别等于Ga和Gv的值减去初始加速度值和与Ga和Gv的波形相比,加速度值之间的差异更明显,这体现了Gv反映重力加速度值的优点。

3)基于多传感器的步数模型构建原理,是通过确定有效峰值来计算步数。有效峰值应该考虑的主要因素是敏感传感器可以产生微小运动引起的数值变化。这种特殊数据是无效波值。该应用采用动态阈值法对无效波值进行滤波。通过实验数据的观察,有效峰值与平均加速度之间的差值通常大于1。鉴于20Hz采样频率,成像应用可在5秒内进入正常状态,本应用设计了一个长度100个存储队列来存储加速度值。计算实时动态阈值Th的公式如下:

(3)

当波峰值Gvgt; Th时,波峰有效并且记为增加1步。

4.Android平台多传感器计步器应用实施

A. Android平台计步器实现架构Android平台系统结构分为四层。这些层描述如下:

用户空间

计步器应用

应用层

android软件堆栈

java框架层传感器管理程序.java传感器服务.java

应用程序框架层

JNI

程序包层

硬件抽象层传感器.cpp

内核空间

传感器设备驱动程序

linux内核层

硬件

传感器芯片硬件

图3计步器实施架构表

如图3所示,Android软件堆栈的底层分别为Linux内核层、程序包层、应用程序框架层和应用层。 所描述的应用程序最后在应用层中呈现,但其实现取决于传感器硬件与Android平台的底层架构的交互。实现计步器应用的过程可描述如下:

1、Linux内核层中的传感器驱动程序控制传感器硬件芯片获取加速度和方向变化。

2、硬件抽象层利用open()、read()和write()函数与底层进行交互以获取数据。

3、JNI层完成了一个实现从c 语言到java语言转换的任务,并为Java框架层提供了一系列API。

4、应用程序框架层为开发人员提供各种关于各种传感器的类。 lt;

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[20628],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。