An automatic calibration method, system, terminal, and storage medium based on a resistive insole pressure sensor.
By combining IMU data and neural network models, the vertical ground reaction force of the resistive insole pressure sensor is automatically calibrated, solving the problems of data drift and insufficient accuracy, and realizing efficient calibration and stable gait analysis in multiple scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-04-03
AI Technical Summary
Existing low-cost resistive insole force sensors are prone to data drift and inaccuracy during long-term use. Traditional calibration methods rely on expensive equipment or complex platforms, which affects the accuracy and stability of gait analysis, making them unsuitable for clinical rehabilitation, daily monitoring, and outdoor experimental scenarios.
The system acquires raw motion data using an IMU (Inertial Measurement Unit) and vertical ground reaction force collected by a resistive insole pressure sensor. It then uses a target dual-layer feedforward neural network model for prediction and calibration. The system combines acceleration, angular velocity, and angle information to calculate the differences and generate a calibration matrix to automatically calibrate the vertical ground reaction force.
It improves the measurement accuracy of resistive insole pressure sensors, reduces data drift, is suitable for efficient calibration in multiple scenarios, and enhances the stability and portability of gait analysis.
Smart Images

Figure CN121068094B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data calibration technology, and in particular to an automatic calibration method, system, terminal, and computer-readable storage medium based on a resistive insole pressure sensor. Background Technology
[0002] Currently, some sensing insoles based on different sensing principles typically use flexible materials as the medium and employ different sensing principles to provide strong technical support for wearable applications. For example, the F-Scan system uses an FSR (Force Sensitive Resistor), and the Pedar system uses an embedded capacitive sensor. Existing insole force sensor calibration strategies can be divided into two categories: The first is to apply a standard force to the insole force sensor for static calibration, and then calibrate by shifting, scaling, or adding a time factor to the data. This method can effectively improve the accuracy of the sensor under static conditions, but the calibration effect under dynamic conditions (such as walking, climbing stairs) is not as good as the static condition, and the process is complicated and not portable enough. The second is to place the insole force sensor in the device through an integrated calibration platform for calibration (such as the calibration instrument included with the product), but this relies too much on the external platform and is costly.
[0003] However, existing low-cost resistive insole force sensors are prone to data drift and insufficient accuracy during long-term use. Traditional insole force sensor calibration methods often rely on expensive equipment or complex platforms, which are not suitable for efficient deployment in scenarios such as clinical rehabilitation, daily monitoring, and outdoor experiments. This results in residual force output and time-related drift in the vertical ground reaction force data output by the insole sensor, affecting the accuracy and stability of gait analysis, which has become an urgent problem to be solved.
[0004] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0005] The main objective of this invention is to provide an automatic calibration method, system, terminal, and computer-readable storage medium based on a resistive insole pressure sensor. This aims to solve the problems of data drift and insufficient measurement accuracy that still exist in resistive insole pressure sensors, where existing calibration methods for resistive insole pressure sensors are inaccurate and rely on expensive equipment or complex platforms.
[0006] To achieve the above objectives, the present invention provides an automatic calibration method based on a resistive insole pressure sensor, the automatic calibration method based on the resistive insole pressure sensor comprising the following steps:
[0007] The IMU (Inertial Measurement Unit) acquires the raw motion data collected by the user and the first vertical ground reaction force collected by the resistive insole pressure sensor. The raw motion data and the first vertical ground reaction force are preprocessed to obtain the target gait cycle data.
[0008] The second vertical ground reaction force collected by the resistive insole pressure sensor is obtained, and a target double-layer feedforward neural network model is trained based on the target gait cycle data. The second vertical ground reaction force is predicted by the trained target double-layer feedforward neural network model to obtain the predicted vertical ground reaction force.
[0009] The difference between the original motion data and the predicted vertical ground reaction force is calculated to obtain a calibration matrix. The second vertical ground reaction force is then automatically calibrated based on the calibration matrix to obtain the calibrated vertical ground reaction force.
[0010] Optionally, in the automatic calibration method based on a resistive insole pressure sensor, the raw motion data includes acceleration information, angular velocity information, and angle information.
[0011] The IMU (Inertial Measurement Unit) acquires the raw motion data collected by the user and the first vertical ground reaction force collected by the insole sensor. It then preprocesses the raw motion data and the first vertical ground reaction force to obtain target gait cycle data, specifically including:
[0012] The acceleration information, angular velocity information, and angle information collected by the IMU inertial measurement unit for the user, as well as the first vertical ground reaction force collected by the insole sensor for the user's foot, are acquired. The acceleration information, angular velocity information, angle information, and the first vertical ground reaction force are preprocessed using a time synchronization method and a threshold detection method to obtain the support phase parameters.
[0013] The support phase parameters are divided according to a preset threshold to obtain multiple gait cycles. Interpolation is performed on all the gait cycles to obtain target gait cycle data.
[0014] Optionally, the automatic calibration method based on a resistive insole pressure sensor, wherein acquiring the second vertical ground reaction force collected by the resistive insole pressure sensor, training a target two-layer feedforward neural network model based on the target gait cycle data, and predicting the second vertical ground reaction force using the trained target two-layer feedforward neural network model to obtain the predicted vertical ground reaction force, specifically includes:
[0015] The second vertical ground reaction force collected by the resistive insole pressure sensor on the user's foot is obtained, and the target gait cycle data is divided into a training set and a test set according to a preset ratio.
[0016] The target two-layer feedforward neural network model is trained according to the preset training hyperparameters and the training set. The target two-layer feedforward neural network model is then tested using the test set. When the test results meet the requirements, the trained target two-layer feedforward neural network model is obtained.
[0017] The second vertical ground reaction force is predicted by the linear neurons of the target two-layer feedforward neural network model, and the predicted vertical ground reaction force is obtained.
[0018] Optionally, in the automatic calibration method based on a resistive insole pressure sensor, the preset training hyperparameters include a learning rate parameter, a maximum training value, and a batch size parameter.
[0019] The process of training the target two-layer feedforward neural network model according to preset training hyperparameters and the training set, and using the test set to perform performance testing on the target two-layer feedforward neural network model, yielding a trained target two-layer feedforward neural network model when the test results meet the requirements, specifically includes:
[0020] The target two-layer feedforward neural network model is trained according to the learning rate parameter, the maximum training value, the batch size parameter, the first vertical ground reaction force, and the training set to obtain the first two-layer feedforward neural network model.
[0021] Obtain the MSE function, use the test set to perform performance testing on the first two-layer feedforward neural network model, and when the test results meet the requirements, verify the first two-layer feedforward neural network model according to the MSE function and the test set to obtain the trained target two-layer feedforward neural network model.
[0022] Optionally, the automatic calibration method based on a resistive insole pressure sensor, wherein the step of calculating the difference between the original motion data and the predicted vertical ground reaction force to obtain a calibration matrix, and automatically calibrating the second vertical ground reaction force according to the calibration matrix to obtain the calibrated vertical ground reaction force, specifically includes:
[0023] The difference between the acceleration information, the angular velocity information, the angle information and the predicted vertical ground reaction force time series is calculated to obtain the error matrix;
[0024] The calibration coefficients of the error matrix are iteratively adjusted according to the MSE function to obtain the calibration matrix. The second vertical ground reaction force is automatically calibrated according to the calibration matrix to obtain the calibrated vertical ground reaction force.
[0025] Optionally, the automatic calibration method based on a resistive insole pressure sensor, wherein the step of iteratively adjusting the calibration coefficients of the error matrix according to the MSE function to obtain a calibration matrix, and automatically calibrating the second vertical ground reaction force according to the calibration matrix to obtain the calibrated vertical ground reaction force, specifically includes:
[0026] The calibration coefficients of the error matrix are iteratively adjusted according to the MSE function to obtain multiple calibration coefficient vectors. The calibration matrix is obtained by synthesizing all the calibration coefficient vectors.
[0027] The Adam optimizer linearly multiplies the acceleration information, angular velocity information, angle information, and calibration matrix to obtain the optimal calibration matrix. The second vertical ground reaction force is then automatically calibrated based on the optimal calibration matrix to obtain the calibrated vertical ground reaction force.
[0028] Optionally, the automatic calibration method based on a resistive insole pressure sensor, wherein the step of linearly multiplying the acceleration information, the angular velocity information, the angle information, and the calibration matrix using an Adam optimizer to obtain an optimal calibration matrix, and automatically calibrating the second vertical ground reaction force according to the optimal calibration matrix to obtain the calibrated vertical ground reaction force, specifically includes:
[0029] The Adam optimizer is used to optimize the acceleration information, angular velocity information, angle information, and predicted vertical ground reaction force to obtain the target calibration matrix;
[0030] The acceleration information, angular velocity information, angle information, and dynamic parameters of the target calibration matrix are linearly multiplied to obtain the optimal calibration matrix. The second vertical ground reaction force is automatically calibrated based on the optimal calibration matrix to obtain the calibrated vertical ground reaction force.
[0031] The dynamic parameters include the optimized calibration force, the translation calibration force, and the original insole force.
[0032] Furthermore, to achieve the above objectives, the present invention also provides an automatic calibration system based on a resistive insole pressure sensor, wherein the automatic calibration system based on the resistive insole pressure sensor includes:
[0033] The data preprocessing module is used to acquire the raw motion data collected by the IMU inertial measurement unit for the user and the first vertical ground reaction force collected by the resistive insole pressure sensor, and to preprocess the raw motion data and the first vertical ground reaction force to obtain the target gait cycle data.
[0034] The data prediction module is used to acquire the second vertical ground reaction force collected by the resistive insole pressure sensor, train a target double-layer feedforward neural network model based on the target gait cycle data, and predict the second vertical ground reaction force through the trained target double-layer feedforward neural network model to obtain the predicted vertical ground reaction force.
[0035] The data calibration module is used to calculate the difference between the original motion data and the predicted vertical ground reaction force to obtain a calibration matrix, and to automatically calibrate the second vertical ground reaction force according to the calibration matrix to obtain the calibrated vertical ground reaction force.
[0036] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an automatic calibration program based on a resistive insole pressure sensor, and the automatic calibration program based on the resistive insole pressure sensor, when executed by a processor, implements the steps of the automatic calibration method based on the resistive insole pressure sensor as described above.
[0037] In this invention, raw motion data collected by an IMU (Inertial Measurement Unit) for a user and a first vertical ground reaction force collected by a resistive insole pressure sensor are acquired. The raw motion data and the first vertical ground reaction force are preprocessed to obtain target gait cycle data. A second vertical ground reaction force collected by the resistive insole pressure sensor is acquired. A target two-layer feedforward neural network model is trained based on the target gait cycle data. The trained target two-layer feedforward neural network model is used to predict the second vertical ground reaction force to obtain a predicted vertical ground reaction force. The difference between the raw motion data and the predicted vertical ground reaction force is calculated to obtain a calibration matrix. The second vertical ground reaction force is automatically calibrated based on the calibration matrix to obtain a calibrated vertical ground reaction force. This invention inputs the raw motion data and the first vertical ground reaction force into the model for prediction, obtaining the predicted vertical ground reaction force and calibrating the vertical ground reaction force, thereby improving measurement accuracy. Attached Figure Description
[0038] Figure 1 This is a flowchart of a preferred embodiment of the automatic calibration method for a resistive insole pressure sensor of the present invention;
[0039] Figure 2 This is a flowchart of a preferred embodiment of the automatic calibration method for a resistive insole pressure sensor of the present invention;
[0040] Figure 3 This is a structural diagram of the resistive pressure sensor data in a preferred embodiment of the automatic calibration method based on a resistive insole pressure sensor of the present invention.
[0041] Figure 4This is a structural diagram of a preferred embodiment of the automatic calibration system based on a resistive insole pressure sensor of the present invention;
[0042] Figure 5 This is a structural diagram of a preferred embodiment of the terminal of the device of the present invention. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0044] Currently, some sensing insoles based on different sensing principles typically use flexible materials as the medium and employ different sensing principles to provide strong technical support for wearable applications. For example, the F-Scan system uses an FSR (Force Sensitive Resistor) resistive force sensor, and the Pedar (Pedobarographic Analysis System) plantar pressure analysis system uses an embedded capacitive sensor. Existing insole force sensor calibration strategies can be divided into two categories: The first is to apply standard forces to the insole force sensor for static calibration, and then calibrate by shifting, scaling, or adding time factors to the data. This method can effectively improve the accuracy of the sensor under static conditions, but the calibration effect under dynamic conditions (such as walking, climbing stairs) is not as good as the static condition, and the process is complex and lacks portability. The second method is to place the insole force sensor in the device for calibration through an integrated calibration platform (such as a calibration instrument included with the product). However, this method relies too much on an external platform and is costly. Low-cost resistive insole force sensors are prone to data drift and inaccuracy during long-term use. Traditional insole force sensor calibration methods often rely on expensive equipment or complex platforms, which are not suitable for efficient deployment in clinical rehabilitation, daily monitoring, and outdoor experiments. This results in residual force output and time-related drift in the vertical ground reaction force data output by the insole sensor, affecting the accuracy and stability of gait analysis. Therefore, an automatic calibration method based on resistive insole pressure sensors is needed. This method involves inputting raw motion data and the first vertical ground reaction force into a model for training and prediction, obtaining the predicted vertical ground reaction force, and calibrating the vertical ground reaction force to achieve accurate measurement of sensor data.
[0045] The automatic calibration method based on a resistive insole pressure sensor described in the preferred embodiment of the present invention, such as... Figure 1 As shown, the automatic calibration method based on a resistive insole pressure sensor includes the following steps:
[0046] Step S10: Obtain the raw motion data collected by the user and the first vertical ground reaction force collected by the resistive insole pressure sensor from the IMU inertial measurement unit, and preprocess the raw motion data and the first vertical ground reaction force to obtain the target gait cycle data.
[0047] Step S10 includes:
[0048] Step S11: Obtain the acceleration information, angular velocity information, and angle information collected by the IMU inertial measurement unit for the user, and the first vertical ground reaction force collected by the insole sensor for the user's foot. Preprocess the acceleration information, angular velocity information, angle information, and first vertical ground reaction force through time synchronization method and threshold detection method to obtain support phase parameters.
[0049] Step S12: Divide the support phase parameters according to a preset threshold to obtain multiple gait cycles, and perform interpolation on all the gait cycles to obtain target gait cycle data.
[0050] Specifically, the acceleration, angular velocity, and angle information collected by the IMU (Inertial Measurement Unit) for the user, as well as the first vertical ground reaction force collected by the insole sensor for the user's foot (the first vertical ground reaction force measured by the insole force sensor and the treadmill force platform when the human body is in contact with the ground; the dataset mainly covers the motion information of the torso, front of the thigh, back of the calf, and instep of the human body in a constant-speed walking state on the treadmill force platform, i.e., the first vertical ground reaction force), are obtained. The acceleration, angular velocity, and angle information are then processed using time synchronization and threshold detection methods. The degree information and the first vertical ground reaction force are preprocessed to obtain support phase parameters (wherein, a nine-axis IMU inertial measurement unit, gyroscope, and goniometer measure acceleration, angular velocity, and angle information). The support phase parameters are divided according to a preset threshold to obtain multiple gait cycles. All the gait cycles are interpolated to obtain target gait cycle data (the support phase data of all gait cycles are interpolated using NumPy functions and each contains 100 timestamps). The original motion data includes acceleration, angular velocity, and angle information.
[0051] In this embodiment, a self-designed wearable data acquisition system is used to walk on a treadmill force platform. The subject walks at a comfortable cadence at different speeds (0.9, 1.0, 1.1, 1.2 m / s). The collected human motion information (such as acceleration information, angular velocity information, and angle information) is transmitted to the host computer via a Bluetooth serial port module. The first vertical ground reaction force measured by the treadmill force platform is directly output by its built-in software.
[0052] As an example, the acceleration of the IMU in the x-direction at the lower leg is used for data synchronization and support phase segmentation. The treadmill force platform VGRF uses a 15N threshold for detection. The first data frame (timestamp) when the vertical ground reaction force exceeds the threshold is the moment the seat heel touches the ground. Heel touch is considered the start of the support phase, and toe lift is considered the end of the support phase. The method of determining gait events through human kinematic parameters has been validated. During the swing phase, values of the vertical component (GRF, Generalized Random Forest) greater than zero are considered noise. The subject's body weight is used to standardize the vertical ground reaction force output by the force platform and insole to reduce differences between different subjects.
[0053] Step S20: Obtain the second vertical ground reaction force collected by the resistive insole pressure sensor, train a target double-layer feedforward neural network model based on the target gait cycle data, and predict the second vertical ground reaction force using the trained target double-layer feedforward neural network model to obtain the predicted vertical ground reaction force.
[0054] Step S20 includes:
[0055] Step S21: Obtain the second vertical ground reaction force collected by the resistive insole pressure sensor for the user's foot, and divide the target gait cycle data into a training set and a test set according to a preset ratio;
[0056] Step S22: Train the target two-layer feedforward neural network model according to the preset training hyperparameters and the training set, and use the test set to test the performance of the target two-layer feedforward neural network model. When the test results meet the requirements, the trained target two-layer feedforward neural network model is obtained.
[0057] Step S23: Predict the second vertical ground reaction force using the linear neurons of the target double-layer feedforward neural network model to obtain the predicted vertical ground reaction force.
[0058] Specifically, the second vertical ground reaction force collected by the resistive insole pressure sensor on the user's foot is obtained. The target gait cycle data is divided into a training set and a test set according to a preset ratio (the pre-processed gait cycle samples are randomly divided into a training set (70%) and a validation set (30%) for model training and validation). The target two-layer feedforward neural network model is trained according to preset training hyperparameters and the training set (the training set (self-collected human motion data) is used as the input to the above-mentioned FNN (Feedforward Neural Network) target two-layer feedforward neural network and trained on it, with a loss function...). LThe target two-layer feedforward neural network model is trained using the MSE function. The test set is used to test the performance of the target two-layer feedforward neural network model. When the test results meet the requirements, the trained target two-layer feedforward neural network model is obtained. (The purpose of building a high-precision pressure information estimation model is to accurately estimate the plantar pressure information of the subject in an offline state. A supervised learning framework is used to train the machine learning model. A lightweight network design paradigm for prediction tasks is adopted to build a target two-layer feedforward neural network (FNN). The linear neurons of the target two-layer feedforward neural network model are used to predict the second vertical ground reaction force to obtain the predicted vertical ground reaction force. (The subject is asked to walk on the treadmill force platform at a uniform speed and a non-uniform speed for a period of time. The speed is between 0.9-1.2m / s. Data of about 15 seconds is randomly selected for preprocessing. The IMU data of the support phase is extracted as the neural network input. The output predicted vertical ground reaction force is used as the standard value for the calibration process.)
[0059] In this embodiment, as Figure 2 As shown, the hidden layer contains 10 neurons, and the activation function (Sigmoid) is used for non-linear feature mapping; the output layer consists of 100 linear neurons and is used for direct regression of time series (VGRF, Vertical Ground Reaction Force). Figure 2 In This represents the optimized matrix, for example: , ,... ,in, This represents the first vertical ground reaction force in the first data frame. This indicates the first vertical ground reaction force in the second data frame. This represents the first vertical ground reaction force in the 100th data frame, covering complete target gait cycle data, wherein the loss function ( The calculation formula for ) is as follows:
[0060] ;
[0061] The loss function L uses the MSE function (where, It is the input value. (This is the average value).
[0062] Step S22 includes:
[0063] Step S221: Train the target two-layer feedforward neural network model according to the learning rate parameter, the maximum training value, the batch size parameter, the first vertical ground reaction force and the training set to obtain the first two-layer feedforward neural network model;
[0064] Step S222: Obtain the MSE function, use the test set to perform performance testing on the first two-layer feedforward neural network model, and when the test results meet the requirements, verify the first two-layer feedforward neural network model according to the MSE function and the test set to obtain the trained target two-layer feedforward neural network model.
[0065] Specifically, the target two-layer feedforward neural network model is trained according to the learning rate parameter, the maximum training value, the batch size parameter, the first vertical ground reaction force, and the training set to obtain a first two-layer feedforward neural network model (setting training hyperparameters, selecting the Adam optimizer for training, setting the learning rate parameter to 0.05, the batch size parameter to 32, and the maximum training value (epoch) to 10000), obtaining the MSE function, and using the test set to perform performance testing on the first two-layer feedforward neural network model. When the test results meet the requirements, the first two-layer feedforward neural network model is validated according to the MSE function and the test set to obtain the trained target two-layer feedforward neural network model (to verify model performance, after completing one training cycle (1 epoch), the validation set is used as input, and the MSE function is used as the loss function to verify the model performance. Training is stopped after the loss value stabilizes for 100 consecutive epochs to prevent model overfitting. The model with the highest accuracy is selected as the final model for testing to verify the model effect). The preset training hyperparameters include the learning rate parameter, the maximum training value, and the batch size parameter.
[0066] Step S30: Calculate the difference between the original motion data and the predicted vertical ground reaction force to obtain a calibration matrix, and automatically calibrate the second vertical ground reaction force according to the calibration matrix to obtain the calibrated vertical ground reaction force.
[0067] Step S30 includes:
[0068] Step S31: Calculate the difference between the acceleration information, the angular velocity information, the angle information and the predicted vertical ground reaction force time series to obtain the error matrix;
[0069] Step S32: Iteratively adjust the calibration coefficients of the error matrix according to the MSE function to obtain the calibration matrix, and automatically calibrate the second vertical ground reaction force according to the calibration matrix to obtain the calibrated vertical ground reaction force.
[0070] Specifically, such as Figure 3As shown, the acceleration information, angular velocity information, angle information, and predicted vertical ground reaction force time sequence are compared to calculate the difference, resulting in an error matrix. (For different target gait cycle data, all support phase data are interpolated to 100 data frames (timestamps). Assuming that the true value of the vertical ground reaction force in each frame can be represented by the multiplication of 18 pressure sensors on the sole of the foot and a one-dimensional calibration coefficient vector, then for the entire support phase, the theoretical calibration matrix can be represented by a matrix synthesized from 100 calibration coefficient vectors.) The calibration coefficients of the error matrix are iteratively adjusted according to the MSE function to obtain a calibration matrix. The second vertical ground reaction force is automatically calibrated according to the calibration matrix to obtain the calibrated vertical ground reaction force, where FFCP (Forefoot Contact Phase) is the forefoot contact phase, FFP (Foot Flat Phase) is the foot flat phase, and FFPOP (Forefoot Push-Off Phase) is the forefoot push-off phase.
[0071] Step S32 includes:
[0072] Step S321: Iteratively adjust the calibration coefficients of the error matrix according to the MSE function to obtain multiple calibration coefficient vectors, and synthesize all the calibration coefficient vectors to obtain the calibration matrix;
[0073] Step S322: The acceleration information, angular velocity information, angle information and calibration matrix are linearly multiplied by the Adam optimizer to obtain the optimal calibration matrix. The second vertical ground reaction force is automatically calibrated according to the optimal calibration matrix to obtain the calibrated vertical ground reaction force.
[0074] Specifically, the calibration coefficients of the error matrix are iteratively adjusted according to the MSE function to obtain multiple calibration coefficient vectors. These vectors are then synthesized to obtain a calibration matrix (theoretically, the calibration matrix can be represented by a matrix composed of 100 calibration coefficient vectors, each representing a different time stamp, thus covering different calibration coefficients at different times in the gait cycle support phase, introducing the temporal characteristics of the gait). The Adam optimizer linearly multiplies the acceleration information, the angular velocity information, the angle information, and the calibration matrix to obtain the optimal calibration matrix. The second vertical ground reaction force is then automatically calibrated based on the optimal calibration matrix to obtain the calibrated vertical ground reaction force (e.g., ...). Figure 2 As shown, the Adam optimizer is used for optimization, with the reference value being the ground reaction force of all selected support phases. The optimized matrix provides dynamic calibration parameters for all insole sensors. The original data from the insole sensors and the optimized matrix are linearly multiplied and then summed to obtain the calibrated vertical ground reaction force. ));
[0075] Among them, vertical ground reaction force ( The calculation formula is as follows:
[0076] ;
[0077] Among them, the represents the second vertical ground reaction force, Represents a timestamp. This represents the current vector.
[0078] In this embodiment, the formula relating the actual measured value and the true value is as follows:
[0079] ;
[0080] ;
[0081] in, and The timestamp representing the raw motion data. This represents the optimized matrix. Indicates transpose. The transpose matrix representing the first timestamp of the original motion data. The transpose matrix representing the second timestamp of the original motion data. The transpose matrix representing the 100th timestamp of the original motion data. Let the first transpose of the optimized matrix be denoted as . This represents the second transpose of the optimized matrix. This represents the hundredth transpose of the optimized matrix.
[0082] Step S322 includes:
[0083] Step S3221: Optimize the acceleration information, angular velocity information, angle information and predicted vertical ground reaction force using the Adam optimizer to obtain the target calibration matrix;
[0084] Step S3222: Perform linear multiplication of the acceleration information, angular velocity information, angle information and dynamic parameters of the target calibration matrix to obtain the optimal calibration matrix. Then, automatically calibrate the second vertical ground reaction force according to the optimal calibration matrix to obtain the calibrated vertical ground reaction force.
[0085] Specifically, the acceleration information, angular velocity information, angle information, and predicted vertical ground reaction force are optimized using the Adam optimizer to obtain a target calibration matrix (obtaining a matrix that minimizes the global error of the vertical ground reaction force across all gait cycles, optimized using the Adam optimizer, with reference values being all selected predicted vertical ground reaction forces, based on the loss function). Optimize, such as Figure 2 As shown, the optimized matrix provides dynamic calibration parameters for all insole sensors. The optimal calibration matrix is obtained by linearly multiplying the acceleration information, angular velocity information, angle information, and the dynamic parameters of the target calibration matrix. The second vertical ground reaction force is then automatically calibrated based on this optimal calibration matrix to obtain the calibrated vertical ground reaction force (by linearly multiplying the original data from the insole sensors and the optimized matrix K, and then summing the results). The dynamic parameters include the optimized calibration force, the translation calibration force, and the original insole force.
[0086] Furthermore, such as Figure 4 As shown, based on the above-described automatic calibration method for a resistive insole pressure sensor, the present invention also provides an automatic calibration system for a resistive insole pressure sensor, wherein the automatic calibration system for a resistive insole pressure sensor includes:
[0087] Data preprocessing module 51 is used to acquire the raw motion data collected by the IMU inertial measurement unit for the user and the first vertical ground reaction force collected by the resistive insole pressure sensor, and to preprocess the raw motion data and the first vertical ground reaction force to obtain target gait cycle data.
[0088] Data prediction module 52 is used to acquire the second vertical ground reaction force collected by the resistive insole pressure sensor, train a target double-layer feedforward neural network model based on the target gait cycle data, and predict the second vertical ground reaction force through the trained target double-layer feedforward neural network model to obtain the predicted vertical ground reaction force.
[0089] The data calibration module 53 is used to calculate the difference between the original motion data and the predicted vertical ground reaction force to obtain a calibration matrix, and to automatically calibrate the second vertical ground reaction force according to the calibration matrix to obtain the calibrated vertical ground reaction force.
[0090] Furthermore, such as Figure 5 As shown, based on the above-mentioned automatic calibration method and system based on resistive insole pressure sensor, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 5Only some of the terminal components are shown; however, 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.
[0091] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores an automatic calibration program 40 based on a resistive insole pressure sensor, which can be executed by the processor 10 to implement the automatic calibration method based on the resistive insole pressure sensor described in this application.
[0092] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the automatic calibration method based on the resistive insole pressure sensor.
[0093] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The terminals communicate with each other via a system bus.
[0094] In one embodiment, when the processor 10 executes the automatic calibration program 40 based on the resistive insole pressure sensor in the memory 20, the following steps are performed:
[0095] The IMU (Inertial Measurement Unit) acquires the raw motion data collected by the user and the first vertical ground reaction force collected by the resistive insole pressure sensor. The raw motion data and the first vertical ground reaction force are preprocessed to obtain the target gait cycle data.
[0096] The second vertical ground reaction force collected by the resistive insole pressure sensor is obtained, and a target double-layer feedforward neural network model is trained based on the target gait cycle data. The second vertical ground reaction force is predicted by the trained target double-layer feedforward neural network model to obtain the predicted vertical ground reaction force.
[0097] The difference between the original motion data and the predicted vertical ground reaction force is calculated to obtain a calibration matrix. The second vertical ground reaction force is then automatically calibrated based on the calibration matrix to obtain the calibrated vertical ground reaction force.
[0098] The raw motion data includes acceleration information, angular velocity information, and angle information;
[0099] The IMU (Inertial Measurement Unit) acquires the raw motion data collected by the user and the first vertical ground reaction force collected by the insole sensor. It then preprocesses the raw motion data and the first vertical ground reaction force to obtain target gait cycle data, specifically including:
[0100] The acceleration information, angular velocity information, and angle information collected by the IMU inertial measurement unit for the user, as well as the first vertical ground reaction force collected by the insole sensor for the user's foot, are acquired. The acceleration information, angular velocity information, angle information, and the first vertical ground reaction force are preprocessed using a time synchronization method and a threshold detection method to obtain the support phase parameters.
[0101] The support phase parameters are divided according to a preset threshold to obtain multiple gait cycles. Interpolation is performed on all the gait cycles to obtain target gait cycle data.
[0102] Specifically, the process of acquiring the second vertical ground reaction force collected by the resistive insole pressure sensor, training a target two-layer feedforward neural network model based on the target gait cycle data, and predicting the second vertical ground reaction force using the trained target two-layer feedforward neural network model to obtain the predicted vertical ground reaction force includes:
[0103] The second vertical ground reaction force collected by the resistive insole pressure sensor on the user's foot is obtained, and the target gait cycle data is divided into a training set and a test set according to a preset ratio.
[0104] The target two-layer feedforward neural network model is trained according to the preset training hyperparameters and the training set. The target two-layer feedforward neural network model is then tested using the test set. When the test results meet the requirements, the trained target two-layer feedforward neural network model is obtained.
[0105] The second vertical ground reaction force is predicted by the linear neurons of the target two-layer feedforward neural network model, and the predicted vertical ground reaction force is obtained.
[0106] The preset training hyperparameters include the learning rate parameter, the maximum training value, and the batch size parameter;
[0107] The process of training the target two-layer feedforward neural network model according to preset training hyperparameters and the training set, and using the test set to perform performance testing on the target two-layer feedforward neural network model, yielding a trained target two-layer feedforward neural network model when the test results meet the requirements, specifically includes:
[0108] The target two-layer feedforward neural network model is trained according to the learning rate parameter, the maximum training value, the batch size parameter, the first vertical ground reaction force, and the training set to obtain the first two-layer feedforward neural network model.
[0109] Obtain the MSE function, use the test set to perform performance testing on the first two-layer feedforward neural network model, and when the test results meet the requirements, verify the first two-layer feedforward neural network model according to the MSE function and the test set to obtain the trained target two-layer feedforward neural network model.
[0110] Specifically, the step of calculating the difference between the original motion data and the predicted vertical ground reaction force to obtain a calibration matrix, and then automatically calibrating the second vertical ground reaction force based on the calibration matrix to obtain the calibrated vertical ground reaction force, includes:
[0111] The difference between the acceleration information, the angular velocity information, the angle information and the predicted vertical ground reaction force time series is calculated to obtain the error matrix;
[0112] The calibration coefficients of the error matrix are iteratively adjusted according to the MSE function to obtain the calibration matrix. The second vertical ground reaction force is automatically calibrated according to the calibration matrix to obtain the calibrated vertical ground reaction force.
[0113] Specifically, the step of iteratively adjusting the calibration coefficients of the error matrix according to the MSE function to obtain a calibration matrix, and automatically calibrating the second vertical ground reaction force according to the calibration matrix to obtain the calibrated vertical ground reaction force, includes:
[0114] The calibration coefficients of the error matrix are iteratively adjusted according to the MSE function to obtain multiple calibration coefficient vectors. The calibration matrix is obtained by synthesizing all the calibration coefficient vectors.
[0115] The Adam optimizer linearly multiplies the acceleration information, angular velocity information, angle information, and calibration matrix to obtain the optimal calibration matrix. The second vertical ground reaction force is then automatically calibrated based on the optimal calibration matrix to obtain the calibrated vertical ground reaction force.
[0116] Specifically, the step of linearly multiplying the acceleration information, angular velocity information, angle information, and calibration matrix using the Adam optimizer to obtain the optimal calibration matrix, and then automatically calibrating the second vertical ground reaction force based on the optimal calibration matrix to obtain the calibrated vertical ground reaction force, includes:
[0117] The Adam optimizer is used to optimize the acceleration information, angular velocity information, angle information, and predicted vertical ground reaction force to obtain the target calibration matrix;
[0118] The acceleration information, angular velocity information, angle information, and dynamic parameters of the target calibration matrix are linearly multiplied to obtain the optimal calibration matrix. The second vertical ground reaction force is automatically calibrated based on the optimal calibration matrix to obtain the calibrated vertical ground reaction force.
[0119] The dynamic parameters include the optimized calibration force, the translation calibration force, and the original insole force.
[0120] The present invention also provides a computer-readable storage medium storing an automatic calibration program based on a resistive insole pressure sensor, wherein the automatic calibration program based on the resistive insole pressure sensor, when executed by a processor, implements the steps of the automatic calibration method based on the resistive insole pressure sensor as described above.
[0121] In summary, this invention provides an automatic calibration method, system, terminal, and storage medium based on a resistive insole pressure sensor. The method includes: acquiring raw motion data collected by an IMU (Inertial Measurement Unit) for a user and a first vertical ground reaction force collected by the resistive insole pressure sensor; preprocessing the raw motion data and the first vertical ground reaction force to obtain target gait cycle data; acquiring a second vertical ground reaction force collected by the resistive insole pressure sensor; training a target two-layer feedforward neural network model based on the target gait cycle data; predicting the second vertical ground reaction force using the trained target two-layer feedforward neural network model to obtain a predicted vertical ground reaction force; calculating the difference between the raw motion data and the predicted vertical ground reaction force to obtain a calibration matrix; and automatically calibrating the second vertical ground reaction force based on the calibration matrix to obtain a calibrated vertical ground reaction force. This invention inputs the raw motion data and the first vertical ground reaction force into the model for prediction, obtains the predicted vertical ground reaction force, and calibrates the vertical ground reaction force, thereby improving measurement accuracy.
[0122] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal system that includes that element.
[0123] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.
[0124] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. An automatic calibration method based on a resistive insole pressure sensor, characterized in that, The automatic calibration method based on a resistive insole pressure sensor includes: The IMU (Inertial Measurement Unit) acquires the raw motion data collected by the user and the first vertical ground reaction force collected by the resistive insole pressure sensor. The raw motion data and the first vertical ground reaction force are preprocessed to obtain the target gait cycle data. The second vertical ground reaction force collected by the resistive insole pressure sensor is obtained, and a target double-layer feedforward neural network model is trained based on the target gait cycle data. The second vertical ground reaction force is predicted by the trained target double-layer feedforward neural network model to obtain the predicted vertical ground reaction force. The difference between the original motion data and the predicted vertical ground reaction force is calculated to obtain a calibration matrix. The second vertical ground reaction force is then automatically calibrated based on the calibration matrix to obtain the calibrated vertical ground reaction force. The raw motion data includes acceleration information, angular velocity information, and angle information; The IMU (Inertial Measurement Unit) acquires the raw motion data collected by the user and the first vertical ground reaction force collected by the insole sensor. It then preprocesses the raw motion data and the first vertical ground reaction force to obtain target gait cycle data, specifically including: The acceleration information, angular velocity information, and angle information collected by the IMU inertial measurement unit for the user, as well as the first vertical ground reaction force collected by the insole sensor for the user's foot, are acquired. The acceleration information, angular velocity information, angle information, and the first vertical ground reaction force are preprocessed using a time synchronization method and a threshold detection method to obtain the support phase parameters. The support phase parameters are divided according to a preset threshold to obtain multiple gait cycles. Interpolation is performed on all the gait cycles to obtain target gait cycle data. The process of acquiring the second vertical ground reaction force collected by the resistive insole pressure sensor, training a target double-layer feedforward neural network model based on the target gait cycle data, and predicting the second vertical ground reaction force using the trained target double-layer feedforward neural network model to obtain the predicted vertical ground reaction force specifically includes: The second vertical ground reaction force collected by the resistive insole pressure sensor on the user's foot is obtained, and the target gait cycle data is divided into a training set and a test set according to a preset ratio. The target two-layer feedforward neural network model is trained according to the preset training hyperparameters and the training set. The target two-layer feedforward neural network model is then tested using the test set. When the test results meet the requirements, the trained target two-layer feedforward neural network model is obtained. The second vertical ground reaction force is predicted by the linear neurons of the target two-layer feedforward neural network model, and the predicted vertical ground reaction force is obtained.
2. The automatic calibration method based on a resistive insole pressure sensor according to claim 1, characterized in that, The preset training hyperparameters include the learning rate parameter, the maximum training value, and the batch size parameter; The process of training the target two-layer feedforward neural network model according to preset training hyperparameters and the training set, and using the test set to perform performance testing on the target two-layer feedforward neural network model, yielding a trained target two-layer feedforward neural network model when the test results meet the requirements, specifically includes: The target two-layer feedforward neural network model is trained according to the learning rate parameter, the maximum training value, the batch size parameter, the first vertical ground reaction force, and the training set to obtain the first two-layer feedforward neural network model. Obtain the MSE function, use the test set to perform performance testing on the first two-layer feedforward neural network model, and when the test results meet the requirements, verify the first two-layer feedforward neural network model according to the MSE function and the test set to obtain the trained target two-layer feedforward neural network model.
3. The automatic calibration method based on a resistive insole pressure sensor according to claim 2, characterized in that, The step of calculating the difference between the original motion data and the predicted vertical ground reaction force to obtain a calibration matrix, and then automatically calibrating the second vertical ground reaction force based on the calibration matrix to obtain the calibrated vertical ground reaction force, specifically includes: The difference between the acceleration information, the angular velocity information, the angle information and the predicted vertical ground reaction force time series is calculated to obtain the error matrix; The calibration coefficients of the error matrix are iteratively adjusted according to the MSE function to obtain the calibration matrix. The second vertical ground reaction force is automatically calibrated according to the calibration matrix to obtain the calibrated vertical ground reaction force.
4. The automatic calibration method based on a resistive insole pressure sensor according to claim 3, characterized in that, The step of iteratively adjusting the calibration coefficients of the error matrix according to the MSE function to obtain a calibration matrix, and then automatically calibrating the second vertical ground reaction force according to the calibration matrix to obtain the calibrated vertical ground reaction force, specifically includes: The calibration coefficients of the error matrix are iteratively adjusted according to the MSE function to obtain multiple calibration coefficient vectors. The calibration matrix is obtained by synthesizing all the calibration coefficient vectors. The Adam optimizer linearly multiplies the acceleration information, angular velocity information, angle information, and calibration matrix to obtain the optimal calibration matrix. The second vertical ground reaction force is then automatically calibrated based on the optimal calibration matrix to obtain the calibrated vertical ground reaction force.
5. The automatic calibration method based on a resistive insole pressure sensor according to claim 4, characterized in that, The process involves linearly multiplying the acceleration information, angular velocity information, angle information, and calibration matrix using the Adam optimizer to obtain an optimal calibration matrix. The second vertical ground reaction force is then automatically calibrated based on this optimal calibration matrix to obtain the calibrated vertical ground reaction force. Specifically, this includes: The Adam optimizer is used to optimize the acceleration information, angular velocity information, angle information, and predicted vertical ground reaction force to obtain the target calibration matrix; The acceleration information, angular velocity information, angle information, and dynamic parameters of the target calibration matrix are linearly multiplied to obtain the optimal calibration matrix. The second vertical ground reaction force is automatically calibrated based on the optimal calibration matrix to obtain the calibrated vertical ground reaction force. The dynamic parameters include the optimized calibration force, the translation calibration force, and the original insole force.
6. An automatic calibration system based on a resistive insole pressure sensor, wherein the automatic calibration system based on the resistive insole pressure sensor is used in the automatic calibration method based on the resistive insole pressure sensor according to any one of claims 1-5, characterized in that, The automatic calibration system based on a resistive insole pressure sensor includes: The data preprocessing module is used to acquire the raw motion data collected by the IMU inertial measurement unit for the user and the first vertical ground reaction force collected by the resistive insole pressure sensor, and to preprocess the raw motion data and the first vertical ground reaction force to obtain the target gait cycle data. The data prediction module is used to acquire the second vertical ground reaction force collected by the resistive insole pressure sensor, train a target double-layer feedforward neural network model based on the target gait cycle data, and predict the second vertical ground reaction force through the trained target double-layer feedforward neural network model to obtain the predicted vertical ground reaction force. The data calibration module is used to calculate the difference between the original motion data and the predicted vertical ground reaction force to obtain a calibration matrix, and to automatically calibrate the second vertical ground reaction force according to the calibration matrix to obtain the calibrated vertical ground reaction force.
7. A terminal, characterized in that, The terminal includes: a memory, a processor, and an automatic calibration method program based on a resistive insole pressure sensor stored in the memory and executable on the processor. When the automatic calibration method based on a resistive insole pressure sensor is executed by the processor, it implements the steps of the automatic calibration method based on a resistive insole pressure sensor as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an automatic calibration method based on a resistive insole pressure sensor, wherein when the automatic calibration method program is executed by a processor, it implements the steps of the automatic calibration method based on a resistive insole pressure sensor as described in any one of claims 1-5.
Citation Information
Patent Citations
Method and Apparatus for Analysis of Gait and to Provide Haptic and Visual Corrective Feedback
US20170225033A1
Smart insoles configuration
WO2024144617A1