Automatic step counting treadmill control method based on AI algorithm

Through the automatic step counting method based on AI algorithm, the load current data of treadmill motors is collected and processed in real time, the gait feature vector is extracted, and the treadmill parameters are dynamically adjusted, which solves the problems of insufficient step counting accuracy and insufficient adaptability in the existing technology, and realizes high-precision step counting and personalized motion experience.

CN120361499APending Publication Date: 2025-07-25KUNSHAN HENGJU ELECTRONIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510498373.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing treadmill step counting technology has problems such as insufficient recognition accuracy, unstable signal processing and lack of intelligent adaptive adjustment, resulting in large step counting errors and poor user experience.

Method used

The automatic step counting method based on AI algorithm is adopted to collect the load current data of the treadmill motor in real time, and then input the pre-trained AI learning model after pre-processing, extract the gait feature vector, judge the step counting event, and dynamically adjust the treadmill running parameters.

Benefits of technology

It realizes high-precision gait recognition, improves step counting accuracy and system reliability, provides a personalized and intelligent exercise experience, and improves user exercise efficiency and comfort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120361499A_ABST
    Figure CN120361499A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of hardware control, and discloses an AI algorithm-based automatic step-counting treadmill control method, which comprises the following steps of: acquiring load current data of a treadmill motor in real time; carrying out preprocessing on the load current data; inputting the preprocessed load current data into a pre-trained AI learning model to calculate and extract a gait feature vector at the current moment; judging whether a step counting event is triggered or not according to the gait feature vector, and updating a step counting value; and dynamically adjusting operation parameters of the treadmill based on the gait feature vector. The gait feature analysis method based on the AI deep learning model is adopted, and the technical effect of high-precision gait recognition is achieved. Compared with a scheme depending on a simple sensor and a preset algorithm in the prior art, the method can accurately recognize the individual gait of the user, solves the problem of large error of traditional step counting, and remarkably improves the accuracy of gait detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hardware control, and specifically to an automatic step-counting treadmill control method based on an AI algorithm. Background Art

[0002] Most of the existing treadmill step-counting and control technologies are based on mechanical sensors or simple current threshold recognition methods. Common solutions usually rely on acceleration sensors, Hall sensors, or simple logic rules based on motor current fluctuations to achieve gait detection and step counting. Although these methods are relatively simple in structure and low in cost, they generally have problems with insufficient recognition accuracy. Especially when there are significant differences in the body types, gait styles, and running rhythms of different users, traditional methods are difficult to adapt, prone to step-counting errors, and affect the user experience.

[0003] In addition, traditional technologies often lack in-depth processing of motor load current signals. Common processing methods are mostly simple filtering or peak detection based on fixed thresholds, and it is difficult to effectively handle signal fluctuations caused by environmental noise, electromagnetic interference, and the mechanical vibration of the treadmill itself. This processing method is prone to false triggering or missed step counting in practical applications, and the step-counting results lack consistency and reliability.

[0004] At the treadmill control level, existing technologies generally adopt preset programs or simple PID closed-loop control systems, and only adjust the speed and slope according to fixed parameters or rough step frequencies, lacking precise perception and adaptive adjustment of the real-time characteristics of the user's gait. This makes it difficult for the treadmill to make flexible responses according to the real-time changing motion states of different users, prone to mismatched exercise rhythms, affecting exercise efficiency, and increasing exercise fatigue.

[0005] In addition, most of the existing systems have static or manual adjustment in terms of parameter adjustment, lacking a dynamic adaptive mechanism based on real-time data feedback and intelligent optimization algorithms, and it is difficult to automatically optimize operation parameters according to the user's historical exercise patterns and current motion states. As a result, existing treadmills have significant deficiencies in providing personalized exercise experiences and are difficult to meet the user's needs for precise, intelligent, and adaptive motion control.

[0006] Therefore, the present invention proposes an automatic step-counting treadmill control method based on an AI algorithm to solve the deficiencies of the existing technology. Summary of the Invention

[0007] In view of the deficiencies of the existing technology, the present invention provides an automatic step-counting treadmill control method based on an AI algorithm, which solves the problems of insufficient step-counting accuracy, unstable signal processing, and lack of intelligent adaptive adjustment in the existing technology.

[0008] To achieve the above object, the present invention is realized through the following technical solutions: An automatic step-counting treadmill control method based on an AI algorithm, comprising the following steps: Real-time collect the load current data of the treadmill motor; Preprocess the load current data and extract gait features; Input the preprocessed load current data into a pre-trained AI learning model to calculate and extract the gait feature vector at the current moment; Determine whether a step-counting event is triggered according to the gait feature vector, and update the step-counting value; Dynamically adjust the operating parameters of the treadmill based on the gait feature vector.

