# A General Method of PID Controller Parameter Tuning

The following is the general method of PID controller parameter tuning:

PID controller parameter tuning is the core content of control system design. It determines the size of the proportional coefficient, integral time and differential time of the PID controller according to the characteristics of the controlled process.

There are many methods for parameter tuning of PID controller, and they can be summarized into two categories: one is theoretical calculation tuning method. It is mainly based on the mathematical model of the system to determine the controller parameters through theoretical calculations.

The calculation data obtained by this method may not be used directly, and must be adjusted and modified through engineering practice. The second is the engineering setting method, which mainly relies on engineering experience and is carried out directly in the test of the control system. The method is simple and easy to master, and is widely used in engineering practice.

The engineering setting methods of PID controller parameters mainly include critical proportion method, response curve method and attenuation method. The three methods have their own characteristics, and their common point is to pass the test, and then adjust the controller parameters according to the engineering experience formula. But no matter which method is used to obtain the controller parameters, it needs to be adjusted and perfected in actual operation. The critical ratio method is generally used now. Using this method to adjust the parameters of the PID controller is as follows:

(1) first pre-select a sufficiently short sampling period to allow the system to work;

(2) only add the proportional control link until the system adjusts the The critical oscillation occurs in the jump response, and the proportional amplification factor and the critical oscillation period at this time are recorded;

(3) The parameters of the PID controller are obtained by calculating the formula under a certain degree of control. The setting of PID parameters:

is to rely on experience and familiarity with the process, refer to the measurement value tracking and the setting value curve, so as to adjust the size of P\I\D.

Proportional I/differential D=2, the specific value can be determined according to the instrument, and then adjust the proportional band P, if P is too high, it will take a long time to reach stability, if P is too short, it will oscillate, and the setting requirements will never be met.

For the engineering setting of PID controller parameters, the empirical data of P.I.D parameters in various regulating systems can be referred to as follows:

Temperature T: P=20~60%, T=180~600s, D=3-180s;

BR> Pressure P: P=30~70%, T=24~180s;

Liquid level L: P=20~80%, T=60~300s;

Flow L: P=40~100% , T=6~60s.

Common formulas in the book:

Find the best parameter setting, search in order from small to large; Zoom in;

The curve floats around the big bay, and the proportional dial is turned to a small one;

The curve deviates slowly, and the integration time decreases;

The curve fluctuation period is long, and the integration time is longer;

The oscillation frequency of the curve Quickly, reduce the differential first;

The movement difference is large and the fluctuation is slow. Derivative time should be extended;

The ideal curve has two waves, the front is high and the back is low

4 to 1;

A look at the two adjustments and more analysis, the adjustment quality will not be low.

The size of the PID parameter setting,

on the one hand, should be determined according to the specific conditions of the control object;

on the other hand, it should be determined by experience.

P is to solve the amplitude oscillation. If P is large, the magnitude of amplitude oscillation will be large, but the oscillation frequency is small, and the system will take a long time to stabilize;

I is to solve the speed of action response. If I is large, the response The speed is slow, otherwise it is fast;

D is to eliminate the static error, generally the D setting is relatively small, and the impact on the system is relatively small.

For the temperature control system, P is between 5-10%; I is between 180-240s; D is below 30. For the pressure control system, P is between 30-60%; I is between 30-90s; D is below 30.

Here is a rule of thumb. This method is essentially a trial and error method, which is an effective method summed up in production practice and has been widely used in the field.

The basic procedure of this method is to first determine a set of regulator parameters based on operating experience, put the system into closed-loop operation, and then artificially add step disturbances (such as changing the given value of the regulator) to observe the adjusted The step response curve of the quantity or regulator output.

If the control quality is considered unsatisfactory, change the regulator parameters according to the influence of each setting parameter on the control process. Repeat the test in this way until you are satisfied.

Empirical method is simple and reliable, but it needs some field operation experience, and it is easy to be subjective and one-sided when setting. When a PID regulator is used, there are multiple tuning parameters, and the number of trial and error increases, making it difficult to obtain the best tuning parameters. The following takes the PID regulator as an example to illustrate the tuning steps of the empirical method:

A. Let the regulator parameter integral coefficient S0=0, the actual differential coefficient k=0, put the control system into closed-loop operation, and change the ratio from small to large Coefficient S1, let the disturbance signal make a step change, observe the control process until a satisfactory control process is obtained.

B. Take the proportional coefficient S1 as the current value multiplied by 0.83, increase the integral coefficient S0 from small to large, and let the disturbance signal change step by step until a satisfactory control process is obtained.

