Parameter setting method and device and electronic equipment

By acquiring the operating status data of the controlled object, using reinforcement learning agents to generate target parameters and update the parameters of the PID controller, the problem of poor adaptability of the PID controller under different operating conditions is solved, and adaptive and intelligent PID controller adjustment is realized, thereby improving the robustness and adaptability of the control system.

CN121477593APending Publication Date: 2026-02-06SUPCON TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202610026213.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-09
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing PID controller parameter tuning methods rely on precise mathematical models of the controlled object, making it impossible to tune parameters according to requirements. This results in poor adaptability under different operating conditions, high system maintenance costs, and an inability to adapt to complex nonlinear and time-varying characteristics.

Method used

By acquiring the operating status data of the controlled object, using reinforcement learning agents and preset conditions to determine the timing of parameter tuning, generating target parameters and updating the parameters of the PID controller, and combining safety detection and parameter range constraints, the adaptive adjustment of the PID controller is achieved.

Benefits of technology

This technology enables the PID controller to be adaptive and intelligently upgraded under complex operating conditions, improving the robustness and adaptability of the control system, reducing the need for manual intervention, and enhancing the control effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121477593A_ABST
    Figure CN121477593A_ABST
Patent Text Reader

Abstract

The invention discloses a parameter setting method and device and electronic equipment. The method comprises the following steps: acquiring operation state data of a controlled object in a control loop; determining a parameter adjustment state corresponding to the operation state data according to a preset condition; and under the condition that the parameter adjustment state indicates that the parameters are adjusted, target parameters corresponding to the current working condition of the controlled object are generated according to the running state data. The technical problem that a PID controller parameter setting method adopted in the prior art depends on an accurate mathematical model of a controlled object, parameter setting cannot be carried out according to requirements, and adaptability is poor under different working conditions is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automation control, in particular to a parameter setting method and device and electronic equipment. BACKGROUND

[0002] As the most commonly used linear controller type in the industrial control field, the PID controller adjusts the control quantity through the linear combination of the proportional, integral and differential three links to realize the effective correction of the controlled object, and the performance of the PID controller is highly dependent on the selection of its parameters.

[0003] However, the parameter setting method of the PID controller adopted by the related technology depends on the accurate mathematical model of the controlled object, and the mathematical model of the controlled object needs to be known in advance, which becomes extremely difficult when the object has complex nonlinear, time-varying characteristics and large lag phenomenon, and the change of the object characteristics will also cause the original parameters to be invalid, and the parameter setting needs to be re-performed, and the related technology also cannot perform parameter setting according to the demand, resulting in high maintenance cost of the system and poor adaptability under different working conditions.

[0004] At present, no effective solution has been proposed for the above problems. SUMMARY

[0005] The embodiments of the present application provide a parameter setting method, device and electronic equipment to at least solve the technical problems that the parameter setting method of the PID controller adopted by the related technology depends on the accurate mathematical model of the controlled object, and cannot perform parameter setting according to the demand, resulting in poor adaptability under different working conditions.

[0006] According to an aspect of an embodiment of the present application, a parameter setting method is provided, including: obtaining running state data of a controlled object in a control loop, wherein the control loop includes a proportional integral differential (PID) controller for controlling the controlled object, and the running state data includes a process variable for describing the state of the controlled object and a manipulated variable for the PID controller to change the state of the controlled object; determining a parameter setting state corresponding to the running state data according to a preset condition, wherein the preset condition includes a rule set for determining a parameter setting opportunity based on the state of the process variable and the manipulated variable, and the parameter setting state is used to indicate whether to adjust the parameters of the PID controller; in the case that the parameter setting state indicates to adjust the parameters, generating a target parameter corresponding to the current working condition of the controlled object according to the running state data, wherein the target parameter is used to update the parameters of the PID controller.

[0007] In some embodiments of the present application, the method further comprises: comparing the target parameter with a preset parameter range; in a case where the target parameter is not within the preset parameter range, truncating the target parameter to obtain an updated parameter, wherein the updated parameter is at a boundary value of the preset parameter range; updating parameters of the PID controller using the target parameter, and calculating a proportional term, an integral term and a differential term corresponding to the operating state data using the updated PID controller; and determining a control increment based on the proportional term, the integral term and the differential term using the updated PID controller, wherein the control increment is used to adjust the state of the controlled object.

[0008] In some embodiments of the present application, after determining the control increment based on the proportional term, the integral term and the differential term using the updated PID controller, the method further comprises: performing safety detection on the control increment to obtain a target control increment, wherein the safety detection comprises at least one of the following: over-limit detection of a change rate of the manipulated variable, limit detection of the process variable, and limit detection of the manipulated variable.

[0009] In some embodiments of the present application, determining the tuning state corresponding to the operating state data based on the preset condition comprises: comparing the process variable with a preset process variable threshold in the preset condition to obtain a first comparison result; comparing the manipulated variable with a preset manipulated variable threshold in the preset condition to obtain a second comparison result; and in a case where the first comparison result indicates that the process variable exceeds the preset process variable threshold, and / or the second comparison result indicates that the manipulated variable exceeds the preset manipulated variable threshold, determining that the tuning state is a first tuning state, wherein the first tuning state is adjusting the parameters of the PID controller.

[0010] In some embodiments of the present application, the method further comprises: determining whether the process variable is in a tracking state of a set value of the controlled object, wherein the set value is used to reflect the expected output of the controlled object; in a case where the process variable is not in the tracking state, determining that the tuning state is a second tuning state, wherein the second tuning state is not adjusting the parameters of the PID controller; and in a case where the process variable is in the tracking state, determining the tuning state based on a stable state of the process variable and an operating range of the manipulated variable.

[0011] In some embodiments of the present application, determining the tuning state based on the stable state of the process variable and the operating range of the manipulated variable comprises: determining whether the process variable is continuously within a preset error band within a preset time period, wherein the preset error band is used to reflect an error range allowed by the controlled object; determining whether the manipulated variable is continuously within a preset operating range within the preset time period, wherein the preset operating range is used to reflect an operating limit of the manipulated variable; and in a case where, within the preset time period, the process variable is not continuously within the preset error band, and / or the manipulated variable is not continuously within the preset operating range, determining that the tuning state is a first tuning state.

[0012] In some embodiments of the present application, the target parameter corresponding to the current working condition of the controlled object is generated according to the running state data, comprising: extracting a state feature vector from the running state data, wherein the state feature vector is used to represent the control performance state of the control loop; generating an execution action by the agent according to the state feature vector, wherein the execution action includes the adjustment amount of the parameter of the PID controller; determining the target parameter according to the action.

[0013] In some embodiments of the present application, after the state feature vector is extracted from the running state data, further comprising: determining a first reward value according to the state feature vector, wherein the first reward value is used to quantitatively represent the influence degree of the current action of the agent on the immediate control target; determining a second reward value according to the state feature vector, wherein the second reward value is used to quantitatively represent the improvement degree of the control strategy of the agent relative to the historical performance; determining a target reward value corresponding to the first reward value and the second reward value together, wherein the target reward value is used to update the policy network of the agent.

