research article implementation of a three-dimensional...

12
Research Article Implementation of a Three-Dimensional Pedometer Automatic Accumulating Walking or Jogging Motions in Arbitrary Placement Jia-Shing Sheu, Wei-Cian Jheng, and Chih-Hung Hsiao Department of Computer Science, National Taipei University of Education, Taiwan Correspondence should be addressed to Jia-Shing Sheu; [email protected] Received 3 January 2014; Accepted 28 January 2014; Published 5 March 2014 Academic Editor: Chung-Liang Chang Copyright © 2014 Jia-Shing Sheu et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. is study proposes a method for using a three-axis accelerometer and a single-chip microcontrol unit to implement a three- dimensional (3D) pedometer that can automatically identify walking and running motions. e proposed design can calculate the number of walking and running steps down to small numbers of steps and can be easily worn, thus remedying defects of generic mechanical and 3D pedometers. e user’s motion state is calculated using a walk/run mode switching algorithm. 1. Introduction Because of the convenience of computers and widespread networks, people have become unwilling to go outdoors. us, most people lack sufficient exercise. e pedometer is a useful tool that, when worn, can detect the number of steps taken by a user. e amount of exercise achieved by a user is evaluated based on the number of steps, which is automati- cally counted. us, pedometers enable users to monitor their health. Pedometers that are currently available on the market can be categorized as mechanical and three-dimensional electronic. Mechanical pedometers are equipped with a lever arm attached to a spring coil, which moves vertically with each step to count the steps. However, the lever arm detects movement in only one direction, and the pedometer must be positioned perpendicular to the ground. ree-dimensional (3D) electronic pedometers use an accelerometer to detect acceleration changes in various directions. Continual motion is still used as a criterion to prevent misjudgment in current designs. For example, the number of steps is counted only aſter the user has walked continually for several seconds or has taken several steps. However, this criterion means that a short walk is recognized as an error and will be excluded. e design principle of pedometers involves using vertical vibration induced by walking to activate the balancing mech- anism of the pedometer. Waist motion is the most apparent source of vibration. Shih [1] reported that the numerical curve of the acceleration G value oscillates substantially during walking or running. us, the number of vertical motions of the body can be determined by identifying the local peak and valley points of the curve. Different dynamic thresholds can be adjusted according to the users to detect the number of steps. An accelerometer, which is also known as a G-sensor, is used to detect the accelerated motion of an object. It can detect instrumental vibrations and effects and can be applied to the displacement component of inertial navigation systems and to the global positioning system navigation with gyro- scopes. Accelerometers have been used extensively in recent years. For example, Veltink et al. [2] placed an accelerometer on a user’s chest and thigh to distinguish static and dynamic actions, such as standing, sitting, lying, walking, ascending and descending stairs, and cycling. M¨ antyj¨ arvi et al. [3] placed accelerometers around a user’s waist and identified body motion state by using principal component analysis, independent component analysis, and wavelet transform. e most satisfactory experimental result was 83% to 90%. Luinge Hindawi Publishing Corporation International Journal of Antennas and Propagation Volume 2014, Article ID 372814, 11 pages http://dx.doi.org/10.1155/2014/372814

Upload: others

Post on 24-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

Research ArticleImplementation of a Three-Dimensional PedometerAutomatic Accumulating Walking or Jogging Motions inArbitrary Placement

Jia-Shing Sheu Wei-Cian Jheng and Chih-Hung Hsiao

Department of Computer Science National Taipei University of Education Taiwan

Correspondence should be addressed to Jia-Shing Sheu jiashingteantueedutw

Received 3 January 2014 Accepted 28 January 2014 Published 5 March 2014

Academic Editor Chung-Liang Chang

Copyright copy 2014 Jia-Shing Sheu et al This is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

This study proposes a method for using a three-axis accelerometer and a single-chip microcontrol unit to implement a three-dimensional (3D) pedometer that can automatically identify walking and running motions The proposed design can calculate thenumber of walking and running steps down to small numbers of steps and can be easily worn thus remedying defects of genericmechanical and 3D pedometers The userrsquos motion state is calculated using a walkrun mode switching algorithm

1 Introduction

Because of the convenience of computers and widespreadnetworks people have become unwilling to go outdoorsThus most people lack sufficient exercise The pedometer isa useful tool that when worn can detect the number of stepstaken by a user The amount of exercise achieved by a user isevaluated based on the number of steps which is automati-cally countedThus pedometers enable users tomonitor theirhealth Pedometers that are currently available on the marketcan be categorized as mechanical and three-dimensionalelectronic Mechanical pedometers are equipped with a leverarm attached to a spring coil which moves vertically witheach step to count the steps However the lever arm detectsmovement in only one direction and the pedometer must bepositioned perpendicular to the ground Three-dimensional(3D) electronic pedometers use an accelerometer to detectacceleration changes in various directions Continual motionis still used as a criterion to prevent misjudgment in currentdesigns For example the number of steps is counted onlyafter the user has walked continually for several seconds orhas taken several steps However this criterion means that ashort walk is recognized as an error and will be excluded

Thedesign principle of pedometers involves using verticalvibration induced by walking to activate the balancing mech-anism of the pedometer Waist motion is the most apparentsource of vibration Shih [1] reported that the numerical curveof the acceleration G value oscillates substantially duringwalking or running Thus the number of vertical motions ofthe body can be determined by identifying the local peak andvalley points of the curve Different dynamic thresholds canbe adjusted according to the users to detect the number ofsteps

An accelerometer which is also known as a G-sensoris used to detect the accelerated motion of an object It candetect instrumental vibrations and effects and can be appliedto the displacement component of inertial navigation systemsand to the global positioning system navigation with gyro-scopes Accelerometers have been used extensively in recentyears For example Veltink et al [2] placed an accelerometeron a userrsquos chest and thigh to distinguish static and dynamicactions such as standing sitting lying walking ascendingand descending stairs and cycling Mantyjarvi et al [3]placed accelerometers around a userrsquos waist and identifiedbody motion state by using principal component analysisindependent component analysis andwavelet transformThemost satisfactory experimental result was 83 to 90 Luinge

Hindawi Publishing CorporationInternational Journal of Antennas and PropagationVolume 2014 Article ID 372814 11 pageshttpdxdoiorg1011552014372814

2 International Journal of Antennas and Propagation

80C51CPU

10kΩ10kΩ

G-sensor80C51CPU

MPC82G516MMA8452Q

+5V +33V +33V +33V

+minus

+minus

+minus

+minus

Figure 1 Hardware connection block diagram of experimental apparatuses

and Veltink [4] attached an accelerometer to a userrsquos backand used a Kalman filter to improve accelerometer detectionon an inclined trunk Karantonis et al [5] used a three-axis accelerometer to design a portable wireless device thatcan be worn around the waist A single-chip microcomputerreceives signals from the three-axis accelerometer and thesignals are wirelessly transmitted to the computer terminalThe userrsquos behavior state is then identified according tochanges in the three-axis acceleration value Twelve actionsincluding walking sitting and lying down were measuredin an experiment by Karantonis et al The accuracy rate was83 to 96 Khan et al [6] placed three-axis accelerometersin a userrsquos chest pocket front and back trouser pockets andcoat pocket Resting (sitting or standing) walking ascendingand descending stairs running and cycling motions wereidentified according to the acceleration changes detectedby the accelerometers in different positions The detectionaccuracy rate of the completed identification systemwas 95

This study used a three-axis accelerometer to implementa 3D pedometer that automatically identifies walking andrunningmotionsThus users can conveniently measure theirexercise Users can wear the pedometer around the waist orplace it in a pocket or backpack to detect the number of stepstaken unlike existing mechanical pedometers that must beworn around the waistThe proposed design does not requirethe fixed-second misjudgment prevention mechanism Themotion state of the user can be displayed instantly accordingto the experimental walking and running threshold andthe walkrun mode switching algorithm of the automaticwalking-and-running-motion identification function Thenumber of walking or running steps is thus accumulated

This paper is organized as follows Section 1 outlinesthe study theme describes the study motive and purposepresents a literature review and discusses the applicationof a related technique Section 2 introduces the hardwarestructure used in this study and describes the specificationsand signal analysis method in detail Section 3 presentsthe proposed step counting system at an arbitrary angleSection 4 discusses walking and jogging motions Section 5provides comprehensive experimental data to determine thepedometerrsquos performance and discusses the experimentalresults finally Section 6 summarizes and discusses the find-ings of this study

2 System Architecture and Signal Analysis

This study used the three-axis accelerometer MMA8452Q[7] and the monolithic chip MPC82G516 [8] Figure 1 showsthe hardware connection block diagram of the experimentalapparatuses TheMMA8452Q detects the acceleration valuesof three axes and the interintegrated circuit (IIC) transmitsthe three-axis acceleration information to the MPC82G516The Universal Asynchronous ReceiverTransmitter (UART)transmission mode was used to transfer the three-axis accel-eration values from the monolithic chip MPC82G516 to thecomputer terminal for convenient statistical data analysis atthe experimental stage

The program in the monolithic chip of the 3D pedometerautomatically identifies walking and running motions anddirectly calculates the number of steps The results are thentransferred to the computer program and displayed Figure 2illustrates the system flowchart of the 3D pedometer regard-ing the automatic identification of walking and runningmotions

C language was used to write the IIC reading and UARTprograms for signal reading analysis in the monolithic chipMPC82G516 The receiving program on the computer waswritten using C The testers wore experimental apparatuseson their left lumbar areas to test the accelerometer readingThe experiment was repeated five times and the results areshown in the signal analysis experiment line chart in Figure 3

As shown in Figure 3 the accelerations 119883 and 119884 arerepresented by two plane axes and stationary gravity was 0GThe119885-axis accelerationwas perpendicular to the ground andstationary gravity was 1 G Here 1 G means 98ms2 Walkingaccelerationwas recordedwhen the119885-axiswas perpendicularto the ground The number of steps was calculated accordingto the vertical vibration of the body during each step 119885-axisacceleration records positive and negative G values duringeach step according to the line chart in Figure 3 Howeverthe inertial vibration induced by the stepping motion causedsevere jitters and the noise from the jitter influenced thenumber of steps that filtered through the threshold Thusseveral signal smoothing processing modes including 3-point average Hanning filter [9] Hanning recursive smooth-ing 5-point average [10] and 5-point triple smoothing [10]methods were used to smooth the experimental results ofthe signal analysis reduce signal jitter error production

International Journal of Antennas and Propagation 3

System start

MMA8452Q detects the acceleration values

of three axes

The IIC transmits the information of three-axis acceleration to

MMA8452Q

Calculate or correct angle according to the

situation

Calculate the current motion state and the

number of walking and running steps

The result will be transmitted and shown on the

computer by UART

Figure 2 System flowchart of the 3D pedometer with respect to theautomatic identification of walking and running motions

and determine the variations in the walking and runningdetection results among the different smoothing techniques

21 Three-Point Average Method The target point value andthe values of two adjacent points were averaged when usingthe 3-point average smoothing method by using

119910 (1) =1

3[2119909 (1) + 119909 (2)]

119910 (119905) =1

3[119909 (119905 minus 1) + 119909 + 119909 (119905 + 1)]

119910 (119899) =1

3[119909 (119899 minus 1) + 2119909 (119899)]

(1)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 2 3 4 119899 minus 1

0 50 100 150 200 250 300

X

YZ

(sampling frequency 45Hz)

15

10

05

00

minus05

(G)

Figure 3 Line chart of the signal analysis experiment

22 Hanning Filter The Hanning filter [11] smoothing pro-cess emphasizes the value of the previous point by using

119910 (119905) =1

4[119909 (119905) + 2119909 (119905 minus 1) + 119909 (119905 minus 2)] (2)

where 119910(119905) denotes the signal value after smoothing and 119909(119905)denotes the original signal value at time 119905 The smoothingprocess is implemented after 119905 = 3

23 Hanning Recursive Smoothing Technique The recursivefilter smoothing technique was designed according to theHanning filter smoothing formula as represented by (3)where 119905 = 3 4 5 119899

119910 (1) = 119909 (1)

119910 (2) =1

2[119909 (2) + 119910 (1)]

119910 (119905) =1

4[119909 (119905) + 2119910 (119905 minus 1) + 119910 (119905 minus 2)]

(3)

24 Five-Point Weighted Average Method The 5-pointweighted average method [12] is similar to the 3-pointaverage method The weighted average of the target pointand the two adjacent points was calculated using

119910 (1) =1

5[3119909 (1) + 2119909 (2) + 119909 (3) minus 119909 (4)]

119910 (2) =1

10[4119909 (1) + 3119909 (2) + 2119909 (3) + 119909 (4)]

4 International Journal of Antennas and Propagation

119910 (119905) =1

5[119909 (119905 minus 2) + 119909 (119905 minus 1) + 119909 (119905) + 119909 (119905 + 1) + 119909 (119905 + 2)]

119910 (119899 minus 1) =1

10[119909 (119899 minus 3) + 2119909 (119899 minus 2) + 3119909 (119899 minus 1) + 4119909 (119899)]

119910 (119899) =1

5[minus119909 (119899 minus 3) + 119909 (119899 minus 2) + 2119909 (119899 minus 1) + 3119909 (119899)]

(4)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 3 4 5 119899 minus 2

25 Five-Point Triple Smoothing Least squares polynomialdiscrete data smoothing was repeated three times when usingthe 5-point triple smoothing method [12] by using

119910 (1) =1

70[69119909 (1) + 4119909 (2) minus 6119909 (3) + 4119909 (4) minus 119909 (5)]

119910 (2) =1

35[2119909 (1) + 27119909 (2) + 12119909 (3) minus 8119909 (4) + 2119909 (5)]

119910 (119905) =1

35[minus3119909 (119905 minus 2) + 12119909 (119905 minus 1) + 17119909 (119905)

+12119909 (119905 + 1) minus 3119909 (119905 + 2)]

119910 (119899 minus 1) =1

35[2119909 (119899 minus 4) minus 8119909 (119899 minus 3) + 12119909 (119899 minus 2)

+27119909 (119899 minus 1) + 2119909 (119899)]

119910 (119899) =1

70[minus119909 (119899 minus 4) + 4119909 (119899 minus 3) minus 6119909 (119899 minus 2)

+4119909 (119899 minus 1) + 69119909 (119899)]

(5)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 3 4 5 119899 minus 2

The experimental results of the signal reading analysiswere obtained using the five aforementioned smoothingtechniques The smoothing result indicated that the fivesmoothing techniques can reduce the inertial vibration of thebody as induced by stepping motions and stabilize walkingand running behavior recognition values which are advanta-geous to users The Hanning recursive smoothing techniqueand 5-point weighted average method exhibited the mostapparent smoothing effect among the five techniques

3 Step Counting System at an Arbitrary Angle

The gravity component 05 G equals sin(30∘) according tothe relationship between the gravity component and therotation angle (eg the 119883-axis shown in Figure 4) thusthe inclination angle is equivalent to the gravity componentarcsin as expressed in

sin (119909) =119886119909

119886119866

119909 = arcsin(119886119909

119886119866

)

(6)

0G

05G

1G

30∘

xax

aG

sin(x) = axaG

Figure 4 Relationship between gravity component and rotationangle

Program start

Load the three-axisaccelerometer and getthe gravity ax ay az

Calculate

sin(x) sin(y) sin(z)

Calculate the

inclination angle of

three axes

Complete the

calculation of the angles

Figure 5 Inclination calculation process

where 119909 is the inclination angle 119886119909is the gravity component

detected by the 119883-axis and 119886119866is the value measured by the

sensor when the gravitational acceleration is 1 G The gravitycomponent of the axis can be obtained according to Figure 4and (6) when the inclination is 0∘ to 90∘ Here 1 G means 98(ms2)

The sensor was placed at a fixed angle and the rotationangles of various axes were obtained using (6) to determinethe present placement state of the device Figure 5 showsthe inclination calculation process The actual angle wassubsequently validated The test results shown in Table 1indicate that the errors were less than 5∘

Shih [1] reported that when people walk their waist andtrunk displacements change perpendicular to the ground

International Journal of Antennas and Propagation 5

Table 1 Inclination calculated based on sensed gravity component

Angle Sensed gravity arcsin conversion Converted angle Error(degree) (G) (degree) (degree)0 0 0 0 00010 02173 021914105 1256 25620 03913 040204853 2304 30430 05652 060069675 3442 44240 06739 073949248 4237 23750 07826 089884543 5150 15060 08913 110021386 6304 30470 09565 127483340 7304 30480 09782 136190231 7803 19790 1 157079632 90 0

Horizon

Inclination angle

Gravity

120579

120579

Figure 6 Relationship between 120579∘ inclination of the 119883-axis andgravity direction

with each step This direction is parallel to gravity directionThe 119883-axis is inclined at 120579∘ to the horizontal plane and (7)is deduced as shown in Figure 6 to obtain the accelerationchange in this direction Consider

119886119892= 119886119909sdot sin 120579 (7)

where 119886119892is the gravity-direction acceleration 119886

119909is the

acceleration sensed in the 119883-direction and 120579 is the angleincluded between the 119883-axis and horizontal plane (ieinclination) As shown in Figure 6 119886

119892equals the product of 119886

119909

and sin 120579When the axis is inclined 120579∘ sin 120579 equals the gravitycomponent on the axis The inclination calculation step canbe omitted if sin 120579 is substituted into (7)Thegravity-directionacceleration change is directly calculated based on the gravitycomponent by using

119886119892(119905119899) = 119886119909(119905119899)119886119909(1199051)

119886119866

(8)

where 119886119892(119905119899) is the gravity-direction acceleration at time

119905119899when the 119883-axis is used as an example 119886

119909(119905119899) is the

acceleration in 119883-direction 119886119909(1199051) is the gravity component

sensed at resting time 1199051 and 119886

119866is complete gravitational

acceleration 1G The sensor can detect acceleration changes

in three axes in the triaxial 3D space according to (8) The 119884-and 119885-axes are added to obtain

119886119892(119905119899) =

119886119909(119905119899)119886119909(1199051)

119886119866

119886119910(119905119899)

119886119910(1199051)

119886119866

119886119911(119905119899)119886119911(1199051)

119886119866

(9)

where 119886119892(119905119899) is the gravity-direction acceleration at time 119905

119899

119886119909(119905119899) 119886119910(119905119899) and 119886

119911(119905119899) represent the accelerations sensed

by three axes at time 119905119899 119886119909(1199051) 119886119910(1199051) and 119886

119911(1199051) represent

the gravity components sensed by three axes at resting time 1199051

and 119886119866is complete gravitational acceleration 1G In this study

the gravity component sensed by the three-axis accelerometerat rest was used to calculate the gravity-direction accelerationsensed by the three axes The acceleration perpendicularto the ground (ie complete gravity-direction accelerationchange) was thus obtained

The gravity direction accelerations 119886119892for walking and

running motions were analyzed The walking accelerationamplitude was 05 G to 1G and the running amplitude wasapproximately 1 GThe line chart of acceleration values showsthe positive peak and negative valley points for each stepThese points were considered in addition to threshold toidentify the number of steps In addition the amplitude waslow during walking and the inertial vibration caused bythe stepping motion caused substantial noise whereas thesituation was more stable during running

To design a convenient step counting system a three-axis accelerometer and a gravity component were used toobtain the acceleration value perpendicular to the groundThe actual number of steps was thus detected The variationcurve of acceleration values exhibited a peak and valley foreach step which are the positive peak point and negativevalley point respectively Thus based on this characteristicthe threshold was used to filter the other low-amplitudenoises to count the number of steps correctly The step-detection algorithm is described as follows

6 International Journal of Antennas and Propagation

(1) The number of steps is zero when step countingbegins The gravity component is calculated and thepresent angle is obtained

(2) The three-axis acceleration value is read and thegravity-direction acceleration in 119886

119892is calculated

(3) If the absolute value of acceleration 119886119892is lower than

that of the threshold the algorithm reverts to Step 2If the value is higher than that of the threshold thenext step is executed

(4) The three-axis acceleration value is continually readand the 119886

119892is calculated If the 119886

119892counter to Step

3 is generated within 05 seconds and the absolutevalue is higher than the threshold the next step canbe executed Otherwise the pedometer is regarded asbeing in a stationary state and the system reverts toStep 2

(5) A positive and a negative acceleration 119886119892must be

obtained The absolute values must be higher thanthat of the threshold which is the number of stepsplus one Otherwise the system reverts to Step 2 tocontinue the detection

The acceleration 119886119892in one direction was higher than

the threshold acceleration in Step 4 The acceleration changecycles of each step were calculated within 05 seconds accord-ing to the walking and running 119886

119892changes Thus the system

is regarded as being in a stationary state and reverts to Step2 if the counter-acceleration 119886

119892is within 05 seconds of the

thresholdThis pedometer designwas convenient for users however

the placement can generate external force thus changing theoriginally detected angle Thus a relocation function wasrequired to achieve automatic system detection The calcu-lated angle can thus be corrected to the changed state Figure7 shows the step-detection algorithm with the relocationfunction

The aforementioned step-detection algorithm gravitycomponent and gravity-direction acceleration concepts wereused to implement the arbitrary placement of the systemThethreshold was used to filter the gravity-direction acceleration119886119892to obtain the number of steps taken by the user Different

results were obtained when the values were processed usingvarious smoothing techniques Thus appropriate walkingthresholds were determined for the different smoothingtechniques The qualities of various thresholds were com-pared based on the accuracy rates Table 2 lists the selectedthresholds

4 3D Pedometer That Automatically IdentifiesWalking and Running Motions

