Controller and control method
By adding a first differential control unit to the PID control unit and controlling the control output using the set value change amount, the stability problem of the traditional PID controller in the hysteresis loop or high control requirements scenarios is solved, and higher control stability and response speed are achieved.
Patent Information
- Application Number
- CN202411973825.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-03-28
AI Technical Summary
When traditional PID controllers deal with lag loops or circuits with high control requirements, they have poor stability and are difficult to effectively adapt to these complex control scenarios.
On the basis of the PID control unit, the first differential control unit is added, and the control output is controlled based on the change amount of the set value to improve control stability.
By adding the first differential control unit, the stability and response speed of the controller when facing the change of the set value are improved, and it can more effectively adapt to control scenarios with large hysteresis or high control requirements.
Smart Images

Figure CN119717492A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic control technology, and in particular to a controller and a control method. Background Art
[0002] PID (Proportional Integral Derivative) control is a common automatic control method widely used in industrial control systems. The PID controller achieves stable and precise control based on the difference between the measured value and the set value of the controlled object. The proportional, integral and differential parameter variables of the PID controller are continuously adjusted according to the deviation signal to make the output of the controlled object as close to the set value as possible. PID controllers are widely used in various industrial processes, such as temperature control, flow control, speed control, etc., to improve the efficiency and quality of industrial production.
[0003] Traditional PID controllers can be effectively applied in most automatic controls, but for hysteresis loops or loops with high control requirements, the stability of traditional PID controllers is poor. Summary of the invention
[0004] In view of the above problems, the present application provides a controller and a control method, which adds a first differential control unit on the basis of the PID control unit, and uses the first differential control unit to adjust the control output based on the change of the set value to improve the control stability. The specific scheme is as follows:
[0005] A first aspect of the present application provides a controller, comprising a PID control unit, a first proportional control unit, and a first fusion calculation unit, wherein an output end of the PID control unit and an output end of the first proportional control unit are both connected to an input end of the first fusion calculation unit;
[0006] The first proportional control unit is used to calculate the first control amount of the current sampling period of the controlled object based on the set value difference of the current sampling period and the variable value of the first proportional gain, wherein the set value difference is the difference between the set value of the current sampling period and the set value of the first historical sampling period, and the first historical sampling period is the sampling period before the current sampling period;
[0007] The PID control unit is used to calculate the second control amount of the current sampling period of the controlled object based on the deviation parameter of the current sampling period, the variable value of the second proportional gain, the variable value of the integral time, and the variable value of the differential time, and output the second control amount to the first fusion calculation unit, the deviation parameter at least includes a deviation value, and the deviation value of the current sampling period is the difference between the set value and the measured value of the current sampling period;
[0008] The first fusion calculation unit is used to calculate the difference between the second control amount of the current sampling period and the first control amount as the control output increment of the current sampling period.
[0009] In a possible implementation, the first proportion control unit includes a setting difference calculation unit and a first proportion adjustment unit connected in sequence;
[0010] The input data of the setting difference calculation unit is the setting value of each sampling period, and the setting difference calculation unit is used to: calculate the difference between the setting value of the current sampling period and the setting value of the first historical sampling period, obtain the setting value difference of the current sampling period, and output the setting value difference of the current sampling period to the first proportional adjustment unit;
[0011] The first proportional adjustment unit is used to calculate the product of the variable value of the first proportional gain and the set value difference of the current sampling period to obtain the first control amount of the current sampling period, and output the first control amount of the current sampling period to the first fusion calculation unit.
[0012] In a possible implementation, the PID control unit includes: a deviation parameter monitoring unit, a second proportional adjustment unit, a differential adjustment unit, an integral adjustment unit, and a second fusion calculation unit; the deviation parameter also includes a measurement difference and a measurement difference change;
[0013] The output end of the deviation parameter monitoring unit is connected to the input ends of the second proportional adjustment unit, the differential adjustment unit and the integral adjustment unit respectively, and the output ends of the second proportional adjustment unit, the differential adjustment unit and the integral adjustment unit are connected to the input end of the second fusion calculation unit;
[0014] The input data of the deviation parameter monitoring unit includes the measured value and the set value of each sampling period;
[0015] The deviation parameter monitoring unit is used for:
[0016] Calculating the difference between the measured value and the set value of the current sampling period to obtain a deviation value of the current sampling period, and inputting the deviation value of the current sampling period into the integral adjustment unit;
[0017] Calculate the difference between the measurement value of the current sampling period and the measurement value of the first historical sampling period to obtain the measurement difference of the current sampling period, and input the measurement difference of the current sampling period to the second proportional adjustment unit;
[0018] Calculate the difference between the measurement difference of the current sampling period and the measurement difference of the first historical sampling period to obtain the measurement difference change of the current sampling period, and input the measurement difference change of the current sampling period to the differential adjustment unit;
[0019] The second proportional adjustment unit is used to calculate the second proportional adjustment amount of the current sampling period based on the measurement difference of the current sampling period and the variable value of the second proportional gain, and input the second proportional adjustment amount of the current sampling period to the second fusion calculation unit;
[0020] The differential adjustment unit is used to calculate the differential adjustment amount of the current sampling period based on the measurement difference change amount of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the differential time, and input the differential adjustment amount of the current sampling period to the second fusion calculation unit;
[0021] The integral adjustment unit is used to calculate the integral adjustment amount of the current sampling period based on the deviation value of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the integral time, and input the integral adjustment amount of the current sampling period to the second fusion calculation unit;
[0022] The second fusion calculation unit is used to calculate the sum of the second proportional adjustment amount, the differential adjustment amount and the integral adjustment amount of the current sampling period, obtain the second control amount of the current sampling period, and output the second control amount of the current sampling period to the first fusion calculation unit.
[0023] In a possible implementation, the deviation parameter monitoring unit includes: a deviation calculation unit and a measurement difference calculation unit;
[0024] The output end of the deviation calculation unit is connected to the input end of the integral adjustment unit, and the deviation calculation unit is used to receive the measured value and the set value of each sampling period, calculate the difference between the measured value and the set value of the current sampling period, obtain the deviation value of the current sampling period, and input the deviation value of the current sampling period into the integral adjustment unit;
[0025] The output end of the measurement difference calculation unit is connected to the input end of the second proportional adjustment unit and the input end of the differential adjustment unit respectively, and the measurement difference calculation unit is used for:
[0026] Receiving the measurement values of each sampling period, calculating the difference between the measurement value of the current sampling period and the measurement value of the first historical sampling period, obtaining the measurement difference of the current sampling period, and inputting the measurement difference of the current sampling period into the second proportional adjustment unit;
[0027] Receive the measurement values of each sampling period, calculate the difference between the measurement difference of the current sampling period and the measurement difference of the first historical sampling period, obtain the measurement difference change of the current sampling period, and input the measurement difference change of the current sampling period to the differential adjustment unit.
[0028] In a possible implementation, the differential adjustment unit is used to calculate the differential adjustment amount of the current sampling period based on the measured difference change of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period, and the variable value of the differential time, specifically for:
[0029] Calculating a ratio of a variable value of the second proportional gain to a variable value of the differential time as a differential coefficient;
[0030] Calculate the product of the measurement difference change of the current sampling period and the differential coefficient as a unit differential adjustment item;
[0031] The product of the duration of the sampling period and the unit differential adjustment item is calculated to obtain the differential adjustment amount of the current sampling period.
[0032] In a possible implementation, the integral adjustment unit is used to calculate the integral adjustment amount of the current sampling period based on the deviation value of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period, and the variable value of the integral time, and is specifically used to:
[0033] Calculating a ratio of a variable value of the second proportional gain to a variable value of the integral time as an integral coefficient;
[0034] Calculate the product of the deviation value of the current sampling period and the integral coefficient as a unit integral adjustment item;
[0035] The product of the duration of the sampling period and the unit integral adjustment item is calculated to obtain the integral adjustment amount of the current sampling period.
[0036] A second aspect of the present application provides a control method, comprising:
[0037] Based on the set value difference of the current sampling period and the variable value of the first proportional gain, a first control amount of the controlled object in the current sampling period is calculated, wherein the set value difference is the difference between the set value of the current sampling period and the set value of the first historical sampling period, and the first historical sampling period is a sampling period before the current sampling period;
[0038] Calculate the second control amount of the current sampling period of the controlled object based on the deviation parameter of the current sampling period, the variable value of the second proportional gain, the variable value of the integral time, and the variable value of the differential time, wherein the deviation parameter at least includes a deviation value, and the deviation value of the current sampling period is the difference between the set value and the measured value of the current sampling period;
[0039] A difference between the second control amount and the first control amount in the current sampling period is calculated as a control output increment in the current sampling period.
[0040] In a possible implementation, calculating the first control amount of the controlled object in the current sampling period based on the set value difference in the current sampling period and the variable value of the first proportional gain includes:
[0041] Calculating the difference between the set value of the current sampling period and the set value of the first historical sampling period to obtain the set value difference of the current sampling period;
[0042] The product of the variable value of the first proportional gain and the set value difference of the current sampling period is calculated to obtain the first control amount of the current sampling period.
[0043] In a possible implementation, calculating the second control amount of the current sampling period of the controlled object based on the deviation parameter of the current sampling period, the variable value of the second proportional gain, the variable value of the integral time, and the variable value of the differential time includes:
[0044] Calculate the difference between the measured value and the set value of the current sampling period to obtain the deviation value of the current sampling period;
[0045] Calculate the difference between the measurement value of the current sampling period and the measurement value of the first historical sampling period to obtain the measurement difference of the current sampling period;
[0046] Calculate the difference between the measurement difference of the current sampling period and the measurement difference of the first historical sampling period to obtain the measurement difference change of the current sampling period;
[0047] Calculating a second proportional adjustment amount of the current sampling period based on the measured difference value of the current sampling period and the variable value of the second proportional gain;
[0048] Calculate the differential adjustment amount of the current sampling period based on the measured difference change amount of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the differential time;
[0049] Calculating the integral adjustment amount of the current sampling period based on the deviation value of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the integral time;
[0050] The sum of the second proportional adjustment amount, the differential adjustment amount and the integral adjustment amount of the current sampling period is calculated to obtain the second control amount of the current sampling period.
[0051] In a possible implementation, calculating the differential adjustment amount of the current sampling period based on the measured difference change amount of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period, and the variable value of the differential time includes:
[0052] Calculate the ratio of the variable value of the second proportional gain and the variable value of the differential time as the differential coefficient; calculate the product of the measured difference change of the current sampling period and the differential coefficient as the unit differential adjustment item; calculate the product of the duration of the sampling period and the unit differential adjustment item to obtain the differential adjustment amount of the current sampling period;
[0053] The step of calculating the integral adjustment amount of the current sampling period based on the deviation value of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period, and the variable value of the integral time comprises:
[0054] Calculate the ratio of the variable value of the second proportional gain and the variable value of the integral time as the integral coefficient; calculate the product of the deviation value of the current sampling period and the integral coefficient as the unit integral adjustment item; calculate the product of the duration of the sampling period and the unit integral adjustment item to obtain the integral adjustment amount of the current sampling period.
[0055] By means of the above technical scheme, the present application provides a controller and a control method, comprising a PID control unit, a first proportional control unit, and a first fusion calculation unit, wherein the output end of the PID control unit and the output end of the first proportional control unit are both connected to the input end of the first fusion calculation unit; the first proportional control unit is used to calculate the first control amount of the current sampling period of the controlled object based on the set value difference of the current sampling period and the variable value of the first proportional gain, wherein the set value difference is the difference between the set value of the current sampling period and the set value of the first historical sampling period, and the first historical sampling period is the sampling period before the current sampling period; the PID control unit is used to calculate the second control amount of the current sampling period of the controlled object based on the deviation parameter of the current sampling period, the variable value of the second proportional gain, the variable value of the integral time, and the variable value of the differential time, and output the second control amount to the first fusion calculation unit, wherein the deviation parameter at least includes the deviation value, and the deviation value of the current sampling period is the difference between the set value of the current sampling period and the measured value; the first fusion calculation unit is used to calculate the difference between the second control amount of the current sampling period and the first control amount as the control output increment of the current sampling period. It can be seen that this solution adds a first proportional control unit on the basis of the PID control unit, and improves the influence of the set value difference on the output result in the variable setting scenario through the first proportional gain, thereby improving the control stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0057] Figure 1 A schematic diagram of the structure of a controller provided in an embodiment of the present application;
[0058] Figure 2 A flow chart of a control method provided in an embodiment of the present application;
[0059] Figure 3 A schematic diagram of the structure of a first differential control unit provided in an embodiment of the present application;
[0060] Figure 4 A schematic diagram of the structure of a PID control unit provided in an embodiment of the present application;
[0061] Figure 5 A schematic diagram of a specific structure of a controller provided in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of a specific implementation flow of a control method provided in an embodiment of the present application;
[0063] Figure 7 A schematic diagram of a control effect before improvement provided in an embodiment of the present application;
[0064] Figure 8 A schematic diagram of an improved control effect provided in an embodiment of the present application;
[0065] Fig. 9 A schematic diagram of another improved control effect provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] Terminology explanation:
[0067] PID control: PID control is a feedback control method that monitors the output of the controlled object, compares the output with the expected value, and then adjusts the parameter variables according to the deviation signal to make the output closer to the expected value. The PID controller consists of three parts: proportional control, integral control and differential control;
[0068] Proportional Control: A proportional controller adjusts the output in a proportional relationship according to the size of the deviation. It will generate a control amount proportional to the deviation according to the size of the deviation signal, so that the output of the controlled object is close to the expected value.
[0069] Integral Control: The integral controller adjusts the output according to the accumulated amount of deviation. It generates a control amount based on the integral value of the deviation signal to eliminate the static deviation of the system and make the output track the set value more accurately.
[0070] Derivative Control: The derivative controller adjusts the output according to the rate of change of the deviation. It measures the rate of change of the deviation to predict the future deviation trend, so as to take control actions in advance, avoid overshoot or oscillation, and speed up the response of the system.
[0071] Proportional coefficient: used to adjust the linear relationship between the controller output signal and the deviation signal; increasing the proportional coefficient can speed up the response speed of the system.
[0072] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0073] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0074] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0075] The present application can be applied in the field of automatic control technology, and specifically can be applied to improving a PID controller and improving the stability of the controller in responding to changes in set values, thereby enabling the controller to adapt to control scenarios with large lags or high control requirements.
[0076] At present, the existing PID controller consists of a proportional unit (P), an integral unit (I) and a differential unit (D). The following introduces several traditional control algorithms of PID controllers:
[0077] (1) The calculation expression under the standard control algorithm of the PID controller is as follows:
[0078] ;
[0079] Among them, u(t) is the output of the PID regulator, e(t) is the PID input deviation, Kp is the proportional gain, Ti is the integral time, and Td is the differential time.
[0080] The standard control algorithm is mainly used in production processes with relatively long time constants and in the control of instantaneous response caused by changes in set values. Proportional, integral and differential control are implemented according to the changes in set values.
[0081] After discretizing and simplifying the calculation expression under the standard control algorithm, the incremental expression is as follows:
[0082] ;
[0083] In the formula: ΔMVn is the control output increment, Kp is the proportional gain, en is the deviation of the current sampling cycle (recorded as the nth sampling cycle), en-1 is the deviation of the n-1th sampling cycle, en-2 is the deviation of the n-2th sampling cycle, Ts is the length of the sampling cycle, Ti is the integration time, and Td is the differential time.
[0084] (2) The calculation expression of the proportional differential advance control algorithm of the PID controller is as follows:
[0085] ;
[0086] Where: pvn is the measurement value of the nth sampling period, pvn-1 is the measurement value of the n-1th sampling period, and pvn-2 is the measurement value of the n-2th sampling period.
[0087] The difference between the proportional differential advance control algorithm and the standard PID control algorithm is that the change of the set value does not affect the proportional and differential effects. Even if the set value changes suddenly, it will not cause a sharp change in the operating output. It is easy to obtain stable control characteristics. For changes in the characteristics of the controlled process, changes in the load and disturbances, the corresponding proportional, integral and differential control effects are executed to achieve better control effects.
[0088] (2) The calculation expression of the differential advance control algorithm of the PID controller is as follows:
[0089] ;
[0090] The differential advance control algorithm only performs proportional and integral control when the set value changes, without differential action. This algorithm is mainly used in situations where it is desired to have better tracking characteristics for the set value changes, such as the secondary loop of the cascade control loop.
[0091] In practical applications, different PDF control algorithms will be selected according to the actual situation on site. However, for hysteresis loops or loops with high control requirements, the existing PDF control algorithms cannot meet the on-site needs.
[0092] After research, it was found that there is only one proportional adjustment unit in the existing PDF controller. The PDF controller changes and adjusts with a proportional gain, and acts on proportional control, integral control, and differential control at the same time. The PID control algorithm based on a proportional gain has certain limitations when the set value changes, especially in dealing with some lag problems, and the control stability is poor.
[0093] Based on this, an embodiment of the present application provides a controller, which includes two proportional control units. By adding the proportional control unit, the proportional gain acting on the change value of the set value is increased, thereby improving the control stability of the controller in the scenario of set value changes.
[0094] Figure 1 A schematic diagram of the structure of a controller provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the controller 100 includes: a first proportional control unit 101 , a PID control unit 102 , and a first fusion calculation unit 103 .
[0095] In this embodiment, the output end of the PID control unit is connected to the output end of the first proportional control unit and the input end of the first fusion calculation unit respectively.
[0096] The output end of the first fusion calculation unit is connected to the controlled object as the output end of the controller, and the input end of the PID control unit is respectively connected to the measurement value output end and the set value output end, for receiving the measurement value and the set value according to the sampling period. The input end of the first proportional control unit is connected to the set value output end, for receiving the set value according to the sampling period.
[0097] It should be noted that the measurement value and the set value are output by the measuring device connected to the controlled object and the set value control device.
[0098] Figure 2 A flow chart of a control method provided in an embodiment of the present application, combined with Figure 2 The functions of each functional unit of the controller 100 are introduced as follows:
[0099] S201. The first proportional control unit calculates the first control amount of the controlled object in the current sampling period based on the set value difference of the current sampling period and the variable value of the first proportional gain, and outputs the first control amount to the first fusion calculation unit.
[0100] In this embodiment, the set value difference is the difference between the set value of the current sampling period and the set value of the first historical sampling period, and the first historical sampling period is a sampling period before the current sampling period.
[0101] Continuing with the above example, the calculation expression between the set value difference input by the first proportional control unit and the first control amount output is as follows:
[0102] ;
[0103] in, represents the first control quantity of the nth acquisition cycle, The variable value representing the first proportional gain, Indicates the set value difference of the nth acquisition cycle, Indicates the set value of the nth acquisition cycle, Indicates the set value of the n-1th collection cycle.
[0104] S202, the PID control unit calculates the second control quantity of the current sampling period of the controlled object based on the deviation parameter of the current sampling period, the variable value of the second proportional gain, the variable value of the integral time, and the variable value of the differential time, and outputs the second control quantity to the first fusion calculation unit.
[0105] In this embodiment, the PID control unit can calculate the second control quantity of the current sampling period of the controlled object based on the preset PID control algorithm based on the deviation parameter of the current sampling period, the variable value of the second proportional gain, the variable value of the integral time, and the variable value of the differential time.
[0106] In a possible implementation, the PID control algorithm is a proportional differential advance control algorithm, and the deviation parameter of the current sampling period includes the deviation value of the current sampling period, the measurement difference, and the measurement difference change.
[0107] Taking the current acquisition cycle as the nth acquisition cycle as an example, the deviation parameter includes the deviation value, the measured difference change and the measured difference. The deviation value of the current sampling cycle is the difference between the set value and the measured value of the current sampling cycle. The calculation expression between the second control quantity output by the PID control unit and the input deviation parameter is as follows:
[0108] ;
[0109] in, represents the second control quantity of the nth acquisition cycle, Indicates the measurement difference of the nth acquisition cycle, Indicates the change in the measured difference value of the nth acquisition cycle, Indicates the deviation value of the nth acquisition cycle, , Represents the second proportional gain.
[0110] S203. The first fusion calculation unit calculates the difference between the second control amount in the current sampling period and the first control amount, and outputs it as the control output increment of the current sampling period.
[0111] It can be seen from the above technical solution that a controller and a control method provided in an embodiment of the present application, by adding a first proportional control unit on the basis of the PID control unit, improves the influence of the set value difference on the output result in the variable setting scenario through the first proportional gain, thereby improving the control stability.
[0112] Figure 3 A schematic diagram of the structure of a first proportional control unit provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the first ratio control unit 300 includes a setting difference calculation unit 301 and a first ratio adjustment unit 302 which are connected in sequence.
[0113] In this embodiment, the input data of the setting difference calculation unit is the setting value of each sampling period, and the output data is the setting value difference.
[0114] In this embodiment, the input data of the first proportional adjustment unit is the set value difference, and the output data is the first control amount.
[0115] Figure 4 A schematic diagram of the structure of a PID control unit provided in an embodiment of the present application is shown in FIG. Figure 4As shown, the PID control unit includes: a deviation parameter monitoring unit 400 , a second proportional adjustment unit 402 , a differential adjustment unit 403 , an integral adjustment unit 404 , and a second fusion calculation unit 405 .
[0116] In this embodiment, the output end of the deviation parameter monitoring unit is connected to the input end of the second proportional adjustment unit, the differential adjustment unit and the integral adjustment unit respectively, and the output end of the second proportional adjustment unit, the differential adjustment unit and the integral adjustment unit is connected to the input end of the second fusion calculation unit.
[0117] In this embodiment, the input data of the deviation parameter monitoring unit includes the measurement value and the set value of each sampling period. The output data of the deviation parameter monitoring unit is the measurement difference, the measurement difference change and the deviation value.
[0118] Specifically, the deviation parameter monitoring unit includes a measurement difference calculation unit 4011 and a deviation calculation unit 4012. The output end of the deviation calculation unit is connected to the input end of the integral adjustment unit, the input data is the measurement value and the set value of each sampling period, and the output data is the deviation value. The output end of the measurement difference calculation unit is respectively connected to the input end of the second proportional adjustment unit and the input end of the differential adjustment unit, the input data is the measurement value of each sampling period, and the output data is the measurement difference and the measurement difference change.
[0119] In this embodiment, the input data of the second proportional adjustment unit is the measurement difference, and the output data is the second proportional adjustment amount.
[0120] In this embodiment, the input data of the integral adjustment unit is the deviation value, and the output data is the integral adjustment amount.
[0121] In this embodiment, the input data of the differential adjustment unit is the measurement difference change, and the output data is the differential adjustment amount.
[0122] In this embodiment, the input data of the second fusion calculation unit is the second proportional adjustment amount, the integral adjustment amount, and the differential adjustment amount, and the output data is the second control amount.
[0123] Figure 5 A specific structural diagram of a controller provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the controller includes: a measurement difference calculation unit, a deviation calculation unit, a setting difference calculation unit, a first proportional adjustment unit, an integral adjustment unit, a differential adjustment unit, a second proportional adjustment unit, a first fusion calculation unit, and a second fusion calculation unit.
[0124] Among them, the output end of the measurement difference calculation unit is connected to the input end of the second proportional adjustment unit and the differential adjustment unit respectively, the output end of the deviation calculation unit is connected to the input end of the integral adjustment unit, the output ends of the integral adjustment unit, the second proportional adjustment unit and the differential adjustment unit are connected to the input end of the second fusion calculation unit, the output end of the second fusion calculation unit and the output end of the first proportional adjustment unit are connected to the input end of the first fusion calculation unit, and the output end of the first fusion calculation unit is the output end of the controller.
[0125] based on Figure 5 The controller shown in the embodiment of the present application provides a specific implementation method of the control method. Figure 6 A specific implementation flow chart of a control method provided in the application embodiment, such as Figure 6 As shown, this method specifically includes:
[0126] S601. A setting difference calculation unit calculates a difference between a setting value of a current sampling cycle and a setting value of a first historical sampling cycle to obtain a setting value difference of the current sampling cycle, and outputs the setting value difference of the current sampling cycle to a first proportional adjustment unit.
[0127] S602, the first proportional adjustment unit calculates the product of the variable value of the first proportional gain and the set value difference of the current sampling period to obtain the first control amount of the current sampling period, and outputs the first control amount of the current sampling period to the first fusion calculation unit.
[0128] S603: The measurement difference calculation unit calculates the difference between the measurement value of the current sampling period and the measurement value of the first historical sampling period to obtain the measurement difference of the current sampling period, and inputs the measurement difference of the current sampling period to the second proportional adjustment unit.
[0129] S604. The second proportional adjustment unit calculates the second proportional adjustment amount of the current sampling period based on the measured difference value of the current sampling period and the variable value of the second proportional gain, and inputs the second proportional adjustment amount of the current sampling period to the second fusion calculation unit.
[0130] S605 , the deviation calculation unit calculates the difference between the measured value and the set value of the current sampling period to obtain the deviation value of the current sampling period, and inputs the deviation value of the current sampling period to the integral adjustment unit.
[0131] S606. The integral adjustment unit calculates the integral adjustment amount of the current sampling period based on the deviation value of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the integral time, and inputs the integral adjustment amount of the current sampling period into the second fusion calculation unit.
[0132] Specifically, the integral adjustment unit calculates the ratio of the variable value of the second proportional gain to the variable value of the integral time as the integral coefficient. The product of the deviation value of the current sampling period and the integral coefficient is calculated as the unit integral adjustment item. The product of the duration of the sampling period and the unit integral adjustment item is calculated to obtain the integral adjustment amount of the current sampling period.
[0133] S607. The measurement difference calculation unit calculates the difference between the measurement difference of the current sampling period and the measurement difference of the first historical sampling period to obtain the measurement difference change of the current sampling period, and inputs the measurement difference change of the current sampling period to the differential adjustment unit.
[0134] S608. The differential adjustment unit calculates the differential adjustment amount of the current sampling period based on the measured difference change of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the differential time, and inputs the differential adjustment amount of the current sampling period into the second fusion calculation unit.
[0135] Specifically, the differential adjustment unit calculates the ratio of the variable value of the second proportional gain to the variable value of the differential time as the differential coefficient. The product of the measured difference change in the current sampling period and the differential coefficient is calculated as the unit differential adjustment item. The product of the duration of the sampling period and the unit differential adjustment item is calculated to obtain the differential adjustment amount of the current sampling period.
[0136] S609, the second fusion calculation unit calculates the sum of the second proportional adjustment amount, the differential adjustment amount and the integral adjustment amount of the current sampling period, obtains the second control amount of the current sampling period, and outputs the second control amount of the current sampling period to the first fusion calculation unit.
[0137] S610. The first fusion calculation unit calculates the difference between the second control amount and the first control amount in the current sampling period as the control output increment of the current sampling period.
[0138] Specifically, taking the current sampling period as the nth sampling period as an example, an algorithm expression of a control method provided in an embodiment of the present application is:
[0139] ;
[0140] Where: ΔMVn is the control output increment of the nth sampling period. Kp1 is the variable value of the first proportional gain. Kp2 is the variable value of the second proportional gain. Ti is the variable value of the integral time. The output of the integral action is proportional to the integral of the deviation. As long as the deviation exists, the output of the controller will continue to change until the deviation is eliminated. There is no residual error at the end of the transition process. Td is the variable value of the differential time, which reflects the speed of change of the deviation and has a leading control effect.
[0141] In a possible implementation, a dynamic characteristic parameter method (response curve method) is used to determine the variable value of each variable parameter, and the variable parameters include a second proportional gain, a first proportional gain, an integral time, and a differential time.
[0142] Specifically, the dynamic characteristic parameter method is a method of approximate calculation based on the open-loop generalized process step response characteristics of the system, that is, the dynamic characteristic parameters (K, T, τ, etc.) of the system are measured according to the step response curve of the object characteristics, and the relevant parameters of the regulator corresponding to the attenuation rate of 4:1 can be calculated using empirical formulas.
[0143] The open loop step response is as follows: .
[0144] The formula for calculating the proportional gain is as follows:
[0145] ;
[0146] Where K is the proportional gain, τ is the lag time, T is the time constant, y is the measured value, and p is the output value.
[0147] Specifically, the theoretical settings of the variable parameters are: Kp=0.85Kτ / T, Ti=2τ, Td=0.5τ.
[0148] In this embodiment, the following setting formulas for parameter variables are obtained by empirical method:
[0149] Kp1=a*Kp, Kp2=b*Kp, where coefficient a=0.7~0.9, coefficient b=0.3~0.5.
[0150] Ti=c*τ, where coefficient c=2~5.
[0151] Td=d*τ, where the coefficient d=0~0.5.
[0152] In summary, the control method provided in the embodiment of the present application can calculate the control output increment based on the feedback deviation parameter by controlling the various parameter variables of the first proportional adjustment unit, the integral adjustment unit, the differential adjustment unit and the second proportional adjustment unit. Specifically, the present embodiment adjusts the parameter variables Kp1, Kp2, Ti, and Td through the above-mentioned dynamic characteristic parameter method, so as to achieve the purpose of stability control of the control output increment.
[0153] Specifically, the PID control unit obtains the second control quantity through the proportional differential control algorithm, and avoids the sudden change of the output caused by the sudden change of the set value by adjusting the second proportional gain Kp2, the integral time Ti, and the differential time Td, so as to obtain a stable control characteristic, and achieve a better control effect for the change of the characteristics of the controlled process, the change of the load and the disturbance. By adjusting the first proportional gain Kp1 of the newly added first proportional control unit, adding the influence of the change of the set value on the system, the first control quantity is obtained, and the output result is obtained by subtracting the first control quantity from the second control quantity, the optimal state of PID regulation can be achieved, thereby well solving the problem of poor system stability caused by the large lag in the automatic control process of the controlled object, and achieving safe and stable operation.
[0154] In this embodiment, the hydrogen concentration adjustment of a certain ring tube polypropylene is taken as a specific control scenario to introduce the specific implementation method and control effect of the controller and control method provided in the embodiment of the present application.
[0155] According to the characteristics of a certain loop polypropylene process, the hydrogen concentration control loop model structure is designed, as shown in Table 1. In the table, the input variables include the operating variables, and the output variables are the corresponding controlled variables; the "+\-" in the table indicates the direction of action, "+" indicates that the input variable has a positive effect on the output variable, and "-" indicates a negative effect.
[0156] Table 1 Structure of the loop polypropylene hydrogen control loop model
[0157]
[0158] On the basis of establishing the mathematical model of relevant input\output variables, it is necessary to determine reasonable parameter variables, as shown in Table 2.
[0159] Table 2 Parameter variable configuration table
[0160]
[0161] In order to demonstrate the advancement and reliability of the method of the present invention, Figure 7 , Figure 8 The real-time trend of the hydrogen concentration in one ring two days before and after the controller provided by the embodiment of the present application is respectively illustrated, that is, the real-time trend of the measured value pv. Among them, the horizontal axis is time, the vertical axis is the real-time value of pv, and the Figure 7 It can be seen that the hydrogen concentration in the first ring fluctuates greatly and is unstable before the controller is put into operation. Figure 8 It can be seen that after the controller is put into operation, the fluctuation of hydrogen concentration in one ring is small and the stability is high.
[0162] To ensure data accuracy, the same brand was selected for comparison and the set value was adjusted. Since the lag time was about 30 minutes, timely tracking was required to verify the advantages of this method. Fig. 9 When switching brands, the output is also a schematic diagram of the real-time PV value tracking effect.
[0163] Table 3 Comparison of hydrogen concentration in one ring
[0164]
[0165] From the above data comparison, it can be seen that when the hydrogen concentration is controlled before the present scheme is put into use, the maximum value of the two-day data is 1281.5ppm, the minimum value is 1130.75ppm, the average value is 1206.57ppm, and the standard deviation is 35.125ppm; after the present scheme is put into use, the maximum value is 1261.5ppm, the minimum value is 1234ppm, the average value is 1250.11ppm, and the standard deviation is 4.166ppm. Because the hydrogen concentration fluctuates greatly when the present invention is not put into use, the product quality cannot be accurately controlled. After the present invention is put into use, the brand switching is accurately and quickly controlled, so as to achieve the purpose of reducing transition materials and further increase the efficiency of the device.
[0166] In summary, the controller and control method provided by the embodiment of the present application improve the timeliness of control response, can effectively solve the large lag problem of the controlled object device, and can ensure the smooth operation and tracking of the controlled object device. Further, the overall automation level is improved, and even the start-stop process, load lifting, brand switching and other processes can be smoothly controlled, effectively ensuring the safe operation of the device, and the method is implemented on the host computer and can be extended to DCS applications.
Claims
1. A controller, characterized in that: It includes a PID control unit, a first proportional control unit, and a first fusion calculation unit, wherein the output end of the PID control unit and the output end of the first proportional control unit are both connected to the input end of the first fusion calculation unit; The first proportional control unit is used to calculate the first control amount of the current sampling period of the controlled object based on the set value difference of the current sampling period and the variable value of the first proportional gain, wherein the set value difference is the difference between the set value of the current sampling period and the set value of the first historical sampling period, and the first historical sampling period is the sampling period before the current sampling period; The PID control unit is used to calculate the second control amount of the current sampling period of the controlled object based on the deviation parameter of the current sampling period, the variable value of the second proportional gain, the variable value of the integral time, and the variable value of the differential time, and output the second control amount to the first fusion calculation unit, the deviation parameter at least includes a deviation value, and the deviation value of the current sampling period is the difference between the set value and the measured value of the current sampling period; The first fusion calculation unit is used to calculate the difference between the second control amount of the current sampling period and the first control amount as the control output increment of the current sampling period.
2. The controller according to claim 1, characterized in that: The first proportion control unit includes a setting difference calculation unit and a first proportion adjustment unit connected in sequence; The input data of the setting difference calculation unit is the setting value of each sampling period, and the setting difference calculation unit is used to: calculate the difference between the setting value of the current sampling period and the setting value of the first historical sampling period, obtain the setting value difference of the current sampling period, and output the setting value difference of the current sampling period to the first proportional adjustment unit; The first proportional adjustment unit is used to calculate the product of the variable value of the first proportional gain and the set value difference of the current sampling period to obtain the first control amount of the current sampling period, and output the first control amount of the current sampling period to the first fusion calculation unit.
3. The controller according to claim 1, characterized in that: The PID control unit includes: a deviation parameter monitoring unit, a second proportional adjustment unit, a differential adjustment unit, an integral adjustment unit, and a second fusion calculation unit; the deviation parameter also includes a measurement difference and a measurement difference change; The output end of the deviation parameter monitoring unit is connected to the input ends of the second proportional adjustment unit, the differential adjustment unit and the integral adjustment unit respectively, and the output ends of the second proportional adjustment unit, the differential adjustment unit and the integral adjustment unit are connected to the input end of the second fusion calculation unit; The input data of the deviation parameter monitoring unit includes the measured value and the set value of each sampling period; The deviation parameter monitoring unit is used for: Calculating the difference between the measured value and the set value of the current sampling period to obtain a deviation value of the current sampling period, and inputting the deviation value of the current sampling period into the integral adjustment unit; Calculate the difference between the measurement value of the current sampling period and the measurement value of the first historical sampling period to obtain the measurement difference of the current sampling period, and input the measurement difference of the current sampling period to the second proportional adjustment unit; Calculate the difference between the measurement difference of the current sampling period and the measurement difference of the first historical sampling period to obtain the measurement difference change of the current sampling period, and input the measurement difference change of the current sampling period to the differential adjustment unit; The second proportional adjustment unit is used to calculate the second proportional adjustment amount of the current sampling period based on the measurement difference of the current sampling period and the variable value of the second proportional gain, and input the second proportional adjustment amount of the current sampling period to the second fusion calculation unit; The differential adjustment unit is used to calculate the differential adjustment amount of the current sampling period based on the measurement difference change amount of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the differential time, and input the differential adjustment amount of the current sampling period to the second fusion calculation unit; The integral adjustment unit is used to calculate the integral adjustment amount of the current sampling period based on the deviation value of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the integral time, and input the integral adjustment amount of the current sampling period to the second fusion calculation unit; The second fusion calculation unit is used to calculate the sum of the second proportional adjustment amount, the differential adjustment amount and the integral adjustment amount of the current sampling period, obtain the second control amount of the current sampling period, and output the second control amount of the current sampling period to the first fusion calculation unit.
4. The controller according to claim 3, characterized in that: The deviation parameter monitoring unit includes: a deviation calculation unit and a measurement difference calculation unit; The output end of the deviation calculation unit is connected to the input end of the integral adjustment unit, and the deviation calculation unit is used to receive the measured value and the set value of each sampling period, calculate the difference between the measured value and the set value of the current sampling period, obtain the deviation value of the current sampling period, and input the deviation value of the current sampling period into the integral adjustment unit; The output end of the measurement difference calculation unit is connected to the input end of the second proportional adjustment unit and the input end of the differential adjustment unit respectively, and the measurement difference calculation unit is used for: Receiving the measurement values of each sampling period, calculating the difference between the measurement value of the current sampling period and the measurement value of the first historical sampling period, obtaining the measurement difference of the current sampling period, and inputting the measurement difference of the current sampling period into the second proportional adjustment unit; Receive the measurement values of each sampling period, calculate the difference between the measurement difference of the current sampling period and the measurement difference of the first historical sampling period, obtain the measurement difference change of the current sampling period, and input the measurement difference change of the current sampling period to the differential adjustment unit.
5. The controller according to claim 3, characterized in that: The differential adjustment unit is used to calculate the differential adjustment amount of the current sampling period based on the measured difference change amount of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the differential time, specifically for: Calculating a ratio of a variable value of the second proportional gain to a variable value of the differential time as a differential coefficient; Calculate the product of the measurement difference change of the current sampling period and the differential coefficient as a unit differential adjustment item; The product of the duration of the sampling period and the unit differential adjustment item is calculated to obtain the differential adjustment amount of the current sampling period.
6. The controller according to claim 3, characterized in that: The integral adjustment unit is used to calculate the integral adjustment amount of the current sampling period based on the deviation value of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the integral time, and is specifically used to: Calculating a ratio of a variable value of the second proportional gain to a variable value of the integral time as an integral coefficient; Calculate the product of the deviation value of the current sampling period and the integral coefficient as a unit integral adjustment item; The product of the duration of the sampling period and the unit integral adjustment item is calculated to obtain the integral adjustment amount of the current sampling period.
7. A control method, characterized in that: include: Based on the set value difference of the current sampling period and the variable value of the first proportional gain, a first control amount of the controlled object in the current sampling period is calculated, wherein the set value difference is the difference between the set value of the current sampling period and the set value of the first historical sampling period, and the first historical sampling period is a sampling period before the current sampling period; Calculate the second control amount of the current sampling period of the controlled object based on the deviation parameter of the current sampling period, the variable value of the second proportional gain, the variable value of the integral time, and the variable value of the differential time, wherein the deviation parameter at least includes a deviation value, and the deviation value of the current sampling period is the difference between the set value and the measured value of the current sampling period; A difference between the second control amount and the first control amount in the current sampling period is calculated as a control output increment in the current sampling period.
8. The control method according to claim 7, characterized in that: The step of calculating the first control amount of the current sampling period of the controlled object based on the set value difference of the current sampling period and the variable value of the first proportional gain includes: Calculating the difference between the set value of the current sampling period and the set value of the first historical sampling period to obtain the set value difference of the current sampling period; The product of the variable value of the first proportional gain and the set value difference of the current sampling period is calculated to obtain the first control amount of the current sampling period.
9. The control method according to claim 7, characterized in that: The step of calculating the second control amount of the current sampling period of the controlled object based on the deviation parameter of the current sampling period, the variable value of the second proportional gain, the variable value of the integral time, and the variable value of the differential time includes: Calculate the difference between the measured value and the set value of the current sampling period to obtain the deviation value of the current sampling period; Calculate the difference between the measurement value of the current sampling period and the measurement value of the first historical sampling period to obtain the measurement difference of the current sampling period; Calculate the difference between the measurement difference of the current sampling period and the measurement difference of the first historical sampling period to obtain the measurement difference change of the current sampling period; Calculating a second proportional adjustment amount of the current sampling period based on the measured difference value of the current sampling period and the variable value of the second proportional gain; Calculate the differential adjustment amount of the current sampling period based on the measured difference change amount of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the differential time; Calculating the integral adjustment amount of the current sampling period based on the deviation value of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period and the variable value of the integral time; The sum of the second proportional adjustment amount, the differential adjustment amount and the integral adjustment amount of the current sampling period is calculated to obtain the second control amount of the current sampling period.
10. The control method according to claim 9, characterized in that: The step of calculating the differential adjustment amount of the current sampling period based on the measured difference change amount of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period, and the variable value of the differential time includes: Calculate the ratio of the variable value of the second proportional gain and the variable value of the differential time as the differential coefficient; calculate the product of the measured difference change of the current sampling period and the differential coefficient as the unit differential adjustment item; calculate the product of the duration of the sampling period and the unit differential adjustment item to obtain the differential adjustment amount of the current sampling period; The step of calculating the integral adjustment amount of the current sampling period based on the deviation value of the current sampling period, the variable value of the second proportional gain, the duration of the sampling period, and the variable value of the integral time comprises: Calculate the ratio of the variable value of the second proportional gain and the variable value of the integral time as the integral coefficient; calculate the product of the deviation value of the current sampling period and the integral coefficient as the unit integral adjustment item; calculate the product of the duration of the sampling period and the unit integral adjustment item to obtain the integral adjustment amount of the current sampling period.