[0009] Preferably, the step of real-time collecting the load current data of the treadmill motor is: Real-time collect the load current data of the treadmill motor through a current sensor; Calculate the load current data based on the treadmill motor dynamics model, and the dynamics model satisfies: Where: T m Is the motor torque, K t Is the motor torque constant, B m Is the motor damping coefficient, J is the moment of inertia, v is the running speed, Is the derivative of the speed; The load current data is calculated by the following formula: Where: I(t) is the real-time load current of the treadmill motor; F(t) is the force exerted by the user's steps, which is related to the user's weight m and running speed v.

[0010] Preferably, the step of preprocessing the load current data includes: Eliminate the noise interference in the load current data through Kalman filtering to obtain the denoised load current signal I′(t); Extract the gait main frequency of the load current signal through short-time Fourier transform, and the short-time Fourier transform calculation formula is: Where, STFT(I′(t)) represents the short-time Fourier transform result of the denoised load current signal; I(n) is the discretized load current signal, n is the discrete time index; w(n - m1) is the window function, which intercepts the local signal centered on the time point m1; ω is the angular frequency; Decompose the fluctuation amplitude A(t) of the denoised load current signal through wavelet transform.

[0011] Preferably, the step of inputting the preprocessed load current data into a pre-trained AI learning model to calculate and extract the gait feature vector at the current moment is as follows: Input the denoised load current signal I′(t) and the extracted gait main frequency f s , and the fluctuation amplitude A(t) into a pre-trained hybrid neural network model; Extract time series features through a bidirectional long short-term memory network and output the gait cycle signal x(t); Calculate the gait phase information φ(t) through a Transformer network, satisfying: where: Q is the query matrix; K is the key matrix, V is the value matrix; d k is the dimensionality scaling factor of the key matrix K; softmax is the normalized exponential function; Model the gait dynamics characteristics by combining with the nonlinear Duffing equation, and output the gait feature vector F = [f s , A(t), φ(t)].

[0012] Preferably, the step of determining whether to trigger a step counting event according to the gait feature vector includes: Calculate the gait stability S(t) based on the gait cycle signal x(t); Calculate the stride change rate R(t) through the gait main frequency f s , satisfying: where, f s is the gait main frequency; t is the time; represents the rate of change of the gait main frequency f s with respect to time t; If the stride change rate R(t) is lower than the set threshold R th and the gait stability S(t) is higher than the set threshold S th , then trigger a step counting event and update the step counter N = N + 1.

[0013] Preferably, the calculation method of the gait stability S(t) is: S(t) = αS var (t) + (1 - α)S corr (t); where, is the normalized value of the variance of the gait cycle signal, is the autocorrelation value of the gait cycle signal, and α is the balance weight coefficient, which is between 0 and 1.

[0014] Preferably, the step of dynamically adjusting the running parameters of the treadmill based on the gait feature vector is: According to the main gait frequency f s Adjust the running speed v(t) of the treadmill to satisfy: v(t) = v base + γf s ; where v(t) is the real-time running speed of the treadmill; v base is the base speed; γ is the gain coefficient of the main gait frequency; f s (t) is the main gait frequency; Adjust the slope θ(t) of the treadmill according to the gait stability S(t) to satisfy: θ(t) = θ base + δS(t); where θ(t) is the real-time slope of the treadmill; θ base is the base slope; δ is the gain coefficient of the gait stability; S(t) is the gait stability; Dynamically update the running parameters of the treadmill to keep them adapted to the user's gait feature vector.

[0015] The present invention also provides an automatic step-counting treadmill control system based on an AI algorithm, including: A current acquisition module, configured to collect the load current data of the treadmill motor in real time through a current sensor and transmit it to the data processing module; A data preprocessing module, configured to perform denoising processing on the collected load current data; A gait feature calculation module, configured to input the preprocessed load current data into a pre-trained AI learning model to calculate and extract the gait feature vector at the current moment; A step-counting event judgment module, configured to judge whether a step-counting event is triggered according to the gait feature and update the step-count value; A treadmill control module, configured to dynamically adjust the running parameters of the treadmill based on the gait feature; A display and interaction module, configured to display the current number of steps, gait feature, and treadmill status to the user.

[0016] The present invention provides an automatic step-counting treadmill control method based on an AI algorithm. It has the following beneficial effects: 1. The present invention adopts a gait feature analysis method based on an AI deep learning model, achieving the technical effect of high-precision gait recognition. Compared with the existing solutions that rely on simple sensors and preset algorithms, the present invention can accurately identify the individual gait of the user, solve the problem of large traditional step-counting errors, and significantly improve the accuracy of gait detection.

[0017] 2. The present invention uses Kalman filtering and Fourier transform technologies to process the collected data, ensuring the stability of the signal and the suppression of noise. Compared with the step-counting system in the traditional solution that is easily affected by environmental interference, the present invention greatly improves the stability of data processing, avoids the fluctuation of gait data caused by external factors, and improves the reliability of the system.