[0014] In some embodiments of the present application, the safety detection is performed on the control increment to obtain a target control increment, comprising: determining the cumulative change amount of the manipulated variable within a preset sliding window; comparing the cumulative change rate with the corresponding first upper threshold and first lower threshold, respectively; in the case that the cumulative change amount is greater than the first upper threshold and / or the cumulative change amount is less than the first lower threshold, performing an over-limit callback on the control increment to obtain a first target control increment, wherein the over-limit callback is used to reverse the adjustment direction of the control increment; in the case that the cumulative change amount is not greater than the first upper threshold and / or the cumulative change amount is not less than the first lower threshold, performing a process variable amplitude limiting detection on the control increment.

[0015] In some embodiments of the present application, the process variable amplitude limiting detection is performed on the control increment, comprising: comparing the process variable with the corresponding second upper threshold and second lower threshold; in the case that a first distance between the process variable and the second upper threshold is less than a first preset distance, and / or a second distance between the process variable and the second lower threshold is less than a second preset distance, the control increment is modified to obtain a second target control increment; in the case that the first distance is not less than the first preset distance, and / or the second distance is not less than the second preset distance, the manipulated variable amplitude limiting detection is performed on the control increment.

[0016] In some embodiments of the present application, the manipulated variable limit detection on the control increment comprises: adding the manipulated variable to the control increment to obtain a target manipulated variable; comparing the target manipulated variable with a third upper limit threshold and a third lower limit threshold; in the case that the target manipulated variable is greater than the third upper limit threshold and / or the target manipulated variable is less than the third lower limit threshold, correcting the control increment to obtain a third target control increment; in the case that the target manipulated variable is not greater than the third upper limit threshold and / or the target manipulated variable is not less than the third lower limit threshold, determining the control increment as the target control increment.

[0017] According to still another aspect of the embodiments of the present application, a parameter setting device is further provided, comprising: an acquisition module, configured to acquire running state data of a controlled object in a control loop, wherein the control loop comprises a proportional integral derivative (PID) controller for controlling the controlled object, and the running state data comprises a process variable for describing a state of the controlled object and a manipulated variable for the PID controller to change the state of the controlled object; a determination module, configured to determine a parameter setting state corresponding to the running state data according to a preset condition, wherein the preset condition comprises a rule set for determining a parameter setting time based on the process variable and the manipulated variable, and the parameter setting state is used to indicate whether to adjust parameters of the PID controller; and an adjustment module, configured to generate a target parameter corresponding to a current working condition of the controlled object according to the running state data in the case that the parameter setting state indicates to adjust the parameters, wherein the target parameter is used to update the parameters of the PID controller.

[0018] According to still another aspect of the embodiments of the present application, an electronic device is further provided, comprising: a memory and a processor, the memory is configured to store program instructions; the processor is connected with the memory and is configured to execute the above-mentioned parameter setting method.

[0019] According to still another aspect of the embodiments of the present application, a non-volatile storage medium is further provided, comprising a stored computer program, wherein a device where the non-volatile storage medium is located executes the above-mentioned parameter setting method by running the computer program.

[0020] According to still another aspect of the embodiments of the present application, a computer program product is further provided, comprising computer instructions, which are executed by a processor to implement the above-mentioned parameter setting method.

[0021] In the embodiments of the present application, a data-driven manner is adopted, the running state of the controlled object in the control loop is monitored in real time, it is intelligently judged whether the parameter needs to be adjusted, and the PID controller parameters are automatically updated when necessary, so that the purpose of real-time parameter optimization according to the dynamic characteristics and working condition changes of the controlled object is achieved, thereby realizing the self-adaptation and intelligent upgrading of the PID control system, and further solving the technical problems that the parameter setting method of the PID controller adopted by the related art depends on the accurate mathematical model of the controlled object, and the parameter setting cannot be performed according to the demand, resulting in poor adaptability under different working conditions. BRIEF DESCRIPTION OF DRAWINGS

[0022] The drawings described herein are used to provide further understanding of the present application, constitute a part of the present application, the illustrative embodiments of the present application and the description thereof are used to explain the present application, and do not constitute improper limitation on the present application. In the drawings:

[0023] Figure 1 is a hardware structure block diagram of a computer terminal of a parameter setting method according to an embodiment of the present application;

[0024] Figure 2 is a flowchart of a parameter setting method according to an embodiment of the present application;

[0025] Figure 3 is a flowchart of a PID controller online self-setting method of a parameter setting method according to an embodiment of the present application;

[0026] Figure 4 is a flowchart of a parameter setting rule module of a parameter setting method according to an embodiment of the present application;

[0027] Figure 5 is a system principle block diagram of a reinforcement learning intelligent agent module of a parameter setting method according to an embodiment of the present application;

[0028] Figure 6 is a flowchart of an algorithm learning mode of a parameter setting method according to an embodiment of the present application;

[0029] Figure 7 is a flowchart of a safety protection module of a parameter setting method according to an embodiment of the present application;

[0030] Figure 8 is a structure schematic diagram of a parameter setting device according to an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to enable personnel in the technical field to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor should fall within the scope of protection of the present application.

[0032] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:

[0034] PID controller (Proportional Integral Derivative controller, PID for short): The PID controller is a commonly used closed-loop control method, which measures, compares and calculates the deviation between the process variable and the set value, and adjusts the output by using the proportional (P), integral (I) and derivative (D) three control items to reduce the deviation and achieve stable control. In the embodiments of the present application, the PID controller is a key component in the control loop, responsible for calculating the control output according to the real-time deviation information to adjust the running state of the controlled object. By enhancing the parameter self-tuning ability of the PID controller, it can automatically adapt to external disturbances and object characteristic changes without human intervention, thereby improving the control effect.

[0035] Online Self-tuning: Online self-tuning refers to the ability of a control system to automatically adjust its parameters in real-time during operation to respond to changes in the dynamic characteristics of the controlled object or external disturbances without the need to stop or interrupt the normal operation of the control loop. In the embodiments of the present application, online self-tuning is a key feature for realizing dynamic optimization of PID controller parameters, which can automatically adjust PID controller parameters based on real-time data analysis results while the control loop is running normally, so that it can always maintain optimal control performance, especially when the object characteristics change with operating conditions, it can quickly respond to improve the flexibility and robustness of control.

[0036] Agent: In the framework of reinforcement learning, an agent is an entity that can observe the state of the environment and choose the next action according to the current policy. The goal of the agent is to find a policy through interaction with the environment to maximize the expected cumulative reward. In the embodiments of the present application, the agent plays the role of decision maker, which continuously optimizes the adjustment strategy of PID parameters based on real-time state observation of the PID control loop through reinforcement learning algorithms. The optimization goal of the agent is to improve the response speed, stability and energy saving performance of the control system, and through long-term learning, to achieve precise control of complex industrial processes.

[0037] Environment: In reinforcement learning, the environment refers to the external world that the agent can interact with, which includes all factors that can influence the agent's decision-making. The environment gives feedback in the form of state and reward based on the agent's behavior. In the embodiments of the present application, the environment specifically refers to the dynamic characteristics of the controlled industrial process and its control loop. The agent evaluates the current control effect based on the process variables, control variables and other information obtained from the environment, and adjusts the PID parameters accordingly. The state changes of the environment and the parameter adjustment behavior of the agent interact with each other to determine the overall performance of the control system.