The running threshold must be higher than the walkingacceleration change and lower than the running accelerationchange to determine the motion state and the number ofwalking and running steps respectively Thus the motionstate number of walking steps and number of running stepsmust be separated Various thresholds were used to detect 100walking and running steps Different smoothing techniques

have various walking thresholds and the running thresholdis used to identify the walking or running motions of theuser The threshold was set at 02G to 054G and the incre-ments were set at 002G based on experimental adjustmentDifferent running thresholds exhibited varied walking andrunning accuracy rates Thus the two experimental resultswere averaged to obtain the average accuracy rate Table 3 liststhe optimal walking and running thresholds for the differentsmoothing techniquesThe 5-point weighted averagemethodmaintained a favorable detection accuracy rate in the runningthreshold experiment and the Hanning recursive smoothingtechnique achieved a favorable walking accuracy rate forvarious samples In this study both walking accuracy andrunning accuracy were calculated using

walking accuracy rate

= 100

minus

1003816100381610038161003816detected walking steps minus actual walking steps1003816100381610038161003816actual walking steps

times 100(10)

running accuracy rate

= 100

minus

1003816100381610038161003816detected running steps minus actual running steps1003816100381610038161003816actual running steps

times 100(11)

The walkrun mode switching system was designed toachieve a high detection accuracy rate because users typicallywalk or run continually The accuracy rate of the Hanningrecursive smoothing technique during walking and runningidentification was thus improvedThis system detects restingwalking and running modes and the modes switch underdifferent conditions The detection of two consecutive stepsis considered as the switching mode standard The walkingor running mode can be maintained provided that the accel-eration exceeds the walking threshold even if the switchingmode standard is not attained Figure 8 presents the systemblock diagram

Themode switching algorithm of the walking experimentreduces the detection misjudgment rate Misjudgment islikely to occur during the first two steps of the runningexperiment and this problem is yet to be addressed Themisjudgment rate of the mode switching algorithm whichis lower than that of the simple threshold filtering methodcan be observed in other data in addition to the running startproblem Thus the mode switching algorithm was used tocalculate the number of walking and running steps in thisstudyThemisjudgment rates of the 3-point average Hanningfilter 5-point weighted average and 5-point triple smoothingmethods were reduced to less than 2 after filtration usingthe mode switching algorithm The misjudgment rates ofthe Hanning recursive smoothing technique and the raw

International Journal of Antennas and Propagation 7

System start

Load the acceleration valueCalculate gravity componentPlacement state positioning

Calculate the acceleration agin gravity direction

ag gt threshold

Whether reverseacceleration ag is

generated within halfsecond

Whether reverseacceleration ag is

greater than thresholdwithin half second

Whether accelerationag returns to 0G within

half second

Make sure walk a step

Number of steps + 1

Placement angle haschanged

Relocation is required

Stationary state

Yes

Yes

Yes

Yes

No

No

No

Figure 7 Step-detection algorithm with relocation function

Table 2 Thresholds selected for different smoothing techniques

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Threshold 018 014 014 004 008 018

8 International Journal of Antennas and Propagation

Table 3 Walking and running thresholds for different smoothing techniques and their accuracy rates

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Walk 018 014 014 004 008 018Run 046 046 046 022 04 046Accuracy 97 99 99 815 995 995

System start

Stationary mode

Stationary mode

Walk mode

Walk mode

Run mode

Run mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) The walk mode is entered if there are two consecutive stepsexceeding the run threshold

(3) None of above Maintain stationary mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the walk threshold then maintaining walk mode

(3) One of the consecutive steps not exceeding the walk thresholdthen back to stationary mode

(1) The walk mode is entered if there are two consecutive stepsexceeding the walk threshold but not exceeding run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the run threshold then maintaining run mode

(3) One of the consecutive steps not exceeding the run thresholdthen back to stationary mode

Figure 8 System block diagram of the walking and running mode switching system

data not processed using a smoothing technique remained ashigh as 12 and 24 respectively The misjudgment rates ofboth methods compared with the remaining samples wererelatively high Thus the two signal processing modes wereexcluded in this study

An experiment regarding the accuracy rates of walkingand running alternation was conducted Ten walking stepsand 10 running steps were taken alternately until the numberof steps of each motion reached 100 for a total of 200steps The 3-point average Hanning filter 5-point weightedaverage and 5-point triple smoothing methods and themode switching algorithm were used to count the stepsduring signal processing The running accuracy rates of thefour smoothing modes were higher than 92 on averageRegarding walking which is likely to be misjudged the 5-point weighted average method exhibited the highest averageaccuracy rate of 89 Thus the 5-point weighted averagemethod was used for signal smoothing

5 Experimental Results and Analysis

Four experiments were conducted to assess a pedometerpositioned at arbitrary angles The pedometer was worn inthree different places for the first three experiments namelyaround the waist in a trouser pocket and horizontally in a

backpack The user walked 100 continual steps along a corri-dor The pedometer was attached to the waist for the fourthexperiment The user walked and stopped walking at will for100 steps to validate the proposed pedometerThe pedometerwas able to accurately detect the number of steps even thoughthe user walked and stopped walking occasionally unlikethe 7-second misjudgment prevention system of current 3Dpedometers The experimental environment is described asfollows

(1) Experimental site a corridor approximately 5m longand approximately 1m wide

(2) Pedometers the three pedometers used were (a) a3D pedometer that automatically identifies walkingand runningmotions whichwas designed and imple-mented in this study (b) a conventional mechanicalMPG-002 pedometer developed by Nintendo and (c)a 3D PS-10A pedometer available on the market andproduced by Pursun

(3) Experimental subjects three females and two malesfor a total of five subjects

Table 4 lists the experimental results The average accu-racy rates of the three pedometers fixed to the waist werehigher than 90The accuracy rate of the proposed pedome-ter decreased to 85 when the pedometer was placed in

International Journal of Antennas and Propagation 9

Table 4 Results of experiments on the pedometer positioned at arbitrary angles

Item Location and actionmode

Mechanical pedometerMPG-002 3D pedometer PS-10A 3D pedometer for automatic

identification

Male 1

Waist 103 98 Walk 103 Run 0Pocket 99 109 Walk 132 Run 0Bag 2 97 Walk 111 Run 0

Walk stop 97 26 Walk 114 Run 0

Male 2

Waist 98 101 Walk 103 Run 0Pocket 95 98 Walk 123 Run 4Bag 0 101 Walk 92 Run 0

Walk stop 95 12 Walk 117 Run 0

Female 1

Waist 84 95 Walk 104 Run 0Pocket 72 94 Walk 100 Run 0Bag 0 97 Walk 92 Run 0

Walk stop 85 0 Walk 89 Run 0

Female 2

Waist 92 84 Walk 102 Run 0Pocket 91 94 Walk 96 Run 0Bag 0 99 Walk 101 Run 0

Walk stop 96 30 Walk 112 Run 0

Female 3

Waist 97 86 Walk 108 Run 0Pocket 88 97 Walk 109 Run 0Bag 0 89 Walk 103 Run 0

Walk stop 83 9 Walk 102 Run 0

Average accuracyrate

Waist 936 924 96Pocket 89 948 856Bag 04 962 938

Walk stop 912 154 888

the pocket because the pockets of Male 1 and Male 2were large increasing inertial vibration and the number ofdetected steps Only one direction was detected when thepedometer was placed horizontally in the bag because themechanical pedometer used a mechanical spring mechanismin detection thus the number of steps could not be detectednormally The average accuracy rates of the 3D pedometerand the 3D pedometer that automatically identifies walkingand running motions were higher than 90 Finally thewalking and stopping experiment for a small number of stepswas conducted The misjudgment prevention mechanismfails in most generic 3D pedometers when users take only asmall number of steps when walking and stopping becausea short time threshold is used as a misjudgment preventionmechanism This experiment proved that the 3D pedometerthat automatically identifies walking and running motionswhich was developed in this study can resolve the defectThe experimental results suggested that the average accuracyrate of the 3D PS-10A pedometer was only 15 in the walkand stop experiment whereas the accuracy rate of the 3Dpedometer that automatically identifies walking and runningmotions was 888

Finally the step counting system for walking and run-ning recognition was tested The five subjects wore the 3Dpedometer that automatically identifies walking and running

motions The walkrun mode switching algorithm was usedto prove that this pedometer can recognize the number ofwalking and running steps taken by a user The experimentalmethod is described in detail as follows The walk and runalternating mode was defined as walking 10 steps beforerunning 10 steps This process was alternated until 100 stepsof each motion were taken for a total of 200 steps

(1) Experiment 1 the user wears the pedometer aroundthewaist and alternatelywalks and runs along the cor-ridor One hundred steps are taken for each motion

(2) Experiment 2 the user places the pedometer in apocket and alternately walks and runs along the cor-ridor One hundred steps are taken for each motion

(3) Experiment 3 the user places the pedometer horizon-tally in the backpack and alternately walks and runsalong the corridor One hundred steps are taken foreach motion

Table 5 lists the experimental results The average detec-tion accuracy rate for the simple running experiment wasthe highest of the three walking-mode detection accuracyrates at 95 to 988 The detection accuracy rate of thesimple walking experiment was 884 to 926 and that ofthe alternate walk and run experiment was the poorest at

10 International Journal of Antennas and Propagation

Table 5 Results of the experiments on the step counting system in walking and running recognition

Item Mode Walk 100 steps Run 100 steps Walk 100 steps and run 100 stepsWaist Walk 107 Run 0 Walk 2 Run 99 Walk 119 Run 100

Male 1 Pocket Walk 80 Run 0 Walk 2 Run 98 Walk 120 run 90Bag Walk 86 Run 0 Walk 4 Run 98 Walk 78 Run 94Waist Walk 102 Run 3 Walk 2 Run 98 Walk 114 Run 100

Male 2 Pocket Walk 85 Run 0 Walk 2 Run 98 Walk 100 Run 97Bag Walk 90 Run 0 Walk 2 Run 99 Walk 72 Run 95Waist Walk 87 Run 0 Walk 2 Run 98 Walk 90 Run 83

Female 1 Pocket Walk 89 Run 0 Walk 9 Run 91 Walk 86 Run 92Bag Walk 99 Run 0 Walk 2 Run 99 Walk 85 Run 95Waist Walk 88 Run 0 Walk 2 Run 99 Walk 88 Run 100

Female 2 Pocket Walk 105 Run 0 Walk 9 Run 90 Walk 86 Run 93Bag Walk 96 Run 0 Walk 2 Run 99 Walk 66 Run 98Waist Walk 103 Run 0 Walk 2 Run 98 Walk 107 Run 97

Female 3 Pocket Walk 93 Run 0 Walk 2 Run 98 Walk 92 Run 91Bag Walk 75 Run 0 Walk 2 Run 99 Walk 57 Run 95Waist 926 06 None 876

Walk accuracy ratemiss rate Pocket 884 0 None 888Bag 892 0 None 716Waist None 984 2 96

Run accuracy ratemiss rate Pocket None 95 48 926Bag None 988 24 954

Table 6 Functions of different pedometers (119874 with119883 without)

Pedometer

Item Mechanicalpedometer MPG-002 3D pedometer PS-10A 3D pedometer for automatic identification

of walking and running motions

Fixed to waist 119874 119874 O(936) (924) (96)

In pocket 119874 119874 O(89) (948) (856)

In bag horizontally (arbitraryplacement)

119883 119874 O(04) (962) (938)

Detection of small step ofwalk and stop

119874 119883 O(912) (154) (888)

Identification of walk and run 119883 119883O

(716sim988)Real-time display of currentmotion state 119883 119883

O(rest walk run)

716 to 96Thepedometerworn around thewaist achievedthe highest average detection accuracy rate followed by thatin the pocket The pedometer placed horizontally in thebackpack exhibited the worst accuracy rate among the threepedometer-wearing modes

The average walking mode misjudgment rates of the 3Dpedometer that automatically identifies walking and runningmotions in different wearing modes were observed to belower than 5 according to the experimental aforementionedresults The misjudgment rate was calculated using (12) Theaverage accuracy rates were higher than 70 except for the

instances in which the pedometer was placed horizontallyin the backpack and during the alternate walk and runexperiment The average accuracy rates were higher than87 in these cases proving that this pedometer accuratelyidentified walking and running motions Consider

misjudgment rate =misjudged stepsactual steps

times 100 (12)

Table 6 lists the functions of the mechanical MPG-002pedometer 3D PS-10A pedometer and 3D pedometer thatautomatically identifies walking and running motions The

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 2: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

2 International Journal of Antennas and Propagation

80C51CPU

10kΩ10kΩ

G-sensor80C51CPU

MPC82G516MMA8452Q

+5V +33V +33V +33V

+minus

+minus

+minus

+minus

Figure 1 Hardware connection block diagram of experimental apparatuses

and Veltink [4] attached an accelerometer to a userrsquos backand used a Kalman filter to improve accelerometer detectionon an inclined trunk Karantonis et al [5] used a three-axis accelerometer to design a portable wireless device thatcan be worn around the waist A single-chip microcomputerreceives signals from the three-axis accelerometer and thesignals are wirelessly transmitted to the computer terminalThe userrsquos behavior state is then identified according tochanges in the three-axis acceleration value Twelve actionsincluding walking sitting and lying down were measuredin an experiment by Karantonis et al The accuracy rate was83 to 96 Khan et al [6] placed three-axis accelerometersin a userrsquos chest pocket front and back trouser pockets andcoat pocket Resting (sitting or standing) walking ascendingand descending stairs running and cycling motions wereidentified according to the acceleration changes detectedby the accelerometers in different positions The detectionaccuracy rate of the completed identification systemwas 95

This study used a three-axis accelerometer to implementa 3D pedometer that automatically identifies walking andrunningmotionsThus users can conveniently measure theirexercise Users can wear the pedometer around the waist orplace it in a pocket or backpack to detect the number of stepstaken unlike existing mechanical pedometers that must beworn around the waistThe proposed design does not requirethe fixed-second misjudgment prevention mechanism Themotion state of the user can be displayed instantly accordingto the experimental walking and running threshold andthe walkrun mode switching algorithm of the automaticwalking-and-running-motion identification function Thenumber of walking or running steps is thus accumulated

This paper is organized as follows Section 1 outlinesthe study theme describes the study motive and purposepresents a literature review and discusses the applicationof a related technique Section 2 introduces the hardwarestructure used in this study and describes the specificationsand signal analysis method in detail Section 3 presentsthe proposed step counting system at an arbitrary angleSection 4 discusses walking and jogging motions Section 5provides comprehensive experimental data to determine thepedometerrsquos performance and discusses the experimentalresults finally Section 6 summarizes and discusses the find-ings of this study

2 System Architecture and Signal Analysis

This study used the three-axis accelerometer MMA8452Q[7] and the monolithic chip MPC82G516 [8] Figure 1 showsthe hardware connection block diagram of the experimentalapparatuses TheMMA8452Q detects the acceleration valuesof three axes and the interintegrated circuit (IIC) transmitsthe three-axis acceleration information to the MPC82G516The Universal Asynchronous ReceiverTransmitter (UART)transmission mode was used to transfer the three-axis accel-eration values from the monolithic chip MPC82G516 to thecomputer terminal for convenient statistical data analysis atthe experimental stage

The program in the monolithic chip of the 3D pedometerautomatically identifies walking and running motions anddirectly calculates the number of steps The results are thentransferred to the computer program and displayed Figure 2illustrates the system flowchart of the 3D pedometer regard-ing the automatic identification of walking and runningmotions

C language was used to write the IIC reading and UARTprograms for signal reading analysis in the monolithic chipMPC82G516 The receiving program on the computer waswritten using C The testers wore experimental apparatuseson their left lumbar areas to test the accelerometer readingThe experiment was repeated five times and the results areshown in the signal analysis experiment line chart in Figure 3

As shown in Figure 3 the accelerations 119883 and 119884 arerepresented by two plane axes and stationary gravity was 0GThe119885-axis accelerationwas perpendicular to the ground andstationary gravity was 1 G Here 1 G means 98ms2 Walkingaccelerationwas recordedwhen the119885-axiswas perpendicularto the ground The number of steps was calculated accordingto the vertical vibration of the body during each step 119885-axisacceleration records positive and negative G values duringeach step according to the line chart in Figure 3 Howeverthe inertial vibration induced by the stepping motion causedsevere jitters and the noise from the jitter influenced thenumber of steps that filtered through the threshold Thusseveral signal smoothing processing modes including 3-point average Hanning filter [9] Hanning recursive smooth-ing 5-point average [10] and 5-point triple smoothing [10]methods were used to smooth the experimental results ofthe signal analysis reduce signal jitter error production

International Journal of Antennas and Propagation 3

System start

MMA8452Q detects the acceleration values

of three axes

The IIC transmits the information of three-axis acceleration to

MMA8452Q

Calculate or correct angle according to the

situation

Calculate the current motion state and the

number of walking and running steps

The result will be transmitted and shown on the

computer by UART

Figure 2 System flowchart of the 3D pedometer with respect to theautomatic identification of walking and running motions

and determine the variations in the walking and runningdetection results among the different smoothing techniques

21 Three-Point Average Method The target point value andthe values of two adjacent points were averaged when usingthe 3-point average smoothing method by using

119910 (1) =1

3[2119909 (1) + 119909 (2)]

119910 (119905) =1

3[119909 (119905 minus 1) + 119909 + 119909 (119905 + 1)]

119910 (119899) =1

3[119909 (119899 minus 1) + 2119909 (119899)]

(1)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 2 3 4 119899 minus 1

0 50 100 150 200 250 300

X

YZ

(sampling frequency 45Hz)

15

10

05

00

minus05

(G)

Figure 3 Line chart of the signal analysis experiment

22 Hanning Filter The Hanning filter [11] smoothing pro-cess emphasizes the value of the previous point by using

119910 (119905) =1

4[119909 (119905) + 2119909 (119905 minus 1) + 119909 (119905 minus 2)] (2)

where 119910(119905) denotes the signal value after smoothing and 119909(119905)denotes the original signal value at time 119905 The smoothingprocess is implemented after 119905 = 3

23 Hanning Recursive Smoothing Technique The recursivefilter smoothing technique was designed according to theHanning filter smoothing formula as represented by (3)where 119905 = 3 4 5 119899

119910 (1) = 119909 (1)

119910 (2) =1

2[119909 (2) + 119910 (1)]

119910 (119905) =1

4[119909 (119905) + 2119910 (119905 minus 1) + 119910 (119905 minus 2)]

(3)

24 Five-Point Weighted Average Method The 5-pointweighted average method [12] is similar to the 3-pointaverage method The weighted average of the target pointand the two adjacent points was calculated using

119910 (1) =1

5[3119909 (1) + 2119909 (2) + 119909 (3) minus 119909 (4)]

119910 (2) =1

10[4119909 (1) + 3119909 (2) + 2119909 (3) + 119909 (4)]

4 International Journal of Antennas and Propagation

119910 (119905) =1

5[119909 (119905 minus 2) + 119909 (119905 minus 1) + 119909 (119905) + 119909 (119905 + 1) + 119909 (119905 + 2)]

119910 (119899 minus 1) =1

10[119909 (119899 minus 3) + 2119909 (119899 minus 2) + 3119909 (119899 minus 1) + 4119909 (119899)]

119910 (119899) =1

5[minus119909 (119899 minus 3) + 119909 (119899 minus 2) + 2119909 (119899 minus 1) + 3119909 (119899)]

(4)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 3 4 5 119899 minus 2

25 Five-Point Triple Smoothing Least squares polynomialdiscrete data smoothing was repeated three times when usingthe 5-point triple smoothing method [12] by using

119910 (1) =1

70[69119909 (1) + 4119909 (2) minus 6119909 (3) + 4119909 (4) minus 119909 (5)]

119910 (2) =1

35[2119909 (1) + 27119909 (2) + 12119909 (3) minus 8119909 (4) + 2119909 (5)]

119910 (119905) =1

35[minus3119909 (119905 minus 2) + 12119909 (119905 minus 1) + 17119909 (119905)

+12119909 (119905 + 1) minus 3119909 (119905 + 2)]

119910 (119899 minus 1) =1

35[2119909 (119899 minus 4) minus 8119909 (119899 minus 3) + 12119909 (119899 minus 2)

+27119909 (119899 minus 1) + 2119909 (119899)]

119910 (119899) =1

70[minus119909 (119899 minus 4) + 4119909 (119899 minus 3) minus 6119909 (119899 minus 2)

+4119909 (119899 minus 1) + 69119909 (119899)]

(5)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 3 4 5 119899 minus 2

The experimental results of the signal reading analysiswere obtained using the five aforementioned smoothingtechniques The smoothing result indicated that the fivesmoothing techniques can reduce the inertial vibration of thebody as induced by stepping motions and stabilize walkingand running behavior recognition values which are advanta-geous to users The Hanning recursive smoothing techniqueand 5-point weighted average method exhibited the mostapparent smoothing effect among the five techniques

3 Step Counting System at an Arbitrary Angle

The gravity component 05 G equals sin(30∘) according tothe relationship between the gravity component and therotation angle (eg the 119883-axis shown in Figure 4) thusthe inclination angle is equivalent to the gravity componentarcsin as expressed in

sin (119909) =119886119909

119886119866

119909 = arcsin(119886119909

119886119866

)

(6)

0G

05G

1G

30∘

xax

aG

sin(x) = axaG

Figure 4 Relationship between gravity component and rotationangle

Program start

Load the three-axisaccelerometer and getthe gravity ax ay az

Calculate

sin(x) sin(y) sin(z)

Calculate the

inclination angle of

three axes

Complete the

calculation of the angles

Figure 5 Inclination calculation process

where 119909 is the inclination angle 119886119909is the gravity component

detected by the 119883-axis and 119886119866is the value measured by the