[0018] 3. The present invention uses LSTM and Transformer networks to perform deep learning on gait features, achieving a more intelligent and accurate effect of dynamically adjusting the treadmill motion parameters. Compared with the fixed motion adjustment in the prior art, the present invention can automatically adjust the speed and slope in real time according to the user's gait changes, making the treadmill more in line with personalized needs and providing a more smooth and natural exercise experience.

[0019] 4. The present invention introduces an adaptive optimization algorithm to dynamically adjust the motion parameters of the treadmill and adjust the motion mode in real time according to gait features. Different from the fixed adjustment method of traditional treadmills, the present invention can be adjusted in real time according to the user's training status, solving the deficiency of the lack of flexibility of traditional equipment and greatly improving the user's exercise experience and training effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is the flowchart of the method of the present invention; Figure 2 is the system architecture diagram of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0022] Please refer to Figure 1 , the embodiment of the present invention provides an automatic step-counting treadmill control method based on an AI algorithm, including the following steps: S1. Real-time collect the load current data of the treadmill motor; S2. Preprocess the load current data; S3. Input the preprocessed load current data into a pre-trained AI learning model to calculate and extract the gait feature vector at the current moment; S4. Determine whether a step-counting event is triggered according to the gait feature vector and update the step-counting value; S5. Dynamically adjust the operating parameters of the treadmill based on the gait feature vector.

[0023] For S1, the load current data of the treadmill motor is collected in real time. This step is the first step of the entire intelligent step counting control method, which provides basic data support for subsequent data processing, gait analysis, step counting event judgment, and operating parameter adjustment. Therefore, accurately obtaining the load current data of the treadmill motor is crucial for subsequent gait feature extraction and dynamic adjustment.

[0024] In this embodiment, the load current data of the treadmill motor is collected in real time through a current sensor. The current sensor is installed between the treadmill motor and the power source to detect the current change of the motor in real time. This current data reflects the load condition of the motor during operation, and the load condition is closely related to factors such as the user's gait, step frequency, running speed, etc.

[0025] As an option, the current sensor can be a Hall effect sensor, a shunt resistor, or other devices that can accurately measure current. The output signal of the current sensor needs to be transmitted to the data acquisition module, which is responsible for converting the sensor data into a format that can be further analyzed and processed. The acquisition of the current signal is continuous and has a high sampling rate to ensure capturing the subtle changes during the operation of the motor.

[0026] In a possible implementation, the load current data is continuously recorded in a way with a sampling interval of Δt. A high sampling rate can ensure that the data sampled each time is accurate enough, which helps the accurate analysis of subsequent algorithms. The current data is input into the subsequent signal processing and AI analysis modules in the form of discrete signals.

[0027] Specifically, through the dynamic model of the treadmill motor, further calculations and analyses can be performed on the load current data. The dynamic model of this motor can generally be expressed as: Where: T m is the motor torque; K t is the motor torque constant; B m is the motor damping coefficient; J is the moment of inertia; v is the running speed; is the derivative of the speed; The calculation of the motor load current not only depends on the motor torque and angular velocity but is also affected by parameters such as the motor damping coefficient and moment of inertia. By comprehensively considering these parameters, the current data can more accurately reflect the actual load condition of the motor.

[0028] Furthermore, the load current signal of the treadmill motor can be correlated with the force exerted by the user's steps. The force exerted by the steps is closely related to the user's weight and running speed, so it can be calculated by the following formula: Where: I(t) is the real-time load current of the treadmill motor; F(t) is the force exerted by the user's steps, which is related to the user's weight m and running speed v.

[0029] In this way, the current data is closely related to the user's motion state, providing very important information for the subsequent extraction of gait features.

[0030] In summary, the step of real-time collecting the load current data of the treadmill motor in this embodiment is a core process, which provides accurate basic data for subsequent modules such as signal preprocessing, gait analysis, and step counting judgment. Through the collection of current data and the application of the kinetic model, the system can accurately reflect the working state of the treadmill and provide support for dynamically adjusting the treadmill parameters.

[0031] For S2, it is to preprocess the real-time collected load current data of the treadmill motor. This process immediately follows the current data collection in step S1 and is one of the key steps in the entire intelligent step counting control method. The purpose of preprocessing is to remove noise and extract effective signal features, so as to provide more accurate data support for subsequent gait feature calculation and motion parameter adjustment.

[0032] In this embodiment, after the load current data is collected by the current sensor and transmitted to the data processing module, it first needs to be denoised. Since the current signal may be affected by various external interferences during transmission and collection, noise will affect the quality of the data and may cause errors in the subsequent analysis process. To remove this noise, this embodiment uses the Kalman filtering method. Kalman filtering is a recursive filtering algorithm, suitable for removing random noise and estimating data in a dynamic system.

