Gait segmentation method based on IMU
By processing IMU data and updating dynamic parameters, combined with a gait memory module and a non-periodic stripping module, the problems of recognition accuracy and real-time performance of IMU gait segmentation algorithms under individual differences and environmental changes are solved, achieving efficient and accurate gait cycle detection.
Patent Information
- Application Number
- CN202511030064.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-07
AI Technical Summary
Existing IMU gait segmentation algorithms are difficult to adapt to individual differences and environmental changes, have low recognition accuracy, cannot fully detect gait cycles, have high computational complexity, and are difficult to run in real time on low-power devices.
By processing the three-axis acceleration data acquired by the IMU, the acceleration amplitude is extracted, multiple parameters related to gait event detection are dynamically updated, key events in the gait cycle are identified, and a gait memory module and a non-periodic motion stripping module are introduced to improve the stability and real-time performance of the segmentation.
It achieves high-precision gait cycle detection, adapts to different individuals and environments, reduces computational complexity, is suitable for low-power devices, and improves the accuracy and real-time performance of recognition.
Smart Images

Figure CN120899231A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of motion analysis, more particularly, to a gait segmentation method based on IMU. BACKGROUND
[0002] With the development of wearable devices, sports health monitoring and rehabilitation evaluation, gait recognition and analysis technology based on inertial measurement unit (IMU) gradually becomes a research and application hotspot. As a basic link of gait analysis, gait segmentation aims to accurately identify the starting and ending points of each step from continuous acceleration or angular velocity data, and then extract key motion parameters to realize the monitoring and evaluation of individual motion state.
[0003] At present, existing IMU gait segmentation algorithms mostly rely on threshold judgment or template matching methods, such as setting fixed acceleration amplitude threshold, standard deviation, frequency range, etc. to identify gait events. Although this kind of method can achieve certain effect in specific scenarios, it still has many shortcomings in actual application, mainly manifested in:
[0004] Traditional algorithms are usually difficult to handle the switching between walking, slow running, fast running and other states, and are prone to recognition lag, misjudgment or omission, which seriously affects the segmentation accuracy.
[0005] Fixed time window, acceleration threshold and other parameters cannot adapt to individual differences (such as different height, step frequency, force condition) and environmental changes, resulting in limited application range and poor generalization ability of the algorithm.
[0006] Most existing methods can only detect the starting point and ending point of gait, and cannot further identify key events such as "off the ground" and "landing", which is difficult to support high-precision gait cycle analysis and medical-level evaluation.
[0007] Some methods have high computational complexity, require multi-sensor fusion or introduce frequency domain analysis, complex model training, which is difficult to run in real time in resource-limited embedded devices or low-power wearable terminals.
[0008] Therefore, it is urgent to develop an IMU gait segmentation method with strong state adaptive ability, flexible parameter adjustment, complete gait cycle detection and small computational overhead, to improve the accuracy, stability and deployability in actual scenarios. SUMMARY
[0009] The technical problem solved by the present application is to provide a gait segmentation method based on IMU to solve the problems mentioned in the background art.
[0010] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows:
[0011] A gait segmentation method based on IMU, comprising the following steps:
[0012] Processing the three-axis acceleration data collected by the IMU, extracting the acceleration amplitude, and identifying the gait cycle based on the acceleration amplitude;
[0013] Based on the gait cycle and the three-axis acceleration data, dynamically updating a plurality of dynamic parameters related to gait event detection;
[0014] Based on the dynamic parameters, identifying a plurality of key events in the gait cycle, including the starting point, the ending point, the take-off point, and the landing point;
[0015] Outputting a complete gait event sequence for gait analysis.
[0016] In some embodiments, processing the three-axis acceleration data collected by the IMU comprises the following steps:
[0017] Calculating the amplitude of the three-axis acceleration at each sampling time;
[0018] Performing a moving average filter on the acceleration amplitude sequence to reduce short-term fluctuations;
[0019] Applying a first-order IIR low-pass filter to the smoothed acceleration amplitude sequence to further suppress high-frequency noise;
[0020] Taking the processed acceleration amplitude sequence as the input feature for gait cycle detection and event identification.
[0021] In some embodiments, the process of identifying the gait cycle includes analyzing the periodic characteristics of the acceleration amplitude sequence, identifying the time interval between adjacent cycle starting points, and determining the gait cycle length.
[0022] In some embodiments, the process of identifying a plurality of key events based on dynamic parameters includes:
[0023] Using a sliding window to detect each point of the acceleration amplitude sequence, and when the standard deviation of the acceleration amplitude sequence is less than the static threshold, the absolute value of the slope of the acceleration amplitude sequence is less than the slope threshold, and the average value of the acceleration amplitude sequence in the sliding window is close to zero, it is identified as the starting point of the gait;
[0024] Within a preset time window after the starting point of the gait, finding the maximum point of the Z-axis acceleration and identifying it as the take-off point;
[0025] After the take-off point, when the standard deviation of the acceleration amplitude sequence in the sliding window is again lower than the set static threshold, and the average value of the XY plane combined acceleration amplitude is lower than the preset amplitude threshold, it is identified as the ending point of the gait;
[0026] Find the maximum point of Z-axis acceleration within a preset time window before the end point of the gait, and identify it as the landing point.
[0027] In some embodiments, the method further comprises:
[0028] A gait memory module is constructed to record key feature parameters of historical gait cycles during multiple gait segmentation processes, including gait cycle length, acceleration amplitude, event interval, and event distribution pattern.
[0029] When performing the current gait segmentation, the historical gait features are called as reference basis to modify or weight the confidence of the dynamic parameter update or key event determination results, for improving the segmentation stability and individual adaptability.
[0030] In some embodiments, the gait memory module comprises:
[0031] A feature storage unit is used to store key statistical parameters of multiple historical gait cycles, including average cycle length, average acceleration amplitude, time interval between key events, and amplitude variation range;
[0032] A matching determination unit is used to compare the similarity between the current detected cycle parameters and the historical gait features, and when the similarity exceeds a set threshold, the memory parameters are used to modify the current segmentation results;
[0033] A parameter update unit is used to incrementally update the historical features according to the current cycle features after each gait segmentation is completed.
[0034] In some embodiments, the method further comprises a gait start intention pre-judgment mechanism, which is used to predict the possibility of the user starting to walk in advance according to the weak acceleration change trend in the static state before the gait starting point is identified, specifically including:
[0035] A micro-motion trend analysis unit is used to detect low-amplitude, multi-frequency component acceleration disturbance in the static stage;
[0036] A start intention determination unit is used to construct an intention scoring model according to the duration, waveform trend, and change slope of the acceleration disturbance, and trigger a pre-start flag when the score exceeds a set threshold;
[0037] A parameter pre-loading module is used to prepare a set of start detection parameters in advance after the start intention is identified, in order to shorten the response delay time of the subsequent gait starting point.
[0038] In some embodiments, the intention scoring model is calculated by weighted combination based on the following feature quantities:
[0039] The duration of continuous acceleration disturbance in the static stage;
[0040] average slope and variance of the perturbation waveform;
[0041] micro-upward trend of the Z-axis direction acceleration in recent time;
[0042] statistical number of perturbation peak frequencies in the sliding window;
[0043] The characteristic quantity is synthesized into an activation intention score by linear weighting or a logical discriminant function, and is compared with a set threshold to output a pre-judgment result.
[0044] In some embodiments, the method further comprises a non-periodic motion stripping module for identifying and excluding non-gait motion interference in the acceleration data, improving the accuracy of gait cycle identification, the module comprising:
[0045] a feature extraction unit for extracting a period consistency index, a spectral distribution feature and an energy concentration degree of the acceleration data segment in the sliding window;
[0046] a non-periodic discriminant unit for judging whether the current data segment belongs to non-periodic motion based on a preset periodicity threshold, a spectral energy distribution standard or a training model;
[0047] an interference stripping mechanism for marking the data identified as a non-periodic segment as an invalid segment and excluding it from the gait event detection process to avoid introducing false positives.
[0048] In some embodiments, the non-periodic discriminant unit uses a trained classification model to judge whether the current data segment is non-periodic motion, and the model is trained by the following steps:
[0049] constructing a labeled sample set, the sample set including typical gait data segments and various non-periodic motion data segments, including random hand shaking, device vibration and static state switching;
[0050] extracting a feature vector of each sample, including any one or more of the following: period length stability, acceleration spectral energy distribution, signal autocorrelation coefficient and short-time Fourier transform result;
[0051] training a classification model using a supervised learning method, the method being one of a decision tree, a support vector machine or a lightweight neural network;
[0052] deploying the trained model on a terminal device for identifying and shielding non-periodic interference segments in the actual segmentation process.
[0053] The advantages of the present application over the prior art are:
[0054] The method extracts various characteristic indexes of acceleration signals, dynamically adjusts multiple parameters related to gait event detection, and accurately identifies the starting point, ending point, departure point and landing point based on these parameters, thereby greatly improving the integrity and fine granularity of segmentation compared with the traditional method of only identifying the starting and ending points.
[0055] The present application does not rely on fixed thresholds, but dynamically generates parameters according to the actual length of each gait cycle and the acceleration amplitude, adapts to different individual motion patterns and gait characteristics under different step frequencies and intensities, and solves the problem of poor generalization ability of traditional methods in diversified users and scenes.
[0056] The present application records the periodic statistical characteristics of historical gait through the introduction of a gait memory module, and corrects the results and weights the confidence when the current cycle is similar to the historical characteristics, effectively reducing the false segmentation caused by data fluctuations or abnormalities and improving the overall algorithm stability.
[0057] The present application first introduces a gait start intention scoring mechanism, predicts the user's start intention in advance through indicators such as micro-motion disturbance trend before the actual start, and loads detection parameters in advance to achieve faster response time, especially suitable for high real-time requirement scenes such as prosthesis assistance, elderly fall warning, etc.
[0058] The present application uses the frequency spectrum, cycle consistency and other characteristics to identify non-gait signals and exclude processing through a non-periodic motion stripping module, enhancing the recognition accuracy and practicality of the algorithm in complex use environments (such as carrying objects, equipment vibration, non-continuous action).
[0059] The present method has low overall computational complexity, mainly relies on sliding window and weighted judgment, does not require complex deep models or high-performance computing resources, and can be deployed on low-power IMU terminal devices such as Cortex-M series, realizing real-time and efficient edge-side gait processing. BRIEF DESCRIPTION OF DRAWINGS
[0060] Figure 1 is the overall flowchart of the method of the present application;
[0061] Figure 2 is a coordinate graph of gait cycle recognition. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.
[0063] As Figure 1 shown is the overall flowchart of the method of the present application, including:
[0064] processing three-axis acceleration data collected by the IMU, extracting an acceleration amplitude, and identifying a gait cycle based on the acceleration amplitude;
[0065] updating a plurality of dynamic parameters related to gait event detection based on the gait cycle and the three-axis acceleration data;
[0066] identifying a plurality of key events in the gait cycle, including a starting point, an ending point, a take-off point, and a landing point, based on the dynamic parameters;
[0067] outputting a complete gait event sequence for gait analysis.
[0068] More specifically, the three-axis acceleration data collected by the IMU is the basis for gait segmentation. In order to extract effective motion features, it needs to be processed in multiple steps to ensure data smoothness and reliability.
[0069] First, the amplitude of the three-axis acceleration data at each sampling time is calculated. Assuming that the three-axis acceleration collected by the IMU at time t is a x (t), a y (t), and a z (t), the acceleration amplitude a(t) can be obtained by the following formula:
[0070]
[0071] The reason for using this formula is that it combines the three-axis acceleration into a scalar, eliminating the directional difference and fully reflecting the intensity of the motion, which is convenient for subsequent analysis. For example, when the user is walking, the amplitude can stably represent the acceleration change in the gait process regardless of the change in body orientation.
[0072] Next, the calculated acceleration amplitude sequence a(t) is subjected to moving average filtering to reduce the influence of short-term fluctuations. The size of the sliding window is set to w (for example, 10 sampling points), and the smoothed acceleration amplitude a s (t) can be represented as:
[0073]
[0074] Here, the selection of the window size w needs to be adjusted according to the sampling frequency of the IMU and the typical period of the gait. For example, if the sampling frequency is 100 Hz and the gait period is about 1 second, then w = 10 corresponds to a smoothing range of 0.1 seconds, which can effectively filter out transient noise while preserving gait features.
[0075] In order to further suppress high-frequency noise, the smoothed acceleration amplitude sequence a s(t) Apply a first-order IIR low-pass filter. The recursive formula of the filter is:
[0076] a f (t) = a f (t - 1) + (1 - a) a s (t)
[0077] where a is the smoothing factor, and its value range is 0 < a < 1 (for example, set to 0.9). The design of this formula is based on the characteristics of the first-order IIR filter, that is, by adjusting a to control the cutoff frequency of the filter, the cutoff frequency of the IIR filter is set to 5 Hz, the smoothing factor a = 0.9, which is suitable for IMU data with a sampling rate of 100 Hz. The closer a is to 1, the stronger the filtering effect, but the slower the response speed; otherwise, it is the opposite. In gait analysis, it is recommended that a be between 0.85 and 0.95 to balance noise suppression and real-time performance.
[0078] The acceleration amplitude sequence a f (t) after the above processing is used as the input feature for gait cycle detection and event recognition. This feature sequence can clearly reflect the acceleration trend in the gait process, laying the foundation for subsequent key event recognition.
[0079] As Figure 2 shown, in the process of detecting the gait cycle, by analyzing the periodic characteristics of the acceleration amplitude sequence, the time interval between adjacent cycle start points can be identified to determine the gait cycle length. After the above acceleration amplitude sequence a f(t) is high-pass filtered, the direct current and low-frequency components are removed, and the filtered waveform will directly pass through the zero axis. When the signal rises from negative to zero and crosses the zero axis, the time is defined as an upward zero-crossing point, indicating the start point of a new gait cycle.
[0080] When the signal falls from positive to zero and crosses the zero axis, the time is defined as a downward zero-crossing point, corresponding to the end point of the current cycle.
[0081] In actual gait signals, two adjacent upward zero-crossing points usually correspond to the starting points of two consecutive gait cycles, respectively. Therefore, the system defines the time interval between two adjacent upward zero-crossing points as the duration of the current gait cycle.
[0082] By detecting the time interval between consecutive upward zero-crossing points, the system can obtain the length information of the current gait cycle in real time.
[0083] At the beginning of the gait cycle, the foot is in a stationary state, and the three-axis acceleration changes weakly, so the overall acceleration amplitude is stable and close to zero. Therefore, by detecting the standard deviation, slope, and mean of the acceleration amplitude through a sliding window, the stationary initial state can be effectively identified.
[0084] When the foot starts to lift, the Z-axis (vertical direction) acceleration increases significantly, and a positive peak appears, so the maximum value of Z-axis acceleration after the start of the gait is identified as the takeoff point, which has high physical consistency. Similarly, when the foot lands, the strong impact between the foot and the ground causes the Z-axis acceleration to reach another local peak, so the landing point can be located within the window before the end of the gait.
[0085] As the gait gradually ends, the foot again stabilizes on the ground, the acceleration fluctuation weakens, the overall amplitude converges to a low level, and the disturbance in the XY plane also significantly decreases. At this time, the end of the gait can be accurately identified by judging the standard deviation and amplitude threshold.
[0086] Based on the above principles, the application sets dynamic parameters related to event detection, which need to be adjusted in real time according to the characteristics of the current gait cycle. Specifically, the dynamic parameters include but are not limited to the following:
[0087] Static threshold θ st : The acceleration standard deviation threshold for determining the start and end points of the gait, which can be in the range of 0.05 to 0.2g (g is the acceleration of gravity, about 9.8m / s 2 ).
[0088] Slope threshold (θ sl ): The acceleration slope threshold for detecting the start point of the gait, which can be in the range of 0.1 to 0.5g / s.
[0089] Amplitude threshold (θ a ): The XY plane composite acceleration amplitude mean threshold for determining the end point of the gait, which can be in the range of 0.1 to 0.3g.
[0090] Time window: The range for finding the takeoff point and landing point near the start and end points of the gait cycle, which is recommended to be set to 0.2 to 0.5 seconds.
[0091] The updating process of these parameters is based on the characteristics of the current gait cycle. For example, if a gait cycle is detected to be 1.2 seconds long and the acceleration amplitude mean is 1.5g, the historical parameters can be updated by weighted averaging:
[0092] θ n = β·θ o + (1-β)·θ c
[0093] Where β is the update weight (0.7 to 0.9), θ c is the parameter value calculated in the current cycle, and θ oare the parameter values before the update. This update mechanism enables the system to adapt to different user's gait habits or changes in motion state.
[0094] Key events in a gait cycle include the start point, the take-off point, the landing point, and the end point, whose identification is based on dynamic parameters and sliding window analysis.
[0095] To identify the gait start point, a sliding window is used to detect the acceleration data point by point. Let the window size be w (e.g., 20 sampling points), at each time point t, the following features are calculated:
[0096] Acceleration standard deviation where is the mean value within the window.
[0097] Acceleration slope is the sampling interval.
[0098] Acceleration amplitude mean
[0099] When the following conditions are met, the time point is determined as the gait start point:
[0100] σ(t) < θ st (e.g., 0.1g);
[0101] |s(t)| < θ sl (e.g., 0.3g / s);
[0102] (e.g., 0.2g);
[0103] These conditions reflect that the body is in a relatively static state before the start of the gait. For example, when the user starts to take a step from a static state, the acceleration amplitude and slope will have a slight change, but the overall fluctuation is small.
[0104] After the start point is detected, within a preset time window (e.g., 0.3 seconds) after it, the maximum point of Z-axis acceleration is sought, i.e.,
[0105]
[0106] This time point is identified as the take-off point, because the Z-axis acceleration usually reaches a peak when the foot takes off. For example, in a normal walking, the take-off point may correspond to the sudden increase in acceleration at the moment the heel takes off.
[0107] The identification of the gait end point is also based on sliding window analysis. When the standard deviation σ(t) of the acceleration sequence within the window is lower than the static threshold (e.g., 0.1g), and the XY plane composite acceleration amplitude mean When the amplitude is below a threshold (e.g., 0.2g), the time point is determined as the end point of the gait. This reflects the state that the body is back to rest at the end of the gait.
[0108] After detecting the end point, the maximum point of Z-axis acceleration is searched in a preset time window (e.g., 0.3s) before the end point, i.e.,
[0109]
[0110] This time point is identified as the take-off point, because the Z-axis acceleration will reach a peak again when the foot leaves the ground. For example, when the user steps out with the toes touching the ground, the Z-axis acceleration will have a significant rise.
[0111] The start point, take-off point, landing point, and end point identified by the above method are arranged in time sequence to form a complete gait event sequence. For example, in a walking, the event sequence can be as follows:
[0112] Start point: t = 0.5s
[0113] Take-off point: t = 0.7s
[0114] Landing point: t = 1.1s
[0115] End point: t = 1.3s
[0116] This sequence can be used for gait cycle division (calculate the time of each step), step frequency statistics (steps per minute), motion state recognition (walking or running), and abnormal gait detection (e.g., limping), etc.
[0117] In addition, the present application also discloses the implementation process of the gait memory module, the gait start intention pre-judgment mechanism, and the non-periodic motion stripping module.
[0118] The gait memory module records the historical data of the user in multiple gait divisions to provide a reference for the current gait analysis, thereby improving the stability and personalized adaptability of the division. This module will continuously collect key feature parameters in actual operation and utilize them in each gait detection.
[0119] In implementation, it is necessary to first determine which data is worth recording. The system will focus on gait cycle length, such as the average time from one heel strike to the next, which usually varies between 1.0 and 1.5 seconds; acceleration amplitude, usually in units of gravity acceleration (g), which records the typical intensity during gait, such as 1.2g to 2.0g; event interval, such as the time difference between toe-off and heel strike, which can be 0.3 to 0.5 seconds; and event distribution pattern, such as the regularity of acceleration peak occurrence. These parameters are obtained by analyzing the last 10 to 20 gait cycles, and the specific number can be flexibly adjusted according to the storage capacity and computing power of the device.
[0120] During each gait segmentation, the system compares the currently detected parameters with historical data. If the current detection result deviates from the historical pattern, for example, a gait cycle length is misjudged as 1.8 seconds, while the historical average is 1.2 seconds, the system will correct the result according to the historical data. This correction can be directly taking the historical average as a reference, or it can be adjusting the current value through weighted method to improve the confidence. For example, the confidence of the current segmentation result can be weighted according to the similarity with historical data, the higher the similarity, the higher the confidence.
[0121] To achieve the above functions, the gait memory module is refined into several specific units. The feature storage unit is responsible for saving the key statistical parameters of historical gait cycles, such as the average cycle length may be 1.25 seconds, the average acceleration amplitude is 1.5g, the time interval between key events is 0.4 seconds, and the amplitude variation range is between 0.5g and 2.0g. These data are stored in time series in the device memory, usually retaining the last 15 cycles to balance real-time and historical representativeness.
[0122] The matching determination unit then evaluates the similarity between the current detection result and the historical data through mathematical methods. A feasible way is to use the Euclidean distance formula to calculate the difference d between the two sets of parameters:
[0123]
[0124] Where L represents cycle length, A represents acceleration amplitude, T represents event interval, and R represents amplitude variation range. The square root of the sum in the formula is designed to consider the deviation of each parameter, and after unit conversion, it can be directly compared. If the calculation result d is less than a certain threshold, such as 0.2, it is considered that the current result is highly consistent with the historical pattern, and at this time the historical parameters will be used to fine-tune the current segmentation, such as adjusting the trigger time of key events.
[0125] The parameter updating unit adjusts the historical data based on the characteristics of the current cycle after each gait segmentation. The update is implemented using a weighted average, with the formula as follows:
[0126] P 历史 = β · P 历史 + (1 - β) · P 当前 ;
[0127] Here, P represents a parameter such as cycle length, and β is the weight coefficient, ranging from 0.7 to 0.9. If β = 0.8, the historical cycle length is 1.2 seconds, and the current cycle is 1.3 seconds, then the updated value is:
[0128] P 历史 = 0.8 × 1.2 + 0.2 × 1.3 = 0.96 + 0.26 = 1.22 seconds;
[0129] The range of β is chosen to balance the stability of historical data and the ability to adapt to new changes. A higher value (such as 0.9) tends to maintain historical trends, while a lower value (such as 0.7) reflects current changes more quickly.
[0130] For example, assume that a user walks on flat ground, and the gait cycle length usually fluctuates between 1.1 and 1.3 seconds, with an average of 1.2 seconds recorded by the system. Due to uneven ground, the detection result shows a cycle length of 1.6 seconds. By comparing with historical data, the system finds that the deviation is too large (d > 0.2), so it corrects the result to 1.3 seconds based on the historical average. This adjustment not only improves the stability of segmentation, but also ensures that the result is more consistent with the user's actual gait characteristics.
[0131] The purpose of the gait start intention prediction mechanism is to predict the likelihood of the user starting to walk before they have taken a clear step, by analyzing small acceleration changes in the stationary state, so as to prepare for subsequent detection and shorten the response time.
[0132] In the stationary phase, the system continuously monitors the data of the acceleration sensor, especially those low-amplitude, multi-frequency disturbances. For example, when the user adjusts their stance or moves their center of gravity, they may produce weak acceleration changes of 0.03g to 0.1g, lasting for 0.2 to 0.5 seconds. These signals usually contain multiple frequency components, which can be analyzed by short-time Fourier transform (STFT) to extract spectral features to determine whether they are gait preparation actions.
[0133] To translate these micro-movements into concrete intention judgments, the system designs a scoring model that considers multiple features. The duration of the disturbance is an important indicator, for example, a 0.3-second continuous disturbance may be more meaningful than a 0.1-second one; the waveform trend is calculated by the average slope, such as an acceleration change of 0.05g per second; the variance of change reflects the intensity of signal fluctuations, which may be 0.01 to 0.03; in addition, the recent 0.5-second upward trend of acceleration in the Z-axis direction (vertical direction) is also taken into account, as it is usually related to the upward movement of the center of gravity; the number of disturbance peak frequencies within the sliding window is counted by STFT, which may be 2 to 4 peaks.
[0134] The scoring model uses a linear weighting method to calculate:
[0135] s = w1·d + w2·r + w3·v + w4·f + w5·z;
[0136] where d is the duration of the disturbance, r is the average slope, v is the variance, f is the number of peak frequencies, and f is the quantified value of the upward trend on the Z-axis. The weights w1 to w5 are optimized through experiments, for example, w1 = 0.4, w2 = 0.3, w3 = 0.2, w4 = 0.1, and w5 = 0.2.
[0137] This linear design is simple and efficient, and can quickly respond to changes in intention. If the score s exceeds the preset threshold, such as 0.7, it is considered that the user is about to start, and the system will trigger the pre-start flag.
[0138] Once the start intention is recognized, the system will adjust the detection parameters in advance. For example, the acceleration threshold in the static state may be reduced from 0.1g to 0.08g to improve the sensitivity to the initial gait. This adjustment can shorten the detection time of the gait starting point from the original 0.3 seconds to within 0.2 seconds.
[0139] For example, assume that the user slightly shakes his body while standing, producing a 0.05g disturbance that lasts 0.4 seconds, with a slope of 0.08g / s and a variance of 0.02, and STFT shows 3 frequency peaks, and the Z-axis acceleration rises by 0.02g. The system calculates a score of 0.492, which is below 0.7, and the system does not trigger the pre-start. But if the duration of the disturbance is extended to 0.6 seconds, the score may change to 0.572, still not reaching the threshold, but close to the critical point, indicating that the system's sensitivity to intention can be adjusted according to actual needs.
[0140] The non-periodic motion stripping module identifies and excludes non-gait disturbances in the acceleration data to ensure the accuracy of gait cycle analysis. This module is particularly suitable for random actions that may occur during walking, such as hand shaking or device shaking.
[0141] In data processing, the system analyzes the acceleration signal in a 1-second sliding window and extracts key features. The periodic consistency index is calculated by the autocorrelation coefficient, and the gait signal is usually close to 1, while the non-periodic motion may be below 0.3; the spectral distribution feature is obtained by Fourier transform, and the main frequency energy of the gait signal usually accounts for more than 70%, while the non-periodic motion may be scattered in multiple frequencies; the energy concentration degree is measured by the variance of the acceleration amplitude, and the variance of the gait signal is small, such as 0.1, while the non-periodic motion may reach more than 0.5.
[0142] When judging whether the data segment is non-periodic motion, the system relies on a trained classification model, such as support vector machine (SVM). The training process first needs to build a diverse sample set, including typical gait data (such as walking at 1m / s) and non-gait data (such as hand shaking, device falling, and switching from standing to sitting). Each sample will extract a feature vector, which may include periodic length stability, spectral energy distribution, autocorrelation coefficient, and STFT result.
[0143] The model training uses a supervised learning method. For example, using the SVM, the radial basis function kernel is used to optimize the hyperparameters (such as penalty coefficient C and kernel parameter γ) to achieve a classification accuracy of more than 95%. After training, the model is deployed on the device to analyze each data segment in real time. If the autocorrelation coefficient of a certain data segment is less than 0.3, or the main frequency energy accounts for less than 50%, it is marked as non-periodic motion and excluded from gait event detection.
[0144] For example, when a user is walking, the device is accidentally dropped, generating a segment of acceleration data. After analysis by the system, the autocorrelation coefficient is 0.25, the main frequency energy accounts for 40%, and the variance is 0.6. The model determines that it is non-periodic motion. This segment of data is subsequently marked as invalid and does not participate in subsequent gait segmentation calculations, thereby avoiding misjudgment.
[0145] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any skilled person in the art can make equivalent replacements or changes to the technical solution and inventive concept of the present application within the scope of the disclosed technology, which should be covered within the protection scope of the present application.
Claims
1. An IMU-based gait segmentation method, characterized in that, The method comprises the following steps: Processing three-axis acceleration data collected by the IMU, extracting acceleration amplitude, and identifying a gait cycle based on the acceleration amplitude; Based on the gait cycle and three-axis acceleration data, dynamically updating a plurality of dynamic parameters related to gait event detection; Based on the dynamic parameters, identifying a plurality of key events in the gait cycle, including a starting point, an ending point, a take-off point, and a landing point; Outputting a complete gait event sequence.
2. The IMU-based gait segmentation method of claim 1, wherein, Processing three-axis acceleration data collected by the IMU comprises the following steps: Calculating the amplitude of three-axis acceleration at each sampling time; Performing moving average filtering on the acceleration amplitude sequence to reduce short-term fluctuations; Applying a first-order IIR low-pass filter to the smoothed acceleration amplitude sequence to further suppress high-frequency noise; The processed acceleration amplitude sequence is used as an input feature for gait cycle detection and event identification.
3. The IMU-based gait segmentation method of claim 2, wherein, The process of identifying a gait cycle includes analyzing the periodic characteristics of the acceleration amplitude sequence, identifying the time interval between adjacent cycle starting points, and determining the gait cycle length.
4. The IMU-based gait segmentation method of claim 3, wherein, The process of identifying a plurality of key events based on dynamic parameters includes: Using a sliding window to detect each point of the acceleration amplitude sequence, and when the standard deviation of the acceleration amplitude sequence is less than a static threshold, the absolute value of the slope of the acceleration amplitude sequence is less than a slope threshold, and the average value of the acceleration amplitude sequence in the sliding window is close to zero, the starting point of the gait is identified; In a preset time window after the starting point of the gait, find the maximum point of the Z-axis acceleration, and identify the take-off point; After the take-off point, when the standard deviation of the acceleration amplitude sequence in the sliding window is again lower than the set static threshold, and the average value of the XY plane combined acceleration amplitude is lower than the preset amplitude threshold, the ending point of the gait is identified; In a preset time window before the ending point of the gait, find the maximum point of the Z-axis acceleration, and identify the landing point.
5. The IMU-based gait segmentation method of claim 1, wherein, The method further comprises: Building a gait memory module to record key feature parameters of historical gait cycles during multiple gait segmentation processes, including gait cycle length, acceleration amplitude, event interval, and event distribution pattern; When performing current gait segmentation, call historical gait features as reference basis to modify or weight the confidence of dynamic parameter update or key event judgment result, for improving segmentation stability and individual adaptive ability.
6. The IMU-based gait segmentation method of claim 5, wherein, The gait memory module comprises: A feature storage unit for storing key statistical parameters of a plurality of historical gait cycles, including average cycle length, average acceleration amplitude, time interval between key events, and amplitude variation range; A matching judgment unit for comparing the similarity of the current detected cycle parameters with the historical gait features, and modifying the current segmentation result using the memory parameters when the similarity exceeds a set threshold; A parameter update unit for incrementally updating the historical features according to the current cycle features after each gait segmentation is completed.
7. The IMU-based gait segmentation method of claim 1, wherein, The method further comprises a gait start intention prediction mechanism, which is used to predict the possibility of the user starting to walk in advance according to the weak acceleration trend in the static state before the gait starting point is identified, specifically comprising: A micro-motion trend analysis unit is configured to detect low-amplitude, multi-frequency component acceleration disturbances in the stationary phase; A start intention determination unit is configured to construct an intention score model based on the duration, waveform trend and change slope of the acceleration disturbance, and trigger a pre-start flag when the score exceeds a set threshold; A parameter preloading module is configured to prepare a set of start detection parameters in advance after identifying the start intention, so as to shorten the response delay time of the subsequent gait starting point.
8. The IMU-based gait segmentation method of claim 7, wherein, The intention score model is calculated by weighted combination of the following characteristic quantities: The duration of continuous acceleration disturbance in the stationary phase; The average slope and variance of the disturbance waveform; The micro-amplitude rising trend of Z-axis direction acceleration in the recent period of time; The statistical number of disturbance peak frequencies in the sliding window; The characteristic quantities are combined into a start intention score by linear weighting or logical discriminant function, and compared with a set threshold to output a pre-judgment result.
9. The IMU-based gait segmentation method of claim 1, wherein, The method further comprises a non-periodic motion stripping module for identifying and excluding non-gait motion interference in the acceleration data, improving the accuracy of gait cycle recognition, the module comprising: A feature extraction unit is configured to extract the periodic consistency index, spectral distribution feature and energy concentration degree of the acceleration data segment in the sliding window; A non-periodic discrimination unit is configured to determine whether the current data segment belongs to non-periodic motion based on a pre-set periodicity threshold, spectral energy distribution standard or training model; An interference stripping mechanism is configured to mark the data identified as a non-periodic segment as an invalid segment, and exclude it from the gait event detection process to avoid false positives.
10. The IMU-based gait segmentation method of claim 9, wherein, The non-periodic discrimination unit uses a trained classification model to determine whether the current data segment is non-periodic motion, and the model is trained by the following steps: Construct a labeled sample set, which includes typical gait data segments and various non-periodic motion data segments, including random hand shaking, device vibration and stationary state switching; Extract the feature vector of each sample, including any one or more of the following: cycle length stability, acceleration spectral energy distribution, signal autocorrelation coefficient and short-time Fourier transform result; Use a supervised learning method to train the classification model, which is one of decision tree, support vector machine or lightweight neural network; Deploy the trained model on the terminal device to identify and shield non-periodic interference segments during actual segmentation.