sensor when the gravitational acceleration is 1 G The gravitycomponent of the axis can be obtained according to Figure 4and (6) when the inclination is 0∘ to 90∘ Here 1 G means 98(ms2)

The sensor was placed at a fixed angle and the rotationangles of various axes were obtained using (6) to determinethe present placement state of the device Figure 5 showsthe inclination calculation process The actual angle wassubsequently validated The test results shown in Table 1indicate that the errors were less than 5∘

Shih [1] reported that when people walk their waist andtrunk displacements change perpendicular to the ground

International Journal of Antennas and Propagation 5

Table 1 Inclination calculated based on sensed gravity component

Angle Sensed gravity arcsin conversion Converted angle Error(degree) (G) (degree) (degree)0 0 0 0 00010 02173 021914105 1256 25620 03913 040204853 2304 30430 05652 060069675 3442 44240 06739 073949248 4237 23750 07826 089884543 5150 15060 08913 110021386 6304 30470 09565 127483340 7304 30480 09782 136190231 7803 19790 1 157079632 90 0

Horizon

Inclination angle

Gravity

120579

120579

Figure 6 Relationship between 120579∘ inclination of the 119883-axis andgravity direction

with each step This direction is parallel to gravity directionThe 119883-axis is inclined at 120579∘ to the horizontal plane and (7)is deduced as shown in Figure 6 to obtain the accelerationchange in this direction Consider

119886119892= 119886119909sdot sin 120579 (7)

where 119886119892is the gravity-direction acceleration 119886

119909is the

acceleration sensed in the 119883-direction and 120579 is the angleincluded between the 119883-axis and horizontal plane (ieinclination) As shown in Figure 6 119886

119892equals the product of 119886

119909

and sin 120579When the axis is inclined 120579∘ sin 120579 equals the gravitycomponent on the axis The inclination calculation step canbe omitted if sin 120579 is substituted into (7)Thegravity-directionacceleration change is directly calculated based on the gravitycomponent by using

119886119892(119905119899) = 119886119909(119905119899)119886119909(1199051)

119886119866

(8)

where 119886119892(119905119899) is the gravity-direction acceleration at time

119905119899when the 119883-axis is used as an example 119886

119909(119905119899) is the

acceleration in 119883-direction 119886119909(1199051) is the gravity component

sensed at resting time 1199051 and 119886

119866is complete gravitational

acceleration 1G The sensor can detect acceleration changes

in three axes in the triaxial 3D space according to (8) The 119884-and 119885-axes are added to obtain

119886119892(119905119899) =

119886119909(119905119899)119886119909(1199051)

119886119866

119886119910(119905119899)

119886119910(1199051)

119886119866

119886119911(119905119899)119886119911(1199051)

119886119866

(9)

where 119886119892(119905119899) is the gravity-direction acceleration at time 119905

119899

119886119909(119905119899) 119886119910(119905119899) and 119886

119911(119905119899) represent the accelerations sensed

by three axes at time 119905119899 119886119909(1199051) 119886119910(1199051) and 119886

119911(1199051) represent

the gravity components sensed by three axes at resting time 1199051

and 119886119866is complete gravitational acceleration 1G In this study

the gravity component sensed by the three-axis accelerometerat rest was used to calculate the gravity-direction accelerationsensed by the three axes The acceleration perpendicularto the ground (ie complete gravity-direction accelerationchange) was thus obtained

The gravity direction accelerations 119886119892for walking and

running motions were analyzed The walking accelerationamplitude was 05 G to 1G and the running amplitude wasapproximately 1 GThe line chart of acceleration values showsthe positive peak and negative valley points for each stepThese points were considered in addition to threshold toidentify the number of steps In addition the amplitude waslow during walking and the inertial vibration caused bythe stepping motion caused substantial noise whereas thesituation was more stable during running

To design a convenient step counting system a three-axis accelerometer and a gravity component were used toobtain the acceleration value perpendicular to the groundThe actual number of steps was thus detected The variationcurve of acceleration values exhibited a peak and valley foreach step which are the positive peak point and negativevalley point respectively Thus based on this characteristicthe threshold was used to filter the other low-amplitudenoises to count the number of steps correctly The step-detection algorithm is described as follows

6 International Journal of Antennas and Propagation

(1) The number of steps is zero when step countingbegins The gravity component is calculated and thepresent angle is obtained

(2) The three-axis acceleration value is read and thegravity-direction acceleration in 119886

119892is calculated

(3) If the absolute value of acceleration 119886119892is lower than

that of the threshold the algorithm reverts to Step 2If the value is higher than that of the threshold thenext step is executed

(4) The three-axis acceleration value is continually readand the 119886

119892is calculated If the 119886

119892counter to Step

3 is generated within 05 seconds and the absolutevalue is higher than the threshold the next step canbe executed Otherwise the pedometer is regarded asbeing in a stationary state and the system reverts toStep 2

(5) A positive and a negative acceleration 119886119892must be

obtained The absolute values must be higher thanthat of the threshold which is the number of stepsplus one Otherwise the system reverts to Step 2 tocontinue the detection

The acceleration 119886119892in one direction was higher than

the threshold acceleration in Step 4 The acceleration changecycles of each step were calculated within 05 seconds accord-ing to the walking and running 119886

119892changes Thus the system

is regarded as being in a stationary state and reverts to Step2 if the counter-acceleration 119886

119892is within 05 seconds of the

thresholdThis pedometer designwas convenient for users however

the placement can generate external force thus changing theoriginally detected angle Thus a relocation function wasrequired to achieve automatic system detection The calcu-lated angle can thus be corrected to the changed state Figure7 shows the step-detection algorithm with the relocationfunction

The aforementioned step-detection algorithm gravitycomponent and gravity-direction acceleration concepts wereused to implement the arbitrary placement of the systemThethreshold was used to filter the gravity-direction acceleration119886119892to obtain the number of steps taken by the user Different

results were obtained when the values were processed usingvarious smoothing techniques Thus appropriate walkingthresholds were determined for the different smoothingtechniques The qualities of various thresholds were com-pared based on the accuracy rates Table 2 lists the selectedthresholds

4 3D Pedometer That Automatically IdentifiesWalking and Running Motions

The running threshold must be higher than the walkingacceleration change and lower than the running accelerationchange to determine the motion state and the number ofwalking and running steps respectively Thus the motionstate number of walking steps and number of running stepsmust be separated Various thresholds were used to detect 100walking and running steps Different smoothing techniques

have various walking thresholds and the running thresholdis used to identify the walking or running motions of theuser The threshold was set at 02G to 054G and the incre-ments were set at 002G based on experimental adjustmentDifferent running thresholds exhibited varied walking andrunning accuracy rates Thus the two experimental resultswere averaged to obtain the average accuracy rate Table 3 liststhe optimal walking and running thresholds for the differentsmoothing techniquesThe 5-point weighted averagemethodmaintained a favorable detection accuracy rate in the runningthreshold experiment and the Hanning recursive smoothingtechnique achieved a favorable walking accuracy rate forvarious samples In this study both walking accuracy andrunning accuracy were calculated using

walking accuracy rate

= 100

minus

1003816100381610038161003816detected walking steps minus actual walking steps1003816100381610038161003816actual walking steps

times 100(10)

running accuracy rate

= 100

minus

1003816100381610038161003816detected running steps minus actual running steps1003816100381610038161003816actual running steps

times 100(11)

The walkrun mode switching system was designed toachieve a high detection accuracy rate because users typicallywalk or run continually The accuracy rate of the Hanningrecursive smoothing technique during walking and runningidentification was thus improvedThis system detects restingwalking and running modes and the modes switch underdifferent conditions The detection of two consecutive stepsis considered as the switching mode standard The walkingor running mode can be maintained provided that the accel-eration exceeds the walking threshold even if the switchingmode standard is not attained Figure 8 presents the systemblock diagram

Themode switching algorithm of the walking experimentreduces the detection misjudgment rate Misjudgment islikely to occur during the first two steps of the runningexperiment and this problem is yet to be addressed Themisjudgment rate of the mode switching algorithm whichis lower than that of the simple threshold filtering methodcan be observed in other data in addition to the running startproblem Thus the mode switching algorithm was used tocalculate the number of walking and running steps in thisstudyThemisjudgment rates of the 3-point average Hanningfilter 5-point weighted average and 5-point triple smoothingmethods were reduced to less than 2 after filtration usingthe mode switching algorithm The misjudgment rates ofthe Hanning recursive smoothing technique and the raw

International Journal of Antennas and Propagation 7

System start

Load the acceleration valueCalculate gravity componentPlacement state positioning

Calculate the acceleration agin gravity direction

ag gt threshold

Whether reverseacceleration ag is

generated within halfsecond

Whether reverseacceleration ag is

greater than thresholdwithin half second

Whether accelerationag returns to 0G within

half second

Make sure walk a step

Number of steps + 1

Placement angle haschanged

Relocation is required

Stationary state

Yes

Yes

Yes

Yes

No

No

No

Figure 7 Step-detection algorithm with relocation function

Table 2 Thresholds selected for different smoothing techniques

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Threshold 018 014 014 004 008 018

8 International Journal of Antennas and Propagation

Table 3 Walking and running thresholds for different smoothing techniques and their accuracy rates

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Walk 018 014 014 004 008 018Run 046 046 046 022 04 046Accuracy 97 99 99 815 995 995

System start

Stationary mode

Stationary mode

Walk mode

Walk mode

Run mode

Run mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) The walk mode is entered if there are two consecutive stepsexceeding the run threshold

(3) None of above Maintain stationary mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the walk threshold then maintaining walk mode

(3) One of the consecutive steps not exceeding the walk thresholdthen back to stationary mode

(1) The walk mode is entered if there are two consecutive stepsexceeding the walk threshold but not exceeding run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the run threshold then maintaining run mode

(3) One of the consecutive steps not exceeding the run thresholdthen back to stationary mode

Figure 8 System block diagram of the walking and running mode switching system

data not processed using a smoothing technique remained ashigh as 12 and 24 respectively The misjudgment rates ofboth methods compared with the remaining samples wererelatively high Thus the two signal processing modes wereexcluded in this study

An experiment regarding the accuracy rates of walkingand running alternation was conducted Ten walking stepsand 10 running steps were taken alternately until the numberof steps of each motion reached 100 for a total of 200steps The 3-point average Hanning filter 5-point weightedaverage and 5-point triple smoothing methods and themode switching algorithm were used to count the stepsduring signal processing The running accuracy rates of thefour smoothing modes were higher than 92 on averageRegarding walking which is likely to be misjudged the 5-point weighted average method exhibited the highest averageaccuracy rate of 89 Thus the 5-point weighted averagemethod was used for signal smoothing

5 Experimental Results and Analysis

Four experiments were conducted to assess a pedometerpositioned at arbitrary angles The pedometer was worn inthree different places for the first three experiments namelyaround the waist in a trouser pocket and horizontally in a

backpack The user walked 100 continual steps along a corri-dor The pedometer was attached to the waist for the fourthexperiment The user walked and stopped walking at will for100 steps to validate the proposed pedometerThe pedometerwas able to accurately detect the number of steps even thoughthe user walked and stopped walking occasionally unlikethe 7-second misjudgment prevention system of current 3Dpedometers The experimental environment is described asfollows

(1) Experimental site a corridor approximately 5m longand approximately 1m wide

(2) Pedometers the three pedometers used were (a) a3D pedometer that automatically identifies walkingand runningmotions whichwas designed and imple-mented in this study (b) a conventional mechanicalMPG-002 pedometer developed by Nintendo and (c)a 3D PS-10A pedometer available on the market andproduced by Pursun

(3) Experimental subjects three females and two malesfor a total of five subjects

Table 4 lists the experimental results The average accu-racy rates of the three pedometers fixed to the waist werehigher than 90The accuracy rate of the proposed pedome-ter decreased to 85 when the pedometer was placed in

International Journal of Antennas and Propagation 9

Table 4 Results of experiments on the pedometer positioned at arbitrary angles

Item Location and actionmode

Mechanical pedometerMPG-002 3D pedometer PS-10A 3D pedometer for automatic

identification

Male 1

Waist 103 98 Walk 103 Run 0Pocket 99 109 Walk 132 Run 0Bag 2 97 Walk 111 Run 0

Walk stop 97 26 Walk 114 Run 0

Male 2

Waist 98 101 Walk 103 Run 0Pocket 95 98 Walk 123 Run 4Bag 0 101 Walk 92 Run 0

Walk stop 95 12 Walk 117 Run 0

Female 1

Waist 84 95 Walk 104 Run 0Pocket 72 94 Walk 100 Run 0Bag 0 97 Walk 92 Run 0

Walk stop 85 0 Walk 89 Run 0

Female 2

Waist 92 84 Walk 102 Run 0Pocket 91 94 Walk 96 Run 0Bag 0 99 Walk 101 Run 0

Walk stop 96 30 Walk 112 Run 0

Female 3

Waist 97 86 Walk 108 Run 0Pocket 88 97 Walk 109 Run 0Bag 0 89 Walk 103 Run 0

Walk stop 83 9 Walk 102 Run 0

Average accuracyrate

Waist 936 924 96Pocket 89 948 856Bag 04 962 938

Walk stop 912 154 888

the pocket because the pockets of Male 1 and Male 2were large increasing inertial vibration and the number ofdetected steps Only one direction was detected when thepedometer was placed horizontally in the bag because themechanical pedometer used a mechanical spring mechanismin detection thus the number of steps could not be detectednormally The average accuracy rates of the 3D pedometerand the 3D pedometer that automatically identifies walkingand running motions were higher than 90 Finally thewalking and stopping experiment for a small number of stepswas conducted The misjudgment prevention mechanismfails in most generic 3D pedometers when users take only asmall number of steps when walking and stopping becausea short time threshold is used as a misjudgment preventionmechanism This experiment proved that the 3D pedometerthat automatically identifies walking and running motionswhich was developed in this study can resolve the defectThe experimental results suggested that the average accuracyrate of the 3D PS-10A pedometer was only 15 in the walkand stop experiment whereas the accuracy rate of the 3Dpedometer that automatically identifies walking and runningmotions was 888

Finally the step counting system for walking and run-ning recognition was tested The five subjects wore the 3Dpedometer that automatically identifies walking and running

motions The walkrun mode switching algorithm was usedto prove that this pedometer can recognize the number ofwalking and running steps taken by a user The experimentalmethod is described in detail as follows The walk and runalternating mode was defined as walking 10 steps beforerunning 10 steps This process was alternated until 100 stepsof each motion were taken for a total of 200 steps

(1) Experiment 1 the user wears the pedometer aroundthewaist and alternatelywalks and runs along the cor-ridor One hundred steps are taken for each motion

(2) Experiment 2 the user places the pedometer in apocket and alternately walks and runs along the cor-ridor One hundred steps are taken for each motion

(3) Experiment 3 the user places the pedometer horizon-tally in the backpack and alternately walks and runsalong the corridor One hundred steps are taken foreach motion

Table 5 lists the experimental results The average detec-tion accuracy rate for the simple running experiment wasthe highest of the three walking-mode detection accuracyrates at 95 to 988 The detection accuracy rate of thesimple walking experiment was 884 to 926 and that ofthe alternate walk and run experiment was the poorest at

10 International Journal of Antennas and Propagation

Table 5 Results of the experiments on the step counting system in walking and running recognition

Item Mode Walk 100 steps Run 100 steps Walk 100 steps and run 100 stepsWaist Walk 107 Run 0 Walk 2 Run 99 Walk 119 Run 100

Male 1 Pocket Walk 80 Run 0 Walk 2 Run 98 Walk 120 run 90Bag Walk 86 Run 0 Walk 4 Run 98 Walk 78 Run 94Waist Walk 102 Run 3 Walk 2 Run 98 Walk 114 Run 100

Male 2 Pocket Walk 85 Run 0 Walk 2 Run 98 Walk 100 Run 97Bag Walk 90 Run 0 Walk 2 Run 99 Walk 72 Run 95Waist Walk 87 Run 0 Walk 2 Run 98 Walk 90 Run 83

Female 1 Pocket Walk 89 Run 0 Walk 9 Run 91 Walk 86 Run 92Bag Walk 99 Run 0 Walk 2 Run 99 Walk 85 Run 95Waist Walk 88 Run 0 Walk 2 Run 99 Walk 88 Run 100

Female 2 Pocket Walk 105 Run 0 Walk 9 Run 90 Walk 86 Run 93Bag Walk 96 Run 0 Walk 2 Run 99 Walk 66 Run 98Waist Walk 103 Run 0 Walk 2 Run 98 Walk 107 Run 97

Female 3 Pocket Walk 93 Run 0 Walk 2 Run 98 Walk 92 Run 91Bag Walk 75 Run 0 Walk 2 Run 99 Walk 57 Run 95Waist 926 06 None 876

Walk accuracy ratemiss rate Pocket 884 0 None 888Bag 892 0 None 716Waist None 984 2 96

Run accuracy ratemiss rate Pocket None 95 48 926Bag None 988 24 954

Table 6 Functions of different pedometers (119874 with119883 without)

Pedometer

Item Mechanicalpedometer MPG-002 3D pedometer PS-10A 3D pedometer for automatic identification

of walking and running motions

Fixed to waist 119874 119874 O(936) (924) (96)

In pocket 119874 119874 O(89) (948) (856)

In bag horizontally (arbitraryplacement)

119883 119874 O(04) (962) (938)

Detection of small step ofwalk and stop

119874 119883 O(912) (154) (888)

Identification of walk and run 119883 119883O

(716sim988)Real-time display of currentmotion state 119883 119883

O(rest walk run)

716 to 96Thepedometerworn around thewaist achievedthe highest average detection accuracy rate followed by thatin the pocket The pedometer placed horizontally in thebackpack exhibited the worst accuracy rate among the threepedometer-wearing modes

The average walking mode misjudgment rates of the 3Dpedometer that automatically identifies walking and runningmotions in different wearing modes were observed to belower than 5 according to the experimental aforementionedresults The misjudgment rate was calculated using (12) Theaverage accuracy rates were higher than 70 except for the

instances in which the pedometer was placed horizontallyin the backpack and during the alternate walk and runexperiment The average accuracy rates were higher than87 in these cases proving that this pedometer accuratelyidentified walking and running motions Consider

misjudgment rate =misjudged stepsactual steps

times 100 (12)

Table 6 lists the functions of the mechanical MPG-002pedometer 3D PS-10A pedometer and 3D pedometer thatautomatically identifies walking and running motions The

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 3: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

International Journal of Antennas and Propagation 3

System start

MMA8452Q detects the acceleration values

of three axes

The IIC transmits the information of three-axis acceleration to

MMA8452Q

Calculate or correct angle according to the

situation

Calculate the current motion state and the

number of walking and running steps

The result will be transmitted and shown on the

computer by UART

Figure 2 System flowchart of the 3D pedometer with respect to theautomatic identification of walking and running motions

and determine the variations in the walking and runningdetection results among the different smoothing techniques

21 Three-Point Average Method The target point value andthe values of two adjacent points were averaged when usingthe 3-point average smoothing method by using

119910 (1) =1

3[2119909 (1) + 119909 (2)]

119910 (119905) =1

3[119909 (119905 minus 1) + 119909 + 119909 (119905 + 1)]

119910 (119899) =1

3[119909 (119899 minus 1) + 2119909 (119899)]

(1)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 2 3 4 119899 minus 1

0 50 100 150 200 250 300

X

YZ

(sampling frequency 45Hz)

15

10

05

00

minus05

(G)

Figure 3 Line chart of the signal analysis experiment

22 Hanning Filter The Hanning filter [11] smoothing pro-cess emphasizes the value of the previous point by using

119910 (119905) =1

4[119909 (119905) + 2119909 (119905 minus 1) + 119909 (119905 minus 2)] (2)

where 119910(119905) denotes the signal value after smoothing and 119909(119905)denotes the original signal value at time 119905 The smoothingprocess is implemented after 119905 = 3

23 Hanning Recursive Smoothing Technique The recursivefilter smoothing technique was designed according to theHanning filter smoothing formula as represented by (3)where 119905 = 3 4 5 119899

119910 (1) = 119909 (1)

119910 (2) =1

2[119909 (2) + 119910 (1)]

119910 (119905) =1

4[119909 (119905) + 2119910 (119905 minus 1) + 119910 (119905 minus 2)]

(3)

24 Five-Point Weighted Average Method The 5-pointweighted average method [12] is similar to the 3-pointaverage method The weighted average of the target pointand the two adjacent points was calculated using

119910 (1) =1

5[3119909 (1) + 2119909 (2) + 119909 (3) minus 119909 (4)]

119910 (2) =1

10[4119909 (1) + 3119909 (2) + 2119909 (3) + 119909 (4)]

4 International Journal of Antennas and Propagation

119910 (119905) =1

5[119909 (119905 minus 2) + 119909 (119905 minus 1) + 119909 (119905) + 119909 (119905 + 1) + 119909 (119905 + 2)]

119910 (119899 minus 1) =1

10[119909 (119899 minus 3) + 2119909 (119899 minus 2) + 3119909 (119899 minus 1) + 4119909 (119899)]

119910 (119899) =1

5[minus119909 (119899 minus 3) + 119909 (119899 minus 2) + 2119909 (119899 minus 1) + 3119909 (119899)]

(4)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 3 4 5 119899 minus 2

25 Five-Point Triple Smoothing Least squares polynomialdiscrete data smoothing was repeated three times when usingthe 5-point triple smoothing method [12] by using

119910 (1) =1

70[69119909 (1) + 4119909 (2) minus 6119909 (3) + 4119909 (4) minus 119909 (5)]

119910 (2) =1

