Fuzzy PID bulking machine temperature prediction and control method based on improved GRU optimization

By adopting improved GRU and fuzzy PID control methods in the extruder, establishing a system dynamic model and designing a predictive neural network, the nonlinear problems and time lag in the temperature control of the extruder are solved, and more stable and efficient temperature control is achieved.

CN119322440AInactive Publication Date: 2025-01-17NANJING AGRICULTURAL UNIVERSITY
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410746161.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2025-01-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has nonlinear problems and time lag in the temperature control of the expander, resulting in poor temperature control and affecting food quality and machine operation.

Method used

The fuzzy PID control method based on the improved GRU is adopted. By establishing the system dynamic model, the improved GRU predictive neural network and fuzzy PID controller are designed. The particle swarm algorithm is used to optimize the initial parameters of the neural network and predict and adjust the temperature of the heating chamber in real time.

Benefits of technology

It improves the stability and response speed of the temperature control of the extruder, reduces the overshoot during the control process, and enhances the stability of the heating chamber heating process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322440A_ABST
    Figure CN119322440A_ABST
Patent Text Reader

Abstract

The invention provides a fuzzy PID bulking machine temperature prediction and control method based on improved GRU optimization. The method comprises the following steps: firstly, acquiring different environmental data of the bulking machine and step response data of a heating bin by using an STM32 single chip microcomputer, and determining a transfer function of the heating bin of the bulking machine through a least square method; then adding a CNN hidden layer to improve the GRU neural network, optimizing the initial parameters of the GRU neural network by using an improved particle swarm algorithm, and predicting the operation parameters of the heating bin; finally, PID control parameters are reasonably adjusted through fuzzy control, and the power of the heating piece is changed in advance through feedback control. According to the invention, the nonlinear and dynamic characteristics of the system are captured through real-time modeling of the system, and the lag link in the control process is effectively compensated by using the improved GRU prediction algorithm, so that the response speed of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of automatic prediction and control, and in particular relates to a fuzzy PID extruder temperature prediction and control method based on improved GRU. Background Art

[0002] Puffing machine is a kind of equipment commonly used in the field of food processing, used to make puffed food, such as puffed cereals, puffed potato chips, etc. Temperature control is a crucial part of the operation of puffing machine. Too low temperature will lead to incomplete puffing of feed in the heating chamber, affecting the taste and edibility; too high temperature will easily cause gelatinization of puffed feed, and even cause the screw to block, affecting the normal operation of the machine.

[0003] At present, most control strategies for temperature control use PID or fuzzy PID control methods. For the traditional PID control method, although it can automatically adjust the system input according to the error, error change rate and cumulative error of the controlled temperature, it cannot automatically adjust the PID parameters when the system parameters change. At the same time, it has poor control ability for nonlinear systems; while the fuzzy PID control method can automatically adjust the control parameters, but for the hysteresis phenomenon in temperature control, the control effect is still poor.

[0004] The present invention proposes a fuzzy PID control method based on an improved GRU, which optimizes the nonlinear problem of a control object and reduces the time lag of temperature control. Summary of the invention

[0005] The present invention is to solve the deficiencies of the prior art and propose a fuzzy PID extruder temperature prediction and control method based on improved GRU optimization. The extruder used in the present invention includes a current transformer 1, an environmental temperature and humidity sensor 2, an encoder 3, a stirring bin 4, a cylindrical heating plate 5, a vibration and noise sensor 6, and a weight sensor 7; wherein the electric control cabinet 8 has a built-in control system, and the control system includes a single-chip microcomputer, a relay, a DC speed regulator, a 4G module, etc.;

[0006] The fuzzy PID extruder temperature prediction and control method based on improved GRU optimization is characterized in that the control method specifically comprises the following steps:

[0007] Step 1: Build a system dynamics model

[0008] 1.1 Collect the operating status data of the extruder under different environments.

[0009] 1.2 Establish the mathematical model of the controlled object. The transfer function of the temperature of the heating chamber of the extruder is selected as the first-order inertia plus lag process, that is:

[0010]

[0011] Among them, K is the steady-state gain of the controlled object, T is the inertia time constant, and τ is the lag time.

[0012] At the same time, in order to better characterize the accuracy of the transfer function, the characteristic parameters K, T, and τ of the transfer function change dynamically with the change of the system working conditions. The characteristic parameters in the system transfer function are calculated in real time by the least squares method based on the actual data collected. The loss function formula of the least squares method is as follows:

[0013]

[0014] Among them, N is the actual amount of data collected, R i is the system step response value in the i-th group of data, and K, T, and τ are characteristic parameters.

[0015] The loss function is derived with respect to K, T, and τ respectively, and the characteristic parameter values ​​are obtained using the gradient descent method. At this time, the system transfer function is determined.

[0016] Step 2: Design the GRU prediction neural network

[0017] 2.1 Improve the GRU prediction neural network. By adding CNN convolutional neural network hidden layers, abstract features are extracted at different levels of input data, which helps to fully capture the features in the input data, while improving computational efficiency and reducing model overfitting.

[0018] 2.2 Determine the hyperparameters of the improved GRU prediction neural network. Through multiple experimental debugging and algorithm iterations, the mean square error of the comprehensive data, the degree of fitting, and the degree of oscillation during training are used to select the hyperparameters of the neural network, including the number of network layers, learning rate, number of iterations, optimizer, sampling time interval, and window length.

[0019] 2.3 Use the particle swarm algorithm to optimize and improve the initial parameters of the GRU neural network to alleviate the problem of falling into the local optimal solution during GRU neural network training.

[0020] Before training the neural network, the improved particle swarm algorithm is used to optimize the initial training parameters. The parameters are the weight values ​​of each layer in the neural network, namely:

[0021]

[0022] Where: X i is the position of the ith particle, They refer to the position information in different dimensions respectively, and n refers to the number of training parameters.

[0023] The particle update formula of the particle swarm algorithm is:

[0024] V i(t+1)=w*V i (t)+c1*r1*(pbest i -X i (t))+c2*r2*(gbest-X i (t))

[0025] Where: V i (t+1) is the velocity of particle i at the next moment, w is the inertia weight, c1 and c2 are acceleration constants, r1 and r2 are random numbers in the range [0,1], and pbest i is the individual optimal position of particle i, gbest is the global optimal position of the entire group, X i (t) is the position of particle i at time t.

[0026] Step 3: Design the Fuzzy PID Controller

[0027] There are two input variables of the fuzzy PID controller, namely error e and error change rate ec. The domain of error e is [-20,20], the domain of error change rate is [-5,5], and the number of membership functions is 7, namely [NB, NM, NS, ZO, PS, PM, PB].

[0028] Step 4: Collect actual data at set time intervals, use the actual data as the input of the improved GRU neural network, predict the output of the system at the next moment, use the predicted output as the input of the fuzzy PID controller, and obtain the optimal control output of the current system.

[0029] The fuzzy PID extruder temperature prediction and control method based on improved GRU is characterized in that: the system dynamic model parameters are calculated according to the actual data collected, the initial control parameters of the fuzzy PID controller are optimized according to the characteristic parameters of the dynamic model, and the improved GRU algorithm is used to predict the temperature of the heating bin at the next moment, and the power of the heating plate is changed through feedback regulation to maintain the temperature at the set value, thereby enhancing the stability of the heating bin heating process and reducing the overshoot in the control process. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A front view of an expander provided in an embodiment of the present invention;

[0031] Figure 2 An axonometric diagram of an extruder provided in an embodiment of the present invention;

[0032] Figure 3 An improved GRU neural network structure diagram provided by an embodiment of the present invention;

[0033] Figure 4 A flow chart of a particle swarm algorithm provided by an embodiment of the present invention;

[0034] Figure 5 A fuzzy PID control flow chart based on an improved GRU is provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The following is attached Figure 1-5 The specific implementation of the present invention is described in detail by taking an example. The implementation is only one of the implementations of the invention and is used to explain the present invention, and does not represent all examples and implementations.

