Gait spatio-temporal information calculation method and system based on single inertial sensing unit
The calculation of gait spatiotemporal information through a single inertial sensing unit solves the problems of space limitations in motion, high costs and inaccurate parameters in gait analysis, and achieves low-cost and accurate gait analysis.
Patent Information
- Application Number
- CN202411439071.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-14
Smart Images

Figure CN119302648A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a method, system, terminal and computer-readable storage medium for calculating gait spatiotemporal information based on a single inertial sensing unit. Background Art
[0002] Gait analysis is an important method for systematically analyzing and evaluating the posture, movement and mechanical characteristics of the human body when walking or running. The importance of gait analysis lies in the fact that it provides quantitative and objective data that can reveal an individual's walking pattern, movement characteristics and potential problems. Through gait analysis, abnormal gait can be detected and corrected early, sports skills and posture can be improved, the risk of sports injuries can be reduced, and the individual's sports efficiency and comfort can be improved.
[0003] Among the existing gait analysis solutions, the optical human motion tracking system has high requirements for the lighting environment, is easily blocked, has space limitations, is expensive, and requires professionals to calibrate and operate; while the gait analysis system based on inertial sensors has limitations in the number of sensors required, the sensor wearing position, the gait analysis parameters that can be detected, and the accuracy of the gait analysis parameters.
[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0005] The main purpose of the present invention is to provide a method, system, terminal and computer-readable storage medium for calculating gait spatiotemporal information based on a single inertial sensor unit, aiming to solve the problems of existing gait analysis solutions, such as limited motion space, high cost, large number of inertial sensors required and inconvenient wearing, and incomplete and inaccurate gait analysis parameters detected.
[0006] To achieve the above-mentioned object of the invention, the present invention provides a method for calculating gait spatiotemporal information based on a single inertial sensing unit, the method for calculating gait spatiotemporal information based on a single inertial sensing unit comprising:
[0007] Acquire motion information collected by an inertial sensor unit installed on the waist of a human body, and perform filtering processing on the motion information to obtain first motion data;
[0008] performing integration, wavelet transform and differentiation processing on the first motion data in sequence to obtain second motion data;
[0009] performing Fourier transform, filtering and inverse Fourier transform processing on the second motion data in sequence to obtain third motion data;
[0010] Performing differentiation processing on the third motion data to obtain fourth motion data;
[0011] Gait spatiotemporal parameters corresponding to the human body motion are calculated based on the third motion data and the fourth motion data.
[0012] Optionally, the acquiring motion information collected by an inertial sensor unit installed on the waist of a human body and filtering the motion information to obtain the first motion data specifically includes:
[0013] Acquire in real time the motion information collected by the inertial sensor unit installed on the waist of the human body when the human body moves, wherein the Y-axis of the inertial sensor unit points in the vertical direction, and the motion information is the Y-axis acceleration data;
[0014] A second-order Butterworth low-pass filter is used to perform low-pass filtering on the Y-axis acceleration data to obtain first motion data.
[0015] Optionally, the second-order Butterworth low-pass filter is used to perform low-pass filtering on the Y-axis acceleration data to obtain the first motion data, specifically:
[0016] The Y-axis acceleration data is low-pass filtered through the second-order Butterworth low-pass filter, and the formula is as follows:
[0017]
[0018] Where n is the order of the filter; ω is the system frequency; ω c is the cut-off frequency; ω p is the passband edge frequency; |H(ω)| 2 is the square of the amplitude; ∈ 2 Indicates the reciprocal of the value at the edge of the passband minus 1.
[0019] Optionally, the step of sequentially performing integration, wavelet transformation and differentiation processing on the first motion data to obtain the second motion data specifically includes:
[0020] The first motion data is subjected to discrete integration processing, and the formula is expressed as follows:
[0021] ∫f(u)du=∑f(ui)Δu;
[0022] Where f(u) represents a continuous function; u is the independent variable; ui is a discrete point; f(ui) represents the function value corresponding to the discrete point ui; Δu is the distance between adjacent discrete points;
[0023] The first motion data after discrete integral processing is processed by discrete wavelet transform, and the formula is as follows:
[0024] A1(q)=∑ k f(p)*h(pq);
[0025] D1(q)=∑ k f(p)*g(pq);
[0026] Among them, A1(q) is the low-frequency coefficient; D1(q) is the high-frequency coefficient; q is the data sequence of the low-frequency coefficient and the high-frequency coefficient; f(p) is the function transformed by the wavelet; p is the data sequence of the function transformed by the wavelet; h(pq) is the low-pass filter coefficient of the wavelet analysis filter; g(pq) is the high-pass filter coefficient of the wavelet analysis filter; pq is the data sequence of the low-pass filter coefficient and the high-pass filter coefficient; k represents the kth group of data;
[0027] The first motion data processed by discrete wavelet transform is subjected to discrete differentiation to obtain second motion data, which is expressed as follows:
[0028]
[0029] Among them, f'(k) is the derivative value of the function at point k; k is the independent variable; f(k+1) is the function value at point k+1; f(k) is the function value at point k; Δk is the distance between adjacent discrete points.
[0030] Optionally, the performing Fourier transform, filtering and inverse Fourier transform processing on the second motion data in sequence to obtain third motion data specifically includes:
[0031] The second motion data is subjected to fast Fourier transform processing, and the formula is expressed as follows:
[0032]
[0033] Wherein, X(k') is the data obtained after fast Fourier transform; k' is the data sequence of the data obtained after fast Fourier transform; DFT represents fast Fourier transform; x(n') is the original data; n' is the data sequence of the original data; N is the data length; W N represents the unit complex root; i is the imaginary number symbol;
[0034] The second motion data after fast Fourier transform processing is subjected to low-pass filtering, and the formula is as follows:
[0035]
[0036] Wherein, cutoff represents the low-pass frequency; fs represents the data frequency; H(j) represents the low-pass filter; f(j) represents the initial filtering data; j represents the data sequence of the initial filtering data;
[0037] The second motion data after low-pass filtering is subjected to inverse fast Fourier transform processing to obtain third motion data, which is expressed as follows:
[0038]
[0039] Among them, x(n") is the data obtained after the inverse fast Fourier transform; n" is the data sequence of the data obtained after the inverse fast Fourier transform; IDFT represents the inverse fast Fourier transform; X(k") is the original data; k" is the data sequence of the original data.
[0040] Optionally, performing differentiation processing on the third motion data to obtain the fourth motion data is specifically:
[0041] The third motion data is subjected to discrete differential processing to obtain fourth motion data, which is expressed as follows:
[0042]
[0043] Among them, f'(k) is the derivative value of the function at point k; k is the independent variable; f(k+1) is the function value at point k+1; f(k) is the function value at point k; Δk is the distance between adjacent discrete points.
[0044] Optionally, the gait spatiotemporal parameters include heel-touching time point, toe-off time point, gait cycle, stance phase time, swing phase time, step frequency and step length;
[0045] The calculating, according to the third motion data and the fourth motion data, gait spatiotemporal parameters corresponding to the human body motion specifically includes:
[0046] Calculate the time point corresponding to the minimum value of the third motion data as the heel contact time point;
[0047] Calculate the time point corresponding to the maximum value of the fourth motion data as the toe-off time point;
[0048] Calculating the time difference between adjacent heel contact time points as the gait cycle;
[0049] The time difference between the heel contact time point and the next toe lift-off time point is calculated as the stance phase time;
[0050] The time difference between the toe-off time point and the next heel-contact time point is calculated as the swing phase time;
[0051] The number of heel-touching time points per minute is calculated as the step frequency;
[0052] The distance the human body advances corresponding to one gait cycle is calculated as the step length.
[0053] To achieve the above-mentioned object of the invention, the present invention further provides a gait spatiotemporal information calculation system based on a single inertial sensing unit, the gait spatiotemporal information calculation system based on a single inertial sensing unit comprising:
[0054] Data acquisition and filtering module: used to acquire motion information collected by an inertial sensor unit installed on the waist of a human body, and filter the motion information to obtain first motion data;
[0055] Data integration, wavelet transform and differentiation module: used for performing integration, wavelet transform and differentiation processing on the first motion data in sequence to obtain second motion data;
[0056] A data Fourier transform, filtering and inverse Fourier transform module: used to perform Fourier transform, filtering and inverse Fourier transform processing on the second motion data in sequence to obtain third motion data;
[0057] A data differentiation module: used for performing differentiation processing on the third motion data to obtain fourth motion data;
[0058] Gait spatiotemporal parameter calculation module: used to calculate the gait spatiotemporal parameters corresponding to the human body movement based on the third motion data and the fourth motion data.
[0059] To achieve the above-mentioned purpose of the invention, the present invention also provides a terminal, which includes: a memory, a processor, and a gait spatiotemporal information calculation program based on a single inertial sensor unit stored in the memory and executable on the processor, wherein the gait spatiotemporal information calculation program based on a single inertial sensor unit implements the steps of the gait spatiotemporal information calculation method based on a single inertial sensor unit as described above when the gait spatiotemporal information calculation program based on a single inertial sensor unit is executed by the processor.
[0060] To achieve the above-mentioned purpose of the invention, the present invention also provides a computer-readable storage medium, which stores a gait spatiotemporal information calculation program based on a single inertial sensor unit, and when the gait spatiotemporal information calculation program based on a single inertial sensor unit is executed by a processor, the steps of the gait spatiotemporal information calculation method based on a single inertial sensor unit as described above are implemented.
[0061] In the present invention, the motion information collected by the inertial sensor unit installed on the waist of the human body is obtained, and the motion information is filtered to obtain the first motion data; the first motion data is sequentially integrated, wavelet transformed and differentiated to obtain the second motion data; the second motion data is sequentially Fourier transformed, filtered and Fourier inverse transformed to obtain the third motion data; the third motion data is differentiated to obtain the fourth motion data; the gait time-space parameters corresponding to the human body movement are calculated according to the third motion data and the fourth motion data. The present invention can realize comprehensive and accurate real-time calculation of gait time-space information only through a single inertial sensor unit, and the inertial sensor unit is easy to wear, the motion space is not limited, and the cost is low. It solves the problems that the existing gait analysis scheme is limited by the motion space, the cost is high, the number of inertial sensors required is large and inconvenient to wear, and the detected gait analysis parameters are not comprehensive and accurate, and provides a more comprehensive, accurate and low-cost gait analysis scheme. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a flow chart of a preferred embodiment of a method for calculating gait spatiotemporal information based on a single inertial sensing unit of the present invention;
[0063] Figure 2 is another flow chart of a preferred embodiment of the method for calculating gait spatiotemporal information based on a single inertial sensing unit of the present invention;
[0064] Figure 3 is a schematic diagram of an inertial sensor unit worn on a human waist according to the present invention;
[0065] Figure 4 It is a signal comparison diagram of the Y-axis acceleration data, the second motion data and the third motion data of the present invention;
[0066] Figure 5 It is a signal comparison diagram of the Y-axis acceleration data, the third motion data and the fourth motion data of the present invention;
[0067] Figure 6 It is a flow chart of calculating step length of the present invention;
[0068] Figure 7 It is a signal comparison diagram of Y-axis acceleration data, first motion data, Y-axis velocity data, second motion data, third motion data and fourth motion data of the present invention;
[0069] Figure 8 is a curve diagram showing the relationship between the third motion data and time of the present invention;
[0070] Fig. 9 is a curve diagram showing the relationship between the fourth motion data and time of the present invention;
[0071] Fig.10 It is a curve diagram showing the relationship between the travel distance and time of the present invention;
[0072] Fig.11 It is a structural diagram of a preferred embodiment of a gait spatiotemporal information calculation system based on a single inertial sensing unit of the present invention;
[0073] Fig.12 It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0075] Gait analysis is an important method for systematically analyzing and evaluating the posture, movement and mechanical characteristics of the human body when walking or running. The importance of gait analysis lies in the fact that it provides quantitative and objective data that can reveal an individual's walking pattern, movement characteristics and potential problems. Through gait analysis, abnormal gait can be detected and corrected early, sports skills and posture can be improved, the risk of sports injuries can be reduced, and the individual's sports efficiency and comfort can be improved.
[0076] In addition, gait analysis is an important method in related scientific research fields. For example, in the field of medical diagnosis and rehabilitation, gait analysis can be used to evaluate and diagnose diseases and injuries related to walking, such as movement disorders, neuromuscular diseases, spinal problems, etc. Medical professionals can use gait analysis to develop rehabilitation plans, monitor rehabilitation progress, and evaluate treatment effects. In the field of sports training and sports health, gait analysis can be used to evaluate athletes' training and performance. Athletes can optimize their posture, improve efficiency, and reduce the risk of injury by analyzing their gait characteristics. In response to the needs of personal health management, gait analysis can also be used to monitor and evaluate an individual's exercise level and health status. Through long-term gait data collection and analysis, we can understand an individual's exercise habits, activity level, and exercise load, and provide a reference for health management and disease prevention.
[0077] Traditional gait analysis relies on motion capture systems, such as optical motion capture systems or inertial motion capture systems, to record body movements in real time or offline. Optical motion capture systems typically use multiple camera arrays to capture the movement trajectory and posture information of body joints through reflective markers. This method is the most accurate, but the equipment is expensive, requires professional operation, and is limited by the capture space.
[0078] In recent years, through computer vision technology and image processing algorithms, key gait parameters such as stride length, stride frequency and gait cycle can also be calculated. However, they are also limited by the capture space, ambient light, occlusion and obstacles.
[0079] Using pressure sensitive pads, floor sensors or pressure sensors in insoles to measure the contact pressure distribution between the foot and the ground can also provide information about the gait cycle, the timing of the stance and swing phases, and the symmetry of the gait, but it cannot provide spatial information in the gait, such as the distance walked and the stride length.
[0080] In recent years, smart wearable sensors represented by inertial measurement units (IMUs) can be installed on key parts of the body, such as the waist, thighs, and calves, to capture posture and movements during walking. Therefore, many emerging gait analysis methods have been born based on inertial sensor units, but the existing gait analysis methods based on inertial sensor units have limitations in terms of the number of sensors required, wearing positions, gait analysis parameters that can be detected, and the accuracy of gait analysis parameters.
[0081] In the prior art, in the gait analysis method based on inertial sensors, the inertial sensors include accelerometers, gyroscopes and magnetometers. The principle of gait analysis using inertial sensors is as follows:
[0082] (1) Accelerometers measure the acceleration of an object in three spatial dimensions. In gait analysis, accelerometers are used to measure the acceleration changes of the body in three directions, namely front-to-back, left-to-right, and up-to-down. In theory, if an inertial sensor is fixedly worn on a certain part of the human body, the velocity can be obtained by integrating the output value of the accelerometer, and then the distance moved by the human body in space can be obtained by integration.
[0083] (2) The gyroscope measures the angular velocity of an object. In theory, by fixing the inertial sensor on a certain part of the human body, the change in the rotation speed of the human body around three axes in space can be obtained by integration, namely the change in the rotation speed around the longitudinal axis (yaw), the transverse axis (pitch) and the vertical axis (roll).
[0084] (3) Magnetometers can be used to assist in posture estimation and direction determination in gait analysis.
[0085] By filtering, integrating and algorithmically processing the above data, gait parameters such as cadence, stride, stance phase time, swing phase time, etc. can be obtained. In addition, inertial sensors can also be used to detect and analyze other gait characteristics, such as gait symmetry, walking stability and posture control.
[0086] In order to solve the above technical problems, the present invention provides a gait spatiotemporal information calculation method based on a single inertial sensor unit, and the gait spatiotemporal information calculation method based on a single inertial sensor unit includes: obtaining motion information collected by the inertial sensor unit installed on the waist of the human body, and filtering the motion information to obtain first motion data; performing integration, wavelet transform and differential processing on the first motion data in sequence to obtain second motion data; performing Fourier transform, filtering and Fourier inverse transform processing on the second motion data in sequence to obtain third motion data; performing differential processing on the third motion data to obtain fourth motion data; and calculating the gait spatiotemporal parameters corresponding to the human body motion according to the third motion data and the fourth motion data. The present invention can realize comprehensive and accurate real-time calculation of gait spatiotemporal information only through a single inertial sensor unit, and the inertial sensor unit is easy to wear, the motion space is not limited, and the cost is low, which solves the problems of the existing gait analysis scheme being limited by the motion space, high cost, requiring a large number of inertial sensors and being inconvenient to wear, and the detected gait analysis parameters are not comprehensive and accurate, and provides a more comprehensive, accurate and low-cost gait analysis scheme.
[0087] The application content is further explained below through the description of embodiments in conjunction with the accompanying drawings.
[0088] A preferred embodiment of the method for calculating gait spatiotemporal information based on a single inertial sensor unit of the present invention is as follows: Figure 1 and Figure 2 As shown, specifically including:
[0089] S1. Acquire motion information collected by an inertial sensor unit installed on a human waist, and filter the motion information to obtain first motion data.
[0090] In an implementation of this embodiment, motion information collected by an inertial sensor unit installed on the waist of a human body is obtained, and the motion information is filtered to obtain first motion data, which specifically includes:
[0091] S11, acquiring in real time motion information collected by an inertial sensor unit installed on the waist of a human body when the human body is in motion, wherein the Y-axis of the inertial sensor unit points in the vertical direction, and the motion information is Y-axis acceleration data;
[0092] S12, using a second-order Butterworth low-pass filter to perform low-pass filtering on the Y-axis acceleration data to obtain first motion data.
[0093] In one implementation of this embodiment, a second-order Butterworth low-pass filter is used to perform low-pass filtering on the Y-axis acceleration data to obtain the first motion data, specifically:
[0094] The Y-axis acceleration data is low-pass filtered through a second-order Butterworth low-pass filter. The formula is as follows:
[0095]
[0096] Where n is the order of the filter; ω is the system frequency; ω c is the cut-off frequency; ω p is the passband edge frequency; |H(ω)| 2 is the square of the amplitude; Represents the value at the edge of the passband, ∈ 2 Indicates the reciprocal of the value at the edge of the passband minus 1.
[0097] Specifically, the present invention adopts a self-developed inertial sensor unit, the core components of which are a 9-axis inertial sensor chip (BNO055) and an embedded single-chip microcomputer system (esp32_wroom). The inertial sensor chip collects the Y-axis acceleration (i.e., vertical acceleration) data during the movement, with a sampling rate of 100hz. The single-chip microcomputer system is responsible for sending these data to the self-developed software system on the computer side through the UDP communication protocol, and the computer side analyzes and calculates the data through the self-developed software system. A local area network is formed between the inertial sensor unit and the computer to ensure that the computer can successfully receive the inertial sensor unit data. The present invention collects the movement information of the human waist through a single inertial sensor unit, and sends this information to the computer in real time through a wireless transmission protocol, providing basic software and hardware for real-time gait information calculation, and has the advantages of easy wearing, unlimited movement space, and low cost. In specific implementation, the subject is first required to wear an inertial sensor unit, and the inertial sensor unit is placed at the back waist of the subject, such as Figure 3 As shown, the Y axis of the inertial sensor unit is ensured to be in the vertical direction during placement. Considering that the plane formed by the X axis and Y axis of the inertial sensor unit is almost parallel to the coronal plane of the person after placement, the Z axis of the inertial sensor unit can be regarded as pointing in the horizontal direction.
[0098] Since the acceleration data acquired by the inertial sensor unit is easily affected by the noise of high-frequency signals, the Y-axis (vertical direction) acceleration in the inertial sensor unit data is first filtered through a second-order Butterworth low-pass filter to remove high-frequency noise. The present invention effectively solves the problem that the inertial sensor unit signal contains large noise, which easily leads to data drift when calculating speed and distance through low-pass filtering.
[0099] S2. Perform integration, wavelet transform and differentiation processing on the first motion data in sequence to obtain second motion data.
[0100] In an implementation of this embodiment, the first motion data is sequentially integrated, wavelet transformed, and differentiated to obtain the second motion data, which specifically includes:
[0101] S21, performing discrete integration processing on the first motion data, that is, performing discrete integration processing on the Y-axis acceleration data after low-pass filtering by the second-order Butterworth low-pass filter, to obtain Y-axis velocity data, which is expressed as follows:
[0102] ∫f(u)du=∑f(ui)Δu;
[0103] Where f(u) represents a continuous function; u is the independent variable; ui is a discrete point; f(ui) represents the function value corresponding to the discrete point ui; Δu is the distance between adjacent discrete points;
[0104] S22, performing discrete wavelet transform processing on the first motion data (ie, Y-axis velocity data) after discrete integral processing, the formula is as follows:
[0105] A1(q)=∑ k f(p)*h(pq);
[0106] D1(q)=∑ k f(p)*g(pq);
[0107] Among them, A1(q) is the low-frequency coefficient; D1(q) is the high-frequency coefficient; q is the data sequence of the low-frequency coefficient and the high-frequency coefficient; f(p) is the function transformed by the wavelet; p is the data sequence of the function transformed by the wavelet; h(pq) is the low-pass filter coefficient of the wavelet analysis filter; g(pq) is the high-pass filter coefficient of the wavelet analysis filter; pq is the data sequence of the low-pass filter coefficient and the high-pass filter coefficient; k represents the kth group of data;
[0108] S23, performing discrete differential processing on the first motion data after discrete wavelet transform processing to obtain second motion data, which is expressed as follows:
[0109]
[0110] Among them, f'(k) is the derivative value of the function at point k; k is the independent variable; f(k+1) is the function value at point k+1; f(k) is the function value at point k; Δk is the distance between adjacent discrete points.
[0111] The present invention integrates the filtered data to obtain a speed curve; then, uses discrete wavelet transform to process the speed curve obtained by integration; and differentiates the wavelet transformed data by discrete differentiation. The present invention better solves the noise problem of inertial sensor unit data through integration, wavelet transform and differentiation processing, achieves a smoother data effect, and facilitates subsequent gait recognition and calculation based on inertial sensor unit data.
[0112] S3. Perform Fourier transform, filtering and inverse Fourier transform processing on the second motion data in sequence to obtain third motion data.
[0113] In an implementation of this embodiment, Fourier transform, filtering and inverse Fourier transform are sequentially performed on the second motion data to obtain third motion data, which specifically includes:
[0114] S31, performing fast Fourier transform processing on the second motion data, the formula is as follows:
[0115]
[0116] Wherein, X(k') is the data obtained after fast Fourier transform; k' is the data sequence of the data obtained after fast Fourier transform; DFT represents fast Fourier transform; x(n') is the original data; n' is the data sequence of the original data; N is the data length; W N represents the unit complex root; i is the imaginary number symbol;
[0117] S32, low-pass filtering is performed on the second motion data after the fast Fourier transform processing, and the formula is expressed as follows:
[0118]
[0119] Wherein, cutoff represents the low-pass frequency; fs represents the data frequency; H(j) represents the low-pass filter; f(j) represents the initial filtering data; j represents the data sequence of the initial filtering data;
[0120] S33, performing inverse fast Fourier transform processing on the second motion data after low-pass filtering to obtain third motion data, which is expressed as follows:
[0121]
[0122] Among them, x(n") is the data obtained after the inverse fast Fourier transform; n" is the data sequence of the data obtained after the inverse fast Fourier transform; IDFT represents the inverse fast Fourier transform; X(k") is the original data; k" is the data sequence of the original data.
[0123] The present invention converts the data (signal) after integration, wavelet transformation and differentiation processing, that is, the second motion data, into the frequency domain using fast Fourier transformation, and then multiplies the frequency domain signal after the fast Fourier transformation by a low-pass filter H, and then converts it back to the time domain signal through inverse fast Fourier transformation. The present invention performs Fourier transformation first and then filters, which is actually filtering the value of this signal in frequency, which can better solve the limitation of filtering and denoising the inertial sensor unit data only in time sequence, achieve smoother data, and facilitate the subsequent gait recognition and calculation based on the inertial sensor unit data. Figure 4 As shown, Figure 4 (a) is the Y-axis acceleration data, i.e., the motion information collected by the inertial sensor unit; Figure 4 (b) is the second motion data, i.e., the Y-axis acceleration data after integration, wavelet transform and differentiation processing; Figure 4 (c) is the third motion data, that is, the Y-axis acceleration data after Fourier transform, filtering and Fourier inverse transform. Obviously, after integration, wavelet transform and differentiation processing as well as Fourier transform, filtering and Fourier inverse transform processing, the signal (data) is smoother.
[0124] S4. Perform differential processing on the third motion data to obtain fourth motion data.
[0125] In an implementation of this embodiment, the third motion data is differentiated to obtain fourth motion data, specifically:
[0126] The third motion data is subjected to discrete differential processing to obtain the fourth motion data, which is expressed as follows:
[0127]
[0128] Among them, f'(k) is the derivative value of the function at point k; k is the independent variable; f(k+1) is the function value at point k+1; f(k) is the function value at point k; Δk is the distance between adjacent discrete points.
[0129] The present invention further performs differential processing on the data processed by Fourier transform, filtering and inverse Fourier transform, that is, the third motion data, for subsequent gait recognition and calculation. Figure 5 As shown, Figure 5 (a) is the Y-axis acceleration data, i.e., the motion information collected by the inertial sensor unit; Figure 5 (b) is the third motion data, i.e., the Y-axis acceleration data after Fourier transform, filtering and inverse Fourier transform; Figure 5 (c) is the fourth motion data, that is, the differential data of the Y-axis acceleration after Fourier transformation, filtering and inverse Fourier transformation. Obviously, the signal after data processing by the method of the present invention is smoother.
[0130] S5. Calculate and obtain gait spatiotemporal parameters corresponding to the human body motion according to the third motion data and the fourth motion data.
[0131] In one implementation of this embodiment, the gait spatiotemporal parameters include heel contact time point, toe lift time point, gait cycle, stance phase time, swing phase time, step frequency and step length;
[0132] The gait spatiotemporal parameters corresponding to the human body motion are calculated based on the third motion data and the fourth motion data, specifically including:
[0133] Calculate the time point corresponding to the minimum value of the third motion data as the heel contact time point;
[0134] Calculate the time point corresponding to the maximum value of the fourth motion data as the toe-off time point;
[0135] The time difference between adjacent heel-strike time points was calculated as the gait cycle;
[0136] The time difference from the heel touchdown time point to the next toe lift-off time point was calculated as the stance phase time;
[0137] The time difference from the toe-off time point to the next heel-touch time point was calculated as the swing phase time;
[0138] The number of heel-contact time points per minute was calculated as the stride frequency;
[0139] The distance the human body moves forward corresponding to one gait cycle is calculated as the step length.
[0140] Specifically, in gait analysis, the gait temporal and spatial parameters involved include:
[0141] Heel Strike Time: refers to the time when the heel contacts the ground, also known as heel strike time; it indicates the moment when the heel contacts the ground at the beginning of each step.
[0142] Toe-Off Time: refers to the time when the toes leave the ground; it indicates the moment when the toes leave the ground at the end of each step.
[0143] Gait Cycle: refers to the time from one heel touching the ground to the next heel touching the ground, that is, the time to complete a complete gait; the gait cycle includes two stages: the support phase and the swing phase.
[0144] Stance Phase Time: refers to the period of time when the foot is in contact with the ground, also known as the support time; during the support phase, the weight of the body is mainly borne by one foot, which is used to support and propel the body forward.
[0145] Swing Phase Time: refers to the period of time when the foot leaves the ground, also known as the swing time; during the swing phase, the foot swings forward in the air, preparing for the next foot contact with the ground.
[0146] Step Frequency: refers to the number of steps completed per minute, expressed in steps / minute.
[0147] Step Length: refers to the distance traveled in each step, usually expressed in meters.
[0148] Walking Distance: refers to the total distance walked in a certain period of time.
[0149] In order to solve the data drift problem caused by acceleration integration, firstly, the two adjacent heel touchdown times of the same-side foot calculated in the above method are used as the start and end time of acceleration integration, and the linear acceleration data in the horizontal acceleration direction are integrated to obtain the velocity curve in each cycle, and then the velocity curve is integrated to obtain the displacement during this period.
[0150] The calculation formula for the integral of a discrete signal is as follows:
[0151] ∫f(t)dx=∑f(ti)Δt;
[0152] Where f(x) is a continuous signal, t is a time variable, ti is a discrete time point, and Δt is the interval between adjacent discrete time points.
[0153] The result of this calculation is the distance traveled in one gait cycle, which is counted as the step length. The total distance traveled is then calculated by summing the distances traveled in each gait cycle. The step length calculation process is as follows: Figure 6 As shown, it specifically includes: first initializing the data, then judging whether the current signal point is within the signal acquisition time, if not, outputting the distance value; if so, further judging whether the current signal is within the gait cycle, if so, integrating the signal, and then accumulating the distance, then taking the next signal point to continue judging whether it is within the signal acquisition time, if not, directly taking the next signal point to continue judging whether it is within the signal acquisition time.
[0154] The present invention verifies the effect of the gait spatiotemporal information calculation method based on a single inertial sensor unit through experiments. Specifically, the subject is first required to wear the inertial sensor unit. Figure 3As shown, the inertial sensor unit is placed at the lower back of the subject, and the Y axis of the inertial sensor unit is ensured to be in the vertical direction. Considering that the plane formed by the X axis and Y axis of the inertial sensor unit is almost parallel to the coronal plane of the person after placement, the Z axis of the inertial sensor unit can be regarded as pointing in the horizontal direction. The data sampling frequency of the inertial sensor unit is 100 Hz.
[0155] During the experiment, the subjects walked 53 steps, the walking time was about 46.5 seconds, and the walking distance was about 30 meters.
[0156] The experiment first tested the effect of data processing, such as Figure 7 As shown, Figure 7 (a) is the Y-axis acceleration data, i.e., the motion information collected by the inertial sensor unit; Figure 7 (b) is the first motion data, i.e., the Y-axis acceleration data after low-pass filtering by a second-order Butterworth low-pass filter; Figure 7 (c) is the Y-axis velocity data, i.e., the first motion data after discrete integration processing; Figure 7 (d) is the second motion data, i.e., the Y-axis acceleration data after integration, wavelet transform and differentiation processing; Figure 7 (e) is the third motion data, i.e., the Y-axis acceleration data after Fourier transform, filtering and inverse Fourier transform; Figure 7 (f) in the figure is the fourth motion data, i.e., the differential data of the Y-axis acceleration after Fourier transform, filtering, and inverse Fourier transform. It can be seen that the original acceleration signal has large noise, and the noise intensity is large at the peak, so it is difficult to use it directly for gait analysis calculation. The processed data has no obvious noise and can better reflect the periodicity of gait. This shows that the results of data processing meet our expectations.
[0157] Figure 8 and Fig. 9 The identification of heel contact time (T_HC) and toe-off time (T_TO) are shown respectively. It can be seen that the Y-axis acceleration data after data processing and the Y-axis acceleration differential data after data processing each have obvious interference-free peaks, thereby improving the identification ability of T_HC and T_TO. This result shows that the method of the present invention can accurately identify the heel contact time and toe-off time, and the recognition rate is 100%. Furthermore, the present invention can accurately calculate the gait cycle, support phase time, swing phase time and step frequency.
[0158] Fig.10 The calculation of the distance traveled by a person is shown. It can be seen that within the 46.5 seconds of travel time, the travel distance of the subject is calculated to be 30.2 m. This is consistent with the actual situation during the experiment. This shows that the present invention accurately calculates the stride of each step and the overall moving distance.
[0159] In addition, based on the above-mentioned gait spatiotemporal information calculation method based on a single inertial sensing unit, the present invention also provides a gait spatiotemporal information calculation system based on a single inertial sensing unit, wherein a preferred embodiment of the gait spatiotemporal information calculation system based on a single inertial sensing unit is as follows: Fig.11 As shown, specifically including:
[0160] Data acquisition and filtering module 01: used to acquire motion information collected by an inertial sensor unit installed on the waist of a human body, and filter the motion information to obtain first motion data;
[0161] Data integration, wavelet transform and differentiation module 02: used to perform integration, wavelet transform and differentiation processing on the first motion data in sequence to obtain second motion data;
[0162] Data Fourier transform, filtering and inverse Fourier transform module 03: used to perform Fourier transform, filtering and inverse Fourier transform processing on the second motion data in sequence to obtain third motion data;
[0163] Data differentiation module 04: used for performing differentiation processing on the third motion data to obtain fourth motion data;
[0164] Gait spatiotemporal parameter calculation module 05: used to calculate the gait spatiotemporal parameters corresponding to the human body movement according to the third movement data and the fourth movement data.
[0165] In addition, based on the above-mentioned method and system for calculating gait spatiotemporal information based on a single inertial sensor unit, the present invention also provides a terminal accordingly, wherein a preferred embodiment of the terminal is as follows: Fig.12 As shown, it specifically includes a processor 10, a memory 20 and a display 30. Fig.12 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0166] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card) equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as program codes of the storage terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a gait spatiotemporal information calculation program 40 based on a single inertial sensing unit is stored on the memory 20, and the gait spatiotemporal information calculation program 40 based on a single inertial sensing unit can be executed by the processor 10, thereby realizing the steps of the gait spatiotemporal information calculation method based on a single inertial sensing unit in the present application.
[0167] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program codes or process data stored in the memory 20, such as executing a gait spatiotemporal information calculation program 40 based on a single inertial sensor unit.
[0168] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other through a system bus.
[0169] In one embodiment, when the processor 10 executes the gait spatiotemporal information calculation program 40 based on a single inertial sensing unit in the memory 20 , the steps of the gait spatiotemporal information calculation method based on a single inertial sensing unit as described above are implemented.
[0170] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a gait spatiotemporal information calculation program based on a single inertial sensor unit, and when the gait spatiotemporal information calculation program based on a single inertial sensor unit is executed by a processor, the steps of the gait spatiotemporal information calculation method based on a single inertial sensor unit as described above are implemented.
[0171] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or terminal including the element.
[0172] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0173] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for calculating gait spatiotemporal information based on a single inertial sensor unit, characterized in that: The gait spatiotemporal information calculation method based on a single inertial sensing unit includes: Acquire motion information collected by an inertial sensor unit installed on the waist of a human body, and perform filtering processing on the motion information to obtain first motion data; performing integration, wavelet transform and differentiation processing on the first motion data in sequence to obtain second motion data; performing Fourier transform, filtering and inverse Fourier transform processing on the second motion data in sequence to obtain third motion data; Performing differentiation processing on the third motion data to obtain fourth motion data; Gait spatiotemporal parameters corresponding to the human body motion are calculated based on the third motion data and the fourth motion data.
2. The method for calculating gait spatiotemporal information based on a single inertial sensing unit according to claim 1, characterized in that: The acquiring of motion information collected by an inertial sensor unit installed on the waist of a human body and filtering the motion information to obtain first motion data specifically includes: Acquire in real time the motion information collected by the inertial sensor unit installed on the waist of the human body when the human body moves, wherein the Y-axis of the inertial sensor unit points in the vertical direction, and the motion information is the Y-axis acceleration data; A second-order Butterworth low-pass filter is used to perform low-pass filtering on the Y-axis acceleration data to obtain first motion data.
3. The method for calculating gait spatiotemporal information based on a single inertial sensing unit according to claim 2, characterized in that: The second-order Butterworth low-pass filter is used to perform low-pass filtering on the Y-axis acceleration data to obtain the first motion data, which is specifically: The Y-axis acceleration data is low-pass filtered through the second-order Butterworth low-pass filter, and the formula is as follows: Where n is the order of the filter; ω is the system frequency; ω c is the cut-off frequency; ω p is the passband edge frequency; |H(ω)| 2 is the square of the amplitude; ∈ 2 Indicates the reciprocal of the value at the edge of the passband minus 1.
4. The method for calculating gait spatiotemporal information based on a single inertial sensing unit according to claim 1, characterized in that: The step of sequentially performing integration, wavelet transformation and differentiation processing on the first motion data to obtain the second motion data specifically includes: The first motion data is subjected to discrete integration processing, and the formula is expressed as follows: ∫f(u)du=∑f(ui)Δu; Where f(u) represents a continuous function; u is the independent variable; ui is a discrete point; f(ui) represents the function value corresponding to the discrete point ui; Δu is the spacing between adjacent discrete points; The first motion data after discrete integral processing is processed by discrete wavelet transform, and the formula is as follows: A1(q)=∑ k f(p)*h(p-q); D1(q)=∑ k f(p)*g(pq); Among them, A1(q) is the low-frequency coefficient; D1(q) is the high-frequency coefficient; q is the data sequence of the low-frequency coefficient and the high-frequency coefficient; f(p) is the function transformed by the wavelet; p is the data sequence of the function transformed by the wavelet; h(pq) is the low-pass filter coefficient of the wavelet analysis filter; g(pq) is the high-pass filter coefficient of the wavelet analysis filter; pq is the data sequence of the low-pass filter coefficient and the high-pass filter coefficient; k represents the kth group of data; The first motion data after discrete wavelet transform processing is subjected to discrete differentiation processing to obtain second motion data, which is expressed as follows: Among them, f'(k) is the derivative value of the function at point k; k is the independent variable; f(k+1) is the function value at point k+1; f(k) is the function value at point k; Δk is the distance between adjacent discrete points.
5. The method for calculating gait spatiotemporal information based on a single inertial sensing unit according to claim 1, characterized in that: The performing Fourier transform, filtering and inverse Fourier transform processing on the second motion data in sequence to obtain third motion data specifically includes: The second motion data is subjected to fast Fourier transform processing, and the formula is expressed as follows: Wherein, X(k') is the data obtained after fast Fourier transform; k' is the data sequence of the data obtained after fast Fourier transform; DFT represents fast Fourier transform; x(n') is the original data; n' is the data sequence of the original data; N is the data length; W N represents the unit complex root; i is the imaginary number symbol; The second motion data after fast Fourier transform processing is subjected to low-pass filtering, and the formula is as follows: Wherein, cutoff represents the low-pass frequency; fs represents the data frequency; H(j) represents the low-pass filter; f(j) represents the initial filtering data; j represents the data sequence of the initial filtering data; The second motion data after low-pass filtering is subjected to inverse fast Fourier transform processing to obtain third motion data, which is expressed as follows: Among them, x(n") is the data obtained after the inverse fast Fourier transform; n" is the data sequence of the data obtained after the inverse fast Fourier transform; IDFT represents the inverse fast Fourier transform; X(k") is the original data; k" is the data sequence of the original data.
6. The method for calculating gait spatiotemporal information based on a single inertial sensing unit according to claim 1, characterized in that: The third motion data is subjected to differential processing to obtain fourth motion data, specifically: The third motion data is subjected to discrete differential processing to obtain fourth motion data, which is expressed as follows: Among them, f'(k) is the derivative value of the function at point k; k is the independent variable; f(k+1) is the function value at point k+1; f(k) is the function value at point k; Δk is the distance between adjacent discrete points.
7. The method for calculating gait spatiotemporal information based on a single inertial sensing unit according to claim 1, characterized in that: The gait spatiotemporal parameters include heel contact time, toe lift time, gait cycle, stance phase time, swing phase time, step frequency and step length; The calculating, according to the third motion data and the fourth motion data, gait spatiotemporal parameters corresponding to the human body motion specifically includes: Calculate the time point corresponding to the minimum value of the third motion data as the heel contact time point; Calculate the time point corresponding to the maximum value of the fourth motion data as the toe-off time point; Calculating the time difference between adjacent heel contact time points as the gait cycle; The time difference between the heel contact time point and the next toe lift-off time point is calculated as the stance phase time; The time difference between the toe-off time point and the next heel-contact time point is calculated as the swing phase time; The number of heel-touching time points per minute is calculated as the step frequency; The distance the human body advances corresponding to one gait cycle is calculated as the step length.
8. A gait spatiotemporal information calculation system based on a single inertial sensing unit, characterized in that: The gait spatiotemporal information calculation system based on a single inertial sensing unit comprises: A data acquisition and filtering module is used to acquire motion information collected by an inertial sensor unit installed on the waist of a human body, and filter the motion information to obtain first motion data; Data integration, wavelet transform and differentiation module: used for performing integration, wavelet transform and differentiation processing on the first motion data in sequence to obtain second motion data; A data Fourier transform, filtering and inverse Fourier transform module: used for sequentially performing Fourier transform, filtering and inverse Fourier transform processing on the second motion data to obtain third motion data; A data differentiation module: used for performing differentiation processing on the third motion data to obtain fourth motion data; Gait spatiotemporal parameter calculation module: used to calculate the gait spatiotemporal parameters corresponding to the human body movement based on the third motion data and the fourth motion data.
9. A terminal, characterized in that: The terminal includes: a memory, a processor, and a gait spatiotemporal information calculation program based on a single inertial sensing unit stored in the memory and executable on the processor. When the gait spatiotemporal information calculation program based on a single inertial sensing unit is executed by the processor, the steps of the gait spatiotemporal information calculation method based on a single inertial sensing unit as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a gait spatiotemporal information calculation program based on a single inertial sensing unit. When the gait spatiotemporal information calculation program based on a single inertial sensing unit is executed by a processor, the steps of the gait spatiotemporal information calculation method based on a single inertial sensing unit as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Walking posture meter and program
CN105208932A
Human gait detecting system and human gait detecting method based on single accelerometer
CN109498027A
Vibration acceleration signal integral conversion method based on wavelet packet transformation
CN115640499A
Tri-axial accelerometer-based method for detecting gait pattern and gait event
KR101805864B1
Method and apparatus for detecting walking factor with portion acceleration sensor
US20200355721A1
Cited By
Sensor data processing method and device and electronic equipment
CN121030185A
Sensor data processing method, apparatus, and electronic device
CN121030185B