Adaptive multi-threshold smartphone pedometer method based on time-dependent decay mechanism

Through the adaptive multi-threshold method of time-dependent attenuation mechanism, the problems of low accuracy and waste of computing resources of smartphone step counting in complex scenarios are solved, and efficient and accurate step detection is achieved to adapt to different individuals and motion states.

CN119984328BActive Publication Date: 2025-09-16SHANDONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510115913.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-09-16
Estimated Expiration
2045-01-24

AI Technical Summary

Technical Problem

Existing smartphone pedometer methods have low accuracy in complex scenarios, require a lot of advance preparation, waste computing resources, and have poor adaptability to different individuals.

Method used

An adaptive multi-threshold method based on a time-dependent attenuation mechanism is adopted. The static state is identified through a simple finite state machine, and the peak is detected by continuously increasing the acceleration modulus value. The adaptive peak and time difference thresholds are calculated in combination with the time-dependent attenuation mechanism, and the thresholds are gradually adjusted to adapt to different motion states and mobile phone placement positions.

Benefits of technology

It reduces the preparation work before step counting, reduces the algorithm complexity, improves the step counting accuracy, and enhances the adaptability to different pedestrians and complex motion scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119984328B_ABST
    Figure CN119984328B_ABST
Patent Text Reader

Abstract

The present invention discloses an adaptive multi-threshold smartphone pedometer method based on a time-dependent attenuation mechanism, which relates to the field of indoor positioning technology. The pedometer method includes: collecting three-axis acceleration data and preprocessing; identifying the stationary state and calculating the first peak and the second peak; calculating the adaptive threshold based on the time-dependent attenuation mechanism; using the adaptive threshold to eliminate pseudo-peaks to achieve step detection; correcting the step count according to the state of both feet, and counting the number of detected peaks. The present invention can have high applicability to different pedestrians, can be used for different motion patterns and different mobile phone placement positions without a lot of preliminary work, does not require different pattern recognition, and can achieve high pedometer accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of indoor positioning technology, and in particular to an adaptive multi-threshold smartphone pedometer method based on a time-dependent attenuation mechanism. Background Art

[0002] Currently, the demand for location-based services is increasing, and various positioning technologies are developing rapidly. In open spaces, positioning technology is relatively mature, and the positioning accuracy of the Global Navigation Satellite System (GNSS) is sufficient to meet people's production and daily needs. However, indoors and in sheltered spaces, GNSS signals are blocked, and outdoor positioning technology cannot meet people's demand for location-based services.

[0003] Therefore, various indoor positioning technologies and methods have been proposed. Among them, pedestrian dead reckoning (PDR) technology based on inertial measurement units (IMUs) stands out due to its lack of external equipment deployment and its low sensitivity to environmental influences. PDR positioning systems primarily consist of three components: step detection, stride length estimation, and heading angle estimation. Step detection determines whether the PDR performs a position update and is a key factor affecting PDR positioning accuracy.

[0004] Existing step detection methods are mainly divided into three categories: autocorrelation analysis, zero-crossing detection, and peak detection. The autocorrelation analysis method calculates the autocorrelation of the acceleration signal, extracts periodic features, and performs step detection. However, this method has a complex calculation process and poor real-time performance. The zero-crossing detection method detects steps by analyzing the zero-crossing points of the acceleration signal near a certain threshold. This method is relatively simple in principle, but is highly dependent on the threshold setting and has limited robustness. The peak detection method determines whether the step count has increased by detecting local maxima (peaks) and minima (valleys) in the acceleration signal. This method is simple and efficient, suitable for most scenarios, and has better real-time performance. However, in complex scenarios involving different pedestrian motion patterns and different phone placement positions, the step counting accuracy is low.

[0005] To address the low accuracy of pedometers in complex scenarios using peak detection, existing methods require extensive preparatory work to collect data for various pedestrian motion patterns and various phone placement positions. These methods first analyze the characteristics of these data to accurately identify the pedestrian's motion pattern and phone placement when counting steps. Appropriate parameters are then initialized for each scenario, breaking down complex motion scenes into multiple individual cases and detecting steps one by one, achieving high pedometer accuracy. However, this method also has several issues. First, it requires extensive preparatory work, which wastes computing resources. Second, the accuracy of motion pattern and phone position identification and classification can significantly impact pedometer accuracy. Furthermore, the initialization parameters may not be applicable to different individuals, resulting in significant deviations in pedometer results. Summary of the Invention

[0006] In view of the problems that the above-mentioned current pedometer methods require a lot of advance preparation work, waste computing resources, and have high algorithm complexity and poor adaptability to complex motion scenes of different individuals, resulting in large deviations in pedometer results, the present invention provides an adaptive multi-threshold smartphone pedometer method based on a time-dependent attenuation mechanism.