[0033] Specifically, in the application of Kalman filtering, first establish a mathematical model to describe the state change of the load current signal. Assume that the state variable x(t) of the load current data can be described by a linear relationship and is compared with the state variable through the measured data z(t). Kalman filtering continuously optimizes the estimated value of the state variable by minimizing the estimation error and filters out the noise. The mathematical model of this process can be expressed as: x(t) = A·x(t - 1) + B·u(t); z(t) = H·x(t) + v(t); Among them, x(t) is the state variable, representing the true value of the load current signal; A is the state transition matrix, describing the influence of the previous state on the current state; B is the control input matrix, describing the influence of external control on the state; u(t) is the external control signal; z(t) is the measured value, that is, the current signal with noise collected; H is the observation matrix, representing the relationship between the measured value and the state; v(t) is the measurement noise, usually assumed to be Gaussian noise.

[0034] After being processed by Kalman filtering, the noise in the current signal will be effectively suppressed, and a smoother and more accurate current signal can be obtained.

[0035] As an option, in some embodiments, in addition to Kalman filtering, other denoising methods can also be adopted, such as median filtering or low-pass filtering. These methods can select the most suitable algorithm according to the specific noise type and noise intensity. Median filtering is effective in removing impulse noise, while low-pass filtering is suitable for removing high-frequency noise.

[0036] In the second step of the preprocessing process, the short-time Fourier transform (STFT) is used to extract the gait main frequency of the load current signal. The gait main frequency is the periodic feature of the gait, which is directly related to the user's gait speed and rhythm. The short-time Fourier transform divides the current signal into multiple short-time windows and calculates the spectrum of the signal within each window to obtain the frequency-domain features.

[0037] Specifically, the short-time Fourier transform is calculated by the following formula: Among them, STFT(I(t)) represents the result of the short-time Fourier transform of the load current signal (t), I(n) is the discretized load current signal; n is the discrete time index, w(n - m1) is the window function, which intercepts the local signal centered at the time point m1; ω is the angular frequency, satisfying ω = 2πf; f is the physical frequency, and the gait main frequency f s is obtained by calculating the maximum energy frequency component of the STFT spectrum at the time point m; Through the short-time Fourier transform, the system can extract the main frequency components in the signal, and then obtain the main frequency of the gait. This frequency represents the rhythm of the user's gait and is crucial for the subsequent analysis of gait characteristics.

[0038] As another supplement, the fluctuation amplitude of the waveform will also be extracted. Specifically, by performing multi-scale analysis on the current signal through wavelet transform, the local features in the signal can be revealed, especially the dynamic characteristics of gait changes. The wavelet transform can provide more refined time-frequency localization characteristics than the Fourier transform, so it can capture instantaneous gait changes.

[0039] In one possible implementation, the formula for wavelet transform is: Among them, ψ a,b (t) is the result of wavelet transform; a is the scale factor; b is the translation factor; ψ(t) is the mother wavelet function.

[0040] Through wavelet transform, the fluctuation amplitude of the load current signal can be decomposed and further used for gait feature analysis.

[0041] In this embodiment, after Kalman filtering for denoising, short-time Fourier transform for extracting the main frequency, and wavelet transform for analyzing the fluctuation amplitude, the load current signal will be processed into a clearer signal, providing accurate input data for subsequent gait feature calculation.

[0042] In summary, step S2 preprocesses the load current data, removes noise and extracts key gait features, providing reliable basic data for subsequent gait feature calculation, step counting event judgment and treadmill parameter adjustment. The core of this process is to accurately process the noise and frequency information in the current signal to provide support for the intelligent control of the entire system.

[0043] For S3, it involves inputting the preprocessed load current data into the pretrained AI learning model to calculate the gait feature vector at the current moment. This step is closely connected to the pre-processing and feature extraction process, aiming to further explore the time series characteristics and phase information of the gait signal, and combine the dynamic characteristics of the gait to finally output a high-precision gait feature vector. This step is crucial to improving the accuracy of gait analysis and determining treadmill control parameters.

[0044] In this embodiment, the denoised current signal I′(t) and the extracted gait main frequency f are firstly s , the fluctuation amplitude A(t) is sent as input features to the pre-trained hybrid neural network model. The neural network model can effectively process various types of input features, and then extract the periodicity, volatility and other characteristics of the gait signal. Through the forward propagation of the hybrid neural network, the system can generate a preliminary representation of the gait signal, laying the foundation for subsequent detailed gait analysis.

[0045] Specifically, the network first performs feature learning on the denoised current signal I′(t) to extract the main features of the gait signal. This signal is combined with the gait main frequency f s The fluctuation amplitude A(t) and the gait cycle characteristics are input into the neural network together, which further strengthens the learning of the gait cycle characteristics and dynamic characteristics.

