A PLC temperature control optimization method and system based on adaptive fuzzy PID

By using an adaptive fuzzy PID control method, combined with wavelet transform and fuzzy inference, the parameters of an industrial temperature control system are adaptively adjusted. This solves the problems of insufficient adaptability and anti-interference ability of traditional PID control, and improves control accuracy and stability.

CN122431146APending Publication Date: 2026-07-21GUIZHOU WENGFU JIANGSHAN CHEMICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUIZHOU WENGFU JIANGSHAN CHEMICAL CO LTD
Filing Date
2026-05-21
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional PID control suffers from poor parameter adaptability, weak anti-interference ability, and insufficient adaptability to operating conditions in industrial temperature control, resulting in low control accuracy, slow response speed, and poor production stability.

Method used

An adaptive fuzzy PID control method is adopted, which suppresses noise interference through wavelet transform and achieves adaptive adjustment of PID parameters by combining fuzzy inference and real-time operating condition identification. This includes preset target temperature value, fuzzy universe of discourse and fuzzy rule base, fuzzification processing of temperature deviation and deviation change rate, and dynamic adjustment of PID parameters according to operating condition characteristics.

Benefits of technology

It significantly improves the accuracy, stability, and response speed of industrial temperature control, can adapt to the temperature control requirements of different working conditions, and enhances the system's anti-interference ability and parameter adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431146A_ABST
    Figure CN122431146A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial automation temperature control, and particularly discloses a PLC temperature control optimization method and system based on adaptive fuzzy PID, which comprises the following steps: S1, presetting initial parameters and rules; S2, collecting actual temperature signals; S3, performing noise suppression processing based on wavelet transformation; S4, calculating temperature deviation and a deviation change rate; S5, performing fuzzy processing on the temperature deviation and the deviation change rate; S6, performing fuzzy reasoning based on fuzzy language variables and a fuzzy rule base, and combining real-time working condition characteristics to obtain real-time PID parameters; and S7, calculating a control output, converting the control output into a control instruction recognizable by an executing mechanism, and sending the control instruction to the executing mechanism; after step S1 is executed, steps S2 to S7 are repeatedly executed in sequence. The method solves the problems of poor adaptability, weak anti-interference capability and insufficient working condition adaptability of traditional PID control parameters, and significantly improves the precision, stability and response speed of industrial temperature control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation temperature control technology, specifically to a PLC temperature control optimization method and system based on adaptive fuzzy PID. Background Technology

[0002] Temperature is one of the most critical control parameters in industrial production processes, and its control accuracy and stability directly affect product quality, production efficiency, and energy consumption. Currently, the industrial sector widely uses traditional PID control algorithms for temperature regulation. This primarily involves collecting actual temperature signals from temperature sensors, comparing them with a preset target temperature to calculate the deviation, and then outputting control signals based on pre-set fixed proportional, integral, and derivative parameters to drive heating or cooling actuators. Some improved solutions add simple filtering stages to the traditional PID control to suppress noise interference from the sensor signals.

[0003] However, the above methods still have certain shortcomings and defects in practical applications: Poor parameter adaptability: Industrial temperature control objects generally exhibit nonlinear, time-varying, and large hysteresis characteristics, and are easily affected by various factors such as ambient temperature fluctuations, material load changes, and equipment aging during production. Traditional PID control relies on fixed parameters and cannot adjust in real time according to changes in operating conditions. This leads to problems such as low control accuracy, slow response speed, and large overshoot when the temperature changes rapidly or strong disturbances occur, seriously affecting production stability.

[0004] Insufficient noise suppression capability: Industrial environments are complex, and the raw signals collected by temperature sensors often contain a large amount of high-frequency electromagnetic noise and mechanical vibration noise. Existing simple filtering methods cannot effectively separate noise from the true temperature signal, which can easily lead to distortion in temperature deviation calculations, further reducing control accuracy and system stability.

[0005] Weak adaptability to operating conditions: Existing fuzzy PID control algorithms mostly adopt a generalized fuzzy rule library, without differentiated design for the temperature response characteristics of different industrial scenarios, and lack a parameter self-learning mechanism. They cannot dynamically modify the control strategy according to the actual operating effect of the system, making it difficult to meet the high-precision temperature control requirements in multiple scenarios. Summary of the Invention

