PID control algorithm based on BP neural network

Through the PID control algorithm based on BP neural network, the complex temperature control problem during vacuum concentration is solved, and higher control accuracy and stability are achieved, and robustness and automation are enhanced.

CN119805918APending Publication Date: 2025-04-11NO 703 RES INST OF CHINA SHIPBUILDING IND CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411959775.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

During vacuum concentration, temperature control is complex and has the characteristics of large time lag and nonlinearity, and it is difficult for the prior art to achieve precise control.

Method used

Adaptive control algorithm based on BP neural network is adopted to determine the structure of the BP neural network, calculate the input and output, optimize the weighting coefficients, and realize adaptive control.

Benefits of technology

It improves control accuracy and stability, enhances robustness, optimizes resource utilization, has a high level of automation, and improves the overall performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119805918A_ABST
    Figure CN119805918A_ABST
Patent Text Reader

Abstract

The invention relates to a PID control algorithm based on a BP neural network, and belongs to the technical field of intelligent control. The method comprises the steps of 1, determining a BP neural network structure; 2, calculating input and output of each layer of the BP neural network; and 3, calculating a weighting coefficient. Based on the combination of BP-ANN predictive control and PID control, the control performance of the system can be significantly improved, and the production efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a control algorithm based on a neural network, belonging to the technical field of intelligent control. Background Art

[0002] The vacuum concentration process is complex, and the temperature control of the concentration equipment is the key point of the entire process. The temperature of the concentration equipment is affected by the comprehensive influence of the steam system, vacuum system, and cooling water system (each system is a time-varying system), and the control requires precision. The temperature control requirements at different process nodes are different, and the control algorithms are also different. Temperature control itself has the characteristics of large time lag and nonlinearity. Therefore, using artificial intelligence technology to improve the control quality of production has broad application prospects.

[0003] Therefore, it is urgent to propose a PID control algorithm based on BP neural network to solve the above technical problems. Summary of the invention

[0004] To solve the above problems, a PID control algorithm based on BP neural network is provided. A brief summary of the present invention is given below to provide a basic understanding of certain aspects of the present invention. It should be understood that this summary is not an exhaustive summary of the present invention. It is not intended to determine the key or important parts of the present invention, nor is it intended to limit the scope of the present invention.

[0005] The technical solution of the present invention:

[0006] A PID control algorithm based on BP neural network includes the following steps:

[0007] Step 1: Determine the BP neural network structure;

[0008] Step 2: Calculate input and output;

[0009] Step 3: Calculate the weighting coefficient.

[0010] Preferably, in step 1, the BP neural network is set to be a three-layer BP network, including an input layer, an output layer and a hidden layer, and M input layer nodes, Q hidden layer nodes and N output nodes are set, and the two output nodes are vacuum degree P and S and stability S, the excitation function of the hidden layer can be a positive and negative symmetric Tanh function, and the excitation function is a non-negative Sigmoid function.

[0011] Preferably: in step 2, the neural network has M inputs and two outputs (PS, S), and the forward calculation formula of the neural network at any sampling time k is as follows:

[0012] The following steps are involved:

[0013] Step 2.1: Calculate the input of the input layer;

[0014] Step 2.2: Calculate the input and output of the hidden layer;

[0015] Step 2.3: Calculate the input and output of the output layer.

[0016] Preferably: In step 2.1, the input of the network input layer is:

[0017]

[0018] Preferably: In step 2.2, the input and output algorithms of the network hidden layer are:

[0019]

[0020] In the formula, w ij It represents the weight coefficient from the jth neuron to the ith neuron in the hidden layer. The activation function of the neurons in the hidden layer takes the positive and negative symmetric Tanh function:

[0021]

[0022] Preferably: In step 2.3, the input and output algorithms of the network output layer are:

[0023]

[0024] In the formula, is the weighted coefficient from the hidden layer to the output layer, and the output layer neuron activation function takes the non-negative Tanh function:

[0025]

[0026] Preferably: in step 3, the performance indicator function is:

[0027]

[0028] According to the steepest descent method, the weighted coefficients of the network are modified, and an inertia term is added to make the search converge quickly to the global minimum, then:

[0029]

[0030] Where η is the learning rate; α is the inertia coefficient;