[0038] Reward Function: Reward function is a function used to guide the behavior of the agent in reinforcement learning, which gives an immediate numerical feedback according to the specific action taken by the agent in a certain state, indicating the goodness or badness of the action. In the embodiments of the present application, the reward function is a standard for quantifying the performance of PID control, which takes into account factors such as control error, overshoot, system response speed, etc., to guide the agent to learn the PID parameter adjustment strategy that optimizes the performance of the control loop.

[0039] PID controller is applied in more than 90% of industrial process control loops due to its simple structure, strong robustness and clear physical meaning. However, the performance of the PID controller depends on the setting of its three parameters, namely, the proportional band (PB), the integral time constant (Ti) and the derivative time constant (Td). In actual industrial processes, the controlled object often has complex characteristics such as nonlinearity, time-varying and large lag, and the operating conditions frequently change, which makes it difficult for the PID controller based on fixed parameters to maintain optimal control performance at all times, and thus it can only rely on manual parameter adjustment by engineers, which is very labor-intensive.

[0040] In the related art, the PID parameter tuning methods are mainly divided into the following categories:

[0041] 1) Empirical trial and error method: relying on the experience of engineers, the parameters are manually adjusted by observing the system response, which has the disadvantages of low tuning efficiency, dependence on expert knowledge, difficulty in obtaining optimal parameters, and inability to adapt to changes in the dynamic characteristics of the object.

[0042] 2) Model-based tuning method (such as Ziegler-Nichols method, internal model principle, etc.): an accurate mathematical model (such as step response, frequency response) of the controlled object needs to be obtained. The disadvantages are: a) for complex processes, accurate modeling is difficult and costly; b) after the characteristics of the object change, the parameters tuned based on the initial model will be invalid, and the model needs to be re-identified, which is difficult to achieve online adaptation.

[0043] 3) Traditional adaptive control (such as model reference adaptive control, self-tuning regulator): although it can adjust the parameters online, it usually relies on specific model structure assumptions, and the algorithm is complex, and the real-time performance and robustness face challenges when facing complex nonlinear systems.

[0044] 4) Rule-based intelligent tuning (such as fuzzy PID): it depends on a pre-set fuzzy rule base, and the completeness and accuracy of the rules directly affect the tuning effect. When the characteristics of the object exceed the coverage range of the rule base, the performance decreases, and the design of the rule base also depends on expert experience.

[0045] To solve the above technical problems, the embodiments of the present application provide corresponding solutions, which are described in detail below.

[0046] The parameter tuning method provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal for implementing the parameter tuning method is shown. As shown in FIG. 1, the computer terminal includes a central processing unit (CPU), a random access memory (RAM), a read-only memory (ROM), an input / output (I / O) interface, an input device and an output device. Figure 1As shown, the computer terminal 10 can include one or more processors (which can include, but are not limited to, processing devices such as microprocessors (MCU) or programmable logic devices (FPGA)), a memory 104 for storing data, and a transmission module 106 for communication functions connected through wired and / or wireless networks. In addition, it can also include a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the I / O interface), a network interface, a BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only a schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can include more or fewer components than those shown in the figure, or have a different configuration than that shown in the figure. Figure 1 Figure 1

[0047] It should be noted that the one or more processors and / or other data processing circuits described above can be referred to herein as "data processing circuits" in general. The data processing circuit can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuit can be a single independent processing module, or any one of the other elements incorporated into the computer terminal 10 in whole or in part. As referred to in the embodiments of the present application, the data processing circuit serves as a processor to control, for example, the selection of the variable resistance terminal path connected to the interface.

[0048] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the parameter setting method in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned parameter setting method. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further include a memory remotely disposed with respect to the processor, which can be connected to the computer terminal 10 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0049] ​​The transmission module 106 is configured to receive or send data via a network. The network can include, for example, a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC) that can connect to other network devices through a base station to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module that is configured to communicate with the Internet via wireless communication.

[0050] The display can be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10.

[0051] It is noted that in some alternative embodiments, the above-described Figure 1 The computer terminal can include hardware elements (including circuitry), software elements (including computer code stored on a computer readable medium), or a combination of both hardware and software elements. It should be noted that in some embodiments, the functions of the computer terminal described above can be provided by one or more of the computer terminals described above. Figure 1 is merely one example of a particular implementation and is intended to illustrate the types of components that can be present in the computer terminal described above.

[0052] In the above-described operating environment, the embodiments of the present application provide a method for parameter setting. It is noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.

[0053] Figure 2 is a flowchart of a method for parameter setting according to an embodiment of the present application, as shown in the figure, the method includes the following steps: Figure 2

[0054] In step S202, the operating state data of the controlled object in the control loop is obtained, wherein the control loop includes a proportional integral derivative (PID) controller for controlling the controlled object, and the operating state data includes a process variable for describing the state of the controlled object and a manipulated variable for changing the state of the controlled object by the PID controller.

[0055] ​In the above step S202, the controlled object refers to an object or system that needs to be adjusted in industrial control, such as the temperature of a reaction kettle in a chemical plant, the flow rate of materials on a production line, etc., which are physical / chemical processes that need to be controlled in process industry. The control loop is a series of interlocking links composed of the controlled object, sensors, controllers, actuators, etc., and the purpose is to keep the process variable near the desired set value, wherein the PID controller is the core component in the control loop, which adjusts the output to affect the state of the controlled object.

[0056] The running state data can include but is not limited to process variable (PV) and manipulated variable (MV), which reflect the current state of the controlled object and the adjustment of the PID controller to the state, respectively, and can also include set value (SV) and the like. It should be noted that in the control loop, the process variable can be measured and used to compare with the set value, directly reflecting the current state of the controlled object, and the manipulated variable can be the control instruction output by the PID controller, which acts on the controlled object through the actuator to change the state of the process variable to approach the set value.

[0057] In some embodiments of the present application, an industrial data acquisition interface can be used to read the running data of the control loop in real time, including but not limited to set value SV, process variable PV, manipulated variable MV, and loop running state identifier, etc. In addition, the collected real-time running state data can be encapsulated in time sequence and transmitted to the data processing module, and the data transmission needs to be consistent with the sampling period of the control loop to ensure the timeliness and integrity of the data. Data processing includes cleaning and standardizing the original data, and converting them into the form required by the agent, to prepare for subsequent reinforcement learning parameter tuning.

[0058] Step S204, determining the parameter tuning state corresponding to the running state data according to the preset condition, wherein the preset condition includes a rule set for determining the parameter tuning opportunity based on the state of the process variable and the manipulated variable, and the parameter tuning state is used to indicate whether to adjust the parameters of the PID controller.

[0059] In the above step S204, the preset condition refers to a rule set based on the state of the process variable and the manipulated variable, which is used to determine whether the parameters of the PID controller need to be adjusted. These conditions are the trigger basis for the parameter tuning logic, which can ensure that the parameter adjustment is started when necessary and avoid unnecessary adjustment. The rule set contains multiple dimensional judgment conditions for real-time analysis of the running state of the control loop, such as whether the process variable reaches the limit value, whether the change rate of the manipulated variable exceeds the preset threshold, whether the process variable is stable near the set value, etc.

[0060] The tuning state can be an indicator, for example, to indicate the opening or closing of the PID controller parameter adjustment function. If the tuning state is open, the PID controller parameters will be adjusted online according to the agent's suggestion; otherwise, the current parameters remain unchanged, and the control loop state continues to be monitored.