35[2119909 (1) + 27119909 (2) + 12119909 (3) minus 8119909 (4) + 2119909 (5)]

119910 (119905) =1

35[minus3119909 (119905 minus 2) + 12119909 (119905 minus 1) + 17119909 (119905)

+12119909 (119905 + 1) minus 3119909 (119905 + 2)]

119910 (119899 minus 1) =1

35[2119909 (119899 minus 4) minus 8119909 (119899 minus 3) + 12119909 (119899 minus 2)

+27119909 (119899 minus 1) + 2119909 (119899)]

119910 (119899) =1

70[minus119909 (119899 minus 4) + 4119909 (119899 minus 3) minus 6119909 (119899 minus 2)

+4119909 (119899 minus 1) + 69119909 (119899)]

(5)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 3 4 5 119899 minus 2

The experimental results of the signal reading analysiswere obtained using the five aforementioned smoothingtechniques The smoothing result indicated that the fivesmoothing techniques can reduce the inertial vibration of thebody as induced by stepping motions and stabilize walkingand running behavior recognition values which are advanta-geous to users The Hanning recursive smoothing techniqueand 5-point weighted average method exhibited the mostapparent smoothing effect among the five techniques

3 Step Counting System at an Arbitrary Angle

The gravity component 05 G equals sin(30∘) according tothe relationship between the gravity component and therotation angle (eg the 119883-axis shown in Figure 4) thusthe inclination angle is equivalent to the gravity componentarcsin as expressed in

sin (119909) =119886119909

119886119866

119909 = arcsin(119886119909

119886119866

)

(6)

0G

05G

1G

30∘

xax

aG

sin(x) = axaG

Figure 4 Relationship between gravity component and rotationangle

Program start

Load the three-axisaccelerometer and getthe gravity ax ay az

Calculate

sin(x) sin(y) sin(z)

Calculate the

inclination angle of

three axes

Complete the

calculation of the angles

Figure 5 Inclination calculation process

where 119909 is the inclination angle 119886119909is the gravity component

detected by the 119883-axis and 119886119866is the value measured by the

sensor when the gravitational acceleration is 1 G The gravitycomponent of the axis can be obtained according to Figure 4and (6) when the inclination is 0∘ to 90∘ Here 1 G means 98(ms2)

The sensor was placed at a fixed angle and the rotationangles of various axes were obtained using (6) to determinethe present placement state of the device Figure 5 showsthe inclination calculation process The actual angle wassubsequently validated The test results shown in Table 1indicate that the errors were less than 5∘

Shih [1] reported that when people walk their waist andtrunk displacements change perpendicular to the ground

International Journal of Antennas and Propagation 5

Table 1 Inclination calculated based on sensed gravity component

Angle Sensed gravity arcsin conversion Converted angle Error(degree) (G) (degree) (degree)0 0 0 0 00010 02173 021914105 1256 25620 03913 040204853 2304 30430 05652 060069675 3442 44240 06739 073949248 4237 23750 07826 089884543 5150 15060 08913 110021386 6304 30470 09565 127483340 7304 30480 09782 136190231 7803 19790 1 157079632 90 0

Horizon

Inclination angle

Gravity

120579

120579

Figure 6 Relationship between 120579∘ inclination of the 119883-axis andgravity direction

with each step This direction is parallel to gravity directionThe 119883-axis is inclined at 120579∘ to the horizontal plane and (7)is deduced as shown in Figure 6 to obtain the accelerationchange in this direction Consider

119886119892= 119886119909sdot sin 120579 (7)

where 119886119892is the gravity-direction acceleration 119886

119909is the

acceleration sensed in the 119883-direction and 120579 is the angleincluded between the 119883-axis and horizontal plane (ieinclination) As shown in Figure 6 119886

119892equals the product of 119886

119909

and sin 120579When the axis is inclined 120579∘ sin 120579 equals the gravitycomponent on the axis The inclination calculation step canbe omitted if sin 120579 is substituted into (7)Thegravity-directionacceleration change is directly calculated based on the gravitycomponent by using

119886119892(119905119899) = 119886119909(119905119899)119886119909(1199051)

119886119866

(8)

where 119886119892(119905119899) is the gravity-direction acceleration at time

119905119899when the 119883-axis is used as an example 119886

119909(119905119899) is the

acceleration in 119883-direction 119886119909(1199051) is the gravity component

sensed at resting time 1199051 and 119886

119866is complete gravitational

acceleration 1G The sensor can detect acceleration changes

in three axes in the triaxial 3D space according to (8) The 119884-and 119885-axes are added to obtain

119886119892(119905119899) =

119886119909(119905119899)119886119909(1199051)

119886119866

119886119910(119905119899)

119886119910(1199051)

119886119866

119886119911(119905119899)119886119911(1199051)

119886119866

(9)

where 119886119892(119905119899) is the gravity-direction acceleration at time 119905

119899

119886119909(119905119899) 119886119910(119905119899) and 119886

119911(119905119899) represent the accelerations sensed

by three axes at time 119905119899 119886119909(1199051) 119886119910(1199051) and 119886

119911(1199051) represent

the gravity components sensed by three axes at resting time 1199051

and 119886119866is complete gravitational acceleration 1G In this study

the gravity component sensed by the three-axis accelerometerat rest was used to calculate the gravity-direction accelerationsensed by the three axes The acceleration perpendicularto the ground (ie complete gravity-direction accelerationchange) was thus obtained

The gravity direction accelerations 119886119892for walking and

running motions were analyzed The walking accelerationamplitude was 05 G to 1G and the running amplitude wasapproximately 1 GThe line chart of acceleration values showsthe positive peak and negative valley points for each stepThese points were considered in addition to threshold toidentify the number of steps In addition the amplitude waslow during walking and the inertial vibration caused bythe stepping motion caused substantial noise whereas thesituation was more stable during running

To design a convenient step counting system a three-axis accelerometer and a gravity component were used toobtain the acceleration value perpendicular to the groundThe actual number of steps was thus detected The variationcurve of acceleration values exhibited a peak and valley foreach step which are the positive peak point and negativevalley point respectively Thus based on this characteristicthe threshold was used to filter the other low-amplitudenoises to count the number of steps correctly The step-detection algorithm is described as follows

6 International Journal of Antennas and Propagation

(1) The number of steps is zero when step countingbegins The gravity component is calculated and thepresent angle is obtained

(2) The three-axis acceleration value is read and thegravity-direction acceleration in 119886

119892is calculated

(3) If the absolute value of acceleration 119886119892is lower than

that of the threshold the algorithm reverts to Step 2If the value is higher than that of the threshold thenext step is executed

(4) The three-axis acceleration value is continually readand the 119886

119892is calculated If the 119886

119892counter to Step

3 is generated within 05 seconds and the absolutevalue is higher than the threshold the next step canbe executed Otherwise the pedometer is regarded asbeing in a stationary state and the system reverts toStep 2

(5) A positive and a negative acceleration 119886119892must be

obtained The absolute values must be higher thanthat of the threshold which is the number of stepsplus one Otherwise the system reverts to Step 2 tocontinue the detection

The acceleration 119886119892in one direction was higher than

the threshold acceleration in Step 4 The acceleration changecycles of each step were calculated within 05 seconds accord-ing to the walking and running 119886

119892changes Thus the system

is regarded as being in a stationary state and reverts to Step2 if the counter-acceleration 119886

119892is within 05 seconds of the

thresholdThis pedometer designwas convenient for users however

the placement can generate external force thus changing theoriginally detected angle Thus a relocation function wasrequired to achieve automatic system detection The calcu-lated angle can thus be corrected to the changed state Figure7 shows the step-detection algorithm with the relocationfunction

The aforementioned step-detection algorithm gravitycomponent and gravity-direction acceleration concepts wereused to implement the arbitrary placement of the systemThethreshold was used to filter the gravity-direction acceleration119886119892to obtain the number of steps taken by the user Different

results were obtained when the values were processed usingvarious smoothing techniques Thus appropriate walkingthresholds were determined for the different smoothingtechniques The qualities of various thresholds were com-pared based on the accuracy rates Table 2 lists the selectedthresholds

4 3D Pedometer That Automatically IdentifiesWalking and Running Motions

The running threshold must be higher than the walkingacceleration change and lower than the running accelerationchange to determine the motion state and the number ofwalking and running steps respectively Thus the motionstate number of walking steps and number of running stepsmust be separated Various thresholds were used to detect 100walking and running steps Different smoothing techniques

have various walking thresholds and the running thresholdis used to identify the walking or running motions of theuser The threshold was set at 02G to 054G and the incre-ments were set at 002G based on experimental adjustmentDifferent running thresholds exhibited varied walking andrunning accuracy rates Thus the two experimental resultswere averaged to obtain the average accuracy rate Table 3 liststhe optimal walking and running thresholds for the differentsmoothing techniquesThe 5-point weighted averagemethodmaintained a favorable detection accuracy rate in the runningthreshold experiment and the Hanning recursive smoothingtechnique achieved a favorable walking accuracy rate forvarious samples In this study both walking accuracy andrunning accuracy were calculated using

walking accuracy rate

= 100

minus

1003816100381610038161003816detected walking steps minus actual walking steps1003816100381610038161003816actual walking steps

times 100(10)

running accuracy rate

= 100

minus

1003816100381610038161003816detected running steps minus actual running steps1003816100381610038161003816actual running steps

times 100(11)

The walkrun mode switching system was designed toachieve a high detection accuracy rate because users typicallywalk or run continually The accuracy rate of the Hanningrecursive smoothing technique during walking and runningidentification was thus improvedThis system detects restingwalking and running modes and the modes switch underdifferent conditions The detection of two consecutive stepsis considered as the switching mode standard The walkingor running mode can be maintained provided that the accel-eration exceeds the walking threshold even if the switchingmode standard is not attained Figure 8 presents the systemblock diagram

Themode switching algorithm of the walking experimentreduces the detection misjudgment rate Misjudgment islikely to occur during the first two steps of the runningexperiment and this problem is yet to be addressed Themisjudgment rate of the mode switching algorithm whichis lower than that of the simple threshold filtering methodcan be observed in other data in addition to the running startproblem Thus the mode switching algorithm was used tocalculate the number of walking and running steps in thisstudyThemisjudgment rates of the 3-point average Hanningfilter 5-point weighted average and 5-point triple smoothingmethods were reduced to less than 2 after filtration usingthe mode switching algorithm The misjudgment rates ofthe Hanning recursive smoothing technique and the raw

International Journal of Antennas and Propagation 7

System start

Load the acceleration valueCalculate gravity componentPlacement state positioning

Calculate the acceleration agin gravity direction

ag gt threshold

Whether reverseacceleration ag is

generated within halfsecond

Whether reverseacceleration ag is

greater than thresholdwithin half second

Whether accelerationag returns to 0G within

half second

Make sure walk a step

Number of steps + 1

Placement angle haschanged

Relocation is required

Stationary state

Yes

Yes

Yes

Yes

No

No

No

Figure 7 Step-detection algorithm with relocation function

Table 2 Thresholds selected for different smoothing techniques

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Threshold 018 014 014 004 008 018

8 International Journal of Antennas and Propagation

Table 3 Walking and running thresholds for different smoothing techniques and their accuracy rates

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Walk 018 014 014 004 008 018Run 046 046 046 022 04 046Accuracy 97 99 99 815 995 995

System start

Stationary mode

Stationary mode

Walk mode

Walk mode

Run mode

Run mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) The walk mode is entered if there are two consecutive stepsexceeding the run threshold

(3) None of above Maintain stationary mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the walk threshold then maintaining walk mode

(3) One of the consecutive steps not exceeding the walk thresholdthen back to stationary mode

(1) The walk mode is entered if there are two consecutive stepsexceeding the walk threshold but not exceeding run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the run threshold then maintaining run mode

(3) One of the consecutive steps not exceeding the run thresholdthen back to stationary mode

Figure 8 System block diagram of the walking and running mode switching system

data not processed using a smoothing technique remained ashigh as 12 and 24 respectively The misjudgment rates ofboth methods compared with the remaining samples wererelatively high Thus the two signal processing modes wereexcluded in this study

An experiment regarding the accuracy rates of walkingand running alternation was conducted Ten walking stepsand 10 running steps were taken alternately until the numberof steps of each motion reached 100 for a total of 200steps The 3-point average Hanning filter 5-point weightedaverage and 5-point triple smoothing methods and themode switching algorithm were used to count the stepsduring signal processing The running accuracy rates of thefour smoothing modes were higher than 92 on averageRegarding walking which is likely to be misjudged the 5-point weighted average method exhibited the highest averageaccuracy rate of 89 Thus the 5-point weighted averagemethod was used for signal smoothing

5 Experimental Results and Analysis

Four experiments were conducted to assess a pedometerpositioned at arbitrary angles The pedometer was worn inthree different places for the first three experiments namelyaround the waist in a trouser pocket and horizontally in a

backpack The user walked 100 continual steps along a corri-dor The pedometer was attached to the waist for the fourthexperiment The user walked and stopped walking at will for100 steps to validate the proposed pedometerThe pedometerwas able to accurately detect the number of steps even thoughthe user walked and stopped walking occasionally unlikethe 7-second misjudgment prevention system of current 3Dpedometers The experimental environment is described asfollows

(1) Experimental site a corridor approximately 5m longand approximately 1m wide

(2) Pedometers the three pedometers used were (a) a3D pedometer that automatically identifies walkingand runningmotions whichwas designed and imple-mented in this study (b) a conventional mechanicalMPG-002 pedometer developed by Nintendo and (c)a 3D PS-10A pedometer available on the market andproduced by Pursun

(3) Experimental subjects three females and two malesfor a total of five subjects

Table 4 lists the experimental results The average accu-racy rates of the three pedometers fixed to the waist werehigher than 90The accuracy rate of the proposed pedome-ter decreased to 85 when the pedometer was placed in

International Journal of Antennas and Propagation 9

Table 4 Results of experiments on the pedometer positioned at arbitrary angles

Item Location and actionmode

Mechanical pedometerMPG-002 3D pedometer PS-10A 3D pedometer for automatic

identification

Male 1

Waist 103 98 Walk 103 Run 0Pocket 99 109 Walk 132 Run 0Bag 2 97 Walk 111 Run 0

Walk stop 97 26 Walk 114 Run 0

Male 2

Waist 98 101 Walk 103 Run 0Pocket 95 98 Walk 123 Run 4Bag 0 101 Walk 92 Run 0

Walk stop 95 12 Walk 117 Run 0

Female 1

Waist 84 95 Walk 104 Run 0Pocket 72 94 Walk 100 Run 0Bag 0 97 Walk 92 Run 0

Walk stop 85 0 Walk 89 Run 0

Female 2

Waist 92 84 Walk 102 Run 0Pocket 91 94 Walk 96 Run 0Bag 0 99 Walk 101 Run 0

Walk stop 96 30 Walk 112 Run 0

Female 3

Waist 97 86 Walk 108 Run 0Pocket 88 97 Walk 109 Run 0Bag 0 89 Walk 103 Run 0

Walk stop 83 9 Walk 102 Run 0

Average accuracyrate

Waist 936 924 96Pocket 89 948 856Bag 04 962 938

Walk stop 912 154 888

the pocket because the pockets of Male 1 and Male 2were large increasing inertial vibration and the number ofdetected steps Only one direction was detected when thepedometer was placed horizontally in the bag because themechanical pedometer used a mechanical spring mechanismin detection thus the number of steps could not be detectednormally The average accuracy rates of the 3D pedometerand the 3D pedometer that automatically identifies walkingand running motions were higher than 90 Finally thewalking and stopping experiment for a small number of stepswas conducted The misjudgment prevention mechanismfails in most generic 3D pedometers when users take only asmall number of steps when walking and stopping becausea short time threshold is used as a misjudgment preventionmechanism This experiment proved that the 3D pedometerthat automatically identifies walking and running motionswhich was developed in this study can resolve the defectThe experimental results suggested that the average accuracyrate of the 3D PS-10A pedometer was only 15 in the walkand stop experiment whereas the accuracy rate of the 3Dpedometer that automatically identifies walking and runningmotions was 888

Finally the step counting system for walking and run-ning recognition was tested The five subjects wore the 3Dpedometer that automatically identifies walking and running

motions The walkrun mode switching algorithm was usedto prove that this pedometer can recognize the number ofwalking and running steps taken by a user The experimentalmethod is described in detail as follows The walk and runalternating mode was defined as walking 10 steps beforerunning 10 steps This process was alternated until 100 stepsof each motion were taken for a total of 200 steps

(1) Experiment 1 the user wears the pedometer aroundthewaist and alternatelywalks and runs along the cor-ridor One hundred steps are taken for each motion

(2) Experiment 2 the user places the pedometer in apocket and alternately walks and runs along the cor-ridor One hundred steps are taken for each motion

(3) Experiment 3 the user places the pedometer horizon-tally in the backpack and alternately walks and runsalong the corridor One hundred steps are taken foreach motion

Table 5 lists the experimental results The average detec-tion accuracy rate for the simple running experiment wasthe highest of the three walking-mode detection accuracyrates at 95 to 988 The detection accuracy rate of thesimple walking experiment was 884 to 926 and that ofthe alternate walk and run experiment was the poorest at

10 International Journal of Antennas and Propagation

Table 5 Results of the experiments on the step counting system in walking and running recognition

Item Mode Walk 100 steps Run 100 steps Walk 100 steps and run 100 stepsWaist Walk 107 Run 0 Walk 2 Run 99 Walk 119 Run 100

Male 1 Pocket Walk 80 Run 0 Walk 2 Run 98 Walk 120 run 90Bag Walk 86 Run 0 Walk 4 Run 98 Walk 78 Run 94Waist Walk 102 Run 3 Walk 2 Run 98 Walk 114 Run 100

Male 2 Pocket Walk 85 Run 0 Walk 2 Run 98 Walk 100 Run 97Bag Walk 90 Run 0 Walk 2 Run 99 Walk 72 Run 95Waist Walk 87 Run 0 Walk 2 Run 98 Walk 90 Run 83

Female 1 Pocket Walk 89 Run 0 Walk 9 Run 91 Walk 86 Run 92Bag Walk 99 Run 0 Walk 2 Run 99 Walk 85 Run 95Waist Walk 88 Run 0 Walk 2 Run 99 Walk 88 Run 100

Female 2 Pocket Walk 105 Run 0 Walk 9 Run 90 Walk 86 Run 93Bag Walk 96 Run 0 Walk 2 Run 99 Walk 66 Run 98Waist Walk 103 Run 0 Walk 2 Run 98 Walk 107 Run 97

Female 3 Pocket Walk 93 Run 0 Walk 2 Run 98 Walk 92 Run 91Bag Walk 75 Run 0 Walk 2 Run 99 Walk 57 Run 95Waist 926 06 None 876

Walk accuracy ratemiss rate Pocket 884 0 None 888Bag 892 0 None 716Waist None 984 2 96

Run accuracy ratemiss rate Pocket None 95 48 926Bag None 988 24 954

Table 6 Functions of different pedometers (119874 with119883 without)

Pedometer

Item Mechanicalpedometer MPG-002 3D pedometer PS-10A 3D pedometer for automatic identification

of walking and running motions

Fixed to waist 119874 119874 O(936) (924) (96)

In pocket 119874 119874 O(89) (948) (856)

In bag horizontally (arbitraryplacement)

119883 119874 O(04) (962) (938)

Detection of small step ofwalk and stop

119874 119883 O(912) (154) (888)

Identification of walk and run 119883 119883O

(716sim988)Real-time display of currentmotion state 119883 119883

O(rest walk run)

716 to 96Thepedometerworn around thewaist achievedthe highest average detection accuracy rate followed by thatin the pocket The pedometer placed horizontally in thebackpack exhibited the worst accuracy rate among the threepedometer-wearing modes

The average walking mode misjudgment rates of the 3Dpedometer that automatically identifies walking and runningmotions in different wearing modes were observed to belower than 5 according to the experimental aforementionedresults The misjudgment rate was calculated using (12) Theaverage accuracy rates were higher than 70 except for the

instances in which the pedometer was placed horizontallyin the backpack and during the alternate walk and runexperiment The average accuracy rates were higher than87 in these cases proving that this pedometer accuratelyidentified walking and running motions Consider

misjudgment rate =misjudged stepsactual steps

times 100 (12)

Table 6 lists the functions of the mechanical MPG-002pedometer 3D PS-10A pedometer and 3D pedometer thatautomatically identifies walking and running motions The

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 4: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

4 International Journal of Antennas and Propagation

119910 (119905) =1

5[119909 (119905 minus 2) + 119909 (119905 minus 1) + 119909 (119905) + 119909 (119905 + 1) + 119909 (119905 + 2)]

119910 (119899 minus 1) =1

10[119909 (119899 minus 3) + 2119909 (119899 minus 2) + 3119909 (119899 minus 1) + 4119909 (119899)]

119910 (119899) =1

5[minus119909 (119899 minus 3) + 119909 (119899 minus 2) + 2119909 (119899 minus 1) + 3119909 (119899)]

(4)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 3 4 5 119899 minus 2

25 Five-Point Triple Smoothing Least squares polynomialdiscrete data smoothing was repeated three times when usingthe 5-point triple smoothing method [12] by using

119910 (1) =1

70[69119909 (1) + 4119909 (2) minus 6119909 (3) + 4119909 (4) minus 119909 (5)]

119910 (2) =1

35[2119909 (1) + 27119909 (2) + 12119909 (3) minus 8119909 (4) + 2119909 (5)]

119910 (119905) =1

35[minus3119909 (119905 minus 2) + 12119909 (119905 minus 1) + 17119909 (119905)

+12119909 (119905 + 1) minus 3119909 (119905 + 2)]

