An anti-interference temperature control method for heat treatment of aerospace complex casting parts
Through Kalman filtering and particle swarm algorithm, PID control parameters are optimized, combined with BP neural network adjustment, the hysteresis, overshoot and easy interference problems of temperature control in heat treatment of complex cast parts in aerospace are solved, and more efficient temperature control is achieved.
Patent Information
- Application Number
- CN202310827248.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-06
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2043-07-06
AI Technical Summary
The existing heat treatment temperature control methods have problems such as hysteresis, overshoot, easy interference and slow response speed in complex cast parts in aerospace, and traditional PID control methods cannot effectively solve it.
The Kalman filtering algorithm is used to filter out temperature interference, combine with the particle swarm algorithm to optimize the PID control parameters, and adjust the parameters of the PID control model through the BP neural network to establish an anti-interference temperature control method.
It improves the accuracy and response speed of temperature control, reduces the overshoot, provides a more reliable temperature control method, and is suitable for the heat treatment process of complex cast parts in aerospace.
Smart Images

Figure CN116987878B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an anti-interference temperature control method for heat treatment of complex cast parts in aerospace, and relates to the technical field of heat treatment. Background Art
[0002] With the continuous acceleration of the industrialization process, mechanical manufacturing and processing are also developing rapidly. At present, heat treatment processes are widely used in fields such as aviation, aerospace, vehicles, metallurgy, and chemical engineering. Due to the high requirements for aerospace products, there are serious deficiencies in the control of heat treatment process parameters for complex cast parts, which in turn affect the service performance of aerospace products. The commonly used temperature control method in aerospace heat treatment processes is traditional PID control. Traditional PID control has certain limitations, such as serious hysteresis, overshoot, susceptibility to interference, slow response speed, etc. And in the commonly used fuzzy control PID, in order to obtain better control accuracy, it is necessary to make the distance between the peak points of the fuzzy set small enough through interpolation method, have enough fuzzy variable states, and divide the domain of discourse finely enough, which will lead to a large increase in the number of control rules and seriously affect the performance of the system.
[0003] For example, Chinese Patent CN104890205A (Application No.: 201510261454.9) discloses a temperature control method for the barrel of an injection molding machine. By calculating the temperature error value and the change rate of the error value between the measured temperature of the current sample and the target temperature obtained, the change amount of the PID control coefficient is obtained by using fuzzy control rules, and then the control coefficient of the PID is corrected, and finally the temperature control is realized. In this invention, the accuracy of the collected temperature and how to obtain the initial control coefficient of the PID are not considered, and there are still large errors in the final temperature control. Summary of the Invention
[0004] The technical problem to be solved by the present invention is: to overcome the deficiencies of the prior art and solve the problem of unsatisfactory heat treatment temperature control effect.
[0005] The object of the present invention is achieved through the following technical solutions:
[0006] An anti-interference temperature control method for heat treatment of complex cast parts in aerospace, comprising:
[0007] Measuring the temperature of the heat treatment furnace;
[0008] Establishing a temperature Kalman filter algorithm model, and using the Kalman filter method to perform iterative solution based on the measured temperature and the theoretical temperature of the heat treatment furnace to obtain the true temperature of the heat treatment furnace;
[0009] Determining the relationship between the input and output of the heat treatment temperature control system according to the PID control principle, that is, the PID control model;
[0010] Optimize the control parameters of the PID control model using the real temperature and the particle swarm algorithm to obtain the optimal PID control parameters;
[0011] Based on the error value e(t) between the set temperature index and the result temperature index, the error value change rate ec(t), and the control parameters of the PID control model, establish a BP neural network model. Through training and testing the BP neural network model, obtain a BP neural network prediction model that meets the error requirements;
[0012] Superimpose the difference value between the optimal PID control parameters and the control parameters of the BP neural network prediction model and then input it into the PID control model for temperature control.
[0013] In an embodiment of the present invention, the PID control parameters include a proportional coefficient, an integral coefficient, and a differential coefficient.
[0014] In an embodiment of the present invention, the inputs of the BP neural network model include the error value and the error change rate, and the outputs include the proportional coefficient change amount △K P 、the integral coefficient change amount △K I 、the differential coefficient change amount △K D .
[0015] In an embodiment of the present invention, the temperature Kalman filter algorithm performs continuous weighted calculations based on the theoretical temperature at the previous moment and the measured temperature at the current moment to obtain the true temperature value at the next moment:
[0016] First, establish the state equation and measurement equation of the temperature Kalman filter as follows:
[0017] State equation:
[0018] X k =A·X k-1 +B·U k +W k (1)
[0019] Where: X K is the theoretical value at time k, X K-1 is the theoretical value at time k-1, A and B are system parameters, U k is the system input quantity, W k is the environmental noise error value, and the covariance of W k is Q;
[0020] The measurement equation is:
[0021] Z K =C·X k +v K (2)
[0022] Where: ZK is the measured value at time k, C is the measurement system parameter, v K is the measurement noise error value, and v K has a covariance of R;
[0023] The prior value update equation is established as follows;
[0024]
[0025]
[0026] where P K-1 is the posterior estimation error covariance at time k - 1; is the prior estimation error covariance at time k; is the prior true temperature value at time k;
[0027] The posterior value update equation is established as follows:
[0028]
[0029]
[0030]
[0031] where I is the identity matrix, K k is the Kalman gain at time k;
[0032] The above equations (3), (4), (5), (6), (7) are the iterative formulas of the Kalman filter algorithm. Given the initial time X K-1 , P K-1 and Q, R the values of, the filtering of the temperature collected by the temperature sensor is completed through the Kalman filter algorithm.
[0033] In an embodiment of the present invention, the relationship between the input and output of the heat treatment temperature control system is:
[0034]
[0035] In the formula, u(t) represents the control quantity, e(t) is the error value, K P is the proportional coefficient, K I is the integral coefficient, K D is the differential coefficient, and t is the target time.
[0036] In an embodiment of the present invention, the particle swarm optimization algorithm is expressed as:
[0037]
[0038]
[0039] where: kj is the current iteration number; d is the component dimension; i is the number of particles; ω is the inertia weight; is the velocity of particle i at the kj - th iteration; c1 and c2 are learning factors; is the position of particle i at the kj - th generation; r1 and r2 are random numbers in the interval (0, 1); pbest is the individual extreme value of the particle; gbest is the global extreme value of the population.
[0040] In an embodiment of the present invention, the control parameter training iteration process of the particle swarm algorithm - optimized PID control model is as follows:
[0041] Initialize a population P with the number of particles being S. The position vector of each particle is composed of the control parameters of the PID control model, and the dimension of the position vector of the particle is 3. Then, perform initialization settings, and set the parameter ranges of the proportional coefficient K P , integral coefficient K I and derivative coefficient K D ;
[0042] Establish a fitness function. The initial fitness value of each particle is calculated by taking the initial position as the individual extreme value, and then calculate the optimal position solution of the population to make the PID control model reach the optimal;
[0043] In order to gradually evolve the initial solution towards the optimal solution, a penalty function is adopted, and the established fitness function is:
[0044]
[0045] where e(t) is the system error value, ey(t) is the system error output correction value, u(t) is the controller output, t u is the rise time, ω1, ω2, ω3, ω4 are weight values. The smaller the value J of the fitness function, the better the temperature control effect. The process of using the particle swarm algorithm for optimization is the process of solving the minimum value of the fitness function;
[0046] Each particle is updated through formulas (9) and (10), including the velocity and position of the particle;
[0047] Compare the current fitness value obtained by the particle with Pbest. If the former is greater than the latter, then use the current fitness value as Pbest and update the current position of the particle; at the same time, compare the current fitness value with gbest. If the former is greater than the latter, then use the current fitness value as the global extreme value solution and update the global optimal solution.
[0048] Verify the end condition. If the condition is met, end the optimization; otherwise, update each particle through formulas (9) and (10) again and loop to solve the minimum value of the fitness function.
[0049] In an embodiment of the present invention, a three-layer BP neural network structure model with two inputs and three outputs is established, which includes an input layer, a hidden layer, and an output layer. The number of inputs in the input layer is the error value and the error change rate, and the number of outputs in the output layer is the proportionality coefficient K P , the integral coefficient K I and the differential coefficient K D . The BP neural network transfer equation is as follows:
[0050] Output1 = f1(w1 × Input + b1) (12)
[0051] Output2 = f2(w2 × Output1 + b2) (13)
[0052] Where Input, f1, w1, Output1, and b1 are respectively the input of the input layer of the neural network, the transfer function of the hidden layer, the connection weight between the input layer and the hidden layer, the output of the hidden layer, and the connection threshold between the input layer and the hidden layer; Output2, f2, w2, and b2 are respectively the output of the output layer, the transfer function of the output layer, the connection threshold between the hidden layer and the output layer, and the connection threshold between the hidden layer and the output layer;
[0053] The formula for determining the number of hidden layers is as follows:
[0054]
[0055] Where kf is the number of hidden layer nodes, m is the number of input layer nodes, nf is the number of output layer nodes, and a is a constant; the value of kf is determined according to the input layer nodes and the output layer nodes, and then the error and fitting degree under different numbers of hidden layers are obtained through training based on the training data table, and then the number of hidden layers is determined according to the error and fitting degree corresponding to different numbers of hidden layers;
[0056] Through the training of the two-input three-output BP neural network model, verification and analysis are carried out based on the test data table to obtain the error degree compared with the test data; observe whether the error requirement is met. If not, new experiments need to be carried out to obtain a new data table, and then training and testing are carried out again until the error requirement is met;
[0057] The obtained BP neural network prediction model adjusts the three parameters K P , K I , K D of the PID control model according to the magnitudes of the error value e(t) and the error value change rate ec(t). The error value e(t) between the set index and the result index and the error value change rate ec(t) are used as the inputs of the BP neural network prediction model, and the output △K P , △K I , △KD Three parameters are passed to the PID control model as correction values.
[0058] The present invention has the following beneficial effects compared with the prior art:
[0059] (1) The present invention uses Kalman filtering to complete the filtering of temperature interference in the heat treatment process, including the influence of the temperature sensor itself and the external environment; effectively improving the accuracy of the collected temperature readings.
[0060] (2) The present invention combines the temperature parameter values after filtering interference and the PSO particle swarm algorithm, combines to avoid overshoot, and uses a fitness function with a penalty function to optimize the control coefficients K P (proportional coefficient), K I (integral coefficient) and K D (differential coefficient), and outputs the optimal PID control coefficients; obtaining an accurate temperature PID control model.
[0061] (3) The present invention takes the optimal PID control coefficients as the initial parameters in the PID fuzzy control, and through the established two-input (e(t) (error value), ec(t) (error change rate)) three-output (△K P (proportional coefficient change amount), △K I (integral coefficient change amount), △K D (differential coefficient change amount)) BP neural network model, according to the change situation of the error value and the error change rate between the set value and the collected value, obtains the change value of the output control coefficients, and adds it to the initial parameters to achieve the output.
[0062] (4) Aiming at the problems of hysteresis, overshoot, easy interference, slow response speed, etc. commonly existing in the temperature PID control of the heat treatment process of aerospace complex casting parts, the method proposed by the present invention shows through experiments that the overshoot of the temperature control system is reduced, and the hysteresis, anti-interference ability, and response speed are significantly improved, which can provide a reliable temperature control method for the heat treatment process of current aerospace large and complex casting parts.
[0063] (5) The present invention uses the Kalman filtering method to complete the filtering of interference signals for the collected temperature, and uses the PSO particle swarm algorithm to obtain the optimized PID control coefficients, and further improves the performance of the temperature control system on the original basis through the BP neural network. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a flowchart of the implementation mode of the present invention.
[0065] Figure 2 It is an algorithm flowchart of the Kalman filter of the present invention.
[0066] Figure 3 This is the numerical display diagram before and after the Kalman filter of the present invention.
[0067] Figure 4 This is the optimization curve diagram of the PID control parameters optimized by the particle swarm optimization of the present invention.
[0068] Figure 5 This is the structural block diagram of the PSO-BP-PID temperature control based on the Kalman filter of the present invention.
[0069] Figure 6 This is the temperature indication change curve of the traditional PID under interference and the temperature control method of the present invention. Detailed implementation manners
[0070] To make the objectives, technical solutions and advantages of the present invention clearer, the following will further describe the implementation manners of the present invention in detail with reference to the accompanying drawings.
[0071] A heat treatment anti-interference temperature control method for aerospace complex casting parts, the method comprising the following steps:
[0072] Step 1: Obtain the measured temperature indication of the heat treatment furnace through a temperature sensor;
[0073] Step 2: Establish a temperature Kalman filter algorithm model;
[0074] Step 3: Based on the obtained measured temperature indication and theoretical temperature indication, perform iterative solution based on the Kalman filter method to obtain the true temperature indication of the heat treatment furnace;
[0075] Step 4: Determine the relationship between the input and output of the heat treatment temperature control system according to the PID control principle;
[0076] Step 5: Optimize the control parameters of the PID control model based on the true temperature indication and PSO (particle swarm algorithm) to obtain the K P (proportional coefficient), K I (integral coefficient) and K D (derivative coefficient);
[0077] Step 6: Establish a BP neural network model with two inputs (e(t) (error value), ec(t) (error change rate)) and three outputs (△K P , △K I , △K D ), and through training and testing the BP neural network model, obtain a BP neural network prediction model that meets the error requirements;
[0078] Step 7: Superimpose the obtained optimal PID control parameters and the change values of the control parameters predicted by the BP neural network, and then input them into the PID controller. Prove the superiority of this heat treatment anti-interference temperature control method compared with the traditional PID control method through simulation and experiments, and at the same time provide a new temperature control method for the heat treatment field of aerospace complex casting parts.
[0079] The following steps are also included in Step 2:
[0080] Step 2.1: The basic idea of the temperature Kalman filtering algorithm is to perform continuous weighted calculations based on the temperature theoretical value at the previous moment and the temperature measurement value at the current moment to obtain the temperature true value at the next moment. First, establish the state equation and measurement equation of the temperature Kalman filter as follows:
[0081] State equation:
[0082] X k = A·X k-1 + B·U k + W k (1)
[0083] Where: X K is the theoretical value at time k, X K-1 is the theoretical value at time k-1, A and B are system parameters, U k is the system input quantity, W k is the environmental noise error value, and the covariance of W k is Q.
[0084] The measurement equation is:
[0085] Z K = C·X k + v K (2)
[0086] Where: Z K is the measurement value at time k, C is the measurement system parameter, v K is the measurement noise error value, and its covariance is R.
[0087] Step 2.2: Establish the prior value update equation as follows;
[0088]
[0089]
[0090] Where, P K-1 is the posterior estimation error covariance at time k-1. is the prior estimation error covariance at time k. is the prior temperature true value at time k.
[0091] Step 2.3: Establish the posterior value update equation as follows:
[0092]
[0093]
[0094]
[0095] where I is the identity matrix, and K k is the Kalman gain at time k.
[0096] Step 2.4: The above equations (3), (4), (5), (6), and (7) are the iterative formulas of the Kalman filter algorithm. Given the initial values of X K-1 , P K-1 as well as the values of Q and R, the filtering of the temperature collected by the temperature sensor is completed through the Kalman filter algorithm.
[0097] The relationship between the input and output of the temperature control system in Step 4 can be expressed as:
[0098]
[0099] In the formula, u(t) represents the control quantity, e(t) is the error value, K P is the proportional coefficient, K I is the integral coefficient, K D is the differential coefficient, and t is the target time.
[0100] The particle swarm algorithm in Step 5 can be expressed as:
[0101]
[0102]
[0103] In the formula: kj is the current iteration number; d is the component dimension; i is the number of particles; ω is the inertia weight; is the velocity of particle i at the kj-th iteration; c1 and c2 are the learning factors; is the position of particle i at the kj-th iteration; r1 and r2 are random numbers in the interval (0, 1); Pbest is the individual extreme value of the particle; gbest is the global group extreme value.
[0104] The training iteration process of optimizing the PID control parameters by the particle swarm algorithm is as follows:
[0105] Step 4.1: Initialize a population P with the number of particles being S. The position vector of each particle consists of the three parameters of the PID controller, and the dimension of the particle's position vector is 3. Then perform the initialization settings, and set the parameter ranges of K P (proportional coefficient), K I (integral coefficient), and K D (derivative coefficient).
[0106] Step 4.2: Establish a suitable fitness function. The initial fitness value of each particle is calculated by taking the initial position as the individual extreme value, and then the optimal position solution of the population is calculated. The PID controller adjusts three control parameters to optimize the system performance. From the perspective of optimization, it is to find the optimal value in the parameter space of the three variables to achieve the optimal control performance of the system.
[0107] In order to gradually evolve the initial solution towards the optimal solution, obtain better dynamic characteristics and static performance, and avoid overshoot, a penalty function is adopted. The established fitness function is:
[0108]
[0109] In the formula, e(t) is the system error value, ey(t) is the system error output correction value, u(t) is the controller output, t u is the rise time, ω1, ω2, ω3, ω4 are weights. The smaller the value of the fitness function J, the better the temperature control effect. Therefore, the PSO optimization process is the process of solving the minimum value of the fitness function.
[0110] Step 4.3: Each particle is updated through formulas (9)(10), including the velocity and position of the particle.
[0111] Step 4.4: Compare the current fitness value obtained by the particle with Pbest. If the former is greater than the latter, then take the current fitness value as Pbest and update the current position of the particle.
[0112] Step 4.5: At the same time, compare the current fitness value with gbest. If the former is greater than the latter, then take the current fitness value as the global extreme value solution and update the global optimal solution.
[0113] Step 4.6: Verify the end condition. If the condition is met, end the optimization; otherwise, go back to Step 4.3 to continue the operation.
[0114] In Step 6, the BP neural network prediction model can be expressed as:
[0115] Step 6.1: Establish a three-layer BP neural network structure model with two inputs and three outputs, including an input layer, a hidden layer, and an output layer. The number of inputs in the input layer is 2 (error value e(t) and error change rate ec(t)), and the number of outputs in the output layer is 3 (△K P 、△K I 、△K D ). The BP neural network transfer equation is as follows:
[0116] Output1 = f1(w1 × Input + b1) (12)
[0117] Output2 = f2(w2 × Output1 + b2) (13)
[0118] Where Input, f1, w1, Output1, and b1 are the input of the input layer of the neural network, the transfer function of the hidden layer, the connection weight between the input layer and the hidden layer, the output of the hidden layer, and the connection threshold between the input layer and the hidden layer respectively; Output2, f2, w2, and b2 are the output of the output layer, the transfer function of the output layer, the connection threshold between the hidden layer and the output layer, and the connection threshold between the hidden layer and the output layer respectively;
[0119] Step 6.2: Determine the number of hidden layers. The formula for the number of hidden layers is as follows:
[0120]
[0121] Where kf is the number of nodes in the hidden layer, m is the number of nodes in the input layer, nf is the number of nodes in the output layer, and a is a constant (a = 1 - 10); Determine the value of kf between (4 - 13) according to the number of nodes in the input layer and the output layer, and then train according to the training data table to obtain the error and fitting degree under different numbers of hidden layers. Then determine the number of hidden layers according to the error and fitting degree corresponding to different numbers of hidden layers.
[0122] Step 6.3: Through the training of the two-input three-output BP neural network model, conduct verification and analysis based on the test data table to obtain the error degree compared with the test data. Observe whether the error requirement is met. If not, re-conduct the experiment to obtain a new data table. Train and test again until the error requirement is met.
[0123] The obtained BP neural network prediction model can adjust the K of the PID according to the magnitudes of the error value e(t) and the error value change rate ec(t) P 、K I 、K D Three parameters. Use the error value e(t) between the set index and the result index and the error value change rate ec(t) as the input of the BP neural network prediction model, and use the output △KP , △K I , △K D These three parameters are passed to the PID controller as correction values.
[0124] The control method in Step 7 is as follows:
[0125] Step 7.1: Use the PID control coefficients K P (proportional coefficient), K I (integral coefficient), and K D (derivative coefficient) as the initial coefficients of the PID;
[0126] Step 7.2: Calculate the error value e(t) and the rate of change of the error value ec(t) based on the real temperature obtained by filtering with the Kalman filter and the set value of the temperature;
[0127] Step 7.3: Use the calculated error value e(t) and the rate of change of the error value ec(t) as the inputs of the BP neural network prediction model;
[0128] Step 7.4: Pass the △K P , △K I , △K D output by the BP neural network prediction model to the PID controller as correction values;
[0129] Step 7.5: Adjust the control coefficients of the PID to calculate the output of the control quantity;
[0130] Step 7.6: By continuously changing the error value e(t) and the rate of change of the error value ec(t), repeatedly adjust the PID control parameters until the model is stable. When the model is stable, the loss function converges to 0 during testing and there is no overfitting.
[0131] Example:
[0132] As Figure 1 shown, the flowchart of the implementation mode of the present invention has the following steps:
[0133] Step 1: Obtain the measured temperature reading of the heat treatment furnace through a temperature sensor;
[0134] Step 2: Establish a temperature Kalman filter algorithm model;
[0135] Step 3: Based on the obtained measured temperature reading and the theoretical temperature reading, perform iterative solution using the Kalman filter method to obtain the real temperature reading of the heat treatment furnace;
[0136] Step 4: Determine the relationship between the input and output of the heat treatment temperature control system according to the PID control principle;
[0137] Step 5: Optimize the control parameters of the PID control model based on the true temperature reading and PSO (Particle Swarm Optimization) to obtain the K P (proportional coefficient), K I (integral coefficient), and K D (derivative coefficient);
[0138] Step 6: Establish a BP neural network model with two inputs (e(t) (error value), ec(t) (error change rate)) and three outputs (△K P , △K I , △K D ). Through training and testing the BP neural network model, obtain a BP neural network prediction model that meets the error requirements;
[0139] Step 7: Superimpose the obtained optimal PID control parameters and the change values of the control parameters predicted by the BP neural network, and then input them into the PID controller. Through simulation and experiments, prove the superiority of this heat treatment anti-interference temperature control method compared with the traditional PID control method, and at the same time provide a new temperature control method for the heat treatment field of aerospace complex casting parts.
[0140] Among them, the PSO parameters in Step 5 are set as: inertia weight ω, learning factors c1, c2, maximum particle velocity, and maximum number of iterations; first, select the linearly decreasing inertia weight with adaptive adjustment. The typical value of the inertia weight is ω max =0.9, ω min =0.4, and take the initial weight ω as 0.9. The learning factors satisfy c1 + c2 = 4, and when c1 = 2, the number of iterations is smaller. At the two endpoints 0 and 4, the number of iterations is larger, showing symmetry; at the two endpoints, the search failure rate is larger. Take c1 = c2 = 2, then set the maximum particle velocity to 0.5 according to the resolution (accuracy) between the current position and the best position as needed. Finally, to prevent continuous iterations from not reaching the convergence state and observing the iteration convergence times of the particle swarm algorithm in this article, determine the maximum number of iterations of the algorithm to be 100.
[0141] As Figure 2 shown is the algorithm flow chart of temperature Kalman filtering. First, set the initial value of Kalman filtering for iterative solution of the target value. Then, based on the theoretical value of the previous moment and the measured value of this moment, obtain the true temperature parameter of this moment according to the Kalman filtering formula. Then calculate the Kalman gain of this moment, and at the same time calculate the error degree of this moment. Observe whether the error condition is satisfied. If not, continue to iterate. If the condition is satisfied, output the temperature value of this moment as the true temperature value of this moment.
[0142] As Figure 3Figure a shows the comparison chart after the temperature is filtered by the Kalman filtering algorithm. As Figure 3 Figure b shows the comparison chart of the error values before and after filtering. By setting the theoretical temperature value to 500 °C, the temperature after Kalman filtering is significantly better than the temperature value collected by the temperature sensor in the heat treatment furnace. Because the temperature value collected by the temperature sensor in the heat treatment furnace includes not only the real temperature parameter, but also the interference of the environment on the real temperature and the influence of the sensor's own accuracy. Finally, the collected temperature value is quite different from the theoretical value.
[0143] As Figure 4 Figure shows the optimization iteration curves of the K P (proportional coefficient), K I (integral coefficient) and K D (derivative coefficient). By initializing the parameter range through the particle swarm algorithm, establishing the population number, the maximum number of iterations and the fitness function, iteratively finding the minimum value of the fitness function, obtaining the corresponding PID control coefficients, and then setting the corresponding optimal parameter values in the PID control model.
[0144] As Figure 5 Figure shows the block diagram of the PSO-BP-PID temperature control based on Kalman filtering. Establish the connection between the BP neural network prediction model and the PID control. Through the error value e(t) and the error rate ec(t) between the set temperature value and the real temperature value, output the corresponding change values of the proportional coefficient, integral coefficient and derivative coefficient, and add the corresponding change values to the optimal proportional coefficient, integral coefficient and derivative coefficient to control the temperature.
[0145] As Figure 6 Figure shows the schematic diagram of the temperature control in the heat treatment furnace under the condition of interference. It is set that there is a large interference in the temperature control of the heat treatment furnace. After collecting and simulating the traditional PID control and the temperature control method of the present invention, as shown in the figure, it can be proved that the temperature control method in the present invention has better anti-interference ability than the traditional PID control. It can be well applied to the heat treatment temperature control of aerospace complex casting parts.
[0146] The content not detailedly described in the specification of the present invention belongs to the well-known technology of those skilled in the art.
[0147] Although the present invention has been disclosed above with preferred embodiments, it is not used to limit the present invention. Any person skilled in the art can make possible changes and modifications to the technical solution of the present invention by using the methods and technical contents disclosed above without departing from the spirit and scope of the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the technical solution of the present invention all belong to the protection scope of the technical solution of the present invention.
Claims
1. An anti-interference temperature control method for heat treatment of aerospace complex casting parts, characterized in that, Including: Measuring the temperature of the heat treatment furnace; Establishing a temperature Kalman filter algorithm model, and using the Kalman filter method to perform iterative solution based on the measured temperature and theoretical temperature of the heat treatment furnace to obtain the true temperature of the heat treatment furnace; Determining the relationship between the input and output of the heat treatment temperature control system according to the PID control principle, that is, the PID control model; Optimizing the control parameters of the PID control model by using the true temperature and the particle swarm algorithm to obtain the optimal PID control parameters; Based on the error value e(t) between the set temperature index and the result temperature index, the error value change rate ec(t), and the control parameters of the PID control model, establishing a BP neural network model, and obtaining a BP neural network prediction model that meets the error requirements through training and testing of the BP neural network model; Superimposing the difference value between the optimal PID control parameters and the control parameters of the BP neural network prediction model and then inputting it into the PID control model for temperature control.
2. The anti-interference temperature control method according to claim 1, wherein The PID control parameters include a proportionality coefficient, an integral coefficient, and a derivative coefficient.
3. The anti-interference temperature control method according to claim 1, characterized in that The inputs of the BP neural network model include the error value and the error change rate, and the outputs include the change in the proportionality coefficient △K P , the change in the integral coefficient △K I , the change in the differential coefficient △K D .
4. The anti-interference temperature control method according to claim 1, characterized in that The temperature Kalman filter algorithm performs continuous weighted calculations based on the theoretical temperature at the previous moment and the measured temperature at the current moment to obtain the true temperature value at the next moment: First, establish the state equation and measurement equation of the temperature Kalman filter as follows: State equation: X k = A·X k-1 + B·U k + W k (1) Where: X K is the theoretical value at time k, X K-1 is the theoretical value at time k-1, A and B are system parameters, U k is the system input, W k is the environmental noise error value, and the covariance of W k is Q; The measurement equation is: Z K = C·X k + v K (2) Where: Z K is the measured value at time k, C is the measurement system parameter, v K is the measurement noise error value, and the covariance of v K is R; Establish a prior value update equation as follows; where, P K-1 is the posterior estimation error covariance at time k-1; is the prior estimation error covariance at time k; is the prior true temperature value at time k; Establish a posterior value update equation as follows: where I is the identity matrix, and K k is the Kalman gain at time step k; The above formulas (3), (4), (5), (6), and (7) are the iterative formulas of the Kalman filter algorithm. Given the values of X K-1 , P K-1 and Q, R at the initial moment, the filtering of the temperature collected by the temperature sensor is completed through the Kalman filter algorithm.
5. The anti-interference temperature control method according to claim 1, characterized in that The relationship between the input and output of the heat treatment temperature control system is: where \(u(t)\) represents the control quantity, \(e(t)\) is the error value, \(K\) P is the proportional coefficient, \(K\) I is the integral coefficient, \(K\) D is the differential coefficient, and \(t\) is the target time.
6. The anti-interference temperature control method according to claim 1, characterized in that The particle swarm algorithm is expressed as: Where: $k_j$ is the current iteration number; $d$ is the component dimension; $i$ is the number of particles; $\omega$ is the inertia weight; is the velocity of particle $i$ at the $k_j$-th iteration; $c_1$, $c_2$ are learning factors; is the position of particle $i$ in the $k_j$-th generation; $r_1$, $r_2$ are random numbers in the interval $(0, 1)$; pbest is the individual extreme value of the particle; gbest is the global extreme value of the population.
7. The anti-interference temperature control method according to claim 6, wherein The training iteration process of optimizing the control parameters of the PID control model by the particle swarm algorithm is as follows: Initialize a population P with the number of particles S. The position vector of each particle consists of the control parameters of the PID control model, and the dimension of the position vector of the particle is 3. Then, perform the initialization settings and set the parameter ranges of the proportionality coefficient K P , the integral coefficient K I , and the derivative coefficient K D . Establish a fitness function. The initial fitness value of each particle is calculated by taking the initial position as the individual extreme value, and then the optimal position solution of the population is calculated to make the PID control model reach the optimal; Each particle is updated through formulas (9)(10), including the velocity and position of the particle; Compare the current fitness value obtained by the particle with Pbest. If the former is greater than the latter, then use the current fitness value as Pbest and update the current position of the particle; at the same time, compare the current fitness value with gbest. If the former is greater than the latter, then use the current fitness value as the global extreme value solution and update the global optimal solution; Verify the end condition. If the condition is met, end the optimization; otherwise, update each particle through formulas (9)(10) again and loop to solve the minimum value of the fitness function.
8. The anti-interference temperature control method according to claim 7, wherein In order to gradually evolve the initial solution towards the optimal solution, a penalty function is adopted, and the established fitness function is: Where, e(t) is the system error value, ey(t) is the system error output correction value, u(t) is the controller output, and t u is the rise time, ω1, ω2, ω3, and ω4 are weights. The smaller the value J of the fitness function, the better the temperature control effect. The process of using the particle swarm optimization algorithm to find the optimum is the process of solving the minimum value of the fitness function.
9. The anti-interference temperature control method according to claim 1, characterized in that, A three-layer BP neural network structure model with two inputs and three outputs is established, including an input layer, a hidden layer, and an output layer. The number of inputs in the input layer is the error value and the error change rate, and the number of outputs in the output layer is the proportionality coefficient K P , the integral coefficient K I , and the differential coefficient K D . The BP neural network transfer equation is as follows: Output1 = f1(w1×Input + b1) (12) Output2 = f2(w2×Output1 + b2) (13) Among them, Input, f1, w1, Output1, and b1 are respectively the input of the input layer of the neural network, the transfer function of the hidden layer, the connection weight value between the input layer and the hidden layer, the output of the hidden layer, and the connection threshold between the input layer and the hidden layer; Output2, f2, w2, and b2 are respectively the output of the output layer, the transfer function of the output layer, the connection threshold between the hidden layer and the output layer, and the connection threshold between the hidden layer and the output layer; The formula for determining the number of hidden layers is as follows: Among them, kf is the number of nodes in the hidden layer, m is the number of nodes in the input layer, nf is the number of nodes in the output layer, and a is a constant; determine the value of kf according to the number of nodes in the input layer and the output layer, and then train according to the training data table to obtain the error and fitting degree under different numbers of hidden layers, and then determine the number of hidden layers according to the error and fitting degree corresponding to different numbers of hidden layers; Through the training of the two-input three-output BP neural network model, based on the test data table for verification and analysis, the error degree compared with the test data is obtained; observe whether the error requirement is met. If not, new experimental data need to be obtained through re-experimentation, and then training and testing are carried out again until the error requirement is met.
10. The anti-interference temperature control method according to claim 9, characterized in that, For the obtained BP neural network prediction model, adjust the three parameters \(K_{P}\), \(K_{I}\), and \(K_{D}\) of the PID control model according to the magnitudes of the error value \(e(t)\) and the rate of change of the error value \(ec(t)\). Use the error value \(e(t)\) between the set index and the result index and the rate of change of the error value \(ec(t)\) as the inputs of the BP neural network prediction model, and use the output \(\Delta K_{P}\), \(\Delta K_{I}\), and \(\Delta K_{D}\) of the three parameters as correction values and transfer them to the PID control model. P 、 \(K_{P}\) I 、 \(K_{I}\) D 、 \(K_{D}\), use the error value \(e(t)\) between the set index and the result index and the rate of change of the error value \(ec(t)\) as the inputs of the BP neural network prediction model, and use the output \(\Delta K_{P}\) P 、 \(\Delta K_{P}\) I 、 \(\Delta K_{I}\) D 、 \(\Delta K_{D}\) of the three parameters as correction values and transfer them to the PID control model.
Citation Information
Patent Citations
Barrel temperature control method of injection molding machine
CN104890205A