CN105509762A - Step counting method and device based on three axis accelerometer - Google Patents

Step counting method and device based on three axis accelerometer Download PDF

Info

Publication number
CN105509762A
CN105509762A CN201410526003.9A CN201410526003A CN105509762A CN 105509762 A CN105509762 A CN 105509762A CN 201410526003 A CN201410526003 A CN 201410526003A CN 105509762 A CN105509762 A CN 105509762A
Authority
CN
China
Prior art keywords
axis
acceleration
value
preset
parameter set
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
Application number
CN201410526003.9A
Other languages
Chinese (zh)
Other versions
CN105509762B (en
Inventor
吴海全
彭久高
宋亚楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Grandsun Electronics Co Ltd
Original Assignee
Shenzhen Grandsun Electronics Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Grandsun Electronics Co Ltd filed Critical Shenzhen Grandsun Electronics Co Ltd
Priority to CN201410526003.9A priority Critical patent/CN105509762B/en
Publication of CN105509762A publication Critical patent/CN105509762A/en
Application granted granted Critical
Publication of CN105509762B publication Critical patent/CN105509762B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The invention belongs to the technical field of wearable devices, and provides a step counting method and device based on a three axis accelerometer. The method comprises the following steps: obtaining the realtime generated acceleration curves of x axis, y axis, and z axis of a three axis accelerometer, obtaining the axis that has the strongest regularity of acceleration curve, taking the direction of the axis that has the strongest regularity of acceleration curve as the main direction; taking the acceleration curve of the axis that has the strongest regularity of acceleration curve as the acceleration curve of the main direction; adopting a preset filter to filter the acceleration curve of the main direction; choosing unprocessed peaks in the acceleration curve of the main direction, when the unprocessed peaks are not in the range of predetermined time threshold of processed peaks and the acceleration value of unprocessed peaks is larger than the predetermined acceleration threshold, adding one step to the total number of steps, or when the unprocessed peaks are not in the range of predetermined time threshold of processed peaks and the difference between the acceleration value of unprocessed peaks and a predetermined acceleration threshold is less than a predetermined value, adding one step to the total number of steps.

Description

Step counting method and device based on three-axis accelerometer
Technical Field
The invention belongs to the technical field of wearable equipment, and particularly relates to a step counting method and device based on a three-axis accelerometer.
Background
Wearable devices are portable devices that can be worn directly on the body, or integrated into clothing or other accessories. Meanwhile, wearable devices generally use a three-axis accelerometer as a counting device to complete a step-counting function. The three-axis accelerometer of the wearable device can measure the acceleration of human body movement in three directions, namely the forward direction, the lateral direction and the vertical direction. Wherein, referring to fig. 1, fig. 1 is a sample diagram of three-axis acceleration curves obtained by walking a handheld wearable device, referring to fig. 2, and fig. 2 is a sample diagram of three-axis acceleration curves obtained by running a handheld wearable device, the three-axis acceleration curves including acceleration curves of x-axis, y-axis, and z-axis.
However, the existing step counting algorithm based on the three-axis accelerometer cannot accurately count the number of steps taken by the wearer from three curves output by the three-axis accelerometer of the wearable device. The reason for this is that in the wearable device, there are many available choices for the installation position of the triaxial accelerometer, and therefore there are also many choices for identifying the three directions of the triaxial accelerometer, and therefore in the three directions, the probability of erroneously identifying the principal direction of the triaxial accelerometer is also high, and when the principal direction of the triaxial accelerometer is erroneously identified, the erroneously counted number of steps that can be obtained consumes the time for counting the number of steps that the wearer is traveling, reduces the efficiency for counting the number of steps that the wearer is traveling, and reduces the accuracy for counting the number of steps that the wearer is traveling.
Disclosure of Invention
The embodiment of the invention aims to provide a step counting method based on a three-axis accelerometer, and aims to solve the problem that the step number of a wearer cannot be accurately counted from three curves output by the three-axis accelerometer of wearable equipment in the conventional step counting algorithm based on the three-axis accelerometer.
The embodiment of the invention is realized in such a way that a step counting method based on a three-axis accelerometer comprises the following steps:
acquiring acceleration curves of an x axis, a y axis and a z axis generated in a three-axis accelerometer in real time, acquiring the axis with the strongest regularity of the acceleration curves from the acceleration curves of the x axis, the y axis and the z axis, taking the direction of the axis with the strongest regularity as a main direction, and taking the acceleration curve of the axis with the strongest regularity as an acceleration curve of the main direction;
adopting a preset filter to filter the acceleration curve in the main direction;
selecting an unprocessed wave crest on the acceleration curve of the main direction, adding one to the counting step number when the unprocessed wave crest appears beyond a preset time threshold value of the processed wave crest and the acceleration value of the unprocessed wave crest is greater than a preset acceleration threshold value, or selecting the unprocessed wave crest on the acceleration curve of the main direction, and adding one to the counting step number when the unprocessed wave crest appears beyond the preset time threshold value of the processed wave crest and the difference value between the acceleration value of the unprocessed wave crest and the preset acceleration threshold value is less than a preset value.
Another object of an embodiment of the present invention is to provide a step-counting device based on a three-axis accelerometer, including:
the acceleration curve acquisition module is used for acquiring acceleration curves of an x axis, a y axis and a z axis which are generated in the three-axis accelerometer in real time, acquiring the axis with the strongest regularity of the acceleration curve from the acceleration curves of the x axis, the y axis and the z axis, taking the direction of the axis with the strongest regularity as a main direction, and taking the acceleration curve of the axis with the strongest regularity as an acceleration curve of the main direction;
the filtering module is used for filtering the acceleration curve in the main direction by adopting a preset filter;
and the counting step number module is used for selecting an unprocessed wave crest on the acceleration curve of the main direction, adding one to the counting step number when the unprocessed wave crest appears beyond a preset time threshold value of the processed wave crest and the acceleration value of the unprocessed wave crest is greater than a preset acceleration threshold value, or selecting the unprocessed wave crest on the acceleration curve of the main direction, and adding one to the counting step number when the unprocessed wave crest appears beyond the preset time threshold value of the processed wave crest and the difference value between the acceleration value of the unprocessed wave crest and the preset acceleration threshold value is less than a preset value.
In the embodiment of the invention, the axis with the strongest regularity of the acceleration curve is obtained, the direction of the axis with the strongest regularity is taken as the main direction, the acceleration curve of the axis with the strongest regularity is taken as the acceleration curve of the main direction, and the unprocessed peak is selected on the acceleration curve of the main direction, so that the problem that the step number of the wearer cannot be accurately counted from three curves output by a three-axis accelerometer of wearable equipment by the conventional step counting method based on the three-axis accelerometer is solved, the time for counting the step number of the wearer can be saved, and the accuracy for counting the step number of the wearer can be improved.
Drawings
FIG. 1 is a sample graph of three axis acceleration curves obtained by walking a handheld wearable device;
fig. 2 is a sample graph of three axis acceleration profiles obtained by running a handheld wearable device;
FIG. 3 is a flowchart of an implementation of a step counting method based on a three-axis accelerometer according to an embodiment of the present invention;
FIG. 4 is a flowchart of a step S301 of a three-axis accelerometer-based step counting method according to an embodiment of the present invention;
FIG. 5 is a flow chart illustrating the implementation of the preset acceleration threshold according to an embodiment of the present invention;
FIG. 6 is a flow chart illustrating an implementation of updating an acceleration threshold provided by an embodiment of the present invention;
fig. 7 is a block diagram of a step counting device based on a three-axis accelerometer according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example one
Referring to fig. 3, fig. 3 is a flowchart of an implementation of a step counting method based on a three-axis accelerometer according to an embodiment of the present invention, which is detailed as follows:
in step S301, acceleration curves of an x axis, a y axis, and a z axis generated in real time in the three-axis accelerometer are obtained, an axis with the strongest regularity of the acceleration curves is obtained from the acceleration curves of the x axis, the y axis, and the z axis, a direction in which the axis with the strongest regularity is located is taken as a main direction, and the acceleration curve of the axis with the strongest regularity is taken as an acceleration curve of the main direction;
the axis with the strongest regularity of the acceleration curve represents the axis with the strongest periodicity of the acceleration curve.
In step S302, a preset filter is used to filter the acceleration curve in the main direction;
the center frequency and the bandwidth of the preset filter can be set by a user or default by a system.
In step S303, an unprocessed peak is selected on the acceleration curve in the main direction, and when the unprocessed peak is outside the preset time threshold of the processed peak and the acceleration value of the unprocessed peak is greater than the preset acceleration threshold, the number of the statistical steps is incremented by one, or, when the unprocessed peak is outside the preset time threshold of the processed peak and the difference between the acceleration value of the unprocessed peak and the preset acceleration threshold is smaller than the preset value, the number of the statistical steps is incremented by one. Wherein the preset time threshold is set according to the empirical value. The preset time threshold comprises a walking preset time threshold and a running time threshold. The basis for setting the preset time threshold is as follows: people generally can not walk slower than one step every two seconds, and can not exceed five steps every second when running. With the above-mentioned basis, it is preferable that the walking preset time threshold is 0.5 seconds, and the running time threshold is 0.2 seconds.
The method comprises the steps of detecting a thread which generates acceleration curves of an x axis, a y axis and a z axis in a three-axis accelerometer in real time, stopping counting steps when the acceleration curves of the x axis, the y axis and the z axis are detected to stop being generated in the three-axis accelerometer, and outputting the counted steps to a screen or a voice device of equipment where the three-axis accelerometer is located so that the counted steps are displayed on the screen of the equipment where the three-axis accelerometer is located or the counted steps are played by the voice device of the equipment where the three-axis accelerometer is located.
In the embodiment of the invention, the axis with the strongest regularity of the acceleration curve is obtained, the direction of the axis with the strongest regularity is taken as the main direction, the acceleration curve of the axis with the strongest regularity is taken as the acceleration curve of the main direction, and the unprocessed peak is selected on the acceleration curve of the main direction, so that the problem that the step number of the wearer cannot be accurately counted from three curves output by a three-axis accelerometer of wearable equipment by the conventional step counting method based on the three-axis accelerometer is solved, the time for counting the step number of the wearer can be saved, and the accuracy for counting the step number of the wearer can be improved.
Example two
Referring to fig. 4, fig. 4 is a flowchart of an implementation of step S301 of the step counting method based on a three-axis accelerometer according to the embodiment of the present invention, which is detailed as follows:
in step S401, acquiring acceleration curves of an x axis, a y axis, and a z axis generated in real time in a three-axis accelerometer, and selecting a preset number of peaks from the acceleration curves of the x axis, the y axis, and the z axis, respectively;
the preset number may be user-set or default.
In step S402, obtaining a time interval between every two peaks in the selected preset number of peaks, and generating a standard deviation of a difference value of the time interval between every two peaks as a first parameter set describing regularity of an acceleration curve, where the first parameter set includes first parameters of the x-axis, the y-axis, and the z-axis;
in step S403, sampling acceleration curves at two ends between three consecutive peaks according to a preset sampling interval in the selected preset number of peaks to generate discrete point acceleration values, acquiring the discrete point acceleration values at intervals of a preset time, and generating a standard deviation of a difference value between the discrete point acceleration values at every two intervals of the preset time as a second parameter set describing regularity of the acceleration curve of the axis, where the second parameter set includes second parameters of the x-axis, the y-axis, and the z-axis;
in step S404, generating a detection parameter set according to the first parameter set, the second parameter set, and a preset detection main direction model, where the detection parameter set includes detection parameters of the x-axis, the y-axis, and the z-axis;
in step S405, an axis with the strongest regularity of the acceleration curve is obtained in the x axis, the y axis, and the z axis according to the detection parameter set, the direction of the axis with the strongest regularity is taken as the main direction, and the acceleration curve of the axis with the strongest regularity is taken as the acceleration curve of the main direction.
In the embodiment of the invention, the input data is the acceleration value output by the three-axis accelerometer in real time, and the acceleration curve is suitable for all three-axis accelerometer Micro Electro Mechanical Systems (MEMS), so that the acceleration curve has good portability, an axis with the strongest regularity of the acceleration curve can be obtained in any three-axis accelerometer MEMS system, the direction of the axis with the strongest regularity can be taken as the main direction, and the acceleration curve of the axis with the strongest regularity can be taken as the acceleration curve of the main direction.
EXAMPLE III
The embodiment of the invention mainly describes an implementation process for establishing a detection main direction model, which is detailed as follows:
establishing a detection main direction model;
wherein,representing a proportionality coefficient, i representing a serial number, i having a value ranging from 1 to 3, α i representing the ith first parameter in the first parameter set, α1、α2、α3Respectively representing first parameters of x-axis, y-axis and z-axis, and theta i represents ith second parameter in the second parameter set1、θ2、θ3Respectively representing second parameters of x-axis, y-axis and z-axis, and Δ i representing ith detection parameter of the detection parameter set, and Δ1、Δ2、Δ3The detection parameters of the x-axis, the y-axis and the z-axis are respectively shown.
In the embodiment of the invention, the acceleration curve of the axis with the strongest regularity can be conveniently used as the acceleration curve of the main direction in the follow-up process by establishing the detection main direction model, and then the unprocessed wave crest is selected on the acceleration curve of the main direction to complete the step number statistics.
Example four
Referring to fig. 5, fig. 5 is a flowchart illustrating an implementation of presetting an acceleration threshold according to an embodiment of the present invention, which is detailed as follows:
in step S501, in the acceleration curve in the main direction, acceleration values of a preset number of peaks are extracted;
in step S502, a median of the acceleration values of the preset number of peaks is selected as an acceleration threshold.
Wherein, the acceleration value of the crest of the quantity of predetermineeing is drawed, specifically is:
and extracting the wave crests with preset number according to the sequence of wave crest generation in the acceleration curve in the main direction.
Optionally, as another implementation manner of the embodiment of the present invention, the preset acceleration threshold may also be an average value of acceleration values of a preset number of peaks as the acceleration threshold.
In the embodiment of the present invention, since the acceleration threshold is established on the basis of the acceleration curve according to the principal direction, the acceleration threshold has a higher accuracy.
EXAMPLE five
Referring to fig. 6, fig. 6 is a flowchart of an implementation of updating an acceleration threshold according to an embodiment of the present invention, which is detailed as follows:
in step S601, subtracting the acceleration value of the processed peak from the acceleration threshold in real time to generate an acceleration difference;
the acceleration values of the processed wave crests are sequenced according to the generation time of the acceleration values of the processed wave crests and the sequence of the generation time, and the acceleration value of the processed wave crest with the generation time closest to the existing time is extracted.
And subtracting the acceleration value of the processed wave crest with the extracted generation time closest to the existing time from the acceleration threshold value in real time to generate an acceleration difference value.
In step S602, it is determined whether the absolute value of the acceleration difference is greater than a preset determination threshold, if so, the acceleration value of the processed peak is added to the acceleration threshold to generate an added value, and the acceleration threshold is updated to half of the added value, otherwise, no processing is performed.
The judgment threshold is represented by a parameter C, which can be generated according to the following formula, which is detailed as follows:
C = X max - X min 2
wherein, XmaxFor maximum acceleration value, X, in the sampled peaksminIs the smallest acceleration value among the sampled peaks.
Wherein, the acceleration threshold is updated to be half of the added value, and the specific implementation flow is as follows:
A t + 1 = B + At 2
Atas a raw acceleration threshold, At+1For an updated acceleration threshold, B represents the acceleration value that generated the processed peak whose time was closest to the existing time.
Wherein, whether the absolute value of the acceleration difference is larger than a preset judgment threshold value C is judged, namely, the judgment means that in the waveform, whether B is A or nottAbove or below when AtWhen the distance between the acceleration threshold value A and the acceleration threshold value B is larger than the judgment threshold value C, the acceleration threshold value is required to be updated to obtain an updated acceleration threshold value At+1
In the embodiment of the invention, the quick response can be made to the input acceleration curve, and the acceleration threshold value is adjusted in real time according to the change of the movement mode of the wearer, so that the counting accuracy is ensured; secondly, input data of the algorithm is an acceleration value output by the triaxial accelerometer in real time, and the algorithm is suitable for all triaxial accelerometer MEMS systems and has good portability.
EXAMPLE six
This embodiment mainly describes the processing flow of the acceleration curve of the present invention when a person walks, and for convenience of description, fig. 1 and fig. 3 are taken as examples, and detailed descriptions are as follows:
(1) and calculating the regularity of an x axis, a y axis and a z axis. Firstly, the first 10 highest points of the axis are taken, and the standard deviation of the difference value of the time intervals between every two points is calculated to be used as a first parameter for evaluating the periodicity of the axis. Secondly, analog-to-digital conversion is respectively carried out on curves at two ends between the three highest points, the sampling frequency can be set by a system or can be set by a user, the sampling frequency includes but is not limited to 2400Hz, 4800Hz, 9600Hz, 22100Hz, 44200Hz and 48000Hz, and the standard deviation of the numerical value position difference values of the discrete points at corresponding positions (equal relative time) is calculated to serve as a second parameter for evaluating the periodicity of the axis.
(2) The principal direction is calculated. By adopting the main direction detection model and comparing the x axis, the y axis and the z axis, the regularity of the acceleration of the person in the x axis direction is strong when the person walks, and therefore the x axis is taken as the main direction of counting.
(3) And (6) filtering. And taking an acceleration curve of an x axis, and filtering the acceleration curve by using a wiener filter to remove the influence of clutter on the algorithm.
(4) An acceleration threshold is calculated. And taking the acceleration values of the first 10 wave crests, and calculating the acceleration threshold value to be about 0.85 g.
(5) And (6) counting. Taking the unprocessed peak on the curve, if this peak occurs 0.2 seconds outside the processed peak and its value is greater than the acceleration threshold, the statistical step count is incremented by one.
(6) The acceleration threshold is updated. And (4) if the difference value between the wave peak value processed in the step (4) and the acceleration threshold value is larger than the acceleration threshold value, updating the acceleration threshold value to be half of the sum of the wave peak value and the acceleration threshold value, and otherwise, not performing any processing.
(7) And (5) repeating the steps (4) to (5) to obtain the statistical step number of 15 steps.
EXAMPLE seven
The present embodiment mainly describes the processing flow of the acceleration curve of the present invention when a person walks, which is convenient for explanation, and takes fig. 2 and fig. 4 as an example, which is detailed as follows:
(1) and calculating the regularity of an x axis, a y axis and a z axis. Firstly, the first 10 highest points of the axis are taken, and the standard deviation of the difference value of the time intervals between every two points is calculated to be used as a first parameter for evaluating the periodicity of the axis. Secondly, analog-to-digital conversion is respectively carried out on curves at two ends between the three highest points, the sampling frequency can be set by a system or can be set by a user, the sampling frequency includes but is not limited to 2400Hz, 4800Hz, 9600Hz, 22100Hz, 44200Hz and 48000Hz, and the standard deviation of the numerical value position difference values of the discrete points at corresponding positions (equal relative time) is calculated to serve as a second parameter for evaluating the periodicity of the axis.
(2) The principal direction is calculated. And taking the direction of the y axis with the strongest regularity as the main direction of counting by comparison.
(3) And (6) filtering. And taking an acceleration curve of a y axis, and filtering the acceleration curve by using a wiener filter to remove the influence of clutter on the algorithm.
(4) An acceleration threshold is calculated. The acceleration values of the first 10 peaks are taken as sample values, and the acceleration threshold is calculated to be about 0.72 g.
(5) And (6) counting. Taking the unprocessed peak on the curve, if this peak occurs outside the processed peak for 0.2 seconds and its value is greater than the acceleration threshold or its difference from the acceleration threshold is less than 0.1g, the statistical step number is incremented by one.
(6) The acceleration threshold is updated. And (4) if the difference value between the wave peak value processed in the step (4) and the acceleration threshold value is larger than the acceleration threshold value, updating the acceleration threshold value to be half of the sum of the wave peak value and the acceleration threshold value, and otherwise, not performing any processing.
(7) And (5) repeating the step (4) to the step (5) to obtain the statistical step number of 25 steps.
Example eight
Fig. 7 is a block diagram of a step-counting device based on a three-axis accelerometer according to an embodiment of the present invention, where the device may be operated in a terminal. For convenience of explanation, only the portions related to the present embodiment are shown.
Referring to fig. 7, the three-axis accelerometer-based step counting apparatus includes:
the acceleration curve acquiring module 71 is configured to acquire acceleration curves of an x axis, a y axis and a z axis generated in the three-axis accelerometer in real time, acquire an axis with the strongest regularity of the acceleration curve from the acceleration curves of the x axis, the y axis and the z axis, use the direction of the axis with the strongest regularity as a main direction, and use the acceleration curve of the axis with the strongest regularity as an acceleration curve of the main direction;
the filtering module 72 is configured to filter the acceleration curve in the main direction by using a preset filter;
the step number counting module 73 is configured to select an unprocessed peak on the acceleration curve in the main direction, add one to the counting step number when the unprocessed peak is outside a preset time threshold of the processed peak and the acceleration value of the unprocessed peak is greater than a preset acceleration threshold, or add one to the counting step number when the unprocessed peak is outside the preset time threshold of the processed peak and the difference between the acceleration value of the unprocessed peak and the preset acceleration threshold is smaller than a preset value.
In a first implementation manner of this embodiment, in the step counting device based on a three-axis accelerometer, the acceleration curve obtaining module includes:
the wave crest selecting unit is used for acquiring acceleration curves of an x axis, a y axis and a z axis generated in the three-axis accelerometer in real time, and selecting a preset number of wave crests from the acceleration curves of the x axis, the y axis and the z axis respectively;
the first parameter set generating unit is used for acquiring the time interval between every two wave crests from the selected preset number of wave crests, and generating the standard deviation of the difference value of the time interval between every two wave crests as a first parameter set for describing the regularity of the acceleration curve, wherein the first parameter set comprises first parameters of the x axis, the y axis and the z axis;
the second parameter set generating unit is used for sampling acceleration curves at two ends between three continuous wave crests in the selected wave crests in the preset number according to a preset sampling interval to generate discrete point acceleration values, acquiring the discrete point acceleration values at intervals of preset time, and generating a standard difference of a difference value of the discrete point acceleration values at every two intervals of preset time as a second parameter set for describing the regularity of the acceleration curves of the shaft, wherein the second parameter set comprises second parameters of the x-axis, the y-axis and the z-axis;
a detection parameter set detection unit, configured to generate a detection parameter set according to the first parameter set, the second parameter set, and a preset detection main direction model, where the detection parameter set includes detection parameters of the x-axis, the y-axis, and the z-axis;
and the acceleration curve acquisition unit is used for acquiring the axis with the strongest regularity of the acceleration curve from the x axis, the y axis and the z axis according to the detection parameter set, taking the direction of the axis with the strongest regularity as the main direction, and taking the acceleration curve of the axis with the strongest regularity as the acceleration curve of the main direction.
In a second implementation manner of this embodiment, the step-counting device based on a three-axis accelerometer further includes:
the establishing module is used for establishing a detection main direction model;
wherein,representing a proportionality coefficient, i representing a serial number, i having a value ranging from 1 to 3, α i representing the ith first parameter in the first parameter set, α1、α2、α3Respectively representing first parameters of x-axis, y-axis and z-axis, and theta i represents ith second parameter in the second parameter set1、θ2、θ3Respectively representing second parameters of x-axis, y-axis and z-axis, and Δ i representing ith detection parameter of the detection parameter set, and Δ1、Δ2、Δ3The detection parameters of the x-axis, the y-axis and the z-axis are respectively shown.
In a third implementation manner of this embodiment, the step-counting device based on a three-axis accelerometer further includes:
the acceleration value extraction module is used for extracting the acceleration values of the wave crests in a preset number from the acceleration curve in the main direction;
and the acceleration threshold generating module is used for extracting the median of the acceleration values of the wave crests of the preset number as the acceleration threshold according to the preset number and the extracted acceleration values.
In a fourth implementation manner of this embodiment, the step-counting device based on a three-axis accelerometer further includes:
the acceleration difference generating module is used for subtracting the acceleration value of the processed wave crest from the acceleration threshold value in real time to generate an acceleration difference;
and the acceleration threshold updating module is used for judging whether the absolute value of the acceleration difference is greater than a preset judgment threshold, if so, adding the acceleration value of the processed wave peak and the acceleration threshold to generate an added value, and updating the acceleration threshold to be half of the added value, otherwise, not performing any processing.
The apparatus provided in the embodiment of the present invention may be applied to the corresponding method embodiments, and for details, reference is made to the description of the embodiments above, and details are not repeated here.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention can be implemented by software plus necessary general hardware. The program may be stored in a readable storage medium, such as a random access memory, a flash memory, a read only memory, a programmable read only memory, an electrically erasable programmable memory, a register, and the like. The storage medium is located in a memory, and a processor reads information in the memory and performs the method according to the embodiments of the present invention in combination with hardware thereof.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A step counting method based on a three-axis accelerometer is characterized by comprising the following steps:
acquiring acceleration curves of an x axis, a y axis and a z axis generated in a three-axis accelerometer in real time, acquiring the axis with the strongest regularity of the acceleration curves from the acceleration curves of the x axis, the y axis and the z axis, taking the direction of the axis with the strongest regularity as a main direction, and taking the acceleration curve of the axis with the strongest regularity as an acceleration curve of the main direction;
adopting a preset filter to filter the acceleration curve in the main direction;
selecting an unprocessed wave crest on the acceleration curve of the main direction, adding one to the counting step number when the unprocessed wave crest appears beyond a preset time threshold value of the processed wave crest and the acceleration value of the unprocessed wave crest is greater than a preset acceleration threshold value, or selecting the unprocessed wave crest on the acceleration curve of the main direction, and adding one to the counting step number when the unprocessed wave crest appears beyond the preset time threshold value of the processed wave crest and the difference value between the acceleration value of the unprocessed wave crest and the preset acceleration threshold value is less than a preset value.
2. The method according to claim 1, wherein the acceleration curves of an x axis, a y axis and a z axis generated in real time in the three-axis accelerometer are obtained, the axis with the strongest regularity of the acceleration curves is obtained from the acceleration curves of the x axis, the y axis and the z axis, the direction in which the axis with the strongest regularity is located is taken as a main direction, and the acceleration curve of the axis with the strongest regularity is taken as an acceleration curve of the main direction, specifically:
acquiring acceleration curves of an x axis, a y axis and a z axis generated in a three-axis accelerometer in real time, and selecting a preset number of wave crests from the acceleration curves of the x axis, the y axis and the z axis respectively;
acquiring time intervals between every two wave crests from the selected wave crests with preset quantity, and generating a standard deviation of a difference value of the time intervals between every two wave crests as a first parameter set for describing the regularity of an acceleration curve, wherein the first parameter set comprises first parameters of the x axis, the y axis and the z axis;
sampling acceleration curves at two ends between three continuous wave crests according to a preset sampling interval in the selected wave crests with the preset number to generate discrete point acceleration values, acquiring the discrete point acceleration values at intervals of preset time, and generating a standard deviation of a difference value of the discrete point acceleration values at every two intervals of preset time to serve as a second parameter set for describing the regularity of the acceleration curve of the shaft, wherein the second parameter set comprises second parameters of the x-axis, the y-axis and the z-axis;
generating a detection parameter set according to the first parameter set, the second parameter set and a preset detection main direction model, wherein the detection parameter set comprises detection parameters of the x axis, the y axis and the z axis;
and acquiring the axis with the strongest regularity of the acceleration curve from the x axis, the y axis and the z axis according to the detection parameter set, taking the direction of the axis with the strongest regularity as a main direction, and taking the acceleration curve of the axis with the strongest regularity as the acceleration curve of the main direction.
3. The method according to claim 2, wherein before generating a detection parameter set according to the first parameter set, the second parameter set and a preset detection main direction model, the detection parameter set comprising the detection parameters of the x-axis, the y-axis and the z-axis, the method comprises:
establishing a detection main direction model;
wherein,representing a proportionality coefficient, i representing a serial number, i having a value ranging from 1 to 3, α i representing the ith first parameter in the first parameter set, α1、α2、α3Respectively representing first parameters of x-axis, y-axis and z-axis, and theta i represents ith second parameter in the second parameter set1、θ2、θ3Respectively representing second parameters of x-axis, y-axis and z-axis, and Δ i representing ith detection parameter of the detection parameter set, and Δ1、Δ2、Δ3The detection parameters of the x-axis, the y-axis and the z-axis are respectively shown.
4. The method of claim 1, wherein after filtering the acceleration profile of the main direction using a predetermined filter, selecting an unprocessed peak on the acceleration profile of the main direction, and incrementing the statistical step number by one when the unprocessed peak occurs outside a predetermined time threshold of the processed peak and an acceleration value of the unprocessed peak is greater than a predetermined acceleration threshold, or wherein selecting the unprocessed peak on the acceleration profile of the main direction and incrementing the statistical step number by one when the unprocessed peak occurs outside a predetermined time threshold of the processed peak and an acceleration value of the unprocessed peak differs from the predetermined acceleration threshold by less than a predetermined value comprises:
extracting acceleration values of a preset number of wave crests from an acceleration curve in the main direction;
and selecting the median of the acceleration values of the wave crests with the preset number as an acceleration threshold.
5. The method according to claim 4, wherein after the selecting a median value of the acceleration values of the preset number of peaks as the acceleration threshold, further comprising:
subtracting the acceleration value of the processed wave crest from the acceleration threshold value in real time to generate an acceleration difference value;
and judging whether the absolute value of the acceleration difference is larger than a preset judgment threshold value, if so, adding the acceleration value of the processed wave crest and the acceleration threshold value to generate an added value, and updating the acceleration threshold value to be half of the added value, otherwise, not carrying out any treatment.
6. A step-counting device based on a three-axis accelerometer, comprising:
the acceleration curve acquisition module is used for acquiring acceleration curves of an x axis, a y axis and a z axis which are generated in the three-axis accelerometer in real time, acquiring the axis with the strongest regularity of the acceleration curve from the acceleration curves of the x axis, the y axis and the z axis, taking the direction of the axis with the strongest regularity as a main direction, and taking the acceleration curve of the axis with the strongest regularity as an acceleration curve of the main direction;
the filtering module is used for filtering the acceleration curve in the main direction by adopting a preset filter;
and the counting step number module is used for selecting an unprocessed wave crest on the acceleration curve of the main direction, adding one to the counting step number when the unprocessed wave crest appears beyond a preset time threshold value of the processed wave crest and the acceleration value of the unprocessed wave crest is greater than a preset acceleration threshold value, or selecting the unprocessed wave crest on the acceleration curve of the main direction, and adding one to the counting step number when the unprocessed wave crest appears beyond the preset time threshold value of the processed wave crest and the difference value between the acceleration value of the unprocessed wave crest and the preset acceleration threshold value is less than a preset value.
7. The apparatus of claim 6, wherein the acceleration curve acquisition module comprises:
the wave crest selecting unit is used for acquiring acceleration curves of an x axis, a y axis and a z axis generated in the three-axis accelerometer in real time, and selecting a preset number of wave crests from the acceleration curves of the x axis, the y axis and the z axis respectively;
the first parameter set generating unit is used for acquiring the time interval between every two wave crests from the selected preset number of wave crests, and generating the standard deviation of the difference value of the time interval between every two wave crests as a first parameter set for describing the regularity of the acceleration curve, wherein the first parameter set comprises first parameters of the x axis, the y axis and the z axis;
the second parameter set generating unit is used for sampling acceleration curves at two ends between three continuous wave crests in the selected wave crests in the preset number according to a preset sampling interval to generate discrete point acceleration values, acquiring the discrete point acceleration values at intervals of preset time, and generating a standard difference of a difference value of the discrete point acceleration values at every two intervals of preset time as a second parameter set for describing the regularity of the acceleration curves of the shaft, wherein the second parameter set comprises second parameters of the x-axis, the y-axis and the z-axis;
a detection parameter set detection unit, configured to generate a detection parameter set according to the first parameter set, the second parameter set, and a preset detection main direction model, where the detection parameter set includes detection parameters of the x-axis, the y-axis, and the z-axis;
and the acceleration curve acquisition unit is used for acquiring the axis with the strongest regularity of the acceleration curve from the x axis, the y axis and the z axis according to the detection parameter set, taking the direction of the axis with the strongest regularity as the main direction, and taking the acceleration curve of the axis with the strongest regularity as the acceleration curve of the main direction.
8. The apparatus of claim 7, further comprising:
the establishing module is used for establishing a detection main direction model;
wherein,representing a proportionality coefficient, i representing a serial number, i having a value ranging from 1 to 3, α i representing the ith first parameter in the first parameter set, α1、α2、α3Respectively representing first parameters of x-axis, y-axis and z-axis, and theta i represents ith second parameter in the second parameter set1、θ2、θ3Respectively representing second parameters of x-axis, y-axis and z-axis, and Δ i representing ith detection parameter of the detection parameter set, and Δ1、Δ2、Δ3The detection parameters of the x-axis, the y-axis and the z-axis are respectively shown.
9. The apparatus of claim 7, further comprising:
the acceleration value extraction module is used for extracting the acceleration values of the wave crests in a preset number from the acceleration curve in the main direction;
and the acceleration threshold generating module is used for extracting the median of the acceleration values of the wave crests of the preset number as the acceleration threshold according to the preset number and the extracted acceleration values.
10. The apparatus of claim 7, further comprising:
the acceleration difference generating module is used for subtracting the acceleration value of the processed wave crest from the acceleration threshold value in real time to generate an acceleration difference;
and the acceleration threshold updating module is used for judging whether the absolute value of the acceleration difference is greater than a preset judgment threshold, if so, adding the acceleration value of the processed wave peak and the acceleration threshold to generate an added value, and updating the acceleration threshold to be half of the added value, otherwise, not performing any processing.
CN201410526003.9A 2014-09-30 2014-09-30 A kind of step-recording method and device based on triaxial accelerometer Active CN105509762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410526003.9A CN105509762B (en) 2014-09-30 2014-09-30 A kind of step-recording method and device based on triaxial accelerometer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410526003.9A CN105509762B (en) 2014-09-30 2014-09-30 A kind of step-recording method and device based on triaxial accelerometer

Publications (2)

Publication Number Publication Date
CN105509762A true CN105509762A (en) 2016-04-20
CN105509762B CN105509762B (en) 2019-01-29

Family

ID=55717917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410526003.9A Active CN105509762B (en) 2014-09-30 2014-09-30 A kind of step-recording method and device based on triaxial accelerometer

Country Status (1)

Country Link
CN (1) CN105509762B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105920804A (en) * 2016-06-17 2016-09-07 北京景联传媒科技有限公司 Fitness equipment information networking system and fitness equipment information networking method
CN106649594A (en) * 2016-11-23 2017-05-10 腾讯科技(深圳)有限公司 Data displaying method and device
CN106767889A (en) * 2016-12-05 2017-05-31 广东思派康电子科技有限公司 A kind of step-recording method for being based on three axle G sensor
CN107314775A (en) * 2017-05-17 2017-11-03 浙江利尔达物联网技术有限公司 A kind of switching at runtime based on 3-axis acceleration sensor calculates the step-recording method of axle
CN107343789A (en) * 2017-05-17 2017-11-14 浙江利尔达物联网技术有限公司 A kind of step motion recognition method based on 3-axis acceleration sensor
CN107421559A (en) * 2017-07-19 2017-12-01 河南神州数码索贝科技有限公司 A kind of step-recording method based on three-axis gyroscope
CN107747950A (en) * 2017-09-28 2018-03-02 上海惠芽信息技术有限公司 Step recording method and device
CN109597390A (en) * 2017-09-30 2019-04-09 深圳迈瑞生物医疗电子股份有限公司 Motion control method, movement failure analysis methods and the Biochemical Analyzer of carrier
CN110201375A (en) * 2019-07-18 2019-09-06 歌尔科技有限公司 A kind of method, apparatus, equipment and the readable storage medium storing program for executing of wireless headset step counting
CN111238527A (en) * 2020-01-15 2020-06-05 桂林市优创电子科技有限公司 Step counting method based on three-axis acceleration sensor
CN111780780A (en) * 2020-06-16 2020-10-16 贵州省人民医院 Step counting method and device based on filter bank
CN113551687A (en) * 2021-09-23 2021-10-26 珠海市杰理科技股份有限公司 Step counting method, step counting device, step counting equipment, computer storage medium and chip
CN114377373A (en) * 2022-01-14 2022-04-22 北京数感科技有限公司 Method, system and equipment for analyzing take-off characteristics
CN117387655A (en) * 2023-12-12 2024-01-12 绍兴圆方半导体有限公司 Step counting method, step counting device, terminal and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2603376Y (en) * 2003-02-12 2004-02-11 方维行 Phonetic calorie pedometer with radio receiver
JP2006127192A (en) * 2004-10-29 2006-05-18 Sanyo Electric Co Ltd Counting device and program
EP2281612A1 (en) * 2009-08-04 2011-02-09 IDT Technology Limited Apparatus and method for counting exercise repetitions
CN202068975U (en) * 2011-03-17 2011-12-14 江苏太阳鸟校园服饰有限公司 Clothes capable of measuring heat consumption values
CN103148864A (en) * 2013-04-03 2013-06-12 哈尔滨工程大学 Universal micro electromechanical system (MEMS) pedometer and step counting method
US20130191069A1 (en) * 2012-01-19 2013-07-25 Texas Instruments Incorporated Adaptive Step Detection
CN103616034A (en) * 2013-12-10 2014-03-05 山东省计算中心 Network pedometer based on Bluetooth and step calculation method
CN103791915A (en) * 2014-02-12 2014-05-14 清华大学 Bluetooth connection-supported pedometer device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2603376Y (en) * 2003-02-12 2004-02-11 方维行 Phonetic calorie pedometer with radio receiver
JP2006127192A (en) * 2004-10-29 2006-05-18 Sanyo Electric Co Ltd Counting device and program
EP2281612A1 (en) * 2009-08-04 2011-02-09 IDT Technology Limited Apparatus and method for counting exercise repetitions
CN202068975U (en) * 2011-03-17 2011-12-14 江苏太阳鸟校园服饰有限公司 Clothes capable of measuring heat consumption values
US20130191069A1 (en) * 2012-01-19 2013-07-25 Texas Instruments Incorporated Adaptive Step Detection
CN103148864A (en) * 2013-04-03 2013-06-12 哈尔滨工程大学 Universal micro electromechanical system (MEMS) pedometer and step counting method
CN103616034A (en) * 2013-12-10 2014-03-05 山东省计算中心 Network pedometer based on Bluetooth and step calculation method
CN103791915A (en) * 2014-02-12 2014-05-14 清华大学 Bluetooth connection-supported pedometer device

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105920804A (en) * 2016-06-17 2016-09-07 北京景联传媒科技有限公司 Fitness equipment information networking system and fitness equipment information networking method
CN106649594A (en) * 2016-11-23 2017-05-10 腾讯科技(深圳)有限公司 Data displaying method and device
CN106649594B (en) * 2016-11-23 2020-02-07 腾讯科技(深圳)有限公司 Data display method and device
CN106767889A (en) * 2016-12-05 2017-05-31 广东思派康电子科技有限公司 A kind of step-recording method for being based on three axle G sensor
CN106767889B (en) * 2016-12-05 2020-08-04 广东思派康电子科技有限公司 Step counting method based on three-axis G-sensor
CN107314775B (en) * 2017-05-17 2019-09-10 浙江利尔达物联网技术有限公司 A kind of switching at runtime based on 3-axis acceleration sensor calculates the step-recording method of axis
CN107314775A (en) * 2017-05-17 2017-11-03 浙江利尔达物联网技术有限公司 A kind of switching at runtime based on 3-axis acceleration sensor calculates the step-recording method of axle
CN107343789A (en) * 2017-05-17 2017-11-14 浙江利尔达物联网技术有限公司 A kind of step motion recognition method based on 3-axis acceleration sensor
CN107343789B (en) * 2017-05-17 2020-04-14 浙江利尔达物芯科技有限公司 Step motion identification method based on three-axis acceleration sensor
CN107421559A (en) * 2017-07-19 2017-12-01 河南神州数码索贝科技有限公司 A kind of step-recording method based on three-axis gyroscope
CN107747950A (en) * 2017-09-28 2018-03-02 上海惠芽信息技术有限公司 Step recording method and device
CN109597390A (en) * 2017-09-30 2019-04-09 深圳迈瑞生物医疗电子股份有限公司 Motion control method, movement failure analysis methods and the Biochemical Analyzer of carrier
CN110201375A (en) * 2019-07-18 2019-09-06 歌尔科技有限公司 A kind of method, apparatus, equipment and the readable storage medium storing program for executing of wireless headset step counting
CN111238527A (en) * 2020-01-15 2020-06-05 桂林市优创电子科技有限公司 Step counting method based on three-axis acceleration sensor
CN111238527B (en) * 2020-01-15 2023-09-29 桂林市优创电子科技有限公司 Step counting method based on triaxial acceleration sensor
CN111780780A (en) * 2020-06-16 2020-10-16 贵州省人民医院 Step counting method and device based on filter bank
CN111780780B (en) * 2020-06-16 2022-06-03 贵州省人民医院 Step counting method and device based on filter bank
CN113551687A (en) * 2021-09-23 2021-10-26 珠海市杰理科技股份有限公司 Step counting method, step counting device, step counting equipment, computer storage medium and chip
CN114377373A (en) * 2022-01-14 2022-04-22 北京数感科技有限公司 Method, system and equipment for analyzing take-off characteristics
CN117387655A (en) * 2023-12-12 2024-01-12 绍兴圆方半导体有限公司 Step counting method, step counting device, terminal and storage medium
CN117387655B (en) * 2023-12-12 2024-03-15 绍兴圆方半导体有限公司 Step counting method, step counting device, terminal and storage medium

Also Published As

Publication number Publication date
CN105509762B (en) 2019-01-29

Similar Documents

Publication Publication Date Title
CN105509762B (en) A kind of step-recording method and device based on triaxial accelerometer
CN104197952B (en) A kind of user's walking step-recording method, device and mobile terminal
TWI518304B (en) A step counting method and pedometer based on 3-axis accelerometer
JP6567658B2 (en) Device and method for classifying user activity and / or counting user steps
US8849605B2 (en) Method and apparatus for sensor based pedestrian motion detection in hand-held devices
CN107277222B (en) User behavior state judgment method based on built-in sensor of mobile phone
CN105588577B (en) A kind of detection method and device of the abnormal step counting for sport monitoring device
CN104197934B (en) A kind of localization method based on earth magnetism, apparatus and system
US9398867B2 (en) Efficient activity classification from motion inputs
CN111536989B (en) Adaptive time window step counting method based on peak detection
CN105607759A (en) Semiconductor device, portable terminal device, and operation detecting method
CN110942019A (en) Analysis method for finding longest adjoint path of two tracks
EP2910954A1 (en) Method for counting steps and electronic apparatus using the same
CN105573630B (en) Detection terminal equipment shakes the method, apparatus and terminal device of event
US10496877B2 (en) Device and method of characterizing motion
CN114385012B (en) Motion recognition method, motion recognition device, electronic equipment and readable storage medium
CN107638165B (en) Sleep detection method and device
CN107632966B (en) Motion trajectory determination method and electronic equipment
CN107220021B (en) Voice input recognition method and device and head-mounted equipment
CN113314153B (en) Method, device, equipment and storage medium for detecting voice endpoint
JP6940813B2 (en) Step count device, step count method and program
US11112268B2 (en) Electronic device for performing step counting with false-positive rejection
CN112804043B (en) Clock asynchronism detection method, device and equipment
EP3364345B1 (en) Step-count measurement device and step count measurement program
CN108197082B (en) Step counting method based on step reliability estimation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Longgang District of Shenzhen City, Guangdong province 518116 Ping Street Takahashi Industrial Park East Area

Applicant after: SHENZHEN GRANDSUN ELECTRONIC Co.,Ltd.

Address before: Longgang District of Shenzhen City, Guangdong province 518116 Ping Street Takahashi Industrial Park East Area

Applicant before: SHENZHEN GRANDSUN ELECTRONIC Co.,Ltd.

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A step counting method and device based on three-axis accelerometer

Effective date of registration: 20230220

Granted publication date: 20190129

Pledgee: Bank of Communications Limited Shenzhen Branch

Pledgor: SHENZHEN GRANDSUN ELECTRONIC Co.,Ltd.

Registration number: Y2023980033001

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20190129

Pledgee: Bank of Communications Limited Shenzhen Branch

Pledgor: SHENZHEN GRANDSUN ELECTRONIC Co.,Ltd.

Registration number: Y2023980033001

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A step counting method and device based on three-axis accelerometer

Granted publication date: 20190129

Pledgee: Bank of Communications Limited Shenzhen Branch

Pledgor: SHENZHEN GRANDSUN ELECTRONIC Co.,Ltd.

Registration number: Y2024980007841

PE01 Entry into force of the registration of the contract for pledge of patent right