[0061] In some embodiments of the present application, the states of the process variable and the manipulated variable can be analyzed in real time. Through preset multi-dimensional judgment conditions, such as whether the PV is stable, whether the MV is frequently changed, whether there is external disturbance, etc., it is evaluated whether the current control effect meets the expectation and whether the PID parameters need to be adjusted. The tuning rule engine determines whether to start the PID parameter adjustment process based on the above analysis results. If the loop operating state deviates from the preset standard (such as the PV exceeding the ±5% range of the set value), the tuning state is triggered, and the online self-tuning of the PID parameters is activated; otherwise, the current PID parameters remain unchanged, and the monitoring continues.

[0062] The traditional PID controller parameter setting method is often carried out under fixed conditions, lacking sensitivity and response ability to real-time running state. Step S204 realizes dynamic and intelligent adjustment of PID parameters by introducing multi-dimensional judgment and rule triggering mechanism based on real-time state, which can timely respond to the nonlinear and time-varying nature of operating conditions and object characteristics, avoid performance degradation or instability of the control system, and significantly improve the robustness and adaptability of the control, especially in complex industrial environments (such as liquid level control loop in chemical plant).

[0063] In some embodiments of the present application, the tuning state corresponding to the running state data can be determined according to the preset conditions in the following manner: comparing the process variable with the preset process variable threshold in the preset conditions to obtain a first comparison result; comparing the manipulated variable with the preset manipulated variable threshold in the preset conditions to obtain a second comparison result; in the case that the first comparison result indicates that the process variable exceeds the preset process variable threshold, and / or the second comparison result indicates that the manipulated variable exceeds the preset manipulated variable threshold, determining that the tuning state is a first tuning state, wherein the first tuning state is to adjust the parameters of the PID controller.

[0064] In some embodiments of the present application, the following steps can also be performed: judging whether the process variable is in a set value tracking state of the controlled object, wherein the set value is used to reflect the expected output of the controlled object; in the case that the process variable is not in the tracking state, determining that the tuning state is a second tuning state, wherein the second tuning state is not to adjust the parameters of the PID controller; in the case that the process variable is in the tracking state, determining the tuning state according to the stable state of the process variable and the operating range of the manipulated variable.

[0065] The parameter adjustment state can be determined according to the steady state of the process variable and the operation range of the manipulated variable in the following manner: determining whether the process variable is continuously within a preset error band in a preset time period, wherein the preset error band is used to reflect the error range allowed by the controlled object; determining whether the manipulated variable is continuously within a preset operation range in the preset time period, wherein the preset operation range is used to reflect the operation limit of the manipulated variable; determining the parameter adjustment state as the first parameter adjustment state when the process variable is not continuously within the preset error band and / or the manipulated variable is not continuously within the preset operation range in the preset time period.

[0066] To facilitate the understanding of the determination process of the above parameter adjustment state, the following specific embodiments are explained in combination with Figure 4 Specifically, the parameter adjustment state can be determined by the parameter adjustment rule module, including the following steps:

[0067] S21: determining whether the PV reaches the limit value: real-time monitoring of the process variable (PV) to determine whether it reaches the preset upper and lower limit threshold (i.e., the preset process variable threshold); if the limit value is reached, the parameter adjustment request is triggered and the corresponding rule is started.

[0068] S22: determining whether the MV reaches the limit value: real-time monitoring of the manipulated variable (MV) to determine whether it reaches the set operation boundary (i.e., the preset manipulated variable threshold); if the limit value is reached, the parameter adjustment request is triggered and the corresponding rule is started.

[0069] S23: determining whether the PV is in the tracking stage: detecting whether the process variable (PV) is in the set value (SV) tracking state; if it is not in the tracking stage, continue to observe and do not trigger the parameter adjustment.

[0070] S231: PV stability judgment: determining whether the PV is continuously stable within the set error band: if it is not continuously stable, the parameter adjustment request is triggered and the corresponding parameter adjustment logic is executed, and the loop state at the triggering time is recorded; when the parameter adjustment triggering condition is not met, the system maintains the current state and continues to monitor and analyze the loop operation data.

[0071] S232: MV operation range judgment: determining whether the MV is within the allowed operation range: if it is out of range, the parameter adjustment request is triggered and the corresponding parameter adjustment logic is executed, and the loop state at the triggering time is recorded; when the parameter adjustment triggering condition is not met, the system maintains the current state and continues to monitor and analyze the loop operation data.

[0072] Further, the workflow of the above steps is as follows:

[0073] ① Real-time judgment and triggering of PV and MV limit values: The S21 module monitors the process variable (PV) in real time, and when the value exceeds the preset upper and lower threshold values, it immediately triggers the parameter adjustment request and starts the corresponding rule. At the same time, the S22 module monitors the manipulated variable (MV) in parallel, and when the MV reaches the set operating boundary, it synchronously triggers the parameter adjustment request and starts the corresponding rule, ensuring that the loop starts parameter self-tuning in time under extreme operating conditions.

[0074] ② Identification of PV tracking state and stable mode: The S23 module detects whether the process variable (PV) is in the set value (SV) tracking state. If it is not in the tracking stage, the system maintains the current state and continues to observe. If it is in the tracking stage, the S231 module further judges whether the PV is continuously stable within the set error band (i.e., the preset error band). If it is identified that the PV is not continuously stable, the parameter adjustment request is triggered and the corresponding logic is executed, and the loop state at the triggering time is recorded. The S232 module judges whether the MV is within the allowed operating range. If it is identified that the MV exceeds the preset operating range, the parameter adjustment request is triggered and the corresponding parameter adjustment logic is executed, and the loop state at the triggering time is recorded. If the MV is operating normally, the system maintains the current state and continues to monitor and analyze the loop operating data in real time.

[0075] It should be noted that, Figure 4 The "last two fluctuation periods" in S231 and S232 are a specific example of the preset time period.

[0076] In some embodiments of the present application, when any of the judgment modules (S21, S22, S231, S232) meets the triggering condition, the system uniformly initiates the parameter adjustment request and starts the subsequent data processing and parameter setting process. If none of the judgment modules meets the triggering condition, the system continues to run in the observation mode without starting the parameter adjustment process, realizing intelligent, hierarchical, and collaborative perception and decision-making of the control loop state.

[0077] In step S206, the target parameters are generated based on the operating state data corresponding to the current operating condition of the controlled object, and the target parameters are used to update the parameters of the PID controller.

[0078] In the above step S206, the target parameters refer to the PID controller parameters that are most matched to the current operating condition of the controlled object generated by intelligent algorithms (such as reinforcement learning), which are used to replace the original PID controller parameters to optimize the control performance.

[0079] In some embodiments of the present application, the reinforcement learning agent can output the optimal PID parameter adjustment strategy based on the latest operating state data, including control error, integral of error, differential of error, historical control effect, etc. For example, the PID parameter adjustment amount is regarded as the action of the reinforcement learning agent, and the control effect (such as the stability of PV, overshoot control, etc.) is regarded as the reward signal feedback to the agent, guiding it to learn the optimal tuning strategy.

