PID control principle and characteristics
In practical engineering, the most widely used regulator control law is proportional-integral-derivative control, abbreviated as PID control, also known as PID regulation. The PID controller has been around for nearly 70 years, and its simple structure, good stability, reliable operation, and convenient adjustment have made it one of the main technologies in industrial control.
When the structure and parameters of the controlled object are not fully understood, or when a precise mathematical model is unavailable, and other control theory techniques are difficult to apply, the system controller structure and parameters must be determined based on experience and on-site debugging. In this case, PID control technology is the most convenient. That is, when we do not fully understand a system and the controlled object, or when we cannot effectively measure the system parameters, PID control technology is most suitable. In practice, PI and PD control also exist. The PID controller addresses the system error by using proportional, integral, and derivative calculations to determine the control quantity.
1. Proportional control (P):
Proportional control is one of the most commonly used control methods. For example, if we want to control a heater to maintain a constant temperature of 100 degrees Celsius, when heating begins, the temperature is far from the target temperature. We would typically increase the heating to rapidly raise the temperature. Once the temperature exceeds 100 degrees Celsius, we would shut off the output. We would usually use a function like this...
e(t) = SP – y(t)
u(t)=e(t)*P
SP - Setting Value
e(t) — Error value
y(t) — Feedback value
u(t) — Output value
P – Proportional coefficient
For controlled objects with minimal lag, proportional control can meet the control requirements. However, many controlled objects exhibit lag.
In other words, if the set temperature is 200 degrees, when using proportional control, if P is selected to be relatively large, the temperature will continue to rise even after the output reaches 0 at 200 degrees, for example, to 230 degrees. When the temperature exceeds 200 degrees by too much, it will start to fall back down. Although the output will start to heat at this time, the temperature will still fall down to a certain temperature before it stops falling and starts to rise again, for example, to 170 degrees. Finally, the entire system will stabilize and oscillate within a certain range.
If the amplitude of this oscillation is permissible, such as in the control of household appliances, then proportional control can be used.
2. Proportional-Integral (PI) Control:
The integral function is an improvement proposed to address the characteristic of proportional control, which is that it either produces a difference or oscillates. It is often used in conjunction with proportional control, which is called PI control.
There are many formulas, but most are not very different. The standard formula is as follows:
u(t)=Kp*e(t)+Ki∑e(t)+u0
u(t) — Output
Kp — Scale factor
Ki — Integral amplification factor
e(t) — Error
u0 — Control quantity reference value (basic deviation)
As you can see, the integral term is a cumulative value of historical error. If we only use proportional control, we know that either the setpoint won't be reached or there will be oscillation. Using the integral term solves the static error problem of not reaching the setpoint. For example, in a PI control system, if a static error exists, the output will consistently fail to reach the setpoint. In this case, the cumulative error of the integral term will increase. This cumulative value, multiplied by Ki, will take up a larger and larger proportion of the output, causing the output u(t) to increase, ultimately eliminating the static error.
When PI and PI are used together, our adjustment method is as follows:
1. First, set the I value to 0 and increase the P value to a relatively large value. When stable oscillation occurs, we decrease the P value until the P value stops oscillating or the oscillation is very small (the technical term is critical oscillation state). In some cases, we can increase the P value a little more.
2. Increase the value of I until the output reaches the set value.
3. After the system cools down, power it back on and check if the system overshoot is too large or the heating speed is too slow.
Through the debugging process described above, we can see that the P value is mainly used to adjust the system's response speed, but if it is too large, it will increase the overshoot and settling time; while the I value is mainly used to reduce static error.
PID algorithm
Currently, control points utilize three relatively simple PID control algorithms: incremental algorithm, positional algorithm, and derivative-first algorithm. These three are the simplest basic algorithms, each with its own characteristics, and generally can meet most control requirements.
1. PID Incremental Algorithm
Discretization formula (Note: The meanings of each symbol are as follows):
u(t) ----- The output value of the controller.
e(t) ----- The error between the controller input and the set value.
Kp-------Proportional coefficient.
Ti-------Integral time constant.
Td-------Differential time constant.
T--------Adjustment period.
2. Integral Separation Method
Discretization formula:
Δu(t)=q0e(t)+q1e(t-1)+q2e(t-2)
When |e(t)|≤β
q0=Kp(1+T/Ti+Td/T)
q1 = -Kp(1 + 2Td/T)
q2=KpTd/T
When |e(t)|>β
q0=Kp(1+Td/T)
q1 = -Kp(1 + 2Td/T)
q2=KpTd/T
u(t) = u(t-1) + Δu(t)
Note: The meanings of each symbol are as follows:
u(t) ----- The output value of the controller.
e(t) ----- The error between the controller input and the set value.
Kp-------Proportional coefficient.
Ti-------Integral time constant.
Td ------- Differential time constant. (Sometimes represented by "Kd")
T--------Adjustment period.
β-------Integral separation threshold
3. Differential-first PID algorithm
Discretization formula:
u(t) ----- The output value of the controller.
e(t) ----- The error between the controller input and the set value.
Kp-------Proportional coefficient.
Ti-------Integral time constant.
Td ------- Differential time constant. (Sometimes represented by "Kd")
T--------Adjustment period.
β-------Integral separation threshold
PID control:
Because the presence of I in a PI system affects the response speed of the entire control system, we add a D derivative term to the control to address this issue. The derivative term is mainly used to solve the system's response speed problem, and its complete formula is as follows:
u(t)=Kp*e(t)+Ki∑e(t)+Kd[e(t)–e(t-1)]+u0
During PID debugging, we should pay attention to the following steps:
1. Turn off I and D, that is, set them to 0. Increase P to make it oscillate;
2. Decrease P to find the critical oscillation point;
3. Increase I to reach the target value;
4. Re-power on and check if the overshoot, oscillation, and settling time meet the requirements;
5. To address overshoot and oscillation issues, appropriately increase some differential terms;
6. Note that all debugging should be performed under maximum load conditions to ensure that the results are valid throughout the entire operating range.
PID controller parameter tuning:
PID controller parameter tuning is a core aspect of control system design. It involves determining the proportional gain, integral time, and derivative time of the PID controller based on the characteristics of the controlled process.
There are many methods for tuning PID controller parameters, which can be broadly categorized into two types: The first is the theoretical calculation tuning method. This method primarily relies on the system's mathematical model to theoretically calculate and determine the controller parameters. However, the calculated data obtained using this method may not be directly usable and must be adjusted and modified based on actual engineering practice. The second method is the engineering tuning method, which mainly depends on engineering experience and is performed directly in system experiments. This method is simple, easy to master, and widely used in practical engineering.
There are three main methods for engineering tuning PID controller parameters: the critical proportional method, the response curve method, and the decay method. Each method has its own characteristics, but they all involve experimentation followed by the use of empirical formulas to tune the controller parameters. However, regardless of the method used, the resulting controller parameters still require final adjustments and refinements during actual operation. Currently, the critical proportional method is generally used. This method is employed for...
The steps for tuning PID controller parameters are as follows:
(1) First, pre-select a sufficiently short sampling period for the system to operate;
(2) Add only the proportional control loop until the system exhibits critical oscillation in response to the input step, and record the proportional amplification factor and the critical oscillation period at this point;
(3) The formula is used to calculate the PID controller parameters under a certain degree of control.
Disclaimer: This article is a reprint. If there are any copyright issues, please contact us promptly for deletion (QQ: 2737591964). We apologize for any inconvenience.