A dual-time-scale-based incremental PID control method
By using a dual-time-scale incremental PID control method, the problems of integral saturation, derivative impact, and parameter tuning difficulties in traditional PID control are solved, achieving zero steady-state error control and fast response, thus improving the stability and efficiency of industrial process control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 任恒毅
- Filing Date
- 2026-05-19
- Publication Date
- 2026-07-14
AI Technical Summary
Traditional PID control methods suffer from problems such as integral saturation, derivative impact, difficulty in parameter tuning, compromise of sampling period, and confusion caused by inconsistent error definitions, making it impossible to achieve efficient and stable parameter tuning in industrial process control.
An incremental PID control method based on dual time scales is adopted. The error correction and rate of change suppression links are controlled with different sampling periods to avoid integral accumulation and derivative impact. Intuitive parameter tuning is used, manual/automatic switching is supported, and zero steady-state error control is achieved.
It effectively eliminates integral saturation and differential shock, significantly improves system response speed and stability, simplifies parameter tuning, reduces overshoot and noise, and improves system operating efficiency.
Smart Images

Figure CN122386625A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial process automatic control technology, specifically to a PID control method applicable to closed-loop control of various industrial process parameters such as temperature, pressure, flow rate, liquid level, and speed. Background Technology
[0002] PID control is currently the most widely used control algorithm in industrial process control. It achieves regulation of the controlled parameter through the coordinated action of proportional, integral, and derivative components. The standard theoretical calculation formula for continuous-domain PID control is: u(t)=Kp×(e(t)+(1 / Ti)×∫0ᵗe(τ)dτ+Td×(de(t) / dt)) in: Kp is the proportional gain, which is the inverse of the proportional gain. Ti is the integration time constant; Td is the differential time constant; u(t) is the output signal of the PID controller; e(t) = r(t) - y(t) is the difference between the given value r(t) and the measured value y(t).
[0003] Since computers can only process discrete digital signals, the above continuous formula needs to be discretized. Let the sampling period be T. Starting from time 0, data is sampled every T time intervals, resulting in a discrete error sequence {e0, e1, e2, ..., e...}. k} and the output sequence {u0,u1,u2,…,u k Approximating the integral as discrete accumulation and the derivative as difference, we obtain the discrete-position PID formula: u(k)=Kp×(e(k)+(T / Ti)×∑ᵢ₌0ᵏe(i)+(Td / T)×[e(k)-e(k-1)]) Let Ki = Kp × (T / Ti) (integral coefficient) and Kd = Kp × (Td / T) (differential coefficient), the formula can be simplified to: u(k)=Kp×e(k)+Ki×∑ᵢ₌0ᵏe(i)+Kd×[e(k)-e(k-1)] In practical engineering applications, traditional PID control methods generally suffer from the following core problems: (1) Integral saturation problem: Traditional PID uses an independent explicit integral accumulation stage. When there is a large error in the system (such as cold start of equipment or large adjustment of set value), the integral stage will continue to accumulate large errors, resulting in the integral accumulation value far exceeding the effective adjustment range of the actuator, forming a "false energy reserve". When the error reverses, the integral term needs a long time to exit saturation, resulting in serious overshoot oscillation of the controlled parameter, and the overshoot can reach more than 20% of the set value.
[0004] (2) Differential impact problem: The differential element of the traditional PID is applied to the error change rate de / dt. When the set value changes abruptly, the error will jump instantly, causing the differential element to generate a huge output spike, which causes the actuator to move violently. This not only shortens the service life of the equipment, but also causes the controlled parameters to fluctuate greatly.
[0005] (3) Difficult parameter tuning: Traditional PID requires tuning three abstract parameters: proportional coefficient, integral time, and derivative time. There is a strong coupling relationship between the parameters. The tuning process is highly dependent on the engineer's experience and usually takes 2-3 days to complete. In addition, the parameters have poor universality under different working conditions.
[0006] (4) Limitations of uniform sampling period: Traditional PID requires all control links to use a uniform sampling period, which cannot simultaneously meet the fast response requirements of the proportional link and the noise resistance requirements of the derivative link. It can only compromise between the two, which limits the further improvement of control performance.
[0007] (5) Inconsistent error definition leads to confusion in adjustment: The traditional PID error is defined as r(t)-y(t). The coefficient is positive when negative feedback control is used, and negative when positive feedback control is used, which causes great trouble for on-site debugging and maintenance.
[0008] To address the aforementioned issues, existing technologies have proposed improvement schemes such as integral separation, variable-speed integral, and fuzzy PID, but all have significant limitations: integral separation only removes the integral when there is a large error, and there is still a risk of integral saturation in the small error stage; while variable-speed integral can slow down the accumulation rate of the integral, it cannot fundamentally eliminate integral saturation; fuzzy PID requires the establishment of a complex expert rule base, parameter tuning remains difficult, and the computational load is large, making it difficult to implement on low-end controllers. These schemes are all partial repairs to traditional PID and cannot fundamentally solve the aforementioned core problems. Summary of the Invention
[0009] Purpose of the invention The purpose of this invention is to overcome the shortcomings of the prior art and provide an incremental PID control method based on dual time scales, which solves the problems of integral saturation, derivative impact, difficult parameter adjustment, compromise of sampling period, and confusion caused by inconsistent error definition in traditional PID control. Technical solution
[0010] To achieve the above objectives, the present invention adopts the following technical solution: An incremental PID control method based on dual time scales includes the following steps: S1: System initialization, setting the initial control output value u(0), and saving the initial measured value PV(0) of the controlled variable.
[0011] S2: Independently execute the first control step with the first sampling period T1: collect the real-time measurement value PV(k) of the current controlled variable, calculate the current error e(k)=PV(k)-SV, and calculate the error correction increment Δu1(k) based on the current error.
[0012] S3: Independently execute the second control step with the second sampling period T2: collect the real-time measurement value PV(m) of the current controlled variable, calculate the rate of change of the controlled variable ΔPV(m)=PV(m)-PV(m-1), calculate the rate of change suppression increment Δu2(m) based on the rate of change, and update the historical controlled variable value PV(m-1)=PV(m).
[0013] S4: At each first sampling time, the error correction increment Δu1(k) and the rate of change suppression increment Δu2(m) at the current time are accumulated into the control output value u(n-1) at the previous time to generate the final control output and perform amplitude limiting; at non-second sampling times, Δu2(m) is 0.
[0014] S5: Converts the final control output into a standard electrical signal and sends it to the actuator.
[0015] S6: Set the calculated Δu1(k) and Δu2(m) to zero, return to step S2, and repeat the process.
[0016] Wherein, the first sampling period T1 and the second sampling period T2 are unequal fixed values, and T2 is an integer multiple of T1.
[0017] Furthermore, the first sampling period T1 is shorter than the second sampling period T2. The error correction stage corresponds to the proportional action of a traditional PID controller, which requires a rapid response to the deviation between the controlled variable and the setpoint, thus employing a shorter sampling period. The rate of change suppression stage corresponds to the derivative action of a traditional PID controller, which is susceptible to measurement noise interference. Employing a longer sampling period can effectively smooth out noise and improve system stability.
[0018] Furthermore, the formula for calculating the error correction increment in step S2 is as follows: Δu1(k)=K1×e(k)=K1×(PV(k)-SV) in: Δu1(k) is the error correction increment at the kth first sampling time; K1 is the error correction coefficient, which takes a positive value for positive feedback control and a negative value for negative feedback control. e(k) is the current error at the kth first sampling time; PV(k) is the real-time measurement value at the kth first sampling time; SV is the setpoint of the controlled variable.
[0019] Furthermore, the formula for calculating the rate of change suppression increment in step S3 is as follows: Δu2(m)=-K2×(PV(m)-PV(m-1)) in: Δu2(m) is the rate of change suppression increment at the m-th second sampling time; K2 is the rate of change suppression coefficient, which takes a positive value for positive feedback control and a negative value for negative feedback control. PV(m) is the real-time measurement value at the m-th second sampling time. PV(m-1) is the real-time measurement value at the (m-1)th second sampling time.
[0020] Furthermore, the formula for calculating the final control output in step S4 is as follows: u(n)=clamp[u(n-1)+Δu1(k)+Δu2(m), Umin, Umax] in: u(n) is the final control output at the current moment; u(n-1) is the control output of the previous time step; clamp[·] is a clamping function used to limit the output within the effective working range of the actuator; Umin and Umax are the minimum and maximum output limits of the actuator, respectively.
[0021] This invention employs an incremental accumulation mechanism to achieve zero steady-state error control: when the system reaches steady state, the measured value of the controlled variable equals the setpoint (PV=SV) and remains unchanged (PV(m)-PV(m-1)=0). At this time, Δu1(k)=0 and Δu2(m)=0, and the control output u(n) remains constant, thus maintaining the controlled variable stable at the setpoint and achieving zero steady-state error control. Since there is no independent explicit integral accumulation stage, large errors are not excessively accumulated, fundamentally avoiding integral saturation problems.
[0022] Furthermore, the method also includes a seamless manual / automatic switching step: the manual and automatic control modes can be switched at any time during system operation. When switching to automatic control, the manual output value from the previous moment is assigned to u(n-1), and automatic adjustment is performed based on this value; when switching to manual control, the current automatic output value is used as the initial value for manual adjustment, and manual adjustment is performed based on this value. The entire switching process requires no additional logic, and the control output remains unchanged.
[0023] Furthermore, the controlled variable includes any one of the following industrial process parameters: temperature, pressure, flow rate, liquid level, and rotational speed.
[0024] Furthermore, the method is implemented based on any hardware platform of a programmable logic controller (PLC), a microcontroller, a DCS system, an industrial computer, or an embedded system.
[0025] This invention requires no new hardware equipment; it can be implemented simply by modifying the control program of an existing controller, resulting in extremely low modification costs and facilitating large-scale application in industrial settings. Beneficial effects
[0026] Compared with the prior art, the present invention has the following advantages: (1) Fundamentally eliminate integral saturation: The incremental direct accumulation mechanism achieves zero steady-state error control. There is no independent explicit integral accumulation stage, so large errors will not be excessively accumulated. Compared with traditional PID control, the maximum overshoot during the start-up phase can be reduced by more than 90%.
[0027] (2) Completely avoid differential shock: The rate of change suppression link acts directly on the controlled variable itself and is completely decoupled from the set value. There is no output shock when the set value changes abruptly. The fluctuation of the controlled parameter is ≤0.5% FS (full scale), which effectively extends the service life of the actuator.
[0028] (3) Eliminate the additional phase lag of traditional PID: The system uses two physical quantities, error and rate of change, which directly reflect the control objective, for control regulation, avoiding the additional phase lag caused by the integral and derivative links of traditional PID, and significantly improving the system response speed.
[0029] (4) The parameter tuning is extremely simple: only two physical parameters, K1 and K2, need to be tuned. No complex theoretical basis is required. The tuning can be completed within 30 minutes, which is more than 90% shorter than the traditional PID.
[0030] (5) Dual time scale sampling optimizes control performance: the optimal sampling period is matched for different control links, which simultaneously meets the response speed requirements of the error correction link and the noise resistance requirements of the rate of change suppression link, reducing output jitter by 67% and making the system operation more stable.
[0031] (6) High versatility: It is suitable for the control of various industrial process parameters such as temperature, pressure, flow rate, liquid level, and speed. No hardware modification is required; different controlled objects can be adapted simply by adjusting the parameters.
[0032] (7) Disturbance-free manual / automatic switching: The control mechanism based on incremental output naturally supports disturbance-free switching, requiring no additional switching logic, and is simple and reliable to operate. Attached Figure Description
[0033] Figure 1 This is a flowchart of the incremental PID control method based on dual time scales described in this invention. Detailed Implementation
[0034] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0035] like Figure 1 As shown, the present invention discloses an incremental PID control method based on dual time scales, the specific process of which is as follows: Step 1: System initialization, set the initial control output value u(0)=0, and save the initial measurement value PV(0) of the controlled variable.
[0036] Step 2: The first control step is executed once every T1 time. The real-time measurement value PV(k) of the current controlled variable is collected, the current error e(k)=PV(k)-SV is calculated, and then the error correction increment Δu1(k)=K1×e(k) is calculated.
[0037] Step 3: The second control step is executed once every T2 time. The real-time measurement value PV(m) of the current controlled variable is collected, the rate of change suppression increment Δu2(m)=-K2×(PV(m)-PV(m-1)) is calculated, and then the historical controlled variable value PV(m-1)=PV(m) is updated.
[0038] Step 4: At each first sampling time, accumulate the error correction increment Δu1(k) and the rate of change suppression increment Δu2(m) of the current time, and calculate the final control output u(n)=clamp[u(n-1)+Δu1(k)+Δu2(m), Umin, Umax]; at non-second sampling times, Δu2(m) is 0.
[0039] Step 5: Convert the final control output into a 4-20mA standard electrical signal and send it to the actuator.
[0040] Step 6: Set the calculated Δu1(k) and Δu2(m) to zero, return to step 2, and repeat the process.
[0041] Example 1: Temperature Control of HVAC Heat Exchange Equipment In this embodiment, the control method is used for the water supply temperature control of the plate heat exchanger in the industrial plant. The water supply temperature setpoint SV=45℃, the actuator is a DN100 electric regulating valve, and the output range is 0~100% (corresponding to 4-20mA electrical signal).
[0042] Parameter configuration: Error correction coefficient K1 = -1.2% / ℃ (negative feedback control, hence a negative value). The rate of change suppression coefficient K2 = -12%·min / ℃ (negative feedback control, hence the negative value). The first sampling period T1 = 2s The second sampling period T2 = 10s Output limiting range: 0~100%.
[0043] Experimental results: Compared with the traditional PID control method, the maximum overshoot in this embodiment was reduced from 12.3℃ to 1.2℃, the settling time was shortened from 90 minutes to 25 minutes, the parameter tuning time was shortened from 240 minutes to 25 minutes, and the average daily power consumption was reduced by 10.8%.
[0044] Example 2: Pressure Control of Circulating Water System In this embodiment, the control method is used for the water supply pressure control of an industrial circulating water system. The water supply pressure setpoint SV = 0.4 MPa, the actuator is a variable frequency water pump, and the output range is 0~50 Hz (corresponding to a 4-20mA electrical signal).
[0045] Parameter configuration: Error correction coefficient K1 = -80Hz / MPa (negative feedback control, hence a negative value). The rate of change suppression coefficient K2 = -200Hz·s / MPa (negative feedback control, hence a negative value). The first sampling period T1 = 1s The second sampling period T2 = 5s Output limiting range: 0~50Hz.
[0046] Experimental results: Compared with the traditional PID control method, the maximum overshoot in this embodiment is reduced from 0.08MPa to 0.01MPa, the settling time is shortened from 60 seconds to 15 seconds, the parameter tuning time is shortened from 180 minutes to 20 minutes, the pump operating noise is reduced by 15%, and the pipeline leakage rate is reduced by 8%.
[0047] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A dual-time-scale incremental PID control method, characterized in that, Includes the following steps: S1: System power-on initialization, set initial control output value u(0), and save initial measured value PV(0) of controlled variable; S2: Independently execute the first control step with the first sampling period T1: collect the real-time measurement value PV(k) of the current controlled variable, calculate the current error e(k)=PV(k)-SV, and calculate the error correction increment Δu1(k) based on the current error; S3: Independently execute the second control step with the second sampling period T2: collect the real-time measurement value PV(m) of the current controlled variable, calculate the rate of change of the controlled variable ΔPV(m)=PV(m)-PV(m-1), calculate the rate of change suppression increment Δu2(m) based on the rate of change, and update the historical controlled variable value PV(m-1)=PV(m); S4: At each first sampling time, the error correction increment Δu1(k) and the rate of change suppression increment Δu2(m) at the current time are accumulated into the control output value u(n-1) at the previous time to generate the final control output and perform amplitude limiting; at non-second sampling times, Δu2(m) is 0; S5: Convert the final control output into a standard electrical signal and send it to the actuator; S6: Set the calculated Δu1(k) and Δu2(m) to zero, return to step S2, and repeat the process. Wherein, the first sampling period T1 and the second sampling period T2 are unequal fixed values, and T2 is an integer multiple of T1.
2. The method according to claim 1, characterized in that, The first sampling period T1 is less than the second sampling period T2.
3. The method according to claim 1, characterized in that, The formula for calculating the error correction increment in step S2 is as follows: Δu1(k)=K1×e(k)=K1×(PV(k)-SV) Where: Δu1(k) is the error correction increment at the kth first sampling time; K1 is the error correction coefficient, which takes a positive value in positive feedback control and a negative value in negative feedback control; e(k) is the current error at the kth first sampling time; PV(k) is the real-time measurement value at the kth first sampling time; and SV is the set value of the controlled variable.
4. The method according to claim 1, characterized in that, The formula for calculating the rate of change suppression increment in step S3 is as follows: Δu2(m)=-K2×(PV(m)-PV(m-1)) Where: Δu2(m) is the rate of change suppression increment at the m-th second sampling time; K2 is the rate of change suppression coefficient, which takes a positive value in positive feedback control and a negative value in negative feedback control; PV(m) is the real-time measurement value at the m-th second sampling time; PV(m-1) is the real-time measurement value at the (m-1)-th second sampling time.
5. The method according to claim 1, characterized in that, The formula for calculating the final control output in step S4 is as follows: u(n)=clamp[u(n-1)+Δu1(k)+Δu2(m), Umin, Umax] Where: u(n) is the final control output at the current moment; u(n-1) is the control output at the previous moment; clamp[·] is the limiting function, used to limit the output within the effective working range of the actuator; Umin and Umax are the minimum and maximum output limits of the actuator, respectively.
6. The method according to claim 1, characterized in that, It also includes a manual / automatic seamless switching step: the manual and automatic control modes can be switched at any time during system operation; when switching to automatic control, the manual output value of the previous moment is assigned to u(n-1), and automatic adjustment is performed on this basis; when switching to manual control, the automatic output value of the current moment is used as the initial value for manual adjustment, and manual adjustment is performed on this basis.
7. The method according to claim 1, characterized in that, The controlled variable includes any one of the following industrial process parameters: temperature, pressure, flow rate, liquid level, and rotational speed.
8. The method according to claim 1, characterized in that, The method is implemented based on any hardware platform, such as a programmable logic controller (PLC), a microcontroller, a DCS system, an industrial computer, or an embedded system.