[0046] In general, when processing current signals and other gait features, the hybrid neural network can extract different levels of feature information layer by layer through a multi-layer neural network structure. The deep structure of the network not only considers the time series characteristics of the gait signal but also enhances the ability to extract local and global features. The learning of these features provides an important basis for the subsequent bidirectional long short-term memory network (BiLSTM) to extract time series features and the Transformer network to calculate gait phase information.

[0047] In some embodiments, the bidirectional long short-term memory network (BiLSTM) is used to further extract the time series features of the input features and output the gait cycle signal x(t). Compared with the traditional unidirectional LSTM network, the bidirectional LSTM network can consider both the forward and backward information of the time series, making the extracted gait cycle signal more accurate. The calculation formula of BiLSTM is: x(t) = f(W1X in (t) + b1); where x(t) represents the gait cycle signal; W1 is the weight matrix; b1 is the bias term; f is the activation function, usually using the ReLU or Sigmoid function to enhance the nonlinear expression ability of the model; X in (t) is the input feature of the neural network. The output x(t) after the network calculation in this step can accurately describe the periodic changes of the steps and provide a reliable basis for subsequent gait analysis.

[0048] Next, the Transformer network is used to calculate the gait phase information φ(t). The advantage of the Transformer network lies in its powerful self-attention mechanism, which can effectively capture the dependence relationships between input features and further mine the phase information in the gait signal. The calculation formula of the Transformer network is: where Q is the query matrix, generated by linearly transforming the denoised current signal I′(t); K is the key matrix, generated by linearly transforming the gait main frequency f s through linear transformation; V is the value matrix, generated by linearly transforming the fluctuation amplitude A(t). By calculating the similarity between the query matrix and the key matrix, the Transformer network can output the gait phase information φ(t). The d k in the formula is the dimensionality scaling factor of the key matrix, used to stabilize the gradient calculation, and softmax is the normalized exponential function, used to calculate the attention weights. Through this self-attention mechanism, the system can establish effective associations between different input features and accurately calculate the gait phase information.

[0049] As an option, the dynamics of gait are modeled in combination with the non-linear Duffing equation. In some embodiments, the Duffing equation can better simulate the non-linear dynamic behavior of gait, further improving the accuracy of gait feature extraction. The form of the Duffing equation is: where, is the acceleration of the step, representing the change speed of the step; δ is the damping coefficient, controlling the energy dissipation of the system; α is the linear stiffness coefficient, describing the elasticity of the step; β is the non-linear stiffness coefficient, representing the non-linear change of the step; x is the displacement, representing the change amount of the step; F(t) is the external force, usually related to the force exerted by the step.

[0050] Modeling the dynamics of gait through the Duffing equation can further improve the accuracy of gait features, providing a more reliable basis for gait analysis during movement.

[0051] Finally, through these calculation steps, the system can generate a gait feature vector F = [f s , A(t), φ(t)], which contains the periodicity, phase information, and dynamic characteristics of gait. This gait feature vector provides accurate input for subsequent gait event judgment, personalized motion parameter adjustment, etc.

[0052] In summary, step S3 accurately extracts gait features from the preprocessed load current data through technical means such as a pre-trained AI learning model, bidirectional LSTM, and Transformer network. Combining the Duffing equation to model the dynamics of gait, the finally output gait feature vector provides key data support for subsequent motion analysis and device control.

[0053] For S4, the calculation of the gait feature vector has been obtained in the previous steps. Based on this gait feature vector, it is necessary to further determine whether a step counting event is triggered and update the step counter N accordingly. Generally, the gait feature vector F already contains core gait information such as the gait main frequency, gait fluctuation amplitude, and gait phase. Using this information, a trigger mechanism for the step counting event can be established.

[0054] Specifically, in one possible implementation, first, the gait stability S(t) is calculated based on the gait cycle signal x(t), and the step rate of change R(t) is calculated in combination with the gait main frequency f s . Then, by setting the gait stability threshold S th and the step rate of change threshold S th , it is determined whether the trigger condition for the step counting event is met.

[0055] In some embodiments, the gait stability S(t) is calculated jointly by the normalized value S var (t) of the variance of the gait cycle signal and the autocorrelation value S corr (t), and the specific formula is as follows: S(t) = αS var (t) + (1 - α)S corr (t); Wherein, is the normalized value of the variance of the gait cycle signal, where σ x(t) is the standard deviation of the gait cycle signal x(t) within a specific time window, and max(σ x(t) ) is the maximum standard deviation value of the signal within a preset duration. The variance normalized value is used to measure the stability of the gait signal. The smaller the variance, the higher the gait stability; is the autocorrelation value of the gait cycle signal. x(t)*x(t) represents the self - product of the gait cycle signal, and max(|x(t)*x(t)|) represents the maximum value of this self - product within a preset time window. This value is used to reflect the periodicity of the gait signal. The higher the similarity, the larger the autocorrelation value, and the more stable the gait; α is the balance weight coefficient, which is between 0 and 1.

