PID parameter control method based on neural network optimization

By optimizing the PID parameters through the neural network and dealing with the influence of adverse factors, the minimum steady-state error in the process of the turntable equipment reaching the target speed is achieved, which solves the problem of difficulty in achieving smooth control with PID parameter setting in the existing technology and improves the accuracy of the control process. sex and stability.

CN118732484APending Publication Date: 2024-10-01JIUJIANG PRECISION MEASURING TECH RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410853727.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In PID parameter control, it is difficult to find suitable parameters to achieve smooth control of turntable equipment. Existing methods rely on a large number of experiments and experience, and manual experience inference is not accurate enough.

Method used

The PID parameter optimization method based on neural network is adopted. By designing the neural network model and using the historical data learning rules, the parameter settings of proportional gain Kp, integral gain Ki and differential gain Kd are optimized, and a penalty term is introduced to deal with the influence of unfavorable factors to realize the turntable equipment. The minimum steady-state error in reaching the target rate.

Benefits of technology

It achieves smooth control of the turntable equipment with minimum steady-state error at the specified target rate, improves the accuracy and stability of the control process, reduces the influence of factors, and is more accurate than manual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118732484A_ABST
    Figure CN118732484A_ABST
Patent Text Reader

Abstract

The invention discloses a PID (Proportion Integration Differentiation) parameter control method based on neural network optimization, which relates to the technical field of PID parameter control and comprises the following steps of: (1) setting N pieces of sample data; (2) designing a neural network, including the following steps: setting an input layer; setting a hidden layer; setting an output layer; establishing a dichotomy cross entropy loss function; an SGD optimizer is used; (3) designing a loss function; according to the method, the turntable equipment can be stably controlled according to the self-specified target rate value, namely, the minimum steady-state error in the process that the turntable equipment reaches the target rate can be realized under the condition that the pid parameter is set, the stable control of the process can be realized, and new sample data can be accurately deduced by utilizing the neural network technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of PID parameter control, and in particular to a PID parameter control method based on neural network optimization. Background Art

[0002] PID parameters are a common method for achieving stable control of controllers in closed-loop systems. The purpose of PID parameters is to make a target variable value obtain a relatively "stable" value; there is no standard rule for setting a more reasonable value for PID parameters (kp, ki, kd), and it is often necessary to make decisions based on a lot of experiments and experience; therefore, it is difficult to find a suitable parameter to achieve stable control of the controller.

[0003] Neural network technology in machine learning is a method of inferring results based on the rules of existing data. Its essence is to extract multiple influencing factors for the result, add a coefficient value to each influencing factor, and continuously adjust these coefficient values ​​to train and learn to obtain multiple coefficient values ​​that best match the result, so that the result inference is more accurate; the advantage of neural network technology is that a large amount of historical data can be used to learn data rules to accurately infer new sample data, and the learned data rules are objective extractions of the essence of the data rather than empirical inferences, so the results will be more accurate than manual experience; based on this, the present invention applies neural network technology to the modulation process of PID parameters, and the scenario is the rate control of turntable equipment; the turntable equipment can achieve smooth control according to the target rate value specified by itself, so it is necessary to specify the pid parameters to implement this process, and use neural networks to optimize the setting of pid parameters. Summary of the invention

[0004] Based on the above technical problems, the present invention enables the turntable equipment to achieve smooth control according to the self-specified target rate value, that is, under the PID parameter setting, the turntable equipment can achieve the minimum steady-state error in the process of reaching the target rate, thereby achieving smooth control of the process.

[0005] The scheme used in the present invention is: a PID parameter control method based on neural network optimization, comprising the following steps: Set N sample data: The required prepared data is N sample data, each of which is the process of the turntable equipment reaching the target rate. The data items that need to be recorded are the pid parameter values ​​used to reach the target rate this time. The pid parameter values ​​include: proportional gain Kp, integral gain Ki and differential gain Kd; the result of each sample is defined as a binary classification task, marked as 1 and 0 respectively, representing that based on the current pid parameters, the process of reaching the target rate is relatively ideal, that is, if there is no or a small steady-state error, the sample result needs to be marked as 1, otherwise it is marked as 0.

[0006] Designing a neural network involves the following steps: S10: Setting the input layer; the input layer includes: setting 3 input nodes to express the three parameters of pid; S20: Setting the hidden layer; the hidden layer includes: adding two hidden layers, each layer contains 8 neurons, and uses the ReLU activation function; S30: Setting the output layer; the output layer includes: setting 1 output node, using the Sigmoid activation function, and limiting the output value between 0 and 1; S40: Establish a binary cross entropy loss function; S50: Use SGD optimizer; Design loss function; Considering that the process of the turntable equipment reaching the target speed is affected by many factors, such as the equipment's own resistance, in order to reduce the impact of other unfavorable factors, when designing the objective function of the neural network, it is planned to add a penalty term to specifically deal with the impact of one or more unfavorable factors on the result. The design of the loss function is as follows: First, use the binary cross entropy loss function as the overall optimization strategy: ; Secondly, the penalty term for dealing with the impact of adverse factors is introduced: ; λ d is the coefficient of the penalty term, which is used to control the penalty intensity value, d i is the expression of the unfavorable factors of the i-th sample; The total loss function is: ; Expand each item to: .

[0007] At this point, the neural network structure is trained and the loss curve is drawn. When the model loss value reaches convergence, the current input neuron coefficient value is recorded, which is the optimal pid parameter value under the optimal model scenario. This parameter set can make the model accuracy reach the optimal state, that is, under the pid parameter setting, the turntable equipment can achieve the minimum steady-state error in the process of reaching the target rate, thereby achieving smooth control of the process.