[0006] In view of this, the present invention proposes a PLC temperature control optimization method based on adaptive fuzzy PID, comprising the following steps: S1: Preset target temperature value, temperature deviation range, deviation change rate range, PID initial parameters, fuzzy universe of discourse, fuzzy subset and fuzzy rule base; S2: Collects actual temperature signals in the industrial production environment; S3: Perform noise suppression processing based on wavelet transform on the actual temperature signal to obtain the denoised temperature signal; S4: Calculate the temperature deviation and the rate of change of the deviation between the denoised temperature signal and the target temperature value; S5: The temperature deviation and the rate of change of deviation are fuzzified to obtain the corresponding fuzzy linguistic variables; S6: Perform fuzzy inference based on the fuzzy linguistic variables and the fuzzy rule base, and combine real-time operating condition characteristics to complete the adaptive adjustment of PID parameters, thereby obtaining real-time PID parameters; S7: Calculate the control output based on the real-time PID parameters and the temperature deviation, convert the control output into a control command that the actuator can recognize, and send it to the actuator; After step S1 is executed, steps S2 to S7 are repeated sequentially.

[0007] Furthermore, step S3 includes: S31: Select the mother wavelet to perform multi-level wavelet decomposition on the actual temperature signal to obtain low-frequency approximate components and multi-level high-frequency detail components. S32: The threshold of each high-frequency detail component is calculated using an adaptive thresholding method; S33: A soft thresholding function is used to perform thresholding on each high-frequency detail component; S34: Perform inverse wavelet transform on the processed low-frequency approximation component and high-frequency detail component to reconstruct the denoised temperature signal.

[0008] Furthermore, step S5 specifically includes: S51: Normalize and map the temperature deviation and the rate of change of deviation to the fuzzy universe of discourse; S52: Define the fuzzy subset of the temperature deviation and the rate of change of the deviation; S53: The membership values ​​of the temperature deviation and the rate of change of deviation belonging to each fuzzy subset are calculated using the triangular membership function to complete the fuzzification process.

[0009] Furthermore, step S6, which involves adaptively adjusting the PID parameters based on real-time operating conditions, includes: S61: Collect the operating status parameters of the actuator and the ambient temperature fluctuation value, and construct the operating condition feature vector; S62: Match the working condition feature vector with the industrial scene feature template to identify the current working condition type and determine the corresponding working condition weight factor; S63: Combine the operating condition weighting factor to perform fuzzy inference calculation to obtain the fuzzy quantity of PID parameter adjustment; S64: Defuzzify the fuzzy value of the PID parameter adjustment to obtain the accurate PID parameter adjustment value; S65: Calculate the real-time PID parameters based on the initial PID parameters and the precise PID parameter adjustment amount, and perform parameter limiting processing.

[0010] Furthermore, the fuzzy inference operation in step S63 includes: Calculate the trigger strength of the basic rule, and obtain the weighted trigger strength by combining it with the operating condition weight factor; take the maximum value of the weighted trigger strength of all rules involving the same fuzzy subset of PID parameter adjustment to obtain the comprehensive trigger strength of each fuzzy subset.

[0011] Furthermore, in step S64, the defuzzification process adopts the dynamic weight centroid method, which dynamically allocates the priority weights of the proportional coefficient, integral coefficient, and differential coefficient adjustment amount according to the current working condition type, and calculates the precise PID parameter adjustment amount by combining the comprehensive trigger intensity and universe center value of each fuzzy subset.

[0012] Furthermore, step S65 also includes a parameter self-learning correction step: Record the system's response metrics after each parameter adjustment, including: overshoot, response time, and steady-state error. If the response metrics exceed the preset threshold for multiple consecutive sampling periods, the PID parameter adjustment is multiplied by a dynamic correction coefficient.

[0013] Furthermore, in step S65, the parameter limiting process sets different upper and lower limits for PID parameters for different operating conditions. If the calculated real-time PID parameters exceed the corresponding limits, the limits are taken as the final real-time PID parameters.

[0014] This invention also proposes a PLC temperature control optimization system based on adaptive fuzzy PID to achieve the above method, including: The preset module is used to preset the target temperature value, temperature deviation range, deviation change rate range, PID initial parameters, fuzzy universe of discourse, fuzzy subset, and fuzzy rule base. Temperature acquisition module is used to acquire actual temperature signals in industrial production environments; The noise suppression module is connected to the temperature acquisition module and is used to perform noise suppression processing on the acquired actual temperature signal based on wavelet transform to obtain the denoised temperature signal. An adaptive fuzzy PID control module, connected to the noise suppression module, is used to calculate the temperature deviation and the rate of change of the deviation between the denoised temperature signal and the target temperature value. The temperature deviation and the rate of change of the deviation are fuzzified to obtain the corresponding fuzzy linguistic variables. Fuzzy inference is performed based on the fuzzy linguistic variables and the fuzzy rule base. Combined with the real-time operating condition characteristics, the adaptive adjustment of the PID parameters is completed to obtain the real-time PID parameters. The PLC main control module is connected to the adaptive fuzzy PID control module and is used to calculate the control output based on the real-time PID parameters and the temperature deviation, and convert the control output into control commands that can be recognized by the actuator. The actuator is connected to the PLC main control module and is used to adjust the working status of the heating or cooling equipment according to the control instructions.

