Temperature control method and device for adaptively adjusting PID (Proportion Integration Differentiation) parameters
Through the adaptive adjustment of PID parameters, the parameters of the temperature control system are adjusted in real time, which solves the problem of insufficient adaptability of traditional PID systems in dynamic environments, and achieves higher temperature control accuracy and stability.
Patent Information
- Application Number
- CN202510492918.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-07-18
AI Technical Summary
The existing PID temperature control system cannot adjust parameters according to the dynamic changes of the system, resulting in unstable temperature control performance and insufficient accuracy. Fuzzy logic control has limited adaptability in dynamic environments, making it difficult to ensure parameter superiority.
Adaptive adjustment of PID parameters is adopted, and the PID parameters are adjusted by real-time measurement of temperature error and error rate change, and the error membership and rate of change membership are used to optimize the control output with the integral anti-saturation mechanism.
It improves the adaptability and accuracy of the temperature control system, ensures that the PID parameters are optimized in real time in dynamic environments, avoids excessive accumulation of integral terms, and improves the temperature control performance and stability.
Smart Images

Figure CN120335526A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of temperature control, and particularly to a method and device for adaptively adjusting PID parameters for temperature control. Background Art
[0002] In the prior art, the Proportional-Integral-Derivative (PID) algorithm is widely used in the field of temperature control. When applying a PID temperature control system, how to make the temperature control performance more stable while improving the temperature control accuracy has become a major difficulty. In a traditional PID temperature control system, fixed PID parameters are used and cannot be adjusted according to the dynamic changes of the system. It is applicable to simple linear models, and parameter adjustment overly relies on experience and the trial-and-error method, and the parameter adjustment process takes a long time. To solve these problems of the traditional PID temperature control, fuzzy logic control is usually used to adjust the PID parameters in real time to solve problems such as difficult PID parameter adjustment and poor temperature accuracy.
[0003] The fuzzy control PID temperature control system has significant advantages in improving the dynamic performance of temperature control, weak robustness, and low parameter adjustment efficiency, etc., but its limitations are also very obvious. For example, its adaptability to the dynamic environment is limited, it cannot adapt to the external environment in a timely manner, and it is difficult to ensure that its parameters are globally optimal parameters, resulting in a lack of temperature control performance.
[0004] In view of this, overcoming the defects of the prior art is an urgent problem to be solved in this technical field. Summary of the Invention
[0005] The technical problem to be solved by the present invention is how to ensure the adaptability to the external environment and improve the superiority of the parameters in the PID algorithm when performing temperature control adjustment through the PID algorithm, so as to improve the temperature control performance.
[0006] The present invention adopts the following technical solutions:
[0007] In a first aspect, there is provided a method for adaptively adjusting PID parameters for temperature control, including:
[0008] Setting initial PID parameters, an initial error universe of discourse, and an initial error change rate universe of discourse, and applying them to the parameter update at the first time node;
[0009] The parameter update at each subsequent time node includes:
[0010] Measure the temperature at the current time node in real time, obtain the error corresponding to the current time node according to the set temperature and the actually measured temperature at the current time node, and obtain the error change rate based on the error at the current time node and the error at the previous time node; perform compliance processing on the error and the error change rate corresponding to the current time node according to the initial error domain and the initial error change rate domain; obtain the error membership degree according to the error after compliance processing, obtain the change rate membership degree according to the error change rate after compliance processing, and obtain the PID parameter difference membership degree at the current time node according to the error membership degree and the change rate membership degree; obtain the PID parameter difference according to the PID parameter difference membership degree at the current time node, and obtain the PID parameter value at the current time node according to the PID parameter difference and the PID parameter at the previous time node;
[0011] Judge the control output at the current time node according to the PID parameter value at the current time node and the integral anti-windup mechanism.
[0012] Preferably, it includes:
[0013] Obtain the dynamic error domain at the current time node according to the error corresponding to the current time node and the initial error domain;
[0014] Judge whether the error corresponding to the current time node is within the dynamic error domain; if so, the error remains unchanged; if not, when the error is greater than the maximum value of the dynamic error domain, update the error to the maximum value of the dynamic error domain, and when the error is less than the minimum value of the dynamic error domain, update the error to the minimum value of the dynamic error domain;
[0015] Obtain the dynamic error change rate domain at the current time node according to the error change rate corresponding to the current time node and the initial error change rate domain;
[0016] Judge whether the error change rate corresponding to the current time node is within the dynamic error change rate domain; if so, the error change rate remains unchanged; if not, when the error change rate is greater than the maximum value of the dynamic error change rate domain, update the error change rate to the maximum value of the dynamic error change rate domain, and when the error change rate is less than the minimum value of the dynamic error change rate domain, update the error change rate to the minimum value of the dynamic error change rate domain.
[0017] Preferably, it includes:
[0018] The formula for obtaining the error membership degree according to the error after compliance processing is:
[0019]
[0020] Among them, μ1(x) is the error membership degree, e(t) is the error after compliance processing, c is the central value of the dynamic error domain, and σ is the standard deviation of the dynamic error domain;
[0021] The formula for obtaining the change rate membership degree according to the change rate of the error after compliance processing is:
[0022]
[0023] Among them, μ2(x) is the error membership degree, Δe(t) is the change rate of the error after compliance processing, c is the central value of the dynamic error change rate domain, and σ is the standard deviation of the dynamic error change rate domain.
[0024] Preferably, it includes:
[0025] Search in the membership degree relationship table according to the error membership degree and the change rate membership degree to obtain the proportional gain difference membership degree, the integral gain difference membership degree, and the derivative gain difference membership degree respectively, so as to obtain the PID parameter difference membership degree.
[0026] Preferably, the PID parameter difference includes a proportional gain difference, an integral gain difference, and a derivative gain difference, and the method includes:
[0027] Obtain the proportional gain difference according to the proportional gain difference membership degree, and the formula is:
[0028]
[0029] Among them, is the proportional gain difference at the nth time node, μ pn is the proportional gain difference membership degree at the nth time node, is the proportional gain difference at the (n - 1)th time node, and n is the current time node;
[0030] Obtain the integral gain difference according to the integral gain difference membership degree, and the formula is:
[0031]
[0032] Among them, is the integral gain difference at the nth time node, μ in is the integral gain difference membership degree at the nth time node, is the integral gain difference at the (n - 1)th time node, and n is the current time node;
[0033] Obtain the derivative gain difference according to the derivative gain difference membership degree, and the formula is:
[0034]
[0035] Among them, is the differential gain difference at the nth time node, μ dn is the membership degree of the differential gain difference at the nth time node, is the differential gain difference at the (n - 1)th time node, and n is the current time node.
[0036] Preferably, it includes:
[0037] Adding the proportional gain difference at the current time node to the proportional gain value at the previous time node to obtain the proportional gain value at the current time node;
[0038] Adding the integral gain difference at the current time node to the integral gain value at the previous time node to obtain the integral gain value at the current time node;
[0039] Adding the differential gain difference at the current time node to the differential gain value at the previous time node to obtain the differential gain value at the current time node.
[0040] Preferably, it includes:
[0041] Obtaining the integral term at the current time node according to the magnitude relationship between the error after compliance processing and the preset error;
[0042] Calculating the control output at the current time node according to the error after compliance processing, proportional gain value, integral gain value, integral term and differential gain value at the current time node. The formula is:
[0043]
[0044] where, u n (t) is the control output at the nth time node, is the proportional gain value at the nth time node, e(t) is the error after compliance processing, is the integral gain value at the nth time node, integral(n) is the integral term at the nth time node, is the differential gain value at the nth time node.
[0045] Preferably, the calculation formula for the integral term at the nth time node is:
[0046]
[0047] where, integral(n - 1) is the integral term at the (n - 1)th time node, e(t) is the error after compliance processing, Δt is the time difference between the nth time node and the (n - 1)th time node, and threshoud is the preset error.
[0048] In a second aspect, an adaptive PID parameter temperature control device is provided, including at least one processor and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions, when executed by the processor, are used to perform the adaptive PID parameter temperature control method described above.
[0049] In a third aspect, the present invention further provides a non-volatile computer storage medium storing computer-executable instructions, which are executed by one or more processors to complete the method described in the first aspect.
[0050] In a fourth aspect, a chip is provided, including: a processor and an interface for calling and running a computer program stored in a memory from the memory to execute the method as described in the first aspect.
[0051] In a fifth aspect, a computer program product containing instructions is provided, which, when the instructions run on a computer or a processor, cause the computer or the processor to execute the method as described in the first aspect.
[0052] In a sixth aspect, a system for adaptive PID parameter temperature control is provided, including the adaptive PID parameter temperature control device as described in the second aspect and using the adaptive PID parameter temperature control method as described in the first aspect.
[0053] The present invention provides an adaptive PID parameter temperature control method and device, which measure the temperature at the current time node in real time, obtain the error corresponding to the current time node according to the set temperature and the actually measured temperature, and obtain the error change rate according to the error at the current time node and the error at the previous time node; perform compliance processing on the error and error change rate corresponding to the current time node according to the set initial error universe and initial error change rate universe, so as to adapt to the external environment in a timely manner; obtain the error membership degree and change rate membership degree according to the error and error change rate after compliance processing, and obtain the PID parameter difference membership degree according to the error membership degree and change rate membership degree; obtain the PID parameter difference according to the PID parameter difference membership degree, and obtain the PID parameter value at the current time node according to the PID parameter difference and the PID parameter at the previous time node, and further judge the control output at the current time node according to the PID parameter value and the integral anti-windup mechanism;
[0054] Through the above steps, the optimal PID parameters corresponding to each node are obtained to improve the temperature control performance; wherein, the error and error change rate are adjusted in real time according to the external environment through the compliance processing to enhance the real-time performance and accuracy of temperature control; the integral anti-windup mechanism is used to avoid excessive accumulation of the integral term, effectively avoiding slow temperature control response or overshoot. Brief Description of the Drawings
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0056] Figure 1 is a flowchart of a method for an adaptive adjustment PID parameter temperature control method provided by an embodiment of the present invention;
[0057] Figure 2 is a flowchart of a method for adjusting an error and an error change rate in an adaptive adjustment PID parameter temperature control method provided by an embodiment of the present invention;
[0058] Figure 3 is a relationship table of proportional gain difference membership degrees in an adaptive adjustment PID parameter temperature control method provided by an embodiment of the present invention;
[0059] Figure 4 is a relationship table of integral gain difference membership degrees in an adaptive adjustment PID parameter temperature control method provided by an embodiment of the present invention;
[0060] Figure 5 is a relationship table of derivative gain difference membership degrees in an adaptive adjustment PID parameter temperature control method provided by an embodiment of the present invention;
[0061] Figure 6 is a schematic diagram of a device applied to an adaptive adjustment PID parameter temperature control method provided by an embodiment of the present invention;
[0062] Figure 7 is a schematic diagram of a device of an adaptive adjustment PID parameter temperature control device provided by an embodiment of the present invention. Detailed Description of the Embodiments
[0063] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0064] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present disclosure.
[0065] In the description of the present invention, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "a plurality" is two or more. In addition, for example, in the description, for the same type of nouns, the method of adding "A" and "B" at the end is used to describe them as two independent individuals. In this case, the features defined with "A" and "B" are only used for the purpose of distinguishing similar individuals and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features.
[0066] As used in the present invention, "about", "substantially" or "approximately" includes the stated value and the average value within an acceptable deviation range of the specific value, where the acceptable deviation range is determined by those of ordinary skill in the art considering the measurement being discussed and the errors associated with the measurement of a particular quantity, i.e., the limitations of the measurement system.
[0067] Unless the context otherwise requires, throughout the specification and claims, the term "comprising" is to be construed in an open inclusive sense, i.e., "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "examples", "specific examples" or "some examples", etc. are intended to indicate that the specific features, structures, materials or characteristics related to the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representations of the above terms are not necessarily referring to the same embodiment or example. In addition, the specific features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner, that is, although they may be carried in the above-mentioned embodiments or examples due to reasons such as the order of appearance and position, etc., but it is not limited that they can be carried by one embodiment or example in a combined manner.
[0068] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0069] Example 1:
[0070] The embodiment of the present invention provides an adaptive PID parameter temperature control method, as Figure 1 shown, including:
[0071] In step 101, set the initial PID parameters, the initial error domain, and the initial error change rate domain, and apply them to the parameter update at the first time node.
[0072] In this embodiment, the PID parameters are the parameters in the PID algorithm, including the proportional gain parameter, the integral gain parameter, and the derivative gain parameter. In the application scenario of this embodiment, different PID parameters need to be set for different time nodes to perform different temperature regulations. The initial PID parameters are the PID parameters set at the first time node.
[0073] The error in the initial error domain is the difference between the set temperature at the current time node and the temperature actually measured at the current time node. The error domain in the initial error domain is the acceptable interval range of the error. When the measured error is within the corresponding error domain, the error can be directly applied. If the measured error is outside the range of the error domain, the measured error is approximated as the maximum or minimum value of the error domain range. The initial error domain is used at the first time node, and each subsequent time node needs to dynamically adjust the error domain according to the situation of that time node to make the temperature control regulation process more in line with the current environmental changes.
[0074] The error change rate in the initial error change rate domain, the error change rate is the difference between the error corresponding to the current time node and the error corresponding to the previous time node. The error change rate is used to reflect the improvement of the temperature control accuracy between two adjacent time points; the error change rate domain in the initial error change rate domain is the acceptable interval range of the error change rate. When the measured error change rate is within the corresponding error change rate domain, the error change rate can be directly applied. If the measured error change rate is outside the range of the error change rate domain, the measured error change rate is approximated as the maximum or minimum value of the error change rate domain range. The initial error change rate domain is used at the first time node, and each subsequent time node needs to dynamically adjust the error change rate domain according to the situation of that time node to make the temperature control regulation process more in line with the current environmental changes.
[0075] The initial error domain and the initial error change rate domain are both set by those skilled in the art according to the actual situation. In this embodiment, the initial error domain can be [-20, 20], and the initial error change rate domain can be [-5, 5].
[0076] In step 102, the parameter update at each subsequent time node includes: actually measuring the temperature at the current time node, obtaining the error corresponding to the current time node according to the set temperature and the actually measured temperature at the current time node, and obtaining the error change rate according to the error at the current time node and the error at the previous time node; performing compliance processing on the error and the error change rate corresponding to the current time node according to the initial error domain and the initial error change rate domain; obtaining the error membership degree according to the error after compliance processing, obtaining the change rate membership degree according to the error change rate after compliance processing, and obtaining the PID parameter difference membership degree at the current time node according to the error membership degree and the change rate membership degree; obtaining the PID parameter difference according to the PID parameter difference membership degree at the current time node, and obtaining the PID parameter value at the current time node according to the PID parameter difference and the PID parameter at the previous time node.
[0077] In this embodiment, each subsequent time node starts from the second time node and includes each subsequent time node including the second time node; in order to ensure the stability of temperature control, the PID parameters need to be updated according to the error and the error change rate corresponding to the current time node at each time node, and the temperature control effect obtained after applying the updated PID parameters will be reflected in the next time node (i.e., the error and the error change rate at the next time node).
[0078] In this embodiment, the compliance processing is as follows: First, it is necessary to update the dynamic error domain and the dynamic error change rate domain at the current time point according to the initial error domain and the initial error change rate domain, and then determine whether the actually measured error and the error change rate at the current time point are within their corresponding domains. If not, the error and the error change rate at the current time node need to be adjusted.
[0079] The error membership degree is the influence degree of the error on the PID parameter update. The greater the error membership degree, the greater the influence degree of the error on the PID parameter update. The change rate membership degree is the influence degree of the error change rate on the PID parameter update. The greater the change rate membership degree, the greater the influence of the error change rate on the PID parameter adjustment at this time node.
[0080] The difference in PID parameters is the difference in PID parameter updates required at this time node, and the membership degree of the difference in PID parameters is the relative magnitude of the difference in PID parameters. The difference in PID parameters includes the difference in proportional gain, the difference in integral gain, and the difference in derivative gain, which respectively correspond to the differences in the proportional gain value, the integral gain value, and the derivative gain value that need to be updated. By adding the differences of each parameter to the proportional gain value, the integral gain value, and the derivative gain value of the previous time node respectively, the PID parameter value at the current time node can be obtained.
[0081] In step 103, the control output at the current time node is obtained based on the PID parameter value at the current time node and the integral anti-windup mechanism.
[0082] In this embodiment, considering that when the integral gain parameter is large, the integral term may accumulate excessively, resulting in slow system response or overshoot. Therefore, before substituting the PID parameter value into the system to generate the corresponding control output for temperature control, it is necessary to judge whether the integral term accumulates excessively through the integral anti-windup mechanism. If there is excessive accumulation, the integral term needs to be hidden to obtain a suitable control output.
[0083] Furthermore, in this embodiment, for the dynamic error universe and the dynamic error change rate universe of each time node, it is necessary to dynamically adjust according to the external situation at the current time node, and perform compliance processing on the error and the error change rate based on the adjusted dynamic error universe and the dynamic error change rate universe, so that the subsequent obtained PID parameters are more suitable and the temperature control effect is more stable. Therefore, this embodiment also involves the following design:
[0084] The compliance processing of the error and the error change rate corresponding to the current time node according to the initial error universe and the initial error change rate universe is as Figure 2 shown, including:
[0085] In step 201, the dynamic error universe at the current time node is obtained based on the error corresponding to the current time node and the initial error universe.
[0086] The formula for the dynamic error universe at the current time node is:
[0087] D e =D e0 +k e |e(t)|;
[0088] where D e is the dynamic error universe at the current time node, D e0 is the initial error universe, k e is the adjustment coefficient of the error, and e(t) is the error at the current time node.
[0089] In step 202, it is determined whether the error corresponding to the current time node is within the dynamic error domain; if so, the error remains unchanged; if not, when the error is greater than the maximum value of the dynamic error domain, the error is updated to the maximum value of the dynamic error domain, and when the error is less than the minimum value of the dynamic error domain, the error is updated to the minimum value of the dynamic error domain.
[0090] In step 203, the dynamic error change rate domain of the current time node is obtained according to the error change rate corresponding to the current time node and the initial error change rate domain.
[0091] The formula for the dynamic error change rate domain of the current time node is:
[0092] D Δe =D Δe0 +k Δe |Δe(t)|;
[0093] Where, D Δe is the dynamic error change rate domain of the current time node, D Δe0 is the initial error change rate domain, k Δe is the adjustment coefficient of the error change rate, and Δe(t) is the error change rate of the current time node.
[0094] In step 204, it is determined whether the error change rate corresponding to the current time node is within the dynamic error change rate domain; if so, the error change rate remains unchanged; if not, when the error change rate is greater than the maximum value of the dynamic error change rate domain, the error change rate is updated to the maximum value of the dynamic error change rate domain, and when the error change rate is less than the minimum value of the dynamic error change rate domain, the error change rate is updated to the minimum value of the dynamic error change rate domain.
[0095] Furthermore, obtaining the error membership degree according to the error after compliance processing and obtaining the change rate membership degree according to the error change rate after compliance processing specifically include:
[0096] The formula for obtaining the error membership degree according to the error after compliance processing is:
[0097]
[0098] Where, μ1(x) is the error membership degree, e(t) is the error after compliance processing, c is the central value of the dynamic error domain, and σ is the standard deviation of the dynamic error domain;
[0099] The formula for obtaining the change rate membership degree according to the error change rate after compliance processing is:
[0100]
[0101] Among them, μ2(x) is the error membership degree, Δe(t) is the error change rate after compliance processing, c is the central value of the dynamic error change rate domain, and σ is the standard deviation of the dynamic error change rate domain.
[0102] In this embodiment, both the error membership degree and the change rate membership degree can be represented by the following fuzzy subsets: {NB, NM, NS, Z, PS, PM, PB}, corresponding to: {very small, small and medium, tiny, medium, slightly large, medium and large, very large}, respectively representing the influence degrees of different PID parameter updates.
[0103] After obtaining the error membership degree and the change rate membership degree, obtaining the PID parameter difference membership degree at the current time node according to the error membership degree and the change rate membership degree includes:
[0104] Search in the membership degree relationship table according to the error membership degree and the change rate membership degree to obtain the proportional gain difference membership degree, the integral gain difference membership degree, and the derivative gain difference membership degree respectively, so as to obtain the PID parameter difference membership degree.
[0105] In this embodiment, the membership degree relationship table can be set by those skilled in the art, and specifically needs to be determined according to the influence degrees of the error and the error change rate on the integral gain difference, the integral gain difference, and the derivative gain difference in the current environment. In this embodiment, Figures 3 - 5 As a feasible membership degree relationship table, where Figure 3 is the membership degree relationship table of the proportional gain difference, Figure 4 is the membership degree relationship table of the integral gain difference, Figure 5 is the membership degree relationship table of the derivative gain difference. Taking the error membership degree as NS and the change rate membership degree as NM as an example, the membership degree of the proportional gain difference can be obtained as PM from the membership degree relationship table of the proportional gain difference, the membership degree of the integral gain difference can be obtained as NM from the membership degree relationship table of the integral gain difference, and the membership degree of the derivative gain difference can be obtained as NS from the membership degree relationship table of the derivative gain difference.
[0106] Further, after obtaining the proportional gain difference membership degree, the integral gain difference membership degree, and the derivative gain difference membership degree, the proportional gain difference, the integral gain difference, and the derivative gain difference can be obtained respectively, as follows:
[0107] The PID parameter difference includes a proportional gain difference, an integral gain difference, and a derivative gain difference, and the method includes:
[0108] Obtain the proportional gain difference according to the proportional gain difference membership degree, and the formula is:
[0109]
[0110] Among them, is the proportional gain difference at the nth time node, μ pn is the membership degree of the proportional gain difference at the nth time node, is the proportional gain difference at the (n - 1)th time node, where n is the current time node;
[0111] The integral gain difference is obtained according to the membership degree of the integral gain difference, and the formula is:
[0112]
[0113] where, is the integral gain difference at the nth time node, μ in is the membership degree of the integral gain difference at the nth time node, is the integral gain difference at the (n - 1)th time node, where n is the current time node;
[0114] The differential gain difference is obtained according to the membership degree of the differential gain difference, and the formula is:
[0115]
[0116] where, is the differential gain difference at the nth time node, μ dn is the membership degree of the differential gain difference at the nth time node, is the differential gain difference at the (n - 1)th time node, where n is the current time node.
[0117] The control output at the current time node is obtained by judging according to the PID parameter value at the current time node and the integral anti - windup mechanism, specifically including:
[0118] Adding the proportional gain difference at the current time node to the proportional gain value at the previous time node to obtain the proportional gain value at the current time node.
[0119] Adding the integral gain difference at the current time node to the integral gain value at the previous time node to obtain the integral gain value at the current time node.
[0120] Adding the differential gain difference at the current time node to the differential gain value at the previous time node to obtain the differential gain value at the current time node.
[0121] Furthermore, considering that when the integral gain parameter is large in error, the integral term may accumulate excessively, resulting in the system reacting too slowly or overshooting. Therefore, before substituting the PID parameter value into the system to generate the corresponding control output for temperature control, it is necessary to judge whether the integral term is over - accumulated through the integral anti - windup mechanism. Therefore, the following design is also involved:
[0122] The control output at the current time node obtained based on the PID parameter value and the integral anti-windup mechanism at the current time node further includes: The integral anti-windup mechanism is as follows: The calculation formula for the integral term at the nth time node is:
[0123]
[0124] where integral(n - 1) is the integral term at the (n - 1)th time node, integral(n) is the integral term at the nth time node, e(t) is the error after compliance processing, Δt is the time difference between the nth time node and the (n - 1)th time node, and threshoud is the preset error.
[0125] Apply the obtained integral term, the proportional gain value, the integral gain value, and the derivative gain value at the current time node to the system to obtain the control output required for temperature control, as follows:
[0126] Obtain the integral term at the current time node according to the magnitude relationship between the error after compliance processing and the preset error; calculate the control output at the current time node according to the error after compliance processing, the proportional gain value, the integral gain value, the integral term, and the derivative gain value at the current time node. The formula is:
[0127]
[0128] where, u n (t) is the control output at the nth time node, is the proportional gain value at the nth time node, e(t) is the error after compliance processing, is the integral gain value at the nth time node, integral(n) is the integral term at the nth time node, is the derivative gain value at the nth time node.
[0129] In this embodiment, a device for implementing the above method is also provided, as Figure 6 shown, including a host computer, a microcontroller, an FPGA module, and a temperature control module.
[0130] Among them, the host computer is used for serial communication with the microcontroller, and issues serial commands to make the controller perform corresponding calculations. The microcontroller can use the STM32H750 chip to receive the instructions from the host computer, generate feedback, and perform algorithm calculations. The output result is transmitted to the Field Programmable Gate Array (FPGA) module by using the Flexible static memory controller (FMC). The FPGA module is mainly used to receive the signals from the microcontroller, generate corresponding currents, and collect temperature signals and send them back to the microcontroller to form a closed loop. The temperature control module is used to receive the output of the FPGA and produce a cooling or heating effect.
[0131] Embodiment 2:
[0132] As Figure 7 shown, it is a schematic diagram of the adaptive adjustment PID parameter temperature control device according to an embodiment of the present invention. The adaptive adjustment PID parameter temperature control device of this embodiment includes one or more processors 41 and a memory 42.
[0133] The processor 41 and the memory 42 can be connected through a bus or other means. Figure 7 Taking the connection through the bus as an example.
[0134] The memory 42, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs and non-volatile computer-executable programs, such as the adaptive adjustment PID parameter temperature control method in the above embodiment. The processor 41 executes the adaptive adjustment PID parameter temperature control method by running the non-volatile software programs and instructions stored in the memory 42.
[0135] The memory 42 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 42 may optionally include a memory remotely set relative to the processor 41, and these remote memories can be connected to the processor 41 through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0136] The program instructions / modules are stored in the memory 42, and when executed by the one or more processors 41, they execute the adaptive adjustment PID parameter temperature control method in the above embodiment. For example, they execute the Figures 1 - 5 various steps shown above.
[0137] An embodiment of the present invention further provides a computer storage medium, on which computer program instructions are stored; when the computer program instructions are executed by a processor, the adaptive adjustment PID parameter temperature control method provided by the embodiment of the present invention is implemented.
[0138] The foregoing is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. An adaptive adjustment PID parameter temperature control method, characterized in that Including: Set the initial PID parameters, the initial error universe, and the initial error change rate universe, and apply them to the parameter update at the first time node; The parameter update at each subsequent time node includes: Measure the temperature at the current time node in real time, obtain the error corresponding to the current time node according to the set temperature and the actually measured temperature at the current time node, and obtain the error change rate according to the error at the current time node and the error at the previous time node; perform compliance processing on the error and the error change rate corresponding to the current time node according to the initial error universe and the initial error change rate universe; obtain the error membership degree according to the error after compliance processing, obtain the change rate membership degree according to the error change rate after compliance processing, and obtain the PID parameter difference membership degree according to the error membership degree and the change rate membership degree; obtain the PID parameter difference according to the PID parameter difference membership degree at the current time node, and obtain the PID parameter value at the current time node according to the PID parameter difference and the PID parameter at the previous time node; Obtain the control output at the current time node according to the PID parameter value at the current time node and the integral anti-windup mechanism.
2. The adaptive adjustment PID parameter temperature control method according to claim 1, wherein Including: Obtain the dynamic error universe at the current time node according to the error corresponding to the current time node and the initial error universe; Judge whether the error corresponding to the current time node is within the dynamic error universe; if so, the error remains unchanged; If not, when the error is greater than the maximum value of the dynamic error universe, update the error to the maximum value of the dynamic error universe, and when the error is less than the minimum value of the dynamic error universe, update the error to the minimum value of the dynamic error universe; Obtain the dynamic error change rate universe at the current time node according to the error change rate corresponding to the current time node and the initial error change rate universe; Judge whether the error change rate corresponding to the current time node is within the dynamic error change rate universe; if so, the error change rate remains unchanged; if not, when the error change rate is greater than the maximum value of the dynamic error change rate universe, update the error change rate to the maximum value of the dynamic error change rate universe, and when the error change rate is less than the minimum value of the dynamic error change rate universe, update the error change rate to the minimum value of the dynamic error change rate universe.
3. The adaptive adjustment PID parameter temperature control method according to claim 2, characterized in that, Including: The formula for obtaining the error membership degree according to the error after compliance processing is: where μ1(x) is the error membership degree, e(t) is the error after compliance processing, c is the central value of the dynamic error universe, and σ is the standard deviation of the dynamic error universe; The formula for obtaining the change rate membership degree according to the error change rate after compliance processing is: where μ2(x) is the error membership degree, Δe(t) is the error change rate after compliance processing, c is the central value of the dynamic error change rate universe, and σ is the standard deviation of the dynamic error change rate universe.
4. The adaptive adjustment PID parameter temperature control method according to claim 2, wherein Including: Search in the membership relationship table according to the error membership degree and the change rate membership degree to obtain the proportional gain difference membership degree, the integral gain difference membership degree, and the derivative gain difference membership degree respectively, so as to obtain the PID parameter difference membership degree.
5. The adaptive adjustment PID parameter temperature control method according to claim 4, wherein The PID parameter difference includes a proportional gain difference, an integral gain difference, and a derivative gain difference, and the method includes: The proportional gain difference is obtained according to the membership degree of the proportional gain difference, and the formula is: Among them, is the proportional gain difference at the nth time node, μ pn is the membership degree of the proportional gain difference at the nth time node, is the proportional gain difference at the (n - 1)th time node, and n is the current time node; The integral gain difference is obtained according to the membership degree of the integral gain difference, and the formula is: Among them, is the integral gain difference at the nth time node, μ in is the membership degree of the integral gain difference at the nth time node, is the integral gain difference at the (n - 1)th time node, and n is the current time node; The derivative gain difference is obtained according to the membership degree of the derivative gain difference, and the formula is: Among them, is the differential gain difference at the nth time node, μ dn is the membership degree of the differential gain difference at the nth time node, is the differential gain difference at the (n - 1)th time node, and n is the current time node.
6. The adaptive adjustment PID parameter temperature control method according to claim 4, wherein Including: Adding the proportional gain difference at the current time node to the proportional gain value at the previous time node to obtain the proportional gain value at the current time node; Adding the integral gain difference at the current time node to the integral gain value at the previous time node to obtain the integral gain value at the current time node; Adding the derivative gain difference at the current time node to the derivative gain value at the previous time node to obtain the derivative gain value at the current time node.
7. The adaptive adjustment PID parameter temperature control method according to claim 6, wherein Including: Obtaining the integral term at the current time node according to the magnitude relationship between the error after compliance processing and the preset error; Calculating the control output at the current time node according to the error after compliance processing, proportional gain value, integral gain value, integral term and derivative gain value at the current time node, and the formula is: where u n (t) is the control output at the nth time node, is the proportional gain value at the nth time node, e(t) is the error after compliance processing, is the integral gain value at the nth time node, integral(n) is the integral term at the nth time node, is the derivative gain value at the nth time node.
8. The adaptive adjustment PID parameter temperature control method according to claim 7, characterized in that The calculation formula for the integral term at the nth time node is: Wherein, integral(n - 1) is the integral term at the (n - 1)th time node, e(t) is the error after compliance processing, Δt is the time difference between the nth time node and the (n - 1)th time node, and threshoud is the preset error.
9. An adaptive PID parameter temperature control device, characterized in that, Including at least one processor and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor for executing the adaptive adjustment PID parameter temperature control method according to any one of claims 1 - 8.
10. A non-volatile computer storage medium, characterized in that, The computer storage medium stores computer program instructions, and when the computer program instructions are executed by one or more processors, the adaptive adjustment PID parameter temperature control method according to any one of claims 1 - 8 is implemented.