[0007] In order to solve the above technical problems, the present invention adopts the following technical solutions: an adaptive multi-threshold smartphone pedometer method based on a time-dependent attenuation mechanism, comprising the following steps: S1 collects pedestrian motion three-axis acceleration data, calculates the acceleration modulus of the three-axis acceleration, eliminates the influence of gravity acceleration, and performs moving average filtering; S2 establishes a simple finite state machine, and when the acceleration modulus is lower than the threshold, identifies that it is in a stationary state; S3 in the stationary state, determines whether the number of consecutive increases in the acceleration modulus meets the corresponding threshold, and if so, detects the first peak and the second peak; S4 uses the first peak to determine whether the acceleration modulus meets the corresponding threshold. The peak value and time difference between the secondary peak and the second peak are used as initial data, and the adaptive peak threshold and adaptive time difference threshold at subsequent moments are calculated by a formula based on the time-dependent attenuation mechanism; S5 determines whether the subsequent maximum value of the acceleration modulus meets the current adaptive peak threshold and adaptive time difference threshold after the second peak index. If so, continue to detect a range backward and take the maximum value of the acceleration modulus within the range as the true peak; S6 uses a finite state machine to detect whether it is in a stationary device. If so, enter S3; S7 counts the number of detected peaks, which is the number of detected steps.

[0008] Furthermore, in S1, the three-axis acceleration modulus that eliminates the influence of gravity acceleration is calculated as follows:

[0009]

[0010] Where acc(t) is the acceleration modulus after removing the acceleration due to gravity at time t; a x(t) is the x-axis acceleration component collected in the carrier coordinate system at time t; a y (t) is the y-axis acceleration component collected in the carrier coordinate system at time t; a z (t) is the z-axis acceleration component collected in the carrier coordinate system at time t; g is the gravitational acceleration value.

[0011] Furthermore, in S1, the processing formula of the moving average filter is:

[0012]

[0013] Where y(n) is the filtered value at time n; N is the filter window length; and x(n+k) is the sampled data at time (n+k).

[0014] Furthermore, in S2, during the finite state machine identification process of the stationary state, the parameter b is initialized to record the number of times the acceleration modulus is continuously less than the acceleration modulus threshold value at the stationary state. The stationary state identification calculation expression is:

[0015]

[0016] Where Acc(t) is the acceleration modulus at time t; thr st is the acceleration modulus threshold at rest; thr b is the number threshold, and if b is greater than the number threshold thr b , it is considered to be in a stationary state.

[0017] Furthermore, in S3, when the acceleration modulus value continuously increases for a number greater than a threshold number, the maximum value is detected backward, and then a range is detected backward at the maximum value. If the difference between the maximum value of the acceleration modulus value in the range and the acceleration modulus value corresponding to the first index that meets the continuous increase condition is greater than the acceleration modulus value increase threshold, the first peak and the second peak are obtained through the maximum value.

[0018] Furthermore, after entering the stationary state, the number of consecutive increases t of each index acceleration modulus value is recorded. in The calculation formula for detecting whether the acceleration modulus value increases continuously for a number greater than the threshold is:

[0019] t in =t in +1,Acc(t)>Acc(t-1);

[0020] Where, t in The acceleration modulus value is increased continuously for a certain number of times;

[0021] A1 is recorded as a minimum point. If the number of increases from A1 to B1 meets the threshold requirement, the detection is continued to obtain the first subsequent acceleration modulus maximum point M1. In order to avoid M1 being a false peak near the real peak, n1 sampling points are continuously detected after M1. If the acceleration modulus difference Acc between the maximum value M1 in the index range [M1, M1+n1] and the first index A1 that starts to increase is in Greater than the acceleration modulus increase threshold The index of the maximum value M1 is considered to be the index corresponding to the first peak;

[0022] Starting from index M1, the number of consecutive increases of each index is detected backward. When the number of consecutive increases from A2 to B2 meets the threshold requirement, the detection is continued backward to obtain the first subsequent acceleration modulus maximum point M2. To avoid M2 being a false peak near the real peak, n1 sampling points are continued to be detected after M2. The index M2 corresponding to the maximum value in the index range [M2, M2+n1] is found. The difference Acc between M2 and the acceleration modulus Acc(A2) of the first index A2 that starts to increase is calculated. in Is it greater than the acceleration modulus increase threshold? If it is greater than, the maximum value M2 is considered to be the index corresponding to the second peak.

[0023] Furthermore, in S4, the adaptive peak threshold calculation formula based on the time-dependent attenuation mechanism is:

[0024]

[0025] Where, is the adaptive peak threshold of the i-th peak; r peak To calculate the peak threshold coefficient of the first peak and the second peak, and satisfy 0 <r peak <1; Acc peak (i) is the peak value of the i-th peak; j1, j2 and h are all adaptive coefficients;

[0026] The calculation formula of the adaptive time difference threshold based on the time-dependent attenuation mechanism is:

[0027]

[0028] Where, is the adaptive time difference threshold from the i-1th peak to the i-th peak; r time To calculate the time difference threshold coefficient from the first peak to the second peak, and satisfy 0 <r time <1;t peak (i) is the time corresponding to the i-th peak.

[0029] Furthermore, in S5, the acceleration modulus maximum value Acc(M) satisfies the following condition:

[0030] Acc(M)>Acc(M-1)&&Acc(M)>Acc(M+1);

[0031] Where Acc(M) represents the acceleration modulus at time M;