[0080] It should be noted that when generating the target parameter, not only the control speed should be considered, but also the reduction of overshoot, control steady-state error and energy consumption, etc. Therefore, the reward function design of the agent must comprehensively consider these factors to ensure that the PID parameter adjustment can quickly respond and not be too aggressive, avoiding the instability of the control system or energy waste.

[0081] In order to accurately optimize the parameters according to the current working condition, the target parameter can be determined by the following steps: extracting a state feature vector from the operating state data, wherein the state feature vector is used to represent the control performance state of the control loop; generating an execution action by the agent according to the state feature vector, wherein the execution action includes the adjustment amount of the PID controller parameters; determining the target parameter according to the action.

[0082] Specifically, the state feature vector is a set of key indicators extracted from the operating state data, which is used to describe the current state of the control loop, including control error, error integral, error differential, overshoot, transition process time, etc. Its role is to provide the agent with a comprehensive description of the environment state, so that the agent can make decisions.

[0083] Under the reinforcement learning framework, the agent is a decision maker who can continuously optimize its own strategy according to the state feature vector and the reward signal through interaction with the environment (i.e. the control loop) to execute the action (i.e. the PID parameter adjustment amount). The goal of the agent is to make the PID control performance optimal in the long term through parameter adjustment, and the execution action includes the PID controller parameter adjustment amount generated by the agent according to the current state feature vector.

[0084] After extracting the state feature vector from the operating state data, the following steps can also be performed: determining a first reward value according to the state feature vector, wherein the first reward value is used to quantitatively represent the influence degree of the current action of the agent on the immediate control target; determining a second reward value according to the state feature vector, wherein the second reward value is used to quantitatively represent the improvement degree of the control strategy of the agent relative to the historical performance; determining a target reward value corresponding to the first reward value and the second reward value together, wherein the target reward value is used to update the strategy network of the agent.

[0085] To facilitate the understanding of the determination process of the above target parameters, some specific embodiments are explained below, combined with Figure 5 , the reinforcement learning agent module can determine the target parameters by performing the following steps:

[0086] S41 state observation module: used to extract a state feature vector from the control system, which can represent the current control performance , the vector includes: control error at the current time, integral of error, differential of error, historical values of error at past several time points, change trend of system output, overshoot, oscillation frequency and amplitude of system variables, transition process time.

[0087] S42 reward calculation module: calculate the immediate reward value according to the current control effect , the design of reward function is very important, its goal should guide the agent to learn excellent control performance, in some embodiments of the present application, the reward function is designed as follows:

[0088]

[0089]

[0090]

[0091] The reward function is designed as a linear combination of the basic term (i.e. the first reward value) and the promotion term (i.e. the second reward value).

[0092] The basic term aims to directly reflect the parameter optimization effect based on the control target, wherein, is the deviation of the controlled variable from the set value, is the change amount of the control variable (used to punish violent action), is the absolute error integral in a period of time, is the overshoot penalty term, , , , are weight coefficients, used to balance the importance of each performance index.

[0093] The design of the promotion term aims to encourage the agent to continuously improve its self-tuning ability, so that the effect of each tuning is better than most of the past cases.

[0094] S43 reinforcement learning agent: the agent receives the state from the state observation module, and outputs an action based on its internal policy network , the action is the adjustment amount of the PID controller parameters . The agent updates its policy network according to the reward feedback by the reward calculation module and the new state to maximize the long-term cumulative reward. The agent preferably uses a deep reinforcement learning algorithm of soft actor-critic (SAC) suitable for continuous action space.

[0095] S44 parameter update module: receives the action output by the agent (the parameter adjustment amount) and applies it to the PID controller to update its parameters: , , .

[0096] S45 experience replay pool module: saves experience tuple data .

[0097] The workflow corresponding to the above steps is as follows:

[0098] ① System initialization: set the initial PID parameters, initialize the network weights of the reinforcement learning agent and the experience replay buffer.

[0099] ② In each control period :

[0100] a. The state observation module collects control system running data to construct a state vector .

[0101] b. The reward calculation module calculates the reward according to the current and historical data .

[0102] c. The reinforcement learning agent generates a corresponding action distribution according to the current state through the policy network, and samples an action from the action distribution.

[0103] d. The parameter update module decodes the action into specific PID parameter increments to update the parameters of the PID controller.

[0104] e. The updated PID controller exerts a control action on the controlled object.

[0105] f. The controlled object moves to a new state, and the state observation module obtains the new state .

[0106] g. Store the experience tuple to the experience replay buffer.

[0107] h. The reinforcement learning agent samples a batch of experience data from the experience replay buffer to update its actor network (policy network) and critic network (value network) to improve its policy.

[0108] In combination Figure 6 In combination with the algorithm flowchart shown in the figure, in some embodiments of the present application, the learning mode of the algorithm adopts a mode combining offline pre-training and online fine-tuning: a large amount of pre-training is performed in a simulation environment, and then the trained model is migrated to an actual system for online fine-tuning to improve the initial safety and convergence speed.

[0109] In some embodiments of the present application, after obtaining the target parameter, the following steps can be further performed: comparing the target parameter with a preset parameter range; in the case that the target parameter is not within the preset parameter range, truncating the target parameter to obtain an updated parameter, wherein the updated parameter is at a boundary value of the preset parameter range; updating the parameters of the PID controller using the target parameter, and calculating the proportional term, the integral term and the differential term corresponding to the running state data using the updated PID controller; determining the control increment according to the proportional term, the integral term and the differential term using the updated PID controller, wherein the control increment is used to adjust the state of the controlled object.

[0110] Specifically, the preset parameter range refers to setting reasonable upper and lower limits for the parameters (i.e. PB, Ti, Td) of the PID controller to ensure the safety and stability of the control system. The role of the preset parameter range is to prevent the target parameter generated by the agent from exceeding the safety limit, resulting in overly aggressive or conservative control behavior, which affects the control effect. The updated parameter is a parameter value within a reasonable range after clipping or adjusting the target parameter when it exceeds the preset range. For example, for the proportional band PB, if the target PB value recommended by the agent is less than the minimum value PB_min, it is set to PB_min; if it is greater than the maximum value PB_max, it is set to PB_max. Similarly, it applies to the integral time Ti and the differential time Td.

[0111] After boundary checking the target parameter, the new proportional term P, the integral term I and the differential term D are calculated using the updated PID parameters, and the control increment ΔMV is recalculated by the updated PID controller according to the latest parameters and the control error. It should be noted that the control increment is recalculated by the PID controller after updating the parameters, and is used to adjust the control command change amount of the controlled object, and the size of the control increment directly determines the speed and strength of the adjustment of the state of the controlled object.

[0112] After the control increment is determined by the updated PID controller according to the proportional term, the integral term and the derivative term, the following steps can be performed: performing safety detection on the control increment to obtain a target control increment, wherein the safety detection comprises at least one of the following: change rate of the manipulated variable out-of-limit detection, process variable amplitude limiting detection, and manipulated variable amplitude limiting detection.

[0113] It should be noted that safety detection is a series of checks performed after the control increment is determined to ensure that the control action does not adversely affect the control system, such as excessive change rate that can cause excessive wear of the actuator, and out-of-limit process variable that can damage equipment or the environment. The target control increment is the legal control increment after safety detection, which ensures that the control action meets the industrial safety standards and does not cause system performance degradation or equipment damage.