[0015] Furthermore, the adaptive fuzzy PID control module includes: The deviation calculation unit is used to calculate the temperature deviation and the rate of change of the deviation between the denoised temperature signal and the target temperature. A fuzzification unit, connected to the deviation calculation unit, is used to fuzzify the temperature deviation and the rate of change of deviation to obtain the corresponding fuzzy linguistic variables. The working condition identification unit is used to collect the working status parameters of the actuator and the ambient temperature fluctuation value, construct the working condition feature vector, and identify the current working condition type and the corresponding working condition weight factor. The fuzzy inference unit is connected to the fuzzification unit and the working condition recognition unit respectively. It is used to perform fuzzy inference operations based on the fuzzy linguistic variables and fuzzy rule base, and combine real-time working condition characteristics to complete the adaptive adjustment of PID parameters and obtain the fuzzy quantity of PID parameter adjustment. A defuzzing unit, connected to the fuzzy inference unit, is used to defuzzify the fuzzy values ​​of the PID parameter adjustment to obtain accurate PID parameter adjustment values. The parameter calculation and limiting unit, connected to the defuzzification unit, is used to calculate the real-time PID parameters based on the initial PID parameters and the precise PID parameter adjustment amount, and to perform parameter limiting processing.

[0016] This invention suppresses noise interference in temperature signals through wavelet transform and achieves adaptive adjustment of PID parameters by combining fuzzy inference and real-time operating condition identification. It solves the problems of poor adaptability of traditional PID control parameters, weak anti-interference ability, and insufficient adaptability to operating conditions, and significantly improves the accuracy, stability and response speed of industrial temperature control. Attached Figure Description

[0017] Figure 1 This is a flowchart of a PLC temperature control optimization method based on adaptive fuzzy PID according to the present invention; Figure 2 This is a diagram of a PLC temperature control optimization system based on adaptive fuzzy PID according to the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been presented in the various embodiments of this application to enable the reader to better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments.

[0019] In the following description, certain specific details are set forth for the purpose of illustrating various disclosed embodiments in order to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the art will recognize that embodiments may be practiced without one or more of these specific details. In other instances, well-known apparatuses, structures, and techniques associated with this application may not have been shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.

[0020] Unless the context requires otherwise, throughout the specification and claims, the word “comprising” and its variations, such as “including” and “having”, shall be understood to have an open, inclusive meaning, that is, to be interpreted as “including, but not limited to”.

[0021] The embodiments of this application will be described in detail below with reference to the accompanying drawings to provide a clearer understanding of the purpose, features, and advantages of this application. It should be understood that the embodiments shown in the drawings are not intended to limit the scope of this application, but are merely for illustrating the essential spirit of the technical solution of this application.

[0022] Throughout this specification, references to "an embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Therefore, the appearance of "in an embodiment" or "an embodiment" in various places throughout the specification does not necessarily refer to the same embodiment. Furthermore, a particular feature, structure, or characteristic may be combined in any manner in one or more embodiments.

[0023] This invention proposes a PLC temperature control optimization method based on adaptive fuzzy PID, such as... Figure 1 As shown, it includes the following steps: S1: Preset target temperature value, temperature deviation range, deviation change rate range, PID initial parameters, fuzzy universe of discourse, fuzzy subset and fuzzy rule base; S2: Collects actual temperature signals in the industrial production environment; S3: Perform noise suppression processing based on wavelet transform on the actual temperature signal to obtain the denoised temperature signal; S4: Calculate the temperature deviation and the rate of change of the deviation between the denoised temperature signal and the target temperature value; S5: The temperature deviation and the rate of change of deviation are fuzzified to obtain the corresponding fuzzy linguistic variables; S6: Perform fuzzy inference based on the fuzzy linguistic variables and the fuzzy rule base, and combine real-time operating condition characteristics to complete the adaptive adjustment of PID parameters, thereby obtaining real-time PID parameters; S7: Calculate the control output based on the real-time PID parameters and the temperature deviation, convert the control output into a control command that the actuator can recognize, and send it to the actuator; After step S1 is executed, steps S2 to S7 are repeated sequentially.

[0024] This invention is applicable to industrial production scenarios requiring high-precision and high-stability temperature control, such as chemical reactions, machining, and electronic component manufacturing. By suppressing noise interference in the temperature signal through wavelet transform and combining fuzzy inference with real-time operating condition identification, it achieves adaptive adjustment of PID parameters. This solves the problems of poor parameter adaptability, weak anti-interference ability, and insufficient operating condition adaptability of traditional PID control, significantly improving the accuracy, stability, and response speed of industrial temperature control.

