Differential inductance type displacement sensor temperature compensation method
By fusion of sparrow algorithm and sand cat group algorithm to optimize the BP neural network, the temperature drift effect caused by the inductive displacement sensor is solved, high-precision temperature compensation is achieved, and measurement accuracy and system performance are improved.
Patent Information
- Application Number
- CN202510224700.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-23
AI Technical Summary
The measurement accuracy of inductive displacement sensors is easily affected by ambient temperature changes, resulting in temperature drifting effects and affecting system performance, especially in high-precision measurement scenarios.
The temperature compensation method of BP neural network is used based on the fusion sparrow algorithm and the sand cat group algorithm to optimize the BP neural network weight and threshold, and the convergence speed and compensation accuracy of the model are improved.
The compensation performance of BP neural network is significantly improved, and the training efficiency and local optimization problems caused by poor parameter initialization of traditional BP neural networks are solved, thus achieving high-precision temperature compensation for inductive displacement sensors.
Smart Images

Figure CN120027835A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of temperature compensation for displacement sensors, and is specifically applied to a method for temperature compensation for temperature drift of a differential inductive displacement sensor. Background Art
[0002] Inductive displacement sensor is a common precision measuring device, widely used in industrial automation, aerospace and precision machining. Its working principle is based on electromagnetic induction, and it accurately measures displacement by detecting changes in induced voltage or inductance value. However, the measurement accuracy of inductive displacement sensor is easily affected by changes in ambient temperature. Temperature changes will cause the drift of coil resistance and inductance parameters inside the sensor, thus causing measurement errors. Especially in high-precision measurement scenarios, this temperature drift effect has a significant impact on system performance. Therefore, when the sensor is actually used, effective temperature compensation must be performed to improve the measurement accuracy and environmental adaptability of the sensor.
[0003] Traditional temperature compensation methods are difficult to accurately establish the nonlinear relationship between temperature and sensor output error. Therefore, BP neural network, as a powerful nonlinear modeling tool, can effectively learn complex temperature compensation relationships. However, its random initialization parameters are prone to fall into local optimality, affecting the compensation accuracy. By integrating the sparrow algorithm and the sand cat swarm algorithm, the global search capability of SSA and the local optimization advantages of SCSO can be fully combined to optimize the initial parameters of the BP neural network, thereby improving the convergence speed and compensation accuracy of the model, and realizing high-precision temperature compensation for inductive displacement sensors. Summary of the invention
[0004] The purpose of the present invention is to address the problem of temperature drift of differential inductive displacement sensors, and propose a temperature compensation method for inductive displacement sensors based on the optimization of BP neural network by fusing sparrow algorithm and sand cat swarm algorithm to perform temperature compensation. The weights and thresholds of the BP neural network are optimized and searched based on the fusion of SSA-SCSO to seek a better solution. The optimized weights and thresholds are used to train the BP network, and it is deployed in the sensor system to achieve real-time temperature compensation. The invention can significantly improve the compensation performance of the BP neural network, and solve the problems of low training efficiency and local optimality of the traditional BP neural network due to poor parameter initialization.
[0005] The object of the present invention is achieved through the following technical solution: A temperature compensation method for a differential inductive displacement sensor comprises the following steps:
[0006] S1, collecting the output voltage of the differential inductive displacement sensor and the output voltage of the temperature sensor to conduct a two-dimensional calibration experiment, forming a data set of the input layer and the output layer, and determining the BP neural network structure;
[0007] The differential inductive displacement sensor is a sensor based on the principle of electromagnetic induction. Its core idea is to measure the displacement by detecting the change of the iron core position, which leads to the difference in inductance or induced voltage between the coils. The present invention is aimed at the currently widely used double-coil spiral self-inductance sensor, which is composed of two coils with exactly the same electrical parameters and structural size, and the iron core is inserted into the center of the wire frame.
[0008] According to the principle of electromagnetic induction, the magnetic field of the coil is divided into two parts: the excitation magnetic field generated by the excitation current and the magnetic field generated by the magnetized iron core. When the iron core moves in the direction of the central axis of the coil, the magnetic flux inside the coil will change accordingly, forming an excitation electromagnetic field, thereby changing the operating state of the center of the coil. Assuming that the iron core advances Δl, the change in inductance is shown in formula (1):
[0009]
[0010] Among them, r c is the core radius, μ m is the magnetic permeability of the core, and l is the half length of the core.
[0011] According to formula (1), the change in inductance is linearly related to the displacement distance of the core. In order to more clearly present the relationship between the two, a tightly coupled inductor AC bridge is generally used to convert the change in inductance into a bridge voltage, and the displacement is linearly reflected by the change in voltage.
[0012] BP neural network is a kind of artificial neural network with forward feedback, which is a supervised learning model and can solve classification and regression prediction problems. BP neural network consists of input layer, hidden layer and output layer. The neurons in each layer are only sensitive to the input of the neurons in the previous layer, and the output of each layer of neurons only affects the output of the neurons in the next layer.
[0013] The present invention also uses a temperature sensor to output different voltages U according to temperature changes. t The temperature compensation model of the differential inductive displacement sensor based on the BP neural network adopts the input voltage U s And the temperature sensor output voltage U t As the input layer, the final displacement value is used as the output layer, and the input at different temperatures is collected, so that the displacement value after compensation is output after training. The number of hidden nodes will affect the prediction accuracy of the BP network. The selection of the number of hidden nodes M can be based on the empirical formula:
[0014]
[0015] Where n is the number of input layer nodes, p is the number of output layer nodes, and α is an integer from 1 to 10. Higher accuracy can be achieved by selecting an appropriate number of hidden nodes.
[0016] S2, initialize the population individuals, set the maximum number of iterations, and seek the best BP network weights and thresholds based on the fusion sparrow algorithm (SSA) and sand cat swarm algorithm (SCSO);
[0017] The Sand Cat Swarm Algorithm was proposed by Amir et al. It is a meta-heuristic algorithm that simulates the search and hunting behavior of sand cats. The algorithm simulates the foraging behavior of sand cats in the natural environment and solves complex optimization problems through population collaboration. The original Sand Cat Swarm Optimization Algorithm process is as follows:
[0018] (1) Initializing the population: In the SCSO algorithm, the location information of the sand cat population represents the candidate solution to the problem. The number of sand cats is set to m, and each sand cat is a 1×k array, that is, X = (x 1 ,x 2 ,…,x k ), where each variable value is a floating point number and must be between the lower and upper boundaries. When optimizing the BP neural network, the location information of the sand cats at this time represents the weight and threshold of the BP network. And MSE is set as the fitness function of the sand cat swarm optimization algorithm:
[0019]
[0020] Among them, y j is the true output value of the jth sample, The BP neural network is based on the current sand cat position X i The predicted output value is calculated, and N is the total number of samples. When one iteration ends, the optimal position of each group of sand cats is selected according to the optimal fitness value, and other sand cat individuals move to this position.
[0021] (2) Calculate the conversion factor R
[0022] After initializing the population, the sand cat group begins to search or attack prey, and the parameter that controls the switch between the search and attack phases is the conversion coefficient R, which is calculated as follows:
[0023] R=2r G rand(0,1)-r G (4)
[0024] Among them, r G is the sensitivity coefficient of the sand cat colony; rand(0,1) represents a random number between 0 and 1. G The calculation formula is:
[0025]
[0026] Among them, z is the current iteration number, Z is the maximum number of iterations set; S M is the hearing coefficient of the sand cat group, which is generally set to 2.
[0027] (3) Searching for prey
[0028] The conversion coefficient R calculated by (2) is used to determine the search for prey and the attack on prey. When |R|>1, the sand cat enters the search for prey stage. At this time, the i-th sand cat in the sand cat group can update its own position according to formula (6) to find other possible best prey positions:
[0029] P b (z+1)=r i [P ca (z)-rand(0,1)P c (z)] (6)
[0030] Among them, P ca is the best candidate position, P c is the current position of the sand cat, z represents the number of iterations, P b Represents the position of the next iteration, r i is the sensitivity coefficient of the i-th sand cat, and the formula is:
[0031] r i =r G rand(0,1) (7)
[0032] (4) Attacking prey
[0033] When |R|≤1, the sand cat enters the attack phase. At this time, the i-th sand cat will generate a random position according to formula (8):
[0034] P ra =|P ca (z)·rand(0,1)-P c | (8)
[0035] Assuming that the sensitive range of the sand cat is a circle, each sand cat can randomly select an angle θ through the roulette selection algorithm, so the sand cat can update its position according to formula (9) to attack the prey:
[0036] P(z+1)=P ca (z)-r i P ra ·cosθ (9)
[0037] The Sand Cat Swarm Algorithm shows good ability in local optimization, but due to the lack of a clear global guidance mechanism, the convergence speed is slow when the problem scale is large or the search space is complex. The fast global search mechanism of the Sparrow Algorithm combined with the fine local optimization strategy of the Sand Cat Swarm Algorithm enables the fusion algorithm to find a good balance between global search and local attack, thereby improving the convergence speed.
[0038] When the sparrow algorithm is added, the position of the sand cat is updated as shown in formula (10):
[0039]
[0040] Wherein, Q represents a random number that obeys a normal distribution; L represents a 1×k identity matrix.
[0041] S3. Use the initial parameters optimized by fusion SSA-SCSO to train the BP neural network, apply the back propagation algorithm to update the weights, gradually approach the optimal solution, and further reduce the training error.
[0042] In each iteration process, the fitness value of each individual is compared with the fitness value of the current optimal position, and the position of the sand cat group is updated according to the conversion coefficient R and the sand cat group algorithm after integrating the sparrow algorithm, and the optimal solution is retained; when the number of iterations reaches the preset maximum number of iterations, the optimized weights and thresholds are transmitted to the BP neural network.
[0043] The BP neural network uses the error back propagation algorithm to adjust the weights and thresholds according to the error between the target value and the predicted value, so that the prediction error is gradually reduced. The specific formula is:
[0044]
[0045] Among them, w is the weight, b is the threshold, η is the learning rate, and E is the error.
[0046] When the maximum number of training rounds is reached, the training ends and the BP neural network parameters are saved, thereby using this set of optimal parameters to achieve temperature compensation for the inductive displacement sensor.
[0047] The beneficial effects of the present invention are as follows: the present invention first collects the output voltage of the differential inductive sensor, the output voltage of the temperature sensor and the actual displacement value to construct a BP neural network structure, and optimizes the parameters of the BP neural network according to the fused sparrow algorithm and the sand cat swarm algorithm to obtain better weights and thresholds; the method can significantly improve the compensation performance of the BP neural network, solves the problems of low training efficiency and local optimality of the traditional BP neural network due to poor parameter initialization, and can more accurately realize the temperature compensation of the inductive displacement sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a flow chart of a temperature compensation method of a differential inductive displacement sensor based on optimizing a BP neural network by integrating a sparrow algorithm and a sand cat swarm algorithm according to the present invention; DETAILED DESCRIPTION
[0049] In the actual temperature compensation process, the output voltage of the differential inductive sensor, the output voltage of the temperature sensor and the actual displacement value are collected as the data set of the BP neural network, and the weight and threshold of the BP network are optimized by integrating the sparrow algorithm and the sand cat swarm algorithm to obtain the optimal solution. Figure 1 The technical solution of the present invention is described.
[0050] like Figure 1 As shown, a temperature compensation method for a differential inductive displacement sensor of the present invention comprises the following steps:
[0051] S1, collecting the output voltage of the differential inductive displacement sensor and the output voltage of the temperature sensor to conduct a two-dimensional calibration experiment, forming a data set of the input layer and the output layer, and determining the BP neural network structure;
[0052] The differential inductive displacement sensor is a sensor based on the principle of electromagnetic induction. Its core idea is to measure the displacement by detecting the change of the iron core position, which leads to the difference in inductance or induced voltage between the coils. The present invention is aimed at the currently widely used double-coil spiral self-inductance sensor, which is composed of two coils with exactly the same electrical parameters and structural size, and the iron core is inserted into the center of the wire frame.
[0053] According to the principle of electromagnetic induction, the magnetic field of the coil is divided into two parts: the excitation magnetic field generated by the excitation current and the magnetic field generated by the magnetized iron core. When the iron core moves in the direction of the central axis of the coil, the magnetic flux inside the coil will change accordingly, forming an excitation electromagnetic field, thereby changing the operating state of the center of the coil. Assuming that the iron core advances Δl, the change in inductance is shown in formula (1):
[0054]
[0055] Among them, r c is the core radius, μ m is the magnetic permeability of the core, and l is the half length of the core.
[0056] According to formula (1), the change in inductance is linearly related to the displacement distance of the core. In order to more clearly present the relationship between the two, a tightly coupled inductor AC bridge is generally used to convert the change in inductance into a bridge voltage, and the displacement is linearly reflected by the change in voltage.
[0057] BP neural network is a kind of artificial neural network with forward feedback, which is a supervised learning model and can solve classification and regression prediction problems. BP neural network consists of input layer, hidden layer and output layer. The neurons in each layer are only sensitive to the input of the neurons in the previous layer, and the output of each layer of neurons only affects the output of the neurons in the next layer.
[0058] The present invention also uses a temperature sensor to output different voltages U according to temperature changes. t The temperature compensation model of the differential inductive displacement sensor based on the BP neural network adopts the input voltage U s And the temperature sensor output voltage U t As the input layer, the final displacement value is used as the output layer, and the input at different temperatures is collected, so that the displacement value after compensation is output after training. The number of hidden nodes will affect the prediction accuracy of the BP network. The selection of the number of hidden nodes M can be based on the empirical formula:
[0059]
[0060] Where n is the number of input layer nodes, p is the number of output layer nodes, and α is an integer from 1 to 10. Higher accuracy can be achieved by selecting an appropriate number of hidden nodes.
[0061] S2, initialize the population individuals, set the maximum number of iterations, and seek the best BP network weights and thresholds based on the fusion sparrow algorithm (SSA) and sand cat swarm algorithm (SCSO);
[0062] The Sand Cat Swarm Algorithm was proposed by Amir et al. It is a meta-heuristic algorithm that simulates the search and hunting behavior of sand cats. The algorithm simulates the foraging behavior of sand cats in the natural environment and solves complex optimization problems through population collaboration. The original Sand Cat Swarm Optimization Algorithm process is as follows:
[0063] (1) Initializing the population: In the SCSO algorithm, the location information of the sand cat population represents the candidate solution to the problem. The number of sand cats is set to m, and each sand cat is a 1×k array, that is, X = (x 1 ,x 2 ,…,x k ), where each variable value is a floating point number and must be between the lower and upper boundaries. When optimizing the BP neural network, the location information of the sand cats at this time represents the weight and threshold of the BP network. And MSE is set as the fitness function of the sand cat swarm optimization algorithm:
[0064]
[0065] Among them, y j is the true output value of the jth sample, The BP neural network is based on the current sand cat position X i The predicted output value is calculated, and N is the total number of samples. When one iteration ends, the optimal position of each group of sand cats is selected according to the optimal fitness value, and other sand cat individuals move to this position.
[0066] (2) Calculate the conversion factor R
[0067] After initializing the population, the sand cat group begins to search or attack prey, and the parameter that controls the switch between the search and attack phases is the conversion coefficient R, which is calculated as follows:
[0068] R=2r G rand(0,1)-r G (4)
[0069] Among them, r G is the sensitivity coefficient of the sand cat colony; rand(0,1) represents a random number between 0 and 1. G The calculation formula is:
[0070]
[0071] Among them, z is the current iteration number, Z is the maximum number of iterations set; S M is the hearing coefficient of the sand cat group, which is generally set to 2.
[0072] (3) Searching for prey
[0073] The conversion coefficient R calculated by (2) is used to determine the search for prey and the attack on prey. When |R|>1, the sand cat enters the search for prey stage. At this time, the i-th sand cat in the sand cat group can update its own position according to formula (6) to find other possible best prey positions:
[0074] P b (z+1)=r i [P ca (z)-rand(0,1)P c (z)] (6)
[0075] Among them, P ca is the best candidate position, P c is the current position of the sand cat, z represents the number of iterations, P b Represents the position of the next iteration, r i is the sensitivity coefficient of the i-th sand cat, and the formula is:
[0076] r i =r G rand(0,1) (7)
[0077] (4) Attacking prey
[0078] When |R|≤1, the sand cat enters the attack phase. At this time, the i-th sand cat will generate a random position according to formula (8):
[0079] P ra =|P ca (z)·rand(0,1)-P c | (8)
[0080] Assuming that the sensitive range of the sand cat is a circle, each sand cat can randomly select an angle θ through the roulette selection algorithm, so the sand cat can update its position according to formula (9) to attack the prey:
[0081] P(z+1)=P ca (z)-r i P ra ·cosθ (9)
[0082] The Sand Cat Swarm Algorithm shows good ability in local optimization, but due to the lack of a clear global guidance mechanism, the convergence speed is slow when the problem scale is large or the search space is complex. The fast global search mechanism of the Sparrow Algorithm combined with the fine local optimization strategy of the Sand Cat Swarm Algorithm enables the fusion algorithm to find a good balance between global search and local attack, thereby improving the convergence speed.
[0083] When the sparrow algorithm is added, the position of the sand cat is updated as shown in formula (10):
[0084]
[0085] Wherein, Q represents a random number that obeys a normal distribution; L represents a 1×k identity matrix.
[0086] S3. Use the initial parameters optimized by fusion SSA-SCSO to train the BP neural network, apply the back propagation algorithm to update the weights, gradually approach the optimal solution, and further reduce the training error.
[0087] In each iteration process, the fitness value of each individual is compared with the fitness value of the current optimal position, and the position of the sand cat group is updated according to the conversion coefficient R and the sand cat group algorithm after integrating the sparrow algorithm, and the optimal solution is retained; when the number of iterations reaches the preset maximum number of iterations, the optimized weights and thresholds are transmitted to the BP neural network.
[0088] The BP neural network uses the error back propagation algorithm to adjust the weights and thresholds according to the error between the target value and the predicted value, so that the prediction error is gradually reduced. The specific formula is:
[0089]
[0090] Among them, w is the weight, b is the threshold, η is the learning rate, and E is the error.
[0091] When the maximum number of training rounds is reached, the training ends and the BP neural network parameters are saved, thereby using this set of optimal parameters to achieve temperature compensation for the inductive displacement sensor.
[0092] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A temperature compensation method for a differential inductive displacement sensor, comprising the following steps: S1, collecting the output voltage of the differential inductive displacement sensor and the output voltage of the temperature sensor to conduct a two-dimensional calibration experiment, forming a data set of the input layer and the output layer, and determining the BP neural network structure; The differential inductive displacement sensor is a sensor based on the principle of electromagnetic induction. Its core idea is to measure the displacement by detecting the change of the iron core position, which leads to the difference in inductance or induced voltage between the coils. The present invention is aimed at the currently widely used double-coil spiral self-inductance sensor, which is composed of two coils with exactly the same electrical parameters and structural size, and the iron core is inserted into the center of the wire frame. According to the principle of electromagnetic induction, the magnetic field of the coil is divided into two parts: the excitation magnetic field generated by the excitation current and the magnetic field generated by the magnetized iron core. When the iron core moves in the direction of the central axis of the coil, the magnetic flux inside the coil will change accordingly, forming an excitation electromagnetic field, thereby changing the operating state of the center of the coil. Assuming that the iron core advances Δl, the change in inductance is shown in formula (1): in, r c is the core radius, μ m is the magnetic permeability of the core, and l is the half length of the core. According to formula (1), the change in inductance is linearly related to the displacement distance of the core. In order to more clearly present the relationship between the two, a tightly coupled inductor AC bridge is generally used to convert the change in inductance into a bridge voltage, and the displacement is linearly reflected by the change in voltage. BP neural network is a kind of artificial neural network with forward feedback, which is a supervised learning model and can solve classification and regression prediction problems. BP neural network consists of input layer, hidden layer and output layer. The neurons in each layer are only sensitive to the input of the neurons in the previous layer, and the output of each layer of neurons only affects the output of the neurons in the next layer. The present invention also uses a temperature sensor to output different voltages U according to temperature changes. t The temperature compensation model of the differential inductive displacement sensor based on the BP neural network adopts the input voltage U s And the temperature sensor output voltage U t As the input layer, the final displacement value is used as the output layer, and the input at different temperatures is collected, so that the displacement value after compensation is output after training. The number of hidden nodes will affect the prediction accuracy of the BP network. The selection of the number of hidden nodes M can be based on the empirical formula: in, n is the number of input layer nodes, p is the number of output layer nodes, and α is an integer from 1 to 10. Higher accuracy can be obtained by selecting an appropriate number of hidden nodes. S2, initialize the population individuals, set the maximum number of iterations, and seek the best BP network weights and thresholds based on the fusion sparrow algorithm (SSA) and sand cat swarm algorithm (SCSO); The Sand Cat Swarm Algorithm was proposed by Amir et al. It is a meta-heuristic algorithm that simulates the search and hunting behavior of sand cats. The algorithm simulates the foraging behavior of sand cats in the natural environment and solves complex optimization problems through population collaboration. The original Sand Cat Swarm Optimization Algorithm process is as follows: (1) Initializing the population: In the SCSO algorithm, the location information of the sand cat population represents the candidate solution to the problem. The number of sand cats is set to m, and each sand cat is a 1×k array, that is, X = (x1, x2, …, x k ), where each variable value is a floating point number and must be between the lower and upper boundaries. When optimizing the BP neural network, the location information of the sand cats at this time represents the weight and threshold of the BP network. And MSE is set as the fitness function of the sand cat swarm optimization algorithm: Among them, y j is the true output value of the jth sample, The BP neural network is based on the current sand cat position X i The predicted output value is calculated, and N is the total number of samples. When one iteration ends, the optimal position of each group of sand cats is selected according to the optimal fitness value, and other sand cat individuals move to this position. (2) Calculate the conversion factor R After initializing the population, the sand cat group begins to search or attack prey, and the parameter that controls the switch between the search and attack phases is the conversion coefficient R, which is calculated as follows: R=2r G ·rand(0,1)-r G (4) Among them, r G is the sensitivity coefficient of the sand cat colony; rand(0,1) represents a random number between 0 and 1. G The calculation formula is: Among them, z is the current iteration number, Z is the maximum number of iterations set; S M is the hearing coefficient of the sand cat group, which is generally set to 2. (3) Searching for prey The conversion coefficient R calculated by (2) is used to determine the search for prey and the attack on prey. When |R|>1, the sand cat enters the search for prey stage. At this time, the i-th sand cat in the sand cat group can update its own position according to formula (6) to find other possible best prey positions: P b (z+1)=r i [P ca (z)-rand(0,1)P c (z)] (6) Among them, P ca is the best candidate position, P c is the current position of the sand cat, z represents the number of iterations, P b Represents the position of the next iteration, r i is the sensitivity coefficient of the i-th sand cat, and the formula is: r i =r G ·rand(0,1) (7) (4) Attacking prey When |R|≤1, the sand cat enters the attack phase. At this time, the i-th sand cat will generate a random position according to formula (8): P ra =|P ca (z)·rand(0,1)-P c | (8) Assuming that the sensitive range of the sand cat is a circle, each sand cat can randomly select an angle θ through the roulette selection algorithm, so the sand cat can update its position according to formula (9) to attack the prey: P(z+1)=P ca (z)-r i P ra ·cosθ (9) The Sand Cat Swarm Algorithm shows good ability in local optimization, but due to the lack of a clear global guidance mechanism, the convergence speed is slow when the problem scale is large or the search space is complex. The fast global search mechanism of the Sparrow Algorithm combined with the fine local optimization strategy of the Sand Cat Swarm Algorithm enables the fusion algorithm to find a good balance between global search and local attack, thereby improving the convergence speed. When the sparrow algorithm is added, the position of the sand cat is updated as shown in formula (10): Wherein, Q represents a random number that obeys a normal distribution; L represents a 1×k identity matrix. S3. Use the initial parameters optimized by fusion SSA-SCSO to train the BP neural network, apply the back propagation algorithm to update the weights, gradually approach the optimal solution, and further reduce the training error. In each iteration process, the fitness value of each individual is compared with the fitness value of the current optimal position, and the position of the sand cat group is updated according to the conversion coefficient R and the sand cat group algorithm after integrating the sparrow algorithm, and the optimal solution is retained; when the number of iterations reaches the preset maximum number of iterations, the optimized weights and thresholds are transmitted to the BP neural network. The BP neural network uses the error back propagation algorithm to adjust the weights and thresholds according to the error between the target value and the predicted value, so that the prediction error is gradually reduced. The specific formula is: Among them, w is the weight, b is the threshold, η is the learning rate, and E is the error. When the maximum number of training rounds is reached, the training ends and the BP neural network parameters are saved, thereby using this set of optimal parameters to achieve temperature compensation for the inductive displacement sensor.
Citation Information
Cited By
High-precision single-side polishing device, method and system for ultrathin optical element
CN120645081A