[0031]

[0032] because is unknown, so we can approximate it using the symbolic function replace;

[0033] make:

[0034]

[0035] The calculation formula of the weighted coefficient of the output layer of the BP neural network is:

[0036]

[0037] Similarly, the calculation formula of the hidden layer weight coefficient is:

[0038]

[0039] in,

[0040] The present invention has the following beneficial effects:

[0041] The present invention improves control accuracy and stability: the BP neural network optimizes PID control parameters through self-learning ability, and can better adapt to complex, nonlinear or time-varying system characteristics, thereby improving control accuracy and system stability;

[0042] The present invention enhances robustness: BP neural network PID control has strong adaptability and robustness, can maintain good control effect under different working conditions, and reduce control failure caused by environmental changes or system parameter fluctuations;

[0043] The present invention optimizes resource utilization: by accurately controlling equipment operating parameters (such as steam regulating valves, the number of vacuum pump groups, etc.), it can effectively reduce energy consumption and improve production efficiency and economic benefits;

[0044] The present invention has a high level of automation: the intelligent module can automatically complete the generation and execution of control strategies, reducing the reliance on manual experience;

[0045] The present invention improves the overall performance of the system: by combining the advantages of BP neural network and PID control, a more efficient control strategy can be implemented to meet the needs of complex industrial processes. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a BP-ANN network model;

[0047] Figure 2 It is a predictive control flow chart. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is described below by the specific embodiments shown in the accompanying drawings. However, it should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0049] Specific implementation method 1: Combination Figure 1-2 The present embodiment is described as follows: a PID control algorithm based on a BP neural network in the present embodiment comprises the following steps:

[0050] Step 1: Determine the BP neural network structure;

[0051] In step 1, the BP neural network is set to be a three-layer BP network, including an input layer, an output layer and a hidden layer. M input layer nodes (input layer), Q hidden layer nodes (hidden layer) and N output nodes (output layer) are set. The two output nodes are vacuum degree P and S and stability S, the activation function of the hidden layer can be a positive and negative symmetric Tanh function, and the activation function is a non-negative Tanh function;

[0052] Step 2: Calculate the input and output of each layer of the BP neural network;

[0053] The number of input layer nodes M in the input layer is consistent with the number of input variables, and the number of output layer nodes N is consistent with the number of output variables in the output layer; suppose N=2, the neural network has M inputs and two outputs (PS, S), and the forward calculation formula of the neural network at any sampling time k is as follows:

[0054] Input to the network input layer:

[0055]

[0056] Where K represents the number of iterations, and e represents the error (the error between the output and the expected output);

[0057] Input and output algorithm of the network hidden layer:

[0058]

[0059] In the formula, represents the input of the i-th neuron in the hidden layer, represents the weight connecting the previous layer neuron i and the current layer neuron j, represents the Qth neuron in the hidden layer, Q represents a custom variable, represents the output of the i-th neuron in the hidden layer, w ij It represents the weight coefficient from the jth neuron to the ith neuron in the hidden layer. The activation function of the neurons in the hidden layer takes the positive and negative symmetric Tanh function:

[0060]

[0061] In the formula, x represents the independent variable of the function;

[0062] Input and output algorithm of the network output layer:

[0063]

[0064] In the formula, is the weighted coefficient from the hidden layer to the output layer, and the output layer neuron activation function takes the non-negative Tanh function:

[0065]

[0066]

[0067] In the formula, Indicates the output vacuum degree P of the output layer S , Output stability S of the output layer;

[0068] Step 3: Calculate the weighting coefficient;

[0069] Performance indicator function:

[0070]

[0071] In the formula, r(k+1) represents the expected output of the k+1th step, and y(k+1) represents the actual output of the k+1th step;

[0072] According to the steepest descent method, the weighted coefficients of the network are modified, and an inertia term is added to make the search converge quickly to the global minimum, then:

[0073]

[0074] Where η is the learning rate; α is the inertia coefficient; Represents the sign of partial derivative, Δ represents the update amount of weight;

[0075]

[0076] In the formula, represents the output of the i-th neuron in the output layer, Represents the input of the lth neuron in the output layer;

[0077] because is unknown, so we can approximate it using the symbolic function replace;