[0008] The beneficial effects brought by the present invention are: (1) based on neural network technology, a large amount of historical data can be used to learn data patterns to accurately infer new sample data, and the learned data patterns are objective extractions of the essence of the data rather than empirical inferences, so the results are more accurate than manual experience; (2) a penalty term is added to specifically deal with the impact of one or more unfavorable factors on the results, thereby reducing the impact of multiple factors on the process of the turntable equipment reaching the target rate; (3) under the pid parameter setting, the turntable equipment can achieve the minimum steady-state error in the process of reaching the target rate, thereby achieving smooth control of the process. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 It is a schematic diagram of the structural framework of the present invention. DETAILED DESCRIPTION

[0010] The neural network technology is applied to the modulation process of PID parameters. The scenario is the rate control of the turntable equipment. The turntable equipment can achieve stable control according to the target rate value specified by itself. Therefore, it is necessary to specify the pid parameters to implement this process. The neural network is used to optimize the setting of the pid parameters. The process is as follows: The PID parameter control method based on neural network optimization includes the following steps: Set N sample data: The required prepared data is N sample data, each of which is the process of the turntable equipment reaching the target rate. The data items that need to be recorded are the pid parameter values ​​used to reach the target rate this time. The pid parameter values ​​include: proportional gain Kp, integral gain Ki and differential gain Kd; the result of each sample is defined as a binary classification task, marked as 1 and 0 respectively, representing that based on the current pid parameters, the process of reaching the target rate is relatively ideal, that is, if there is no or a small steady-state error, the sample result needs to be marked as 1, otherwise it is marked as 0.

[0011] Designing a neural network involves the following steps: Set up the input layer; the input layer includes: setting up 3 input nodes to express the three parameters of pid; Set up the hidden layer; the hidden layer includes: adding two hidden layers, each containing 8 neurons, using the ReLU activation function; Set up the output layer; the output layer includes: setting up 1 output node, using the Sigmoid activation function, and limiting the output value between 0 and 1; Establish a binary cross entropy loss function; Use the SGD optimizer; Design loss function; Considering that the process of the turntable equipment reaching the target speed is affected by many factors, such as the equipment's own resistance, in order to reduce the impact of other unfavorable factors, when designing the objective function of the neural network, it is planned to add a penalty term to specifically deal with the impact of one or more unfavorable factors on the result. The design of the loss function is as follows: First, use the binary cross entropy loss function as the overall optimization strategy: ; Secondly, the penalty term for dealing with the impact of adverse factors is introduced: ; λ d is the coefficient of the penalty term, which is used to control the penalty intensity value, d i is the expression of the unfavorable factors of the i-th sample; The total loss function is: ; Expand each item to: .

[0012] At this point, the neural network structure is trained and the loss curve is drawn. When the model loss value reaches convergence, the current input neuron coefficient value is recorded, which is the optimal pid parameter value under the optimal model scenario. This parameter set can make the model accuracy reach the optimal state, that is, under the pid parameter setting, the turntable equipment can achieve the minimum steady-state error in the process of reaching the target rate, thereby achieving smooth control of the process.

Claims

1. A PID parameter control method based on neural network optimization, characterized in that: The following steps are involved:

1. Set N pieces of sample data; Each piece of sample data is the process of the turntable equipment reaching the target speed; Record the pid parameter value used each time to reach the target rate, and pid includes three parameters. Based on the current pid parameter each time, mark the sample result as 1 or 0; (ii) Designing a neural network includes the following steps: S10: Set the input layer; S20: set hidden layer; S30: set the output layer; S40: Establish a binary cross entropy loss function; S50: Use optimizer; 3. Design loss function; Use the binary cross entropy loss function as the overall optimization strategy: ; After introducing the penalty term to deal with the impact of adverse factors, the total loss function is: ; After expanding each item: 。 2. The PID parameter control method based on neural network optimization according to claim 1 is characterized in that: In step (i), the pid parameter values ​​used to record the target rate include: proportional gain Kp, integral gain Ki and differential gain Kd. The result of each sample is defined as a binary classification task, marked as 1 and 0 respectively.

3. The PID parameter control method based on neural network optimization according to claim 2 is characterized in that: Based on the current pid parameters, the process of reaching the target rate is relatively ideal, that is, if there is no or a small steady-state error, the sample result needs to be marked as 1, otherwise it is marked as 0.

4. The PID parameter control method based on neural network optimization according to claim 1 is characterized in that: When designing a neural network, in step S10, the input layer includes: setting 3 input nodes to express the three parameters of pid.

5. The PID parameter control method based on neural network optimization according to claim 1 is characterized in that: When designing a neural network, in step S20, the hidden layer includes: adding two hidden layers, each layer contains 8 neurons, and using a ReLU activation function.

6. The PID parameter control method based on neural network optimization according to claim 1 is characterized in that: When designing a neural network, in step S30, the output layer includes: setting 1 output node, using a Sigmoid activation function, and limiting the output value between 0 and 1.

7. The PID parameter control method based on neural network optimization according to claim 1 is characterized in that: When designing a neural network, in step S50, the optimizer used is the SGD optimizer.

8. The PID parameter control method based on neural network optimization according to claim 1 is characterized in that: When designing the loss function, a penalty term is added to specifically deal with the impact of one or more unfavorable factors on the results. The penalty term introduced to deal with the impact of unfavorable factors is: 。 9. The PID parameter control method based on neural network optimization according to claim 8, characterized in that: λ d is the coefficient of the penalty term, which is used to control the penalty intensity value, d i It is the expression of the unfavorable factor of the i-th sample.