[0036] A fuzzy PID extruder temperature prediction and control method based on improved GRU optimization, the extruder described in this embodiment includes a current transformer 1, an ambient temperature and humidity sensor 2, an encoder 3, a stirring bin 4, a cylindrical heating plate 5, a vibration and noise sensor 6, and a weight sensor 7; wherein the electric control cabinet 8 has a built-in control system, and the control system includes a single-chip microcomputer, a relay, a DC speed regulator, a 4G module, etc.; the specific steps of the control method include:

[0037] Step 1: Build a system dynamics model

[0038] 1.1 Data collection. The heating plate is turned on for full power output, and the STM32 microcontroller is used to collect the actual output of the heating chamber of the extruder under the step signal.

[0039] 1.2 Establish the mathematical model of the controlled object. The transfer function of the temperature of the heating chamber of the extruder is selected as the first-order inertia plus lag process, that is:

[0040]

[0041] Among them, K is the steady-state gain of the controlled object, T is the inertia time constant, and τ is the lag time.

[0042] At the same time, in order to better characterize the accuracy of the transfer function, the characteristic parameters K, T, and τ of the transfer function change dynamically with the change of the system working conditions. According to the actual data collected, the characteristic parameters in the system transfer function are calculated in real time by the least squares method. First, the transfer function of the system is changed from the frequency domain to the time domain. The frequency domain form of the system is:

[0043]

[0044] Since the input of the system at this stage is a step signal, the frequency domain form of the system output is:

[0045]

[0046] Converted into time domain form:

[0047]

[0048] Substitute the actual step response data collected in 1.1 above into the time domain formula of the system output, and use the least squares method to calculate the optimal characteristic parameters of the system. The loss function formula of the least squares method is as follows:

[0049]

[0050] Among them, N is the actual amount of data collected, R i is the system step response value in the i-th group of data, K, T, τ are the characteristic parameters to be solved.

[0051] The loss function is derived from the characteristic parameters:

[0052]

[0053] Since it is difficult to find the extreme value of the characteristic parameters, the gradient descent method is used to continuously update the characteristic parameters to obtain an approximate solution. The formula for updating the parameters is:

[0054]

[0055] Among them, α is the learning rate.

[0056] Step 2: Design the GRU prediction neural network

[0057] 2.1 Improve the GRU prediction neural network. By adding CNN convolutional neural network hidden layers, abstract features are extracted at different levels of input data, which helps to fully capture the features in the input data, while improving computational efficiency and reducing model overfitting.

[0058] 2.2 Determine the hyperparameters of the improved GRU prediction neural network. Through multiple experimental debugging and algorithm iterations, the mean square error of the comprehensive data, the degree of fitting, and the degree of oscillation during training are used to select the hyperparameters of the neural network, including the number of network layers, learning rate, number of iterations, optimizer, sampling time interval, and window length. At the same time, during training, the ratio of the training set to the test set is set to 7:3.

[0059] 2.3 Use the particle swarm algorithm to optimize and improve the initial parameters of the GRU neural network to alleviate the problem of falling into the local optimal solution during GRU neural network training.

[0060] Before training the neural network, the improved particle swarm algorithm is used to optimize the initial training parameters. The parameters are the weight values ​​of each layer in the neural network, namely:

[0061]

[0062] Where: X i is the position of the ith particle, They refer to the position information in different dimensions respectively, and n refers to the number of training parameters.

[0063] The process of particle swarm algorithm is as follows:

[0064] 1. Randomly generate a group of particles, each particle represents a potential solution, and give each particle the position and velocity. At the same time, set a fitness function for each particle to evaluate the quality of its solution. The formula for randomly generating particle positions and velocities is:

[0065] x i =a+(ba)*rand()

[0066] v i =v min +(v max -v min )*rand()

[0067] Among them, a and b represent the boundaries of the particle search space, v min 、v max Represents the particle speed range, rand() generates a random number in the range of [0,1).