119910 (119899 minus 1) =1

35[2119909 (119899 minus 4) minus 8119909 (119899 minus 3) + 12119909 (119899 minus 2)

+27119909 (119899 minus 1) + 2119909 (119899)]

119910 (119899) =1

70[minus119909 (119899 minus 4) + 4119909 (119899 minus 3) minus 6119909 (119899 minus 2)

+4119909 (119899 minus 1) + 69119909 (119899)]

(5)

where 119910(119905) is the smoothed value 119909(119905) is the original signalvalue at time 119905 and 119905 = 3 4 5 119899 minus 2

The experimental results of the signal reading analysiswere obtained using the five aforementioned smoothingtechniques The smoothing result indicated that the fivesmoothing techniques can reduce the inertial vibration of thebody as induced by stepping motions and stabilize walkingand running behavior recognition values which are advanta-geous to users The Hanning recursive smoothing techniqueand 5-point weighted average method exhibited the mostapparent smoothing effect among the five techniques

3 Step Counting System at an Arbitrary Angle

The gravity component 05 G equals sin(30∘) according tothe relationship between the gravity component and therotation angle (eg the 119883-axis shown in Figure 4) thusthe inclination angle is equivalent to the gravity componentarcsin as expressed in

sin (119909) =119886119909

119886119866

119909 = arcsin(119886119909

119886119866

)

(6)

0G

05G

1G

30∘

xax

aG

sin(x) = axaG

Figure 4 Relationship between gravity component and rotationangle

Program start

Load the three-axisaccelerometer and getthe gravity ax ay az

Calculate

sin(x) sin(y) sin(z)

Calculate the

inclination angle of

three axes

Complete the

calculation of the angles

Figure 5 Inclination calculation process

where 119909 is the inclination angle 119886119909is the gravity component

detected by the 119883-axis and 119886119866is the value measured by the

sensor when the gravitational acceleration is 1 G The gravitycomponent of the axis can be obtained according to Figure 4and (6) when the inclination is 0∘ to 90∘ Here 1 G means 98(ms2)

The sensor was placed at a fixed angle and the rotationangles of various axes were obtained using (6) to determinethe present placement state of the device Figure 5 showsthe inclination calculation process The actual angle wassubsequently validated The test results shown in Table 1indicate that the errors were less than 5∘

Shih [1] reported that when people walk their waist andtrunk displacements change perpendicular to the ground

International Journal of Antennas and Propagation 5

Table 1 Inclination calculated based on sensed gravity component

Angle Sensed gravity arcsin conversion Converted angle Error(degree) (G) (degree) (degree)0 0 0 0 00010 02173 021914105 1256 25620 03913 040204853 2304 30430 05652 060069675 3442 44240 06739 073949248 4237 23750 07826 089884543 5150 15060 08913 110021386 6304 30470 09565 127483340 7304 30480 09782 136190231 7803 19790 1 157079632 90 0

Horizon

Inclination angle

Gravity

120579

120579

Figure 6 Relationship between 120579∘ inclination of the 119883-axis andgravity direction

with each step This direction is parallel to gravity directionThe 119883-axis is inclined at 120579∘ to the horizontal plane and (7)is deduced as shown in Figure 6 to obtain the accelerationchange in this direction Consider

119886119892= 119886119909sdot sin 120579 (7)

where 119886119892is the gravity-direction acceleration 119886

119909is the

acceleration sensed in the 119883-direction and 120579 is the angleincluded between the 119883-axis and horizontal plane (ieinclination) As shown in Figure 6 119886

119892equals the product of 119886

119909

and sin 120579When the axis is inclined 120579∘ sin 120579 equals the gravitycomponent on the axis The inclination calculation step canbe omitted if sin 120579 is substituted into (7)Thegravity-directionacceleration change is directly calculated based on the gravitycomponent by using

119886119892(119905119899) = 119886119909(119905119899)119886119909(1199051)

119886119866

(8)

where 119886119892(119905119899) is the gravity-direction acceleration at time

119905119899when the 119883-axis is used as an example 119886

119909(119905119899) is the

acceleration in 119883-direction 119886119909(1199051) is the gravity component

sensed at resting time 1199051 and 119886

119866is complete gravitational

acceleration 1G The sensor can detect acceleration changes

in three axes in the triaxial 3D space according to (8) The 119884-and 119885-axes are added to obtain

119886119892(119905119899) =

119886119909(119905119899)119886119909(1199051)

119886119866

119886119910(119905119899)

119886119910(1199051)

119886119866

119886119911(119905119899)119886119911(1199051)

119886119866

(9)

where 119886119892(119905119899) is the gravity-direction acceleration at time 119905

119899

119886119909(119905119899) 119886119910(119905119899) and 119886

119911(119905119899) represent the accelerations sensed

by three axes at time 119905119899 119886119909(1199051) 119886119910(1199051) and 119886

119911(1199051) represent

the gravity components sensed by three axes at resting time 1199051

and 119886119866is complete gravitational acceleration 1G In this study

the gravity component sensed by the three-axis accelerometerat rest was used to calculate the gravity-direction accelerationsensed by the three axes The acceleration perpendicularto the ground (ie complete gravity-direction accelerationchange) was thus obtained

The gravity direction accelerations 119886119892for walking and

running motions were analyzed The walking accelerationamplitude was 05 G to 1G and the running amplitude wasapproximately 1 GThe line chart of acceleration values showsthe positive peak and negative valley points for each stepThese points were considered in addition to threshold toidentify the number of steps In addition the amplitude waslow during walking and the inertial vibration caused bythe stepping motion caused substantial noise whereas thesituation was more stable during running

To design a convenient step counting system a three-axis accelerometer and a gravity component were used toobtain the acceleration value perpendicular to the groundThe actual number of steps was thus detected The variationcurve of acceleration values exhibited a peak and valley foreach step which are the positive peak point and negativevalley point respectively Thus based on this characteristicthe threshold was used to filter the other low-amplitudenoises to count the number of steps correctly The step-detection algorithm is described as follows

6 International Journal of Antennas and Propagation

(1) The number of steps is zero when step countingbegins The gravity component is calculated and thepresent angle is obtained

(2) The three-axis acceleration value is read and thegravity-direction acceleration in 119886

119892is calculated

(3) If the absolute value of acceleration 119886119892is lower than

that of the threshold the algorithm reverts to Step 2If the value is higher than that of the threshold thenext step is executed

(4) The three-axis acceleration value is continually readand the 119886

119892is calculated If the 119886

119892counter to Step

3 is generated within 05 seconds and the absolutevalue is higher than the threshold the next step canbe executed Otherwise the pedometer is regarded asbeing in a stationary state and the system reverts toStep 2

(5) A positive and a negative acceleration 119886119892must be

obtained The absolute values must be higher thanthat of the threshold which is the number of stepsplus one Otherwise the system reverts to Step 2 tocontinue the detection

The acceleration 119886119892in one direction was higher than

the threshold acceleration in Step 4 The acceleration changecycles of each step were calculated within 05 seconds accord-ing to the walking and running 119886

119892changes Thus the system

is regarded as being in a stationary state and reverts to Step2 if the counter-acceleration 119886

119892is within 05 seconds of the

thresholdThis pedometer designwas convenient for users however

the placement can generate external force thus changing theoriginally detected angle Thus a relocation function wasrequired to achieve automatic system detection The calcu-lated angle can thus be corrected to the changed state Figure7 shows the step-detection algorithm with the relocationfunction

The aforementioned step-detection algorithm gravitycomponent and gravity-direction acceleration concepts wereused to implement the arbitrary placement of the systemThethreshold was used to filter the gravity-direction acceleration119886119892to obtain the number of steps taken by the user Different

results were obtained when the values were processed usingvarious smoothing techniques Thus appropriate walkingthresholds were determined for the different smoothingtechniques The qualities of various thresholds were com-pared based on the accuracy rates Table 2 lists the selectedthresholds

4 3D Pedometer That Automatically IdentifiesWalking and Running Motions

The running threshold must be higher than the walkingacceleration change and lower than the running accelerationchange to determine the motion state and the number ofwalking and running steps respectively Thus the motionstate number of walking steps and number of running stepsmust be separated Various thresholds were used to detect 100walking and running steps Different smoothing techniques

have various walking thresholds and the running thresholdis used to identify the walking or running motions of theuser The threshold was set at 02G to 054G and the incre-ments were set at 002G based on experimental adjustmentDifferent running thresholds exhibited varied walking andrunning accuracy rates Thus the two experimental resultswere averaged to obtain the average accuracy rate Table 3 liststhe optimal walking and running thresholds for the differentsmoothing techniquesThe 5-point weighted averagemethodmaintained a favorable detection accuracy rate in the runningthreshold experiment and the Hanning recursive smoothingtechnique achieved a favorable walking accuracy rate forvarious samples In this study both walking accuracy andrunning accuracy were calculated using

walking accuracy rate

= 100

minus

1003816100381610038161003816detected walking steps minus actual walking steps1003816100381610038161003816actual walking steps

times 100(10)

running accuracy rate

= 100

minus

1003816100381610038161003816detected running steps minus actual running steps1003816100381610038161003816actual running steps

times 100(11)

The walkrun mode switching system was designed toachieve a high detection accuracy rate because users typicallywalk or run continually The accuracy rate of the Hanningrecursive smoothing technique during walking and runningidentification was thus improvedThis system detects restingwalking and running modes and the modes switch underdifferent conditions The detection of two consecutive stepsis considered as the switching mode standard The walkingor running mode can be maintained provided that the accel-eration exceeds the walking threshold even if the switchingmode standard is not attained Figure 8 presents the systemblock diagram

Themode switching algorithm of the walking experimentreduces the detection misjudgment rate Misjudgment islikely to occur during the first two steps of the runningexperiment and this problem is yet to be addressed Themisjudgment rate of the mode switching algorithm whichis lower than that of the simple threshold filtering methodcan be observed in other data in addition to the running startproblem Thus the mode switching algorithm was used tocalculate the number of walking and running steps in thisstudyThemisjudgment rates of the 3-point average Hanningfilter 5-point weighted average and 5-point triple smoothingmethods were reduced to less than 2 after filtration usingthe mode switching algorithm The misjudgment rates ofthe Hanning recursive smoothing technique and the raw

International Journal of Antennas and Propagation 7

System start

Load the acceleration valueCalculate gravity componentPlacement state positioning

Calculate the acceleration agin gravity direction

ag gt threshold

Whether reverseacceleration ag is

generated within halfsecond

Whether reverseacceleration ag is

greater than thresholdwithin half second

Whether accelerationag returns to 0G within

half second

Make sure walk a step

Number of steps + 1

Placement angle haschanged

Relocation is required

Stationary state

Yes

Yes

Yes

Yes

No

No

No

Figure 7 Step-detection algorithm with relocation function

Table 2 Thresholds selected for different smoothing techniques

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Threshold 018 014 014 004 008 018

8 International Journal of Antennas and Propagation

Table 3 Walking and running thresholds for different smoothing techniques and their accuracy rates

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Walk 018 014 014 004 008 018Run 046 046 046 022 04 046Accuracy 97 99 99 815 995 995

System start

Stationary mode

Stationary mode

Walk mode

Walk mode

Run mode

Run mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) The walk mode is entered if there are two consecutive stepsexceeding the run threshold

(3) None of above Maintain stationary mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the walk threshold then maintaining walk mode

(3) One of the consecutive steps not exceeding the walk thresholdthen back to stationary mode

(1) The walk mode is entered if there are two consecutive stepsexceeding the walk threshold but not exceeding run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the run threshold then maintaining run mode

(3) One of the consecutive steps not exceeding the run thresholdthen back to stationary mode

Figure 8 System block diagram of the walking and running mode switching system

data not processed using a smoothing technique remained ashigh as 12 and 24 respectively The misjudgment rates ofboth methods compared with the remaining samples wererelatively high Thus the two signal processing modes wereexcluded in this study

An experiment regarding the accuracy rates of walkingand running alternation was conducted Ten walking stepsand 10 running steps were taken alternately until the numberof steps of each motion reached 100 for a total of 200steps The 3-point average Hanning filter 5-point weightedaverage and 5-point triple smoothing methods and themode switching algorithm were used to count the stepsduring signal processing The running accuracy rates of thefour smoothing modes were higher than 92 on averageRegarding walking which is likely to be misjudged the 5-point weighted average method exhibited the highest averageaccuracy rate of 89 Thus the 5-point weighted averagemethod was used for signal smoothing

5 Experimental Results and Analysis

Four experiments were conducted to assess a pedometerpositioned at arbitrary angles The pedometer was worn inthree different places for the first three experiments namelyaround the waist in a trouser pocket and horizontally in a

backpack The user walked 100 continual steps along a corri-dor The pedometer was attached to the waist for the fourthexperiment The user walked and stopped walking at will for100 steps to validate the proposed pedometerThe pedometerwas able to accurately detect the number of steps even thoughthe user walked and stopped walking occasionally unlikethe 7-second misjudgment prevention system of current 3Dpedometers The experimental environment is described asfollows

(1) Experimental site a corridor approximately 5m longand approximately 1m wide

(2) Pedometers the three pedometers used were (a) a3D pedometer that automatically identifies walkingand runningmotions whichwas designed and imple-mented in this study (b) a conventional mechanicalMPG-002 pedometer developed by Nintendo and (c)a 3D PS-10A pedometer available on the market andproduced by Pursun

(3) Experimental subjects three females and two malesfor a total of five subjects

Table 4 lists the experimental results The average accu-racy rates of the three pedometers fixed to the waist werehigher than 90The accuracy rate of the proposed pedome-ter decreased to 85 when the pedometer was placed in

International Journal of Antennas and Propagation 9

Table 4 Results of experiments on the pedometer positioned at arbitrary angles

Item Location and actionmode

Mechanical pedometerMPG-002 3D pedometer PS-10A 3D pedometer for automatic

identification

Male 1

Waist 103 98 Walk 103 Run 0Pocket 99 109 Walk 132 Run 0Bag 2 97 Walk 111 Run 0

Walk stop 97 26 Walk 114 Run 0

Male 2

Waist 98 101 Walk 103 Run 0Pocket 95 98 Walk 123 Run 4Bag 0 101 Walk 92 Run 0

Walk stop 95 12 Walk 117 Run 0

Female 1

Waist 84 95 Walk 104 Run 0Pocket 72 94 Walk 100 Run 0Bag 0 97 Walk 92 Run 0

Walk stop 85 0 Walk 89 Run 0

Female 2

Waist 92 84 Walk 102 Run 0Pocket 91 94 Walk 96 Run 0Bag 0 99 Walk 101 Run 0

Walk stop 96 30 Walk 112 Run 0

Female 3

Waist 97 86 Walk 108 Run 0Pocket 88 97 Walk 109 Run 0Bag 0 89 Walk 103 Run 0

Walk stop 83 9 Walk 102 Run 0

Average accuracyrate

Waist 936 924 96Pocket 89 948 856Bag 04 962 938

Walk stop 912 154 888

the pocket because the pockets of Male 1 and Male 2were large increasing inertial vibration and the number ofdetected steps Only one direction was detected when thepedometer was placed horizontally in the bag because themechanical pedometer used a mechanical spring mechanismin detection thus the number of steps could not be detectednormally The average accuracy rates of the 3D pedometerand the 3D pedometer that automatically identifies walkingand running motions were higher than 90 Finally thewalking and stopping experiment for a small number of stepswas conducted The misjudgment prevention mechanismfails in most generic 3D pedometers when users take only asmall number of steps when walking and stopping becausea short time threshold is used as a misjudgment preventionmechanism This experiment proved that the 3D pedometerthat automatically identifies walking and running motionswhich was developed in this study can resolve the defectThe experimental results suggested that the average accuracyrate of the 3D PS-10A pedometer was only 15 in the walkand stop experiment whereas the accuracy rate of the 3Dpedometer that automatically identifies walking and runningmotions was 888

Finally the step counting system for walking and run-ning recognition was tested The five subjects wore the 3Dpedometer that automatically identifies walking and running

motions The walkrun mode switching algorithm was usedto prove that this pedometer can recognize the number ofwalking and running steps taken by a user The experimentalmethod is described in detail as follows The walk and runalternating mode was defined as walking 10 steps beforerunning 10 steps This process was alternated until 100 stepsof each motion were taken for a total of 200 steps

(1) Experiment 1 the user wears the pedometer aroundthewaist and alternatelywalks and runs along the cor-ridor One hundred steps are taken for each motion

(2) Experiment 2 the user places the pedometer in apocket and alternately walks and runs along the cor-ridor One hundred steps are taken for each motion

(3) Experiment 3 the user places the pedometer horizon-tally in the backpack and alternately walks and runsalong the corridor One hundred steps are taken foreach motion

Table 5 lists the experimental results The average detec-tion accuracy rate for the simple running experiment wasthe highest of the three walking-mode detection accuracyrates at 95 to 988 The detection accuracy rate of thesimple walking experiment was 884 to 926 and that ofthe alternate walk and run experiment was the poorest at

10 International Journal of Antennas and Propagation

Table 5 Results of the experiments on the step counting system in walking and running recognition

Item Mode Walk 100 steps Run 100 steps Walk 100 steps and run 100 stepsWaist Walk 107 Run 0 Walk 2 Run 99 Walk 119 Run 100

Male 1 Pocket Walk 80 Run 0 Walk 2 Run 98 Walk 120 run 90Bag Walk 86 Run 0 Walk 4 Run 98 Walk 78 Run 94Waist Walk 102 Run 3 Walk 2 Run 98 Walk 114 Run 100

Male 2 Pocket Walk 85 Run 0 Walk 2 Run 98 Walk 100 Run 97Bag Walk 90 Run 0 Walk 2 Run 99 Walk 72 Run 95Waist Walk 87 Run 0 Walk 2 Run 98 Walk 90 Run 83

Female 1 Pocket Walk 89 Run 0 Walk 9 Run 91 Walk 86 Run 92Bag Walk 99 Run 0 Walk 2 Run 99 Walk 85 Run 95Waist Walk 88 Run 0 Walk 2 Run 99 Walk 88 Run 100

Female 2 Pocket Walk 105 Run 0 Walk 9 Run 90 Walk 86 Run 93Bag Walk 96 Run 0 Walk 2 Run 99 Walk 66 Run 98Waist Walk 103 Run 0 Walk 2 Run 98 Walk 107 Run 97

Female 3 Pocket Walk 93 Run 0 Walk 2 Run 98 Walk 92 Run 91Bag Walk 75 Run 0 Walk 2 Run 99 Walk 57 Run 95Waist 926 06 None 876

Walk accuracy ratemiss rate Pocket 884 0 None 888Bag 892 0 None 716Waist None 984 2 96

Run accuracy ratemiss rate Pocket None 95 48 926Bag None 988 24 954

Table 6 Functions of different pedometers (119874 with119883 without)

Pedometer

Item Mechanicalpedometer MPG-002 3D pedometer PS-10A 3D pedometer for automatic identification

of walking and running motions

Fixed to waist 119874 119874 O(936) (924) (96)

In pocket 119874 119874 O(89) (948) (856)

In bag horizontally (arbitraryplacement)

119883 119874 O(04) (962) (938)

Detection of small step ofwalk and stop

119874 119883 O(912) (154) (888)

Identification of walk and run 119883 119883O

(716sim988)Real-time display of currentmotion state 119883 119883

O(rest walk run)

716 to 96Thepedometerworn around thewaist achievedthe highest average detection accuracy rate followed by thatin the pocket The pedometer placed horizontally in thebackpack exhibited the worst accuracy rate among the threepedometer-wearing modes

The average walking mode misjudgment rates of the 3Dpedometer that automatically identifies walking and runningmotions in different wearing modes were observed to belower than 5 according to the experimental aforementionedresults The misjudgment rate was calculated using (12) Theaverage accuracy rates were higher than 70 except for the

instances in which the pedometer was placed horizontallyin the backpack and during the alternate walk and runexperiment The average accuracy rates were higher than87 in these cases proving that this pedometer accuratelyidentified walking and running motions Consider

misjudgment rate =misjudged stepsactual steps

times 100 (12)

Table 6 lists the functions of the mechanical MPG-002pedometer 3D PS-10A pedometer and 3D pedometer thatautomatically identifies walking and running motions The

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 5: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

International Journal of Antennas and Propagation 5

Table 1 Inclination calculated based on sensed gravity component

Angle Sensed gravity arcsin conversion Converted angle Error(degree) (G) (degree) (degree)0 0 0 0 00010 02173 021914105 1256 25620 03913 040204853 2304 30430 05652 060069675 3442 44240 06739 073949248 4237 23750 07826 089884543 5150 15060 08913 110021386 6304 30470 09565 127483340 7304 30480 09782 136190231 7803 19790 1 157079632 90 0

Horizon

Inclination angle

Gravity

120579

120579

Figure 6 Relationship between 120579∘ inclination of the 119883-axis andgravity direction

with each step This direction is parallel to gravity directionThe 119883-axis is inclined at 120579∘ to the horizontal plane and (7)is deduced as shown in Figure 6 to obtain the accelerationchange in this direction Consider

119886119892= 119886119909sdot sin 120579 (7)

where 119886119892is the gravity-direction acceleration 119886

119909is the

acceleration sensed in the 119883-direction and 120579 is the angleincluded between the 119883-axis and horizontal plane (ieinclination) As shown in Figure 6 119886

119892equals the product of 119886

119909

and sin 120579When the axis is inclined 120579∘ sin 120579 equals the gravitycomponent on the axis The inclination calculation step canbe omitted if sin 120579 is substituted into (7)Thegravity-directionacceleration change is directly calculated based on the gravitycomponent by using