[0078] make:

[0079]

[0080] In the formula, g represents the output layer activation function, and δl represents the error term;

[0081] The calculation formula of the weighted coefficient of the output layer of the BP neural network is:

[0082]

[0083] Similarly, the calculation formula of the hidden layer weight coefficient is:

[0084]

[0085] in,

[0086] Where: represents the error term, and f represents the hidden layer activation function;

[0087] Basic control is the strategy execution technology of the control layer in intelligent control systems;

[0088] Information perception (sensor signal) and conversion: including the concentration equipment temperature, pressure, liquid level, stability (defoaming frequency); steam system pressure, cooling water system temperature, pressure; vacuum system vacuum degree and other input signals; equipment vacuum degree P S As well as the equipment operation stability S as the goal, switch and adjust the steam control valve TCV, the number of vacuum pump groups running N P , number of cooling water pump groups running N L , frequency conversion signal FC and pump fault status P F etc. grammatical information;

[0089] The present invention is applied to the process flow and control parameters of the vacuum concentration system, sets logical rules, generates control strategies, and further converts them into execution actions; through BP-ANN (neural network) predictive control;

[0090] The typical BP-ANN network is divided into three layers, namely the input layer, hidden layer and output layer. Its algorithm mainly consists of the following four parts, namely pattern forward propagation - error back propagation - memory training - learning convergence;

[0091] The PID control algorithm based on BP neural network can be summarized as follows: ① Select the structure of BPNN, that is, select the number of input layer nodes M and the number of hidden layer nodes Q, and give the initial value of the weight coefficient of each layer Select the learning rate η and the inertia coefficient α; ② Sample r(k) and y(k), and calculate e(k) = r(k)-y(k); ③ Normalize r(i), y(i), e(i) (i = kk-1..., kp) as the input of BPNN; ④ Calculate the input and output of each layer of neurons in BPNN, and the output vacuum degree P of the output layer S, stability S; ⑤ Calculate the output u(k) of the controller, participate in control and calculation; ⑥ Calculate the weighted coefficient of the modified output layer; ⑦ Calculate the weighted coefficient of the modified hidden layer: ⑧ Set k = k + 1. Return to ②;

[0092] The intelligent module is used to design and implement the steady pressure prediction function of the concentrator operation. It takes the pre-trained BP-ANN as the core, accepts the neural network input variable information, and converts and verifies the network output;

[0093] Using the information perception module and information conversion module, the temperature T and jacket pressure P of the concentrator system are converted into feature quantities as the input information of BP-ANN.

[0094] Analyze and process historical data to train and generate BP-ANN. Through the above information input network, predict the output vacuum degree PS and stability S, integrate feedback deviation to generate control signal; Strategy feasibility test: compare PID and model predictive control effects;

[0095] A PID control algorithm based on BP neural network is applied to BP-ANN neural network modeling. A method for establishing an intelligent control model of a vacuum concentration system includes the following steps:

[0096] Step 1: Data collection: In the vacuum concentration system, operating data including equipment temperature T, jacket pressure P, vacuum degree Ps, and system stability S are collected;

[0097] Step 1 includes the following specific collection process steps:

[0098] Step 1.1: Record the real-time changes of equipment temperature T and jacket pressure P through high-precision sensors;

[0099] Step 1.2: Use a vacuum pressure sensor to measure the vacuum degree Ps;

[0100] Step 1.3: Define and quantify stability S based on the system oscillation level and key performance indicators;

[0101] Step 1.4: The data collection frequency is set to once every 5 seconds, covering the dynamic characteristics of the system in different operating modes; in order to more clearly show the system behavior, such as Figure 2 As shown, the trend chart of the first 1000 sets of data is drawn to show the changing trends of equipment temperature, jacket pressure, vacuum degree and stability;

[0102] Step 2: BP-ANN neural network modeling, an artificial neural network (ANN) based on the BP algorithm was selected to establish a prediction model, which takes the equipment temperature T and the jacket pressure P as input and predicts the vacuum degree Ps and the system stability S as output;

[0103] Step 2 includes the following modeling process steps:

[0104] Step 2.1: Data preprocessing;