[0032] The adaptive threshold judgment expression is:

[0033]

[0034] Where M is the maximum value index of the acceleration modulus; peak is the index corresponding to the true peak; is the adaptive peak threshold at the current moment; t(M)-t(i-1) is the time difference between the current moment and the previous peak moment; is the adaptive time difference threshold at the current moment;

[0035] After M satisfies both the adaptive peak threshold and the adaptive time difference threshold, to prevent M from being a false peak near the true peak, we continue to detect n2 sampling points backward and take the maximum value in the index range [M, M+n2] as the true peak.

[0036] Furthermore, if M3 is the first maximum point that meets the adaptive peak threshold and the adaptive time difference threshold after the second peak detected, in order to avoid M3 being a pseudo peak near the true peak, continue to detect n2 sampling points backward; it is found that within the index range [M3, M3+n2], the maximum value is M4. Because M3 meets the adaptive peak threshold and the adaptive time difference threshold, M4 also meets the adaptive peak threshold and the adaptive time difference threshold at the current moment, and the acceleration modulus at M4 is greater than the acceleration modulus at M3. Therefore, M3 is considered to be a pseudo peak and M4 is a true peak.

[0037] The beneficial effects of the present invention are as follows: 1. The present invention can reduce a large amount of preparatory work in the early stages of pedometer counting: since it is not necessary to identify multiple motion states and multiple mobile phone placement positions when detecting the number of steps, there is no need to analyze these situations in advance, saving computing costs. 2. The present invention can reduce algorithm complexity and improve pedometer accuracy: by using the acceleration modulus value that removes the influence of gravity, the pedometer counting of the entire movement is divided into two parts: one is the first two peak detections, and the other is the adaptive threshold detection based on the time-dependent attenuation mechanism, which improves the pedometer accuracy and greatly reduces the complexity of the algorithm. 3. The present invention can be highly adaptable to complex motion scenes with different pedestrians: since the adaptive threshold at the current moment is determined by the peak value and time difference detected previously, it is highly adaptable to different pedestrians. Moreover, the transition between different motion states is a gradual process, and the manifestation in the acceleration data also changes gradually. The adaptive threshold calculation based on the time-dependent attenuation mechanism can change accordingly according to the gradual change of the acceleration data, and is more adaptable to complex motion scenes with different motion states and different mobile phone placement positions. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 Shown is an overall flow chart of an embodiment of the present invention.

[0039] Figure 2 The flowchart of the present invention is shown as a method of identifying the static state through a simple finite state machine.

[0040] Figure 3 It is a schematic diagram showing the principle of the first peak detection, the second peak detection and the adaptive threshold peak detection of the present invention. DETAILED DESCRIPTION

[0041] An adaptive multi-threshold smartphone pedometer method based on a time-dependent attenuation mechanism includes the following steps: S1 collects pedestrian motion three-axis acceleration data, calculates acceleration modulus values ​​for the three-axis acceleration, eliminates the influence of gravity acceleration, and performs moving average filtering; S2 establishes a simple finite state machine, and identifies the device as being in a stationary state when the acceleration modulus value is lower than a threshold; S3, in the stationary state, determines whether the number of consecutive increases in the acceleration modulus value meets the corresponding threshold value, and if so, detects the first and second peaks; S4, using the peak value and time difference of the first and second peaks as initial data, calculates the adaptive peak threshold value and adaptive time difference threshold value at subsequent moments using a formula based on the time-dependent attenuation mechanism; S5, after the second peak index, determines whether the subsequent maximum acceleration modulus value meets the current adaptive peak threshold value and adaptive time difference threshold value, and if so, continues to detect a range backward, taking the maximum acceleration modulus value within the range as the true peak value; S6, using the finite state machine, detects whether the device is in a stationary state, and if so, enters S3; S7, counts the number of detected peaks, which is the number of detected steps.

[0042] Furthermore, in S1, the three-axis acceleration modulus that eliminates the influence of gravity acceleration is calculated as follows:

[0043]

[0044] Where acc(t) is the acceleration modulus after removing the acceleration due to gravity at time t; a x (t) is the x-axis acceleration component collected in the carrier coordinate system at time t; a y (t) is the y-axis acceleration component collected in the carrier coordinate system at time t; a z (t) is the z-axis acceleration component collected in the carrier coordinate system at time t; g is the gravitational acceleration value.

[0045] Furthermore, in S1, the processing formula of the moving average filter is:

[0046]

[0047] Where y(n) is the filtered value at time n; N is the filter window length; and x(n+k) is the sampled data at time (n+k).

[0048] Furthermore, in S2, during the finite state machine identification process of the stationary state, the parameter b is initialized to record the number of times the acceleration modulus is continuously less than the acceleration modulus threshold value at the stationary state. The stationary state identification calculation expression is:

[0049]

[0050] Where Acc(t) is the acceleration modulus at time t; thr st is the acceleration modulus threshold at rest; thr b is the number threshold, and if b is greater than the number threshold thr b , it is considered to be in a stationary state.

