CN109029492B - Step counting method and device and wrist step counting equipment - Google Patents

Step counting method and device and wrist step counting equipment Download PDF

Info

Publication number
CN109029492B
CN109029492B CN201811189060.7A CN201811189060A CN109029492B CN 109029492 B CN109029492 B CN 109029492B CN 201811189060 A CN201811189060 A CN 201811189060A CN 109029492 B CN109029492 B CN 109029492B
Authority
CN
China
Prior art keywords
acceleration
vertical acceleration
time point
vertical
preset time
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.)
Active
Application number
CN201811189060.7A
Other languages
Chinese (zh)
Other versions
CN109029492A (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.)
Weifang Goertek Electronics Co Ltd
Original Assignee
Weifang Goertek 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 Weifang Goertek Electronics Co Ltd filed Critical Weifang Goertek Electronics Co Ltd
Priority to CN201811189060.7A priority Critical patent/CN109029492B/en
Publication of CN109029492A publication Critical patent/CN109029492A/en
Application granted granted Critical
Publication of CN109029492B publication Critical patent/CN109029492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C22/00Measuring distance traversed on the ground by vehicles, persons, animals or other moving solid bodies, e.g. using odometers, using pedometers
    • G01C22/006Pedometers

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • User Interface Of Digital Computer (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The invention discloses a step counting method, which relates to the field of wrist step counting equipment and is used for accurately counting steps; the method comprises the following steps: converting the acceleration in the collected preset time period into vertical acceleration and horizontal resultant acceleration under a world coordinate system, and calculating to obtain vertical acceleration of hand movement corresponding to each preset time point by utilizing a hand movement resultant acceleration invariance principle according to the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point; then a vertical acceleration function corresponding to the hand movement is obtained by utilizing a fitting algorithm; calculating the vertical acceleration of leg motion corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function, and calculating the step; the method carries out noise reduction processing on the acquired acceleration, removes interference of hand movement, and further improves accuracy of step counting calculation. The invention also discloses a step counting device, wrist step counting equipment, a method for reducing noise of acceleration data and a computer readable storage medium, and has the beneficial effects.

Description

Step counting method and device and wrist step counting equipment
Technical Field
The invention relates to the technical field of motion detection, in particular to a step counting method and device, wrist step counting equipment, an acceleration data noise reduction method and a computer readable storage medium.
Background
At present, when the wrist strap is used for step counting calculation, the data collected by an accelerometer in the wrist strap is directly used as a whole to calculate the number of steps of walking of a user. However, the data collected by the accelerometer on the wrist strap is the resultant movement of the hand, i.e., the data includes both leg and hand movements. However, hand movement is present as noise for step counting calculations. Therefore, the step counting result is inaccurate due to the introduction of a large amount of noise when the step number of the user walking is calculated by directly utilizing the acceleration data collected by the accelerometer in the wrist strap.
Disclosure of Invention
The invention aims to provide a step counting method, a step counting device, wrist step counting equipment, an acceleration data noise reduction method and a computer readable storage medium, which can reduce noise of collected acceleration, remove interference of hand motion and further improve the accuracy of step counting calculation.
In order to solve the above technical problem, the present invention provides a step counting method applied to a wrist step counting device, the method comprising:
converting the acceleration collected within a preset time period into a vertical acceleration and a horizontal resultant acceleration under a world coordinate system, and determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point;
calculating to obtain the vertical acceleration of the hand body movement corresponding to each preset time point by utilizing the principle that the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are unchanged;
according to the vertical acceleration of each hand motion, a vertical acceleration function corresponding to the hand motion is obtained by using a fitting algorithm;
calculating the vertical acceleration of leg body movement corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function;
and calculating the step by utilizing the vertical acceleration of the leg body movement.
Optionally, after determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point, the method further includes:
judging whether the maximum value of the horizontal combined acceleration under the world coordinate system exceeds a threshold value or not;
if so, executing the step of calculating to obtain the vertical acceleration of the hand movement corresponding to each preset time point by utilizing the principle that the combined acceleration of the hand movement does not change according to the vertical acceleration and the horizontal combined acceleration corresponding to each preset time point;
if not, the step counting calculation is directly carried out by utilizing the vertical acceleration under the world coordinate system.
Optionally, the determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point includes:
determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point A;
determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point B;
and the time point C with the horizontal resultant acceleration of 0 is positioned between the time point A and the time point B.
Optionally, the time point a is a time corresponding to a wave peak value in the horizontal combined acceleration, and the time point B is a time corresponding to a wave valley value in the horizontal combined acceleration.
Optionally, the determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point a includes:
taking the average value of all wave peak values in the horizontal resultant acceleration within the preset time period as the horizontal resultant acceleration of the time point A, and taking the average value of all wave peak values in the vertical acceleration within the preset time period as the vertical acceleration of the time point A;
correspondingly, the determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point B includes:
and taking the average value of all valley values in the horizontal resultant acceleration within the preset time period as the horizontal resultant acceleration of the time point B, and taking the average value of all valley values in the vertical acceleration within the preset time period as the vertical acceleration of the time point B.
Optionally, according to the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point, calculating to obtain the vertical acceleration of the hand movement corresponding to each preset time point by using the principle that the resultant acceleration of the hand movement is not changed, including:
using formulas
Figure BDA0001827003790000031
Calculating to obtain vertical acceleration of hand movement corresponding to the time point A, the time point B and the time point C;
the hand motion control method comprises the following steps that x _ A is the horizontal resultant acceleration corresponding to the moment point A, Y _ A is the vertical acceleration corresponding to the moment point A, Y _ A is the vertical acceleration of hand motion corresponding to the moment point A, x _ B is the horizontal resultant acceleration corresponding to the moment point B, Y _ B is the vertical acceleration corresponding to the moment point B, Y _ B is the vertical acceleration of hand motion corresponding to the moment point B, and Y _ C is the vertical acceleration of hand motion corresponding to the moment point C, wherein the horizontal resultant acceleration is 0.
Optionally, obtaining a vertical acceleration function corresponding to the hand motion by using a fitting algorithm according to the vertical acceleration of the hand motion includes:
and according to the vertical acceleration of each hand motion, obtaining a vertical acceleration function corresponding to the hand motion by utilizing a linear interpolation algorithm.
The invention also provides a step-counting device, which is applied to wrist step-counting equipment and comprises:
the first calculation module is used for converting the acquired acceleration within the preset time period into a vertical acceleration and a horizontal resultant acceleration under a world coordinate system and determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point;
the second calculation module is used for calculating to obtain the vertical acceleration of the hand body movement corresponding to each preset time point by utilizing the principle that the combined acceleration of the hand body movement does not change according to the vertical acceleration and the horizontal combined acceleration corresponding to each preset time point;
the third calculation module is used for obtaining a vertical acceleration function corresponding to the hand motion by utilizing a fitting algorithm according to the vertical acceleration of the hand motion;
the fourth calculation module is used for calculating the vertical acceleration of leg body movement corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function;
and the step counting module is used for counting steps by utilizing the vertical acceleration of the leg body movement.
The present invention also provides a wrist step counter device, comprising:
the accelerometer is used for acquiring the acceleration within a preset time period;
a memory for storing a computer program;
a processor for implementing the steps of the step counting method when executing the computer program.
The invention also provides a method for reducing noise of acceleration data, which is applied to wrist step counting equipment and comprises the following steps:
converting the acceleration collected within a preset time period into a vertical acceleration and a horizontal resultant acceleration under a world coordinate system, and determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point;
calculating to obtain the vertical acceleration of the hand body movement corresponding to each preset time point by utilizing the principle that the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are unchanged;
according to the vertical acceleration of each hand motion, a vertical acceleration function corresponding to the hand motion is obtained by using a fitting algorithm;
and calculating the vertical acceleration of the leg body motion corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above mentioned step counting method and/or the steps of the above mentioned method for reducing noise in acceleration data.
The invention provides a step counting method, which comprises the following steps: converting the acceleration collected within a preset time period into a vertical acceleration and a horizontal resultant acceleration under a world coordinate system, and determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point; calculating to obtain vertical acceleration of hand body movement corresponding to each preset time point by utilizing the principle that the corresponding vertical acceleration and the corresponding horizontal resultant acceleration of the hand body movement are unchanged according to the corresponding vertical acceleration and the corresponding horizontal resultant acceleration of each preset time point; according to the vertical acceleration of each hand motion, a vertical acceleration function corresponding to the hand motion is obtained by using a fitting algorithm; calculating the vertical acceleration of leg motion corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function; and (4) calculating the step by utilizing the vertical acceleration of the leg body movement.
Therefore, the method carries out noise reduction processing on the originally acquired acceleration, namely removes the acceleration related to the hand motion in the originally acquired acceleration to obtain the vertical acceleration of the leg motion only related to the leg motion, and carries out step counting calculation by utilizing the vertical acceleration of the leg motion; because the vertical acceleration of the leg body movement is only related to the leg movement, the noise in the acquired acceleration is removed without the interference of the hand body movement, and the accuracy of step counting calculation is further improved. The invention also provides a step counting device, wrist step counting equipment, a method for reducing noise of acceleration data and a computer readable storage medium, which have the beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a step counting method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of attitude resolution provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of a world coordinate system provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of the rotation axes corresponding to the three attitude angles provided by the embodiment of the invention;
FIG. 5 is a schematic view of rotation about an X-axis provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of an exemplary posture of a human body when walking according to an embodiment of the present invention;
FIG. 7 is an exploded view of the exemplary body position provided in FIG. 6 with respect to two end points;
FIG. 8 is an exploded view of an arm at its lowest point according to an embodiment of the present invention;
FIG. 9 is a graph illustrating the horizontal resultant acceleration over time, as provided by an embodiment of the present invention;
FIG. 10 is a schematic illustration of vertical acceleration in a world coordinate system over a period of time corresponding to FIG. 9;
FIG. 11 is a schematic diagram of a half-cycle vertical acceleration function provided by an embodiment of the present invention;
FIG. 12 is a schematic illustration of the acceleration collected provided by an embodiment of the present invention;
FIG. 13 is a schematic diagram of acceleration corresponding to hand movement according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of acceleration corresponding to leg movements provided by an embodiment of the present invention;
fig. 15 is a block diagram of a step counter according to an embodiment of the present invention;
fig. 16 is a flowchart of a method for denoising acceleration data according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the related art, the acceleration collected by the accelerometer is directly used to calculate the number of steps of walking, and the acceleration is the resultant motion of the hand, that is, the acceleration includes both the acceleration corresponding to the motion of the leg and the acceleration corresponding to the motion of the hand. The data collected by the accelerometer is directly treated as a whole, and the hand movement is added into the step counting calculation, so that a large amount of noise is introduced into the step counting calculation, and the step counting result is inaccurate. The embodiment performs noise reduction processing on the acquired acceleration, so that the acceleration before entering step counting calculation is not interfered by hand motion, namely, the acceleration participating in the step counting calculation is only related to leg motion, and the accuracy of the step counting calculation is further improved. Referring to fig. 1, fig. 1 is a flowchart of a step counting method according to an embodiment of the present invention; the method is applied to a wrist step-counting device and can comprise the following steps:
s100, converting the collected acceleration within the preset time period into a vertical acceleration and a horizontal resultant acceleration under a world coordinate system, and determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point.
The acceleration collected by the wrist step counting device is the resultant motion of the hand body, and comprises the acceleration corresponding to the motion of the leg body and the acceleration corresponding to the motion of the hand body. In order to remove the influence of the hand movement from the collected acceleration, the present embodiment first converts the collected acceleration into a vertical acceleration and a horizontal resultant acceleration in the world coordinate system. The reason is that in the walking process, an overweight and weightlessness process exists, and the walking steps can be obtained by calculating the conversion times of overweight and weightlessness. It can be seen that the step counting process is only related to the conversion times of overweight and weightlessness, that is, only related to the acceleration in the gravity direction, that is, the acceleration in the vertical direction under the world coordinate system, but not related to the acceleration in the horizontal direction, so that the acceleration in the horizontal direction does not need to be considered in the step counting calculation process, the noise of the acquired acceleration is reduced, and the step counting precision is improved. In the embodiment, the vertical acceleration of the leg body movement is adopted when the step counting calculation is carried out, namely, the step counting calculation is carried out by only utilizing the acceleration in the vertical direction, the acceleration in the horizontal direction is removed, and the interference of the hand body movement in the horizontal direction is correspondingly removed.
The horizontal direction and the vertical direction are both world coordinate systems, so that the embodiment converts the acceleration acquired within the preset time period into the vertical acceleration and the horizontal resultant acceleration in the world coordinate systems. The present embodiment does not limit the specific manner of acquiring the acceleration within the preset time period, and may acquire the acceleration through an accelerometer, for example. The embodiment also does not limit the specific process of converting the collected acceleration into the vertical acceleration and the horizontal resultant acceleration in the world coordinate system. For example, when an accelerometer is used to acquire acceleration, the spatial attitude angle of a wrist step-counting device (such as a wrist strap) can be calculated in real time, and the real-time acceleration values in three directions of the accelerometer are projected to the vertical direction under the corresponding geographic coordinate system (i.e., the world coordinate system) through the spatial attitude angle. Referring to fig. 2 to 5, the specific process may be as follows:
first of all, it is necessary to collectAnd carrying out attitude calculation on the accelerated speed to obtain a roll angle and a pitch angle. The calculation process is shown in FIG. 2, wherein roll is roll angle, pitch is pitch angle, and G isX、GY、GZThe acceleration values acquired for the three axes of the current accelerometer are g, which is a gravitational acceleration constant, and the value of the gravitational acceleration constant is not limited in this embodiment (for example, 9.8 may be taken). It is emphasized that the final angles are relative to the world coordinate system shown in fig. 3, where xyz of the world coordinate system corresponds to D under north N east E, respectively. Since this step maps the acceleration acquired in real time to the vertical direction of the world coordinate system, rotation about the vertical direction does not affect the final mapping equation. Therefore, only the roll angle and the pitch angle need to be obtained, and the problem of the change of the heading angle does not need to be concerned (refer to fig. 4 in particular).
Next, the spatial transformation is decomposed into rotation along the Y axis and then along the X axis (of course, rotation along the X axis and then along the Y axis may be performed). Taking rotation around X as an example, the rotation process is derived, and referring to fig. 5, it can be seen that the rotation angle from the coordinate systems Y1-Z1 to the coordinate systems Y2-Z2 is phi. And particularly, the rotating formula is pushed through the transformation of the coordinates of the F point. The coordinates of the point F in the Y1-Z1 coordinate system are (ry1, rz1), the coordinates of the point F in the rotated Y2-Z2 coordinate system are (ry2, rz2), the corresponding coordinates of the axis X are not changed, and the process of the rotation conversion relationship of the two coordinate systems derived from the geometric relationship is concretely as follows:
an X axis: rx2 ═ rx1
Y-axis: ry2 ═ CA + AB + BC ═ ry1cos φ + BDsin φ + BFsin φ ═ ry1cos φ + rz1sin φ
Z-axis: rz 2-DE-DA-rz 1cos phi-ry 1sin phi
Further, the conversion formula is obtained as follows:
Figure BDA0001827003790000071
similarly, according to the above process, it can be derived that the coordinate system rotates around Y by the rotation angle θ, the coordinate system before the rotation is (rx2, rz2), the coordinate system after the rotation is (rx3, rz3), the corresponding Y-axis coordinate is not changed, and the corresponding conversion formula is:
Figure BDA0001827003790000081
and then rotate around X axle first and then rotate around Y axle, then total rotation matrix equals the product of two matrixes, specifically as follows:
Figure BDA0001827003790000082
Figure BDA0001827003790000083
the current coordinates corresponding to the acquired acceleration are (rx3, ry3, rz3) and are (rx1, ry1, rz1) in the world coordinate system, so that the following conversion formula (2) can be obtained only by inverting the matrix (1):
Figure BDA0001827003790000084
and then the vertical acceleration under the corresponding world coordinate system is rz1, and the vertical acceleration removes the influence of the horizontal motion in the movement of the accelerometer, namely removes the interference of the horizontal motion of the hand body on the subsequent step counting calculation. Wherein rz1 is rx3(-sin θ cos Φ) + ry3(sin Φ) + rz3(cos θ).
Further, the acceleration due to the hand movement exists not only in the horizontal direction but also in the vertical direction. The vertical acceleration in the world coordinate system at this time still includes the acceleration of the hand motion in the vertical direction, although the influence of the hand motion in the horizontal direction is removed. The subsequent step in this embodiment is to remove the vertical acceleration corresponding to the hand movement from the obtained vertical acceleration in the world coordinate system. Thereby realizing the complete removal of hand movement.
However, the present embodiment does not limit the value of the preset time period, and for example, the time period may be a time period required for walking one step, a time period required for walking one step by each foot, or a time period set in 5 seconds, 10 seconds, or the like. The user may choose based on the accuracy of the actual step-counting requirements and the actual computing power of the hardware, etc.
In this embodiment, the number of the preset time points is not limited, and for example, the preset time points may be two time points (for example, a time corresponding to a peak value in the horizontal resultant acceleration and a time corresponding to a valley value in the horizontal resultant acceleration); or three time points (e.g., a time point at which the horizontal resultant acceleration is 0, and time points at the left and right sides of the time point at which the horizontal resultant acceleration is 0); of course, four time points (for example, two time points on the left and right sides of the time point with the horizontal resultant acceleration of 0) may be used; but can be any value greater than four. The user can select the accuracy of the actual step-counting requirement, the requirement of the selected fitting algorithm, the actual computing capacity of the hardware and the like. Further, in this embodiment, the amplitude value of the acceleration acquired at the preset time point is not limited, and for example, the amplitude value may be a time corresponding to a peak value in the horizontal resultant acceleration and a time corresponding to a valley value in the horizontal resultant acceleration, and may also be understood as a time corresponding to a peak value in the vertical resultant acceleration and a time corresponding to a valley value in the vertical resultant acceleration; of course, the time corresponding to any acceleration value in the horizontal resultant acceleration and the time corresponding to any acceleration value in the horizontal resultant acceleration may be used.
And S110, calculating to obtain the vertical acceleration of the hand body movement corresponding to each preset time point by utilizing the principle that the hand body movement is unchanged according to the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point.
Specifically, the vertical acceleration of the hand movement corresponding to each preset time point is calculated according to the acquired vertical acceleration and horizontal resultant acceleration corresponding to each preset time point, and the hand movement and leg movement rules are combined. The vertical acceleration function corresponding to the hand motion can be obtained in the subsequent steps according to the vertical acceleration of the hand motion corresponding to each preset time point in a fitting mode, the vertical acceleration of the hand motion corresponding to any time point can be determined through the vertical acceleration function of the hand motion, the vertical acceleration of the hand motion can be removed from the vertical acceleration of the world coordinate system of each time point, and the hand motion can be completely removed.
In order to obtain the acceleration of the hand motion in the vertical direction, the law of the hand motion needs to be decomposed. Referring to fig. 6, fig. 6 shows a typical posture of a human body when walking. As can be seen from FIG. 6, the maximum swing angles of the human arm in the swing process are different when the human walks, and the general swing angle in the forward direction is larger than that in the backward direction. The arm is decomposed at two end points for the posture in fig. 6, and the decomposed diagram can refer to fig. 7. The arm swing can be regarded as a simple pendulum-like motion, wherein the simple pendulum is used for decomposing the acceleration into tangential acceleration and normal acceleration; accordingly, the acceleration of the hand motion can be decomposed into a horizontal acceleration of the hand motion and a vertical acceleration of the hand motion. The corresponding exploded view when the arm is at the lowest point can be referred to fig. 8, i.e. the lowest point is point C in fig. 8. The normal acceleration is the vertical acceleration of the hand movement, and the tangential acceleration is the horizontal acceleration of the hand movement (0 in this case).
In this embodiment, it is considered that the resultant acceleration is constant during the arm swinging process, i.e. the principle that the resultant acceleration of the hand movement is constant, that is, the sum of the square of the vertical acceleration of the hand movement corresponding to any one time point and the square of the horizontal acceleration of the hand movement is equal. The horizontal acceleration of the hand movement, i.e., the horizontal resultant acceleration in the world coordinate system, can be obtained in step S100. Namely, the numerical relationship of the square of the vertical acceleration of the hand movement corresponding to any two time points can be obtained through the principle of the hand movement and the acceleration invariance. And because the maximum swing angles of the arm in the front and the back in the swinging process are different (the general swing angle in the front direction is larger than that in the back direction). During walking or running, the leg body can also be understood as the vertical acceleration generated by the foot is basically the same whether the arm is at the front end point or the rear end point. This is because walking or running with both feet is a symmetrical process. However, the peaks and valleys in the obtained vertical acceleration are not completely symmetrical, that is, the vertical accelerations corresponding to the peaks and valleys are not the same. The wrist pedometer is only worn on one arm, and the vertical accelerations of the arm corresponding to the hand movement at the front end point and the rear end point are different, so that the vertical accelerations are superposed with the vertical accelerations of the leg movement, and the phenomenon that the wave crest and the wave trough in the vertical accelerations are not completely symmetrical is caused. Through the above process, it can be found that the vertical accelerations generated by the legs of the arm at the front end point and the rear end point are substantially the same, and therefore, the absolute value of the difference between the vertical accelerations corresponding to the peak and the trough in the vertical accelerations, that is, the difference between the vertical accelerations corresponding to the hand movements of the arm at the front end point and the rear end point, is obtained.
That is, the vertical accelerations corresponding to the leg movements are changed symmetrically, so that the difference between the vertical accelerations corresponding to any two symmetrical time points in the world coordinate system is the difference between the vertical accelerations corresponding to the two time points in the hand movements. And then the numerical relationship of the square of the vertical acceleration of the hand movement corresponding to the two time points is combined. The vertical acceleration of the hand motion corresponding to the two time points can be calculated. When a plurality of preset time points are provided, the calculation process can be referred to, and the calculation is carried out pairwise, so that the vertical acceleration of the hand movement corresponding to each preset time point is finally obtained.
The calculation process is described below by taking two preset time points as an example, where the two preset time points are respectively a time corresponding to a peak value in the horizontal resultant acceleration and a time corresponding to a valley value in the horizontal resultant acceleration, such as a time point a and a time point B in fig. 9, wherein, FIG. 9 is the horizontal resultant acceleration with time, FIG. 10 is the vertical acceleration with time in the world coordinate system (i.e. the vertical acceleration includes two parts: the acceleration of the leg body movement in the vertical direction and the acceleration of the hand body movement in the vertical direction), fig. 10 corresponds to both time points in fig. 9 (i.e., the horizontal axes in fig. 9 and 10 are both time, the vertical axis in fig. 9 is horizontal acceleration, and the vertical axis in fig. 10 is vertical acceleration), a _ time in fig. 10 is time corresponding to a point in fig. 9, B _ time is time corresponding to B point in fig. 9, and C _ time is time corresponding to C point in fig. 9. Suppose that the vertical acceleration Y _ a corresponding to the time point a (i.e., the acceleration value corresponding to the time point a _ time in fig. 10, that is, the vertical acceleration in the world coordinate system) and the resultant horizontal acceleration x _ a and vertical acceleration Y _ a of the hand movement, the vertical acceleration Y _ B corresponding to the time point B (i.e., the acceleration value corresponding to the time point B _ time in fig. 10, that is, the vertical acceleration in the world coordinate system) and the resultant horizontal acceleration x _ B and vertical acceleration Y _ B of the hand movement.
From the above analysis, the following equations can be obtained, where x _ a and x _ B can be read from fig. 9, that is, the horizontal resultant acceleration values corresponding to the time point a and the time point B in fig. 9. Y _ a and Y _ B can be read from fig. 10, that is, the vertical acceleration values corresponding to the time points a _ time and B _ time in fig. 10, and the difference between the values, that is, the difference between Y _ a and Y _ B.
Figure BDA0001827003790000111
The vertical acceleration of the hand body movement corresponding to the time point A and the time point B, namely y _ A and y _ B, can be obtained by solving the equation. At this time, the vertical acceleration of the hand movement corresponding to the time point a and the time point B can be calculated.
And S120, obtaining a vertical acceleration function corresponding to the hand motion by utilizing a fitting algorithm according to the vertical acceleration of the hand motion.
In this embodiment, the fitting algorithm is not limited. Needs to be determined according to the type of curve that the user actually fits. The fitting algorithm may be a linear interpolation algorithm, for example, when it is desired to fit it to a straight line.
Further, in order to improve the fitting speed of the vertical acceleration function and further improve the calculation speed of the wrist step-counting device, the wrist step-counting device can be fitted into a straight line, and the obtained vertical acceleration function is a linear function. Preferably, according to the vertical acceleration of each hand motion, the vertical acceleration function corresponding to the hand motion obtained by using the fitting algorithm is specifically as follows: and according to the vertical acceleration of each hand motion, obtaining a vertical acceleration function corresponding to the hand motion by utilizing a linear interpolation algorithm.
The embodiment does not limit the specific process of obtaining the vertical acceleration function corresponding to the hand motion by using the linear interpolation algorithm according to the vertical acceleration of each hand motion. Which can be determined according to the actual situation of the selected preset time point. For example, when the number of the preset time points is two, two vertical accelerations of the hand movement are obtained, and the finally obtained vertical acceleration function corresponds to the preset time period. For example, if the preset time period is short and only includes the time corresponding to the horizontal resultant acceleration of the hand movement from the peak value to the valley value (please refer to the point a to the point B in fig. 9), the obtained vertical acceleration function is a function of a half cycle corresponding to the hand movement (generally, the half cycle is a minimum analysis unit, because the subsequent cycle, for example, one cycle can be obtained symmetrically by the half cycle, and a plurality of cycles can be obtained repeatedly according to the one cycle), and the vertical acceleration function corresponding to the half cycle can refer to fig. 11. It can be seen from fig. 11 that the resulting vertical acceleration function is not a straight line, but a broken line. To fit the polyline to the vertical acceleration of the hand movement, i.e. to the points in the corresponding polyline, at least 3 points, i.e. the inflection point C and the two end points a and B, need to be determined. The present embodiment does not limit the determination manner of these 3 points. For example, time points corresponding to the two endpoints a and B can be directly selected as preset time points, the vertical acceleration of the hand movement corresponding to the two endpoints a and B is obtained through calculation in the steps, then the vertical acceleration of the hand movement corresponding to the inflection point C is obtained through calculation according to the principle that the hand movement is invariable in acceleration, and at the moment, the vertical acceleration function corresponding to the three vertical accelerations of the hand movement can be obtained through linear function fitting. Or directly selecting time points corresponding to the two endpoints a and B and the inflection point C as preset time points, calculating through the steps to obtain the vertical acceleration of the hand movement corresponding to the two endpoints a and B and the inflection point C, and then obtaining the corresponding vertical acceleration function according to the three vertical acceleration of the hand movement by utilizing linear function fitting. Of course, at least two points are selected from the point a to the point C as the preset time points, at least two points are selected from the point C to the point B as the preset time points, and the vertical acceleration of the hand movement corresponding to each preset time point is obtained through the above steps, at this time, the straight line where the point a and the point C are located (i.e., the vertical acceleration function corresponding to the point a and the point C) can be obtained by utilizing the first-order function to fit the vertical acceleration of the hand movement corresponding to the preset time point selected from the point a to the point C, and at this time, the straight line where the point C and the point B are located (i.e., the vertical acceleration function corresponding to the point C and the point B) can be obtained by utilizing the first-order function to fit the vertical acceleration of the hand movement corresponding to the preset time point selected from the point C to the point B, the intersection point of the two straight lines, namely the inflection point C, can determine two endpoints A and B according to the corresponding time points of the two endpoints.
And S130, calculating the vertical acceleration of the leg body movement corresponding to the vertical acceleration in the world coordinate system by using the vertical acceleration function.
The main purpose of this step is to compensate the vertical acceleration in the world coordinate system, i.e. to remove the vertical direction acceleration data caused by the hand movement from the vertical acceleration in the world coordinate system. Specifically, each vertical acceleration in the world coordinate system is respectively subtracted from the corresponding vertical acceleration of the hand movement in the vertical acceleration function, so as to obtain the vertical acceleration of the leg movement. That is, when the vertical acceleration function is represented as data1(i) and the vertical acceleration in the world coordinate system is represented as data (i), the leg body movement vertical acceleration data2(i) ═ data (i) -data1 (i).
The resulting effect of vertical acceleration of leg motion can be seen from the acceleration data provided in fig. 12-14, where the horizontal axis of fig. 12-14 is time and the vertical axis is acceleration amplitude. In particular, FIG. 12 is raw acceleration data collected by a wrist step-counting device (e.g., wrist strap) worn on the arm. Fig. 13 is acceleration data corresponding to the hand movement obtained in the manner in the present embodiment; fig. 14 is acceleration data corresponding to leg body movement obtained by subtracting the acceleration data corresponding to hand body movement in fig. 13 from the original acceleration data in fig. 12. It is apparent from comparison that fig. 14 more clearly depicts the fluctuations of each step than fig. 12. FIG. 14 will be very powerful in the unified calculation of amplitude for each step in subsequent ticks. The verification process can prove that the method effectively eliminates the interference of the hand movement, and also eliminates the noise in the acquired acceleration, thereby improving the accuracy of step counting calculation.
And S140, calculating the step by utilizing the vertical acceleration of the leg body movement.
In the step, the step counting calculation is carried out by utilizing the vertical acceleration of the leg body movement after the noise reduction, so that the interference of the hand body movement does not exist, and the rest vertical direction acceleration, namely the vertical acceleration of the leg body movement is only caused by the leg movement. The influence of hand motion on the step-counting algorithm is removed to a great extent, and finally the calculation result of step-counting calculation is close to the measured value of wrist step-counting equipment bound on the waist or the leg, so that the noise reduction processing of acceleration data acquired by the wrist step-counting equipment is realized, the source of noise is reduced, and the accuracy of the algorithm is improved. The present embodiment does not limit the step counting calculation process using the noise-reduced vertical acceleration of the leg body movement, and for example, it may refer to the step counting calculation process using the collected acceleration in the related art.
Further, because the amplitude and frequency of each walking are small within a certain time, and the walking amplitude and frequency are considered to be the same, at this time, the vertical acceleration function corresponding to the hand motion within a preset time period can be calculated only according to the method, and the vertical acceleration function corresponding to the hand motion is utilized to perform noise reduction processing on the vertical acceleration under the world coordinate system calculated in the current walking process (the vertical acceleration under the world coordinate system includes the vertical acceleration within the preset time period and also includes the vertical acceleration under the world coordinate system obtained subsequently outside the preset time period). That is, in the present embodiment, in order to further reduce the number of times of calculating the vertical acceleration function corresponding to the hand movement under the condition of ensuring the accuracy of the step counting calculation, so as to reduce the calculation amount, and further improve the efficiency of the step counting calculation. Preferably, in this embodiment, a vertical acceleration function calculation process corresponding to the hand movement may be started according to a preset period (the calculation process may be step S100 to step S130). Specifically, the present embodiment does not limit the preset period, and may be any time longer than the preset time period; or one-time walking process is taken as a period; of course, the calculation process of the vertical acceleration function corresponding to the hand movement may be started after the change of the walking range exceeds the set value. The user can select according to the actual application scene.
Based on the technical scheme, the step counting method provided by the embodiment of the invention can perform noise reduction on the originally acquired acceleration, namely remove the acceleration related to the hand motion in the originally acquired acceleration to obtain the vertical acceleration of the leg motion only related to the leg motion, and perform step counting calculation by using the vertical acceleration of the leg motion; because the vertical acceleration of the leg body movement is only related to the leg movement, the noise in the acquired acceleration is removed without the interference of the hand body movement, and the accuracy of step counting calculation is further improved.
Based on the above embodiment, in order to reduce the calculation complexity and improve the efficiency of step counting calculation, preferably, only two preset time points are selected in this embodiment, and the vertical acceleration function corresponding to the hand movement is obtained by using a linear interpolation algorithm according to the vertical acceleration of the hand movement at the two preset time points. Further, because the number of the selected preset time points is small, in order to improve the accuracy of the linear interpolation algorithm for obtaining the vertical acceleration function corresponding to the hand movement, determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point in the embodiment may include:
determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point A;
determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point B;
the time point C at which the horizontal resultant acceleration is 0 is located in the middle between the time point a and the time point B.
Specifically, in this embodiment, the time point a and the time point B are not otherwise limited, as long as they are equidistant from the time point C at which the horizontal resultant acceleration is 0, that is, the time interval from the time point a to the time point C is equal to the time interval from the time point C to the time point B. Therefore, the corresponding vertical accelerations of the leg body movement are ensured to be basically the same, and the subtraction value of the vertical accelerations in the world coordinate system corresponding to the time point A and the time point B is closer to the difference value of the vertical accelerations of the hand body movement corresponding to the time point A and the time point B. And the obtained vertical acceleration of the hand motion corresponding to the time point A and the time point B is more accurate.
Of course, the corresponding vertical acceleration function of the hand motion is convenient to fit subsequently. So that it can quickly determine the two end points (e.g., point a and point B in fig. 11) corresponding to the horizontal and resultant acceleration of the hand body movement. And the accuracy of the linear interpolation algorithm for obtaining the vertical acceleration function corresponding to the hand motion is further improved on the basis of the embodiment. Preferably, the time point a may be a time corresponding to a peak value in the horizontal resultant acceleration, and the time point B may be a time corresponding to a valley value in the horizontal resultant acceleration. Correspondingly, according to the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point, the hand motion vertical acceleration corresponding to each preset time point can be calculated by using the hand motion resultant acceleration invariance principle, and the calculation can include:
using formulas
Figure BDA0001827003790000151
Calculating to obtain vertical acceleration of hand movement corresponding to the time point A, the time point B and the time point C;
the hand motion control method comprises the following steps that x _ A is the horizontal resultant acceleration corresponding to the moment point A, Y _ A is the vertical acceleration corresponding to the moment point A, Y _ A is the vertical acceleration of hand motion corresponding to the moment point A, x _ B is the horizontal resultant acceleration corresponding to the moment point B, Y _ B is the vertical acceleration corresponding to the moment point B, Y _ B is the vertical acceleration of hand motion corresponding to the moment point B, and Y _ C is the vertical acceleration of hand motion corresponding to the moment point C, wherein the horizontal resultant acceleration is 0. The vertical acceleration of the hand movement corresponding to the time point C is calculated, so that the time point C is not required to be selected in the presetting of the time point. Only time point a and time point B need to be selected. At this time, the time point a and the time point B correspond to the peak value and the trough value respectively, so that the difference value between the two values is relatively large, and further the influence of some accidental factors can be avoided. For example, it can be avoided that the value of the contingency factor is small when the difference between the two values is small, but the result can be greatly influenced because the value of the contingency factor and the difference between the two values belong to the same level.
In the above embodiments, there is no specific way to determine the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point according to the vertical acceleration and the horizontal resultant acceleration in the world coordinate system. For example, each preset time point can be directly found from the vertical acceleration and the horizontal resultant acceleration in the world coordinate system, and then the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are determined; of course, all or part (for example, a selected number of numerical values) of the vertical accelerations corresponding to the time points having a periodic relationship with the preset time point within the preset time period may be averaged together to be used as the vertical acceleration of the preset time point, and all or part of the horizontal resultant accelerations corresponding to the time points having a periodic relationship with the preset time point within the preset time period may be averaged together to be used as the horizontal resultant acceleration of the preset time point. The latter can reduce accidental errors by means of averaging, and improve the reliability of vertical acceleration and horizontal resultant acceleration corresponding to each preset moment point, thereby ensuring the reliability and accuracy of the calculated steps.
For example, the preset time period includes 5 peak values and 5 valley values, at this time, the 5 peak values may be averaged to be used as peak values corresponding to the preset time point (i.e., the preset peak time point), of course, only the 3 peak values may be averaged to be used as peak values corresponding to the preset time point (i.e., the preset peak time point), the 5 valley values may be averaged to be used as valley values corresponding to the preset time point (i.e., the preset valley time point), and of course, only the 3 valley values may be averaged to be used as valley values corresponding to the preset time point (i.e., the preset valley time point). Here, the peak value and the trough value are a horizontal resultant acceleration and a vertical acceleration.
In this embodiment, only two preset time points need to be taken, so that, in order to improve that the vertical acceleration and the horizontal resultant acceleration corresponding to the two preset time points are more reliable, determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point a in this embodiment may include:
taking the average value of all wave peak values in the horizontal resultant acceleration within a preset time period as the horizontal resultant acceleration of the time point A, and taking the average value of all wave peak values in the vertical acceleration within the preset time period as the vertical acceleration of the time point A;
accordingly, determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point B may include:
and taking the average value of all wave valley values in the horizontal resultant acceleration within the preset time period as the horizontal resultant acceleration of the time point B, and taking the average value of all wave valley values in the vertical acceleration within the preset time period as the vertical acceleration of the time point B.
That is, in this embodiment, the influence of accidental errors is reduced by taking an average value to determine the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point, so that the vertical acceleration and the horizontal resultant acceleration corresponding to two preset time points are improved to be more reliable, and finally, the reliability and the accuracy of step counting calculation are improved.
Based on the technical scheme, the step counting method provided by the embodiment of the invention can perform noise reduction on the originally acquired acceleration, namely remove the acceleration related to the hand motion in the originally acquired acceleration to obtain the vertical acceleration of the leg motion only related to the leg motion, and perform step counting calculation by using the vertical acceleration of the leg motion; because the vertical acceleration of the leg body movement is only related to the leg movement, the noise in the acquired acceleration is removed without the interference of the hand body movement, and the accuracy of step counting calculation is further improved. The speed of step counting calculation is accelerated by reducing the preset time points, and the reliability and the accuracy of the step counting calculation are improved by improving the reliability of the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point.
Based on any of the above embodiments, in order to further accelerate the step counting calculation speed while ensuring the accuracy of the step counting calculation, it is avoided that the vertical acceleration in the world coordinate system needs to be denoised in any case, that is, the vertical acceleration corresponding to the hand movement is removed from the vertical acceleration in the world coordinate system. The present embodiment determines whether or not the removal of the vertical acceleration corresponding to the hand movement is subsequently required by adding the determination condition. The present embodiment does not limit the determination condition as long as it can determine whether the influence of the current hand movement on the final step counting calculation exceeds a preset degree, wherein the user may set the preset degree according to the actual accuracy of the step counting requirement, and this embodiment is not limited. For example, the determination condition may be the magnitude of the hand motion; the maximum value of the horizontal combined acceleration in the world coordinate system may exceed a threshold value or not. Further, the accuracy and speed of determination of the determination condition are improved. Preferably, in this embodiment, after determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point, the method may further include:
judging whether the maximum value of the horizontal combined acceleration under the world coordinate system exceeds a threshold value or not;
if so, calculating to obtain the vertical acceleration of the hand movement corresponding to each preset time point by utilizing the principle that the combined acceleration of the hand movement does not change according to the vertical acceleration and the horizontal combined acceleration corresponding to each preset time point;
if not, directly carrying out step counting calculation on the vertical acceleration under the world coordinate system.
Specifically, in this embodiment, the degree of the hand movement is determined by the maximum value of the horizontal resultant acceleration in the world coordinate system, for example, when the maximum value of the horizontal resultant acceleration in the world coordinate system is large, it is proved that the hand movement amplitude is large, and the value of the vertical acceleration of the hand movement corresponding to the maximum value is also large, so that the accuracy of the subsequent step calculation is seriously affected, at this time, a step of calculating the vertical acceleration of the hand movement corresponding to each preset time point according to the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point and using the principle that the hand movement resultant acceleration does not change needs to be performed, that is, the step S110 is performed, and then the step S140 is sequentially performed to obtain the vertical acceleration of the leg movement, so as to implement the process of performing noise reduction on the vertical acceleration in the world coordinate system. And finally, calculating the step by utilizing the vertical acceleration of the leg body movement.
When the maximum value of the horizontal combined acceleration under the world coordinate system is small, it is proved that the motion amplitude of the hand body is small (in this way, the hand body may be put in a pocket, the motion is limited, and the amplitude fluctuation is natural and not large), and at this time, the value of the vertical acceleration of the motion of the hand body corresponding to the hand body is also small, so that the accuracy of the subsequent step counting calculation is hardly affected, and at this time, in order to improve the speed of the step counting calculation, the process of performing noise reduction processing on the vertical acceleration under the world coordinate system (as in the above embodiment, step S110 to step S140) may not be performed, and the vertical acceleration under the world coordinate system is directly used for the step counting calculation.
In this embodiment, the specific value of the threshold is not limited, and the user may select the threshold according to the accuracy of the actual step-counting requirement and the actual computing capability of the hardware.
Based on the technical scheme, the step counting method provided by the embodiment of the invention can perform noise reduction on the originally acquired acceleration, namely remove the acceleration related to the hand motion in the originally acquired acceleration to obtain the vertical acceleration of the leg motion only related to the leg motion, and perform step counting calculation by using the vertical acceleration of the leg motion; because the vertical acceleration of the leg body movement is only related to the leg movement, the noise in the acquired acceleration is removed without the interference of the hand body movement, and the accuracy of step counting calculation is further improved. And the step counting calculation speed can be further increased under the condition of ensuring the accuracy of the step counting calculation, and the noise reduction processing on the vertical acceleration under the world coordinate system is avoided under any condition.
In the following, the step-counting device, the wrist step-counting device, the method for reducing noise of acceleration data, and the computer-readable storage medium according to the embodiments of the present invention are introduced, and the step-counting device, the wrist step-counting device, the method for reducing noise of acceleration data, and the computer-readable storage medium described below may be referred to in correspondence with the step-counting method described above.
Referring to fig. 14, fig. 15 is a block diagram of a step counter according to an embodiment of the invention; applied to a wrist step-counting device, the apparatus may comprise:
the first calculation module 100 is configured to convert the acquired acceleration within the preset time period into a vertical acceleration and a horizontal resultant acceleration in a world coordinate system, and determine the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point;
the second calculation module 200 is configured to calculate, according to the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point, a vertical acceleration of the hand movement corresponding to each preset time point by using a principle that the resultant acceleration of the hand movement is not changed;
the third calculation module 300 is configured to obtain a vertical acceleration function corresponding to the hand motion by using a fitting algorithm according to the vertical acceleration of each hand motion;
the fourth calculation module 400 is configured to calculate, by using the vertical acceleration function, a vertical acceleration of leg motion corresponding to the vertical acceleration in the world coordinate system;
and the step counting module 500 is used for counting steps by utilizing the vertical acceleration of the leg body movement.
Based on the above embodiments, in the present embodiment, the second calculating module 200 specifically uses a formula
Figure BDA0001827003790000181
The module is used for calculating to obtain vertical acceleration of hand movement corresponding to the time point A, the time point B and the time point C;
the hand motion control method comprises the following steps that x _ A is the horizontal resultant acceleration corresponding to the moment point A, Y _ A is the vertical acceleration corresponding to the moment point A, Y _ A is the vertical acceleration of hand motion corresponding to the moment point A, x _ B is the horizontal resultant acceleration corresponding to the moment point B, Y _ B is the vertical acceleration corresponding to the moment point B, Y _ B is the vertical acceleration of hand motion corresponding to the moment point B, and Y _ C is the vertical acceleration of hand motion corresponding to the moment point C, wherein the horizontal resultant acceleration is 0.
Based on any of the above embodiments, the apparatus may further include:
the selection module is used for judging whether the maximum value of the horizontal combined acceleration under the world coordinate system exceeds a threshold value or not; if yes, executing the second calculation module; if not, the step counting module is executed after the vertical acceleration under the world coordinate system is directly used as the vertical acceleration of the leg body movement.
It should be noted that, based on any of the above embodiments, the apparatus may be implemented based on a programmable logic device, where the programmable logic device includes an FPGA, a CPLD, a single chip, a DSP, a CPU, and the like. These programmable logic devices may be provided in a wrist step-counting device.
An embodiment of the present invention further provides a wrist step-counting device, including: the accelerometer is used for acquiring the acceleration within a preset time period; a memory for storing a computer program; a processor for implementing the steps of the step counting method according to any of the embodiments described above when executing a computer program. If the processor executes the computer program, the acceleration in the acquired preset time period is converted into vertical acceleration and horizontal resultant acceleration in a world coordinate system, and the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are determined; calculating to obtain vertical acceleration of hand body movement corresponding to each preset time point by utilizing the principle that the corresponding vertical acceleration and the corresponding horizontal resultant acceleration of the hand body movement are unchanged according to the corresponding vertical acceleration and the corresponding horizontal resultant acceleration of each preset time point; according to the vertical acceleration of each hand motion, a vertical acceleration function corresponding to the hand motion is obtained by using a fitting algorithm; calculating the vertical acceleration of leg motion corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function; and (4) calculating the step by utilizing the vertical acceleration of the leg body movement.
In this embodiment, the wrist step-counting device is not limited, and may be, for example, a wrist strap, a step-counting watch, a step-counting bracelet, or the like.
Referring to fig. 16, fig. 16 is a flowchart illustrating a method for denoising acceleration data according to an embodiment of the present invention; applied to a wrist step-counting device, the method may comprise:
s200, converting the acquired acceleration within the preset time period into a vertical acceleration and a horizontal resultant acceleration under a world coordinate system, and determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point;
s210, calculating to obtain vertical acceleration of hand body movement corresponding to each preset time point according to the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point by utilizing a principle that the resultant acceleration of hand body movement is not changed;
s220, according to the vertical acceleration of each hand movement, obtaining a vertical acceleration function corresponding to the hand movement by using a fitting algorithm;
and S230, calculating the vertical acceleration of the leg body movement corresponding to the vertical acceleration in the world coordinate system by using the vertical acceleration function.
The present invention further provides a computer readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the step counting method according to any of the embodiments above, and/or which, when being executed by a processor, carries out the steps of the method of reducing noise in acceleration data according to any of the embodiments above. If the computer program is executed by the processor, the acceleration in the acquired preset time period is converted into vertical acceleration and horizontal resultant acceleration under a world coordinate system, and the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are determined; calculating to obtain vertical acceleration of hand body movement corresponding to each preset time point by utilizing the principle that the corresponding vertical acceleration and the corresponding horizontal resultant acceleration of the hand body movement are unchanged according to the corresponding vertical acceleration and the corresponding horizontal resultant acceleration of each preset time point; according to the vertical acceleration of each hand motion, a vertical acceleration function corresponding to the hand motion is obtained by using a fitting algorithm; calculating the vertical acceleration of leg motion corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function; and (4) calculating the step by utilizing the vertical acceleration of the leg body movement. And/or when the computer program is executed by the processor, the acquired acceleration in the preset time period is converted into a vertical acceleration and a horizontal resultant acceleration under a world coordinate system, and the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are determined; calculating to obtain vertical acceleration of hand body movement corresponding to each preset time point by utilizing the principle that the corresponding vertical acceleration and the corresponding horizontal resultant acceleration of the hand body movement are unchanged according to the corresponding vertical acceleration and the corresponding horizontal resultant acceleration of each preset time point; according to the vertical acceleration of each hand motion, a vertical acceleration function corresponding to the hand motion is obtained by using a fitting algorithm; and calculating the vertical acceleration of the leg body motion corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The steps counting method, the steps counting device, the wrist step counting device, the acceleration data noise reduction method and the computer readable storage medium provided by the invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (8)

1. A method of step counting, for use with a wrist step counting device, the method comprising:
converting the acceleration collected within a preset time period into a vertical acceleration and a horizontal resultant acceleration under a world coordinate system, and determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point;
calculating to obtain the vertical acceleration of the hand body movement corresponding to each preset time point by utilizing the principle that the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are unchanged;
according to the vertical acceleration of each hand motion, a vertical acceleration function corresponding to the hand motion is obtained by using a fitting algorithm;
calculating the vertical acceleration of leg body movement corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function; the vertical acceleration under the world coordinate system is differenced with the vertical acceleration of the hand movement corresponding to the vertical acceleration function, so that the vertical acceleration of the leg movement is obtained;
calculating the step by utilizing the vertical acceleration of the leg body movement;
the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are determined, and the method comprises the following steps:
determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point A;
determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point B;
the time point C with the horizontal resultant acceleration of 0 is positioned between the time point A and the time point B;
the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are calculated according to the principle that the resultant acceleration of the hand movement is unchanged, and the vertical acceleration of the hand movement corresponding to each preset time point is obtained, and the method comprises the following steps:
using formulas
Figure FDA0003171238660000011
Calculating to obtain vertical acceleration of hand movement corresponding to the time point A, the time point B and the time point C;
the hand motion control method comprises the following steps that x _ A is the horizontal resultant acceleration corresponding to the moment point A, Y _ A is the vertical acceleration corresponding to the moment point A, Y _ A is the vertical acceleration of hand motion corresponding to the moment point A, x _ B is the horizontal resultant acceleration corresponding to the moment point B, Y _ B is the vertical acceleration corresponding to the moment point B, Y _ B is the vertical acceleration of hand motion corresponding to the moment point B, and Y _ C is the vertical acceleration of hand motion corresponding to the moment point C, wherein the horizontal resultant acceleration is 0.
2. The step counting method according to claim 1, wherein after determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point, the step counting method further comprises:
judging whether the maximum value of the horizontal combined acceleration under the world coordinate system exceeds a threshold value or not;
if so, executing the step of calculating to obtain the vertical acceleration of the hand movement corresponding to each preset time point by utilizing the principle that the combined acceleration of the hand movement does not change according to the vertical acceleration and the horizontal combined acceleration corresponding to each preset time point;
if not, the step counting calculation is directly carried out by utilizing the vertical acceleration under the world coordinate system.
3. The step counting method according to claim 1, wherein the time point a is a time corresponding to a peak value of the horizontal resultant acceleration, and the time point B is a time corresponding to a valley value of the horizontal resultant acceleration.
4. The step counting method according to claim 3, wherein the determining of the vertical acceleration and the horizontal resultant acceleration corresponding to the time point A comprises:
taking the average value of all wave peak values in the horizontal resultant acceleration within the preset time period as the horizontal resultant acceleration of the time point A, and taking the average value of all wave peak values in the vertical acceleration within the preset time period as the vertical acceleration of the time point A;
correspondingly, the determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point B includes:
and taking the average value of all valley values in the horizontal resultant acceleration within the preset time period as the horizontal resultant acceleration of the time point B, and taking the average value of all valley values in the vertical acceleration within the preset time period as the vertical acceleration of the time point B.
5. A step counting device, applied to a wrist step counting apparatus, comprising:
the first calculation module is used for converting the acquired acceleration within the preset time period into a vertical acceleration and a horizontal resultant acceleration under a world coordinate system and determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point;
the second calculation module is used for calculating to obtain the vertical acceleration of the hand body movement corresponding to each preset time point by utilizing the principle that the combined acceleration of the hand body movement does not change according to the vertical acceleration and the horizontal combined acceleration corresponding to each preset time point;
the third calculation module is used for obtaining a vertical acceleration function corresponding to the hand motion by utilizing a fitting algorithm according to the vertical acceleration of the hand motion;
the fourth calculation module is used for calculating the vertical acceleration of leg body movement corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function; the vertical acceleration under the world coordinate system is differenced with the vertical acceleration of the hand movement corresponding to the vertical acceleration function, so that the vertical acceleration of the leg movement is obtained;
the step counting module is used for counting steps by utilizing the vertical acceleration of the leg body movement;
the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are determined, and the method comprises the following steps:
determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point A;
determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point B;
the time point C with the horizontal resultant acceleration of 0 is positioned between the time point A and the time point B;
the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are calculated according to the principle that the resultant acceleration of the hand movement is unchanged, and the vertical acceleration of the hand movement corresponding to each preset time point is obtained, and the method comprises the following steps:
using formulas
Figure FDA0003171238660000031
Calculating to obtain vertical acceleration of hand movement corresponding to the time point A, the time point B and the time point C;
the hand motion control method comprises the following steps that x _ A is the horizontal resultant acceleration corresponding to the moment point A, Y _ A is the vertical acceleration corresponding to the moment point A, Y _ A is the vertical acceleration of hand motion corresponding to the moment point A, x _ B is the horizontal resultant acceleration corresponding to the moment point B, Y _ B is the vertical acceleration corresponding to the moment point B, Y _ B is the vertical acceleration of hand motion corresponding to the moment point B, and Y _ C is the vertical acceleration of hand motion corresponding to the moment point C, wherein the horizontal resultant acceleration is 0.
6. A wrist step-counting device, comprising:
the accelerometer is used for acquiring the acceleration within a preset time period;
a memory for storing a computer program;
a processor for implementing the steps of the step counting method according to any one of claims 1 to 5 when executing the computer program.
7. A method of denoising acceleration data for use with a wrist step-counting device, the method comprising:
converting the acceleration collected within a preset time period into a vertical acceleration and a horizontal resultant acceleration under a world coordinate system, and determining the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point;
calculating to obtain the vertical acceleration of the hand body movement corresponding to each preset time point by utilizing the principle that the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are unchanged;
according to the vertical acceleration of each hand motion, a vertical acceleration function corresponding to the hand motion is obtained by using a fitting algorithm;
calculating the vertical acceleration of leg motion corresponding to the vertical acceleration under the world coordinate system by using the vertical acceleration function; the vertical acceleration under the world coordinate system is differenced with the vertical acceleration of the hand movement corresponding to the vertical acceleration function, so that the vertical acceleration of the leg movement is obtained;
the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are determined, and the method comprises the following steps:
determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point A;
determining the vertical acceleration and the horizontal resultant acceleration corresponding to the time point B;
the time point C with the horizontal resultant acceleration of 0 is positioned between the time point A and the time point B;
the vertical acceleration and the horizontal resultant acceleration corresponding to each preset time point are calculated according to the principle that the resultant acceleration of the hand movement is unchanged, and the vertical acceleration of the hand movement corresponding to each preset time point is obtained, and the method comprises the following steps:
using formulas
Figure FDA0003171238660000041
Calculating to obtain vertical acceleration of hand movement corresponding to the time point A, the time point B and the time point C;
the hand motion control method comprises the following steps that x _ A is the horizontal resultant acceleration corresponding to the moment point A, Y _ A is the vertical acceleration corresponding to the moment point A, Y _ A is the vertical acceleration of hand motion corresponding to the moment point A, x _ B is the horizontal resultant acceleration corresponding to the moment point B, Y _ B is the vertical acceleration corresponding to the moment point B, Y _ B is the vertical acceleration of hand motion corresponding to the moment point B, and Y _ C is the vertical acceleration of hand motion corresponding to the moment point C, wherein the horizontal resultant acceleration is 0.
8. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the step counting method according to any one of claims 1 to 5 and/or the steps of the method of acceleration data noise reduction according to claim 7.
CN201811189060.7A 2018-10-12 2018-10-12 Step counting method and device and wrist step counting equipment Active CN109029492B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811189060.7A CN109029492B (en) 2018-10-12 2018-10-12 Step counting method and device and wrist step counting equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811189060.7A CN109029492B (en) 2018-10-12 2018-10-12 Step counting method and device and wrist step counting equipment

Publications (2)

Publication Number Publication Date
CN109029492A CN109029492A (en) 2018-12-18
CN109029492B true CN109029492B (en) 2021-09-03

Family

ID=64616582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811189060.7A Active CN109029492B (en) 2018-10-12 2018-10-12 Step counting method and device and wrist step counting equipment

Country Status (1)

Country Link
CN (1) CN109029492B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110081903B (en) * 2019-04-24 2021-11-02 珠海必要工业科技股份有限公司 Step counting, exchange and step counting data sending method, device, equipment and storage medium
CN111006683A (en) * 2019-11-27 2020-04-14 青岛歌尔智能传感器有限公司 Step counting device and step counting method thereof, controller and readable storage medium
CN113378801B (en) * 2021-08-11 2021-11-09 深圳市梦瑶科技有限公司 Intelligent bracelet accurate step counting method based on neural network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105698795A (en) * 2015-12-04 2016-06-22 天津大学 Indoor localization step size calculation method
CN105912142A (en) * 2016-02-05 2016-08-31 深圳市爱康伟达智能医疗科技有限公司 Step recording and behavior identification method based on acceleration sensor
CN106767888A (en) * 2016-11-15 2017-05-31 皖西学院 A kind of meter based on Wave crest and wave trough detection walks algorithm
CN106850955A (en) * 2016-12-20 2017-06-13 陕西尚品信息科技有限公司 A kind of mobile phone identity verification method based on Gait Recognition
CN107289966A (en) * 2016-03-30 2017-10-24 日本电气株式会社 Method and apparatus for counting step number
CN108279019A (en) * 2017-12-30 2018-07-13 青岛真时科技有限公司 A kind of step-recording method, device and intelligent wearable device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102130801B1 (en) * 2014-07-22 2020-08-05 엘지전자 주식회사 Apparatus for detecting wrist step and method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105698795A (en) * 2015-12-04 2016-06-22 天津大学 Indoor localization step size calculation method
CN105912142A (en) * 2016-02-05 2016-08-31 深圳市爱康伟达智能医疗科技有限公司 Step recording and behavior identification method based on acceleration sensor
CN107289966A (en) * 2016-03-30 2017-10-24 日本电气株式会社 Method and apparatus for counting step number
CN106767888A (en) * 2016-11-15 2017-05-31 皖西学院 A kind of meter based on Wave crest and wave trough detection walks algorithm
CN106850955A (en) * 2016-12-20 2017-06-13 陕西尚品信息科技有限公司 A kind of mobile phone identity verification method based on Gait Recognition
CN108279019A (en) * 2017-12-30 2018-07-13 青岛真时科技有限公司 A kind of step-recording method, device and intelligent wearable device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于移动终端的新型计步方法;黄政;《计算机学报》;20170831;第40卷(第8期);第1856-1871页 *

Also Published As

Publication number Publication date
CN109029492A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109029492B (en) Step counting method and device and wrist step counting equipment
CN109550219B (en) Method and system for determining motion information and mobile device
CN106468554B (en) A kind of measuring method of the inertial parameter of contactless rolling satellite
CN107289966A (en) Method and apparatus for counting step number
CN112304340B (en) Attitude calculation method and device based on nine-axis IMU and storage medium
CN112731953A (en) Robot control method, device, computer readable storage medium and robot
TWI502167B (en) Method for counting step and electronic apparatus using the same
WO2022160811A1 (en) Footed robot motion trajectory tracking method and device, and readable storage medium
KR102150172B1 (en) Relative movement based motion recognition method and apparatus
CN107632966B (en) Motion trajectory determination method and electronic equipment
CN115127581B (en) Running data monitoring method and device, terminal equipment and storage medium
JP6135257B2 (en) Terminal device and position detection program
CN105575239B (en) A kind of reduction of the fracture training pattern angle detection device and its method
CN113936044B (en) Method and device for detecting motion state of laser equipment, computer equipment and medium
CN113246124B (en) Robot control method and device, computer readable storage medium and robot
CN110960222B (en) Motion type detection method and device
CN114053679A (en) Exercise training method and system
CN108225368A (en) Step count set and step-recording method
CN112043276A (en) Method and device for measuring length of limb
US10366280B2 (en) Method and apparatus for measuring periodic motion
JP5958920B2 (en) Inclination angle estimation system
WO2024009487A1 (en) Estimation device, estimation method, and program
CN109061231B (en) Riding speed calculation method and device
Stančin et al. SORA vs. Euler angles: Computational Efficiency in the Context of Gyroscope Measurements
JP5424226B2 (en) Inclination angle estimation system

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