[0056] The stride change rate R(t) is calculated from the change rate of the gait dominant frequency over time, and the specific formula is as follows: Wherein, f s is the gait dominant frequency, with the unit of Hz; t is the time, with the unit of s; represents the rate of change of the gait dominant frequency f s over time t. If R(t) is too large, it indicates that the pace is unstable. If R(t) is too small, it indicates that the pace tends to be stable.

[0057] In some possible embodiments, if the stride change rate R(t) is lower than the set threshold R th , and the gait stability S(t) is higher than the set threshold S th , then the current gait is considered stable, triggering a step - counting event, and the following step update is performed: N = N + 1; Wherein, N is the current step count value for subsequent calculation or display.

[0058] As an option, the gait stability threshold S th and the stride change rate threshold R th can be dynamically adjusted according to the individual gait pattern. For example, in the low - speed walking mode, lower S th and R th can be set to adapt to the longer gait cycle; in the fast - running mode, higher S th and Rth , to ensure the step counting accuracy.

[0059] In another possible implementation, it can also be optimized by combining historical gait features. By storing f of multiple past gait cycles s , S(t) and R(t) for trend analysis to improve the abnormal detection ability. For example, if R(t) exceeds the normal range for multiple consecutive cycles, then R can be further adjusted th to adapt to the changes and improve the accuracy of step counting.

[0060] In some embodiments, a machine learning model can be further introduced to automatically optimize S th and R th settings by training a gait data set. For example, based on the user's gait pattern, an adaptive neural network or decision tree model can be used for dynamic adjustment to ensure applicability to different user groups.

[0061] In practical applications, the gait feature calculation method of the present invention is not only applicable to the treadmill environment, but can also be extended to other exercise scenarios, such as outdoor jogging, gym training, etc. Specifically, the gait main frequency calculation method can be modified to make it applicable to exercise environments with different ground friction coefficients or slopes. In addition, the triggering conditions of step counting events can also be set personalized according to user needs, such as optimizing the gait stability calculation by combining heart rate data to improve the overall intelligence level of exercise monitoring.

[0062] In summary, in this embodiment, the gait stability S(t) is calculated through the gait cycle signal x(t), and the gait cycle signal x(t) and the gait stability S(t) are calculated based on the gait feature vector F = [f s , A(t), φ(t)]. The step rate of change R(t) is calculated by combining the gait main frequency, and reasonable thresholds are set to determine whether to trigger a step counting event and update the step counter. This method can effectively improve the step counting accuracy and can adapt to different exercise states to meet various practical application requirements.

[0063] For S5, in the present invention, based on the user's gait feature vector, the running parameters of the treadmill such as the exercise speed and slope will be dynamically adjusted. This adjustment is based on the real-time changes of the gait features to ensure that the treadmill settings are always adapted to the user's exercise rhythm and gait. Specifically, the adjustment of the treadmill not only depends on the gait main frequency f s and the gait stability S(t) in the gait feature vector, but also combines the synergistic effect between the gait and the treadmill performance to provide a personalized exercise experience.

[0064] Generally, based on the gait main frequency f s , the exercise speed ν(t) of the treadmill can be adjusted. The gait main frequency fs reflects the frequency of the user's steps and is directly related to the intensity and speed of the exercise. Therefore, the running speed of the treadmill should be proportional to this frequency to match the rhythm of the user's steps. Specifically, the dominant gait frequency f s The real-time running speed of the treadmill can be calculated by the following formula: v(t) = v base + γf s (t); where v(t) is the real-time running speed of the treadmill, in meters per second; v base is the base speed, in meters per second, representing the default speed of the treadmill; γ is the gain coefficient of the dominant gait frequency, in meters per second per hertz, representing the degree of influence of the dominant gait frequency on the running speed; f s (t) is the dominant gait frequency, in hertz, representing the frequency of the user's steps and varying with time.

[0065] In a possible implementation, the gain coefficient γ can be dynamically adjusted according to the user's physical condition, exercise needs, and the performance of the treadmill to provide a more appropriate exercise intensity. For users with a higher dominant gait frequency (such as fast runners), the gain coefficient γ can be set larger; while for users with slower steps (such as walkers), the gain coefficient can be appropriately reduced.

[0066] In addition, during the operation of the treadmill, the gait stability S(t) can also be used to dynamically adjust the slope θ(t) of the treadmill. The gait stability reflects the stability of the user's steps. When the gait is more stable, the user's exercise state also tends to be regular, and the treadmill can moderately increase the slope to provide a more challenging training. Specifically, the gait stability S(t) can adjust the real-time slope of the treadmill by the following formula: θ(t) = θ base + δS(t); where θ(t) is the real-time slope of the treadmill, in degrees, θ base is the base slope, in degrees, representing the default slope of the treadmill, δ is the gain coefficient of the gait stability, in degrees, and S(t) is the gait stability, representing the stability of the steps, dimensionless.