[0025] For step S1, specifically, the target temperature value, temperature deviation range, deviation change rate range, PID initial parameters (proportional coefficient Kp0, integral coefficient Ki0, derivative coefficient Kd0), fuzzy universe of discourse, fuzzy subset and fuzzy rule base are preset. The fuzzy rule base is built based on practical experience and experimental data in industrial temperature control, covering PID parameter adjustment strategies corresponding to different combinations of temperature deviation and deviation change rate. At the same time, it presets the maximum temperature deviation emax, the maximum deviation change rate ecmax, and the upper and lower limits of PID parameters (Kpmin, Kpmax, Kimin, Kimax, Kdmin, Kdmax) to provide a basis for subsequent parameter calculation and amplitude limiting.

[0026] For step S2, the acquisition frequency is set according to the production scenario requirements, such as 10Hz, to ensure real-time signal performance.

[0027] Furthermore, step S3 includes: S31: Select the mother wavelet to perform multi-level wavelet decomposition on the actual temperature signal to obtain low-frequency approximate components and multi-level high-frequency detail components. Specifically, the db4 wavelet is used as the mother wavelet to perform a 3-level wavelet decomposition on the acquired temperature signal T(t). The decomposition formula is as follows: T(t) = A3 + D3 + D2 + D1 A3 is the 3-layer low-frequency approximation component (the main body of the effective temperature signal), and D3, D2, and D1 are the 3-layer, 2-layer, and 1-layer high-frequency detail components (mainly containing noise), respectively. S32: The threshold of each high-frequency detail component is calculated using an adaptive thresholding method; Specifically, the calculation formula is as follows: , Where λ is the threshold, N is the number of signal sampling points, and σ is the noise standard deviation, estimated through the high-frequency components of layer D1, using the following formula: ; S33: A soft thresholding function is used to perform thresholding on each high-frequency detail component; Specifically, the soft threshold function is:

[0028] in w These are the high-frequency component coefficients before processing. w' These are the high-frequency component coefficients after processing.

[0029] S34: Perform inverse wavelet transform on the processed low-frequency approximation component and high-frequency detail component to reconstruct the denoised temperature signal. T'(t) .

[0030] Specifically, the inverse transform formula is: , This step decomposes the temperature signal into components of different frequencies using wavelet transform, selectively filtering out high-frequency noise while preserving the trend characteristics of the true temperature signal. This reduces the impact of electromagnetic noise and mechanical vibration noise in the industrial environment on the accuracy of temperature acquisition, providing a reliable data foundation for subsequent deviation calculation and control parameter adjustment.

[0031] Further, step S4: Calculate the temperature deviation and the rate of change of deviation between the denoised temperature signal and the target temperature value, including: Receive the denoised temperature signal T'(t) First, data validity is verified. If the difference between the current denoised temperature signal and the data from the previous sampling period exceeds a preset threshold, the average of the previous three sampling data is used to replace the outlier to ensure signal reliability. Then, the verified actual temperature T'(t) is compared with the preset target temperature value T0 to calculate the current temperature deviation e(t), using the formula: , A positive temperature deviation e(t) indicates that the actual temperature is lower than the target temperature, while a negative value indicates that the actual temperature is higher than the target temperature. Simultaneously, the temperature deviation e(t-1) from the previous sampling period is acquired. At the initial sampling period, e(t-1) is set to 0. The rate of change of deviation ec(t) is calculated using the sampling period Δt, as shown in the formula: , A positive value of the deviation change rate ec(t) indicates that the deviation is increasing, a negative value indicates that the deviation is decreasing, and zero indicates that the deviation is unchanged.

[0032] Furthermore, step S5 specifically includes: S51: Normalize and map the temperature deviation and the rate of change of deviation to the fuzzy universe of discourse; Specifically, first confirm that the actual values ​​of the temperature deviation e(t) and the rate of change of deviation ec(t) do not exceed the preset deviation range and rate of change of deviation range. If they do exceed these ranges, treat them as boundary values, with the boundary values ​​being e(t) and ec(t) respectively. max and EC max Then, the temperature deviation and the rate of change of deviation are normalized and mapped to a preset fuzzy domain [-6,6] using a scaling factor. The transformation formula is as follows: , ; in , The normalized mapping to the fuzzy universe is e(t) and the rate of change of deviation ec(t); S52: Define the fuzzy subset of the temperature deviation and the rate of change of the deviation; Specifically, the fuzzy subsets of e(t) and ec(t) are both {negative large (NB), negative medium (NM), negative small (NS), zero (ZO), positive small (PS), positive medium (PM), positive large (PB)}, each fuzzy subset corresponds to a specific interval within the domain of discourse [-6,6], and adjacent subsets have reasonable overlap (overlap rate of about 30%-50%), ensuring the continuity of fuzzy inference; S53: The membership values ​​of the temperature deviation and the rate of change of deviation belonging to each fuzzy subset are calculated using the triangular membership function to complete the fuzzification process.