C. Keep the integral coefficient S0 unchanged, change the proportional coefficient S1, observe whether the control process is improved, if there is improvement, continue to adjust until you are satisfied. Otherwise, increase the original proportional coefficient S1, and then adjust the integral coefficient S0, and strive to improve the control process. Repeated trial and error until a satisfactory proportional coefficient S1 and integral coefficient S0 are found.

D. Introduce an appropriate actual differential coefficient k and actual differential time TD. At this time, the proportional coefficient S1 and integral coefficient S0 can be appropriately increased. Same as the previous steps, the setting of the differential time also needs to be adjusted repeatedly until the control process is satisfactory.

PID parameters are determined according to the inertia of the control object. Large inertia such as:

The temperature control of large drying room, generally P can be above 10, I=3-10, D=1 or so. Small inertia such as: a small motor with a water pump for pressure closed-loop control, generally only PI control. P=1-10, I=0.1-1, D=0, these should be corrected during on-site debugging. Yes, depending on the application, PID is composed of three parts: proportional, differential, and integral. In practical applications, only one or two of them are often used, such as P, PI, PD, and PID. It can meet the control requirements…the plc programming instructions will have the PID function instruction…as for the determination of P, I, D values, it must be determined after multiple debugging on site…

Proportional control (P): Proportional control is one of the most commonly used control methods. For example, we control a heater with a constant temperature of 100 degrees. When we start heating, it is far away from the target temperature. When the temperature exceeds 100 degrees, we turn off the output, usually we will use such a function

e(t) = SP – y(t);

u(t) = e(t)*P

SP——set value

e(t)——error value

y(t)——feedback value

u(t)——output value

P——proportional coefficient

The control object whose hysteresis is not very large can meet the control requirements by using the proportional control method, but many controlled objects

have hysteresis. That is, if the set temperature is 200 degrees, when the proportional control is adopted, if the P selection is relatively large, it will appear that when the temperature reaches 200 degrees and the output is 0, the temperature will still climb upwards unstoppably, for example, to 230 degrees, when the temperature exceeds 200 degrees too much, it will start to fall. Although the output starts to heat up at this time, the temperature will still drop to a certain temperature before it will stop falling and rise. For example, it will drop to 170 degrees. Finally, the whole system will Stable and oscillate within a certain range.

If the amplitude of this oscillation is allowed, such as the control of household appliances, then proportional control can be selected.

Proportional-integral control (PI): the existence of integral is for proportional control or there is a difference or not It is the improvement proposed by this characteristic of oscillation, which is often controlled together with the ratio, that is, PI control.

There are many kinds of formulas, but most of them have little difference. The standard formula is as follows:

u(t) = Kp*e(t) + Ki∑e(t) +u0

u(t)— — output

Kp——Proportional amplification factor

Ki——Integral amplification factor

e(t)——Error

u0——Control value reference value (basic deviation)

You can see the integral item It is a cumulative value of historical error. If only proportional control is used, we know that either the set value cannot be reached or the oscillation is. After using the integral term, the static error problem of not reaching the set value can be solved. , for example, after PI control is used in a control, if there is a static error, the output will never reach the set value. At this time, the error accumulation value of the integral item will become larger and larger. After multiplying this accumulation value by Ki, it will be in the output The proportion of the more and more, so that the output u (t) is getting bigger and bigger, and finally achieve the purpose of eliminating the static error.

When the two PI are used in combination, 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 then reduce the P value. The value until the P value does not oscillate or the oscillation is very small (the term is called the critical oscillation state), in some cases, we can also increase a little on the basis of some P values.

2. Increase the I value until the output reaches the set value.

3. After the system cools down, turn on the power again to see if the overshoot of the system is too large and the heating speed is too slow.

Through the above debugging process, we can see that the P value is mainly used to adjust the response speed of the system, but if it is too large, it will increase the overshoot and stabilization time; while the I value is mainly used to reduce the static error.

PID control:

Because the existence of I in the PI system will affect the response speed of the entire control system, in order to solve this problem, we have added a D differential term in the control, which is mainly used to solve the system The response speed problem, its complete formula is as follows:

u(t) = Kp*e(t) + Ki∑e(t) + Kd[e(t) – e(t-1)]+u0

In the process of PID debugging, we should pay attention to the following steps:

1. Turn off I and D, that is, set it to 0. Increase P to make it oscillate;

2. Decrease P to find Critical oscillation point;

3. Increase I to make it reach the target value; re-power on to see if the overshoot, oscillation and stabilization time meet the requirements;

4. Properly increase some differentials for overshoot and oscillation Item;

5. Note that all debugging should be done under the condition of maximum contention load, so as to ensure that the results of debugging can be valid in the whole working range;