[0114] In some embodiments of the present application, the safety detection comprises:

[0115] (1) Change rate of the manipulated variable out-of-limit detection: calculate the change rate of the manipulated variable MV (change amount divided by time interval), and compare it with the preset upper limit of the change rate. If the change rate exceeds the upper limit, adjust the control increment to ensure that the change rate is within a safe range to reduce the impact on the actuator.

[0116] (2) Process variable amplitude limiting detection: monitor the numerical change of the process variable PV and compare it with the preset process variable limit value to prevent the control action from causing the PV to exceed the safety boundary. If it is detected that the PV is close to the upper limit or the lower limit, limit the direction of the control increment to avoid the PV from going out of range.

[0117] (3) Manipulated variable amplitude limiting detection: ensure that the output of the actuator (manipulated variable MV) is within a safe operating range. If the updated MV exceeds the physical limit of the equipment, truncate the MV to its physical limit value to maintain the safety and stable operation of the actuator.

[0118] In some embodiments of the present application, the control increment can be safety detected to obtain a target control increment by: determining a cumulative change amount of the manipulated variable within a preset sliding window; comparing the cumulative change amount with a corresponding first upper limit threshold and a first lower limit threshold, respectively; in the case that the cumulative change amount is greater than the first upper limit threshold and / or the cumulative change amount is less than the first lower limit threshold, performing out-of-limit callback on the control increment to obtain a first target control increment, wherein the out-of-limit callback is used to reverse the adjustment direction of the control increment; in the case that the cumulative change amount is not greater than the first upper limit threshold and / or the cumulative change amount is not less than the first lower limit threshold, performing process variable amplitude limiting detection on the control increment.

[0119] In some embodiments of the present application, the control increment can be subjected to process variable limit detection in the following manner: comparing the process variable with a corresponding second upper limit threshold and a second lower limit threshold; in the case that a first distance between the process variable and the second upper limit threshold is less than a first preset distance, and / or a second distance between the process variable and the second lower limit threshold is less than a second preset distance, correcting the control increment to obtain a second target control increment; in the case that the first distance is not less than the first preset distance, and / or the second distance is not less than the second preset distance, subjecting the control increment to manipulated variable limit detection.

[0120] In some embodiments of the present application, the control increment can be subjected to manipulated variable limit detection in the following manner: adding the manipulated variable and the control increment to obtain a target manipulated variable; comparing the target manipulated variable with a corresponding third upper limit threshold and a third lower limit threshold; in the case that the target manipulated variable is greater than the third upper limit threshold and / or the target manipulated variable is less than the third lower limit threshold, correcting the control increment to obtain a third target control increment; in the case that the target manipulated variable is not greater than the third upper limit threshold and / or the target manipulated variable is not less than the third lower limit threshold, determining the control increment as the target control increment.

[0121] In order to facilitate understanding of the above safety detection process, some specific embodiments are explained below. In combination with Figure 7 , the protection logic module (refer to Figure 3 , corresponding to S6) comprises the following main parts:

[0122] S61 MV change rate overrun protection: based on the sliding time window to statistically analyze the historical change trend of MV, when the cumulative adjustment amplitude exceeds the preset threshold, the rollback mechanism is automatically triggered to prevent the actuator from being excessively worn.

[0123] S62 PV boundary early warning protection: real-time monitoring of the relative position of the process variable and the process boundary, actively intervening in the control direction when the PV approaches the safety limit value, and establishing a preventive safety barrier.

[0124] S63 MV hard limit protection: strictly constraining the control output to ensure that the operating variable is always within the working range allowed by the device, and to ensure the safe operation of the actuator.

[0125] In some embodiments of the present application, the outputs of the various protection modules can be integrated, and the conflicts can be resolved according to a preset priority to generate a final safety correction and feedback to the control system.

[0126] The specific workflow is as follows:

[0127] (1) MV change trend analysis and protection: S3 module (i.e. Figure 3the data processing module in the S1 module) starts the protection logic in the normal mode, extracts the MV historical data sequence in the last 20 minutes, obtains the MV change sequence through difference calculation, calculates the cumulative change amount by using the sliding window statistical method, and automatically triggers the direction callback mechanism when detecting that the increase operation is out of limit (cumulative change amount > upper limit threshold) or the decrease operation is out of limit (cumulative change amount < lower limit threshold), and suppresses excessive adjustment by reversing the control increment direction.

[0128] (2) PV safety boundary active protection: the agent module (that is, the S4 module) in the S1 module continuously monitors the relative position of the process variable and the process boundary, and adopts a deviation threshold early warning mechanism; when the PV value is close to the upper limit (PV > upper limit - threshold / 2) and the control action still tends to increase, or when the PV value is close to the lower limit (PV < lower limit + threshold / 2) and the control action still tends to decrease, the direction correction is immediately triggered to reverse the control increment to establish a preventive safety barrier. Figure 3 (3) MV physical constraint hard protection: the PID controller module (that is, the S5 module) in the S1 module performs final physical constraint checking on the control increment processed in the previous stage, and presets the MV working range based on the device characteristics; when the calculated new MV value exceeds the upper limit, the control increment is adjusted to ΔMV = upper limit - current MV; when it is lower than the lower limit, it is adjusted to ΔMV = lower limit - current MV, so as to ensure that the actuator always operates within the safe physical range.

[0129] Figure 3 The protection logic module receives the decision output of each protection submodule, for example, can perform conflict coordination according to the priority order of "MV hard limiting → PV boundary protection → MV change rate limiting" (the priority order can be flexibly adjusted according to requirements, which is not limited here), generates the final safety correction control increment, transmits it to the actuator to execute the control action, and records the protection trigger event, the correction parameter and the system state to the real-time database, to provide data support for subsequent safety analysis and system optimization.

[0130] Through the above steps S202 to S206, in a data-driven manner, by monitoring the running state of the controlled object in the control loop in real time, it is intelligently judged whether the parameter needs to be adjusted, and the PID controller parameters are automatically updated when necessary, so as to achieve the purpose of real-time parameter optimization according to the dynamic characteristics and working condition changes of the controlled object, thereby realizing the self-adaptation and intelligent upgrading of the PID control system, and further solving the technical problems that the parameter setting method of the PID controller adopted by the related technology depends on the accurate mathematical model of the controlled object, and cannot be parameter set according to the requirements, resulting in poor adaptability under different working conditions.

[0131] Through the above steps S202 to S206, in a data-driven manner, by monitoring the running state of the controlled object in the control loop in real time, it is intelligently judged whether the parameter needs to be adjusted, and the PID controller parameters are automatically updated when necessary, so as to achieve the purpose of real-time parameter optimization according to the dynamic characteristics and working condition changes of the controlled object, thereby realizing the self-adaptation and intelligent upgrading of the PID control system, and further solving the technical problems that the parameter setting method of the PID controller adopted by the related technology depends on the accurate mathematical model of the controlled object, and cannot be parameter set according to the requirements, resulting in poor adaptability under different working conditions.