[0068] 2. Update particle speed

[0069] The update formula of particle velocity is:

[0070] v i (t+1)=w*v i (t)+c1*r1*(pbest i -x i (t))+c2*r2*(gbest-x i (t))

[0071] Among them, v i (t+1) is the velocity of particle i at the next moment, w is the inertia weight, c1 and c2 are acceleration constants,

[0072] r1, r2 are random numbers in the range [0,1], pbest i is the individual optimal position of particle i, and gbest is the global optimal position of the entire group.

[0073] 3. Update particle position

[0074] The update formula of particle position is:

[0075] x i (t+1)=x i (t)+v i (t+1)

[0076] Among them, x i (t+1) is the position of particle i at the next moment.

[0077] 4. Update individual optimal solution and global optimal solution

[0078] For each particle i, compare the fitness value (objective function value) of the current position with the fitness value of the best position found in its history, and update the individual optimal solution. Then, compare the individual optimal solutions of all particles to find the global optimal solution.

[0079] 5. Repeat

[0080] Repeat steps 2-4 until the maximum number of iterations is reached.

[0081] Step 3: Design the Fuzzy PID Controller

[0082] Set the input variables of the fuzzy PID controller to two, namely error e and error change rate ec. The domain of error e is [-20, 20], the domain of error change rate ec is [-5, 5], and the number of membership functions is set to 7, namely [NB, NM, NS, ZO, PS, PM, PB].

[0083] Step 4: Collect actual data at set time intervals. In this implementation, the sampling time interval is 10 seconds. Use the actual data as the input of the improved GRU neural network to predict the output of the system at the next moment. Use the predicted output as the input of the fuzzy PID controller to obtain the optimal control output of the current system, thereby controlling the power of the heating plate. Each time data is collected, the secondary data window is updated and executed cyclically.

[0084] This implementation scheme can adjust the temperature of the heating plate in real time according to the set temperature. Under different external environments, it has good parameter identification ability through real-time modeling. At the same time, it improves the deployment of the GRU fuzzy control algorithm, improves the response speed of the system in the actual control process, and effectively compensates for the lag link of the system.

Claims

1. A fuzzy PID extruder temperature prediction and control method based on improved GRU optimization, characterized in that the extruder includes a current transformer 1, an environmental temperature and humidity sensor 2, an encoder 3, a stirring bin 4, a cylindrical heating plate 5, a vibration and noise sensor 6, and a weight sensor 7; wherein the electric control cabinet 8 has a built-in control system, and the control system includes a single-chip microcomputer, a relay, a DC speed regulator, a 4G module, etc.; The fuzzy PID extruder temperature prediction and control method based on improved GRU optimization is characterized in that the control method specifically comprises the following steps: Step 1: Establish a system dynamic model. 1.1 Collect system input and output data in different environments; 1.2 Establish a mathematical model of the controlled object; Step 2: Design the GRU prediction neural network. 2.1 Improve the GRU prediction neural network; 2.2 Determine the hyperparameters of the improved GRU prediction neural network; 2.3 Optimize and improve the initial parameters of the GRU neural network through particle swarm algorithm; Step 3: Design a fuzzy PID controller based on improved GRU optimization. Step 4: Collect actual data at set time intervals, use the actual data as the input of the improved GRU neural network, predict the output of the system at the next moment, use the predicted output as the input of the fuzzy PID controller, and obtain the optimal control output of the current system.

2. The method for predicting and controlling the temperature of an extruder using fuzzy PID based on improved GRU optimization according to claim (1) is characterized in that: in step 1.1, the operating status data of the extruder under different environments are collected.