[0051] Furthermore, in S3, when the acceleration modulus value continuously increases for a number greater than a threshold number, the maximum value is detected backward, and then a range is detected backward at the maximum value. If the difference between the maximum value of the acceleration modulus value in the range and the acceleration modulus value corresponding to the first index that meets the continuous increase condition is greater than the acceleration modulus value increase threshold, the first peak and the second peak are obtained through the maximum value.

[0052] Furthermore, after entering the stationary state, the number of consecutive increases t of each index acceleration modulus value is recorded. in The calculation formula for detecting whether the acceleration modulus value increases continuously for a number greater than the threshold is:

[0053] tin =t in +1,Acc(t)>Acc(t-1);

[0054] Where, t in The acceleration modulus value is increased continuously for a certain number of times;

[0055] A1 is recorded as a minimum point. If the number of increases from A1 to B1 meets the threshold requirement, the detection is continued to obtain the first subsequent acceleration modulus maximum point M1. In order to avoid M1 being a false peak near the real peak, n1 sampling points are continuously detected after M1. If the acceleration modulus difference Acc between the maximum value M1 in the index range [M1, M1+n1] and the first index A1 that starts to increase is in Greater than the acceleration modulus increase threshold The index of the maximum value M1 is considered to be the index corresponding to the first peak;

[0056] Starting from the M1 index, the number of consecutive increases of each index is detected backward. When the number of consecutive increases from A2 to B2 meets the threshold requirement, the backward detection is continued to obtain the first subsequent acceleration modulus maximum point M2. To avoid M2 being a false peak near the real peak, n1 sampling points are continued to be detected after M2. If the maximum value in the index range [M2, M2+n1] corresponds to the index M2, the acceleration modulus difference Acc between M2 and the first index A2 that starts to increase is calculated. in Greater than the acceleration modulus increase threshold If it is greater than, the index of the maximum value M2 is considered to be the index corresponding to the second peak.

[0057] Furthermore, in S4, the adaptive peak threshold calculation formula based on the time-dependent attenuation mechanism is:

[0058]

[0059] Where, is the adaptive peak threshold of the i-th peak; r peak To calculate the peak threshold coefficient of the first peak and the second peak, and satisfy 0 <r peak <1; Acc peak (i) is the peak value of the i-th peak; j1, j2 and h are all adaptive coefficients;

[0060] The calculation formula of the adaptive time difference threshold based on the time-dependent attenuation mechanism is:

[0061]

[0062] Where, is the adaptive time difference threshold from the i-1th peak to the i-th peak; r timeTo calculate the time difference threshold coefficient from the first peak to the second peak, and satisfy 0 <r time <1;t peak (i) is the time corresponding to the i-th peak.

[0063] Furthermore, in S5, the acceleration modulus maximum value Acc(M) satisfies the following condition:

[0064] Acc(M)>Acc(M-1)&&Acc(M)>Acc(M+1);

[0065] Where Acc(M) represents the acceleration modulus at time M;

[0066] The adaptive threshold judgment expression is:

[0067]

[0068] Where M is the maximum value index of the acceleration modulus; peak is the index corresponding to the true peak; is the adaptive peak threshold at the current moment; t(M)-t(i-1) is the time difference between the current moment and the previous peak moment; is the adaptive time difference threshold at the current moment;

[0069] After M satisfies both the adaptive peak threshold and the adaptive time difference threshold, to prevent M from being a false peak near the true peak, we continue to detect n2 sampling points backward and take the maximum value in the index range [M, M+n2] as the true peak.

[0070] Furthermore, if M3 is the first maximum point that meets the adaptive peak threshold and the adaptive time difference threshold after the second peak detected, in order to avoid M3 being a pseudo peak near the true peak, continue to detect n2 sampling points backward; it is found that within the index range [M3, M3+n2], the maximum value is M4. Because M3 meets the adaptive peak threshold and the adaptive time difference threshold, M4 also meets the adaptive peak threshold and the adaptive time difference threshold at the current moment, and the acceleration modulus at M4 is greater than the acceleration modulus at M3. Therefore, M3 is considered to be a pseudo peak and M4 is a true peak.

[0071] The present invention discloses an adaptive multi-threshold smartphone pedometer method based on a time-dependent decay mechanism. An embodiment of the present invention is described in detail below with reference to the accompanying drawings.

[0072] like Figure 1 As shown in the figure, the specific steps of the adaptive multi-threshold smartphone pedometer method based on the time-dependent attenuation mechanism are as follows: Step 1, during the continuous movement of pedestrians, the three-axis acceleration data collected in real time by the smartphone is used to calculate the acceleration modulus, and gravity correction and moving average filtering are performed on it in turn.

[0073] The three-axis acceleration modulus that eliminates the influence of gravity acceleration is calculated as follows:

[0074]

[0075] Where acc(t) is the acceleration modulus after removing the acceleration due to gravity at time t; a x (t) is the x-axis acceleration component collected in the carrier coordinate system at time t; a y (t) is the y-axis acceleration component collected in the carrier coordinate system at time t; a z (t) is the z-axis acceleration component collected in the carrier coordinate system at time t; g is the gravitational acceleration value.