[0132] ​This application also provides a parameter tuning system, which includes components such as real-time data monitoring, parameter tuning rules, data processing, reinforcement learning agent, PID controller, and safety protection. The parameter tuning rules comprehensively judge the actual operation of PV and MV and determine the timing of parameter tuning. The reinforcement learning agent observes the operation state of the PID control loop, takes the adjustment amount of PID parameters as actions, and takes signals reflecting control performance indicators as rewards. Through continuous interaction with the environment (controlled object and PID control loop), it learns an optimal PID parameter adjustment strategy. The safety protection logic, in conjunction with the current actual operation of PV and MV, constrains and adjusts the control increment.

[0133] It should be noted that the parameter-tuned system can be used to perform the above. Figure 2 The parameter tuning method shown is therefore Figure 2 The explanations and instructions regarding the parameter tuning methods also apply to parameter tuning systems, and will not be repeated here.

[0134] Figure 3 This is a flowchart illustrating an online self-tuning method for a PID controller according to an embodiment of this application. Figure 3 As shown, it includes the following steps:

[0135] S1 Real-time Data Monitoring Module: Reads factory circuit data in real time and transmits it to the algorithm.

[0136] S2 parameter tuning rule module: Analyzes the loop operation in real time and triggers or disables the parameter tuning function according to the rules.

[0137] S3 Data Processing Module: Obtains the actual data of the required length for the algorithm, handles missing values, and converts it into the form required by the agent.

[0138] The S4 reinforcement learning agent module receives processed data and generates recommended values ​​for PID parameters based on the data.

[0139] S5PID controller module: It adopts incremental proportional-derivative-first PID control algorithm to perform basic control law calculation, but its parameters (PB, Ti, Td) can be dynamically modified by external signals.

[0140] S6 safety protection logic module: comprehensively constrains control quantities and control increments to ensure system operation safety.

[0141] Specifically, the workflow is as follows:

[0142] ①Through the industrial data acquisition interface, real-time operation data of a factory control loop are read, including but not limited to set value SV, process variable PV, manipulated variable MV and loop operation state identifier, the real-time data collected are encapsulated in time sequence and then transmitted to a parameter tuning rule module (S2) and a data processing module (S3), and the data transmission period is consistent with the control loop sampling period.

[0143] ②The parameter tuning rule module receives the real-time data transmitted by S1, analyzes the loop operation state in real time through preset multi-dimensional judgment conditions, sends a parameter tuning start instruction to the S3 data processing module when the parameter tuning trigger condition is met, and records the loop state parameters at the triggering time; when the system is in an abnormal working condition, the parameter tuning function is automatically turned off and a state warning is issued.

[0144] ③After receiving the parameter tuning start instruction of S2, the data processing module extracts complete operation data of a length required for parameter tuning before the triggering time from the real-time database, and processes the data for missing values and standardization.

[0145] ④The reinforcement learning agent receives the standardized data set output by S3, extracts features from the data based on a pre-trained reinforcement learning model, combines the loop historical parameter tuning records and the current working condition features, generates a set of optimal PID parameter recommended values (including proportional band PB, integral time constant Ti and derivative time constant Td) through a multi-objective optimization algorithm, and transmits the parameter recommended values with a confidence score to a safety protection module (S6).

[0146] ⑤The incremental proportional-derivative lead PID controller receives the real-time PV and SV transmitted by S1, and calculates the control increment according to the following logic: a. based on the proportional-derivative lead structure, the PV is first differentiated to suppress high-frequency noise; b. the proportional term, integral term and derivative term are calculated according to the current PID parameters (initial parameters or updated parameters confirmed by S6); c. the incremental algorithm is used to output the control increment ΔMV, ensuring smooth change of the control variable.

[0147] ⑥The safety protection module receives the PID parameter recommended values output by S4 and the control increment ΔMV output by S5, and performs double constraint verification: parameter constraint, to determine whether the recommended parameters are within the preset safety range, and if the range is exceeded, the parameters are automatically truncated to the boundary value; control increment constraint, the final control variable after MV change rate overrun protection, PV boundary early warning protection and MV hard limiting protection is sent to the actuator, and the effective PID parameters are fed back to the real-time database of S1 for recording.

[0148] In summary, in view of the poor adaptability and difficulty in global optimization of the related technical rule-based intelligent tuning method, the embodiments of the present application can:

[0149] ①Independent of the precise mathematical model of the controlled object, the optimal control strategy is learned autonomously through data-driven manner.

[0150] ②Online and automatically adjust the PID controller parameters to adapt to the changes in dynamic characteristics of the controlled object and external disturbances.

[0151] ③By optimizing the long-term cumulative reward, the global performance optimization beyond local and instantaneous optimization is realized, such as considering response speed, overshoot, steady-state error and control smoothness.

[0152] ④Reduce the dependence on the expert experience of control engineers, and improve the automation level and intelligent degree of the control system.

[0153] ⑤Real-time monitoring of loop operation, timely and timely adjustment of the best PID parameters suitable for the current working condition.

[0154] ⑥The PID algorithm is embedded with more perfect multiple safety protection logic, so that the algorithm can be safely operated in the actual field.

[0155] Figure 8 The structure of a parameter setting device according to an embodiment of the present application is shown in FIG. Figure 8 The device comprises:

[0156] The acquisition module 802 is configured to acquire running state data of the controlled object in the control loop, wherein the control loop comprises a proportional-integral-derivative (PID) controller for controlling the controlled object, and the running state data comprises a process variable for describing the state of the controlled object and a manipulated variable for changing the state of the controlled object by the PID controller.

[0157] The determination module 804 is configured to determine a parameter adjustment state corresponding to the running state data according to a preset condition, wherein the preset condition comprises a rule set for determining a parameter adjustment opportunity based on the process variable and the manipulated variable, and the parameter adjustment state is used to indicate whether to adjust the parameters of the PID controller.

[0158] The adjustment module 806 is configured to generate a target parameter corresponding to the current working condition of the controlled object according to the running state data in the case that the parameter adjustment state indicates to adjust the parameters, wherein the target parameter is used to update the parameters of the PID controller.

[0159] It should be noted that Figure 8 The parameter setting device shown in FIG. Figure 2 The parameter setting method shown in FIG. Figure 2 The related explanations and descriptions in the parameter setting method in Figure 8 The parameter setting device shown in FIG. are also applicable to the parameter setting device shown in FIG. Here, no further description is given.

[0160] The embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory is used to store program instructions; the processor is connected with the memory and used to execute the steps of the method for parameter setting in the embodiments of the present application.

[0161] The embodiment of the present application further provides a nonvolatile storage medium, comprising a stored computer program, wherein a device where the nonvolatile storage medium is located executes the steps of the method for parameter setting in the embodiments of the present application by running the computer program.

[0162] The embodiment of the present application further provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the method for parameter setting in the embodiments of the present application.

[0163] The embodiment of the present application further provides a computer program, which, when executed by a processor, implements the steps of the method for parameter setting in the embodiments of the present application.

[0164] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0165] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0166] In the several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the unit embodiment described above is only schematic. For example, the division of the units can be a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection between the units can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.

[0167] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0168] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0169] When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such an understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various other media that can store program codes.

[0170] The above description is only the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be regarded as the protection scope of the present application.

Claims