[0033] All fuzzy subsets employ triangular membership functions (balancing computational efficiency and inference accuracy), and the membership functions for each subset are defined as follows: NB: ; NM: ; NS: ; ZO: ; PS: ; PM: ; PB: ; Substitute the normalized e and ec into the membership function above to calculate their respective membership values ​​for each fuzzy subset, thus completing the fuzzification process.

[0034] Furthermore, step S6, which involves adaptively adjusting the PID parameters based on real-time operating conditions, includes: S61: Collect the operating status parameters of the actuator and the ambient temperature fluctuation value, and construct the operating condition feature vector; The fuzzy rule base adds scenario rules to the original 49 basic rules (7 e subsets × 7 ec subsets), targeting three typical industrial scenarios: chemical reaction (high temperature and high pressure, HC), machining (medium temperature and medium pressure, JX), and electronic component manufacturing (low temperature and low pressure, DZ), covering scenarios with extreme temperature deviation, rapid fluctuation, and continuous interference.

[0035] The rule form is expanded to "if e is A and ec is B and working condition is C thenΔKp is D, ΔKi is E, ΔKd is F, weight is G", A is the fuzzy subset corresponding to temperature deviation e, B is the fuzzy subset corresponding to deviation change rate ec, C includes three typical scenarios: chemical reaction, mechanical processing, and electronic component manufacturing, D, E, and F are the fuzzy subsets corresponding to proportional coefficient adjustment amount ΔKp, integral coefficient adjustment amount ΔKi, and differential coefficient adjustment amount ΔKd, respectively, and G is the operating condition weight factor (value range [0.8, 1.2]), calibrated based on experimental data of temperature response characteristics of each scenario.

[0036] S62: Match the working condition feature vector with the industrial scene feature template to identify the current working condition type and determine the corresponding working condition weight factor; Specifically, the heating power percentage (Ph), cooling flow rate percentage (Pc), and ambient temperature fluctuation value (ΔTe) of the actuator are collected to construct a working condition feature vector [Ph, Pc, ΔTe]. The K-nearest neighbor algorithm is used to match this vector with three preset scenario feature templates, with K set to 3 and a matching threshold of 0.75. If the matching degree is lower than the threshold, a general adaptation mode is triggered, with a working condition weight factor of 1.0.

[0037] S63: Combine the operating condition weighting factor to perform fuzzy inference calculation to obtain the fuzzy quantity of PID parameter adjustment; The fuzzy inference operation in step S63 includes: Calculate the trigger strength of the basic rule, and obtain the weighted trigger strength by combining it with the operating condition weight factor; take the maximum value of the weighted trigger strength of all rules involving the same fuzzy subset of PID parameter adjustment to obtain the comprehensive trigger strength of each fuzzy subset.

[0038] Specifically, the basic rule trigger strength αbase is first calculated using the following formula: ; Where, α base The trigger strength of the basic rule represents the degree of basic triggering of the fuzzy rule. Let e ​​be the membership value of the fuzzy subset A corresponding to the normalized temperature deviation e. Normalized deviation rate of change The membership value corresponding to the fuzzy subset B. `min` is the minimum value operation. Then, by combining the operating condition weighting factor, the weighted triggering intensity αweight = α base ×G; Take the maximum value of the weighted trigger strength of all rules involving the same fuzzy subset of ΔKp, ΔKi, and ΔKd respectively to obtain the comprehensive trigger strength αC=max(αweight1,αweight2,...,αweightn) of each subset (n is the number of rules involving the subset), to ensure that the inference results are adapted to the characteristics of the current working condition.

[0039] S64: Defuzzify the fuzzy value of the PID parameter adjustment to obtain the accurate PID parameter adjustment value; In step S64, the defuzzification process employs the dynamic weight centroid method. Based on the current operating condition type, the priority weights of the proportional coefficient, integral coefficient, and derivative coefficient adjustment amounts are dynamically allocated. Combined with the comprehensive trigger strength and universe center value of each fuzzy subset, the precise PID parameter adjustment amounts are calculated. The dynamic weighted centroid method introduces priority weights for adjustment amounts based on the traditional centroid method, dynamically allocating the adjustment priorities of Kp, Ki, and Kd according to the operating condition type. In the chemical engineering scenario, the focus is on suppressing overshoot, with priority weights of Kd (ωd=0.4), Kp (ωp=0.35), and Ki (ωi=0.25). In the machining scenario, the focus is on improving response speed, with priority weights of Kp (ωp=0.4), Kd (ωd=0.3), and Ki (ωi=0.3). In the electronic component manufacturing scenario, the focus is on steady-state accuracy, with priority weights of Ki (ωi=0.4), Kp (ωp=0.3), and Kd (ωd=0.3) (ωp+ωi+ωd=1).