119886119892(119905119899) = 119886119909(119905119899)119886119909(1199051)

119886119866

(8)

where 119886119892(119905119899) is the gravity-direction acceleration at time

119905119899when the 119883-axis is used as an example 119886

119909(119905119899) is the

acceleration in 119883-direction 119886119909(1199051) is the gravity component

sensed at resting time 1199051 and 119886

119866is complete gravitational

acceleration 1G The sensor can detect acceleration changes

in three axes in the triaxial 3D space according to (8) The 119884-and 119885-axes are added to obtain

119886119892(119905119899) =

119886119909(119905119899)119886119909(1199051)

119886119866

119886119910(119905119899)

119886119910(1199051)

119886119866

119886119911(119905119899)119886119911(1199051)

119886119866

(9)

where 119886119892(119905119899) is the gravity-direction acceleration at time 119905

119899

119886119909(119905119899) 119886119910(119905119899) and 119886

119911(119905119899) represent the accelerations sensed

by three axes at time 119905119899 119886119909(1199051) 119886119910(1199051) and 119886

119911(1199051) represent

the gravity components sensed by three axes at resting time 1199051

and 119886119866is complete gravitational acceleration 1G In this study

the gravity component sensed by the three-axis accelerometerat rest was used to calculate the gravity-direction accelerationsensed by the three axes The acceleration perpendicularto the ground (ie complete gravity-direction accelerationchange) was thus obtained

The gravity direction accelerations 119886119892for walking and

running motions were analyzed The walking accelerationamplitude was 05 G to 1G and the running amplitude wasapproximately 1 GThe line chart of acceleration values showsthe positive peak and negative valley points for each stepThese points were considered in addition to threshold toidentify the number of steps In addition the amplitude waslow during walking and the inertial vibration caused bythe stepping motion caused substantial noise whereas thesituation was more stable during running

To design a convenient step counting system a three-axis accelerometer and a gravity component were used toobtain the acceleration value perpendicular to the groundThe actual number of steps was thus detected The variationcurve of acceleration values exhibited a peak and valley foreach step which are the positive peak point and negativevalley point respectively Thus based on this characteristicthe threshold was used to filter the other low-amplitudenoises to count the number of steps correctly The step-detection algorithm is described as follows

6 International Journal of Antennas and Propagation

(1) The number of steps is zero when step countingbegins The gravity component is calculated and thepresent angle is obtained

(2) The three-axis acceleration value is read and thegravity-direction acceleration in 119886

119892is calculated

(3) If the absolute value of acceleration 119886119892is lower than

that of the threshold the algorithm reverts to Step 2If the value is higher than that of the threshold thenext step is executed

(4) The three-axis acceleration value is continually readand the 119886

119892is calculated If the 119886

119892counter to Step

3 is generated within 05 seconds and the absolutevalue is higher than the threshold the next step canbe executed Otherwise the pedometer is regarded asbeing in a stationary state and the system reverts toStep 2

(5) A positive and a negative acceleration 119886119892must be

obtained The absolute values must be higher thanthat of the threshold which is the number of stepsplus one Otherwise the system reverts to Step 2 tocontinue the detection

The acceleration 119886119892in one direction was higher than

the threshold acceleration in Step 4 The acceleration changecycles of each step were calculated within 05 seconds accord-ing to the walking and running 119886

119892changes Thus the system

is regarded as being in a stationary state and reverts to Step2 if the counter-acceleration 119886

119892is within 05 seconds of the

thresholdThis pedometer designwas convenient for users however

the placement can generate external force thus changing theoriginally detected angle Thus a relocation function wasrequired to achieve automatic system detection The calcu-lated angle can thus be corrected to the changed state Figure7 shows the step-detection algorithm with the relocationfunction

The aforementioned step-detection algorithm gravitycomponent and gravity-direction acceleration concepts wereused to implement the arbitrary placement of the systemThethreshold was used to filter the gravity-direction acceleration119886119892to obtain the number of steps taken by the user Different

results were obtained when the values were processed usingvarious smoothing techniques Thus appropriate walkingthresholds were determined for the different smoothingtechniques The qualities of various thresholds were com-pared based on the accuracy rates Table 2 lists the selectedthresholds

4 3D Pedometer That Automatically IdentifiesWalking and Running Motions

The running threshold must be higher than the walkingacceleration change and lower than the running accelerationchange to determine the motion state and the number ofwalking and running steps respectively Thus the motionstate number of walking steps and number of running stepsmust be separated Various thresholds were used to detect 100walking and running steps Different smoothing techniques

have various walking thresholds and the running thresholdis used to identify the walking or running motions of theuser The threshold was set at 02G to 054G and the incre-ments were set at 002G based on experimental adjustmentDifferent running thresholds exhibited varied walking andrunning accuracy rates Thus the two experimental resultswere averaged to obtain the average accuracy rate Table 3 liststhe optimal walking and running thresholds for the differentsmoothing techniquesThe 5-point weighted averagemethodmaintained a favorable detection accuracy rate in the runningthreshold experiment and the Hanning recursive smoothingtechnique achieved a favorable walking accuracy rate forvarious samples In this study both walking accuracy andrunning accuracy were calculated using

walking accuracy rate

= 100

minus

1003816100381610038161003816detected walking steps minus actual walking steps1003816100381610038161003816actual walking steps

times 100(10)

running accuracy rate

= 100

minus

1003816100381610038161003816detected running steps minus actual running steps1003816100381610038161003816actual running steps

times 100(11)

The walkrun mode switching system was designed toachieve a high detection accuracy rate because users typicallywalk or run continually The accuracy rate of the Hanningrecursive smoothing technique during walking and runningidentification was thus improvedThis system detects restingwalking and running modes and the modes switch underdifferent conditions The detection of two consecutive stepsis considered as the switching mode standard The walkingor running mode can be maintained provided that the accel-eration exceeds the walking threshold even if the switchingmode standard is not attained Figure 8 presents the systemblock diagram

Themode switching algorithm of the walking experimentreduces the detection misjudgment rate Misjudgment islikely to occur during the first two steps of the runningexperiment and this problem is yet to be addressed Themisjudgment rate of the mode switching algorithm whichis lower than that of the simple threshold filtering methodcan be observed in other data in addition to the running startproblem Thus the mode switching algorithm was used tocalculate the number of walking and running steps in thisstudyThemisjudgment rates of the 3-point average Hanningfilter 5-point weighted average and 5-point triple smoothingmethods were reduced to less than 2 after filtration usingthe mode switching algorithm The misjudgment rates ofthe Hanning recursive smoothing technique and the raw

International Journal of Antennas and Propagation 7

System start

Load the acceleration valueCalculate gravity componentPlacement state positioning

Calculate the acceleration agin gravity direction

ag gt threshold

Whether reverseacceleration ag is

generated within halfsecond

Whether reverseacceleration ag is

greater than thresholdwithin half second

Whether accelerationag returns to 0G within

half second

Make sure walk a step

Number of steps + 1

Placement angle haschanged

Relocation is required

Stationary state

Yes

Yes

Yes

Yes

No

No

No

Figure 7 Step-detection algorithm with relocation function

Table 2 Thresholds selected for different smoothing techniques

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Threshold 018 014 014 004 008 018

8 International Journal of Antennas and Propagation

Table 3 Walking and running thresholds for different smoothing techniques and their accuracy rates

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Walk 018 014 014 004 008 018Run 046 046 046 022 04 046Accuracy 97 99 99 815 995 995

System start

Stationary mode

Stationary mode

Walk mode

Walk mode

Run mode

Run mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) The walk mode is entered if there are two consecutive stepsexceeding the run threshold

(3) None of above Maintain stationary mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the walk threshold then maintaining walk mode

(3) One of the consecutive steps not exceeding the walk thresholdthen back to stationary mode

(1) The walk mode is entered if there are two consecutive stepsexceeding the walk threshold but not exceeding run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the run threshold then maintaining run mode

(3) One of the consecutive steps not exceeding the run thresholdthen back to stationary mode

Figure 8 System block diagram of the walking and running mode switching system

data not processed using a smoothing technique remained ashigh as 12 and 24 respectively The misjudgment rates ofboth methods compared with the remaining samples wererelatively high Thus the two signal processing modes wereexcluded in this study

An experiment regarding the accuracy rates of walkingand running alternation was conducted Ten walking stepsand 10 running steps were taken alternately until the numberof steps of each motion reached 100 for a total of 200steps The 3-point average Hanning filter 5-point weightedaverage and 5-point triple smoothing methods and themode switching algorithm were used to count the stepsduring signal processing The running accuracy rates of thefour smoothing modes were higher than 92 on averageRegarding walking which is likely to be misjudged the 5-point weighted average method exhibited the highest averageaccuracy rate of 89 Thus the 5-point weighted averagemethod was used for signal smoothing

5 Experimental Results and Analysis

Four experiments were conducted to assess a pedometerpositioned at arbitrary angles The pedometer was worn inthree different places for the first three experiments namelyaround the waist in a trouser pocket and horizontally in a

backpack The user walked 100 continual steps along a corri-dor The pedometer was attached to the waist for the fourthexperiment The user walked and stopped walking at will for100 steps to validate the proposed pedometerThe pedometerwas able to accurately detect the number of steps even thoughthe user walked and stopped walking occasionally unlikethe 7-second misjudgment prevention system of current 3Dpedometers The experimental environment is described asfollows

(1) Experimental site a corridor approximately 5m longand approximately 1m wide

(2) Pedometers the three pedometers used were (a) a3D pedometer that automatically identifies walkingand runningmotions whichwas designed and imple-mented in this study (b) a conventional mechanicalMPG-002 pedometer developed by Nintendo and (c)a 3D PS-10A pedometer available on the market andproduced by Pursun

(3) Experimental subjects three females and two malesfor a total of five subjects

Table 4 lists the experimental results The average accu-racy rates of the three pedometers fixed to the waist werehigher than 90The accuracy rate of the proposed pedome-ter decreased to 85 when the pedometer was placed in

International Journal of Antennas and Propagation 9

Table 4 Results of experiments on the pedometer positioned at arbitrary angles

Item Location and actionmode

Mechanical pedometerMPG-002 3D pedometer PS-10A 3D pedometer for automatic

identification

Male 1

Waist 103 98 Walk 103 Run 0Pocket 99 109 Walk 132 Run 0Bag 2 97 Walk 111 Run 0

Walk stop 97 26 Walk 114 Run 0

Male 2

Waist 98 101 Walk 103 Run 0Pocket 95 98 Walk 123 Run 4Bag 0 101 Walk 92 Run 0

Walk stop 95 12 Walk 117 Run 0

Female 1

Waist 84 95 Walk 104 Run 0Pocket 72 94 Walk 100 Run 0Bag 0 97 Walk 92 Run 0

Walk stop 85 0 Walk 89 Run 0

Female 2

Waist 92 84 Walk 102 Run 0Pocket 91 94 Walk 96 Run 0Bag 0 99 Walk 101 Run 0

Walk stop 96 30 Walk 112 Run 0

Female 3

Waist 97 86 Walk 108 Run 0Pocket 88 97 Walk 109 Run 0Bag 0 89 Walk 103 Run 0

Walk stop 83 9 Walk 102 Run 0

Average accuracyrate

Waist 936 924 96Pocket 89 948 856Bag 04 962 938

Walk stop 912 154 888

the pocket because the pockets of Male 1 and Male 2were large increasing inertial vibration and the number ofdetected steps Only one direction was detected when thepedometer was placed horizontally in the bag because themechanical pedometer used a mechanical spring mechanismin detection thus the number of steps could not be detectednormally The average accuracy rates of the 3D pedometerand the 3D pedometer that automatically identifies walkingand running motions were higher than 90 Finally thewalking and stopping experiment for a small number of stepswas conducted The misjudgment prevention mechanismfails in most generic 3D pedometers when users take only asmall number of steps when walking and stopping becausea short time threshold is used as a misjudgment preventionmechanism This experiment proved that the 3D pedometerthat automatically identifies walking and running motionswhich was developed in this study can resolve the defectThe experimental results suggested that the average accuracyrate of the 3D PS-10A pedometer was only 15 in the walkand stop experiment whereas the accuracy rate of the 3Dpedometer that automatically identifies walking and runningmotions was 888

Finally the step counting system for walking and run-ning recognition was tested The five subjects wore the 3Dpedometer that automatically identifies walking and running

motions The walkrun mode switching algorithm was usedto prove that this pedometer can recognize the number ofwalking and running steps taken by a user The experimentalmethod is described in detail as follows The walk and runalternating mode was defined as walking 10 steps beforerunning 10 steps This process was alternated until 100 stepsof each motion were taken for a total of 200 steps

(1) Experiment 1 the user wears the pedometer aroundthewaist and alternatelywalks and runs along the cor-ridor One hundred steps are taken for each motion

(2) Experiment 2 the user places the pedometer in apocket and alternately walks and runs along the cor-ridor One hundred steps are taken for each motion

(3) Experiment 3 the user places the pedometer horizon-tally in the backpack and alternately walks and runsalong the corridor One hundred steps are taken foreach motion

Table 5 lists the experimental results The average detec-tion accuracy rate for the simple running experiment wasthe highest of the three walking-mode detection accuracyrates at 95 to 988 The detection accuracy rate of thesimple walking experiment was 884 to 926 and that ofthe alternate walk and run experiment was the poorest at

10 International Journal of Antennas and Propagation

Table 5 Results of the experiments on the step counting system in walking and running recognition

Item Mode Walk 100 steps Run 100 steps Walk 100 steps and run 100 stepsWaist Walk 107 Run 0 Walk 2 Run 99 Walk 119 Run 100

Male 1 Pocket Walk 80 Run 0 Walk 2 Run 98 Walk 120 run 90Bag Walk 86 Run 0 Walk 4 Run 98 Walk 78 Run 94Waist Walk 102 Run 3 Walk 2 Run 98 Walk 114 Run 100

Male 2 Pocket Walk 85 Run 0 Walk 2 Run 98 Walk 100 Run 97Bag Walk 90 Run 0 Walk 2 Run 99 Walk 72 Run 95Waist Walk 87 Run 0 Walk 2 Run 98 Walk 90 Run 83

Female 1 Pocket Walk 89 Run 0 Walk 9 Run 91 Walk 86 Run 92Bag Walk 99 Run 0 Walk 2 Run 99 Walk 85 Run 95Waist Walk 88 Run 0 Walk 2 Run 99 Walk 88 Run 100

Female 2 Pocket Walk 105 Run 0 Walk 9 Run 90 Walk 86 Run 93Bag Walk 96 Run 0 Walk 2 Run 99 Walk 66 Run 98Waist Walk 103 Run 0 Walk 2 Run 98 Walk 107 Run 97

Female 3 Pocket Walk 93 Run 0 Walk 2 Run 98 Walk 92 Run 91Bag Walk 75 Run 0 Walk 2 Run 99 Walk 57 Run 95Waist 926 06 None 876

Walk accuracy ratemiss rate Pocket 884 0 None 888Bag 892 0 None 716Waist None 984 2 96

Run accuracy ratemiss rate Pocket None 95 48 926Bag None 988 24 954

Table 6 Functions of different pedometers (119874 with119883 without)

Pedometer

Item Mechanicalpedometer MPG-002 3D pedometer PS-10A 3D pedometer for automatic identification

of walking and running motions

Fixed to waist 119874 119874 O(936) (924) (96)

In pocket 119874 119874 O(89) (948) (856)

In bag horizontally (arbitraryplacement)

119883 119874 O(04) (962) (938)

Detection of small step ofwalk and stop

119874 119883 O(912) (154) (888)

Identification of walk and run 119883 119883O

(716sim988)Real-time display of currentmotion state 119883 119883

O(rest walk run)

716 to 96Thepedometerworn around thewaist achievedthe highest average detection accuracy rate followed by thatin the pocket The pedometer placed horizontally in thebackpack exhibited the worst accuracy rate among the threepedometer-wearing modes

The average walking mode misjudgment rates of the 3Dpedometer that automatically identifies walking and runningmotions in different wearing modes were observed to belower than 5 according to the experimental aforementionedresults The misjudgment rate was calculated using (12) Theaverage accuracy rates were higher than 70 except for the

instances in which the pedometer was placed horizontallyin the backpack and during the alternate walk and runexperiment The average accuracy rates were higher than87 in these cases proving that this pedometer accuratelyidentified walking and running motions Consider

misjudgment rate =misjudged stepsactual steps

times 100 (12)

Table 6 lists the functions of the mechanical MPG-002pedometer 3D PS-10A pedometer and 3D pedometer thatautomatically identifies walking and running motions The

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 6: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

6 International Journal of Antennas and Propagation

(1) The number of steps is zero when step countingbegins The gravity component is calculated and thepresent angle is obtained

(2) The three-axis acceleration value is read and thegravity-direction acceleration in 119886

119892is calculated

(3) If the absolute value of acceleration 119886119892is lower than

that of the threshold the algorithm reverts to Step 2If the value is higher than that of the threshold thenext step is executed

(4) The three-axis acceleration value is continually readand the 119886

119892is calculated If the 119886

119892counter to Step

3 is generated within 05 seconds and the absolutevalue is higher than the threshold the next step canbe executed Otherwise the pedometer is regarded asbeing in a stationary state and the system reverts toStep 2

(5) A positive and a negative acceleration 119886119892must be

obtained The absolute values must be higher thanthat of the threshold which is the number of stepsplus one Otherwise the system reverts to Step 2 tocontinue the detection

The acceleration 119886119892in one direction was higher than

the threshold acceleration in Step 4 The acceleration changecycles of each step were calculated within 05 seconds accord-ing to the walking and running 119886

119892changes Thus the system

is regarded as being in a stationary state and reverts to Step2 if the counter-acceleration 119886

119892is within 05 seconds of the

thresholdThis pedometer designwas convenient for users however

the placement can generate external force thus changing theoriginally detected angle Thus a relocation function wasrequired to achieve automatic system detection The calcu-lated angle can thus be corrected to the changed state Figure7 shows the step-detection algorithm with the relocationfunction

The aforementioned step-detection algorithm gravitycomponent and gravity-direction acceleration concepts wereused to implement the arbitrary placement of the systemThethreshold was used to filter the gravity-direction acceleration119886119892to obtain the number of steps taken by the user Different

results were obtained when the values were processed usingvarious smoothing techniques Thus appropriate walkingthresholds were determined for the different smoothingtechniques The qualities of various thresholds were com-pared based on the accuracy rates Table 2 lists the selectedthresholds

4 3D Pedometer That Automatically IdentifiesWalking and Running Motions

The running threshold must be higher than the walkingacceleration change and lower than the running accelerationchange to determine the motion state and the number ofwalking and running steps respectively Thus the motionstate number of walking steps and number of running stepsmust be separated Various thresholds were used to detect 100walking and running steps Different smoothing techniques

have various walking thresholds and the running thresholdis used to identify the walking or running motions of theuser The threshold was set at 02G to 054G and the incre-ments were set at 002G based on experimental adjustmentDifferent running thresholds exhibited varied walking andrunning accuracy rates Thus the two experimental resultswere averaged to obtain the average accuracy rate Table 3 liststhe optimal walking and running thresholds for the differentsmoothing techniquesThe 5-point weighted averagemethodmaintained a favorable detection accuracy rate in the runningthreshold experiment and the Hanning recursive smoothingtechnique achieved a favorable walking accuracy rate forvarious samples In this study both walking accuracy andrunning accuracy were calculated using

walking accuracy rate

= 100

minus

1003816100381610038161003816detected walking steps minus actual walking steps1003816100381610038161003816actual walking steps

times 100(10)

running accuracy rate

= 100

minus

1003816100381610038161003816detected running steps minus actual running steps1003816100381610038161003816actual running steps

times 100(11)

The walkrun mode switching system was designed toachieve a high detection accuracy rate because users typicallywalk or run continually The accuracy rate of the Hanningrecursive smoothing technique during walking and runningidentification was thus improvedThis system detects restingwalking and running modes and the modes switch underdifferent conditions The detection of two consecutive stepsis considered as the switching mode standard The walkingor running mode can be maintained provided that the accel-eration exceeds the walking threshold even if the switchingmode standard is not attained Figure 8 presents the systemblock diagram

Themode switching algorithm of the walking experimentreduces the detection misjudgment rate Misjudgment islikely to occur during the first two steps of the runningexperiment and this problem is yet to be addressed Themisjudgment rate of the mode switching algorithm whichis lower than that of the simple threshold filtering methodcan be observed in other data in addition to the running startproblem Thus the mode switching algorithm was used tocalculate the number of walking and running steps in thisstudyThemisjudgment rates of the 3-point average Hanningfilter 5-point weighted average and 5-point triple smoothingmethods were reduced to less than 2 after filtration usingthe mode switching algorithm The misjudgment rates ofthe Hanning recursive smoothing technique and the raw

International Journal of Antennas and Propagation 7

System start

Load the acceleration valueCalculate gravity componentPlacement state positioning

Calculate the acceleration agin gravity direction

ag gt threshold

Whether reverseacceleration ag is

generated within halfsecond

Whether reverseacceleration ag is

greater than thresholdwithin half second

Whether accelerationag returns to 0G within

half second

Make sure walk a step

Number of steps + 1

Placement angle haschanged

Relocation is required

Stationary state

Yes

Yes

Yes

Yes

No

No

No

Figure 7 Step-detection algorithm with relocation function

Table 2 Thresholds selected for different smoothing techniques

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Threshold 018 014 014 004 008 018

8 International Journal of Antennas and Propagation