1. A method for parameter tuning, characterized in that, include: Acquire the operating status data of the controlled object in the control loop, wherein the control loop includes a proportional-integral-derivative (PID) controller for controlling the controlled object, and the operating status data includes process variables for describing the state of the controlled object and manipulation variables for the PID controller to change the state of the controlled object; The parameter tuning state corresponding to the operating status data is determined based on preset conditions, wherein the preset conditions include a set of rules for determining the timing of parameter tuning based on the state of the process variable and the manipulated variable, and the parameter tuning state is used to indicate whether the parameters of the PID controller should be adjusted. When the parameter adjustment status indicates that the parameter is being adjusted, a target parameter corresponding to the current operating condition of the controlled object is generated based on the operating status data, wherein the target parameter is used to update the parameters of the PID controller.

2. The method according to claim 1, characterized in that, The method further includes: The target parameter is compared with a preset parameter range; If the target parameter is not within the range of the preset parameters, the target parameter is truncated to obtain an updated parameter, wherein the updated parameter is at the boundary value of the range of the preset parameters; The parameters of the PID controller are updated using the target parameters, and the proportional, integral, and derivative terms corresponding to the operating state data are calculated using the updated PID controller. The updated PID controller determines the control increment based on the proportional term, the integral term, and the derivative term, wherein the control increment is used to adjust the state of the controlled object.

3. The method according to claim 2, characterized in that, After determining the control increment based on the proportional term, the integral term, and the derivative term using the updated PID controller, the method further includes: performing a safety check on the control increment to obtain a target control increment, wherein the safety check includes at least one of the following: exceeding the rate of change limit of the manipulated variable, limiting the process variable amplitude, and limiting the manipulated variable amplitude.

4. The method according to claim 1, characterized in that, Determining the parameter tuning state corresponding to the operating state data based on preset conditions includes: The process variable is compared with the preset process variable threshold in the preset conditions to obtain a first comparison result; The manipulated variable is compared with the preset manipulated variable threshold in the preset conditions to obtain a second comparison result; If the first comparison result indicates that the process variable exceeds the preset process variable threshold, and / or the second comparison result indicates that the manipulated variable exceeds the preset manipulated variable threshold, the parameter tuning state is determined to be a first parameter tuning state, wherein the first parameter tuning state is to adjust the parameters of the PID controller.

5. The method according to claim 4, characterized in that, The method further includes: Determine whether the process variable is in a tracking state of the set value of the controlled object, wherein the set value is used to reflect the expected output of the controlled object; If the process variable is not in the tracking state, the parameter tuning state is determined to be the second parameter tuning state, wherein the second parameter tuning state is that the parameters of the PID controller are not adjusted; When the process variable is in the tracking state, the parameter tuning state is determined based on the stable state of the process variable and the operating range of the manipulated variable.

6. The method according to claim 5, characterized in that, Determining the parameter tuning state based on the stable state of the process variable and the operating range of the manipulated variable includes: Determine whether the process variable remains within a preset error band within a preset time period, wherein the preset error band is used to reflect the allowable error range of the controlled object; Determine whether the manipulated variable remains within a preset operating range within the preset time period, wherein the preset operating range is used to reflect the operating limits of the manipulated variable; If, within the preset time period, the process variable is not continuously within the preset error band, and / or the manipulated variable is not continuously within the preset operating range, the parameter tuning state is determined to be the first parameter tuning state.

7. The method according to claim 1, characterized in that, Based on the operational status data, target parameters corresponding to the current operating condition of the controlled object are generated, including: Extract state feature vectors from the operating state data, wherein the state feature vectors are used to characterize the control performance state of the control loop; An intelligent agent generates an execution action based on the state feature vector, wherein the execution action includes the adjustment amount of the parameters of the PID controller; The target parameters are determined based on the action.

8. The method according to claim 7, characterized in that, After extracting the state feature vector from the operational state data, the method further includes: A first reward value is determined based on the state feature vector, wherein the first reward value is used to quantify the degree of influence of the agent's current action on the immediate control target; A second reward value is determined based on the state feature vector, wherein the second reward value is used to quantify the degree of improvement of the agent's control strategy relative to historical performance; A target reward value is determined that corresponds to both the first reward value and the second reward value, wherein the target reward value is used to update the agent's policy network.

9. The method according to claim 3, characterized in that, The control increment is subjected to security detection to obtain the target control increment, including: Determine the cumulative change of the manipulated variable within a preset sliding window; The cumulative rate of change is compared with the corresponding first upper limit threshold and first lower limit threshold respectively; If the cumulative change is greater than the first upper limit threshold and / or the cumulative change is less than the first lower limit threshold, an over-limit callback is performed on the control increment to obtain a first target control increment, wherein the over-limit callback is used to reverse the adjustment direction of the control increment; If the cumulative change is not greater than the first upper limit threshold and / or the cumulative change is not less than the first lower limit threshold, process variable limiting detection is performed on the control increment.

10. The method according to claim 9, characterized in that, Perform process variable limit detection on the control increment, including: The process variable is compared with the corresponding second upper limit threshold and second lower limit threshold; If the first distance between the process variable and the second upper limit threshold is less than the first preset distance, and / or the second distance between the process variable and the second lower limit threshold is less than the second preset distance, the control increment is corrected to obtain the second target control increment; If the first distance is not less than the first preset distance and / or the second distance is not less than the second preset distance, the control increment is subjected to manipulation variable limiting detection.

11. The method according to claim 10, characterized in that, Performing manipulation variable limit detection on the control increment includes: The target manipulated variable is obtained by adding the manipulated variable to the control increment. The target manipulated variable is compared with the corresponding third upper threshold and third lower threshold. If the target manipulated variable is greater than the third upper limit threshold and / or the target manipulated variable is less than the third lower limit threshold, the control increment is corrected to obtain the third target control increment; If the target manipulated variable is not greater than the third upper limit threshold and / or the target manipulated variable is not less than the third lower limit threshold, the control increment is determined as the target control increment.

12. A parameter tuning device, characterized in that, include: The acquisition module is used to acquire the operating status data of the controlled object in the control loop, wherein the control loop includes a proportional-integral-derivative (PID) controller for controlling the controlled object, and the operating status data includes process variables for describing the state of the controlled object and manipulation variables for the PID controller to change the state of the controlled object. The determination module is used to determine the parameter adjustment state corresponding to the operating state data based on preset conditions. The preset conditions include a set of rules for determining the timing of parameter adjustment based on the state of the process variable and the manipulated variable. The parameter adjustment state is used to indicate whether the parameters of the PID controller should be adjusted. The adjustment module is used to generate target parameters corresponding to the current operating condition of the controlled object based on the operating status data when the parameter adjustment status indicates that the parameters are being adjusted. The target parameters are used to update the parameters of the PID controller.

13. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store program instructions; the processor being connected to the memory and used to execute the parameter tuning method according to any one of claims 1 to 11.

14. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored computer program, wherein the device containing the non-volatile storage medium executes the parameter tuning method according to any one of claims 1 to 11 by running the computer program.

15. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the parameter tuning method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Progressive setting method for PID parameters

    CN110850709A

  • PID parameter setting method based on step response characteristic data of controlled object

    CN112286043A

  • Non-overshoot PID controller parameter setting method based on reinforcement learning

    CN113093526A

  • Range extender generation power control method and device, electronic equipment and storage medium

    CN115923762A

  • PID controller parameter setting method and device, electronic equipment and storage medium

    CN117075466A