Power regulation method and system using adaptive fuzzy PID of PLC
By using the PLC adaptive fuzzy PID method, the fuzzy domain and PID parameters are dynamically adjusted, which solves the problem of response hysteresis and overshoot of traditional fuzzy PID controllers under large disturbances, and realizes efficient control under complex working conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUANENG GUANGDONG SHANTOU OFFSHORE WIND POWER CO LTD
- Filing Date
- 2026-01-28
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional fuzzy PID controllers exhibit significant response hysteresis and overshoot issues when faced with large disturbances, resulting in poor control performance under complex operating conditions.
The PLC adaptive fuzzy PID method is adopted. By acquiring the power setpoint, actual power value and error, the reference error is calculated and the disturbance is predicted. The fuzzy domain is dynamically adjusted to generate dynamic quantization factors for error and error change rate, and fuzzy inference is performed to update the PID parameters.
It improves the robustness and adaptability of the system under complex and dynamic operating conditions, ensures that error information is accurately mapped under drastic fluctuations, and enhances control accuracy and response speed.
Smart Images

Figure CN122151693A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent regulation technology, specifically to a power regulation method and system based on PLC adaptive fuzzy PID. Background Technology
[0002] In modern industrial production, power regulation is crucial for the stable operation of many key equipment and systems. With the continuous improvement of industrial automation, higher demands are placed on the real-time performance, accuracy, robustness, and adaptability of power regulation systems, especially in industries sensitive to power fluctuations such as power, chemical, and metallurgy. Traditional proportional-integral-derivative (PID) controllers are widely used in various control systems due to their simple structure and ease of implementation. However, when dealing with complex power regulation objects that are nonlinear, time-varying, or subject to uncertainty, their fixed parameters often fail to guarantee ideal control effects, potentially leading to system response lag, overshoot, or oscillation, thereby affecting production efficiency and product quality. Therefore, combining advanced control strategies with PLCs (Programmable Logic Controllers) commonly used in industrial settings to achieve smarter and more efficient power regulation solutions has become a research hotspot in the field of industrial control.
[0003] To overcome the shortcomings of traditional PID control under complex operating conditions, fuzzy PID control emerged. By introducing fuzzy logic reasoning, it can adjust PID parameters in real time based on the error and its rate of change, thereby improving the system's adaptability and robustness. However, existing fuzzy PID control methods still face significant technical challenges when dealing with large disturbances, namely, response hysteresis and overshoot under large disturbances. When a power system encounters huge external load shocks such as the starting of a large motor or a sudden drop in grid voltage, the fuzzy domain of the traditional fuzzy PID controller (i.e., the quantization range of the input error and the rate of change of error) is usually fixed. This fixed setting means that when a large error signal exceeds the preset domain range, the signal information is clipped, causing the controller to be unable to accurately perceive the true strength of the error. The loss of information during the quantization stage distorts the controller's judgment of the actual disturbance intensity, leading to a severe response hysteresis.
[0004] Therefore, an optimized power regulation method based on PLC adaptive fuzzy PID is desired. Summary of the Invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art, and provides a power regulation method and system for PLC adaptive fuzzy PID.
[0006] In a first aspect, embodiments of the present invention provide a power regulation method for PLC adaptive fuzzy PID, comprising: Obtain the power setpoint, the actual power value at the current moment, and the error at the previous moment; The reference error is calculated by taking the power setpoint, the actual power value at the current moment, and the error at the previous moment to obtain the error at the current moment and the rate of change of the error at the current moment; Based on the prediction gain coefficient and the scaling reference coefficient, the perturbation prediction and universe scaling factor are performed on the current time error and the current time error change rate to obtain the error dynamic quantization factor and the error change rate dynamic quantization factor. Based on the error dynamic quantization factor and the error change rate dynamic quantization factor, the error at the current time and the error change rate at the current time are dynamically quantized and fuzzified to obtain the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate. Based on the fuzzy rule base, fuzzy inference and incremental defuzzification of PID parameters are performed on the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate to obtain the proportional gain adjustment, integral gain adjustment and derivative gain adjustment. The PID parameters of the previous time step are updated based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment to obtain the PID parameters of the current time step. The error at the current moment is input into the PID controller to obtain the control output at the current moment.
[0007] Secondly, embodiments of the present invention provide a PLC adaptive fuzzy PID power regulation system, comprising: The data acquisition module is used to acquire the power setpoint, the actual power value at the current moment, and the error at the previous moment; The reference error calculation module is used to calculate the reference error based on the power setpoint, the actual power value at the current moment, and the error at the previous moment to obtain the error at the current moment and the rate of change of the error at the current moment. The perturbation prediction and universe of discourse scaling factor calculation module is used to perform perturbation prediction and universe of discourse scaling factor calculation on the current time error and the current time error change rate based on the prediction gain coefficient and the scaling reference coefficient to obtain the error dynamic quantization factor and the error change rate dynamic quantization factor. The signal dynamic quantization and fuzzification module is used to perform dynamic quantization and fuzzification of the current error and the current error change rate based on the error dynamic quantization factor and the error change rate dynamic quantization factor to obtain the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate. The fuzzy inference and PID parameter incremental defuzzification module is used to perform fuzzy inference and PID parameter incremental defuzzification on the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate based on the fuzzy rule base to obtain the proportional gain adjustment, integral gain adjustment and derivative gain adjustment. The parameter update module is used to update the PID parameters of the previous time step based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment to obtain the PID parameters of the current time step. The control output module is used to input the current error into the PID controller to obtain the control output at the current time.
[0008] Compared with existing technologies, this invention provides a PLC adaptive fuzzy PID power regulation method and system. It acquires the system's current error and error rate of change, and combines these with preset prediction gain coefficients and scaling reference coefficients to predictively assess the intensity of system disturbances. This allows for dynamic decision-making and generation of the effective domain boundary at the current moment. Based on this, a dynamic quantization factor for the error and error rate of change is further calculated, enabling the fuzzy domain to expand and contract flexibly in real time according to the current disturbance intensity. This approach avoids the problem in traditional methods where large error signals are clipped due to exceeding the fixed domain, leading to information loss. It ensures that even under severe fluctuations, the true magnitude of the error can be accurately mapped to different positions within the effective domain, providing accurate input for subsequent fuzzification and inference. Ultimately, this greatly enhances the robustness and adaptability of the PLC adaptive fuzzy PID control system under complex and dynamic conditions. Attached Figure Description
[0009] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0010] Figure 1 A flowchart of a PLC adaptive fuzzy PID power regulation method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the data flow of the PLC adaptive fuzzy PID power regulation method according to an embodiment of the present invention; Figure 3 This is a block diagram of a PLC adaptive fuzzy PID power regulation system according to an embodiment of the present invention. Detailed Implementation
[0011] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0012] Unless otherwise specifically stated, the technical or scientific terms used in the embodiments of this invention should be understood in their ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains. The terms "comprising" or "including," as used in the embodiments of this invention, do not limit the shapes, numbers, steps, actions, operations, components, elements, and / or groups thereof mentioned, nor do they exclude the appearance or addition of one or more other different shapes, numbers, steps, actions, operations, components, elements, and / or groups thereof, or the inclusion of these.
[0013] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of the invention. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale, and techniques, methods, and apparatus known to those skilled in the art may not be discussed in detail; however, where appropriate, the illustrated techniques, methods, and apparatus should be considered part of the specification. In all the examples shown and discussed herein, any other specific example may have different values. It should be noted that similar symbols and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0014] In the description of the embodiments of the present invention, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In the embodiments of the present invention, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in the embodiments of the present invention, as well as the features of different embodiments or examples.
[0015] Hereinafter, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein.
[0016] In the technical solution of this invention, a power regulation method based on PLC adaptive fuzzy PID is proposed. Figure 1 This is a flowchart of a PLC adaptive fuzzy PID power regulation method according to an embodiment of the present invention. Figure 2 This is a system architecture diagram of a PLC adaptive fuzzy PID power regulation method according to an embodiment of the present invention. Figure 1 and Figure 2 As shown, the PLC adaptive fuzzy PID power adjustment method according to an embodiment of the present invention includes the following steps: S1, obtaining a power setpoint, the actual power value at the current moment, and the error at the previous moment; S2, performing a reference error calculation on the power setpoint, the actual power value at the current moment, and the error at the previous moment to obtain the error at the current moment and the error change rate at the current moment; S3, based on the prediction gain coefficient and the scaling reference coefficient, performing disturbance prediction and universe of discourse scaling factor calculation on the error at the current moment and the error change rate at the current moment to obtain the error dynamic quantization factor and the error change rate dynamic quantization factor; S4, based on the error dynamic quantization factor and the error change rate dynamic quantization factor, performing disturbance prediction and universe of discourse scaling factor calculation on the error at the current moment and the error change rate at the current moment. S5. Perform dynamic quantization and fuzzification of the signal with the current error change rate to obtain the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate; S6. Based on the fuzzy rule base, perform fuzzy inference and incremental defuzzification of the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate to obtain the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment; S7. Update the PID parameters of the previous time step based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment to obtain the PID parameters of the current time step; S8. Input the current time error into the PID controller to obtain the control output of the current time step.
[0017] Specifically, S1 acquires the power setpoint, the current actual power value, and the error from the previous moment. The power setpoint is the target power level the system expects to achieve. In a typical PLC control environment, this value is usually input by the operator via a Human-Machine Interface (HMI), loaded from a preset process recipe, or issued by a higher-level management and control system (such as a SCADA system). The PLC acquires this setpoint by reading its configured input registers or internal data blocks. For example, the operator can input a power target of 300kW on the HMI, and the PLC will read this number as the basis for control. The current actual power value is a physical measurement of the real-time power output or consumption of the controlled object. In practical industrial applications, this is typically achieved through measuring devices such as power sensors, current transformers, and voltage transformers. These sensors transmit analog electrical signals (such as current and voltage) to the PLC's analog input module. Internally, the PLC's analog input module converts the received continuous analog signals into digital signals and, through preset scaling and range conversion functions, converts them into engineering units with actual physical meaning (e.g., kilowatts). This process ensures that the PLC can accurately reflect the current operating status of the equipment, much like a power meter converts real-time power consumption into a value that the PLC can process. The error at the previous moment is the error data calculated and stored internally by the system at the end of the previous control cycle. As historical information, it is crucial for calculating the error change rate at the current moment and the integral and derivative parts of the PID controller. At the end of each control cycle, the program in the PLC saves the error value calculated in the current cycle to a specific internal memory address or data register so that it can be read as the error at the beginning of the next control cycle. When the control loop is first started, this error at the previous moment is usually initialized to zero or a certain safety value to ensure a smooth start of the control process. In the technical solution of this invention, by acquiring the power setpoint, the actual power value at the current moment, and the error at the previous moment, accurate and real-time input data can be provided for subsequent error calculation and adaptive adjustment of controller parameters, ensuring that the system can effectively perceive the deviation between the current state and the desired state and take appropriate control actions accordingly.
[0018] Specifically, in step S2, a baseline error calculation is performed on the power setpoint, the actual power value at the current moment, and the error at the previous moment to obtain the current moment error and the current moment error change rate. This step aims to quantify the degree (error) of the system's current deviation from the target state and the dynamic trend of this deviation (error change rate). These two key pieces of information are direct inputs for the subsequent intelligent inference and adaptive adjustment of PID parameters by the fuzzy controller. Without these precise measurements, the controller will be unable to effectively perceive the system state and make correct control decisions. The current moment error is the algebraic difference between the power setpoint and the actual power value at the current moment, which intuitively represents the magnitude of the system's current correction requirement. The current moment error change rate is the difference between the current moment error and the previous moment error, reflecting the rate and direction of error change over time, and is a key indicator for evaluating the system's dynamic response and predicting future trends. A positive error change rate usually means that the error is increasing, which may require more aggressive control actions to prevent misalignment; a negative error change rate indicates that the error is decreasing, and the system may be stabilizing. Specifically, in the embodiments of the present invention, the baseline error is calculated using the following formula:
[0019]
[0020] in, The error is the current time. This is the error from the previous moment. The rate of change of error at the current moment. For power setting value, This represents the actual power value at the current moment.
[0021] Specifically, in step S3, based on the prediction gain coefficient and the scaling reference coefficient, disturbance prediction and universe of discourse scaling factors are calculated for the current time error and the current time error change rate to obtain the error dynamic quantization factor and the error change rate dynamic quantization factor. This step aims to overcome the problems of signal information clipping and controller perception distortion under large disturbances caused by the use of a fixed fuzzy universe of discourse in traditional fuzzy PID controllers. Specifically, by dynamically predicting the intensity of disturbances that the system may encounter and correspondingly scaling the input universe of discourse of the fuzzy controller, it can be ensured that even under drastically changing operating conditions, the true amplitude information of the error signal can be completely and accurately transmitted to the fuzzy inference module, thereby significantly improving the system's response speed and robustness and avoiding response hysteresis and overshoot.
[0022] In practical implementation, firstly, based on the prediction gain coefficient, a predictive assessment of the system disturbance intensity is performed on the current error and the rate of change of the current error to obtain the absolute value of the predicted error. It should be understood that the fuzzy universe of discourse of traditional fuzzy controllers is usually fixed, which may lead to a decline in control performance when faced with external disturbances or changes in system operating conditions. By performing a predictive assessment of the system disturbance intensity on the current error and the rate of change of the current error, the system can dynamically sense or predict the intensity of the disturbance that may occur at the current moment, i.e., predict the maximum potential deviation of the system from the setpoint in the future. This predictive information is crucial for the subsequent decision-making and generation of the dynamic effective universe of discourse boundary. It allows the fuzzy universe of discourse of the fuzzy controller's input variables (error and rate of change of error) to be dynamically adjusted and expanded according to the predicted disturbance intensity, thereby ensuring that the fuzzy controller maintains optimal sensitivity and control accuracy under different operating conditions, avoiding reduced control accuracy due to an excessively large universe of discourse or exceeding the control range due to an excessively small universe of discourse. This forward-looking assessment is the foundation for achieving adaptive fuzzy control and optimizing the system's dynamic response and steady-state performance. Specifically, the intensity of system disturbance is predicted by the current time error and the rate of change of the current time error using the following formula:
[0023] in, The error is the current time. The rate of change of error at the current moment. This is used to predict the gain coefficient. Through this calculation, the system can comprehensively consider the current state (error) and its dynamic change trend (error change rate), and based on the gain coefficient obtained empirically or through optimization, quantify the prediction of the possible future deviation of the system, providing an accurate basis for subsequent dynamic scaling of the fuzzy domain.
[0024] Next, based on the baseline maximum error domain boundary value, the effective domain boundary of the predicted absolute value is dynamically determined and generated to obtain the effective domain boundary at the current moment. It should be understood that in traditional fuzzy control systems, the domain of fuzzy input variables is usually fixed. However, in actual industrial control processes, the system's operating state and external disturbances are often dynamically changing. If the domain is fixed, when the system error is small, a fixed wide domain will lead to excessive overlap of fuzzy sets, reducing control sensitivity and accuracy, making the controller sluggish; while when the system error is large or facing severe disturbances, a fixed narrow domain may not be able to cover all possible input values, causing the input signal to exceed the domain range, thus resulting in failure or oscillation. Therefore, in the technical solution of this invention, the dynamic determination and generation of the effective domain boundary of the predicted absolute value of the error enables the system to dynamically adjust the input domain range of the fuzzy controller based on the previous prediction of the future disturbance intensity, i.e., the predicted absolute value of the error. This allows the fuzzy controller to always maintain optimal quantization accuracy and control response under the current system state. It is worth noting that the baseline maximum error universe boundary value is the maximum allowable boundary value of the fuzzy universe of discourse for the input variable (such as error) of the fuzzy controller; it is a pre-set fixed parameter. It represents the maximum range that the controller's error input quantization can cover under any circumstances, providing an upper limit protection against the infinite expansion of the universe of discourse. This value is usually set empirically or optimized based on the physical characteristics of the controlled object, control accuracy requirements, and system stability margin. By introducing the baseline maximum error universe boundary value, a global safety upper limit is provided to prevent excessive divergence or improper setting of the universe of discourse, thereby ensuring the stability and safety of the system.
[0025] The effective domain boundary at the current moment refers to the domain boundary of the input variable actually used for fuzzification processing at the current moment, which is dynamically calculated or decided based on the currently predicted system disturbance intensity (absolute value of prediction error) and the preset benchmark maximum error domain boundary value. This boundary is adaptive and will be adjusted as the system state changes, but will not exceed the benchmark maximum error domain boundary value.
[0026] In this process, the absolute value of the prediction error is used as the primary basis for determining the effective universe of discourse boundary. It is then compared with the baseline maximum error universe of discourse boundary value, and the smaller of the two values is selected, or a certain function mapping is used to ensure that it does not exceed the upper limit. For example, the following logic can be adopted: First, determine whether the absolute value of the prediction error is less than or equal to a preset minimum effective universe of discourse value (this minimum effective universe of discourse value is to avoid the controller losing its basic control function due to an excessively small universe of discourse). If this condition is met, the effective universe of discourse boundary at the current moment is set to this minimum effective universe of discourse value; if the absolute value of the prediction error is between this minimum effective universe of discourse value and the baseline maximum error universe of discourse boundary value, the effective universe of discourse boundary at the current moment is directly set to the absolute value of the prediction error, or the absolute value of the prediction error is multiplied by an adjustment coefficient and used as the boundary; if the absolute value of the prediction error exceeds the baseline maximum error universe of discourse boundary value, the effective universe of discourse boundary at the current moment is restricted to the baseline maximum error universe of discourse boundary value.
[0027] Furthermore, based on the scaling reference coefficient, the effective universe of discourse boundary at the current moment is dynamically scaled using quantization factors to obtain the dynamic quantization factor for the error and the dynamic quantization factor for the error rate of change. This step aims to dynamically transform the physical variables (the error at the current moment and the error rate of change at the current moment) into a standardized form that the fuzzy controller can process, namely a fuzzy set. Fuzzy controllers typically perform inference on a fixed, discrete fuzzy universe of discourse. However, the actual physical error signal is continuous, and its range may dynamically adjust with changes in system operating conditions or disturbance intensity. The effective universe of discourse boundary at the current moment reflects the dynamic effective range of the error signal under the current control scenario. To efficiently and accurately map this dynamically changing physical range to a fixed fuzzy universe of discourse, this invention introduces quantization factors. If the quantization factor is fixed, the accuracy and sensitivity of fuzzification will decrease when the physical error range changes: if the range is too large, the fuzzy set discrimination is insufficient; if the range is too small, saturation may occur. By dynamically scaling the quantization factors at the effective universe of discourse boundary at the current moment, the system can generate dynamically changing quantization factors, ensuring that the physical error signal is always quantized and fuzzified in the optimal way, maintaining the best control accuracy and response speed. It is worth mentioning that the introduction of the scaling reference factor provides an additional adjustment dimension for this dynamic scaling, allowing engineers to fine-tune the quantization sensitivity according to actual needs. Specifically, the dynamic scaling of the quantization factor is calculated for the effective universe of discourse boundary at the current time using the following formula:
[0028] in, Let be the order number of the fuzzy domain. The effective domain boundary at the current moment, This is the scaling reference coefficient.
[0029] Specifically, S4, based on the error dynamic quantization factor and the error change rate dynamic quantization factor, performs dynamic signal quantization and fuzzification on the current error and the current error change rate to obtain the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate. It should be understood that the fuzzy controller performs reasoning based on fuzzy logic, and its input variables (such as error and error change rate) need to be converted into specific fuzzy linguistic variables (e.g., "negative large", "zero", "positive small", etc.) and represented by fuzzy membership degrees. Traditional fuzzy controllers often use a fixed quantization process, which may be applicable when the system is stable, but its control performance will rapidly decline when facing dynamic environments such as external disturbances, load changes, or system parameter drift. If the quantization factor is fixed, when the physical error signal is small but the fixed universe of discourse is large, the effective physical information will be over-compressed, resulting in high fuzzy set overlap, making the controller insensitive to small changes, thus affecting control accuracy; conversely, when the physical error signal is large but the fixed universe of discourse is narrow, the physical signal may exceed the fuzzy universe of discourse, causing the controller to fail or produce violent oscillations. Therefore, by introducing a dynamic quantization factor, the continuous and dynamically changing error signals of the physical world can be adaptively mapped into a standardized fuzzy domain that the fuzzy controller can understand. This dynamic quantization ensures that the fuzzy controller maintains optimal sensitivity and recognition capability regardless of whether the system error is large or small, thereby improving the control accuracy, stability, and robustness of the entire PLC adaptive fuzzy PID power regulation system.
[0030] In practice, firstly, based on the dynamic quantization factor of the error and the dynamic quantization factor of the error change rate, the error at the current moment and the error change rate at the current moment are dynamically normalized to obtain the normalized quantized error value and the normalized quantized error change rate value. That is, the error and error change rate on the physical range are linearly transformed through their respective dynamic quantization factors, mapping them to the standardized universe of discourse defined within the fuzzy controller. Specifically, the normalized quantized error value is obtained by calculating the product of the current moment's error value and the dynamic quantization factor of the error; similarly, the normalized quantized error change rate value is obtained by calculating the product of the current moment's error change rate value and the dynamic quantization factor of the error change rate. Wherein, when the prediction disturbance is large, the quantization factor is smaller, and the physical range is compactly compressed; when the prediction disturbance is small, the quantization factor is larger, and the physical range is stretched to utilize the entire fuzzy universe of discourse, thereby improving local accuracy.
[0031] Furthermore, the normalized quantization error value and the normalized quantization error change rate value are fuzzified to obtain the fuzzy membership vectors of the quantized error and the fuzzy membership vector of the quantized error change rate. In other words, the normalized precise numerical value is converted into fuzzy information that fuzzy logic can understand. The system internally predefines a set of fuzzy sets, and each fuzzy set is associated with a specific fuzzy membership function (usually a triangular, trapezoidal, or Gaussian function). During this process, for each normalized value (e.g., the normalized quantization error value), the system calculates the degree of membership of that value to each fuzzy set according to the predefined fuzzy membership function. These membership values are typically between 0 and 1, indicating the strength of the precise value's belonging to a specific fuzzy set. For example, if a normalized error value is very close to the center point of a fuzzy set, its membership degree to that fuzzy set may be close to 1; if it lies between two fuzzy sets, it may have non-zero membership degrees to both sets simultaneously. All these membership values combined form the fuzzy membership vector of the input quantity. The same principle and logic are used to fuzzify the normalized quantization error rate of change, thereby obtaining its corresponding fuzzy membership vector.
[0032] Specifically, in step S5, based on a fuzzy rule base, fuzzy inference and incremental defuzzification of the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate are performed on the fuzzy membership vector to obtain the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment. It should be understood that traditional fixed-parameter PID controllers often struggle to maintain optimal control performance when facing complex, nonlinear, time-varying, or externally disturbed industrial processes. To enable the controller to automatically adjust its control strategy according to changes in operating conditions, this invention introduces an intelligent mechanism to dynamically generate or correct PID parameters. The fuzzy inference mechanism can flexibly determine how to adjust the PID parameters based on the fuzzy state of the current system error and error change rate. The defuzzification process then transforms this fuzzy control decision into precise numerical values, namely the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment. This gives the controller adaptive adjustment capabilities, ensuring efficient and stable power regulation under different operating environments, such as startup, steady state, and load shocks, significantly improving the system's robustness, response speed, and control accuracy.
[0033] In practice, the core of fuzzy inference is to evaluate and combine the fuzzy information input according to the IF-THEN rule to derive fuzzy conclusions about the increment of PID parameters. It typically involves the following logical stages: For each rule in the fuzzy rule base, the truth value of its premise part (IF part), i.e., the "activation strength" or "trigger weight" of the rule, is first calculated. This is usually achieved by selecting appropriate fuzzy logic operators. Next, the calculated activation strength of each rule is applied to the fuzzy output set of the conclusion part (THEN part) of that rule. Common methods are the minimum method or the product method. For example, in the minimum method, the membership shape of the output fuzzy set is truncated by the activation strength: that is, the membership of the output fuzzy set at that point is equal to the smaller of the activation strength and the membership of the original output fuzzy set at that point. This process generates a truncated fuzzy output set for each rule, such as a truncated fuzzy output for the proportional gain adjustment; then, the truncated fuzzy output sets generated by all rules for the same output variable (e.g., the proportional gain adjustment) are combined. This is typically achieved through the union operation of fuzzy sets, often using the maximum value operation: that is, the membership degree of the final aggregated fuzzy output set at any point is equal to the maximum value of the truncated membership degrees of all relevant rules at that point. This aggregation process generates a final, aggregated fuzzy output set for each PID parameter to be adjusted (proportional gain adjustment, integral gain adjustment, derivative gain adjustment).
[0034] Incremental defuzzification of PID parameters converts the fuzzy output obtained from fuzzy inference into a precise numerical value, which can then be used as the specific adjustment amount for the PID parameters. Commonly used defuzzification methods include the centroid method, the median method, and the area center method. In this embodiment of the invention, the centroid method is used. Its calculation principle is to find the geometric center of the aggregated fuzzy output set and use it as the precise output value. Taking the proportional gain adjustment as an example, its calculation logic is to perform a weighted average of the fuzzy output set. Similarly, the precise values of the integral gain adjustment and the derivative gain adjustment are calculated respectively.
[0035] Specifically, in step S6, the PID parameters from the previous moment are updated based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment to obtain the PID parameters for the current moment. It should be understood that traditional PID controller parameters, once determined, remain unchanged throughout the control process. This often makes it difficult to maintain optimal performance when facing nonlinear, time-varying characteristics of the controlled object or external disturbances. For example, aggressive parameters may be needed during system startup to quickly reach the setpoint, while conservative parameters are needed during steady-state operation to reduce oscillations and improve stability. By introducing fuzzy logic to dynamically adjust the PID parameters, the system can intelligently calculate the adjustment amount of the PID parameters based on the current operating state (reflected by the error and its rate of change). The purpose of this step is to practically apply these intelligently calculated adjustment amounts to the proportional gain, integral gain, and derivative gain parameters in the PID controller. This real-time parameter update mechanism enables the PID controller to dynamically optimize its control characteristics according to changes in operating conditions, thereby significantly improving the accuracy, response speed, and robustness of power regulation, overcoming the limitations of traditional PID controllers, and ensuring that the system maintains excellent control performance under various complex operating conditions.
[0036] In practice, the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment are added to the PID parameters from the previous time step to obtain the PID parameters for the current time step. It's worth noting that in actual systems, the updated PID parameters are usually subject to preset upper and lower limits to prevent excessively large parameters from causing system oscillations or excessively small parameters from causing sluggish response, ensuring stable operation of the control system. If the calculated new parameters exceed these safe ranges, they will be truncated to the nearest boundary value. Finally, the system outputs the PID parameters for the current time step in the current control cycle.
[0037] Specifically, in step S7, the current time-incorrect error is input into the PID controller to obtain the current time-incorrect control output. That is, based on the current system state (reflected by the current time-incorrect error) and the PID parameters intelligently adjusted by the fuzzy controller, a precise control signal is calculated and generated to drive the actuator (e.g., adjusting valve opening, changing heating power, adjusting inverter output frequency, etc.) so that the actual power approaches the set target power. Ultimately, the obtained current-time control output is the control quantity calculated by the PID controller based on the current error, the historical error integral, the error change rate, and the adaptively updated PID parameters. This output signal is sent to the actuator to change the operating state of the controlled object, thereby reducing the current time-incorrect error. It is typically an analog or digital quantity in the form of voltage, current, pulse width, etc., which directly affects the power output.
[0038] In practice, the PID controller calculates the control output based on the classic PID algorithm. The control output typically consists of three parts: a proportional term, an integral term, and a derivative term. The P term represents the direct impact of the current error on the control output. Its calculation logic is to multiply the current error value by the adaptively updated proportional gain parameter. This term reacts instantly to the error; the larger the error, the greater the control force of the output. The I term represents the impact of accumulated past errors on the control output. Its calculation logic is to multiply the accumulated sum of historical errors (usually the sum in discrete time) by the adaptively updated integral gain parameter. This term is mainly used to eliminate the system's static error (i.e., steady-state error), allowing the system to eventually reach the setpoint accurately. The D term represents the impact of future error trends on the control output. Its calculation logic is to multiply the rate of change of the error at the current moment (or equivalently, the difference between the current error and the error at the previous moment divided by the sampling period) by the adaptively updated derivative gain parameter. This term is mainly used to suppress system oscillations, improve the system's response speed and stability, and predict the future trend of the error. Finally, by adding the calculation results of the P, I, and D terms, the final control output at the current moment can be obtained. This output signal will be sent to the PLC's output module, and then transmitted to the actuator of the controlled equipment (such as heaters, frequency converters, etc.) to adjust its operating state, thereby affecting the actual power of the system and bringing it closer to the set target value.
[0039] In summary, the power regulation method of PLC adaptive fuzzy PID according to embodiments of the present invention is explained. It obtains the current error and error rate of change of the system, and combines them with preset prediction gain coefficients and scaling reference coefficients to perform a predictive assessment of the system disturbance intensity, thereby dynamically deciding and generating the effective domain boundary at the current moment. Based on this, a dynamic quantization factor for the error and error rate of change is further calculated, enabling the fuzzy domain to be scaled flexibly in real time according to the current disturbance intensity. In this way, the problem of large error signals being clipped due to exceeding the fixed domain, leading to information loss, is avoided in traditional methods. It ensures that even under severe fluctuations, the true magnitude of the error can be accurately mapped to different positions within the effective domain, providing accurate input for subsequent fuzzification and inference. Ultimately, this greatly enhances the robustness and adaptability of the PLC adaptive fuzzy PID control system under complex and dynamic conditions.
[0040] Furthermore, a PLC-based adaptive fuzzy PID power regulation system is also provided.
[0041] Figure 3 This is a block diagram of a PLC adaptive fuzzy PID power regulation system according to an embodiment of the present invention. Figure 3As shown, the PLC adaptive fuzzy PID power regulation system 300 according to an embodiment of the present invention includes: a data acquisition module 310, used to acquire a power setpoint, the actual power value at the current moment, and the error at the previous moment; a reference error calculation module 320, used to perform reference error calculation on the power setpoint, the actual power value at the current moment, and the error at the previous moment to obtain the error at the current moment and the error change rate at the current moment; a disturbance prediction and universe of discourse scaling factor calculation module 330, used to perform disturbance prediction and universe of discourse scaling factor calculation on the error at the current moment and the error change rate at the current moment based on the prediction gain coefficient and the scaling reference coefficient to obtain the error dynamic quantization factor and the error change rate dynamic quantization factor; and a signal dynamic quantization and fuzzification module 340, used to perform signal dynamic quantization and fuzzification based on the error dynamic quantization factor and the error change rate dynamic quantization factor. The system performs dynamic quantization and fuzzification on the current error and its rate of change to obtain fuzzy membership vectors for the quantized error and the rate of change of the quantized error. A fuzzy inference and PID parameter incremental defuzzification module 350 performs fuzzy inference and PID parameter incremental defuzzification on the fuzzy membership vectors of the quantized error and the rate of change of the quantized error based on a fuzzy rule base to obtain proportional gain adjustment, integral gain adjustment, and derivative gain adjustment. A parameter update module 360 updates the PID parameters from the previous time step based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment to obtain the PID parameters for the current time step. A control output module 370 inputs the current error into the PID controller to obtain the control output for the current time step.
[0042] As described above, the PLC adaptive fuzzy PID power regulation system 300 according to embodiments of the present invention can be implemented in various wireless terminals, such as servers with PLC adaptive fuzzy PID power regulation algorithms. In one possible implementation, the PLC adaptive fuzzy PID power regulation system 300 according to embodiments of the present invention can be integrated into the wireless terminal as a software module and / or a hardware module. For example, the PLC adaptive fuzzy PID power regulation system 300 can be a software module in the operating system of the wireless terminal, or it can be an application developed for the wireless terminal; of course, the PLC adaptive fuzzy PID power regulation system 300 can also be one of many hardware modules of the wireless terminal.
[0043] Alternatively, in another example, the PLC adaptive fuzzy PID power regulation system 300 and the wireless terminal can also be separate devices, and the PLC adaptive fuzzy PID power regulation system 300 can be connected to the wireless terminal via wired and / or wireless networks, and transmit interactive information in accordance with an agreed data format.
[0044] It is understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A power regulation method for PLC adaptive fuzzy PID, characterized in that, include: Obtain the power setpoint, the actual power value at the current moment, and the error at the previous moment; A baseline error is calculated based on the power setpoint, the actual power value at the current moment, and the error at the previous moment to obtain the error at the current moment and the rate of change of the error at the current moment; Based on the prediction gain coefficient and the scaling reference coefficient, perturbation prediction and universe scaling factor are performed on the current time error and the current time error change rate to obtain the error dynamic quantization factor and the error change rate dynamic quantization factor. Based on the error dynamic quantization factor and the error change rate dynamic quantization factor, the current time error and the current time error change rate are dynamically quantized and fuzzified to obtain the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate. Based on the fuzzy rule base, fuzzy inference and incremental defuzzification of PID parameters are performed on the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate to obtain the proportional gain adjustment, integral gain adjustment and derivative gain adjustment. The PID parameters of the previous time step are updated based on the proportional gain adjustment, the integral gain adjustment, and the derivative gain adjustment to obtain the PID parameters of the current time step. The current time error is input into the PID controller to obtain the control output at the current time.
2. The power regulation method of PLC adaptive fuzzy PID according to claim 1, characterized in that, The baseline error is calculated by taking the power setpoint, the actual power value at the current moment, and the error at the previous moment to obtain the error at the current moment and the rate of change of the error at the current moment. This includes calculating the baseline error using the following formula: in, The error at the current time is... This refers to the error at the previous moment. The error change rate at the current moment is... The power setting value, This represents the actual power value at the current moment.
3. The power regulation method of PLC adaptive fuzzy PID according to claim 1, characterized in that, Based on the prediction gain coefficient and the scaling reference coefficient, perturbation prediction and universe of discourse scaling factor are performed on the current time error and the current time error change rate to obtain the error dynamic quantization factor and the error change rate dynamic quantization factor, including: Based on the prediction gain coefficient, a predictive assessment of the system disturbance intensity is performed on the current time error and the rate of change of the current time error to obtain the absolute value of the prediction error; Based on the benchmark maximum error domain boundary value, the effective domain boundary is dynamically determined and generated for the absolute value of the prediction error to obtain the effective domain boundary at the current time. Based on the scaling reference coefficient, the effective domain boundary at the current moment is dynamically scaled to obtain the error dynamic quantization factor and the error rate of change dynamic quantization factor.
4. The PLC adaptive fuzzy PID power regulation method according to claim 3, characterized in that, Based on the prediction gain coefficient, a predictive assessment of the system disturbance intensity is performed on the current time error and the rate of change of the current time error to obtain the absolute value of the prediction error. This includes: performing a predictive assessment of the system disturbance intensity on the current time error and the rate of change of the current time error using the following formula: in, The error is the current time. The rate of change of error at the current moment. This is the prediction gain coefficient.
5. The PLC adaptive fuzzy PID power regulation method according to claim 3, characterized in that, Based on the scaling reference coefficient, the effective universe of discourse boundary at the current time is dynamically scaled to obtain the error dynamic quantization factor and the error rate of change dynamic quantization factor, including: dynamically scaling the quantization factor of the effective universe of discourse boundary at the current time using the following formula, wherein the formula is: in, Let be the order number of the fuzzy domain. The effective domain boundary at the current moment, This is the scaling reference coefficient.
6. The power regulation method of PLC adaptive fuzzy PID according to claim 1, characterized in that, Based on the aforementioned dynamic quantization factor for error and the dynamic quantization factor for error change rate, the current-time error and the current-time error change rate are dynamically quantized and fuzzified to obtain the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate, including: Based on the error dynamic quantization factor and the error change rate dynamic quantization factor, the error at the current time and the error change rate at the current time are dynamically normalized to obtain the normalized quantized error value and the normalized quantized error change rate value. The normalized quantization error value and the normalized quantization error change rate value are fuzzified to obtain the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate.
7. The power regulation method of PLC adaptive fuzzy PID according to claim 1, characterized in that, Updating the PID parameters of the previous time step based on the proportional gain adjustment, the integral gain adjustment, and the derivative gain adjustment to obtain the PID parameters of the current time step includes: adding the proportional gain adjustment, the integral gain adjustment, and the derivative gain adjustment to the PID parameters of the previous time step to obtain the PID parameters of the current time step.
8. A PLC adaptive fuzzy PID power regulation system, characterized in that, include: The data acquisition module is used to acquire the power setpoint, the actual power value at the current moment, and the error at the previous moment; The reference error calculation module is used to perform reference error calculation on the power setpoint, the actual power value at the current moment, and the error at the previous moment to obtain the error at the current moment and the rate of change of the error at the current moment; The perturbation prediction and universe of discourse scaling factor calculation module is used to perform perturbation prediction and universe of discourse scaling factor calculation on the current time error and the current time error change rate based on the prediction gain coefficient and the scaling reference coefficient to obtain the error dynamic quantization factor and the error change rate dynamic quantization factor. The signal dynamic quantization and fuzzification module is used to perform signal dynamic quantization and fuzzification on the current time error and the current time error change rate based on the error dynamic quantization factor and the error change rate dynamic quantization factor to obtain the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate. The fuzzy inference and PID parameter incremental defuzzification module is used to perform fuzzy inference and PID parameter incremental defuzzification on the fuzzy membership vector of the quantized error and the fuzzy membership vector of the quantized error change rate based on the fuzzy rule base to obtain the proportional gain adjustment, integral gain adjustment and derivative gain adjustment. The parameter update module is used to update the PID parameters of the previous time step based on the proportional gain adjustment, the integral gain adjustment, and the derivative gain adjustment to obtain the PID parameters of the current time step. The control output module is used to input the current time error into the PID controller to obtain the control output at the current time.