3. The method for predicting and controlling the temperature of an extruder based on a fuzzy PID optimized GRU according to claim (1) is characterized in that: In step 1.2, the transfer function of the temperature of the extruder heating chamber is selected as a first-order inertia plus hysteresis process, that is: Among them, K is the steady-state gain of the controlled object, T is the inertia time constant, and τ is the lag time. At the same time, in order to better characterize the accuracy of the transfer function, the characteristic parameters K, T, and τ of the transfer function in (3) change dynamically with the changes in the system environment. The characteristic parameters in the system transfer function are calculated in real time based on the actual data collected by the least squares method. The loss function formula of the least squares method is as follows: Among them, N is the actual amount of data collected, R i is the system step response value in the i-th group of data, and K, T, and τ are characteristic parameters. The loss function is derived with respect to K, T, and τ respectively, and the characteristic parameter values ​​are obtained using the gradient descent method. At this time, the system transfer function is determined.

4. The method for predicting and controlling the temperature of an extruder based on a fuzzy PID optimized GRU according to claim (1) is characterized in that: In step 2.1, the GRU neural network is improved by adding a CNN hidden layer. By adding a CNN convolutional neural network hidden layer, abstract features are extracted at different levels of the input data, which helps to fully capture the features in the input data; secondly, the CNN hidden layer can reduce the number of parameters by sharing weights, which helps to reduce the size of the model, improve computational efficiency, and reduce model overfitting.

5. The method for predicting and controlling the temperature of an extruder based on a fuzzy PID optimized GRU according to claim (1) is characterized in that: In step 2.2, through multiple experimental debugging and algorithm iteration, the mean square error of the comprehensive data, the degree of fitting, and the degree of oscillation during training are used to select the hyperparameters of the neural network, including the number of network layers, learning rate, number of iterations, optimizer, sampling time interval, and window length.

6. The method for predicting and controlling the temperature of an extruder based on a fuzzy PID optimized GRU according to claim (1), characterized in that: In step 2.3, the particle swarm algorithm is used to optimize and improve the initial parameters of the GRU neural network to alleviate the problem of falling into the local optimal solution during GRU neural network training. Before training the neural network, the improved particle swarm algorithm is used to optimize the initial training parameters. The parameters are the weight values ​​of each layer in the neural network, namely: Where: X i is the position of the ith particle, They refer to the position information in different dimensions respectively, and n refers to the number of training parameters. The particle update formula of the particle swarm algorithm is: V i (t+1)=w*V i (t)+c1*r1*(pbest i -X i (t))+c2*r2*(gbest-X i (t)) Where: V i (t+1) is the velocity of particle i at the next moment, w is the inertia weight, c1 and c2 are acceleration constants, r1 and r2 are random numbers in the range [0,1], and pbest i is the individual optimal position of particle i, gbest is the global optimal position of the entire group, X i (t) is the position of particle i at time t.

7. The method for predicting and controlling the temperature of an extruder based on a fuzzy PID optimized GRU according to claim (1), characterized in that: The fuzzy PID controller designed in step 3 is as follows: There are two input variables of the fuzzy PID controller, namely error e and error change rate ec. The domain of error e is [-20,20], the domain of error change rate is [-5,5], and the number of membership functions is 7, namely [NB, NM, NS, ZO, PS, PM, PB]. The fuzzy PID extruder temperature prediction and control method based on improved GRU is characterized in that: the system dynamic model parameters are calculated according to the actual data collected, the initial control parameters of the fuzzy PID controller are optimized according to the characteristic parameters of the dynamic model, and the improved GRU algorithm is used to predict the temperature of the heating bin at the next moment, and the power of the heating plate is changed through feedback regulation to maintain the temperature at the set value, thereby enhancing the stability of the heating bin heating process and reducing the overshoot in the control process.

Citation Information

Patent Citations

  • Short-term power load prediction method based on CNN-IPSO-GRU hybrid model

    CN111738512A

  • Second-order inertia pure lag intelligent cascade control system and control method thereof

    CN113485093A

  • Intelligent coal slime water dosing control method based on GRU-Attention and adaptive fuzzy PID

    CN114706293A

  • Intelligent constant-temperature control method based on low-temperature constant-temperature bath

    CN117891286A

  • Automatic monitoring control system for bulking machine

    CN201732280U