[0076] The processing formula of moving average filtering is:

[0077]

[0078] Where y(n) is the filtered value at time n; N is the filter window length; and x(n+k) is the sampled data at time (n+k).

[0079] The second step is Figure 2 As shown in the figure, a simple finite state machine is established to identify the static state. When the acceleration modulus is lower than the static threshold, the number of times is increased by 1. When the acceleration modulus is lower than the static threshold for more than the number threshold, it is judged to be a static state. Otherwise, it is considered to be a moving state.

[0080] The calculation expression for static state identification is:

[0081]

[0082] Where Acc(t) is the acceleration modulus at time t; thr st is the acceleration modulus threshold at rest; thr b is the number threshold and if b is greater than the number threshold thr b , it is considered to be in a stationary state.

[0083] The third step, after detecting a stationary state, is to check whether the acceleration modulus has increased continuously for a predetermined number of times. If this condition is met, the system then checks for a maximum value. To avoid mistaking the initial maximum value for a true peak, the system continues to check for the maximum value within a certain range near the maximum value. If the difference between this maximum value and the acceleration modulus value that meets the continuous increase condition exceeds a predetermined threshold, the peak is identified as the first peak. The same method is used to detect the second peak.

[0084] Among them, after entering the static state, record the number of consecutive increases t of each index acceleration modulus value inThe calculation formula for detecting whether the acceleration modulus value increases continuously for a number greater than the threshold is:

[0085] t in =t in +1,Acc(t)>Acc(t-1);

[0086] Where, t in The number of times the acceleration modulus value is continuously increased.

[0087] When the acceleration modulus value increases continuously for a number greater than the threshold, continue to detect the maximum value, such as Figure 3 As shown, A1 is recorded as a minimum point. If the number of increases from A1 to B1 meets the threshold requirement, the detection is continued to obtain the first subsequent maximum point M1. In order to avoid M1 being a false peak near the real peak, n1 sampling points are continuously detected after M1. The index corresponding to the maximum value in the index range [M1, M1+n1] is found to be M1.

[0088] Calculate the difference Acc between the acceleration modulus Acc(M1) at M1 and the acceleration modulus Acc(A1) corresponding to the first index A1 that starts to increase in Is it greater than the acceleration modulus increase threshold? If it is greater than, M1 is considered to be the index corresponding to the first peak.

[0089] Start from index M1 and detect the number of consecutive increases of each index. When the number of consecutive increases from A2 to B2 meets the threshold requirement, continue to detect backward to obtain the first subsequent acceleration modulus maximum point M2. In order to avoid M2 being a false peak near the real peak, continue to detect n1 sampling points after M2. Figure 3 As can be seen, the index M2 corresponding to the maximum value in the index range [M2, M2+n1] is calculated as the difference Acc between M2 and the acceleration modulus Acc(A2) of the first index A2 that starts to increase. in Is it greater than the acceleration modulus increase threshold? If it is greater than, the maximum value M2 is considered to be the index corresponding to the second peak.

[0090] In the fourth step, the peak value and time difference between the first peak and the second peak are used as the initial data, and the adaptive peak threshold calculation formula based on the time-dependent attenuation mechanism and the adaptive time difference threshold calculation formula based on the time-dependent attenuation mechanism are used to calculate the adaptive peak threshold and time interval threshold at subsequent moments.

[0091] The adaptive peak threshold calculation formula based on the time-dependent attenuation mechanism is:

[0092]

[0093] Where, is the adaptive peak threshold of the i-th peak; r peak To calculate the peak threshold coefficient of the first peak and the second peak, and satisfy 0 <r peak <1; Acc peak (i) is the peak value of the i-th peak; j1, j2 and h are all adaptive coefficients;

[0094] The calculation formula of the adaptive time difference threshold based on the time-dependent attenuation mechanism is:

[0095]

[0096] Where, is the adaptive time difference threshold from the i-1th peak to the i-th peak; r time To calculate the time difference threshold coefficient from the first peak to the second peak, and satisfy 0 <r time <1;t peak (i) is the time corresponding to the i-th peak.

[0097] Step 5: After the second peak indexing, the subsequent maximum acceleration modulus values ​​are determined to see if they meet the current adaptive peak threshold and adaptive time difference threshold. If they do, to avoid the maximum value being a false peak near the true peak, the detection is continued for a range, and the maximum acceleration modulus value within the range is taken as the true peak.

[0098] The maximum value of the acceleration modulus Acc(M) satisfies the following conditions:

[0099] Acc(M)>Acc(M-1)&&Acc(M)>Acc(M+1);

[0100] Where Acc(M) represents the acceleration modulus at time M;

[0101] The adaptive threshold judgment expression is:

[0102]

[0103] Where M is the maximum value index of the acceleration modulus; peak is the index corresponding to the true peak; is the adaptive peak threshold at the current moment; t(M)-t(i-1) is the time difference between the current moment and the previous peak moment; is the adaptive time difference threshold at the current moment;

[0104] After M satisfies both the adaptive peak threshold and the adaptive time difference threshold, to prevent M from being a false peak near the true peak, we continue to detect n2 sampling points backward and take the maximum value in the index range [M, M+n2] as the true peak.