[0040] Taking ΔKp as an example, the defuzzification calculation formula is: ΔKp = [Σ(αC × xC × ωp)] / [Σ(αC × ωp)], where xC is the center value of the universe of discourse corresponding to the fuzzy subset C of ΔKp (NB = -3, NM = -2, NS = -1, ZO = 0, PS = 1, PM = 2, PB = 3); the precise adjustment amounts of ΔKi and ΔKd are calculated respectively according to the same logic.

[0041] S65: Calculate the real-time PID parameters according to the initial PID parameters and the precise PID parameter adjustment amounts, and perform parameter limiting processing.

[0042] The calculation formulas are Kp = Kp0 + ΔKp, Ki = Ki0 + ΔKi, Kd = Kd0 + ΔKd, where Kp0, Ki0, and Kd0 are preset initial parameters.

[0043] Furthermore, step S65 further includes a parameter self-learning correction step: Record the response indexes (overshoot σ, response time ts, steady-state error ess) of the system after each parameter adjustment. If σ > 5% or ts > the preset threshold (set according to the scenario: in the chemical engineering scenario, the ts threshold = 8s, in the machining scenario = 5s, in the electronic component manufacturing scenario = 3s) or ess > ±0.5 °C within three consecutive sampling periods, then automatically multiply the adjustment amounts ΔKp, ΔKi, and ΔKd by the correction factor θ (θ = 0.9 - 1.1).

[0044] The correction factor is dynamically adjusted according to the deviation degree of the response indexes. For example, when σ = 8%, θ = 0.95; when ts = 10s, θ = 0.9; when ess = 0.8 °C, θ = 1.05, to achieve the self-optimization of parameter adjustment.

[0045] The parameter limiting processing sets different upper and lower limits of parameters for different working conditions: In the chemical engineering scenario, Kpmax = original limit × 1.1, Kdmax = original limit × 1.15, Kimin = original limit × 0.95; in the electronic component manufacturing scenario, Kpmax = original limit × 0.95, Kimin = original limit × 0.9, Kdmax = original limit × 1.0; in the machining scenario, the original limits remain unchanged.

[0046] If the calculated Kp < Kpmin, then take Kp = Kpmin; if Kp > Kpmax, then take Kp = Kpmax; Ki and Kd are limited according to the same logic. The limited real-time PID parameters (Kp, Ki, Kd), the current working condition type, and the weight factor are synchronously transmitted to the PLC main control module to provide parameter support adapted to the working condition for control output calculation.

[0047] In step S65, the parameter limiting process sets different upper and lower limits for PID parameters for different operating conditions. If the calculated real-time PID parameters exceed the corresponding limits, the limits are taken as the final real-time PID parameters.

[0048] This step introduces operating condition identification and dynamic weighting mechanisms, enabling PID parameter adjustments to accurately adapt to the temperature control requirements of different industrial scenarios. At the same time, the parameter self-learning correction function can continuously optimize the control strategy based on the actual operating effect of the system, further improving control accuracy and system stability.

[0049] S7: Calculate the control output based on the real-time PID parameters and the temperature deviation, convert the control output into a control command recognizable by the actuator, and send it to the actuator. Specifically: The real-time PID parameters after amplitude limiting and the current temperature deviation e(t) are received. The control output u(t) is calculated using the continuous PID control formula, which is:

[0050] The integral term is discretized using the trapezoidal integral method to adapt to the digital operation characteristics of the PLC, while the differential term is discretized using the backward difference method. Subsequently, the control output u(t) is converted into standard control commands (such as 0-10V voltage signals or 4-20mA current signals) that can be recognized by the actuators and sent to the actuators (such as the power regulator of the heating device or the flow control valve of the cooling device). The actuators adjust their working state according to the control commands (such as increasing the heating power or decreasing the cooling flow) to achieve precise regulation of the industrial production environment temperature. At the same time, the working state parameters of the actuators (such as actual power and flow) and the regulated temperature signal T''(t) are collected in real time and fed back as the input signal for the next sampling cycle.

[0051] Repeat steps S2 to S7 to form a continuous closed-loop feedback regulation, ensuring that the temperature remains stable near the target temperature T0.

