Creep compensation method for resistance strain sensor based on real-time data fitting
By introducing a population optimization algorithm and using the Cuckoo Optimization Algorithm and Particle Swarm Optimization Algorithm for parameter optimization and iteration, the problem of finding the inflection point of the creep curve of the resistance strain gauge sensor is solved, and real-time compensation of the creep of the resistance strain gauge sensor is realized, improving the accuracy and efficiency of creep compensation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
- Filing Date
- 2023-12-11
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies struggle to accurately pinpoint the inflection point from the rapid loading or unloading phase to the creep phase in resistance strain gauge sensors, leading to inaccurate creep curve measurements and compensation.
A population optimization algorithm is introduced to avoid inflection point searching by fitting real-time data, thereby achieving real-time compensation for creep of arbitrary loading or unloading amounts. The Cuckoo Optimization Algorithm and Particle Swarm Optimization Algorithm are used for parameter optimization and iterative calculation.
Real-time compensation for creep in resistance strain gauge sensors was achieved, reducing computational complexity and ensuring the accuracy of creep compensation.
Smart Images

Figure CN117704952B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of creep measurement and compensation technology, and in particular to a creep compensation method for a resistance strain gauge sensor based on real-time data fitting. Background Technology
[0002] One of the main factors affecting the accuracy of resistance strain gauge sensors is their creep characteristics. This sensor creep is caused by the combined effects of positive creep generated by the elastomer and negative creep of the strain gauge and strain adhesive. Currently, the creep characteristics of resistance strain gauge sensors are generally compensated for by measuring and calibrating the sensor's creep characteristics in advance.
[0003] However, this method requires accurately finding the inflection point of the resistance strain gauge sensor from the rapid loading or unloading stage to the sensor creep stage in order to accurately measure the creep curve and compensate for the sensor's accuracy. But in reality, it is difficult to find this inflection point accurately. Summary of the Invention
[0004] To address the aforementioned problems, this invention provides a creep compensation method for resistance strain gauge sensors based on real-time data fitting. By introducing a population optimization algorithm, the method avoids the search for inflection points and achieves real-time compensation for creep corresponding to any loading or unloading amount.
[0005] The creep compensation method for a resistance strain gauge sensor based on real-time data fitting provided by this invention specifically includes the following steps:
[0006] The creep compensation method for resistance strain gauge sensors based on real-time data fitting is characterized by the following steps:
[0007] S1. Run the resistance strain gauge sensor for a period of time, and sample the output of the resistance strain gauge sensor at fixed time intervals to obtain the actual output group. And based on equation (1), we obtain the fitting formula (2) for the rapid loading case and the fitting formula (3) for the rapid unloading case:
[0008]
[0009] Where parameters B, A, and K represent optimization parameters, and parameter T represents the creep time. This represents the time parameter corresponding to the output data of the resistance strain gauge sensor. The optimization parameters are time parameters. The difference between the creep time T and the creep time T;
[0010] S2. Initialize the population optimization algorithm, generating multiple sets of parameters B, A, K, and others. And based on the working state of the resistance strain gauge sensor, parameters B, A, K, and φ are... Substituting the same running time and time interval into fitting formula (2) or fitting formula (3), multiple sets of theoretical output groups are obtained. And the theoretical output group The number of groups is the same as the number of groups for the four parameters;
[0011] S3. Calculate the theoretical output for each group. With actual output group The RMSE is used to select the theoretical output group corresponding to the minimum value in the RMSE. The corresponding parameters B, A, K, and [other parameters] As the optimal solution, and save the optimal solution;
[0012] S4. Using the optimal solution as a reference, update parameters B, A, K, and K according to the update principle in the population optimization algorithm. Update and repeat step S3; stop the operation when the number of operations reaches the set number of repetitions, or when the same variance value remains unchanged for a specified number of times;
[0013] S5. The final parameter B is used as the original value of the resistance strain gauge sensor before creep, so as to realize real-time creep compensation of the resistance strain gauge sensor.
[0014] Furthermore, when using the Cuckoo Optimization Algorithm for population optimization, the following calculation process is performed during steps S2-S4 for optimization and iterative calculation:
[0015] A1. Based on the output of the resistance strain gauge sensor in step S1 and equation (1), set the maximum number of iterations N, the population size Q, the search space dimension, and the upper and lower bounds of the search, and generate the initial parameter set. , , as well as ;
[0016] A2. Substitute the initial parameter set into the fitting formula (2) or fitting formula (3) in the manner described in step S2 to obtain multiple sets of theoretical output sets. Calculate the theoretical output for each group separately. With actual output group The minimum RMSE is selected, and the theoretical output group corresponding to the minimum RMSE is set as the optimal output group. ;
[0017] A3. Optimal output group Corresponding optimal parameters , , as well as For reference, the parameter set for the i-th iteration is based on the Lévy flight mechanism in the Cuckoo optimization algorithm. , , as well as Update ;
[0018] A4, from the current parameter set , , as well as The current theoretical output group is obtained below. Recalculate the actual output group With each group of current theoretical output groups The RMSE is used to select and update the theoretical output group. The optimal output group Corresponding optimal parameters , , as well as ;
[0019] A5. If the maximum number of iterations N is reached or the specified search precision is met, output the globally optimal parameters. , , as well as Otherwise, repeat steps A3 to A4.
[0020] Furthermore, when using the particle swarm optimization algorithm, the following calculation process is performed for optimization and iterative calculation during steps S2 to S4:
[0021] B1. Set the maximum number of iterations N, the initial update rate set, and the initial parameter set. , , as well as ;
[0022] B2. Substitute the initial parameter set into the fitting formula (2) or fitting formula (3) and generate multiple sets of theoretical output sets. Calculate the theoretical output for each group separately. With actual output group The minimum RMSE is selected, and the theoretical output group corresponding to the minimum RMSE is set as the optimal output group. Each theoretical output group is set as the optimal output for that group;
[0023] B3. Optimal output group Corresponding optimal parameters , , as well as The optimal parameters corresponding to the optimal output of this group , , as well as Based on this, the parameter set is updated using the particle swarm optimization algorithm. , , , And update speed group;
[0024] B4, from the current parameter set , , as well as The current theoretical output group is obtained below. Recalculate the actual output group With each group of current theoretical output groups The RMSE is used to select and update the theoretical output group. Optimal output value Corresponding optimal parameters , , as well as Compare the theoretical output groups for each group. The corresponding RMSE is compared with the RMSE corresponding to the best output of this group. The theoretical output group with the smaller RMSE is selected to update the best output of this group.
[0025] B5. If the maximum number of iterations N is reached or the specified search precision is met, output the globally optimal parameters. , , as well as Otherwise, repeat steps B3 to B4.
[0026] Compared with the prior art, the present invention can achieve the following beneficial effects:
[0027] This invention provides a novel sensor creep compensation method. By avoiding the inflection point that is difficult to find in existing methods, it introduces a population optimization algorithm to transform the traditional problem of pre-calibrating the creep characteristic curve of a resistance strain gauge sensor into a problem of optimizing parameters. This ensures the creep compensation effect while reducing computational difficulty and enabling real-time compensation for creep corresponding to any loading or unloading amount. Attached Figure Description
[0028] Figure 1 This is a flowchart of a creep compensation method for a resistance strain gauge sensor based on real-time data fitting, provided according to an embodiment of the present invention.
[0029] Figure 2This is a flowchart of the cuckoo optimization algorithm provided in an embodiment of the present invention;
[0030] Figure 3 This is a flowchart of the particle swarm algorithm provided according to an embodiment of the present invention. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof.
[0032] The creep compensation method for resistance strain gauge sensors based on real-time data fitting provided in this invention introduces a population optimization algorithm to optimize the required parameters and iterate multiple times to obtain the optimal parameters, thereby avoiding the search for inflection points and realizing real-time compensation for creep corresponding to any loading or unloading amount.
[0033] Figure 1 The flowchart of a creep compensation method for a resistance strain gauge sensor based on real-time data fitting, according to an embodiment of the present invention, is shown.
[0034] like Figure 1 As shown, the creep compensation method for a resistance strain gauge sensor based on real-time data fitting provided in this embodiment of the invention specifically includes the following steps:
[0035] S1. Run the resistance strain gauge sensor for a period of time, and sample the output of the resistance strain gauge sensor at fixed time intervals to obtain the actual output group. And based on equation (1), we obtain the fitting formula (2) for the rapid loading case and the fitting formula (3) for the rapid unloading case:
[0036]
[0037] Where parameters B, A, and K represent optimization parameters, and parameter T represents the creep time. This represents the time parameter corresponding to the output data of the resistance strain gauge sensor. The optimization parameters are time parameters. The difference between the creep time T and the creep time T;
[0038] S2. Initialize the population optimization algorithm, generating multiple sets of parameters B, A, K, and others. And based on the working state of the resistance strain gauge sensor, parameters B, A, K, and φ are... Substituting the same running time and time interval into fitting formula (2) or fitting formula (3), multiple sets of theoretical output groups are obtained. And the theoretical output group The number of groups is the same as the number of groups for the four parameters;
[0039] S3. Calculate the theoretical output for each group. With actual output group The RMSE is used to select the theoretical output group corresponding to the minimum value in the RMSE. The corresponding parameters B, A, K, and [other parameters] As the optimal solution, and save the optimal solution;
[0040] S4. Using the optimal solution as a reference, update parameters B, A, K, and K according to the update principle in the population optimization algorithm. Update and repeat step S3; stop the operation when the number of operations reaches the set number of repetitions, or when the same variance value remains unchanged for a specified number of times;
[0041] S5. The final parameter B is used as the original value of the resistance strain gauge sensor before creep, so as to realize real-time creep compensation of the resistance strain gauge sensor.
[0042] Figure 2 The flowchart of the cuckoo optimization algorithm provided according to an embodiment of the present invention is shown.
[0043] like Figure 2 As shown, when the Cuckoo Optimization Algorithm is selected as the population optimization algorithm in this invention, the following calculation process is performed for optimization and iterative calculation during steps S2 to S4:
[0044] A1. Based on the output of the resistance strain gauge sensor in step S1 and equation (1), initialize the Cuckoo algorithm, set the maximum number of iterations N, the population size Q, the search space dimension, and the upper and lower bounds of the search, and generate the initial parameter set:
[0045] [ , ,…, ];
[0046] A2, and based on the working state of the resistance strain gauge sensor, the initial parameter set Substitute into the fitting formula (2) or fitting formula (3):
[0047]
[0048] Generate multiple sets of theoretical output groups Calculate the actual output group With each set of theoretical output groups The RMSE is used to set the theoretical output value corresponding to the minimum RMSE as the optimal output group. .
[0049] A3. Optimal output group Corresponding optimal parameters , , as well as For reference, based on the Lévy flight mechanism in the cuckoo optimization algorithm, the parameter set is optimized using equations (5) to (8). , , as well as Update to obtain a new parameter set:
[0050]
[0051] in, , , , as well as Let each represent the parameter set at the i-th iteration; , , as well as Let represent the optimal parameters at the i-th iteration; This represents the step size control factor; in this specific embodiment, α = 0.01. This represents point-to-point multiplication; This is the Levi's flight formula.
[0052] As shown in equations (5) to (8), the new parameters are obtained, and according to equations (2) to (3), the current theoretical output group is... The theoretical output group that better meets the conditions will be... And the corresponding parameters are updated to the optimal output set. and optimal parameters , , as well as .
[0053] The Levi flight formula is as follows:
[0054]
[0055] in, , , The standard deviation of the normal distribution According to equation (10), we can obtain:
[0056]
[0057] Generate a random number r and compare it with a given probability pa = 0.25:
[0058] If r > pa, then the parameters are updated randomly using equations (11) to (14); otherwise, the parameters remain unchanged.
[0059]
[0060] in, Indicates the compression factor. ~U[0,1]; and , and , and ,as well as and This represents two random parameters in each group during the i-th iteration.
[0061] A4. Recalculate the current parameter set , , as well as Each set of theoretical output groups With actual output group The RMSE is used to select and update the theoretical output group. The optimal output group Corresponding optimal parameters , , as well as .
[0062] A5. If the number of iterations reaches the maximum number of iterations N or the specified search precision is met, output the globally optimal parameters; otherwise, repeat steps A3 to A4.
[0063] Figure 3 The flowchart of the particle swarm algorithm provided according to an embodiment of the present invention is shown.
[0064] like Figure 3 As shown, when the particle swarm optimization algorithm is selected as the population optimization algorithm in this invention, the following calculation process is performed for optimization and iterative calculation during steps S2 to S4:
[0065] B1. Set the maximum number of iterations N and initial parameters:
[0066]
[0067] [ , ,…, ];
[0068] And the initial update speed group:
[0069] , ,…, .
[0070] B2. Substituting the initial parameter set into fitting formula (2) or fitting formula (3), we get:
[0071]
[0072] Generate theoretical output set Calculate the actual output group With each set of theoretical output groups The RMSE is used to set the theoretical output value corresponding to the minimum RMSE as the optimal output group. Each set of theoretical output groups Set as the optimal output for this group.
[0073] B3. Optimal output group Corresponding optimal parameters , , as well as The best output for this group The corresponding optimal parameters for this group , , as well as Based on this, the parameter set is updated using the particle swarm optimization algorithm. , , as well as As shown in the following formula:
[0074]
[0075] in, , , , as well as Let each represent the parameter set at the i-th iteration; This represents the constraint factor that controls the effect of speed.
[0076] Regarding update speed , , as well as Update using the following formula:
[0077]
[0078] in, The acceleration constant represents the factors influencing individual behavior by both group memory and individual memory. The inertia factor represents the algorithm's ability to maintain its search direction during the search process. This represents a randomly generated number within the range [0~1].
[0079] B4. Recalculate the current parameter set , , as well as Each set of theoretical output groups With actual output group The RMSE is used to select and update the theoretical output group. The optimal output group Corresponding optimal parameters , , as well as And compare the theoretical output groups for each group. The corresponding RMSE and the best output of this group For the corresponding RMSE, select the theoretical output group with the smaller RMSE and update it as the optimal output for this group. .
[0080] B5. If the maximum number of iterations N is reached or the specified search precision is met, output the globally optimal parameters. , , as well as Otherwise, repeat steps B3 to B4.
[0081] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.
[0082] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A creep compensation method for a resistance strain gauge sensor based on real-time data fitting, characterized in that, Specifically, the following steps are included: S1. Run the resistance strain gauge sensor for a period of time, and sample the output of the resistance strain gauge sensor at fixed time intervals to obtain the actual output group. And based on equation (1), we obtain the fitting formula (2) for the rapid loading case and the fitting formula (3) for the rapid unloading case: Where parameters B, A, and K represent optimization parameters, and parameter T represents the creep time. This represents the time parameter corresponding to the output data of the resistance strain gauge sensor. The optimization parameters are the time parameters. The difference between the creep time T and the creep time T; S2. Initialize the population optimization algorithm to generate multiple sets of parameters B, A, K, and [other parameters]. And based on the operating state of the resistance strain gauge sensor, the parameters B, A, K, and D are set as follows: Substituting the same running time and time interval into the fitting formula (2) or the fitting formula (3), multiple sets of theoretical output groups are obtained. And the theoretical output group The number of groups is the same as the number of groups for the four parameters; S3. Calculate the theoretical output for each group. With the actual output group The RMSE is used to select the theoretical output group corresponding to the minimum value among the RMSE values. The corresponding parameters B, A, K, and [other parameters] This is considered the optimal solution, and the optimal solution is saved. S4. Using the optimal solution as a reference, update the parameters B, A, K, and K according to the update principle in the population optimization algorithm. Update the operation and repeat step S3; stop the operation when the number of operations reaches the set number of repetitions, or when the same variance value remains unchanged for a specified number of times. S5. The final parameter B is used as the original value of the resistance strain gauge sensor before creep, thereby realizing real-time creep compensation of the resistance strain gauge sensor.
2. The creep compensation method for a resistance strain gauge sensor based on real-time data fitting according to claim 1, characterized in that, When using the population optimization algorithm described in the Cuckoo Optimization Algorithm, the following calculation process is performed for optimization and iterative calculation during steps S2 to S4: A1. Based on the output of the resistance strain gauge sensor in step S1 and equation (1), set the maximum number of iterations N, the population size Q, the search space dimension, and the upper and lower bounds of the search, and generate an initial parameter set. , , as well as ; A2. Substitute the initial parameter set into the fitting formula (2) or the fitting formula (3) in the manner described in step S2 to obtain multiple sets of theoretical output sets. Calculate the theoretical output for each group separately. With the actual output group The minimum RMSE is selected, and the theoretical output group corresponding to the minimum RMSE is set as the optimal output group. ; A3, with the aforementioned optimal output group Corresponding optimal parameters , , as well as For reference, the parameter set for the i-th iteration is based on the Lévy flight mechanism in the aforementioned cuckoo optimization algorithm. , , as well as Update ; A4, from the current parameter set , , as well as The current theoretical output group is obtained below. Recalculate the actual output group With each group of current theoretical output groups The RMSE is used to select and update the theoretical output group. The optimal output group Corresponding optimal parameters , , as well as ; A5. If the maximum number of iterations N is reached or the specified search precision is met, output the globally optimal parameters. , , as well as Otherwise, repeat steps A3 to A4.
3. The creep compensation method for a resistance strain gauge sensor based on real-time data fitting according to claim 1, characterized in that, When using the population optimization algorithm described in the particle swarm optimization algorithm, during the execution of steps S2 to S4, the following calculation process is performed for optimization and iterative calculation: B1. Set the maximum number of iterations N, the initial update rate set, and the initial parameter set. , , as well as ; B2. Substitute the initial parameter set into the fitting formula (2) or the fitting formula (3) to generate multiple sets of theoretical output sets. Calculate the theoretical output for each group separately. With the actual output group The minimum RMSE is selected, and the theoretical output group corresponding to the minimum RMSE is set as the optimal output group. Each theoretical output group is set as the optimal output for that group; B3, using the aforementioned optimal output group Corresponding optimal parameters , , as well as The optimal parameters corresponding to the optimal output of this group , , as well as Based on this, the parameter set is updated using the particle swarm optimization algorithm. , , , And update speed group; B4, from the current parameter set , , as well as The current theoretical output group is obtained below. Recalculate the actual output group With each group of current theoretical output groups The RMSE is used to select and update the theoretical output group. Optimal output value Corresponding optimal parameters , , as well as Compare the theoretical output groups for each group. The corresponding RMSE is compared with the RMSE corresponding to the best output of this group. The theoretical output group with the smaller RMSE is selected to update the best output of this group. B5. If the maximum number of iterations N is reached or the specified search precision is met, output the globally optimal parameters. , , as well as Otherwise, repeat steps B3 to B4.