Fuzzy PID initial parameter setting method based on step response model
By combining the step response model and fuzzy PID, the dynamic parameters of the controlled object are accurately obtained, and the adaptive matching of the initial parameters is achieved. This solves the problem that the parameter tuning of traditional PID controllers depends on experience, and improves the accuracy and stability of temperature control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUANGSHAN AOYI ELECTRIC APPLIANCE CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional PID controller parameter tuning relies on manual experience, resulting in insufficient parameter matching and an inability to adapt to changes in the dynamic characteristics of the controlled object. This leads to poor control accuracy and stability, especially when the load changes or the operating conditions fluctuate, resulting in inertial lag and overshoot.
A fuzzy PID initial parameter tuning method based on a step response model is adopted. The dynamic parameters of the controlled object are obtained through system identification, and the Mac_PID function is used for multi-parameter coupling calculation. The PID parameters are dynamically corrected by fuzzy inference to achieve accurate adaptive matching of the initial parameters.
It achieves an initial control accuracy improvement of over 40%, overshoot control within 5%, and steady-state error control within ±0.1℃. It can quickly adapt to changes in operating conditions, reduce operation and maintenance costs, and improve the system's self-adaptability.
Smart Images

Figure CN122018285A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of temperature control technology, specifically to a fuzzy PID initial parameter tuning method based on a step response model. It is particularly suitable for industrial temperature control scenarios with inertial lag and operating condition fluctuations, such as constant temperature control in precision electronic component manufacturing, temperature regulation in biological fermentation processes, and temperature stabilization control in chemical reactors. Background Technology
[0002] In temperature control scenarios such as industrial production and precision experiments, the control accuracy of temperature parameters directly determines the product quality or the reliability of experimental results. PID control, due to its simple structure, strong robustness, and high reliability, is widely used in various temperature control systems. However, the parameter tuning of traditional PID controllers has long relied on the field experience of technicians. Differences in experience among different technicians can lead to significant variations in parameter tuning results, resulting not only in low tuning efficiency and high time and effort, but also in poor control accuracy due to insufficient parameter matching. More importantly, once the parameters of traditional PID controllers are fixed, they cannot adapt to changes in the dynamic characteristics of the controlled object. For example, in the manufacturing of precision electronic components, when production batches change, causing load variations, or during bio-fermentation, when the reaction heat changes due to microbial growth, the temperature control system will exhibit significant inertial lag and operating condition fluctuations, leading to decreased control accuracy, deterioration in stability, and even problems such as excessive overshoot and continuous oscillation. In severe cases, this can lead to product scrapping or experimental failure.
[0003] To address the aforementioned problems of traditional PID control, fuzzy PID control technology emerged. By introducing fuzzy logic rules, it dynamically adjusts PID parameters based on the system's operating state, thus improving the system's adaptive capability to some extent. However, existing fuzzy PID control technology still has significant drawbacks: First, the setting of initial parameters still relies heavily on human experience. Technicians need to preset the initial parameter range based on experience with similar systems and then fine-tune it through trial and error. This process is not only inefficient but also fails to fully consider the actual dynamic characteristics of the controlled object. Second, the mismatch between initial parameters and the dynamic characteristics of the controlled object leads to problems such as slow response speed, large overshoot, and large steady-state error in the initial control phase, making it difficult to meet the requirements of precise temperature control. Third, existing technologies lack a systematic technical solution that effectively combines the identification of the controlled object's dynamic parameters with the tuning of fuzzy PID initial parameters. This prevents accurate adaptive matching of initial parameters, hindering the full realization of the adaptive advantages of fuzzy PID and limiting further improvements in temperature control performance.
[0004] Therefore, developing a method for accurate self-tuning of fuzzy PID initial parameters based on the actual dynamic characteristics of the controlled object has become an urgent need in the field of temperature control technology. Summary of the Invention
[0005] The purpose of this invention is to provide a fuzzy PID initial parameter tuning method based on a step response model, which can effectively solve at least one technical problem existing in the prior art.
[0006] The technical solution adopted by this invention to solve its technical problem is: a fuzzy PID initial parameter tuning method based on a step response model, comprising the following steps: Step (1) System identification: Apply a step input signal of preset amplitude to the controlled temperature object, and collect the input step amount and the corresponding temperature response data in real time through a high-precision temperature sensor and a data acquisition module as initial temperature data. Filter and preprocess the collected initial temperature data to obtain preprocessed temperature data. Then, construct a parameter estimation model based on the least squares method, and iteratively estimate the preprocessed temperature data through the parameter estimation model to obtain the key dynamic parameters of the system. The key dynamic parameters of the system include the system gain K reflecting the relationship between input and output amplitudes, the time constant T characterizing the speed of system response, and the delay time L describing signal transmission delay. Step (2), Fuzzy PID initial parameter tuning: The system gain K, time constant T and delay time L identified in step (1) are used as input variables of the PID initial parameter mapping model. Multi-parameter coupling calculation is performed through the preset Mac_PID function, and the initial parameter set of the PID controller is finally output. The initial parameter set includes the integral time Ti that determines the integral control strength, the derivative time Td that characterizes the derivative control effect, the proportional coefficient Mul_Kp that adjusts the proportional control weight, the integral coefficient Mul_Ki that affects the integral accumulation rate, and the derivative coefficient Mul_Kd that controls the derivative response sensitivity. Step (3), Fuzzy PID dynamic control: Real-time acquisition of the set temperature value and actual temperature feedback value of the temperature control system, calculation of the deviation between the set temperature value and the actual temperature feedback value to obtain the error E, calculation of the rate of change of error E per unit time to obtain the error change rate Ec by the sliding window method; Build a fuzzy inference rule base, use the error E and the error change rate Ec as the input of fuzzy inference, perform fuzzy inference through the fuzzy inference rule base to obtain the dynamic correction amount of PID parameters, perform real-time dynamic correction of the initial parameter group obtained in step (2) through the dynamic correction amount, and then output the control signal adapted to the current working condition.
[0007] Step (1) includes the following steps: Step (11), initialization process: First, 10 sets of temperature data of the controlled object under stable initial state are collected by high-precision temperature sensor and data acquisition module, and the average value is taken as the initial temperature data; at the same time, the accumulated data required in the system identification process of step (1) is completely cleared. The accumulated data includes the key intermediate data required to construct the least squares equation system; the key intermediate data includes variable summation terms, output quantity integral cumulative value, and variable and output value multiplication cumulative term. Step (12), Real-time data acquisition and update: The high-precision temperature sensor and data acquisition module perform real-time data acquisition by setting a fixed sampling frequency of 8Hz; during the real-time data acquisition process, the amplitude of the input step and the temperature output value at the current moment are recorded synchronously. Based on the temperature output values at the previous moment and the current moment, the trapezoidal integral method is used to calculate the integral cumulative value of the output. The specific calculation method of the trapezoidal integral method is: current integral cumulative value = previous integral cumulative value + (current temperature + previous temperature) × sampling period / 2; then, according to the integral cumulative value, sampling time and input step, three core components for constructing the least squares equation system are calculated through linear transformation: phi0, phi1 and phi2. At the same time, the self-multiplication results of the three core components are accumulated in real time to construct the coefficient matrix A of the least squares equation system; and the product results of the three core components and the current temperature output value are accumulated to construct the result matrix b of the least squares equation system. Step (13), parameter solution: Based on the coefficient matrix A and result matrix b obtained in step (12), a linear equation system A* theta = b containing three unknowns K, T, and L can be constructed. A dynamic regularization term is introduced into the linear equation system. The magnitude of the dynamic regularization term can be adaptively adjusted according to the degree of data dispersion. The greater the degree of dispersion, the greater the magnitude of the regularization term. The Gaussian elimination method is used to solve the linear equation system with dynamic regularization. During the solution process, the convergence of the solution is ensured by iterative verification. When the difference between the parameters obtained by two adjacent iterations is less than the preset threshold, the iteration is stopped and the final key dynamic parameters of the system are output: system gain K, time constant T, and delay time L.
[0008] Step (2) of the multi-parameter coupled calculation of the Mac_PID function includes the following steps: Step (21) Calculate the intermediate variable Lamuda: Lamuda represents the influence weight of the delay time L on the three control parameters Kp, Ki and Kd of the PID controller. Based on a large amount of temperature control experimental data, its calculation formula is Lamuda=0.6*L, where L is the delay time obtained in step (1). The value of this coefficient allows the subsequent PID parameters to be adapted to temperature control systems with different delay characteristics. Step (22), Derivation of integral time Ti and derivative time Td: The derivation of integral time Ti and derivative time Td is based on the dynamic characteristic matching principle of temperature control system. According to time constant T, delay time L and intermediate variable Lamuda, it is derived by the following formula, where the calculation formula of Ti is used to balance the steady-state accuracy and overshoot of integral control, and the calculation formula of Td is used to optimize the anti-interference ability of derivative control: Ti=T+(L*L) / (2*(Lamuda+L)), Td=(L*L*(3*Ti-L)) / (6*Ti*(Lamuda+L)), where T is the time constant obtained in step (1); Step (23) Calculate the core control parameters: Based on Ti and Td obtained in step (22) and system parameter K obtained in step (1), the proportional coefficient Mul_Kp, integral coefficient Mul_Ki and derivative coefficient Mul_Kd are calculated by the principle of coordinated matching of proportional, integral and derivative actions. The calculation formulas are as follows: Mul_Kp=Ti / (K*(Lamuda+L)); Mul_Ki=Mul_Kp / Ti; Mul_Kd=Mul_Kp*Td; Step (24): Empirically adjust the integral coefficient Mul_Ki: Empirically adjust the large integral coefficient Mul_Ki in step (23) by adjusting Mul_Ki = Mul_Ki * 0.5.
[0009] Step (3) specifically includes the following sub-steps: Step (31), Error and Error Change Rate Calculation: The deviation between the set temperature value and the actual temperature feedback value is calculated by the comparison module of the temperature control system to obtain the error E; the actual temperature feedback value is the average of 3 consecutive temperature feedback values; the error change rate Ec is obtained by calculating the change rate of error E through the first-order difference method combined with sliding window filtering, and the length of the sliding window is set to 5 sampling periods. Step (32), fuzzification processing: preset the fuzzy universes of error E and error change rate Ec, where the fuzzy universe of error E is set to [-5,5] and the fuzzy universe of error change rate Ec is set to [-3,3]. Convert the continuous error E and error change rate Ec into corresponding fuzzy quantities through the triangular membership function. The fuzzy quantities include seven levels: "negative large (NB)", "negative medium (NM)", "negative small (NS)", "zero (ZO)", "positive small (PS)", "positive medium (PM)" and "positive large (PB)". Step (33), Fuzzy rule reasoning: Based on step (32), construct three fuzzy rule tables: Kp_Rule, Ki_Rule, and Kd_Rule. Each rule table contains 7×7=49 fuzzy rules. For example, when the error E is "positive large (PB)" and the error change rate Ec is "negative large (NB)", the Kp correction is "negative large (NB)", the Ki correction is "zero (ZO)", and the Kd correction is "positive middle (PM)". Match the corresponding fuzzy rules according to the fuzzy index of the error E and the error change rate Ec, and use the centroid method to calculate the precise correction amounts deltaKp, deltaKi, and deltaKd of the PID parameters. Step (34), parameter correction output: Based on the accurate correction amount obtained in step (33), the initial parameter group of the PID is linearly corrected. The correction formula is: Kp=Mul_Kp+deltaKp, Ki=Mul_Ki+deltaKi, Kd=Mul_Kd+deltaKd, where Kp is the corrected proportional coefficient, Ki is the corrected integral coefficient, and Kd is the corrected derivative coefficient. After correction, the parameters are constrained at the upper and lower limits. Finally, the corrected real-time control parameters Kp, Ki, and Kd are output to the actuator of the temperature control system.
[0010] The beneficial effects of this invention are: high accuracy in initial parameter tuning, significantly improving initial control performance: the actual dynamic parameters of the controlled object are accurately obtained through the system identification step, and a dedicated initial parameter calculation model is constructed based on these parameters using the Mac_PID function, achieving precise matching between the initial parameters and the dynamic characteristics of the controlled object, completely eliminating the reliance on manual experience; experimental verification shows that the initial overshoot of the system can be controlled within 5% and the steady-state error can be controlled within ±0.1℃ using the initial parameters tuned by this method. Compared with traditional experience-based tuning methods, the initial control accuracy is improved by more than 40%, effectively solving the problems of slow initial response and large overshoot in traditional methods.
[0011] Strong adaptability and adaptability to complex operating conditions: Based on accurate initial parameters, this method combines fuzzy control technology to dynamically correct PID parameters by calculating the error E and the error change rate Ec in real time. It can quickly adapt to changes in the operating conditions of the temperature control system, such as load changes, ambient temperature fluctuations, and changes in material properties. In the temperature control experiment of bio-fermentation, when the heat of reaction suddenly increases due to the growth of microorganisms during fermentation, this method can complete parameter correction within 0.5 seconds, keeping the temperature fluctuation within ±0.2℃, while the traditional fuzzy PID method requires more than 1.5 seconds to stabilize, fully demonstrating the strong adaptability of this method.
[0012] High degree of automation, reducing application threshold and operation and maintenance costs: This method automates the entire process from system identification to initial parameter tuning and dynamic parameter correction, eliminating the need for technical personnel to make trial and error based on experience, thus significantly reducing the debugging difficulty and application threshold of temperature control systems. At the same time, accurate parameter matching reduces the frequent start-stop and adjustment of actuators, extending their service life and reducing system operation and maintenance costs. In addition, the entire method has a clear process and strong operability. The sampling frequency and parameter calculation method have been optimized, balancing control accuracy and computational efficiency. It can be directly ported to common control platforms such as industrial PLCs and microcontrollers, meeting the needs of various temperature control scenarios such as industrial production, precision experiments, and biomedicine, and has broad application prospects and promotional value.
[0013] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings. Attached Figure Description
[0014] Figure 1 This is the fuzzy rule table for DKp.
[0015] Figure 2 This is the fuzzy rule table for DKi.
[0016] Figure 3 This is the fuzzy rule table for DKd. Detailed Implementation
[0017] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided.
[0018] A method for tuning initial parameters of a fuzzy PID controller based on a step response model includes the following steps: Step (1) System identification: Apply a step input signal of preset amplitude to the controlled temperature object, and collect the input step amount and the corresponding temperature response data in real time through a high-precision temperature sensor and a data acquisition module as initial temperature data. Filter and preprocess the collected initial temperature data to obtain preprocessed temperature data. Then, construct a parameter estimation model based on the least squares method, and iteratively estimate the preprocessed temperature data through the parameter estimation model to obtain the key dynamic parameters of the system. The key dynamic parameters of the system include the system gain K reflecting the relationship between input and output amplitudes, the time constant T characterizing the speed of system response, and the delay time L describing signal transmission delay. Step (2), Fuzzy PID initial parameter tuning: The system gain K, time constant T and delay time L identified in step (1) are used as input variables of the PID initial parameter mapping model. Multi-parameter coupling calculation is performed through the preset Mac_PID function, and the initial parameter set of the PID controller is finally output. The initial parameter set includes the integral time Ti that determines the integral control intensity, the derivative time Td that characterizes the derivative control effect, the proportional coefficient Mul_Kp that adjusts the proportional control weight, the integral coefficient Mul_Ki that affects the integral accumulation rate, and the derivative coefficient Mul_Kd that controls the derivative response sensitivity. Step (3), Fuzzy PID dynamic control: Real-time acquisition of the set temperature value and actual temperature feedback value of the temperature control system, calculation of the deviation between the two to obtain the error E, calculation of the rate of change of error E per unit time using the sliding window method to obtain the error change rate Ec, using the error E and the error change rate Ec as the input of fuzzy inference, and performing fuzzy inference through the fuzzy rule base to obtain the dynamic correction amount of the PID parameters, and performing real-time dynamic correction of the initial PID parameters obtained in step (2) using the dynamic correction amount, and outputting the control signal adapted to the current working condition to the actuator to realize high-precision adaptive temperature control of the controlled object.
[0019] The system identification step specifically includes the following sub-steps: Step (11), initialization process: First, 10 sets of temperature data of the controlled object under stable initial state are collected by high-precision temperature sensor and data acquisition module, and the average value is taken as the initial temperature data to eliminate the influence of instantaneous temperature fluctuation on the reference value; at the same time, the accumulated data required in the system identification in step (1) is completely cleared. The accumulated data includes the key intermediate data required to construct the least squares equation system. The key intermediate data includes variable summation terms, output quantity integral cumulative value, and variable and output value multiplication cumulative terms. Step (12), Real-time data acquisition and update: When the high-precision temperature sensor and data acquisition module acquire data in real time, a fixed sampling frequency of 8Hz is set for real-time data acquisition. This sampling frequency has been experimentally verified to balance the data acquisition accuracy and the system's computational load. It can capture subtle changes in temperature without causing computational delay due to excessive data volume. During the acquisition process, the amplitude of the input step and the temperature output value at the current moment are recorded synchronously. Based on the temperature output values at the previous moment and the current moment, the trapezoidal integral method is used to calculate the integral cumulative value of the output. The specific calculation method of the trapezoidal integral method is: current integral cumulative value = previous integral cumulative value + (current temperature + previous temperature) × sampling period / 2. Subsequently, based on the integral cumulative value, sampling time and input step, three core components for constructing the least squares equation system are calculated through linear transformation: phi0, phi1 and phi2. At the same time, the self-multiplication results of the three core components are accumulated in real time to construct the coefficient matrix A of the least squares equation system, and the product results of the three core components and the current temperature output value are accumulated to construct the result matrix b of the least squares equation system, providing data support for subsequent parameter solving. Step (13), parameter solution: Based on the coefficient matrix A and result matrix b obtained in step (12), a linear equation system containing three unknowns K, T, and L is constructed. To avoid solution failure due to data noise or matrix singularity, a dynamic regularization term is introduced into the linear equation system. The magnitude of the dynamic regularization term can be adaptively adjusted according to the degree of data dispersion. The greater the dispersion, the greater the magnitude of the regularization term, thereby improving the solution stability of the equation system. The Gaussian elimination method is used to solve the linear equation system with dynamic regularization. During the solution process, the convergence of the solution is ensured through iterative verification. When the parameter difference obtained from two adjacent iterations is less than the preset threshold, the iteration is stopped and the final key dynamic parameters of the system are output: system gain K, time constant T, and delay time L.
[0020] The multi-parameter coupled calculation of the Mac_PID function in step (2) includes the following sub-steps: Step (21): Calculate the intermediate variable Lamuda: Lamuda represents the influence weight of the delay time L on the three control parameters Kp, Ki and Kd of the PID controller. Based on a large amount of temperature control experimental data, its calculation formula is Lamuda=0.6*L, where L is the delay time obtained in step (1). The value of this coefficient can ensure that the subsequent PID parameters can be adapted to temperature control systems with different delay characteristics, taking into account both response speed and stability. Step (22), Derivation of integral time Ti and derivative time Td: The derivation of integral time Ti and derivative time Td is based on the dynamic characteristic matching principle of temperature control system. According to time constant T, delay time L and intermediate variable Lamuda, it is derived by the following formula, where the calculation formula of Ti is used to balance the steady-state accuracy and overshoot of integral control, and the calculation formula of Td is used to optimize the anti-interference ability of derivative control: Ti=T+(L*L) / (2*(Lamuda+L)), Td=(L*L*(3*Ti-L)) / (6*Ti*(Lamuda+L)), where T is the time constant obtained in step (1); Step (23) Calculate the core control parameters: Based on Ti and Td obtained in step (22) and system parameter K obtained in step (1), the proportional coefficient Mul_Kp, integral coefficient Mul_Ki and derivative coefficient Mul_Kd are calculated by the cooperative matching principle of proportional, integral and derivative actions. The calculation formulas are: Mul_Kp=Ti / (K*(Lamuda+L)), Mul_Ki=Mul_Kp / Ti, Mul_Kd=Mul_Kp*Td, where K is the system gain obtained in step (1); Step (24) Empirically adjust the integral coefficient Mul_Ki: Based on the actual application scenario of industrial temperature control, it was found that the initially calculated Mul_Ki is prone to integral saturation, which in turn causes temperature overshoot. Therefore, the large integral coefficient Mul_Ki in step (23) is empirically adjusted. The adjustment method is Mul_Ki=Mul_Ki*0.5. This adjustment coefficient has been verified by a large number of different types of temperature control systems and can effectively suppress integral saturation and improve the steady-state stability of the system.
[0021] Step (3) of the fuzzy PID dynamic control process specifically includes the following sub-steps: Step (31), Error and Error Change Rate Calculation: The deviation between the set temperature value and the actual temperature feedback value is calculated by the comparison module of the temperature control system to obtain the error E. In order to improve the calculation accuracy, the actual temperature feedback value is the average of three consecutive temperature feedback values. The error change rate Ec is obtained by calculating the change rate of error E through the first-order difference method combined with sliding window filtering. The length of the sliding window is set to 5 sampling periods, which can effectively filter out high-frequency noise in the error change rate. Step (32), fuzzification: Preset the fuzzy universes of error E and error change rate Ec, where the fuzzy universe of error E is set to [-5,5] and the fuzzy universe of error change rate Ec is set to [-3,3]. Convert the continuous error E and error change rate Ec into corresponding fuzzy quantities through the triangular membership function. The fuzzy quantities include seven levels: "negative large (NB)", "negative medium (NM)", "negative small (NS)", "zero (ZO)", "positive small (PS)", "positive medium (PM)" and "positive large (PB)", to ensure the refinement of fuzzy reasoning; Step (33), Fuzzy Rule Reasoning: Based on engineering experience in temperature control, construct three fuzzy rule tables: Kp_Rule, Ki_Rule, and Kd_Rule. Each rule table contains 7×7=49 fuzzy rules. For example, when the error E is "positive large (PB)" and the error change rate Ec is "negative large (NB)", the Kp correction is "negative large (NB)", the Ki correction is "zero (ZO)", and the Kd correction is "positive middle (PM)". Match the corresponding fuzzy rules according to the fuzzy index of the error E and the error change rate Ec, and use the centroid method to calculate the precise correction amounts deltaKp, deltaKi, and deltaKd of the PID parameters. Refer to the attached diagram in the instruction manual. Figure 1 , Figure 2 , Figure 3 ; Step (34), parameter correction output: Based on the precise correction amount obtained in step (33), the initial parameter group of the PID is linearly corrected. The correction formula is: Kp=Mul_Kp+deltaKp, Ki=Mul_Ki+deltaKi, Kd=Mul_Kd+deltaKd. After correction, the parameters are constrained to upper and lower limits to avoid the parameters from exceeding the adjustment range of the actuator. Finally, the corrected real-time control parameters are output to the actuator of the temperature control system to achieve precise temperature regulation.
[0022] This invention overcomes the limitations of traditional fuzzy PID controllers that rely on empirically set initial parameters, and constructs a complete technical system of "step response identification - dynamic parameter matching - initial parameter self-tuning - fuzzy dynamic correction". The specific technical solution is as follows: This method comprises three core modules: system identification, fuzzy PID initial parameter tuning, and fuzzy PID dynamic control. These modules work collaboratively. Its core innovation lies in accurately capturing the dynamic characteristic parameters of the controlled object through the system identification step, and using these parameters as the core input for fuzzy PID initial parameter tuning. This achieves precise matching between the initial parameters and the controlled object, avoiding subjective biases from human experience. The specific process and detailed implementation are as follows: (1) System identification steps This step is fundamental to achieving accurate initial parameter tuning. Its core purpose is to obtain dynamic characteristic data of the controlled object through step response experiments, then use the least squares method for parameter estimation, and finally obtain the key dynamic parameters of the system that can accurately characterize the temperature response characteristics of the controlled object. The key dynamic parameters of the system include the system gain K, time constant T, and delay time L. The specific implementation process is as follows: Initialization process: First, the temperature control system is placed in a stable initial state without load interference and maintained in this state for more than 5 minutes to ensure system temperature stability. Then, 10 sets of initial temperature data are continuously collected using a high-precision temperature sensor, and the initial reference temperature is calculated using the arithmetic mean method, which serves as the reference for subsequent temperature changes. At the same time, all accumulated data involved in the identification process are cleared and initialized. The accumulated data includes key intermediate data such as the variable summation terms required to construct the least squares equation system, the cumulative value of the output integral, the cumulative term of the variable multiplication, and the cumulative term of the product of the variable and the output value, to avoid historical data from interfering with the identification results.
[0023] Real-time data acquisition and updating: A step input signal with a preset amplitude is applied to the controlled object. The step amplitude is determined based on the rated adjustment range of the controlled object, typically 20%-30% of the rated adjustment range. This ensures a noticeable temperature response without causing system temperature runaway due to excessive input. Real-time data acquisition is then initiated at a fixed sampling frequency of 8Hz. This sampling frequency is the optimal value verified through extensive experiments, ensuring the capture of subtle temperature changes while avoiding data redundancy and excessive computational load due to excessively high sampling frequencies. During acquisition, the amplitude of the input step and the current temperature output value are synchronously recorded via a data acquisition card. To eliminate noise from environmental interference, the acquired temperature data undergoes first-order processing. Low-pass filtering preprocessing; based on the preprocessed temperature output values of the previous and current times, the trapezoidal integral method is used to calculate the cumulative integral value of the output. The specific calculation method of the trapezoidal integral method is: current cumulative integral value = previous cumulative integral value + (current temperature + previous temperature) × sampling period / 2. This method has higher integration accuracy than the rectangular integral method. Subsequently, based on the cumulative integral value, sampling time, and input step, three core components for constructing the least squares equation system are calculated through the linear transformation formula. At the same time, the self-multiplication results of the three components and the product results of the three components with the current temperature output value are accumulated in real time. Data is continuously collected until the temperature output value reaches a stable state.
[0024] Parameter Solving: Based on the multiple sets of stable data accumulated in step (2), a system of linear equations is constructed with the system gain K, time constant T, and delay time L as unknowns. Its matrix form is A*Theta=B, where A is the coefficient matrix, which consists of the self-multiplied cumulative values of the three components; Theta is a vector containing the system parameters K, T, and L; and B is the constant term matrix, which consists of the product of the three components and the temperature output value. To avoid solution failure and result distortion due to data noise or singular coefficient matrix, a dynamic regularization term is introduced into the system of equations. The magnitude of the regularization term is adaptively adjusted using the data dispersion coefficient, which is calculated as the standard deviation of the data divided by the average value of the data. The larger the dispersion coefficient, the larger the magnitude of the regularization term, thereby improving the stability of the solution of the equation system. The Gaussian elimination method is used to solve the linear equation system with dynamic regularization. An iterative verification mechanism is adopted during the solution process. The residual is calculated after each iteration. When the residual is less than a preset threshold and the difference between the parameters obtained in two adjacent iterations is less than 0.001, the iteration stops and the final key dynamic parameters of the system are output: system gain K, time constant T, and delay time L, thus completing the system identification.
[0025] (2) Fuzzy PID initial parameter tuning steps This step is the core innovative module of this invention. Its core idea is to construct a precise mapping relationship between the identification parameters and the PID initial parameters. Based on the system gain K, time constant T, and delay time L obtained in the system identification step, the PID initial parameters that precisely match the dynamic characteristics of the controlled object are automatically calculated through the preset Mac_PID function, avoiding the subjective bias of human experience. The specific calculation process is as follows: Calculating the intermediate variable Lamuda: Lamuda is a key intermediate coefficient used to balance the influence of delay time on PID parameters. Its value directly determines the adaptability of the initial parameters to the delayed system. Based on the fitting analysis of a large number of experimental data of temperature control systems with different delay characteristics, the optimal calculation formula is Lamuda = 0.6 * L, where L is the delay time obtained in the system identification step. The advantage of this coefficient value is that when the system delay time is long, the influence of delay on control performance can be appropriately weakened by Lamuda to avoid excessive overshoot in the system. When the delay time is short, the fast response capability of the system can be guaranteed. Derivation of Integral Time Ti and Derivative Time Td: The derivation of integral time Ti and derivative time Td follows the principle of "dynamic characteristic matching," meaning that the parameter values must be precisely matched with the system's time constant T and delay time L to ensure that integral control can effectively eliminate steady-state errors and derivative control can promptly suppress temperature change trends. Based on the time constant T, delay time L, and intermediate variable Lamuda, the following formulas are used for derivation: Ti = T + (L*L) / (2*(Lamuda+L)); Td=(L*L*(3*Ti-L)) / (6*Ti*(Lamuda+L)); Calculate the core control parameters: Based on the obtained Ti, Td, and identification parameter K, and combining the synergistic working principle of proportional, integral, and derivative control actions, calculate the proportional coefficient Mul_Kp, integral coefficient Mul_Ki, and derivative coefficient Mul_Kd. The values of these three parameters need to be optimized synergistically to avoid system performance degradation caused by a single parameter being too strong or too weak. The specific calculation formulas are as follows: Mul_Kp=Ti / (K*(Lamuda+L)); Mul_Ki = Mul_Kp / Ti; Mul_Kd = Mul_Kp * Td; Empirical Adjustment: Analysis of numerous practical application cases in industrial temperature control revealed that the initially calculated Mul_Ki is prone to integral saturation due to excessive integral action, especially in scenarios with large initial errors. Integral saturation can lead to significant temperature overshoot, severely impacting control accuracy. Therefore, the integral coefficient Mul_Ki is empirically adjusted using the formula Mul_Ki = Mul_Ki * 0.5. This adjustment coefficient has been verified in temperature control systems across multiple fields, including electronic component manufacturing, bio-fermentation, and chemical reactions. It effectively suppresses integral saturation, ensuring steady-state accuracy while keeping overshoot within 5%, significantly improving the system's steady-state stability, and ultimately yielding the initial parameter set for the fuzzy PID controller.
[0026] (3) Fuzzy PID dynamic control steps Based on the aforementioned precisely matched initial parameters, fuzzy logic rules are used to dynamically correct the PID parameters, enabling the system to adapt to changes in the operating conditions of the temperature control system, further improving control accuracy and stability. The specific process is as follows: Error and Error Change Rate Calculation: The deviation between the set temperature value and the actual temperature feedback value is calculated in real time by the comparison module of the temperature control system to obtain the error E. To improve the reliability of the error calculation, the actual temperature feedback value is the arithmetic mean of three consecutive sets of sampled data to filter out instantaneous noise interference. The change rate of error E is calculated by combining the first-order difference method with sliding window filtering to obtain the error change rate Ec. The length of the sliding window is set to 5 sampling periods. This setting can effectively filter out high-frequency noise in the error change rate and ensure that Ec can truly reflect the temperature change trend. At the same time, the calculated E and Ec are subjected to amplitude limiting to avoid subsequent fuzzy inference failure due to abnormal data.
[0027] Fuzzy processing: The fuzzy universes of discourse for error E and error change rate Ec are preset. The fuzzy universe of discourse for E is set to [-5, 5] according to the temperature control accuracy requirements, corresponding to the actual temperature error range [-5℃, 5℃]. The fuzzy universe of discourse for Ec is set to [-3, 3], corresponding to the actual error change rate range [-3℃ / s, 3℃ / s]. The continuous error E and error change rate Ec are converted into corresponding fuzzy quantities through triangular membership functions. Triangular membership functions have the advantages of simple calculation and high sensitivity, which are suitable for the real-time requirements of temperature control. The fuzzy quantities are divided into seven levels: "negative large (NB)", "negative medium (NM)", "negative small (NS)", "zero (ZO)", "positive small (PS)", "positive medium (PM)" and "positive large (PB)", to ensure that fuzzy inference can be finely adapted to different system operating states.
[0028] Fuzzy rule reasoning: Based on engineering experience in temperature control and a large amount of experimental data, three independent fuzzy rule tables, Kp_Rule, Ki_Rule, and Kd_Rule, are constructed. Each rule table contains 7×7=49 fuzzy rules, covering all possible combinations of E and Ec states. The design of fuzzy rules follows the core principle of "strengthening proportional action and weakening integral action when the error is large, and strengthening differential action when the error rate of change is large." For example, when the error E is "positive and large (PB)" and the error rate of change Ec is "negative and large (NB)", it indicates that the system temperature is much lower than the set value and the cooling trend is increasing. The trend is obvious. At this time, the Kp correction is set to "negative large (NB)" to weaken the proportional effect and avoid subsequent overshoot, the Ki correction is set to "zero (ZO)" to pause integral accumulation, and the Kd correction is set to "positive middle (PM)" to strengthen the derivative effect and suppress the cooling trend. According to the fuzzy index matching of the error E and the error change rate Ec, the corresponding fuzzy rules are matched. The centroid method is used to convert the fuzzy inference results into the precise correction quantities deltaKp, deltaKi, and deltaKd of the PID parameters. The centroid method has the advantages of smooth output and strong anti-interference ability, which can ensure the reliability of the correction quantities.
[0029] Parameter Correction and Output: Based on the precise correction amount, the initial parameters of the fuzzy PID are linearly corrected using the following formulas: Kp = Mul_Kp + deltaKp, Ki = Mul_Ki + deltaKi, Kd = Mul_Kd + deltaKd. To prevent the corrected parameters from exceeding the physical adjustment range of the actuator, upper and lower limits are imposed on the corrected parameters. The upper and lower limits are preset based on the rated parameters of the actuator and the system control requirements. Finally, the constrained real-time control parameters are converted into analog or digital signals and output to the actuator of the temperature control system to achieve precise and adaptive temperature control of the controlled object.
[0030] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for tuning initial parameters of a fuzzy PID controller based on a step response model, characterized in that: Includes the following steps: Step (1) System identification: Apply a step input signal of preset amplitude to the controlled temperature object, and collect the input step amount and the corresponding temperature response data in real time through a high-precision temperature sensor and a data acquisition module as initial temperature data. Filter and preprocess the collected initial temperature data to obtain preprocessed temperature data. Then, construct a parameter estimation model based on the least squares method, and iteratively estimate the preprocessed temperature data through the parameter estimation model to obtain the key dynamic parameters of the system. The key dynamic parameters of the system include the system gain K reflecting the relationship between input and output amplitudes, the time constant T characterizing the speed of system response, and the delay time L describing signal transmission delay. Step (2), Fuzzy PID initial parameter tuning: The system gain K, time constant T and delay time L obtained from the system identification in step (1) are used as input variables of the PID initial parameter mapping model. Multi-parameter coupling calculation is performed through the preset Mac_PID function, and the initial parameter set of the PID controller is finally output. The initial parameter set includes the integral time Ti that determines the integral control strength, the derivative time Td that characterizes the derivative control effect, the proportional coefficient Mul_Kp that adjusts the proportional control weight, the integral coefficient Mul_Ki that affects the integral accumulation rate, and the derivative coefficient Mul_Kd that controls the derivative response sensitivity. Step (3), Fuzzy PID dynamic control: Real-time acquisition of the set temperature value and the actual temperature feedback value of the temperature control system, calculation of the deviation between the set temperature value and the actual temperature feedback value to obtain the error E, and calculation of the rate of change of error E per unit time to obtain the error change rate Ec by the sliding window method; A fuzzy inference rule base is built, and the error E and the error change rate Ec are used as the input quantities of fuzzy inference. The dynamic correction quantity of the PID parameters is obtained by fuzzy inference through the fuzzy inference rule base. The initial parameter group obtained in step (2) is dynamically corrected in real time through the dynamic correction quantity, and then the control signal adapted to the current working condition is output.
2. The fuzzy PID initial parameter tuning method based on a step response model according to claim 1, characterized in that: Step (1) includes the following steps: Step (11), initialization process: First, 10 sets of temperature data of the controlled object under stable initial state are collected by high-precision temperature sensor and data acquisition module, and the average value is taken as the initial temperature data; at the same time, the accumulated data required in the system identification process of step (1) is completely cleared. The accumulated data includes the key intermediate data required to construct the least squares equation system; the key intermediate data includes variable summation terms, output quantity integral cumulative value, and variable and output value multiplication cumulative term. Step (12), Real-time data acquisition and update: The high-precision temperature sensor and data acquisition module perform real-time data acquisition by setting a fixed sampling frequency of 8Hz; During the real-time data acquisition process, the amplitude of the input step and the temperature output value at the current moment are recorded synchronously. Based on the temperature output values at the previous moment and the current moment, the trapezoidal integral method is used to calculate the integral cumulative value of the output. The specific calculation method of the trapezoidal integral method is: Current integral cumulative value = previous integral cumulative value + (current temperature + previous temperature) × sampling period / 2; Subsequently, based on the integral cumulative value, sampling time and input step, three core components phi0, phi1 and phi2 are calculated through linear transformation to construct the least squares equation system. At the same time, the self-multiplication results of the three core components are accumulated in real time to construct the coefficient matrix A of the least squares equation system. And the product of the three core components with the current temperature output value is used to construct the result matrix b of the least squares equation system; Step (13), parameter solution: Based on the coefficient matrix A and result matrix b obtained in step (12), construct a linear equation system containing three unknowns K, T, and L. Introduce a dynamic regularization term into the linear equation system. The magnitude of the dynamic regularization term can be adaptively adjusted according to the degree of data dispersion. The greater the degree of dispersion, the greater the magnitude of the regularization term. Use Gaussian elimination to solve the linear equation system with dynamic regularization. During the solution process, iterative verification is used to ensure the convergence of the solution. When the difference between the parameters obtained from two adjacent iterations is less than the preset threshold, stop the iteration and output the final key dynamic parameters of the system: system gain K, time constant T, and delay time L.
3. The fuzzy PID initial parameter tuning method based on a step response model according to claim 1, characterized in that: Step (2) of the multi-parameter coupled calculation of the Mac_PID function includes the following steps: Step (21) Calculate the intermediate variable Lamuda: Lamuda represents the influence weight of the delay time L on the three control parameters Kp, Ki and Kd of the PID controller. Based on a large amount of temperature control experimental data, its calculation formula is Lamuda=0.6*L, where L is the delay time obtained in step (1). The value of this coefficient allows the subsequent PID parameters to be adapted to temperature control systems with different delay characteristics. Step (22), Derivation of integral time Ti and derivative time Td: The derivation of integral time Ti and derivative time Td is based on the dynamic characteristic matching principle of temperature control system. According to time constant T, delay time L and intermediate variable Lamuda, it is derived by the following formula, where the calculation formula of Ti is used to balance the steady-state accuracy and overshoot of integral control, and the calculation formula of Td is used to optimize the anti-interference ability of derivative control: Ti=T+(L*L) / (2*(Lamuda+L)), Td=(L*L*(3*Ti-L)) / (6*Ti*(Lamuda+L)), where T is the time constant obtained in step (1); Step (23) Calculate the core control parameters: Based on Ti and Td obtained in step (22) and system parameter K obtained in step (1), the proportional coefficient Mul_Kp, integral coefficient Mul_Ki and derivative coefficient Mul_Kd are calculated by the principle of coordinated matching of proportional, integral and derivative actions. The calculation formulas are as follows: Mul_Kp=Ti / (K*(Lamuda+L)); Mul_Ki=Mul_Kp / Ti; Mul_Kd=Mul_Kp*Td; Step (24): Empirically adjust the integral coefficient Mul_Ki: Empirically adjust the large integral coefficient Mul_Ki in step (23) by adjusting Mul_Ki = Mul_Ki * 0.
5.
4. The fuzzy PID initial parameter tuning method based on a step response model according to claim 1, characterized in that: Step (3) specifically includes the following sub-steps: Step (31), Error and Error Change Rate Calculation: The deviation between the set temperature value and the actual temperature feedback value is calculated by the comparison module of the temperature control system to obtain the error E; the actual temperature feedback value is the average of 3 consecutive temperature feedback values; the error change rate Ec is obtained by calculating the change rate of error E through the first-order difference method combined with sliding window filtering, and the length of the sliding window is set to 5 sampling periods. Step (32), fuzzification processing: preset the fuzzy universes of error E and error change rate Ec, where the fuzzy universe of error E is set to [-5,5] and the fuzzy universe of error change rate Ec is set to [-3,3]. Convert the continuous error E and error change rate Ec into corresponding fuzzy quantities through the triangular membership function. The fuzzy quantities include seven levels: "negative large (NB)", "negative medium (NM)", "negative small (NS)", "zero (ZO)", "positive small (PS)", "positive medium (PM)" and "positive large (PB)". Step (33) Fuzzy rule reasoning: Based on step (32), construct three fuzzy rule tables: Kp_Rule, Ki_Rule, and Kd_Rule. Each rule table contains 7×7=49 fuzzy rules. For example, when the error E is "positive large (PB)" and the error change rate Ec is "negative large (NB)", the correction amount of Kp is "negative large (NB)", the correction amount of Ki is "zero (ZO)", and the correction amount of Kd is "positive middle (PM)". Match the corresponding fuzzy rules according to the fuzzy index of the error E and the error change rate Ec, and use the centroid method to calculate the precise correction amounts of PID parameters deltaKp, deltaKi, and deltaKd. Step (34), Parameter Correction Output: Based on the precise correction amount obtained in step (33), the initial parameter set of the PID is linearly corrected. The correction formula is: Kp=Mul_Kp+deltaKp, Ki=Mul_Ki+deltaKi, Kd=Mul_Kd+deltaKd, where Kp is the corrected proportional coefficient, Ki is the corrected integral coefficient, and Kd is the corrected derivative coefficient. After correction, upper and lower limits are imposed on the parameters, and the corrected real-time control parameters are finally output to the actuator of the temperature control system.