[0052] Accordingly, this invention also proposes a PLC temperature control optimization system based on adaptive fuzzy PID to achieve the above method, such as... Figure 2 As shown, it includes: The preset module is used to preset the target temperature value, temperature deviation range, deviation change rate range, PID initial parameters, fuzzy universe of discourse, fuzzy subset, and fuzzy rule base. Temperature acquisition module is used to acquire actual temperature signals in industrial production environments; The noise suppression module is connected to the temperature acquisition module and is used to perform noise suppression processing on the acquired actual temperature signal based on wavelet transform to obtain the denoised temperature signal. An adaptive fuzzy PID control module, connected to the noise suppression module, is used to calculate the temperature deviation and the rate of change of the deviation between the denoised temperature signal and the target temperature value. The temperature deviation and the rate of change of the deviation are fuzzified to obtain the corresponding fuzzy linguistic variables. Fuzzy inference is performed based on the fuzzy linguistic variables and the fuzzy rule base. Combined with the real-time operating condition characteristics, the adaptive adjustment of the PID parameters is completed to obtain the real-time PID parameters. The PLC main control module is connected to the adaptive fuzzy PID control module and is used to calculate the control output based on the real-time PID parameters and the temperature deviation, and convert the control output into control commands that can be recognized by the actuator. The actuator is connected to the PLC main control module and is used to adjust the working status of the heating or cooling equipment according to the control instructions.

[0053] Furthermore, the adaptive fuzzy PID control module includes: The deviation calculation unit is used to calculate the temperature deviation and the rate of change of the deviation between the denoised temperature signal and the target temperature. A fuzzification unit, connected to the deviation calculation unit, is used to fuzzify the temperature deviation and the rate of change of deviation to obtain the corresponding fuzzy linguistic variables. The working condition identification unit is used to collect the working status parameters of the actuator and the ambient temperature fluctuation value, construct the working condition feature vector, and identify the current working condition type and the corresponding working condition weight factor. The fuzzy inference unit is connected to the fuzzification unit and the working condition recognition unit respectively. It is used to perform fuzzy inference operations based on the fuzzy linguistic variables and fuzzy rule base, and combine real-time working condition characteristics to complete the adaptive adjustment of PID parameters and obtain the fuzzy quantity of PID parameter adjustment. A defuzzing unit, connected to the fuzzy inference unit, is used to defuzzify the fuzzy values ​​of the PID parameter adjustment to obtain accurate PID parameter adjustment values. The parameter calculation and limiting unit, connected to the defuzzification unit, is used to calculate the real-time PID parameters based on the initial PID parameters and the precise PID parameter adjustment amount, and to perform parameter limiting processing.

[0054] The solutions provided by the embodiments of this application have been described in detail above. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

[0055] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Those skilled in the art can implement the described functions using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.

[0056] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

Claims

1. A PLC temperature control optimization method based on adaptive fuzzy PID, characterized in that, Includes the following steps: S1: Preset target temperature value, temperature deviation range, deviation change rate range, PID initial parameters, fuzzy universe of discourse, fuzzy subset and fuzzy rule base; S2: Collects actual temperature signals in the industrial production environment; S3: Perform noise suppression processing based on wavelet transform on the actual temperature signal to obtain the denoised temperature signal; S4: Calculate the temperature deviation and the rate of change of the deviation between the denoised temperature signal and the target temperature value; S5: The temperature deviation and the rate of change of deviation are fuzzified to obtain the corresponding fuzzy linguistic variables; S6: Perform fuzzy inference based on the fuzzy linguistic variables and the fuzzy rule base, and combine real-time operating condition characteristics to complete the adaptive adjustment of PID parameters, thereby obtaining real-time PID parameters; S7: Calculate the control output based on the real-time PID parameters and the temperature deviation, convert the control output into a control command that the actuator can recognize, and send it to the actuator; After step S1 is executed, steps S2 to S7 are repeated sequentially.

2. The PLC temperature control optimization method based on adaptive fuzzy PID according to claim 1, characterized in that, Step S3 includes: S31: Select the mother wavelet to perform multi-level wavelet decomposition on the actual temperature signal to obtain low-frequency approximate components and multi-level high-frequency detail components. S32: The threshold of each high-frequency detail component is calculated using an adaptive thresholding method; S33: A soft thresholding function is used to perform thresholding on each high-frequency detail component; S34: Perform inverse wavelet transform on the processed low-frequency approximation component and high-frequency detail component to reconstruct the denoised temperature signal.

3. The PLC temperature control optimization method based on adaptive fuzzy PID according to claim 1, characterized in that, Step S5 specifically includes: S51: Normalize and map the temperature deviation and the rate of change of deviation to the fuzzy universe of discourse; S52: Define the fuzzy subset of the temperature deviation and the rate of change of the deviation; S53: The membership values ​​of the temperature deviation and the rate of change of deviation belonging to each fuzzy subset are calculated using the triangular membership function to complete the fuzzification process.