[0105] Among them, if M3 is the first maximum point that meets the peak threshold and time difference threshold after the second peak detected, in order to avoid M3 being a pseudo peak near the true peak, continue to detect n2 sampling points backward; it is found that within the index range [M3, M3+n2], the maximum value is M4. Because M3 meets the adaptive peak threshold and the adaptive time difference threshold, M4 also meets the adaptive peak threshold and the adaptive time difference threshold at the current moment, and the acceleration modulus at M4 is greater than the acceleration modulus at M3. Therefore, M3 is considered to be a pseudo peak and M4 is a true peak.

[0106] In the sixth step, if the finite state machine detects again that the pedestrian is in a stationary state, steps 3 to 5 are repeated.

[0107] Step 7: Count the number of detected peaks to get the final number of detected steps.

[0108] When pedestrians are exercising, the starting and ending movements of their walking are usually accompanied by the state of the two feet together. This will result in the last step being one foot in front of the other and the other foot together. The last step is actually only half a step, and when the feet are together, the movement is relatively slow and steady, and the amplitude of the acceleration signal change is significantly reduced, making it difficult to form the peaks and troughs of a normal walking state. This will have a significant impact on most pedometer algorithms and easily cause missed detection problems. In response to this actual situation, data was collected through a mobile phone with a sampling frequency of 50Hz. Multiple sets of targeted experiments were conducted with the two feet together at the end of the movement and the two feet one in front of the other at the end of the movement. For the convenience of description, the state of the two feet together at the end of the movement is recorded as scenario 1, and the state of the two feet one in front of the other at the end of the movement is recorded as scenario 2. The pedometer method adopts the adaptive multi-threshold pedometer method based on the time-dependent attenuation mechanism proposed in the present invention. The experimental results are shown in Table 1:

[0109] Table 1 Comparison results of scenario 1, scenario 2 and actual number of steps

[0110] Experiment 1 Experiment 2 Experiment 3 Experiment 4 Experiment 5 Actual number of steps 20 30 50 80 100 Scenario 1 19 29 49 79 99 Scenario 2 20 30 50 80 100 .

[0111] The five experimental results in Table 1 show that the step count was accurate in Scenario 2, but one step was missed in Scenario 1. Considering that Scenario 1 is the end of most pedestrian movements, the step counting method proposed in this invention can correct this missed step count.

[0112] In order to verify that the present invention has strong adaptability to complex motion scenes of different pedestrians, a smart phone was used to collect motion data on the road west of the School of Surveying and Mapping of Shandong University of Science and Technology, with a sampling frequency of 50Hz. First, data was collected from a single pedestrian in two situations: multiple motion modes with a static phase and multiple mobile phone placement positions. Among them, the multiple motion modes with a static phase are static, normal walking, static, slow walking, normal walking, fast walking, running, fast walking, static, normal walking, and static, and the mobile phone placement position is flat end; in multiple mobile phone placement positions, the mobile phone positions are flat end, making a phone call, swinging the arm, jacket pocket, flat end, and the motion state is normal walking. The pedometer results of the multiple motion modes with a static phase and multiple mobile phone placement positions are shown in Tables 2 and 3:

[0113] Table 2 Pedometer results for multiple motion modes including static phase

[0114]

[0115] Table 3 Step counting results at different phone placement locations

[0116]

[0117] It can be concluded from Tables 2 and 3 that the present invention can achieve high accuracy in multiple pedometer experiments in complex scenarios with multiple motion modes and multiple mobile phone placement positions, including a static phase. This shows that the present invention has strong applicability to complex scenarios and can meet people's needs for high-precision pedometer counting in complex scenarios.

[0118] In order to verify that the method proposed in the present invention has strong applicability to different pedestrians, the same two types of complex scene pedometer experiments mentioned above were conducted on four experimenters. Table 4 shows the basic information of the experimenters, Table 5 shows the multi-motion mode experiment containing a static stage, and Table 6 shows the experiment of multiple mobile phone placement positions. In Table 5, the specific experiments of multiple motion states containing a static stage are: static, normal walking, static, slow walking, normal walking, fast walking, running, fast walking, static, normal walking, and static. The mobile phone is placed in a flat position, which includes seven motion stages, 20 compound steps in each stage, that is, 40 single steps, for a total of 280 single steps. In Table 6, the motion state of the four experimenters is all normal walking, and the positions of the mobile phones are tested in the following order: handheld, making a call, swinging the arm, pocket, multiple mobile phone postures, going upstairs and going downstairs. When testing the phone in handheld, making a call, swinging the arm, and in the pocket, 300 steps were taken for each position. When testing multiple positions, the phone position varied from horizontal, making a call, swinging the arm, to the pocket, and finally horizontal. Each position was tested with 30 steps, or 60 steps, for a total of 300 steps per participant. For both walking up and down stairs, 180 steps were taken in each case. The difference between the actual number of steps and the required number of steps shown in Table 6 allows for a more accurate analysis of the effectiveness of the present invention in practical applications.

[0119] Table 4 Basic information of experimenters