[0105] In step 2.1, data standardization is performed to ensure that the input variables and output variables are within similar numerical ranges, thereby improving the convergence speed and prediction accuracy of the model;

[0106] The data was divided into training set (70%), validation set (15%) and test set (15%) to ensure that the model has good generalization ability;

[0107] Step 2.2: Network architecture design;

[0108] In step 2.2, the input layer contains M nodes (equipment temperature T and jacket pressure P);

[0109] The hidden layer is set to 1 layer, each layer contains 10 neurons, and the activation function uses the positive and negative symmetric Tanh function;

[0110] The output layer contains 2 nodes, corresponding to the predicted vacuum degree Ps and stability S, respectively, and the activation function is a non-negative Tanh function;

[0111] Step 2.3: Model training;

[0112] In step 2.3, the loss function uses mean square error (MSE);

[0113] The optimizer selects the Adam algorithm and the learning rate is set to 0.001;

[0114] Dynamically adjust hyperparameters during training and monitor the overfitting of the model in real time through the validation set;

[0115] After the training was completed, a comparison chart of the predicted vacuum degree and stability was drawn; the results showed that the model had high prediction accuracy, laying the foundation for the design of control strategies;

[0116] Step 3: Neural network model predictive control, including the following steps:

[0117] Step 3.1: Predict the vacuum degree Ps and stability S in real time through the BP-ANN model, compare them with the set target values, and calculate the feedforward deviation;

[0118] Step 3.2: Fusion of feedforward and feedback biases via λ∈[0,1];

[0119] Step 3.3: After the total error is input into the controller, the output is the opening of the regulating jacket regulating valve, the number of vacuum pump operations and the number of cooling water pump operations.

[0120] It should be noted that in the above embodiments, as long as the technical solutions are not contradictory, they can be arranged and combined, and those skilled in the art can exhaust all possibilities based on the mathematical knowledge of arrangement and combination. Therefore, the present invention will no longer describe the technical solutions after arrangement and combination one by one, but it should be understood that the technical solutions after arrangement and combination have been disclosed by the present invention.

[0121] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A PID control algorithm based on BP neural network, characterized in that: The following steps are involved: Step 1: Determine the BP neural network structure; Step 2: Calculate input and output; Step 3: Calculate the weighting coefficient.

2. The PID control algorithm based on BP neural network according to claim 1, characterized in that: In step 1, the BP neural network is set to be a three-layer BP network, with M input layer nodes, Q hidden layer nodes and N output nodes. The two output nodes are vacuum degree P S and stability S, the excitation function of the hidden layer can be a positive and negative symmetric Tanh function, and the excitation function is a non-negative Tanh function.

3. A PID control algorithm based on BP neural network according to claim 2, characterized in that: Step 2 The neural network has M inputs and two outputs (PS, S), including the following steps: Step 2.1: Calculate the input of the input layer; Step 2.2: Calculate the input and output of the hidden layer; Step 2.3: Calculate the input and output of the output layer.

4. The PID control algorithm based on BP neural network according to claim 3 is characterized in that: In step 2.1, the input of the network input layer is: In the formula, K represents the number of iterations and e represents the error.

5. The PID control algorithm based on BP neural network according to claim 4 is characterized in that: In step 2.2, the input and output algorithm of the network hidden layer is: In the formula, w ij It represents the weight coefficient from the jth neuron to the ith neuron in the hidden layer. The activation function of the neurons in the hidden layer takes the positive and negative symmetric Tanh function:

6. The PID control algorithm based on BP neural network according to claim 5 is characterized in that: In step 2.3, the input and output algorithm of the network output layer is: In the formula, is the weighted coefficient from the hidden layer to the output layer, and the output layer neuron activation function takes the non-negative Tanh function:

7. A PID control algorithm based on BP neural network according to claim 2 or 6, characterized in that: In step 3, the performance indicator function: According to the steepest descent method, the weighted coefficients of the network are modified, and an inertia term is added to make the search converge quickly to the global minimum, then: Where η is the learning rate; α is the inertia coefficient; because is unknown, so we can approximate it using the symbolic function replace; make: (l=0,1,2) The calculation formula of the weighted coefficient of the output layer of the BP neural network is: Similarly, the calculation formula of the hidden layer weight coefficient is: in, (i=0,1...Q-1).