Table 3 Walking and running thresholds for different smoothing techniques and their accuracy rates

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Walk 018 014 014 004 008 018Run 046 046 046 022 04 046Accuracy 97 99 99 815 995 995

System start

Stationary mode

Stationary mode

Walk mode

Walk mode

Run mode

Run mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) The walk mode is entered if there are two consecutive stepsexceeding the run threshold

(3) None of above Maintain stationary mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the walk threshold then maintaining walk mode

(3) One of the consecutive steps not exceeding the walk thresholdthen back to stationary mode

(1) The walk mode is entered if there are two consecutive stepsexceeding the walk threshold but not exceeding run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the run threshold then maintaining run mode

(3) One of the consecutive steps not exceeding the run thresholdthen back to stationary mode

Figure 8 System block diagram of the walking and running mode switching system

data not processed using a smoothing technique remained ashigh as 12 and 24 respectively The misjudgment rates ofboth methods compared with the remaining samples wererelatively high Thus the two signal processing modes wereexcluded in this study

An experiment regarding the accuracy rates of walkingand running alternation was conducted Ten walking stepsand 10 running steps were taken alternately until the numberof steps of each motion reached 100 for a total of 200steps The 3-point average Hanning filter 5-point weightedaverage and 5-point triple smoothing methods and themode switching algorithm were used to count the stepsduring signal processing The running accuracy rates of thefour smoothing modes were higher than 92 on averageRegarding walking which is likely to be misjudged the 5-point weighted average method exhibited the highest averageaccuracy rate of 89 Thus the 5-point weighted averagemethod was used for signal smoothing

5 Experimental Results and Analysis

Four experiments were conducted to assess a pedometerpositioned at arbitrary angles The pedometer was worn inthree different places for the first three experiments namelyaround the waist in a trouser pocket and horizontally in a

backpack The user walked 100 continual steps along a corri-dor The pedometer was attached to the waist for the fourthexperiment The user walked and stopped walking at will for100 steps to validate the proposed pedometerThe pedometerwas able to accurately detect the number of steps even thoughthe user walked and stopped walking occasionally unlikethe 7-second misjudgment prevention system of current 3Dpedometers The experimental environment is described asfollows

(1) Experimental site a corridor approximately 5m longand approximately 1m wide

(2) Pedometers the three pedometers used were (a) a3D pedometer that automatically identifies walkingand runningmotions whichwas designed and imple-mented in this study (b) a conventional mechanicalMPG-002 pedometer developed by Nintendo and (c)a 3D PS-10A pedometer available on the market andproduced by Pursun

(3) Experimental subjects three females and two malesfor a total of five subjects

Table 4 lists the experimental results The average accu-racy rates of the three pedometers fixed to the waist werehigher than 90The accuracy rate of the proposed pedome-ter decreased to 85 when the pedometer was placed in

International Journal of Antennas and Propagation 9

Table 4 Results of experiments on the pedometer positioned at arbitrary angles

Item Location and actionmode

Mechanical pedometerMPG-002 3D pedometer PS-10A 3D pedometer for automatic

identification

Male 1

Waist 103 98 Walk 103 Run 0Pocket 99 109 Walk 132 Run 0Bag 2 97 Walk 111 Run 0

Walk stop 97 26 Walk 114 Run 0

Male 2

Waist 98 101 Walk 103 Run 0Pocket 95 98 Walk 123 Run 4Bag 0 101 Walk 92 Run 0

Walk stop 95 12 Walk 117 Run 0

Female 1

Waist 84 95 Walk 104 Run 0Pocket 72 94 Walk 100 Run 0Bag 0 97 Walk 92 Run 0

Walk stop 85 0 Walk 89 Run 0

Female 2

Waist 92 84 Walk 102 Run 0Pocket 91 94 Walk 96 Run 0Bag 0 99 Walk 101 Run 0

Walk stop 96 30 Walk 112 Run 0

Female 3

Waist 97 86 Walk 108 Run 0Pocket 88 97 Walk 109 Run 0Bag 0 89 Walk 103 Run 0

Walk stop 83 9 Walk 102 Run 0

Average accuracyrate

Waist 936 924 96Pocket 89 948 856Bag 04 962 938

Walk stop 912 154 888

the pocket because the pockets of Male 1 and Male 2were large increasing inertial vibration and the number ofdetected steps Only one direction was detected when thepedometer was placed horizontally in the bag because themechanical pedometer used a mechanical spring mechanismin detection thus the number of steps could not be detectednormally The average accuracy rates of the 3D pedometerand the 3D pedometer that automatically identifies walkingand running motions were higher than 90 Finally thewalking and stopping experiment for a small number of stepswas conducted The misjudgment prevention mechanismfails in most generic 3D pedometers when users take only asmall number of steps when walking and stopping becausea short time threshold is used as a misjudgment preventionmechanism This experiment proved that the 3D pedometerthat automatically identifies walking and running motionswhich was developed in this study can resolve the defectThe experimental results suggested that the average accuracyrate of the 3D PS-10A pedometer was only 15 in the walkand stop experiment whereas the accuracy rate of the 3Dpedometer that automatically identifies walking and runningmotions was 888

Finally the step counting system for walking and run-ning recognition was tested The five subjects wore the 3Dpedometer that automatically identifies walking and running

motions The walkrun mode switching algorithm was usedto prove that this pedometer can recognize the number ofwalking and running steps taken by a user The experimentalmethod is described in detail as follows The walk and runalternating mode was defined as walking 10 steps beforerunning 10 steps This process was alternated until 100 stepsof each motion were taken for a total of 200 steps

(1) Experiment 1 the user wears the pedometer aroundthewaist and alternatelywalks and runs along the cor-ridor One hundred steps are taken for each motion

(2) Experiment 2 the user places the pedometer in apocket and alternately walks and runs along the cor-ridor One hundred steps are taken for each motion

(3) Experiment 3 the user places the pedometer horizon-tally in the backpack and alternately walks and runsalong the corridor One hundred steps are taken foreach motion

Table 5 lists the experimental results The average detec-tion accuracy rate for the simple running experiment wasthe highest of the three walking-mode detection accuracyrates at 95 to 988 The detection accuracy rate of thesimple walking experiment was 884 to 926 and that ofthe alternate walk and run experiment was the poorest at

10 International Journal of Antennas and Propagation

Table 5 Results of the experiments on the step counting system in walking and running recognition

Item Mode Walk 100 steps Run 100 steps Walk 100 steps and run 100 stepsWaist Walk 107 Run 0 Walk 2 Run 99 Walk 119 Run 100

Male 1 Pocket Walk 80 Run 0 Walk 2 Run 98 Walk 120 run 90Bag Walk 86 Run 0 Walk 4 Run 98 Walk 78 Run 94Waist Walk 102 Run 3 Walk 2 Run 98 Walk 114 Run 100

Male 2 Pocket Walk 85 Run 0 Walk 2 Run 98 Walk 100 Run 97Bag Walk 90 Run 0 Walk 2 Run 99 Walk 72 Run 95Waist Walk 87 Run 0 Walk 2 Run 98 Walk 90 Run 83

Female 1 Pocket Walk 89 Run 0 Walk 9 Run 91 Walk 86 Run 92Bag Walk 99 Run 0 Walk 2 Run 99 Walk 85 Run 95Waist Walk 88 Run 0 Walk 2 Run 99 Walk 88 Run 100

Female 2 Pocket Walk 105 Run 0 Walk 9 Run 90 Walk 86 Run 93Bag Walk 96 Run 0 Walk 2 Run 99 Walk 66 Run 98Waist Walk 103 Run 0 Walk 2 Run 98 Walk 107 Run 97

Female 3 Pocket Walk 93 Run 0 Walk 2 Run 98 Walk 92 Run 91Bag Walk 75 Run 0 Walk 2 Run 99 Walk 57 Run 95Waist 926 06 None 876

Walk accuracy ratemiss rate Pocket 884 0 None 888Bag 892 0 None 716Waist None 984 2 96

Run accuracy ratemiss rate Pocket None 95 48 926Bag None 988 24 954

Table 6 Functions of different pedometers (119874 with119883 without)

Pedometer

Item Mechanicalpedometer MPG-002 3D pedometer PS-10A 3D pedometer for automatic identification

of walking and running motions

Fixed to waist 119874 119874 O(936) (924) (96)

In pocket 119874 119874 O(89) (948) (856)

In bag horizontally (arbitraryplacement)

119883 119874 O(04) (962) (938)

Detection of small step ofwalk and stop

119874 119883 O(912) (154) (888)

Identification of walk and run 119883 119883O

(716sim988)Real-time display of currentmotion state 119883 119883

O(rest walk run)

716 to 96Thepedometerworn around thewaist achievedthe highest average detection accuracy rate followed by thatin the pocket The pedometer placed horizontally in thebackpack exhibited the worst accuracy rate among the threepedometer-wearing modes

The average walking mode misjudgment rates of the 3Dpedometer that automatically identifies walking and runningmotions in different wearing modes were observed to belower than 5 according to the experimental aforementionedresults The misjudgment rate was calculated using (12) Theaverage accuracy rates were higher than 70 except for the

instances in which the pedometer was placed horizontallyin the backpack and during the alternate walk and runexperiment The average accuracy rates were higher than87 in these cases proving that this pedometer accuratelyidentified walking and running motions Consider

misjudgment rate =misjudged stepsactual steps

times 100 (12)

Table 6 lists the functions of the mechanical MPG-002pedometer 3D PS-10A pedometer and 3D pedometer thatautomatically identifies walking and running motions The

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 7: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

International Journal of Antennas and Propagation 7

System start

Load the acceleration valueCalculate gravity componentPlacement state positioning

Calculate the acceleration agin gravity direction

ag gt threshold

Whether reverseacceleration ag is

generated within halfsecond

Whether reverseacceleration ag is

greater than thresholdwithin half second

Whether accelerationag returns to 0G within

half second

Make sure walk a step

Number of steps + 1

Placement angle haschanged

Relocation is required

Stationary state

Yes

Yes

Yes

Yes

No

No

No

Figure 7 Step-detection algorithm with relocation function

Table 2 Thresholds selected for different smoothing techniques

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Threshold 018 014 014 004 008 018

8 International Journal of Antennas and Propagation

Table 3 Walking and running thresholds for different smoothing techniques and their accuracy rates

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Walk 018 014 014 004 008 018Run 046 046 046 022 04 046Accuracy 97 99 99 815 995 995

System start

Stationary mode

Stationary mode

Walk mode

Walk mode

Run mode

Run mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) The walk mode is entered if there are two consecutive stepsexceeding the run threshold

(3) None of above Maintain stationary mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the walk threshold then maintaining walk mode

(3) One of the consecutive steps not exceeding the walk thresholdthen back to stationary mode

(1) The walk mode is entered if there are two consecutive stepsexceeding the walk threshold but not exceeding run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the run threshold then maintaining run mode

(3) One of the consecutive steps not exceeding the run thresholdthen back to stationary mode

Figure 8 System block diagram of the walking and running mode switching system

data not processed using a smoothing technique remained ashigh as 12 and 24 respectively The misjudgment rates ofboth methods compared with the remaining samples wererelatively high Thus the two signal processing modes wereexcluded in this study

An experiment regarding the accuracy rates of walkingand running alternation was conducted Ten walking stepsand 10 running steps were taken alternately until the numberof steps of each motion reached 100 for a total of 200steps The 3-point average Hanning filter 5-point weightedaverage and 5-point triple smoothing methods and themode switching algorithm were used to count the stepsduring signal processing The running accuracy rates of thefour smoothing modes were higher than 92 on averageRegarding walking which is likely to be misjudged the 5-point weighted average method exhibited the highest averageaccuracy rate of 89 Thus the 5-point weighted averagemethod was used for signal smoothing

5 Experimental Results and Analysis

Four experiments were conducted to assess a pedometerpositioned at arbitrary angles The pedometer was worn inthree different places for the first three experiments namelyaround the waist in a trouser pocket and horizontally in a

backpack The user walked 100 continual steps along a corri-dor The pedometer was attached to the waist for the fourthexperiment The user walked and stopped walking at will for100 steps to validate the proposed pedometerThe pedometerwas able to accurately detect the number of steps even thoughthe user walked and stopped walking occasionally unlikethe 7-second misjudgment prevention system of current 3Dpedometers The experimental environment is described asfollows

(1) Experimental site a corridor approximately 5m longand approximately 1m wide

(2) Pedometers the three pedometers used were (a) a3D pedometer that automatically identifies walkingand runningmotions whichwas designed and imple-mented in this study (b) a conventional mechanicalMPG-002 pedometer developed by Nintendo and (c)a 3D PS-10A pedometer available on the market andproduced by Pursun

(3) Experimental subjects three females and two malesfor a total of five subjects

Table 4 lists the experimental results The average accu-racy rates of the three pedometers fixed to the waist werehigher than 90The accuracy rate of the proposed pedome-ter decreased to 85 when the pedometer was placed in

International Journal of Antennas and Propagation 9

Table 4 Results of experiments on the pedometer positioned at arbitrary angles

Item Location and actionmode

Mechanical pedometerMPG-002 3D pedometer PS-10A 3D pedometer for automatic

identification

Male 1

Waist 103 98 Walk 103 Run 0Pocket 99 109 Walk 132 Run 0Bag 2 97 Walk 111 Run 0

Walk stop 97 26 Walk 114 Run 0

Male 2

Waist 98 101 Walk 103 Run 0Pocket 95 98 Walk 123 Run 4Bag 0 101 Walk 92 Run 0

Walk stop 95 12 Walk 117 Run 0

Female 1

Waist 84 95 Walk 104 Run 0Pocket 72 94 Walk 100 Run 0Bag 0 97 Walk 92 Run 0

Walk stop 85 0 Walk 89 Run 0

Female 2

Waist 92 84 Walk 102 Run 0Pocket 91 94 Walk 96 Run 0Bag 0 99 Walk 101 Run 0

Walk stop 96 30 Walk 112 Run 0

Female 3

Waist 97 86 Walk 108 Run 0Pocket 88 97 Walk 109 Run 0Bag 0 89 Walk 103 Run 0

Walk stop 83 9 Walk 102 Run 0

Average accuracyrate

Waist 936 924 96Pocket 89 948 856Bag 04 962 938

Walk stop 912 154 888

the pocket because the pockets of Male 1 and Male 2were large increasing inertial vibration and the number ofdetected steps Only one direction was detected when thepedometer was placed horizontally in the bag because themechanical pedometer used a mechanical spring mechanismin detection thus the number of steps could not be detectednormally The average accuracy rates of the 3D pedometerand the 3D pedometer that automatically identifies walkingand running motions were higher than 90 Finally thewalking and stopping experiment for a small number of stepswas conducted The misjudgment prevention mechanismfails in most generic 3D pedometers when users take only asmall number of steps when walking and stopping becausea short time threshold is used as a misjudgment preventionmechanism This experiment proved that the 3D pedometerthat automatically identifies walking and running motionswhich was developed in this study can resolve the defectThe experimental results suggested that the average accuracyrate of the 3D PS-10A pedometer was only 15 in the walkand stop experiment whereas the accuracy rate of the 3Dpedometer that automatically identifies walking and runningmotions was 888

Finally the step counting system for walking and run-ning recognition was tested The five subjects wore the 3Dpedometer that automatically identifies walking and running

motions The walkrun mode switching algorithm was usedto prove that this pedometer can recognize the number ofwalking and running steps taken by a user The experimentalmethod is described in detail as follows The walk and runalternating mode was defined as walking 10 steps beforerunning 10 steps This process was alternated until 100 stepsof each motion were taken for a total of 200 steps

(1) Experiment 1 the user wears the pedometer aroundthewaist and alternatelywalks and runs along the cor-ridor One hundred steps are taken for each motion

(2) Experiment 2 the user places the pedometer in apocket and alternately walks and runs along the cor-ridor One hundred steps are taken for each motion

(3) Experiment 3 the user places the pedometer horizon-tally in the backpack and alternately walks and runsalong the corridor One hundred steps are taken foreach motion

Table 5 lists the experimental results The average detec-tion accuracy rate for the simple running experiment wasthe highest of the three walking-mode detection accuracyrates at 95 to 988 The detection accuracy rate of thesimple walking experiment was 884 to 926 and that ofthe alternate walk and run experiment was the poorest at

10 International Journal of Antennas and Propagation

Table 5 Results of the experiments on the step counting system in walking and running recognition

Item Mode Walk 100 steps Run 100 steps Walk 100 steps and run 100 stepsWaist Walk 107 Run 0 Walk 2 Run 99 Walk 119 Run 100

Male 1 Pocket Walk 80 Run 0 Walk 2 Run 98 Walk 120 run 90Bag Walk 86 Run 0 Walk 4 Run 98 Walk 78 Run 94Waist Walk 102 Run 3 Walk 2 Run 98 Walk 114 Run 100

Male 2 Pocket Walk 85 Run 0 Walk 2 Run 98 Walk 100 Run 97Bag Walk 90 Run 0 Walk 2 Run 99 Walk 72 Run 95Waist Walk 87 Run 0 Walk 2 Run 98 Walk 90 Run 83

Female 1 Pocket Walk 89 Run 0 Walk 9 Run 91 Walk 86 Run 92Bag Walk 99 Run 0 Walk 2 Run 99 Walk 85 Run 95Waist Walk 88 Run 0 Walk 2 Run 99 Walk 88 Run 100

Female 2 Pocket Walk 105 Run 0 Walk 9 Run 90 Walk 86 Run 93Bag Walk 96 Run 0 Walk 2 Run 99 Walk 66 Run 98Waist Walk 103 Run 0 Walk 2 Run 98 Walk 107 Run 97

Female 3 Pocket Walk 93 Run 0 Walk 2 Run 98 Walk 92 Run 91Bag Walk 75 Run 0 Walk 2 Run 99 Walk 57 Run 95Waist 926 06 None 876

Walk accuracy ratemiss rate Pocket 884 0 None 888Bag 892 0 None 716Waist None 984 2 96

Run accuracy ratemiss rate Pocket None 95 48 926Bag None 988 24 954

Table 6 Functions of different pedometers (119874 with119883 without)

Pedometer

Item Mechanicalpedometer MPG-002 3D pedometer PS-10A 3D pedometer for automatic identification

of walking and running motions

Fixed to waist 119874 119874 O(936) (924) (96)

In pocket 119874 119874 O(89) (948) (856)

In bag horizontally (arbitraryplacement)

119883 119874 O(04) (962) (938)

Detection of small step ofwalk and stop

119874 119883 O(912) (154) (888)

Identification of walk and run 119883 119883O

(716sim988)Real-time display of currentmotion state 119883 119883

O(rest walk run)

716 to 96Thepedometerworn around thewaist achievedthe highest average detection accuracy rate followed by thatin the pocket The pedometer placed horizontally in thebackpack exhibited the worst accuracy rate among the threepedometer-wearing modes

The average walking mode misjudgment rates of the 3Dpedometer that automatically identifies walking and runningmotions in different wearing modes were observed to belower than 5 according to the experimental aforementionedresults The misjudgment rate was calculated using (12) Theaverage accuracy rates were higher than 70 except for the

instances in which the pedometer was placed horizontallyin the backpack and during the alternate walk and runexperiment The average accuracy rates were higher than87 in these cases proving that this pedometer accuratelyidentified walking and running motions Consider

misjudgment rate =misjudged stepsactual steps

times 100 (12)

Table 6 lists the functions of the mechanical MPG-002pedometer 3D PS-10A pedometer and 3D pedometer thatautomatically identifies walking and running motions The

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 8: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

8 International Journal of Antennas and Propagation

Table 3 Walking and running thresholds for different smoothing techniques and their accuracy rates

Original Three-point averagemethod Hanning filter Hanning recursive

smoothing techniqueFive-point weightedaverage method

Five-point triplesmoothing

Walk 018 014 014 004 008 018Run 046 046 046 022 04 046Accuracy 97 99 99 815 995 995

System start

Stationary mode

Stationary mode

Walk mode

Walk mode

Run mode

Run mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) The walk mode is entered if there are two consecutive stepsexceeding the run threshold

(3) None of above Maintain stationary mode

(1) The run mode is entered if there are two consecutive stepsexceeding the run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the walk threshold then maintaining walk mode

(3) One of the consecutive steps not exceeding the walk thresholdthen back to stationary mode

(1) The walk mode is entered if there are two consecutive stepsexceeding the walk threshold but not exceeding run threshold

(2) Failed to meet condition 1 but there are two consecutive stepsexceeding the run threshold then maintaining run mode

(3) One of the consecutive steps not exceeding the run thresholdthen back to stationary mode

Figure 8 System block diagram of the walking and running mode switching system

data not processed using a smoothing technique remained ashigh as 12 and 24 respectively The misjudgment rates ofboth methods compared with the remaining samples wererelatively high Thus the two signal processing modes wereexcluded in this study

An experiment regarding the accuracy rates of walkingand running alternation was conducted Ten walking stepsand 10 running steps were taken alternately until the numberof steps of each motion reached 100 for a total of 200steps The 3-point average Hanning filter 5-point weightedaverage and 5-point triple smoothing methods and themode switching algorithm were used to count the stepsduring signal processing The running accuracy rates of thefour smoothing modes were higher than 92 on averageRegarding walking which is likely to be misjudged the 5-point weighted average method exhibited the highest averageaccuracy rate of 89 Thus the 5-point weighted averagemethod was used for signal smoothing

5 Experimental Results and Analysis

Four experiments were conducted to assess a pedometerpositioned at arbitrary angles The pedometer was worn inthree different places for the first three experiments namelyaround the waist in a trouser pocket and horizontally in a

