An Automatic Detection Method for Stroke Gait Cycle Based on Improved Weighted Autocorrelation
By improving the method of combining weighted autocorrelation with sliding windows, the existing gait cycle detection methods are solved, and the detection effect of high accuracy and retained gait variability is achieved, which is suitable for gait detection in stroke patients.
Patent Information
- Application Number
- CN202210586838.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-05-27
AI Technical Summary
The existing gait cycle detection methods have problems such as low accuracy, inability to effectively suppress noise interference, and inability to retain gait variability, especially for abnormal gait detection in stroke patients.
Using the method of combining the improved weighted autocorrelation method with sliding window, the foot movement trajectory signal is collected through the motion capture system, the effective interval is extracted and all landing moments are searched to complete the automatic detection of the gait period signal.
It effectively suppresses noise interference, improves the accuracy of gait period detection, retains gait variability, has the advantages of simple operation, high accuracy and strong robustness, and has the characteristics of strong anti-interference ability and easy to promote.
Smart Images

Figure CN114869273B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gait detection and analysis, and particularly relates to an automatic detection method for stroke gait cycles based on improved weighted autocorrelation. Background Art
[0002] A stroke refers to an acute cerebrovascular disease in which blood vessels in the brain are blocked or suddenly ruptured due to various reasons, and the blood in the brain cannot flow into the brain normally, resulting in damage to brain tissue. Stroke is characterized by high incidence, high mortality, high disability rate, and high recurrence rate, and is the leading cause of death and disability among the adult population in China. More than 80% of stroke patients have limb motor dysfunction.
[0003] Walking is a basic activity in which a person moves by alternately supporting and swinging with both legs. The realization of normal gait requires highly coordinated nerves and muscles, so a weakened degree of nervous system regulation and a disorder of spinal reflex activities will affect normal gait. Stroke patients often have lower limb motor dysfunction. The analysis of gait signals can assist in formulating rehabilitation treatment plans, fitting assistive devices, and evaluating treatment effects for stroke patients.
[0004] A gait cycle is the time process from when one heel touches the ground to when the same heel touches the ground again. Currently, gait cycle signals are mainly detected using cameras, pressure plates, electromyograms, and inertial sensor systems. Among them, the pressure plate has high detection accuracy, but is limited by the measurement range. Usually, it can only measure one step on each side of the subject, and cannot reflect the variability of the gait cycle. Moreover, for the landing points of abnormal gaits such as dragging or circumduction of stroke patients, the pressure plate cannot judge normally, thus affecting gait recognition. The surface electromyogram detection method is sensitive to the position of the muscle where the electrode is located, and the signal-to-noise ratio of the electromyogram signal collected during walking is poor, affecting the detection effect of the gait cycle. Inertial sensor devices have the advantages of portability and low cost, but have a high misdetection rate and poor reliability. The motion capture system based on cameras can collect the motion trajectory signals of the subject, and can accurately detect and analyze the abnormal gaits of patients, providing a new possibility for the detection of gait cycle signals. However, there are few related studies currently. Currently, it is mainly based on peak, threshold rules, and machine learning. The methods based on peak and threshold rules generally set thresholds for specific data sets, and the algorithms are easily affected by noise. Machine learning algorithms are complex and have low computational efficiency. Summary of the Invention
[0005] To overcome the problems existing in the prior art, the purpose of the present invention is to provide an automatic detection method for stroke gait cycle based on improved weighted autocorrelation. First, an effective interval is extracted from the foot movement trajectory signal collected by the motion capture system; secondly, by combining the proposed improved weighted autocorrelation method with a sliding window, all touchdown moments in the entire movement process are searched to complete the automatic detection of the gait cycle signal; it can effectively suppress the influence of noise and interference, not only improve the accuracy of gait cycle signal detection, but also retain the variability of gait during the movement process. It has the advantages of simple operation, high accuracy, and strong robustness, and has the characteristics of strong anti-interference ability and easy promotion.
[0006] To achieve the above purpose, the present invention is realized through the following technical solutions:
[0007] An automatic detection method for stroke gait cycle based on improved weighted autocorrelation, comprising the following steps:
[0008] Step 1: Use a motion capture system to collect the movement trajectory data of the ankle and heel markers of the subject walking on a flat ground, where the trajectory signals in the Z-axis direction are z a (t) and z h (t);
[0009] Step 2: Perform linear fitting on the lowest points of the trajectory signals z a (t) and z h (t) to remove the signal baseline drift and obtain the signals x a (t) and x h (t);
[0010] Step 3: Calculate the mean value in the middle section of the signals x a (t) and x h (t), extract the sliding window length through autocorrelation, and then determine the effective interval of the signal y a (t) and y h (t) according to the relationship between the sliding window mean value and the middle section mean value;
[0011] Step 4: Obtain the local minimum value of the effective interval signal y h )t) of the heel marker to determine the initial touchdown moment point t0;
[0012] Step 5: De-mean the effective interval signal y a (t) of the ankle marker to obtain the signal h a (t); then calculate the autocorrelation of the signal h a (t) to determine the initial sliding window length L0, intercept the signal h a_w0 (t) with t0 as the center, and adopt the proposed improved weighted autocorrelation method to calculate the initial gait cycle T0;
[0013] Step 6: Determine the subsequent touchdown time t based on the initial touchdown point t0 and the gait cycle T0 n and the sliding window length L n , extract the sliding window signal h a_wn (t) and calculate the period T n ; Search all touchdown time points to complete the automatic detection of the gait cycle.
[0014] In the second step, the specific steps to remove the signal baseline drift are as follows:
[0015] x a (t) = z a (t) - trend a (t)
[0016] where trend a (t) is the linear fitting signal of the local minimum value sequence of z a (t).
[0017] In the third step, the steps to extract the effective interval are as follows:
[0018] 3.1. Calculate the mid-segment mean of the signals x a (t) and x h (t): The calculation formula is:
[0019]
[0020] where x(i) is the i-th signal value of the signals x a (t) and x h (t), and N o is the signal length;
[0021] 3.2. Calculate the autocorrelation R x (m), and the time point of its first peak is the sliding window length L:
[0022]
[0023] 3.3. Determine the signal effective interval according to the relationship between the sliding window mean and the mid-segment mean:
[0024] The sliding window mean is calculated as follows:
[0025]
[0026] If it satisfies where coef is the similarity coefficient, then x(n) = [x(n), x(n + 1)... x(n + L - 1)] is the effective interval, and the extracted effective interval signal is y a (t) and yh (t).
[0027] In the fourth step, the calculation method for determining the initial landing time point t0 is as follows:
[0028] If: index_max(0) > index_t(0) and index_max(0) < index_t(1)
[0029] Then t0 = index_t(1); otherwise: t0 = index_t(0);
[0030] Where index_max(i) is the (i + 1)-th peak time point of the signal, and index_t(i) is the (i + 1)-th valley time point of the signal.
[0031] In the fifth step, the definition of the improved weighted autocorrelation is proposed as follows:
[0032]
[0033] Where CWAF(m) is the improved weighted autocorrelation, R(m) is the autocorrelation, s(m) is the average magnitude difference, c(m) is the cepstrum, and the signal period T0 is the time point of the first peak of CWAF(m);
[0034] The calculation formula of R(m) is as follows:
[0035]
[0036] Where L0 is 2.5 times the time point of the first peak of the autocorrelation of h a (t);
[0037]
[0038] The calculation formula of s(m) is as follows:
[0039]
[0040] The calculation formula of c(m) is as follows:
[0041] c(m) = IDFT(abs(DFT(h a_w0 )))
[0042] Where DFT is the Fourier transform of the signal, and IDFT is the inverse Fourier transform of the signal.
[0043] In the sixth step, determine the subsequent landing time t n , the sliding window length L n , the sliding window signal h a_wn (t) and the period T nThe specific steps are as follows:
[0044] f n = t n-1 + T n-1
[0045] L n = 2.5 * T n-1
[0046]
[0047] T n is h a_wn The time point of the first peak of the improved weighted autocorrelation of the (t) signal.
[0048] In step three, the middle section is the 20%-80% interval of the signal.
[0049] Advantages of the present invention:
[0050] (1), The present invention completes the automatic detection of the gait cycle based on the ankle movement trajectory signal. By calculating the sliding window mean to extract the effective interval of the signal, the influence of irregular movements such as turning and stepping can be effectively removed.
[0051] (2), The present invention first proposes an automatic gait cycle detection method combining improved weighted autocorrelation and sliding window, which has the advantages of simple operation, high accuracy, retaining gait variability, and strong robustness, and has the characteristics of strong anti-interference ability and easy promotion. Description of the drawings
[0052] Figure 1 is the flowchart of the automatic gait cycle extraction method of the improved weighted autocorrelation of the present invention.
[0053] Figure 2 is the waveform comparison diagram of the trajectory signal before and after removing drift.
[0054] Figure 3 is the effect diagram of extracting the effective interval of the trajectory signal.
[0055] Figure 4 is the effect diagram of extracting the initial touchdown point according to the effective interval of the heel marker.
[0056] Figure 5 is the effect diagram of improved weighted autocorrelation and gait cycle detection search.
[0057] Figure 6 is the statistical chart of the gait cycle error of the improved weighted autocorrelation method and the autocorrelation method in the healthy and stroke groups. Detailed implementation manners
[0058] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0059] See Figure 1 , this embodiment provides an automatic detection method for stroke gait cycle based on improved weighted autocorrelation, and the specific implementation steps are as follows:
[0060] Step 1: Use a motion capture system to collect the motion trajectory data of the ankle and heel marker points of the subject walking on flat ground. Among them, the trajectory signals in the Z-axis direction are z a (t), z h (t).
[0061] Step 2: Perform linear fitting on the lowest points of the trajectory signals z a (t), z h (t) to remove the signal baseline drift, and obtain the signals x a (t), x h (t). Figure 2 That is the waveform comparison diagram of the trajectory signal before and after drift removal. Taking x a (t) as an example, the calculation method is as follows:
[0062] x a (t) = z a (t) - trend a (t)
[0063] Among them, trend a (t) is the linear fitting signal of the local minimum value sequence of z a (t).
[0064] Step 3: Calculate the mean value of the middle section of the signals x a (t), x h (t) The middle section is the 20%-80% interval of the signal.
[0065]
[0066] Among them, x(i) is the i-th signal value of the signals x a (t), x h (t), and N o is the signal length.
[0067] Calculate the autocorrelation R x (m), and the moment point of its first peak is the sliding window length L.
[0068]
[0069] Then calculate the mean value of the sliding window signal The calculation formula is as follows:
[0070]
[0071] If it satisfies (where coef is the similarity coefficient, and in this example, coef is set to 0.85), then x(n)=[x(n), x(n + 1),..., x(n + L - 1)] is the effective interval. The extracted effective interval signal is y a (t), y h (t).
[0072] Before and after walking, there may be irregular movements such as turning around and stepping, so it is necessary to determine the starting and ending time points of walking to extract the effective interval. Since the normal walking signal fluctuates quasi-periodically, the starting time point can be determined by the similarity within the period. Figure 3 This is the effect diagram of the extraction of the effective interval of the trajectory signal.
[0073] Step 4: Find the local minimum value of the effective interval signal y h (t) of the heel mark to determine the initial touchdown time point t0. The calculation method is as follows:
[0074] if: index_max(0) > index_t(0) && index_max(0) < index_t(1)
[0075] t0 = index_t(1)
[0076] else:
[0077] t0 = index_t(0)
[0078] where index_max(i) is the (i + 1)-th peak time point of the signal, index_t(i) is the (i + 1)-th valley time point of the signal, and && represents the logical AND relationship. Figure 4 This is the effect diagram of the initial touchdown point extracted based on the effective interval of the heel mark. It can be seen from the figure that t0 basically coincides with the touchdown time detected by the pressure plate with a threshold of 20N.
[0079] Step 5: Perform mean removal on the effective interval signal y a (t) of the ankle mark to obtain the signal h a (t). Stroke patients often have the conditions of foot drop, varus, and genu recurvatum on the affected side, resulting in dragging or circumduction gait, which affects recognition. The cycle detection method based on the ankle mark points is less sensitive to abnormal gait and has better stability compared to the heel.
[0080] Then find the autocorrelation of the signal h a (t) to determine the initial sliding window length L0, and intercept the signal h a_w0(t), and the proposed improved weighted autocorrelation method is adopted to calculate the initial gait cycle \(T_0\).
[0081] The proposed improved weighted autocorrelation is defined as:
[0082]
[0083] where \(CWAF(m)\) is the improved weighted autocorrelation, \(R(m)\) is the autocorrelation, \(s(m)\) is the average magnitude difference, and \(c(m)\) is the cepstrum. The signal period \(T_0\) is the time point corresponding to the first peak of \(CWAF(m)\).
[0084] The calculation formula of \(R(m)\) is as follows:
[0085]
[0086] where \(L_0\) is 2.5 times the time point of the first peak of the autocorrelation of \(h\) a (t),
[0087]
[0088] The calculation formula of \(s(m)\) is as follows:
[0089]
[0090] The calculation formula of \(c(m)\) is as follows:
[0091] \(c(m)=IDFT(abs(DFT(h\) a_w0 )))
[0092] where \(DFT\) is the Fourier transform of the signal, and \(IDFT\) is the inverse Fourier transform of the signal.
[0093] Figure 5 That is the effect diagram of the improved weighted autocorrelation and gait cycle detection search. Autocorrelation and average magnitude difference are methods for detecting the period in the time domain, and the cepstrum method detects the period through the frequency domain. Therefore, the patterns of noise components in autocorrelation, average magnitude difference, and cepstrum are different. Thus, the advantage of the proposed improved weighted autocorrelation method lies in its ability to suppress unnecessary peaks and improve the accuracy of gait cycle.
[0094] Step 6: Determine the subsequent touchdown moment \(t\) n and the sliding window length \(L\) n , extract the sliding window signal \(h\) a_wn (t) and calculate the period \(T\) n .
[0095] \(f\) n =t n-1 +T n-1
[0096] L n = 2.5 * T n-1
[0097]
[0098] T n is h a_wn (t) the time point of the first peak of the improved weighted autocorrelation. At least two cycles of signals are required for autocorrelation period extraction, so the window length of the sliding window is 2.5 times the calculated gait cycle.
[0099] Gait cycle detection is completed by searching all touchdown time points. The advantage of the sliding window is to retain gait variability. There are gait cycle differences in normal people walking on flat ground, and the variability is more obvious in stroke patients due to poor balance and control.
[0100] To verify the accuracy of the gait cycle extraction method given in this embodiment, the inventor collected the flat-ground walking data of 4 healthy people and 5 stroke patients, and compared the relative errors of the step length time calculated by the autocorrelation method and the improved weighted autocorrelation method proposed in the present invention. The results show that compared with the autocorrelation method, the relative error of the method proposed in the present invention for stroke patients is significantly reduced, and the average error of the healthy group also decreases (such as Figure 6 ). Therefore, this method has good application potential and broad application prospects in the field of automatic detection and gait analysis of stroke gait cycles.
Claims
1. An automatic detection method for stroke gait cycle based on improved weighted autocorrelation, characterized in that, Including the following steps: Step 1: Use a motion capture system to collect the motion trajectory data of the ankle and heel marker points of the subject walking on flat ground. Among them, the trajectory signals in the Z-axis direction are z a (t) and z h (t); Step 2: Perform a linear fit on the lowest points of the trajectory signals z a (t) and z h (t) to remove the signal baseline drift and obtain the signals x a (t) and x h (t); Step 3: Calculate the signal x a (t), x h (t) mid-segment mean value, extract the sliding window length through autocorrelation, and then determine the signal effective interval y a (t), y h (t); Step 4: Obtain the local minimum value of the valid interval signal y h (t) of the heel mark, and determine the initial touchdown time point t0; Step Five: De-mean the valid interval signal y a (t) of the ankle marker to obtain the signal h a (t); then, determine the initial sliding window length L0 by finding the autocorrelation of the signal h a (t), intercept the signal h a_w0 (t) centered at t0, and calculate the initial gait cycle T0 using the proposed improved weighted autocorrelation method; Step 6: Determine the subsequent touchdown time t based on the initial touchdown point t0 and the gait cycle T0 n and the sliding window length L n , extract the sliding window signal h a_wn (t) and calculate the period T n ; Search all touchdown time points to complete the automatic detection of the gait cycle.
2. The automatic detection method for stroke gait cycle based on improved weighted autocorrelation according to claim 1, wherein In the second step, the specific steps for removing the signal baseline drift are: x a z(t) a z(t) - trend a z(t) Among them, trend a (t) is the linear fitting signal of the local minimum value sequence of z a (t).
3. The automatic detection method for stroke gait cycle based on improved weighted autocorrelation according to claim 1, characterized in that, In the third step, the steps for extracting the effective interval are: 3.
1. Calculate the signal x a (t), x h (t) midpoint mean value The calculation formula is as follows: where x(i) is the i-th signal value of the signals x a (t), x h (t), and N o is the signal length; 3.
2. Calculate the autocorrelation R x (m), and the time point of its first peak is the sliding window length L: 3.
3. Determine the signal effective interval according to the relationship between the moving window mean and the mid-section mean: Moving window average The calculation formula is as follows: If satisfied where coef is the similarity coefficient, x(n)=[x(n), x(n + 1),..., x(n + L - 1)] is the effective interval, and the extracted effective interval signal is y a (t), y h (t).
4. A method for automatically detecting the gait cycle of stroke based on improved weighted autocorrelation according to claim 1, characterized in that In the fourth step, the calculation method for determining the initial touchdown time point t0 is as follows: If: index_max(0) > index_t(0) and index_max(0) < index_t(1) Then t0 = index_t(1); otherwise: t0 = index_t(0); Where index_max(i) is the (i + 1)-th peak time point of the signal, and index_t(i) is the (i + 1)-th valley time point of the signal.
5. The automatic detection method for stroke gait cycle based on improved weighted autocorrelation according to claim 1, characterized in that In the fifth step, the definition of the proposed improved weighted autocorrelation is as follows: Where CWAF(m) is the improved weighted autocorrelation, R(m) is the autocorrelation, s(m) is the average amplitude difference, c(m) is the cepstrum, and the signal period T0 is the time point of the first peak of CWAF(m); The calculation formula of R(m) is as follows: where L0 is 2.5 times the first peak moment point of the autocorrelation of h a (t); The calculation formula of s(m) is as follows: The calculation formula of c(m) is as follows: c(m) = IDFT(abs(DFT(h a_w0 ))) Where DFT is the Fourier transform of the signal, and IDFT is the inverse Fourier transform of the signal.
6. The automatic detection method for stroke gait cycle based on improved weighted autocorrelation according to claim 1, wherein In step six described above, determine the subsequent touchdown time t n , the sliding window length L n , the sliding window signal h a_wn (t) and the period T n The specific steps are as follows: t n = t n-1 + T n-1 L n = 2.5 * T n-1 T n For h a_wn (t) The time point of the first peak of the improved weighted autocorrelation of the signal.
7. The automatic detection method for stroke gait cycle based on improved weighted autocorrelation according to claim 1, characterized in that In the third step, the mid-section is the 20%-80% interval of the signal.
Citation Information
Patent Citations
Automatic real-time detection method for motion starting point on the basis of electromyography
CN110236538A
Gait analysis and anomaly detection method based on wearable sensor
CN114469073A