Share this

PID parameter tuning tips

2026-04-06 03:12:43 · · #1

(I) Basic Overview of PID:

1. PID is a closed-loop control algorithm. Therefore, to implement the PID algorithm, closed-loop control must be implemented in the hardware, meaning there must be feedback. For example, to control the speed of a motor, there must be a sensor to measure the speed and feed the result back to the control path. The following will also take speed control as an example.

2. PID stands for Proportional (P), Integral (I), and Derivative (D) control algorithms. However, it's not necessary to have all three algorithms simultaneously; it can also be PD, PI, or even just P-based control. My simplest understanding of closed-loop control used to be that it only involved P control: feeding back the current result, subtracting it from the target, and if the result was positive, decelerating and if negative, accelerating. Now I know this is only the simplest closed-loop control algorithm. 3. Proportional (P), Integral (I), and Derivative (D) control algorithms each have their own functions:

The ratio reflects the basic (current) deviation e(t) of the system. A large coefficient can speed up the adjustment and reduce the error, but an excessively large ratio will reduce the stability of the system and even cause the system to become unstable.

Integral control reflects the cumulative deviation of the system, enabling the system to eliminate steady-state error and improve its error-free performance. Because there is an error, integral control is performed until there is no error.

The derivative, reflecting the rate of change of the system deviation signal e(t)-e(t-1), has predictive power, anticipating the trend of deviation changes and generating proactive control. Before the deviation even forms, it is eliminated by the derivative adjustment, thus improving the system's dynamic performance. However, the derivative amplifies noise interference, and strengthening the derivative is detrimental to the system's anti-interference capabilities.

Integral and derivative functions cannot function independently; they must be used in conjunction with proportional control. 4. Selection of P, I, D parameters for the controller: Optimal PID parameters should be determined based on the actual target system. (II) Characteristics of commonly used control laws: 1. Proportional control law (P): The P control law can overcome the influence of disturbances relatively quickly. It acts on the output value quickly, but it cannot stabilize at an ideal value well. A negative result is that although it can effectively overcome the influence of disturbances, there is a residual error. It is suitable for situations where the control channel lag is small, the load change is small, the control requirements are not high, and the controlled parameter is allowed to have a residual error within a certain range. For example: water level control of cold and hot water tanks in water pump rooms; oil level control of intermediate oil tanks in oil pump rooms, etc.

2. Proportional-Integral (PI) Control Law: In engineering, proportional-integral (PI) control is the most widely used control law. The integral component eliminates steady-state error based on the proportional component, making it suitable for applications with small control channel lag, minimal load changes, and where steady-state error is not permitted for the controlled parameter. Examples include flow control systems, oil pump room supply pipe flow control systems, and temperature regulation systems.

3. Proportional-Derivative (PD) Control Law: The derivative has a leading effect. For control channels with capacity lag, introducing the derivative into the control can significantly improve the dynamic performance of the system when the derivative term is set properly. Therefore, for situations where the time constant or capacity lag of the control channel is large, PD can be used to improve system stability and reduce dynamic deviation. Examples include heating temperature control and composition control. It should be noted that the derivative term is ineffective in regions with large pure time lag, and it is also unsuitable for systems where the measurement signal is noisy or experiences periodic vibrations. For example, in the control of glass level in a large kiln.

4. Example: Integral-Derivative Control (PID): PID control is a relatively ideal control method. It introduces integral action on top of proportional action to eliminate steady-state error, and adds derivative action to improve system stability. It is suitable for applications with large control channel time constants or capacity lags and high control requirements, such as temperature control and composition control. Given the role of PID control, we must also understand the concept of time lag, which includes capacity lag and pure lag. Capacity lag typically includes measurement lag and transmission lag. Measurement lag occurs when the sensing element needs to establish an equilibrium during detection, such as the slow response of thermocouples, resistance temperature detectors, and pressure sensors. Transmission lag, on the other hand, is a control lag generated by sensors, transmitters, actuators, and other equipment. Pure lag is relative to measurement lag. In industry, most pure lag is due to material transmission, such as in the case of glass level in a large kiln, where a long time is required from the start of the feeding machine to detection by the nuclear level gauge. In summary, the selection of a control law should be based on process characteristics and technological requirements. It is unwise to assume that PID control performs well in all situations and to use it indiscriminately. Doing so will only increase complexity and make parameter tuning more difficult. When PID controllers are insufficient to meet process requirements, other control schemes should be considered, such as cascade control, feedforward control, and large time delay control.

5. Formula:

Calculation of numerical PID:

6. Problem. Setting the three parameters Kp, Ti, and Td is a key issue in PID control algorithms. Generally, only approximate values ​​can be set during programming, and the optimal values ​​are determined through repeated debugging during system operation. Therefore, the program must be able to modify and remember these three parameters at any time during the debugging phase. 7. Parameter Self-Tuning. In some applications, such as the general instrumentation industry, the working object of the system is uncertain. Different objects require different parameter values, making it impossible to set parameters for the user. Therefore, the concept of parameter self-tuning is introduced. Essentially, it involves finding a set of parameters for a new working object through N measurements during initial use and remembering them as a basis for future operation. 8. PID Algorithm Flowchart:

(III) PID parameter tuning formula:

To find the optimal parameters, check them in ascending order: first proportional, then integral, and finally derivative. If the curve oscillates frequently, enlarge the proportional gain; if the curve floats and zigs around, reduce the proportional gain; if the curve deviates and recovers slowly, decrease the integral time; if the curve oscillates for a longer period, increase the integral time; if the curve oscillates faster, first decrease the derivative time; if the momentum is large, the oscillation will be slower. The derivative time should be increased. The ideal curve has two waves: a high first wave and a low second wave. A four-to-one ratio (high at the beginning, low at the end) is recommended. Observe, adjust, and analyze extensively; this will ensure high-quality adjustment.

To accelerate the reaction, increase P and decrease I.

To slow down the reaction, decrease P and increase I.

If the proportion is too large, it will cause systemic oscillations.

If the integral is too large, it will cause the system to become sluggish.

Read next

CATDOLL 136CM Vivian (Customer Photos)

Height: 136cm Weight: 23.3kg Shoulder Width: 31cm Bust/Waist/Hip: 60/54/68cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22