[0067] As an option, the gain coefficient δ can be dynamically adjusted according to the user's exercise mode and gait characteristics. For example, if the user's step stability is strong, the slope can be increased to enhance the training intensity; while in the case of unstable gait, the slope can be reduced to avoid the user being injured due to excessive load.

[0068] In some embodiments, the dominant gait frequency f sThe relationship with the gait stability S(t) can be further optimized through machine learning algorithms. By analyzing a large amount of user gait data, the system can automatically adjust the optimal matching values between the main gait frequency, stability, and motion parameters according to the gait characteristics of each user, thereby providing customized treadmill running settings. Specifically, the system can adjust the gain coefficients γ and δ based on the feedback during the training process.

[0069] Specifically, in a possible implementation, the running speed v(t) and slope θ(t) of the treadmill can be adaptively adjusted according to the real-time gait feature vector. For example, in some cases, the user's steps may be abnormal (such as fatigue or unstable steps). At this time, by reducing the gain coefficients γ or δ, the exercise burden can be effectively reduced, providing a more comfortable experience.

[0070] In some embodiments, the system can also combine external environmental factors (such as indoor temperature, humidity, the load condition of the treadmill, etc.) to optimize the adjustment of the treadmill's motion parameters to ensure that the most suitable exercise experience can still be provided for the user under different environmental conditions.

[0071] In summary, in this embodiment, based on the gait feature vector F = [f s , A(t), φ(t)], by calculating the main gait frequency f s and the gait stability S(t) in real time, the running speed ν(t) and slope θ(t) of the treadmill are dynamically adjusted, so that the running parameters of the treadmill can be well adapted to the user's gait characteristics. This dynamic adjustment mechanism not only improves the user experience but also helps to improve the training effect and safety. By further optimizing the gain coefficients γ and δ and combining personalized settings, the treadmill can provide precise and comfortable exercise adjustment according to the needs of different users.

[0072] Please refer to Figure 2 , the present invention also provides an automatic step-counting treadmill control system based on an AI algorithm, including: A current acquisition module, configured to collect the load current data of the treadmill motor in real time through a current sensor and transmit it to the data processing module; The load current change of the motor is monitored in real time through a current sensor installed on the treadmill motor. The current acquisition module is responsible for transmitting these real-time data to the data preprocessing module. The core task of this module is to ensure the accuracy and timeliness of the current data.

[0073] A data preprocessing module, configured to perform denoising processing on the collected load current data; The function of the data preprocessing module is to denoise and filter the load current data transmitted by the current acquisition module. Through the Kalman filtering algorithm, it can remove the noise caused by factors such as external environmental changes and irregular movements of athletes, ensuring that the collected data is smooth and representative. In addition, methods such as Fourier transform are also used to extract the frequency characteristics of the signal.

[0074] The gait feature vector calculation module is used to input the preprocessed load current data into a pre-trained AI learning model to calculate the gait features at the current moment; This module uses the AI learning model to process the preprocessed data and extract the user's gait features. Through deep learning techniques such as LSTM networks and Transformer networks, this module can identify the user's gait pattern and deduce the gait feature vector.

[0075] The step counting event judgment module is used to judge whether a step counting event is triggered according to the gait features and update the step counting value; the step counting event judgment module is responsible for determining whether a valid gait action has occurred based on the gait feature vector, thereby triggering the step counting event. This module calculates the stability of the gait and the stride change rate, and judges whether to update the number of steps through a preset threshold.

[0076] The treadmill control module dynamically adjusts the operating parameters of the treadmill based on the gait features; The treadmill control module is responsible for adjusting the operating parameters of the treadmill according to the gait features. This module dynamically adjusts the speed and slope of the treadmill to ensure that the treadmill movement mode matches the user's gait.

[0077] The display and interaction module is used to display the current number of steps, gait features, and treadmill status to the user; The display and interaction module provides an interactive interface between the user and the system, and displays information such as the real-time number of steps, gait features, and treadmill status to the user through the display screen. In addition, the user can also adjust the system settings or view historical data through this module to enhance the user experience.

[0078] The system communication module is used for data communication and coordination between different modules; The system communication module is responsible for data transmission and coordination work between modules. It ensures the information flow between modules such as current acquisition, data preprocessing, and gait analysis, and ensures the real-time and accuracy of information, supporting the stable operation of the entire system.

[0079] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An automatic step-counting treadmill control method based on an AI algorithm, characterized in that, It includes the following steps: Collect the load current data of the treadmill motor in real time; Preprocess the load current data; Input the preprocessed load current data into a pre-trained AI learning model to calculate and extract the gait feature vector at the current moment; judge whether a step counting event is triggered according to the gait feature vector, and update the step count value; Dynamically adjust the operating parameters of the treadmill based on the gait feature vector.

