CN107462258A - A kind of step-recording method based on mobile phone 3-axis acceleration sensor - Google Patents
A kind of step-recording method based on mobile phone 3-axis acceleration sensor Download PDFInfo
- Publication number
- CN107462258A CN107462258A CN201710569013.4A CN201710569013A CN107462258A CN 107462258 A CN107462258 A CN 107462258A CN 201710569013 A CN201710569013 A CN 201710569013A CN 107462258 A CN107462258 A CN 107462258A
- Authority
- CN
- China
- Prior art keywords
- data
- calculation window
- crest
- mobile phone
- waveform
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000001133 acceleration Effects 0.000 title claims abstract description 131
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000004364 calculation method Methods 0.000 claims abstract description 83
- 238000000605 extraction Methods 0.000 claims abstract description 14
- 238000005070 sampling Methods 0.000 claims description 44
- 238000009499 grossing Methods 0.000 claims description 6
- 230000003068 static effect Effects 0.000 claims description 6
- 238000013528 artificial neural network Methods 0.000 claims description 5
- 230000004069 differentiation Effects 0.000 claims description 4
- 230000004913 activation Effects 0.000 claims description 3
- 239000000203 mixture Substances 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 3
- 230000007935 neutral effect Effects 0.000 claims 1
- 230000000875 corresponding effect Effects 0.000 description 13
- 238000012913 prioritisation Methods 0.000 description 6
- 239000000284 extract Substances 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000036541 health Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 238000004321 preservation Methods 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 210000004744 fore-foot Anatomy 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C22/00—Measuring distance traversed on the ground by vehicles, persons, animals or other moving solid bodies, e.g. using odometers, using pedometers
- G01C22/006—Pedometers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72457—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to geographic location
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/12—Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
Landscapes
- Engineering & Computer Science (AREA)
- Environmental & Geological Engineering (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a kind of step-recording method based on mobile phone 3-axis acceleration sensor, the method includes the steps of:Data acquisition, three number of axle evidences of 3-axis acceleration sensor are gathered according to calculation window;Data prediction, it is smooth to data progress average value, and ask for resultant acceleration;Feature extraction, the average and variance of data being extracted respectively, the crest number of resultant acceleration, is clustered resultant acceleration using clustering algorithm, extraction cluster centre is as resultant acceleration feature;Position differentiates, feature is classified using sorting algorithm to obtain class label;Waveform Reconstructing, data are split, be reconstructed into four-tuple, data are divided into completed wave one by one;Step number is calculated, and corresponding discrimination threshold is obtained according to classification, and reconstruct data are differentiated using threshold value, classification step number is corresponded to when the condition is satisfied and adds 1.Using the step-recording method of the present invention, the diverse location residing for mobile phone is can recognize that, meter step is more accurate, has stronger anti-interference.
Description
Technical field
The present invention relates to a kind of step-recording method based on mobile phone 3-axis acceleration sensor, belong to consumer applications electronic technology
Field.
Background technology
With the improvement of people's living standards, people have increasingly paid attention to how to carry out rational physical exercise, it is right
Health is monitored in time, and obtaining exercise data in time turns into the primary demand of the vast colony for having deep love for motion.The opposing party
Face, in booming today of Internet of Things, increasing sensor device is applied in wearable device.Smart mobile phone
Monitoring device as typical intelligent wearable device and intelligence has been entered into the life of masses, in this shifting of smart mobile phone
Occurs the application software of many health monitorings and exercise guidance on moving platform, this provides strong thing to obtain health and fitness information
The support of matter and technology.Pedometer is exactly the exemplary of related application.
The equipment that presently, there are many statistics users walking step numbers, but they have some defects.It is existing most
Acceleration signal is obtained by acceleration transducer, then sets whether simple threshold decision resultant acceleration medium wave peak value has
Effect, so as to realize step function.Due to easily occurring spurious peaks in sensor gatherer process, this method is likely to occur erroneous judgement, led
Cause meter step precision relatively low.In addition also have using the periodic characteristics moved, judge that the resultant acceleration waveform of former and later two ripples is similar
Whether degree is in some threshold ranges etc..Because the forms of motion of sporter is varied, for example run, walk, while
During motion, when harvester is placed on the diverse location of body, acceleration change is different, and the similarity of waveform may
It is not high enough.Therefore, step number statistics is carried out using only the periodic characteristic of resultant acceleration data and extraction waveform easily to miss
The situation of meter or leakage meter, existing method also have the place of deficiency.
The content of the invention
The technical problems to be solved by the invention are to provide a kind of step-recording method based on mobile phone 3-axis acceleration sensor,
This method extracts the feature of 3-axis acceleration data and resultant acceleration data, and the number for needing to count step is identified using sorting algorithm
According to by reconstructing the influence that data remove spurious peaks and pseudo- trough is brought, in addition, identification mobile phone is positioned in motion process
Diverse location, set different threshold values to filter the data of diverse location, it is final to improve meter step precision, have higher
Anti-interference.
The present invention uses following technical scheme to solve above-mentioned technical problem
The present invention provides a kind of step-recording method based on mobile phone 3-axis acceleration sensor, comprises the following steps that:
Step 1, sampling calculation window is determined according to setting sample frequency and sampling time window, collection mobile phone three axle accelerates
The 3-axis acceleration data of sensor are spent, each each number of axle sampled in calculation window is 0 according to being numbered according to acquisition order,
1 ..., n-1, wherein, n represents the data amount check of each axle in each sampling calculation window;
Step 2, in each sampling calculation window, the 3-axis acceleration data collected are smoothed respectively,
And the resultant acceleration after calculating smoothly;
Step 3, in each sampling calculation window, 3-axis acceleration data after smooth in step 2 and closing are accelerated
Degree carries out feature extraction, wherein, the average value xMean and variance xVariance of x-axis acceleration are extracted as x-axis data characteristics,
The average value yMean and variance yVariance for extracting y-axis acceleration are averaged as y-axis data characteristics, extraction z-axis acceleration
Value zMean and variance zVariance is as z-axis data characteristics, and resultant acceleration crest number peakCount is as crest for extraction
There is feature;Resultant acceleration data are polymerized to 3 classes using clustering algorithm, respectively to every class resultant acceleration data averaged,
And 3 average values are ranked up as resultant acceleration feature according to descending<ClusterPeak, clusterMean,
clusterThrough>, clusterPeak>clusterMean>clusterThrough;
Step 4, according to the feature extracted in step 3, the class of data collected in each sampling calculation window is judged
Not;
Step 5, if the differentiation result in step 4 is static noise or motion artifacts, present sample calculation window is given up
Interior data, otherwise, Waveform Reconstructing is carried out to the resultant acceleration data in present sample calculation window;Wherein, Waveform Reconstructing
Method is specific as follows:
5.1, the average value of resultant acceleration in present sample calculation window is calculated, present sample is calculated into window using average value
Intraoral resultant acceleration is divided into multiple crest regions and trough region, wherein, crest region and trough institute
It is alternately present in region;
5.2, each crest region is searched for, crest maximum in current crest region is obtained, as the area
The true crest peak in domain, and record true crest corresponding data numbering peakIndex in present sample calculation window;
5.3, the region searched for where each trough, trough minimum in each trough region is obtained, is used as this
The true trough in region, while record true valley value corresponding data in present sample calculation window and number;
5.4, true crest peak and last true trough troughLeft, thereafter first true trough before it
TroughRight and half-wave length halfWaveLength composition reconfiguration waveform four-tuples<peak,troughLeft,
troughRight,halfWaveLength>, the reconstruct of one waveform of completion, halfWaveLength=max |
PeakIndex-troughIndexLeft |, | peakIndex-troughIndexRight |, troughIndexLeft is represented
TroughLeft corresponding datas in present sample calculation window are numbered, and troughIndexRight represents that troughRight exists
Corresponding data is numbered in present sample calculation window;
Step 6, according to the classification that data are collected in present sample calculation window, given threshold four-tuple<
peakThreshold,troughThreshold,maxWaveLength,minWaveLength>, to the weight obtained in step 5
Structure waveform is adjudicated one by one:
6.1, according to the classification that data are collected in present sample calculation window, obtained from predetermined threshold value four-tuple corresponding
Threshold value four-tuple<peakThreshold,troughThreshold,maxWaveLength,minWaveLength>, wherein,
Threshold values of the peakThreshold as true crest, threshold values of the troughThreshold as true trough, maxWaveLength with
And minWaveLength be respectively halfWaveLength maximum can value and minimum can value;
6.2, by the waveform four-tuple of reconfiguration waveform<peak,troughLeft,troughRight,halfWaveLength
>One by one compared with threshold value four-tuple:First, it is determined that true crest, if peak>PeakThreshold then enters in next step, no
The then waveform four-tuple of more next reconfiguration waveform;Then, true trough is judged, if troughLeft<troughThreshold
And troughRight<TroughThreshold then enters in next step, otherwise the waveform four-tuple of more next reconfiguration waveform;
Finally, half-wavelength is judged, if halfWaveLength>MinWaveLength and halfWaveLength<maxWaveLength
Then current reconfiguration waveform is calculated as a step, and the total step number of corresponding data classification adds one;Otherwise the ripple of more next reconfiguration waveform
Shape four-tuple;
Step 7, the step number in each sampling calculation window is separately summed according to different pieces of information classification, that is, realizes meter step.
As the further prioritization scheme of the present invention, each axle of the average value exponential smoothing to three number of axle evidences is used in step 2
Data are smoothed respectively, and smoothing formula is:
Wherein, s is default smooth window size and for even number more than zero, ai+jSampling calculation window before representing smooth
The data that interior numbering is i+j, ai' data that numbering is i in smooth post-sampling calculation window are represented, n represents sampling calculation window
Interior data amount check.
As the further prioritization scheme of the present invention, average value is utilized by present sample time window in step 5.1 in step 5
Intraoral resultant acceleration is divided into crest region and trough region, is specially:By judging whether resultant acceleration is big
Split in average value, when resultant acceleration is more than average value, its region is crest region, when resultant acceleration value
Its region is trough region during less than average value.
As the further prioritization scheme of the present invention, when conjunction last in previous sampling calculation window adds in step 5.4
When a complete waveform four-tuple can not be reconstructed in speed data, the part resultant acceleration data are added to next sampling and counted
The front portion of window is calculated, to ensure the continuity calculated in neighbouring sample calculation window.
As the further prioritization scheme of the present invention, the length windowLength=sample frequencys f* of calculation window is sampled
The length N of sampling time window.
As the further prioritization scheme of the present invention, the class of the data collected in step 4 in each sampling calculation window
Other determination methods are:
4.1, gather mobile phone 3-axis acceleration data respectively according to data category, and spy is carried out according to the method for step 1 to 3
Sign extraction, using the feature extracted as training set, wherein, data category including a) static noise, b) mobile phone coat pocket,
C) mobile phone trouser pocket, d) mobile phone in hand when walking, e) mobile phone in hand when run, f) mobile phone in other positions, g) transport
Moving noise;
4.2, disaggregated model is built, and study is trained to disaggregated model using the training set in step 4.1;
4.3, the classification after the feature input training study that the data collected in each sampling calculation window are extracted
Model, the output of disaggregated model is its corresponding classification.
As the further prioritization scheme of the present invention, the disaggregated model in step 4.2 is three-layer neural network, wherein, the
The activation primitive of one layer and the second layer is band leakage line rectification function, and third layer is using normalization exponential function softmax
Function, three-layer neural network is trained using the stochastic gradient descent algorithm with momentum, loss function is intersection entropy loss
Function.
The present invention compared with prior art, has following technique effect using above technical scheme:
1st, three number of axle evidences of the inventive method collection 3-axis acceleration sensor, extract data characteristics, by sorting algorithm
The differentiation of mobile phone location state is carried out, mobile phone diverse location residing in motion process can be identified, reconstruct data identify
Completed wave, meter step is carried out respectively to different position classifications so that meter step is more accurate;
2nd, the inventive method identifies mobile phone diverse location residing in motion process, and different position classifications can be entered
Row identifies and carries out meter step, meets the needs of user is to different application scene;
3rd, the inventive method identifies real crest and real trough by reconstructing data, remove spurious peaks and
The influence of pseudo- trough, there is stronger anti-interference;
4th, the inventive method is based on cell phone platform, can be used as data acquisition, calculating, storage by the use of the mobile phone carried with
And presentation device, there is 3-axis acceleration sensor in common smart mobile phone, it is practical, there is very strong portability.
Brief description of the drawings
Fig. 1 is the system flow chart of the embodiment of the present invention;
Fig. 2 is the 3-axis acceleration schematic diagram of the embodiment of the present invention;
Fig. 3 is the Waveform Reconstructing flow chart of the embodiment of the present invention;
Fig. 4 is the trough process of analysis figure of the embodiment of the present invention;
Fig. 5 is the step number calculation flow chart of the embodiment of the present invention.
Embodiment
Technical scheme is described in further detail below in conjunction with the accompanying drawings:
As shown in figure 1, giving the system flow of the embodiment of the present invention, comprise the following steps:
101st, data acquisition:Sample frequency and sampling time window including setting mobile phone 3-axis acceleration sensor,
Sampling calculation window is calculated, and stores the value of the 3-axis acceleration collected.Each sample each axle in calculation window
Data are 0,1 according to acquisition order numbering ..., n-1, wherein, n represents the data of each axle in each sampling calculation window
Number.
Sampling calculation window is calculated, formula is:WindowLength=f*N.Wherein, windowLength represents sampling meter
The total length of window is calculated, unit is individual;F represents sample frequency, and unit is hertz;N represents the time span of sampling, and unit is
Second;For example, when f=50 hertz, N=4, windowLength=4*50=200 are obtained, now, when acceleration passes
Sensor when x-axis, y-axis and z-axis collect the data on 200 correspondence directions respectively, close, by data by current calculation window
Next step is delivered to, new calculation window is opened and receives new data.
Three axles of described 3-axis acceleration sensor as shown in Fig. 2 be designated as x-axis, y-axis and z-axis respectively.With screen court
Exemplified by state when upper horizontal positioned, the direction acceleration change situation when x-axis gathers acceleration transducer side-to-side movement;
Acceleration change situation in this direction when y-axis collection acceleration transducer moves forward and backward;The z-axis gathers acceleration sensing
Acceleration change situation in this direction when device moves up and down.
102nd, data prediction:Including being smoothed using average value exponential smoothing to collecting data in 101.Root
The x-axis acceleration in 3-axis acceleration, y-axis acceleration and z-axis acceleration are carried out respectively according to default smooth window coefficient s
Smoothly, smoothing formula is as follows:
Wherein, s is default smooth window size and for even number more than zero, ai+jSampling calculation window before representing smooth
The data that interior numbering is i+j, ai' data that numbering is i in smooth post-sampling calculation window are represented, n represents sampling calculation window
Interior data amount check.
X-axis acceleration, y-axis acceleration and z-axis acceleration calculation resultant acceleration value, formula after will be smooth is as follows:
Wherein, xf、yf、zfX-axis acceleration, y-axis acceleration and z-axis acceleration after respectively smooth.
103rd, feature extraction:The feature of acceleration in current calculation window is extracted, including:3-axis acceleration is extracted respectively to pass
The feature of x-axis in sensor, y-axis and z-axis acceleration magnitude;The feature of three axle resultant acceleration values is extracted, the appearance for extracting crest is special
Sign.
The feature of 3-axis acceleration sensor x-axis, y-axis and z-axis acceleration is extracted respectively, including:Carried in calculation window
The average value xMean and variance xVariance of x-axis acceleration magnitude are taken, respectively as being transported on x-axis direction in current calculation window
Dynamic size characteristic and confusion degree;Similar, the average value yMean and variance of extraction y-axis acceleration magnitude
YVariance, extract the average value zMean and variance zVariance of z-axis acceleration magnitude.Extract in current calculation window and close
Appearance feature of the acceleration crest number as crest, is designated as peakCount;Meanwhile extract the feature of three axle resultant acceleration values.
The feature of three axle resultant acceleration values is extracted, including:It will be closed and accelerated using the clustering algorithm for pre-setting cluster number
Degrees of data is polymerized to 3 classes, will belong to of a sort data respectively and ask for average resultant acceleration value, 3 obtained average values are carried out
Sort from big to small, obtain 3 cluster centres<ClusterPeak, clusterMean, clusterThrough>Add as closing
Velocity characteristic, clusterPeak represent the characteristics of mean of crest, and clusterMean represents the feature near average value,
ClusterThrough represents the characteristics of mean of trough.
The appearance feature peakCount of crest is extracted, calculates the appearance of resultant acceleration value medium wave peak in current calculation window
Number.Crest therein meets equation below:
ah-1<ah
ah+1<ah
Wherein, ahRepresent the resultant acceleration value that data number is h in sampling calculation window, ah-1Represent sampling calculation window
Interior data number be h-1 resultant acceleration value, ah+1Represent the resultant acceleration value that data number is h+1 in sampling calculation window.
Above constitutive characteristic value group
<xMean,xVariance,yMean,yVariance,zMean,zVariance,peakCount,
clusterPeak,clusterMean,clusterThrough>。
104th, the differentiation of data category:According to the feature of the x-axis of extraction, the feature of y-axis, the feature of z-axis, resultant acceleration
The eigenvalue cluster for the calculation window that feature and the appearance feature of crest composition currently gather, is carried out to collection using sorting algorithm
To the classifications of data differentiated.Wherein, the classification of data includes:A) static noise, b) mobile phone is in coat pocket, c) mobile phone
Trouser pocket, d) mobile phone is in hand when walking, e) mobile phone in hand when run, f) mobile phone is in other positions, g) motion artifacts,
This 5 kinds of classifications of b to f represent the position of mobile phone, and f is when mobile phone is positioned over general designation when wrapping the other positions such as interior.
Described sorting algorithm, multilayer neural network is used in the present invention, network is divided into 3 layers, first layer and
Two layers of activation primitive is band leakage line rectification function, and third layer is using normalization exponential function softmax functions.In its instruction
During practicing study, corresponding three number of axle evidence is gathered according to different classifications respectively first, carries out 101,102,103 processing
Feature is extracted, then carries out category label, i.e., the classification progress one-hot encoding residing for encodes to obtain classification according to a to g order
Label, characteristic is input in multilayer neural network with corresponding class label, using the stochastic gradient descent with momentum
Algorithm is trained, and loss function is cross entropy loss function.
105th, Waveform Reconstructing:Classification in 104 differentiates result, and when it is a or g to differentiate result, expression is currently adopted
Data in sample calculation window are invalid data, cast out the data in present sample calculation window.Otherwise, present sample meter is reconstructed
The data in window are calculated, the average value of resultant acceleration value in current calculation window is calculated, true crest is parsed using the average value
With true trough, reconstruct obtains waveform four-tuple, the data in calculation window is parsed into the set of multiple four-tuples, you can obtain
Multiple complete waveform four-tuples of reconstruct.
Reconstruct obtains waveform four-tuple:The average value of resultant acceleration value in current calculation window is calculated, utilizes average value point
Crest region and trough region are cut out, when resultant acceleration value is more than average value, it is needs to be currently located region
The peak regions of search, when resultant acceleration value is less than average value, region is currently located to need the valley regions searched for;Search
Crest region, crest maximum in the peak regions is obtained, as the true peaks peak of current region, and record true ripple
Data number peakIndex where peak;The region searched for where trough, the minimum trough of the valley regions is obtained, as working as
The real trough of forefoot area.
One completed wave is made up of three regions, is left valley regions, peak regions and right valley regions respectively.Crest
Region is alternately present with valley regions, and passing through average value from left valley regions reaches peak regions, and average value is passed through in peak regions
Right valley regions are reached, a completed wave passes through average value twice.
In order to remove the influence of spurious peaks, the true crest for defining a ripple is:Passed through twice in average value, a crest
In region, the maximum value of numerous crest medium wave peaks, crest meets equation below:
ah-1<ah
ah+1<ah
Similar, defining a true trough is:Passed through twice in average value, in a valley regions, in numerous troughs
The minimum value of trough is taken, trough meets below equation:
ak-1>ak
ak+1>ak
Wherein, akRepresent the resultant acceleration value that data number is k in sampling calculation window, ak-1Represent sampling calculation window
Interior data number be k-1 resultant acceleration value, ak+1Represent the resultant acceleration value that data number is k+1 in sampling calculation window.
Concrete operations include:In a peak search region, the maximum of crest is obtained, records the number where true crest
According to numbering, peakIndex is calculated as;Similar, in a trough region of search, a trough of minimum is obtained, records true ripple
The data number at the place of paddy, finally give a four-tuple<peak,troughLeft,troughRight,
halfWaveLength>, wherein each variable is respectively:True crest peak, run into last true trough before true crest
TroughLeft, first true trough troughRight after true crest, halfWaveLength represent the length of half-wave.
HalfWaveLength calculation formula is:
HalfWaveLength=max | peakIndex-troughIndexLeft |, | peakIndex-
troughIndexRight|}
Wherein, troughIndexLeft represents the data number where troughLeft, and troughIndexRight is represented
Data number where troughRight.
The reconstruct of a ripple is completed above, in one samples calculation window, can reconstruct to obtain multiple reconfiguration waveforms four
Tuple.In order to ensure the continuity of adjacent completed wave data in calculation window, the troughRight of a four-tuple is next
The troughLeft of four-tuple.
The search of completed wave is since true trough, when can not intactly obtain four-tuple above, it is believed that when prewave not
It is complete to wait the data of next calculation window to arrive, it is necessary to preserve current residual wave data, by resultant acceleration data,
TroughLeft regions and its later data are added to the front portion of next calculation window data, continue search for true crest
And true trough.When obtaining the waveform four-tuple of completed wave, the calculating of next step is carried out.
It is illustrated in figure 3 the idiographic flow that step 105 carries out Waveform Reconstructing:
301st, judge whether resultant acceleration value is more than average.If greater than average, peak search region is indicated entry into, then is opened
Begin to find waveform four-tuple<peak,troughLeft,troughRight,halfWaveLength>In true crest information;It is no
Then, true trough information is begun look for.
302nd, judge whether the previous value of currency is less than average.If enter row information preservation;Otherwise, upper one is represented
The information of individual ripple has been kept, without entering row information preservation.
303rd, information preserves.When less than average, illustrate currently to pass through average, reach the region where crest.This
When, true trough information is saved as to the true valley value troughRight and data number in the quaternary group information of a upper ripple
TroughIndexRight, calculates the halfWaveLength in a upper ripple, and formula is:
max{|peakIndex-troughIndexLeft|,|peakIndex-troughIndexRight|}
The collection apparatus of a ripple is completed above.Meanwhile trough information is saved as into the very left valley value when prewave
TroughLeft, record data numbering troughIndexLeft, original valley regions are emptied.
304th, judge whether current resultant acceleration value is crest.If not crest, cast out data, read next close and add
Velocity amplitude.
305th, current resultant acceleration is crest value, it is necessary to judge whether current resultant acceleration value is maximum in crest domain.
Current resultant acceleration value and the crest in existing crest domain are judged, search maximum.If not maximum, cast out
Data, read next resultant acceleration value.
306th, current resultant acceleration is the potential true crest peak values of waveform four-tuple institute, preserves peakIndex, and ought
Preceding crest is added in crest domain.
307th, current resultant acceleration value is not more than average, is the region where trough, carries out carrying for true trough correlated characteristic
Take.
It is illustrated in figure 4 the idiographic flow that step 307 carries out trough parsing:
401st, determine whether to work as in prewave and enter trough region for the first time, if it is then needing to preserve currently
The true crest information of ripple.Otherwise, represent that the true crest information for working as prewave is saved, directly carry out trough search.
402nd, it is currently to pass through wave band that average value entered where trough from true crest, it is necessary to by the true of current completed wave
Crest characteristic information is saved in four-tuple, that is, preserves the value peak of true crest, and the data number where true crest
PeakIndex, while empty peak regions.
403rd, judge whether current resultant acceleration value is trough, if it is not, then inputting next resultant acceleration value.
404th, judge whether current trough is minimum value in trough domain, by current resultant acceleration value and domain
There is valley value to be contrasted, select true valley value of the minimum value as final candidate.
405th, preserve the minimum valley value of currently available candidate, the information of trough preserved, including valley value with
And data number corresponding to trough, valley value is added among trough domain.Next resultant acceleration value is inputted to be judged.
106th, step number calculates:The four-tuple data obtained according to 105 Waveform Reconstructings, and resulting number is differentiated in 104
According to classification information, differentiated using the corresponding threshold value four-tuple of every kind of classification, when the requirement for meeting threshold value four-tuple, then existed
The total step number of corresponding classification adds 1.
The data category information obtained according to step 104, obtain the threshold value four-tuple of respective classes<peakThreshold,
troughThreshold,maxWaveLength,minWaveLength>, by resulting waveform four-tuple feature<peak,
troughLeft,troughRight,halfWaveLength>Compared with by threshold value four-tuple, filter out and meet the requirements
Four-tuple, carry out step number calculating.
It is illustrated in figure 5 the idiographic flow that step 106 carries out step number calculating:
501st, step 104 obtains data category type.
502nd, according to the classification type of acquisition, when classification corresponds to static noise or motion artifacts, cast out.Otherwise,
Threshold value four-tuple corresponding to taking-up<peakThreshold,troughThreshold,maxWaveLength,
minWaveLength>.The four-tuple data obtained using threshold value to reconstruct are differentiated.
503rd, whether within a predetermined range true crest value is differentiated, if peak<PeakThreshold, then cast out current
Data are reconstructed, judge next reconfiguration waveform four-tuple.
504th, very left trough is judged whether in predetermined scope, if troughLeft>TroughThreshold, that
Current reconstruct data are not effective data, are cast out.
505th, very right trough is judged whether in predetermined scope, if troughRight>TroughThreshold, that
Expression current data is invalid data, is cast out.
506th, half-wavelength is judged whether in the range of setting, if halfWaveLength<MinWaveLength, that
Current data is invalid data, is cast out.
Whether the 507th, judge half-wavelength exceeds scope set in advance, if halfWaveLength>
MaxWaveLength, then current data is undesirable, casts out.
508th, currently reconstruct four-tuple data are valid data, belong to correctly meter step data, by the data of type types
Meter step sum plus previous step.
It is described above, it is only the embodiment in the present invention, but protection scope of the present invention is not limited thereto, and is appointed
What be familiar with the people of the technology disclosed herein technical scope in, it will be appreciated that the conversion or replacement expected, should all cover
Within the scope of the present invention, therefore, protection scope of the present invention should be defined by the protection domain of claims.
Claims (7)
1. a kind of step-recording method based on mobile phone 3-axis acceleration sensor, it is characterised in that comprise the following steps that:
Step 1, sampling calculation window is determined according to setting sample frequency and sampling time window, collection mobile phone 3-axis acceleration passes
The 3-axis acceleration data of sensor, each each number of axle sampled in calculation window are 0,1 according to according to acquisition order numbering ...,
N-1, wherein, n represents the data amount check of each axle in each sampling calculation window;
Step 2, in each sampling calculation window, the 3-axis acceleration data collected are smoothed respectively, and counts
Resultant acceleration after calculating smoothly;
Step 3, in each sampling calculation window, the 3-axis acceleration data after smooth in step 2 and resultant acceleration are entered
Row feature extraction, wherein, the average value xMean and variance xVariance of x-axis acceleration are extracted as x-axis data characteristics, extraction
The average value yMean and variance yVariance of y-axis acceleration are as y-axis data characteristics, the average value of extraction z-axis acceleration
ZMean and variance zVariance is as z-axis data characteristics, extraction resultant acceleration crest number peakCount going out as crest
Existing feature;Resultant acceleration data are polymerized to 3 classes using clustering algorithm, respectively to every class resultant acceleration data averaged, and
3 average values are ranked up as resultant acceleration feature according to descending<ClusterPeak, clusterMean,
clusterThrough>, clusterPeak>clusterMean>clusterThrough;
Step 4, according to the feature extracted in step 3, the classification of data collected in each sampling calculation window is judged;
Step 5, if the differentiation result in step 4 is static noise or motion artifacts, give up in present sample calculation window
Data, otherwise, Waveform Reconstructing is carried out to the resultant acceleration data in present sample calculation window;Wherein, the method for Waveform Reconstructing
It is specific as follows:
5.1, the average value of resultant acceleration in present sample calculation window is calculated, using average value by present sample calculation window
Resultant acceleration be divided into multiple crest regions and trough region, wherein, crest region and trough location
Domain is alternately present;
5.2, each crest region is searched for, crest maximum in current crest region is obtained, as the region
True crest peak, and record true crest corresponding data numbering peakIndex in present sample calculation window;
5.3, the region searched for where each trough, trough minimum in each trough region is obtained, as the region
True trough, while record true valley value in present sample calculation window corresponding data number;
5.4, true crest peak and last true trough troughLeft, thereafter first true trough troughRight before it
And half-wave length halfWaveLength composition reconfiguration waveform four-tuples<peak,troughLeft,troughRight,
halfWaveLength>, the reconstruct of one waveform of completion, halfWaveLength=max | peakIndex-
TroughIndexLeft |, | peakIndex-troughIndexRight |, troughIndexLeft represents troughLeft
Corresponding data is numbered in present sample calculation window, and troughIndexRight represents troughRight in present sample meter
Calculate corresponding data numbering in window;
Step 6, according to the classification that data are collected in present sample calculation window, given threshold four-tuple<
peakThreshold,troughThreshold,maxWaveLength,minWaveLength>, to the weight obtained in step 5
Structure waveform is adjudicated one by one:
6.1, according to the classification that data are collected in present sample calculation window, the threshold corresponding to acquisition from predetermined threshold value four-tuple
It is worth four-tuple<peakThreshold,troughThreshold,maxWaveLength,minWaveLength>, wherein,
Threshold values of the peakThreshold as true crest, threshold values of the troughThreshold as true trough, maxWaveLength with
And minWaveLength be respectively halfWaveLength maximum can value and minimum can value;
6.2, by the waveform four-tuple of reconfiguration waveform<peak,troughLeft,troughRight,halfWaveLength>By
One compared with threshold value four-tuple:First, it is determined that true crest, if peak>In next step, otherwise peakThreshold then enters
The waveform four-tuple of more next reconfiguration waveform;Then, true trough is judged, if troughLeft<TroughThreshold and
troughRight<TroughThreshold then enters in next step, otherwise the waveform four-tuple of more next reconfiguration waveform;Most
Afterwards, half-wavelength is judged, if halfWaveLength>MinWaveLength and halfWaveLength<MaxWaveLength is then
Current reconfiguration waveform is calculated as a step, and the total step number of corresponding data classification adds one;Otherwise the waveform of more next reconfiguration waveform
Four-tuple;
Step 7, the step number in each sampling calculation window is separately summed according to different pieces of information classification, that is, realizes meter step.
A kind of 2. step-recording method based on mobile phone 3-axis acceleration sensor according to claim 1, it is characterised in that step
In rapid 2 using average value exponential smoothing to each number of axle of three number of axle evidences according to being smoothed respectively, smoothing formula is:
Wherein, s is default smooth window size and for even number more than zero, ai+jCompiled before representing smooth in sampling calculation window
Number be i+j data, a 'iThe data that numbering is i in smooth post-sampling calculation window are represented, n is represented in sampling calculation window
Data amount check.
A kind of 3. step-recording method based on mobile phone 3-axis acceleration sensor according to claim 1, it is characterised in that step
The resultant acceleration in present sample time window is divided into crest region and ripple using average value in step 5.1 in rapid 5
Paddy region, it is specially:By judging whether resultant acceleration is split more than average value, when resultant acceleration is more than average value
When its region be crest region, when resultant acceleration value is less than average value, its region is trough region.
A kind of 4. step-recording method based on mobile phone 3-axis acceleration sensor according to claim 3, it is characterised in that step
When previous sample in resultant acceleration data last in calculation window can not reconstruct a complete waveform four-tuple in rapid 5.4
When, the part resultant acceleration data are added to next front portion for sampling calculation window, to ensure neighbouring sample calculation window
The continuity of middle calculating.
5. a kind of step-recording method based on mobile phone 3-axis acceleration sensor according to claim 1, it is characterised in that adopt
The length N of the length windowLength=sample frequency f* sampling time windows of sample calculation window.
A kind of 6. step-recording method based on mobile phone 3-axis acceleration sensor according to claim 1, it is characterised in that step
The determination methods of each classification for sampling the data collected in calculation window are in rapid 4:
4.1, gather mobile phone 3-axis acceleration data respectively according to data category, and carry according to the method progress feature of step 1 to 3
Take, using the feature extracted as training set, wherein, data category include a) static noise, b) mobile phone is in coat pocket, c) hand
Machine trouser pocket, d) mobile phone in hand when walking, e) mobile phone in hand when run, f) mobile phone in other positions, g) motion make an uproar
Sound;
4.2, disaggregated model is built, and study is trained to disaggregated model using the training set in step 4.1;
4.3, the disaggregated model after the feature input training study that the data collected in each sampling calculation window are extracted,
The output of disaggregated model is its corresponding classification.
A kind of 7. step-recording method based on mobile phone 3-axis acceleration sensor according to claim 6, it is characterised in that step
Disaggregated model in rapid 4.2 is three-layer neural network, wherein, the activation primitive of first layer and the second layer is that band leakage is linear whole
Stream function, third layer is using normalization exponential function softmax functions, using the stochastic gradient descent algorithm with momentum to three layers
Neutral net is trained, and loss function is cross entropy loss function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710569013.4A CN107462258B (en) | 2017-07-13 | 2017-07-13 | Step counting method based on mobile phone three-axis acceleration sensor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710569013.4A CN107462258B (en) | 2017-07-13 | 2017-07-13 | Step counting method based on mobile phone three-axis acceleration sensor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107462258A true CN107462258A (en) | 2017-12-12 |
CN107462258B CN107462258B (en) | 2020-06-16 |
Family
ID=60546251
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710569013.4A Expired - Fee Related CN107462258B (en) | 2017-07-13 | 2017-07-13 | Step counting method based on mobile phone three-axis acceleration sensor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107462258B (en) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109190553A (en) * | 2018-08-30 | 2019-01-11 | 上海奥孛睿斯科技有限公司 | Step detection method |
CN109350072A (en) * | 2018-11-15 | 2019-02-19 | 北京航空航天大学 | A kind of cadence detection method based on artificial neural network |
CN109540143A (en) * | 2018-11-27 | 2019-03-29 | 中国广核电力股份有限公司 | The unconventional direction of action recognition methods of pedestrian of more sensing sources dynamic peak value fusions |
CN110595501A (en) * | 2019-10-09 | 2019-12-20 | 成都乐动信息技术有限公司 | Running distance correction method based on three-axis sensor |
CN110721456A (en) * | 2019-10-09 | 2020-01-24 | 成都乐动信息技术有限公司 | Pedal frequency detection method based on three-axis sensor |
CN110852260A (en) * | 2019-11-08 | 2020-02-28 | 青岛联合创智科技有限公司 | Drowning behavior identification method based on accelerometer |
CN111238527A (en) * | 2020-01-15 | 2020-06-05 | 桂林市优创电子科技有限公司 | Step counting method based on three-axis acceleration sensor |
CN111358472A (en) * | 2020-03-27 | 2020-07-03 | 山东建筑大学 | Gait detection algorithm, device and system |
CN111442785A (en) * | 2020-03-27 | 2020-07-24 | 广东工业大学 | Step counting method, device and equipment based on inertia and storage medium |
CN112067015A (en) * | 2020-09-03 | 2020-12-11 | 青岛歌尔智能传感器有限公司 | Step counting method and device based on convolutional neural network and readable storage medium |
CN112923922A (en) * | 2021-03-04 | 2021-06-08 | 香港理工大学深圳研究院 | Method, system and storage medium for counting steps and determining position information of pedestrian |
CN113008231A (en) * | 2021-04-30 | 2021-06-22 | 东莞市小精灵教育软件有限公司 | Motion state identification method and system, wearable device and storage medium |
CN113378801A (en) * | 2021-08-11 | 2021-09-10 | 深圳市梦瑶科技有限公司 | Intelligent bracelet accurate step counting method based on neural network |
CN114034313A (en) * | 2021-11-10 | 2022-02-11 | 广东乐心医疗电子股份有限公司 | Step counting method and device |
CN114139669A (en) * | 2021-11-19 | 2022-03-04 | 歌尔科技有限公司 | Rope skipping counting method, device and medium thereof |
CN114739412A (en) * | 2022-04-11 | 2022-07-12 | 河海大学 | Pedestrian gait real-time detection method and device based on smart phone |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6441846B1 (en) * | 1998-06-22 | 2002-08-27 | Lucent Technologies Inc. | Method and apparatus for deriving novel sports statistics from real time tracking of sporting events |
CN104567912A (en) * | 2015-02-02 | 2015-04-29 | 河海大学 | Method for realizing pedometer on Android mobile phone |
CN104990562A (en) * | 2015-06-29 | 2015-10-21 | 合肥工业大学 | Step counting method based on autocorrecting computing |
CN104983489A (en) * | 2015-07-28 | 2015-10-21 | 河北工业大学 | Road condition identifying method for lower limb prosthesis walking |
CN106767888A (en) * | 2016-11-15 | 2017-05-31 | 皖西学院 | A kind of meter based on Wave crest and wave trough detection walks algorithm |
-
2017
- 2017-07-13 CN CN201710569013.4A patent/CN107462258B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6441846B1 (en) * | 1998-06-22 | 2002-08-27 | Lucent Technologies Inc. | Method and apparatus for deriving novel sports statistics from real time tracking of sporting events |
CN104567912A (en) * | 2015-02-02 | 2015-04-29 | 河海大学 | Method for realizing pedometer on Android mobile phone |
CN104990562A (en) * | 2015-06-29 | 2015-10-21 | 合肥工业大学 | Step counting method based on autocorrecting computing |
CN104983489A (en) * | 2015-07-28 | 2015-10-21 | 河北工业大学 | Road condition identifying method for lower limb prosthesis walking |
CN106767888A (en) * | 2016-11-15 | 2017-05-31 | 皖西学院 | A kind of meter based on Wave crest and wave trough detection walks algorithm |
Cited By (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109190553A (en) * | 2018-08-30 | 2019-01-11 | 上海奥孛睿斯科技有限公司 | Step detection method |
CN109350072A (en) * | 2018-11-15 | 2019-02-19 | 北京航空航天大学 | A kind of cadence detection method based on artificial neural network |
CN109540143A (en) * | 2018-11-27 | 2019-03-29 | 中国广核电力股份有限公司 | The unconventional direction of action recognition methods of pedestrian of more sensing sources dynamic peak value fusions |
CN109540143B (en) * | 2018-11-27 | 2022-12-02 | 中国广核电力股份有限公司 | Pedestrian unconventional action direction identification method based on multi-sensing-source dynamic peak fusion |
CN110721456B (en) * | 2019-10-09 | 2020-12-25 | 成都乐动信息技术有限公司 | Pedal frequency detection method based on three-axis sensor |
CN110595501A (en) * | 2019-10-09 | 2019-12-20 | 成都乐动信息技术有限公司 | Running distance correction method based on three-axis sensor |
CN110721456A (en) * | 2019-10-09 | 2020-01-24 | 成都乐动信息技术有限公司 | Pedal frequency detection method based on three-axis sensor |
CN110595501B (en) * | 2019-10-09 | 2022-10-04 | 成都乐动信息技术有限公司 | Running distance correction method based on three-axis sensor |
CN110852260B (en) * | 2019-11-08 | 2023-05-30 | 青岛联合创智科技有限公司 | Drowning behavior recognition method based on accelerometer |
CN110852260A (en) * | 2019-11-08 | 2020-02-28 | 青岛联合创智科技有限公司 | Drowning behavior identification method based on accelerometer |
CN111238527B (en) * | 2020-01-15 | 2023-09-29 | 桂林市优创电子科技有限公司 | Step counting method based on triaxial acceleration sensor |
CN111238527A (en) * | 2020-01-15 | 2020-06-05 | 桂林市优创电子科技有限公司 | Step counting method based on three-axis acceleration sensor |
CN111442785A (en) * | 2020-03-27 | 2020-07-24 | 广东工业大学 | Step counting method, device and equipment based on inertia and storage medium |
CN111442785B (en) * | 2020-03-27 | 2021-01-26 | 广东工业大学 | Step counting method, device and equipment based on inertia and storage medium |
CN111358472B (en) * | 2020-03-27 | 2022-08-23 | 山东建筑大学 | Gait detection algorithm, device and system |
CN111358472A (en) * | 2020-03-27 | 2020-07-03 | 山东建筑大学 | Gait detection algorithm, device and system |
CN112067015B (en) * | 2020-09-03 | 2022-11-22 | 青岛歌尔智能传感器有限公司 | Step counting method and device based on convolutional neural network and readable storage medium |
CN112067015A (en) * | 2020-09-03 | 2020-12-11 | 青岛歌尔智能传感器有限公司 | Step counting method and device based on convolutional neural network and readable storage medium |
CN112923922A (en) * | 2021-03-04 | 2021-06-08 | 香港理工大学深圳研究院 | Method, system and storage medium for counting steps and determining position information of pedestrian |
WO2022227202A1 (en) * | 2021-04-30 | 2022-11-03 | 东莞市小精灵教育软件有限公司 | Motion state recognition method and system, and wearable device and storage medium |
CN113008231A (en) * | 2021-04-30 | 2021-06-22 | 东莞市小精灵教育软件有限公司 | Motion state identification method and system, wearable device and storage medium |
CN113378801A (en) * | 2021-08-11 | 2021-09-10 | 深圳市梦瑶科技有限公司 | Intelligent bracelet accurate step counting method based on neural network |
CN114034313A (en) * | 2021-11-10 | 2022-02-11 | 广东乐心医疗电子股份有限公司 | Step counting method and device |
CN114034313B (en) * | 2021-11-10 | 2024-04-02 | 广东乐心医疗电子股份有限公司 | Step counting method and device |
CN114139669A (en) * | 2021-11-19 | 2022-03-04 | 歌尔科技有限公司 | Rope skipping counting method, device and medium thereof |
CN114139669B (en) * | 2021-11-19 | 2024-10-22 | 歌尔科技有限公司 | Rope skipping counting method, device and medium thereof |
CN114739412A (en) * | 2022-04-11 | 2022-07-12 | 河海大学 | Pedestrian gait real-time detection method and device based on smart phone |
CN114739412B (en) * | 2022-04-11 | 2024-05-03 | 河海大学 | Pedestrian gait real-time detection method and device based on smart phone |
Also Published As
Publication number | Publication date |
---|---|
CN107462258B (en) | 2020-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107462258A (en) | A kind of step-recording method based on mobile phone 3-axis acceleration sensor | |
Khatun et al. | Deep CNN-LSTM with self-attention model for human activity recognition using wearable sensor | |
Zhu et al. | Efficient human activity recognition solving the confusing activities via deep ensemble learning | |
Nair et al. | Human activity recognition using temporal convolutional network | |
CN105678222B (en) | A kind of mobile device-based Human bodys' response method | |
CN106096662A (en) | Human motion state identification based on acceleration transducer | |
CN107153871A (en) | Fall detection method based on convolutional neural networks and mobile phone sensor data | |
CN108446733A (en) | A kind of human body behavior monitoring and intelligent identification Method based on multi-sensor data | |
WO2023035093A1 (en) | Inertial sensor-based human body behaviour recognition method | |
CN106919958A (en) | A kind of human finger action identification method based on intelligent watch | |
CN108021888A (en) | A kind of fall detection method | |
CN106910314A (en) | A kind of personalized fall detection method based on the bodily form | |
CN113642432A (en) | Method for identifying human body posture by convolutional neural network based on covariance matrix transformation | |
Tian et al. | Wearable IMU-based gym exercise recognition using data fusion methods | |
CN110322472A (en) | A kind of multi-object tracking method and terminal device | |
CN104586402A (en) | Feature extracting method for body activities | |
CN110132276B (en) | Self-adaptive step length estimation method based on pedestrian motion state | |
Chu et al. | [Retracted] Image Recognition of Badminton Swing Motion Based on Single Inertial Sensor | |
CN114601455A (en) | Motion recognition method based on two-stage neural network | |
CN109271889A (en) | A kind of action identification method based on the double-deck LSTM neural network | |
CN109350072B (en) | Step frequency detection method based on artificial neural network | |
CN111797743A (en) | Human behavior recognition method based on bidirectional LSTM | |
Pandey et al. | 2d convolutional lstm-based approach for human action recognition on various sensor data | |
Wu et al. | Using deep learning and smartphone for automatic detection of fall and daily activities | |
Sowmiya et al. | A hybrid approach using bidirectional neural networks for human activity recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200616 |
|
CF01 | Termination of patent right due to non-payment of annual fee |