Improved PID temperature control method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-19
- Publication Date
- 2026-08-11
AI Technical Summary
[0007]针对上述存在的技术不足,本发明要解决的技术问题是提供一种改进型PID温度控制方法,旨在解决现有技术中温度控制过程中,被控对象对于温度的变化响应慢,在被控对象的控制过程中,过冲大,温度不准确,导致温度进入稳态时间长,最终导致控制精度低及控温时间长的问题
[0027] 1. By collecting the actual temperature and target temperature operating range and operating status, the corresponding power is output, thereby controlling the time temperature and target temperature to operate within a certain range, shortening the time to reach steady state, reducing overshoot amplitude, and improving temperature control accuracy.
Smart Images

Figure CN118170189B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic temperature control technology, and specifically to an improved PID temperature control method. Background Technology
[0002] Currently, the most classic automatic temperature control algorithm for liquids or solids during heating or cooling is the proportional-integral-differential (PID) control algorithm.
[0003] A classic PID control algorithm consists of a proportional unit (P), an integral unit (I), and a derivative unit (D). PID control is based on proportional control; integral control can eliminate steady-state error but may increase system overshoot; derivative control can accelerate the response speed of systems with large inertia and reduce overshoot tendency. The specific formula for the PID control algorithm is as follows:
[0004] u(t)=kp*e(t)+ki*[e(1)+e(2)+…+e(t)]+kd*[e(t)-e(t-1)]
[0005] Where e(t) is the deviation between the given value and the controlled variable, kp is the proportional coefficient, ki is the integral time constant, kd is the derivative time constant, and t is the time interval from the start of adjustment to the output of the current control quantity.
[0006] PID control algorithms are simple in principle and have advantages such as simple structure, good stability, and reliable operation, making them widely used in the field of automatic control. However, in the implementation process, certain technical problems have been found. For example, PID control algorithms are best suited for systems with fast response, such as motors. In the field of automatic temperature control for liquid or solid heating (or cooling), heat conduction is very slow relative to motor motion, meaning the heat conduction time is long, resulting in a slow response of the controlled object. When classic PID control algorithms are used in automatic temperature control, the severe lag in the heating or cooling process causes a large difference between the heat source temperature or cold source temperature and the actual temperature of the controlled object, making it extremely difficult to stabilize the controlled object temperature. This leads to a long time for the controlled object to reach steady state, a large overshoot, and low accuracy after reaching steady state. Summary of the Invention
[0007] To address the aforementioned technical shortcomings, the present invention aims to provide an improved PID temperature control method. This method addresses the problems in existing temperature control technologies, such as slow response of the controlled object to temperature changes, large overshoot, inaccurate temperature readings, long time to reach steady state, and ultimately low control accuracy and long temperature control time.
[0008] To solve the above technical problems, the present invention adopts the following technical solution: The present invention provides an improved PID temperature control method, comprising the following steps:
[0009] S1. Set the target temperature of the controlled object and acquire the actual temperature of the controlled object in real time. Divide the working range into two stages based on the target temperature of the controlled object: the low temperature range and the high temperature range.
[0010] S2. The working state is divided into heating and cooling based on the positive or negative error between the target temperature of the controlled object and the actual temperature of the controlled object.
[0011] S3. Based on the working range and current working state of the controlled object, match different polynomial algorithms to obtain the corresponding proportional coefficient, integral time constant and derivative time constant, so as to change the output power of the temperature source.
[0012] Furthermore, 4℃ to 40℃ is the low temperature range, and 40℃ to 95℃ is the high temperature range.
[0013] Furthermore, when ta-ts>0, it indicates a cooling state, and when ta-ts<0, it indicates a heating state; where ts is the target temperature of the controlled object, and ta is the actual temperature of the controlled object.
[0014] Furthermore, based on the working range and current working state of the controlled object, a base temperature and step temperatures for rising / falling are set, with the base temperature rising / falling by one step temperature each time and set as the target temperature ts of the controlled object; and based on the target temperature ts of different controlled objects, different proportional coefficients kp, integral time constants ki, and derivative time constants kd are set.
[0015] Furthermore, in the low-temperature range and during the warming process, 4°C is used as the base temperature.
[0016] Furthermore, in the low-temperature range and during the cooling process, 40°C is used as the base temperature.
[0017] Furthermore, in the high-temperature range and when the temperature is rising, 40°C is used as the base temperature.
[0018] Furthermore, when the temperature is in the high-temperature range and the state is cooling down, 95°C is used as the base temperature.
[0019] Furthermore, the overshoot is calculated by subtracting the target temperature ts of the controlled object from the maximum temperature MaxT during the heating and cooling process; wherein, the maximum fluctuation of the target temperature during the heating and cooling process is set to not exceed 2℃.
[0020] Set the current time to Nt, read the actual temperature ta of the controlled object, and when ts = ta, set the current time to Et. The value of Et minus Nt is used as the heating and cooling time.
[0021] Furthermore, polynomial fitting was performed on the heating and cooling rates in the low-temperature and high-temperature ranges, as well as the proportional coefficient kp, integral time constant ki, and differential time constant kd for achieving preset overshoot values. The fitting coefficients approached 1, resulting in three polynomial coefficient formulas:
[0022] kp=a(n)x^n+a(n-1)x^(n-1)+…+a(1)x+a(0)
[0023] ki=b(n)x^n+b(n-1)x^(n-1)+…+b(1)x+b(0)
[0024] kd=c(n)x^n+c(n-1)x^(n-1)+…+c(1)x+c(0)
[0025] In each polynomial, the n+1 polynomial coefficients a(n), a(n-1)...a(0), b(n), b(n-1)...b(0) and c(n), c(n-1)...c(0) are obtained by fitting kp, ki, kd of each step temperature during the experiment, and x is the value of the target temperature ts of the controlled object.
[0026] The beneficial effects of this invention are as follows:
[0027] 1. By collecting the actual temperature and target temperature operating range and operating status, the corresponding power is output, thereby controlling the time temperature and target temperature to operate within a certain range, shortening the time to reach steady state, reducing overshoot amplitude, and improving temperature control accuracy.
[0028] 2. No additional temperature source is required, resulting in low cost.
[0029] 3. Performing a single polynomial coefficient fitting calculation on the same product can be applied to all batches of products. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a flowchart of an improved PID temperature control method provided in an embodiment of the present invention.
[0032] Figure 2 This is an experimental result diagram from Embodiment 3 of the present invention. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] Example 1
[0035] like Figure 1 As shown, this invention provides an improved PID temperature control method, comprising the following steps:
[0036] S1. Set the target temperature of the controlled object and acquire the actual temperature of the controlled object in real time. Divide the working range into two stages based on the target temperature of the controlled object: the low temperature range and the high temperature range.
[0037] S2. The working state is divided into heating and cooling based on the positive or negative error between the target temperature of the controlled object and the actual temperature of the controlled object.
[0038] S3. Based on the working range and current working state of the controlled object, match different polynomial algorithms to obtain the corresponding proportional coefficient, integral time constant and derivative time constant, so as to change the output power of the temperature source.
[0039] The temperature range is 4℃ to 40℃, which is considered a low temperature range, and 40℃ to 95℃, which is considered a high temperature range.
[0040] When ta-ts>0, it indicates a cooling state; when ta-ts<0, it indicates a heating state.
[0041] Where ts is the target temperature of the controlled object, and ta is the actual temperature of the controlled object.
[0042] Based on the operating range and current operating state of the controlled object, a base temperature and step temperatures for rising / falling are set. Each time the base temperature rises / falls by one step temperature, this step temperature is set as the target temperature ts of the controlled object. The step temperature for rising / falling is 5°C. Different proportional coefficients kp, integral time constants ki, and derivative time constants kd are set according to different target temperatures ts of the controlled object, and overshoot and heating / falling times are read. It should be noted that setting different kp, ki, and kd here refers to PID control on the step temperatures, while the appropriate kp, ki, and kd calculated by the three polynomial coefficient formulas are applicable within a temperature range of 4-95 degrees Celsius.
[0043] In the low-temperature range and when the temperature is rising, 4°C is used as the base temperature.
[0044] When the temperature is in the low-temperature range and in a cooling state, 40°C is used as the base temperature.
[0045] When in the high-temperature range and in a rising state, the base temperature is 40°C.
[0046] When the temperature is in the high-temperature range and the state is cooling down, 95℃ is used as the base temperature.
[0047] The overshoot is calculated by subtracting the target temperature ts of the controlled object from the maximum temperature MaxT during the heating and cooling process. The current time is set to Nt, and the actual temperature ta of the controlled object is read. When ts = ta, the current time is set to Et, and the heating and cooling time is calculated by subtracting Nt from Et.
[0048] The factor for determining temperature rise and fall is that the target temperature should be reached in about 10-15 seconds after it is set.
[0049] The factor for judging overshoot is that during the heating and cooling process after setting the target temperature, the maximum value of the overshoot or undershoot of the target temperature cannot exceed 2℃.
[0050] In the above process, to reduce experimental steps, 5℃ was chosen as a step. However, this may result in the set temperature not being within the step range. Taking the low-temperature range as an example, the step temperatures in the experiment were (4℃, 9℃, 14℃, 19℃, 24℃, 29℃, 34℃, 39℃). If the set temperature is 22℃, it is not within the step range, so there is no suitable kp, ki, and kd. Therefore, to ensure a complete model for the 4℃-95℃ range, polynomial fitting was performed on all proportional coefficients kp, integral time constant ki, and differential time constant kd within the step temperatures in both the low-temperature and high-temperature ranges, considering rapid heating and cooling rates and small overshoot. The fitting coefficients approached 1, resulting in three polynomial coefficient formulas. This ensures that suitable proportional coefficients kp, integral time constant ki, and differential time constant kd can be calculated using the fitting formulas within the 4℃-95℃ range.
[0051] This leads to three formulas for polynomial coefficients, namely:
[0052] kp=a(n)x^n+a(n-1)x^(n-1)+…+a(1)x+a(0)
[0053] ki=b(n)x^n+b(n-1)x^(n-1)+…+b(1)x+b(0)
[0054] kd=c(n)x^n+c(n-1)x^(n-1)+…+c(1)x+c(0)
[0055] In each polynomial, the n+1 polynomial coefficients a(n), a(n-1)...a(0), b(n), b(n-1)...b(0) and c(n), c(n-1)...c(0) are obtained by fitting kp, ki, kd of each step temperature during the experiment, and x is the value of the target temperature ts of the controlled object.
[0056] Example 2
[0057] Based on Example 1, this example provides a verification test for an improved PID temperature control method, and verifies and explains the steps in this method.
[0058] The current actual temperature of the controlled object is set to 25℃, and the target temperature of the controlled object is 50℃. 50℃ is greater than 40℃ and less than 95℃, which is in the high temperature range. 50℃-25℃=25℃ is greater than 0, which is in the heating state, that is, ta=25 and ts=50.
[0059] Therefore, the current state is in the high-temperature range and is in a rising state. Substituting the specific values of the polynomial coefficients a0, a1, a2, a3, a4, b0, b1, b2, b3, b4, c0, c1, c2, c3, and c4 obtained from the fitting calculation based on the test experimental temperature in this embodiment, we proceed to the following calculation:
[0060] kp=0.0000123581781317346*pow(ts,4)-0.000797782613837295*pow(ts,3)+
[0061] 0.0159715115009015*pow(ts,2)-0.326070187316962*pow(ts,1)+ 16.3377515555994;
[0063] ki=0.0000129850340665379*pow(ts,4)-0.000944512248391496*pow(ts,3)
[0064] +0.017108149737145*pow(ts,2)-0.0168614292383726*pow(ts,1)
[0065] +1.27246122639534;
[0066] kd=-0.0000121413210086713*pow(ts,4)+0.0012179938532391*pow(ts,3)
[0067] -0.032726328672667*pow(ts,2)+0.111313978042699*pow(ts,1)
[0068] +31.0629124436874;
[0069] The pow(x,y) function is used to calculate the power of the exponent y of the base x. The function returns the exponent of the base, such as pow(ts,4) which returns ts^4.
[0070] According to the PID temperature algorithm formula:
[0071] u(t)=kp*e(t)+ki*[e(1)+e(2)+…+e(t)]+kd*[e(t)-e(t-1)]
[0072] By changing the proportional coefficient kp, the integral time constant ki, and the derivative time constant kd in the formula, u(t) can be changed. u(t) is actually the actual output signal of the controlled signal, which is the output power in temperature control.
[0073] Example 3
[0074] The proportionality coefficient kp in the three polynomial coefficient formulas in Example 1 is determined by the experimental process.
[0075] The experiment was conducted in two temperature ranges: a low temperature range (4-40℃) and a high temperature range (40-95℃). Temperature increments of 5℃ were used in the experiment.
[0076] For example, during the temperature rise process from 4℃ to 9℃ in the low-temperature range, a kp, ki, and kd will be set. The temperature rise rate and overshoot will be observed to ensure they meet the requirements. If the requirements are met, kp, ki, and kd will be recorded.
[0077] During the temperature rise process from 9℃ to 14℃ in the low-temperature range, kp, ki, and kd are set. The temperature rise rate and overshoot are observed to ensure they meet the requirements. If the requirements are met, kp, ki, and kd are recorded.
[0078] During the temperature rise process in the low-temperature range, from 14℃ to 19℃, a kp, ki, and kd are set. The temperature rise rate and overshoot are observed to ensure they meet the requirements. If the requirements are met, kp, ki, and kd are recorded.
[0079] Following this logic, during the heating process in the low-temperature range, we will obtain a total of 8 kp, ki, and kd (40-4) / 5.
[0080] To calculate kp, the formula would be: temperature on the X-axis and kp on the y-axis, as shown below. Figure 2 As shown, this yields the formula for the heating state in the low-temperature range. Subsequently, any temperature satisfying the heating state in the low-temperature range will be substituted into this formula; and so on, the remaining formulas, namely the formulas for the integral time constant ki and the differential time constant kd, will be obtained.
[0081] Therefore, the coefficient of the proportionality constant kp is determined by the step temperature kp, ki, and kd during the experiment, because the final formula is determined by them; as for the polynomial coefficients, theoretically, the maximum number of terms is 4.
[0082] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An improved PID temperature control method, characterized in that, Includes the following steps: S1. Set the target temperature of the controlled object and acquire the actual temperature of the controlled object in real time. Divide the working range into two stages based on the target temperature of the controlled object: the low temperature range and the high temperature range. S2. The working state is divided into heating and cooling based on the positive or negative error between the target temperature of the controlled object and the actual temperature of the controlled object. S3. Based on the working range and current working state of the controlled object, match different polynomial algorithms to obtain the corresponding proportional coefficient, integral time constant and derivative time constant, so as to change the output power of the temperature source; Specifically, based on the working range and current working state of the controlled object, a base temperature and step temperatures for rising / falling are set, with the base temperature rising / falling by one step temperature each time and set as the target temperature ts of the controlled object; and different proportional coefficients kp, integral time constants ki, and derivative time constants kd are set according to the target temperatures ts of different controlled objects. The overshoot is calculated by subtracting the target temperature ts of the controlled object from the maximum temperature MaxT during the heating and cooling process; the target temperature is set to fluctuate by no more than 2℃ during the heating and cooling process. Set the current time to Nt, read the actual temperature ta of the controlled object, and when ts = ta, set the current time to Et. The value of Et minus Nt is used as the heating and cooling time. Polynomial fitting was performed on the heating and cooling rates in the low-temperature and high-temperature ranges, as well as the proportionality coefficient kp, integral time constant ki, and differential time constant kd to achieve the preset values of overshoot. The fitting coefficients approached 1, resulting in three polynomial coefficient formulas: kp=a(n)x^n+a(n-1)x^(n-1)+…+a(1)x+a(0) ki=b(n)x^n+b(n-1)x^(n-1)+…+b(1)x+b(0) kd=c(n)x^n+c(n-1)x^(n-1)+…+c(1)x+c(0) In each polynomial, the n+1 polynomial coefficients a(n), a(n-1)...a(0), b(n), b(n-1)...b(0) and c(n), c(n-1)...c(0) are obtained by fitting kp, ki, kd of each step temperature during the experiment, and x is the value of the target temperature ts of the controlled object.
2. The improved PID temperature control method as described in claim 1, characterized in that, The temperature range is 4℃ to 40℃, which is considered a low temperature range, and 40℃ to 95℃, which is considered a high temperature range.
3. The improved PID temperature control method as described in claim 1, characterized in that, When ta - ts > 0, it indicates a cooling state; when ta - ts < 0, it indicates a heating state; where ts is the target temperature of the controlled object and ta is the actual temperature of the controlled object.
4. The improved PID temperature control method as described in claim 1, characterized in that, When the temperature is in the low-temperature range and the temperature is rising, the base temperature is 4°C.
5. An improved PID temperature control method as described in claim 1, characterized in that, When the temperature is in the low-temperature range and in a cooling state, 40°C is used as the base temperature.
6. The improved PID temperature control method as described in claim 1, characterized in that, When in the high-temperature range and in a rising state, the base temperature is 40°C.
7. An improved PID temperature control method as described in claim 1, characterized in that, When the temperature is in the high-temperature range and the state is cooling down, 95℃ is used as the base temperature.
Citation Information
Patent Citations
Temperature rise control device, system and method of heating device
CN117055660A
Temperature control method of wafer heat treatment equipment
CN117784840A