[0120] Experimenters Height / m Weight / kg gender <![CDATA[BMI value / kg / m 2 > 1 1.75 72 male 23.51 2 1.77 70 male 22.34 3 1.63 59 female 22.21 4 1.55 49 female 20.40 .

[0121] Table 5 Experimental results of multiple motion modes with static phase

[0122] Experimenter 1 Experimenter 2 Experimenter 3 Experimenter 4 Real step count 280 280 280 280 Detection steps 279 278 282 279 Detection accuracy 99.6% 99.3% 99.3% 99.6% .

[0123] Table 6 Experimental results of multiple mobile phone placement positions

[0124] Trial plan Experimenters Actual number of steps This algorithm Accuracy % Handheld A 280 280 100 B 286 287 99.7 C 300 301 99.7 D 310 309 99.7 Call up A 274 273 99.6 B 280 277 98.9 C 290 288 99.3 D 300 300 100 Swing arm A 280 281 99.6 B 290 284 97.9 C 278 288 96.4 D 290 281 96.7 pocket A 266 266 100 B 268 268 100 C 320 319 99.7 D 290 289 99.7 Multiple phone postures A 300 290 96.7 B 300 295 98.3 C 300 299 99.7 D 250 25(i) 100 Go upstairs A 180 176 97.8 B 164 164 100 C 170 167 98.2 D 180 178 98.9 Go downstairs A 170 169 99.4 B 176 174 98.9 C 180 176 97.8 D 184 183 99.5 Average accuracy 99.00357 .

[0125] It can be concluded from Tables 4, 5 and 6 that the present invention does not show a significant decrease in accuracy for counting steps of different individuals in complex experimental scenarios due to individual differences. The step counting accuracy of multiple groups of experiments in different scenarios in Tables 4 and 5 exceeds 99%. The average step counting accuracy of multiple groups of experiments in different scenarios in Table 6 also exceeds 99%, which can prove that the present invention has strong applicability for different individuals in multiple sports modes and multiple mobile phone placement scenarios.

[0126] The beneficial effects of the present invention are: reducing a lot of preparatory work in the early stage of pedometer counting: since it is not necessary to identify multiple motion states and multiple mobile phone placement positions when detecting the number of steps, there is no need to analyze these situations in advance, saving computing costs. Reducing algorithm complexity and improving pedometer accuracy: using the acceleration modulus value that removes the influence of gravity, the pedometer counting of the entire movement is divided into two parts, one is the first two peak detections, and the other is the adaptive threshold detection based on the time-dependent attenuation mechanism, which improves the pedometer accuracy and greatly reduces the complexity of the algorithm. Strong adaptability to complex motion scenes of different pedestrians: since the adaptive threshold at the current moment is determined by the peak value and time difference detected previously, it is highly adaptable to different pedestrians, and the conversion of different motion states is a gradual process, and the manifestation in the acceleration data also changes gradually. The adaptive threshold calculation based on the time-dependent attenuation mechanism can change accordingly according to the gradual change of the acceleration data, and is more adaptable to complex motion scenes with different motion states and different mobile phone placement positions.

[0127] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the scope of protection of the present invention.

Claims

1. An adaptive multi-threshold smartphone pedometer method based on a time-dependent decay mechanism, characterized in that: The following steps are involved: S1 collects the three-axis acceleration data of pedestrian movement, calculates the acceleration modulus of the three-axis acceleration, eliminates the influence of gravity acceleration, and performs moving average filtering; S2 establishes a simple finite state machine, and when the acceleration modulus is lower than the threshold, it recognizes that the vehicle is in a stationary state. S3 is in a stationary state, judging whether the number of consecutive increases in the acceleration modulus meets a corresponding threshold, and if so, detecting the first peak and the second peak; S4 uses the peak value and time difference between the first and second peaks as initial data, and calculates the adaptive peak threshold and adaptive time difference threshold at subsequent moments through a formula based on the time-dependent decay mechanism; After the second peak indexing, S5 determines whether the subsequent maximum acceleration modulus value meets the current adaptive peak threshold and adaptive time difference threshold. If so, continue to detect a range backward and take the maximum acceleration modulus value within the range as the true peak; S6 detects whether it is in a stationary state through a finite state machine, and if so, enters S3; S7 counts the number of detected peaks, which is the number of steps detected; In S4, the adaptive peak threshold calculation formula based on the time-dependent attenuation mechanism is: Where, is the adaptive peak threshold of the i-th peak; r peak To calculate the peak threshold coefficient of the first peak and the second peak, and satisfy 0 <r peak <1; Acc peak (i) is the peak value of the i-th peak; j1, j2 and h are all adaptive coefficients; The calculation formula of the adaptive time difference threshold based on the time-dependent attenuation mechanism is: Where, is the adaptive time difference threshold from the i-1th peak to the i-th peak; r time To calculate the time difference threshold coefficient from the first peak to the second peak, and satisfy 0 <r time <1;t peak (i) is the time corresponding to the i-th peak.

2. The adaptive multi-threshold smartphone pedometer method based on time-dependent decay mechanism according to claim 1, characterized in that: In S1, the three-axis acceleration modulus that eliminates the influence of gravity acceleration is calculated as follows: Where acc(t) is the acceleration modulus after removing the acceleration due to gravity at time t; a x (t) is the x-axis acceleration component collected in the carrier coordinate system at time t; a y (t) is the y-axis acceleration component collected in the carrier coordinate system at time t; a z (t) is the z-axis acceleration component collected in the carrier coordinate system at time t; g is the gravitational acceleration value.

3. The adaptive multi-threshold smartphone pedometer method based on time-dependent decay mechanism according to claim 2, characterized in that: In S1, the processing formula of moving average filtering is: Where y(n) is the filtered value at time n; N is the filter window length; x(n+k) is the sampling data corresponding to the (n+k) moment.

4. The adaptive multi-threshold smartphone pedometer method based on time-dependent decay mechanism according to claim 3, characterized in that: In S2, during the finite state machine identification process of the stationary state, the parameter b is initialized to record the number of times the acceleration modulus is continuously less than the acceleration modulus threshold at the stationary state. The stationary state identification calculation expression is: Where Acc(t) is the acceleration modulus at time t; thr st is the acceleration modulus threshold at rest; thr b is the number threshold, and if b is greater than the number threshold thr b , it is considered to be in a stationary state.

5. The adaptive multi-threshold smartphone pedometer method based on time-dependent decay mechanism according to claim 4, characterized in that: In S3, when the acceleration modulus value continuously increases for a number greater than the number threshold, the maximum value is detected backward, and then a range is detected backward at the maximum value. If the difference between the maximum value of the acceleration modulus value in the range and the acceleration modulus value corresponding to the first index that meets the continuous increase condition is greater than the acceleration modulus value increase threshold, the first peak and the second peak are obtained through the maximum value.

6. The adaptive multi-threshold smartphone pedometer method based on time-dependent decay mechanism according to claim 5, characterized in that: in, After entering the stationary state, record the number of consecutive increases t of each index acceleration modulus value in The calculation formula for detecting whether the acceleration modulus value increases continuously for a number greater than the threshold is: t in =t in +1,Acc(t)>Acc(t-1); Where, t in The acceleration modulus value is increased continuously for a certain number of times; A1 is recorded as a minimum point. If the number of increases from A1 to B1 meets the threshold requirement, the detection is continued to obtain the first subsequent acceleration modulus maximum point M1. In order to avoid M1 being a false peak near the real peak, n1 sampling points are continuously detected after M1. If the acceleration modulus difference Acc between the maximum value M1 in the index range [M1, M1+n1] and the first index A1 that starts to increase is in Greater than the acceleration modulus increase threshold The index of the maximum value M1 is considered to be the index corresponding to the first peak; Starting from index M1, the number of consecutive increases of each index is detected backward. When the number of consecutive increases from A2 to B2 meets the threshold requirement, the detection is continued backward to obtain the first subsequent acceleration modulus maximum point M2. To avoid M2 being a false peak near the real peak, n1 sampling points are continued to be detected after M2. The index M2 corresponding to the maximum value in the index range [M2, M2+n1] is found. The difference Acc between M2 and the acceleration modulus Acc(A2) of the first index A2 that starts to increase is calculated. in Is it greater than the acceleration modulus increase threshold? If it is greater than, the maximum value M2 is considered to be the index corresponding to the second peak.

7. The adaptive multi-threshold smartphone pedometer method based on time-dependent decay mechanism according to claim 6, characterized in that: In S5, the maximum value of the acceleration modulus Acc(M) satisfies the following conditions: Acc(M)>Acc(M-1)&&Acc(M)>Acc(M+1); Where Acc(M) represents the acceleration modulus at time M; The adaptive threshold judgment expression is: Where M is the maximum value index of the acceleration modulus; peak is the index corresponding to the true peak; is the adaptive peak threshold at the current moment; t(M)-t(i-1) is the time difference between the current moment and the previous peak moment; is the adaptive time difference threshold at the current moment; After M satisfies both the adaptive peak threshold and the adaptive time difference threshold, to prevent M from being a false peak near the true peak, we continue to detect n2 sampling points backward and take the maximum value in the index range [M, M+n2] as the true peak.

8. The adaptive multi-threshold smartphone pedometer method based on time-dependent decay mechanism according to claim 7, characterized in that: in, If M3 is the first maximum point that meets the adaptive peak threshold and the adaptive time difference threshold after the second peak detected, in order to avoid M3 being a pseudo peak near the true peak, continue to detect n2 sampling points backward; it is found that within the index range [M3, M3+n2], the maximum value is M4. Because M3 meets the adaptive peak threshold and the adaptive time difference threshold, M4 also meets the adaptive peak threshold and the adaptive time difference threshold at the current moment, and the acceleration modulus at M4 is greater than the acceleration modulus at M3. Therefore, M3 is considered to be a pseudo peak and M4 is a true peak.

Citation Information

Patent Citations

  • Indoor positioning method based on multiple sensors of smart phone

    CN116437003A

  • Underground high-precision pedestrian navigation positioning method based on smart phone

    CN118243101A