2. The automatic step-counting treadmill control method based on the AI algorithm according to claim 1, characterized in that The step of collecting the load current data of the treadmill motor in real time is as follows: Collect the load current data of the treadmill motor in real time through a current sensor; Calculate the load current data based on the treadmill motor dynamics model, and the dynamics model satisfies: Where: T m is the motor torque, K t is the motor torque constant, B m is the motor damping coefficient, J is the moment of inertia, v is the running speed, is the derivative of the speed; The load current data is calculated by the following formula: Where: I(t) is the real-time load current of the treadmill motor; F(t) is the force exerted by the user's steps, which is related to the user's weight m and running speed v.

3. The automatic step-counting treadmill control method based on the AI algorithm according to claim 2, wherein, The steps of preprocessing the load current data include: Eliminate the noise interference in the load current data through Kalman filtering to obtain the denoised load current signal I′(t); Extract the gait main frequency of the load current signal through short-time Fourier transform, and the short-time Fourier transform calculation formula is: Where, STFT(I′(t)) represents the short-time Fourier transform result of the denoised load current signal; I(n) is the discretized load current signal, n is the discrete time index; w(n - m1) is the window function, which intercepts the local signal centered on the time point m1; ω is the angular frequency; Decompose the fluctuation amplitude A(t) of the denoised load current signal through wavelet transform.

4. The automatic step-counting treadmill control method based on the AI algorithm according to claim 3, characterized in that, The step of inputting the preprocessed load current data into a pre-trained AI learning model to calculate and extract the gait feature vector at the current moment is as follows: Input the denoised load current signal I′(t) and the extracted main gait frequency f s , and the fluctuation amplitude A(t) into the pre-trained hybrid neural network model; Extract the time series features through a bidirectional long short-term memory network and output the gait cycle signal x(t); Calculate the gait phase information φ(t) through the Transformer network, which satisfies: Where: Q is the query matrix; K is the key matrix, and V is the value matrix; d k is the dimensionality scaling factor of the key matrix K; softmax is the normalized exponential function; Modeling gait dynamics characteristics by combining with the nonlinear Duffing equation, and outputting the gait feature vector F = [f s , A(t), φ(t)].

5. The automatic step-counting treadmill control method based on the AI algorithm according to claim 4, characterized in that, The steps of judging whether a step counting event is triggered according to the gait feature vector include: Calculate the gait stability S(t) based on the gait cycle signal x(t); Through the main gait frequency f s Calculate the stride change rate R(t), satisfying: where, f s is the main gait frequency; t is the time; represents the rate of change of the main gait frequency f s with respect to the time t; If the step rate of change R(t) is lower than the set threshold R th and the gait stability S(t) is higher than the set threshold S th , then a step counting event is triggered to update the step counter N = N + 1.

6. The automatic step-counting treadmill control method based on the AI algorithm according to claim 6, wherein The calculation method of the gait stability S(t) is: S(t) = αS var (t) + (1 - α)S corr (t); wherein, is the normalized value of the variance of the gait cycle signal, is the autocorrelation value of the gait cycle signal, and α is the balance weight coefficient, which is between 0 and 1.

7. The automatic step-counting treadmill control method based on the AI algorithm according to claim 1, wherein The step of dynamically adjusting the operating parameters of the treadmill based on the gait feature vector is: According to the main gait frequency f s Adjust the running speed v(t) of the treadmill to satisfy: v(t) = v base + γf s ; Among them, v(t) is the real-time motion speed of the treadmill; v base is the basic speed; γ is the gain coefficient of the gait main frequency; f s (t) is the gait main frequency; Adjust the slope θ(t) of the treadmill according to the gait stability S(t), which satisfies: θ(t) = θ base + δS(t); where θ(t) is the real-time slope of the treadmill; θ base is the basic slope; δ is the gain coefficient of gait stability; S(t) is the gait stability; Dynamically update the operating parameters of the treadmill to make it adapt to the user's gait feature vector.

8. An automatic step-counting treadmill control system based on an AI algorithm, which is applied to the automatic step-counting treadmill control method based on an AI algorithm according to any one of claims 1-7, characterized in that, It includes: A current acquisition module, which is used to collect the load current data of the treadmill motor in real time through a current sensor and transmit it to the data processing module; A data preprocessing module, which is used to perform denoising processing on the collected load current data; A gait feature calculation module, which is used to input the preprocessed load current data into a pre-trained AI learning model to calculate and extract the gait feature vector at the current moment; A step counting event judgment module, which is used to judge whether a step counting event is triggered according to the gait feature and update the step count value; A treadmill control module, which dynamically adjusts the operating parameters of the treadmill based on the gait feature; A display and interaction module, which is used to display the current number of steps, gait features and treadmill status to the user.