4. The PLC temperature control optimization method based on adaptive fuzzy PID according to claim 1, characterized in that, Step S6, which involves adaptively adjusting the PID parameters based on real-time operating conditions, includes: S61: Collect the operating status parameters of the actuator and the ambient temperature fluctuation value, and construct the operating condition feature vector; S62: Match the working condition feature vector with the industrial scene feature template to identify the current working condition type and determine the corresponding working condition weight factor; S63: Combine the operating condition weighting factor to perform fuzzy inference calculation to obtain the fuzzy quantity of PID parameter adjustment; S64: Defuzzify the fuzzy value of the PID parameter adjustment to obtain the accurate PID parameter adjustment value; S65: Calculate the real-time PID parameters based on the initial PID parameters and the precise PID parameter adjustment amount, and perform parameter limiting processing.

5. The PLC temperature control optimization method based on adaptive fuzzy PID according to claim 4, characterized in that, The fuzzy inference operation in step S63 includes: Calculate the trigger strength of the basic rule, and obtain the weighted trigger strength by combining it with the operating condition weight factor; take the maximum value of the weighted trigger strength of all rules involving the same fuzzy subset of PID parameter adjustment to obtain the comprehensive trigger strength of each fuzzy subset.

6. The PLC temperature control optimization method based on adaptive fuzzy PID according to claim 4, characterized in that, In step S64, the defuzzification process adopts the dynamic weight centroid method, which dynamically allocates the priority weights of the proportional coefficient, integral coefficient, and differential coefficient adjustment amount according to the current working condition type, and calculates the precise PID parameter adjustment amount by combining the comprehensive trigger intensity and universe center value of each fuzzy subset.

7. The PLC temperature control optimization method based on adaptive fuzzy PID according to claim 4, characterized in that, Step S65 also includes a parameter self-learning correction step: Record the system's response metrics after each parameter adjustment, including: overshoot, response time, and steady-state error. If the response metrics exceed the preset threshold for multiple consecutive sampling periods, the PID parameter adjustment is multiplied by a dynamic correction coefficient.

8. The PLC temperature control optimization method based on adaptive fuzzy PID according to claim 4, characterized in that, In step S65, the parameter limiting process sets different upper and lower limits for PID parameters for different operating conditions. If the calculated real-time PID parameters exceed the corresponding limits, the limits are taken as the final real-time PID parameters.

9. A PLC temperature control optimization system based on adaptive fuzzy PID, characterized in that, include: The preset module is used to preset the target temperature value, temperature deviation range, deviation change rate range, PID initial parameters, fuzzy universe of discourse, fuzzy subset, and fuzzy rule base. Temperature acquisition module is used to acquire actual temperature signals in industrial production environments; The noise suppression module is connected to the temperature acquisition module and is used to perform noise suppression processing on the acquired actual temperature signal based on wavelet transform to obtain the denoised temperature signal. An adaptive fuzzy PID control module, connected to the noise suppression module, is used to calculate the temperature deviation and the rate of change of the deviation between the denoised temperature signal and the target temperature value. The temperature deviation and the rate of change of the deviation are fuzzified to obtain the corresponding fuzzy linguistic variables. Fuzzy inference is performed based on the fuzzy linguistic variables and the fuzzy rule base. Combined with the real-time operating condition characteristics, the adaptive adjustment of the PID parameters is completed to obtain the real-time PID parameters. The PLC main control module is connected to the adaptive fuzzy PID control module and is used to calculate the control output based on the real-time PID parameters and the temperature deviation, and convert the control output into control commands that can be recognized by the actuator. The actuator is connected to the PLC main control module and is used to adjust the working status of the heating or cooling equipment according to the control instructions.

10. The PLC temperature control optimization system based on adaptive fuzzy PID according to claim 9, characterized in that, The adaptive fuzzy PID control module includes: The deviation calculation unit is used to calculate the temperature deviation and the rate of change of the deviation between the denoised temperature signal and the target temperature. A fuzzification unit, connected to the deviation calculation unit, is used to fuzzify the temperature deviation and the rate of change of deviation to obtain the corresponding fuzzy linguistic variables. The working condition identification unit is used to collect the working status parameters of the actuator and the ambient temperature fluctuation value, construct the working condition feature vector, and identify the current working condition type and the corresponding working condition weight factor. The fuzzy inference unit is connected to the fuzzification unit and the working condition recognition unit respectively. It is used to perform fuzzy inference operations based on the fuzzy linguistic variables and fuzzy rule base, and combine real-time working condition characteristics to complete the adaptive adjustment of PID parameters and obtain the fuzzy quantity of PID parameter adjustment. A defuzzing unit, connected to the fuzzy inference unit, is used to defuzzify the fuzzy values ​​of the PID parameter adjustment to obtain accurate PID parameter adjustment values. The parameter calculation and limiting unit, connected to the defuzzification unit, is used to calculate the real-time PID parameters based on the initial PID parameters and the precise PID parameter adjustment amount, and to perform parameter limiting processing.