backpack The user walked 100 continual steps along a corri-dor The pedometer was attached to the waist for the fourthexperiment The user walked and stopped walking at will for100 steps to validate the proposed pedometerThe pedometerwas able to accurately detect the number of steps even thoughthe user walked and stopped walking occasionally unlikethe 7-second misjudgment prevention system of current 3Dpedometers The experimental environment is described asfollows

(1) Experimental site a corridor approximately 5m longand approximately 1m wide

(2) Pedometers the three pedometers used were (a) a3D pedometer that automatically identifies walkingand runningmotions whichwas designed and imple-mented in this study (b) a conventional mechanicalMPG-002 pedometer developed by Nintendo and (c)a 3D PS-10A pedometer available on the market andproduced by Pursun

(3) Experimental subjects three females and two malesfor a total of five subjects

Table 4 lists the experimental results The average accu-racy rates of the three pedometers fixed to the waist werehigher than 90The accuracy rate of the proposed pedome-ter decreased to 85 when the pedometer was placed in

International Journal of Antennas and Propagation 9

Table 4 Results of experiments on the pedometer positioned at arbitrary angles

Item Location and actionmode

Mechanical pedometerMPG-002 3D pedometer PS-10A 3D pedometer for automatic

identification

Male 1

Waist 103 98 Walk 103 Run 0Pocket 99 109 Walk 132 Run 0Bag 2 97 Walk 111 Run 0

Walk stop 97 26 Walk 114 Run 0

Male 2

Waist 98 101 Walk 103 Run 0Pocket 95 98 Walk 123 Run 4Bag 0 101 Walk 92 Run 0

Walk stop 95 12 Walk 117 Run 0

Female 1

Waist 84 95 Walk 104 Run 0Pocket 72 94 Walk 100 Run 0Bag 0 97 Walk 92 Run 0

Walk stop 85 0 Walk 89 Run 0

Female 2

Waist 92 84 Walk 102 Run 0Pocket 91 94 Walk 96 Run 0Bag 0 99 Walk 101 Run 0

Walk stop 96 30 Walk 112 Run 0

Female 3

Waist 97 86 Walk 108 Run 0Pocket 88 97 Walk 109 Run 0Bag 0 89 Walk 103 Run 0

Walk stop 83 9 Walk 102 Run 0

Average accuracyrate

Waist 936 924 96Pocket 89 948 856Bag 04 962 938

Walk stop 912 154 888

the pocket because the pockets of Male 1 and Male 2were large increasing inertial vibration and the number ofdetected steps Only one direction was detected when thepedometer was placed horizontally in the bag because themechanical pedometer used a mechanical spring mechanismin detection thus the number of steps could not be detectednormally The average accuracy rates of the 3D pedometerand the 3D pedometer that automatically identifies walkingand running motions were higher than 90 Finally thewalking and stopping experiment for a small number of stepswas conducted The misjudgment prevention mechanismfails in most generic 3D pedometers when users take only asmall number of steps when walking and stopping becausea short time threshold is used as a misjudgment preventionmechanism This experiment proved that the 3D pedometerthat automatically identifies walking and running motionswhich was developed in this study can resolve the defectThe experimental results suggested that the average accuracyrate of the 3D PS-10A pedometer was only 15 in the walkand stop experiment whereas the accuracy rate of the 3Dpedometer that automatically identifies walking and runningmotions was 888

Finally the step counting system for walking and run-ning recognition was tested The five subjects wore the 3Dpedometer that automatically identifies walking and running

motions The walkrun mode switching algorithm was usedto prove that this pedometer can recognize the number ofwalking and running steps taken by a user The experimentalmethod is described in detail as follows The walk and runalternating mode was defined as walking 10 steps beforerunning 10 steps This process was alternated until 100 stepsof each motion were taken for a total of 200 steps

(1) Experiment 1 the user wears the pedometer aroundthewaist and alternatelywalks and runs along the cor-ridor One hundred steps are taken for each motion

(2) Experiment 2 the user places the pedometer in apocket and alternately walks and runs along the cor-ridor One hundred steps are taken for each motion

(3) Experiment 3 the user places the pedometer horizon-tally in the backpack and alternately walks and runsalong the corridor One hundred steps are taken foreach motion

Table 5 lists the experimental results The average detec-tion accuracy rate for the simple running experiment wasthe highest of the three walking-mode detection accuracyrates at 95 to 988 The detection accuracy rate of thesimple walking experiment was 884 to 926 and that ofthe alternate walk and run experiment was the poorest at

10 International Journal of Antennas and Propagation

Table 5 Results of the experiments on the step counting system in walking and running recognition

Item Mode Walk 100 steps Run 100 steps Walk 100 steps and run 100 stepsWaist Walk 107 Run 0 Walk 2 Run 99 Walk 119 Run 100

Male 1 Pocket Walk 80 Run 0 Walk 2 Run 98 Walk 120 run 90Bag Walk 86 Run 0 Walk 4 Run 98 Walk 78 Run 94Waist Walk 102 Run 3 Walk 2 Run 98 Walk 114 Run 100

Male 2 Pocket Walk 85 Run 0 Walk 2 Run 98 Walk 100 Run 97Bag Walk 90 Run 0 Walk 2 Run 99 Walk 72 Run 95Waist Walk 87 Run 0 Walk 2 Run 98 Walk 90 Run 83

Female 1 Pocket Walk 89 Run 0 Walk 9 Run 91 Walk 86 Run 92Bag Walk 99 Run 0 Walk 2 Run 99 Walk 85 Run 95Waist Walk 88 Run 0 Walk 2 Run 99 Walk 88 Run 100

Female 2 Pocket Walk 105 Run 0 Walk 9 Run 90 Walk 86 Run 93Bag Walk 96 Run 0 Walk 2 Run 99 Walk 66 Run 98Waist Walk 103 Run 0 Walk 2 Run 98 Walk 107 Run 97

Female 3 Pocket Walk 93 Run 0 Walk 2 Run 98 Walk 92 Run 91Bag Walk 75 Run 0 Walk 2 Run 99 Walk 57 Run 95Waist 926 06 None 876

Walk accuracy ratemiss rate Pocket 884 0 None 888Bag 892 0 None 716Waist None 984 2 96

Run accuracy ratemiss rate Pocket None 95 48 926Bag None 988 24 954

Table 6 Functions of different pedometers (119874 with119883 without)

Pedometer

Item Mechanicalpedometer MPG-002 3D pedometer PS-10A 3D pedometer for automatic identification

of walking and running motions

Fixed to waist 119874 119874 O(936) (924) (96)

In pocket 119874 119874 O(89) (948) (856)

In bag horizontally (arbitraryplacement)

119883 119874 O(04) (962) (938)

Detection of small step ofwalk and stop

119874 119883 O(912) (154) (888)

Identification of walk and run 119883 119883O

(716sim988)Real-time display of currentmotion state 119883 119883

O(rest walk run)

716 to 96Thepedometerworn around thewaist achievedthe highest average detection accuracy rate followed by thatin the pocket The pedometer placed horizontally in thebackpack exhibited the worst accuracy rate among the threepedometer-wearing modes

The average walking mode misjudgment rates of the 3Dpedometer that automatically identifies walking and runningmotions in different wearing modes were observed to belower than 5 according to the experimental aforementionedresults The misjudgment rate was calculated using (12) Theaverage accuracy rates were higher than 70 except for the

instances in which the pedometer was placed horizontallyin the backpack and during the alternate walk and runexperiment The average accuracy rates were higher than87 in these cases proving that this pedometer accuratelyidentified walking and running motions Consider

misjudgment rate =misjudged stepsactual steps

times 100 (12)

Table 6 lists the functions of the mechanical MPG-002pedometer 3D PS-10A pedometer and 3D pedometer thatautomatically identifies walking and running motions The

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 9: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

International Journal of Antennas and Propagation 9

Table 4 Results of experiments on the pedometer positioned at arbitrary angles

Item Location and actionmode

Mechanical pedometerMPG-002 3D pedometer PS-10A 3D pedometer for automatic

identification

Male 1

Waist 103 98 Walk 103 Run 0Pocket 99 109 Walk 132 Run 0Bag 2 97 Walk 111 Run 0

Walk stop 97 26 Walk 114 Run 0

Male 2

Waist 98 101 Walk 103 Run 0Pocket 95 98 Walk 123 Run 4Bag 0 101 Walk 92 Run 0

Walk stop 95 12 Walk 117 Run 0

Female 1

Waist 84 95 Walk 104 Run 0Pocket 72 94 Walk 100 Run 0Bag 0 97 Walk 92 Run 0

Walk stop 85 0 Walk 89 Run 0

Female 2

Waist 92 84 Walk 102 Run 0Pocket 91 94 Walk 96 Run 0Bag 0 99 Walk 101 Run 0

Walk stop 96 30 Walk 112 Run 0

Female 3

Waist 97 86 Walk 108 Run 0Pocket 88 97 Walk 109 Run 0Bag 0 89 Walk 103 Run 0

Walk stop 83 9 Walk 102 Run 0

Average accuracyrate

Waist 936 924 96Pocket 89 948 856Bag 04 962 938

Walk stop 912 154 888

the pocket because the pockets of Male 1 and Male 2were large increasing inertial vibration and the number ofdetected steps Only one direction was detected when thepedometer was placed horizontally in the bag because themechanical pedometer used a mechanical spring mechanismin detection thus the number of steps could not be detectednormally The average accuracy rates of the 3D pedometerand the 3D pedometer that automatically identifies walkingand running motions were higher than 90 Finally thewalking and stopping experiment for a small number of stepswas conducted The misjudgment prevention mechanismfails in most generic 3D pedometers when users take only asmall number of steps when walking and stopping becausea short time threshold is used as a misjudgment preventionmechanism This experiment proved that the 3D pedometerthat automatically identifies walking and running motionswhich was developed in this study can resolve the defectThe experimental results suggested that the average accuracyrate of the 3D PS-10A pedometer was only 15 in the walkand stop experiment whereas the accuracy rate of the 3Dpedometer that automatically identifies walking and runningmotions was 888

Finally the step counting system for walking and run-ning recognition was tested The five subjects wore the 3Dpedometer that automatically identifies walking and running

motions The walkrun mode switching algorithm was usedto prove that this pedometer can recognize the number ofwalking and running steps taken by a user The experimentalmethod is described in detail as follows The walk and runalternating mode was defined as walking 10 steps beforerunning 10 steps This process was alternated until 100 stepsof each motion were taken for a total of 200 steps

(1) Experiment 1 the user wears the pedometer aroundthewaist and alternatelywalks and runs along the cor-ridor One hundred steps are taken for each motion

(2) Experiment 2 the user places the pedometer in apocket and alternately walks and runs along the cor-ridor One hundred steps are taken for each motion

(3) Experiment 3 the user places the pedometer horizon-tally in the backpack and alternately walks and runsalong the corridor One hundred steps are taken foreach motion

Table 5 lists the experimental results The average detec-tion accuracy rate for the simple running experiment wasthe highest of the three walking-mode detection accuracyrates at 95 to 988 The detection accuracy rate of thesimple walking experiment was 884 to 926 and that ofthe alternate walk and run experiment was the poorest at

10 International Journal of Antennas and Propagation

Table 5 Results of the experiments on the step counting system in walking and running recognition

Item Mode Walk 100 steps Run 100 steps Walk 100 steps and run 100 stepsWaist Walk 107 Run 0 Walk 2 Run 99 Walk 119 Run 100

Male 1 Pocket Walk 80 Run 0 Walk 2 Run 98 Walk 120 run 90Bag Walk 86 Run 0 Walk 4 Run 98 Walk 78 Run 94Waist Walk 102 Run 3 Walk 2 Run 98 Walk 114 Run 100

Male 2 Pocket Walk 85 Run 0 Walk 2 Run 98 Walk 100 Run 97Bag Walk 90 Run 0 Walk 2 Run 99 Walk 72 Run 95Waist Walk 87 Run 0 Walk 2 Run 98 Walk 90 Run 83

Female 1 Pocket Walk 89 Run 0 Walk 9 Run 91 Walk 86 Run 92Bag Walk 99 Run 0 Walk 2 Run 99 Walk 85 Run 95Waist Walk 88 Run 0 Walk 2 Run 99 Walk 88 Run 100

Female 2 Pocket Walk 105 Run 0 Walk 9 Run 90 Walk 86 Run 93Bag Walk 96 Run 0 Walk 2 Run 99 Walk 66 Run 98Waist Walk 103 Run 0 Walk 2 Run 98 Walk 107 Run 97

Female 3 Pocket Walk 93 Run 0 Walk 2 Run 98 Walk 92 Run 91Bag Walk 75 Run 0 Walk 2 Run 99 Walk 57 Run 95Waist 926 06 None 876

Walk accuracy ratemiss rate Pocket 884 0 None 888Bag 892 0 None 716Waist None 984 2 96

Run accuracy ratemiss rate Pocket None 95 48 926Bag None 988 24 954

Table 6 Functions of different pedometers (119874 with119883 without)

Pedometer

Item Mechanicalpedometer MPG-002 3D pedometer PS-10A 3D pedometer for automatic identification

of walking and running motions

Fixed to waist 119874 119874 O(936) (924) (96)

In pocket 119874 119874 O(89) (948) (856)

In bag horizontally (arbitraryplacement)

119883 119874 O(04) (962) (938)

Detection of small step ofwalk and stop

119874 119883 O(912) (154) (888)

Identification of walk and run 119883 119883O

(716sim988)Real-time display of currentmotion state 119883 119883

O(rest walk run)

716 to 96Thepedometerworn around thewaist achievedthe highest average detection accuracy rate followed by thatin the pocket The pedometer placed horizontally in thebackpack exhibited the worst accuracy rate among the threepedometer-wearing modes

The average walking mode misjudgment rates of the 3Dpedometer that automatically identifies walking and runningmotions in different wearing modes were observed to belower than 5 according to the experimental aforementionedresults The misjudgment rate was calculated using (12) Theaverage accuracy rates were higher than 70 except for the

instances in which the pedometer was placed horizontallyin the backpack and during the alternate walk and runexperiment The average accuracy rates were higher than87 in these cases proving that this pedometer accuratelyidentified walking and running motions Consider

misjudgment rate =misjudged stepsactual steps

times 100 (12)

Table 6 lists the functions of the mechanical MPG-002pedometer 3D PS-10A pedometer and 3D pedometer thatautomatically identifies walking and running motions The

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 10: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

10 International Journal of Antennas and Propagation

Table 5 Results of the experiments on the step counting system in walking and running recognition

Item Mode Walk 100 steps Run 100 steps Walk 100 steps and run 100 stepsWaist Walk 107 Run 0 Walk 2 Run 99 Walk 119 Run 100

Male 1 Pocket Walk 80 Run 0 Walk 2 Run 98 Walk 120 run 90Bag Walk 86 Run 0 Walk 4 Run 98 Walk 78 Run 94Waist Walk 102 Run 3 Walk 2 Run 98 Walk 114 Run 100

Male 2 Pocket Walk 85 Run 0 Walk 2 Run 98 Walk 100 Run 97Bag Walk 90 Run 0 Walk 2 Run 99 Walk 72 Run 95Waist Walk 87 Run 0 Walk 2 Run 98 Walk 90 Run 83

Female 1 Pocket Walk 89 Run 0 Walk 9 Run 91 Walk 86 Run 92Bag Walk 99 Run 0 Walk 2 Run 99 Walk 85 Run 95Waist Walk 88 Run 0 Walk 2 Run 99 Walk 88 Run 100

Female 2 Pocket Walk 105 Run 0 Walk 9 Run 90 Walk 86 Run 93Bag Walk 96 Run 0 Walk 2 Run 99 Walk 66 Run 98Waist Walk 103 Run 0 Walk 2 Run 98 Walk 107 Run 97

Female 3 Pocket Walk 93 Run 0 Walk 2 Run 98 Walk 92 Run 91Bag Walk 75 Run 0 Walk 2 Run 99 Walk 57 Run 95Waist 926 06 None 876

Walk accuracy ratemiss rate Pocket 884 0 None 888Bag 892 0 None 716Waist None 984 2 96

Run accuracy ratemiss rate Pocket None 95 48 926Bag None 988 24 954

Table 6 Functions of different pedometers (119874 with119883 without)

Pedometer

Item Mechanicalpedometer MPG-002 3D pedometer PS-10A 3D pedometer for automatic identification

of walking and running motions

Fixed to waist 119874 119874 O(936) (924) (96)

In pocket 119874 119874 O(89) (948) (856)

In bag horizontally (arbitraryplacement)

119883 119874 O(04) (962) (938)

Detection of small step ofwalk and stop

119874 119883 O(912) (154) (888)

Identification of walk and run 119883 119883O

(716sim988)Real-time display of currentmotion state 119883 119883

O(rest walk run)

716 to 96Thepedometerworn around thewaist achievedthe highest average detection accuracy rate followed by thatin the pocket The pedometer placed horizontally in thebackpack exhibited the worst accuracy rate among the threepedometer-wearing modes

The average walking mode misjudgment rates of the 3Dpedometer that automatically identifies walking and runningmotions in different wearing modes were observed to belower than 5 according to the experimental aforementionedresults The misjudgment rate was calculated using (12) Theaverage accuracy rates were higher than 70 except for the

instances in which the pedometer was placed horizontallyin the backpack and during the alternate walk and runexperiment The average accuracy rates were higher than87 in these cases proving that this pedometer accuratelyidentified walking and running motions Consider

misjudgment rate =misjudged stepsactual steps

times 100 (12)

Table 6 lists the functions of the mechanical MPG-002pedometer 3D PS-10A pedometer and 3D pedometer thatautomatically identifies walking and running motions The

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 11: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

International Journal of Antennas and Propagation 11

variable 119874 represents the successful demonstration of afunction and 119883 represents the lack of a function or failureto demonstrate the function

Table 6 shows that the 3D pedometer that automaticallyidentifies walking and running motions possesses the arbi-trary placement function that the mechanical pedometerdoes not possess The proposed pedometer can detect smallnumbers of walking steps and stopping which generic 3Dpedometers are unable to detect This pedometer can alsoidentify walking and running motions and immediatelydisplay the userrsquos motion state The pedometer remains to beoptimized regarding accuracy rate because it failed to obtainthe 90 accuracy rate for certain functionsThis problem canbe improved in the future

6 Conclusion

A 3D pedometer that automatically identifies walking andrunning motions was implemented in this study by using athree-axis accelerometer The angles between the three axesand the horizontal plane were obtained according to a gravitycomponent The acceleration change in the motion directionperpendicular to the ground was obtained Different signalsmoothing processing modes and thresholds were used tofilter the number of steps to implement the step countingfunction of this device at arbitrary angles Running thresholdfiltering was proposed to calculate the number of stepsseparately and a walkrun mode switching algorithm wasused Five users were tested using three wearing modes toprove that this systemcanbe placedwherever the user prefersThe walk and run detection accuracy rate of the proposedpedometer was 716 to 988 and its misjudgment ratewas lower than 5 Thus the number of walking steps andthe number of running steps were successfully calculatedseparately The 3D pedometer that automatically identifieswalking and runningmotions remedies the defects in genericpedometers currently available on the market

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by theNational Science CouncilTaiwan under Grant NSC 102-2221-E-152-007

References

[1] C C ShihThe implementation of a G-sensdor-based pedometer[MS thesis] Department of Computer Science and informa-tion Engineering National Central University 2010

[2] P H Veltink H B J Bussmann W de Vries W L J Martensand R C van Lummel ldquoDetection of static and dynamic activ-ities using uniaxial accelerometersrdquo IEEE Transactions on Reha-bilitation Engineering vol 4 no 4 pp 375ndash385 1996

[3] J Mantyjarvi J Himberg and T Seppanen ldquoRecognizinghuman motion with multiple acceleration sensorsrdquo in Proceed-ings of the IEEE International Conference on Systems Man andCybernetics pp 747ndash752 October 2001

[4] H J Luinge and P H Veltink ldquoInclination measurement ofhuman movement using a 3-D accelerometer with autocalibra-tionrdquo IEEE Transactions on Neural Systems and RehabilitationEngineering vol 12 no 1 pp 112ndash121 2004

[5] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[6] A M Khan Y K Lee and S Y Lee ldquoAccelerometerrsquos positionfree human activity recognition using a hierarchical recognitionmodelrdquo in Proceedings of the 12th IEEE International Conferenceon e-Health Networking Application and Services pp 296ndash301July 2010

[7] ldquoFreescale Semiconductor Data Sheet MMA8452Qrdquo 2013httpwwwfreescalecomfilessensorsdocdata sheetMMA8452Qpdf

[8] ldquoMegawin Data Sheet MPC82G516rdquo 2007 httpwwwmeg-awincomtwUploadFilesMPC82G516A A5pdf

[9] M Rangayyan Biomedical Signal Analysis A Case-StudyApproach Wiley-IEEE Press New York NY USA 2001

[10] S Miaozhong ldquoSmooth processing methods of vibration signalbased on MATLABrdquo Electronic Measurement Technology vol30 no 6 2007

[11] M N Nyan F E H Tay and M Z E Mah ldquoApplication ofmotion analysis system in pre-impact fall detectionrdquo Journal ofBiomechanics vol 41 no 10 pp 2297ndash2304 2008

[12] T Zhang J Wang P Liu and J Hou ldquoFall detection by embed-ding an accelerometer in cellphone and using KFD algorithmrdquoInternational Journal of Computer Science andNetwork Securityvol 6 no 10 2006

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 12: Research Article Implementation of a Three-Dimensional ...downloads.hindawi.com/journals/ijap/2014/372814.pdfInternationalJournal of Antennas and Propagation 80C51CPU 10 k 10 k G-sensor

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of