CN112859585A - Method for dynamically adjusting control period of PID controller - Google Patents
Method for dynamically adjusting control period of PID controller Download PDFInfo
- Publication number
- CN112859585A CN112859585A CN202110036171.XA CN202110036171A CN112859585A CN 112859585 A CN112859585 A CN 112859585A CN 202110036171 A CN202110036171 A CN 202110036171A CN 112859585 A CN112859585 A CN 112859585A
- Authority
- CN
- China
- Prior art keywords
- control
- period
- pid controller
- control period
- increment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 230000004044 response Effects 0.000 abstract description 7
- 230000001105 regulatory effect Effects 0.000 abstract description 3
- 230000008859 change Effects 0.000 description 8
- 239000007789 gas Substances 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 4
- 239000000571 coke Substances 0.000 description 4
- 238000004939 coking Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- VHUUQVKOLVNVRT-UHFFFAOYSA-N Ammonium hydroxide Chemical compound [NH4+].[OH-] VHUUQVKOLVNVRT-UHFFFAOYSA-N 0.000 description 1
- 235000011114 ammonium hydroxide Nutrition 0.000 description 1
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000003245 coal Substances 0.000 description 1
- 230000001276 controlling effect Effects 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 239000001301 oxygen Substances 0.000 description 1
- 229910052760 oxygen Inorganic materials 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 238000004886 process control Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B11/00—Automatic controllers
- G05B11/01—Automatic controllers electric
- G05B11/36—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
- G05B11/42—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential for obtaining a characteristic which is both proportional and time-dependent, e.g. P. I., P. I. D.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Feedback Control In General (AREA)
Abstract
The invention discloses a method for dynamically adjusting a control period of a PID controller, which specifically comprises the following steps: s1, updating the variable control period based on the preset steady-state cruise switch and the steady-state mark; s2, determining whether to calculate a second parameter and a control increment of the PID controller based on the comparison result of the first parameter and the variable control period, if the first parameter is larger than or equal to the variable control period, calculating the second parameter and the control increment of the PID controller, otherwise, not executing the step S3; s3, comparing the calculated second parameter of the PID controller with a preset threshold value, and updating a steady-state mark and outputting a control quantity of the accumulated control increment based on the comparison result; the invention gives consideration to both long-period control and quick response during disturbance, realizes automatic switching of a short control period and a long control period after output regulation in a steady state so as to quickly respond to disturbance and ensure that the output is not frequently regulated.
Description
Technical Field
The invention relates to the field of real-time control of industrial control systems, in particular to a method for dynamically adjusting a control period by a PID (proportion integration differentiation) controller.
Background
The basic idea of the PID algorithm is to calculate a proportional control increment by using a deviation change amount, calculate an integral increment by using a deviation amount, and calculate a differential control increment by using a change amount of the deviation change amount (i.e., a difference between a current deviation and a deviation at a previous calculation time, a difference between a deviation at a previous calculation time and a deviation at a previous calculation time, and a difference between the two differences, which is also referred to as a deviation change acceleration) at regular time intervals.
In some industrial processes, such as the control of a centrifugal fan, the control output should not be frequently operated, so that a PID controller sets a longer control period, but once disturbance causes process index fluctuation, timely response is expected. In the prior art, PID controllers are controlled by a fixed control period, and quick response to disturbance is difficult to realize in long-period control.
Disclosure of Invention
In order to solve the above problems, the present invention provides a method for dynamically adjusting a control period by a PID controller, which combines long-period control with fast response during disturbance, and improves the control quality of an industrial field.
The invention provides a method for dynamically adjusting a control period of a PID controller, which specifically comprises the following steps: s1, updating the variable control period based on the preset steady-state cruise switch and the steady-state mark; s2, determining whether to calculate a second parameter of the PID controller based on the comparison result of the first parameter and the variable control period, wherein the second parameter comprises a control increment, if the first parameter is greater than or equal to the variable control period, the second parameter of the PID controller is calculated, otherwise, the step S3 is not executed; and S3, comparing the calculated second parameter of the PID controller with a preset threshold value, and updating the steady-state flag and outputting the control quantity of the accumulated control increment based on the comparison result.
Further, step S1 specifically includes: and if the preset steady-state cruise switch is ON and the steady-state flag is ON, updating the variable control period to a system scanning period, otherwise, keeping the preset control period unchanged in the variable control period.
If the preset steady-state cruise switch is ON and the steady-state flag is ON, the PID controller starts the function of dynamically adjusting the control period and the system is in a steady state.
Furthermore, the system scanning period is smaller than the preset control period, and the preset control period is an integral multiple of the system scanning period.
The variable control period can realize quick response disturbance of a short control period in a steady state, and a long control period is adopted when the regulated output exists.
Further, the value of the first parameter in step S2 is the value of the period counter to accumulate the system scanning period
The period counter and the accumulation of the system scanning period are used for determining and carrying out the calculation of the second parameter of the PID controller.
Further, step S3 specifically includes: s31, if the control increment is smaller than a preset threshold value, judging that the system is in a stable state, setting a stable state flag to be ON, and keeping the output control quantity unchanged; and S32, if the control increment is larger than the preset threshold value, the steady state flag is set to be OFF, and if the system is judged not to be in a steady state, the control quantity accumulated control increment is output.
Further, step S32 includes limiting the control increment to the increment limiter if the control increment is greater than the preset threshold and exceeds the preset increment limiter.
Further, the second parameter further includes a difference between the measured value and the set value.
Further, step S3 specifically includes: s31’If the average difference value between the measured value and the set value is smaller than a first preset threshold value and the maximum difference value between the measured value and the set value is smaller than a second preset threshold value within the time period t, the system is judged to be in a stable state, the steady-state flag is set to be ON, and the output control quantity is unchanged; s32’Otherwise, the steady state flag is set to be OFF, the system is judged not to be in the steady state, and the control quantity accumulated control increment is output.
The invention has the beneficial effects that:
1. and dynamically setting the control period of the PID controller by detecting whether the control increment is smaller than a threshold value, so as to realize quick response to disturbance during long-period control.
2. The automatic switching of the short control period and the long control period after the output is regulated is realized in a steady state, so that the fluctuation of the process index is quickly responded, and the infrequent regulation of the output is also ensured.
3. A safety threshold is defined for the output, thereby ensuring the safety of the output.
Drawings
FIG. 1 is a flow chart of a method for dynamically adjusting a control period by a PID controller according to an embodiment of the invention;
fig. 2 is a flow chart of the software function implementation of the dynamic adjustment control period of the PID controller in the embodiment of the present invention.
Detailed Description
In order to facilitate a better understanding of the invention for those skilled in the art, the invention will be described in further detail with reference to the accompanying drawings and specific examples, which are given by way of illustration only and do not limit the scope of the invention.
To facilitate understanding of the present invention, some terms of art mentioned in the present invention will be described first.
The PID controller, a control algorithm widely used in industrial fields, obtains control increment by calculating the information such as deviation, deviation change speed, deviation change acceleration and the like between a measured value and a set value, thereby enabling the measured value to track the set value.
Deviation, difference of measured value and set value.
The control period, which is calculated by the PID controller set by the engineer, is an integral multiple of the system scanning period.
The variable control period, the PID controller control period of a dynamic change that this method proposes.
System scan period, the time interval of the algorithm logic of the periodic scan determined by the control system.
Steady state, refers to a state where the measured value meets the process requirements and remains close to or equal to the set value for a certain period of time.
And in the steady state, the PID controller adopts the running state with a shorter control period.
And the period counter is a counter accumulated in each system scanning period and is used for realizing that the PID controller operates according to the control period.
And (4) increasing the amplitude limit, wherein the control increment is positive, the control increment is required to be not larger than the amplitude limit, and when the control increment is negative, the control increment is required to be not smaller than 0 minus the amplitude limit.
As shown in fig. 1, a schematic flow chart of a method for dynamically adjusting a control period by a PID controller in an embodiment of the present invention specifically includes S1, updating a variable control period based on a preset steady-state cruise switch and a steady-state flag; s2, determining whether to calculate a second parameter of the PID controller based on the comparison result of the first parameter and the variable control period, wherein the second parameter comprises a control increment, if the first parameter is greater than or equal to the variable control period, the second parameter of the PID controller is calculated, otherwise, the step S3 is not executed; s4, repeating the steps S1-S3.
The method for dynamically adjusting the control period of the PID controller provided by the invention is explained by combining the control of a centrifugal fan in a coke oven gas collecting pipe system in the coking industry.
In a coke oven gas collecting pipe system in the coking industry, the pressure in front of a fan is one of important process control indexes. Too high pressure in front of the machine can cause too high pressure of the gas collecting pipe, cause crude gas leakage and violate the environmental protection requirement, and too low pressure in front of the machine can cause the content of oxygen in the crude gas to exceed the standard, and cause production accidents such as explosion and the like.
Most coke oven gas collecting pipe systems in the coking industry adopt a centrifugal fan, and a PID controller is adopted to control the front pressure of the machine by adjusting the rotating speed of the fan. The equipment characteristics of the centrifugal fan require that the rotating speed cannot be frequently adjusted, so the control period of the fan rotating speed PID controller is set to be longer. However, various disturbances can cause instantaneous and large-scale fluctuation of the pressure in front of the machine, for example, ammonia water injection during coal charging of a coke oven, and the like, and in order to suppress the pressure fluctuation in time, the process expects the quick response of the rotating speed of the fan, so the implementation adopts the following method to solve the problems.
And S1, if the operator or engineer sets the steady-state cruise switch to be ON, the function of the PID controller for dynamically adjusting the control period is started, and if the steady-state cruise switch is set to be OFF, the function of the PID controller for dynamically adjusting the control period is closed. The preset control period of the PID controller for controlling the rotating speed of the centrifugal fan is 20 seconds, and the variable control period is the preset control period which is 20 seconds;
and if the steady-state flag of the system during the first operation is set to be OFF, the system is not in a steady state, the variable control period is not changed at the moment, and the PID controller keeps the control period of 20s to control the centrifugal fan, so that the change of the wind speed of the centrifugal fan cannot fluctuate greatly.
If the steady-state flag is set to be ON in the subsequent operation process, the system is in a steady state, and the time of the class schedule control period is updated to be 0.5s, so that the disturbance can be responded in time.
S2, setting the initial value of the period counter to 0, and accumulating the period counter and the system scanning period as the first parameter. And comparing the accumulated period counter with the variable control period, and calculating a second parameter if the accumulated period counter is greater than or equal to the variable control period. In this embodiment, according to the PID control algorithm, proportional, integral, and differential control increments of PID are calculated, and the respective portions are accumulated to obtain a total control increment of the PID controller.
If the variable control period obtained in step S1 is 0.5S, the period counter must be equal to or greater than the variable control period, i.e., the system is in a steady state. The control increment of the PID controller is calculated once, and the period counter is also restored to be 0. In an embodiment of the present invention, the second parameter of the PID controller may also be a difference between the measured value and the set value.
If the variable control cycle of step S2 is 20S and the cycle counter is 0.5S, the cycle counter does not calculate the control increment of the PID controller, and the process is resumed from step S1.
And S3, comparing the control increment of the PID controller calculated in the step S2 with a preset threshold value.
In the embodiment of the present invention, the preset threshold is a certain proportion of the incremental amplitude limiting, and preferably, the preset threshold is 1% of the incremental amplitude limiting. And if the control increment is smaller than the preset threshold, updating the steady-state flag bit to be ON, keeping the system in a steady state, setting the control increment to be 0, keeping the output control quantity unchanged, and not modifying the control output.
And if the control increment is larger than the preset threshold, updating the steady-state flag bit OFF, and if the system is not in a steady state, outputting the control quantity which is the accumulation of the control quantity and the control increment.
In order to ensure the safety of the output, the control increment is limited in an upper limit mode, namely the control increment and the increment limiting are compared. And if the control increment is larger than the increment amplitude limit, taking the value of the increment amplitude limit as the control increment, and adding the control increment and the control quantity to be used as the control quantity.
S4, repeatedly executing S1-S3.
Fig. 2 is a flow chart of the software function implementation of the PID controller dynamically adjusting the control period according to the embodiment of the present invention. The method specifically comprises the following steps:
(1) and starting the PID controller to dynamically adjust the control period scanning.
(2) The variable control period is set equal to a preset control period.
(3) And setting the steady-state cruise cycle switch by an operator or an engineer, if the steady-state cruise switch is ON, turning to the 4 th step, judging whether the current is in a steady state, and otherwise, turning to the 6 th step.
(4) And if the steady state flag is ON, turning to the step 5, otherwise, turning to the step 6.
(5) The variable control period is set equal to the system scan period.
(6) The period counter and the system scanning period count up.
(7) And if the period counter is greater than or equal to the variable control period, turning to the step 8, otherwise, turning to the step 17.
(8) The cycle counter is cleared.
(9) And calculating PID proportion, integral and differential control increments according to a PID control algorithm, and accumulating to obtain a total control increment.
(10) And if the control increment is smaller than the preset threshold value, the step 11 is carried out, otherwise, the step 12 is carried out.
(11) And setting the steady state flag to be ON, namely the control increment is smaller than the preset threshold value, and considering that the system is in a steady state.
(12) If the control increment is greater than the threshold, i.e., there has been a significant adjustment output, the steady state flag is set to OFF, and the system is deemed not to be in steady state.
(13) If the control increment is less than a certain threshold, the control increment is set to 0, and the control output is not modified.
(14) If the calculated control increment is larger than the increment limiting, the step 15 is carried out, otherwise, the step 16 is carried out.
(15) The control increment is set not to exceed the increment limiter.
(16) The control amount is output by superimposing the calculated control increment.
(17) The above steps are repeatedly executed.
The foregoing merely illustrates the principles and preferred embodiments of the invention and many variations and modifications may be made by those skilled in the art in light of the foregoing description, which are within the scope of the invention.
Claims (10)
1. A method for dynamically adjusting a control period of a PID controller is characterized in that,
s1, updating the variable control period based on the preset steady-state cruise switch and the steady-state mark;
s2, determining whether to calculate a second parameter of the PID controller based on the comparison result of the first parameter and the variable control period, if the first parameter is larger than or equal to the variable control period, calculating the second parameter of the PID controller, otherwise, not executing the step S3;
and S3, comparing the calculated second parameter of the PID controller with a preset threshold value, and updating the steady-state flag and the output control quantity based on the comparison result.
2. The method for dynamically adjusting the control period by the PID controller according to claim 1, wherein the step S1 specifically includes: and if the preset steady-state cruise switch is ON and the steady-state flag is ON, updating the variable control period to a system scanning period, otherwise, keeping the preset control period unchanged in the variable control period.
3. The method of claim 2, wherein the system scan period is less than a predetermined control period, and the predetermined control period is an integer multiple of the system scan period.
4. The method for the PID controller to dynamically adjust the control period according to claim 1, wherein the value of the first parameter is the value of the period counter and the value of the system scan period in step S2.
5. The method for the PID controller to dynamically adjust the control period according to any one of claims 1-4, wherein the second parameter comprises a control increment.
6. The method for dynamically adjusting the control period by the PID controller according to claim 5, wherein the step S3 specifically includes: s31, if the control increment is smaller than a preset threshold value, judging that the system is in a stable state, setting a stable state flag to be ON, and keeping the output control quantity unchanged; and S32, if the control increment is larger than the preset threshold value, the steady state flag is set to be OFF, and if the system is judged not to be in a steady state, the control quantity accumulated control increment is output.
7. The method for the PID controller to dynamically adjust the control period according to claim 6, wherein the step S32 further comprises limiting the control increment to an increment limiter if the control increment is greater than a preset threshold and exceeds a preset increment limiter.
8. The method for the PID controller to dynamically adjust the control period according to any one of claims 1 to 4, wherein the second parameter includes a difference between a measured value and a set value and a control increment.
9. The method for dynamically adjusting the control period by the PID controller according to claim 8, wherein the step S3 specifically includes:
s31', if the average difference between the measured value and the set value is smaller than a first preset threshold value and the maximum difference between the measured value and the set value is smaller than a second preset threshold value in the time period t, the system is judged to be in a stable state, the steady state flag is set to be ON, and the output control quantity is unchanged;
and S32', otherwise, setting the steady state flag to OFF, judging that the system is not in a steady state, and outputting the control quantity accumulated control increment.
10. The method for the PID controller to dynamically adjust the control period according to claim 1, further comprising S4, and repeatedly performing the steps S1-S3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110036171.XA CN112859585B (en) | 2021-01-12 | 2021-01-12 | Method for dynamically adjusting control period of PID controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110036171.XA CN112859585B (en) | 2021-01-12 | 2021-01-12 | Method for dynamically adjusting control period of PID controller |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112859585A true CN112859585A (en) | 2021-05-28 |
CN112859585B CN112859585B (en) | 2024-03-08 |
Family
ID=76002896
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110036171.XA Active CN112859585B (en) | 2021-01-12 | 2021-01-12 | Method for dynamically adjusting control period of PID controller |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112859585B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117555221A (en) * | 2023-12-28 | 2024-02-13 | 江苏鱼跃医疗设备股份有限公司 | Flow control method, equipment and medium based on variable period PID control |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5159547A (en) * | 1990-10-16 | 1992-10-27 | Rockwell International Corporation | Self-monitoring tuner for feedback controller |
CN102841539A (en) * | 2012-09-10 | 2012-12-26 | 广东电网公司电力科学研究院 | Subcritical coordinative control method based on multiple model predictive control |
CN105116726A (en) * | 2015-07-20 | 2015-12-02 | 宁波大学 | Parameter design method for nonlinear predictive controller based on mechanism model |
JP2020160550A (en) * | 2019-03-25 | 2020-10-01 | 株式会社チノー | Control device and control method |
-
2021
- 2021-01-12 CN CN202110036171.XA patent/CN112859585B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5159547A (en) * | 1990-10-16 | 1992-10-27 | Rockwell International Corporation | Self-monitoring tuner for feedback controller |
CN102841539A (en) * | 2012-09-10 | 2012-12-26 | 广东电网公司电力科学研究院 | Subcritical coordinative control method based on multiple model predictive control |
CN105116726A (en) * | 2015-07-20 | 2015-12-02 | 宁波大学 | Parameter design method for nonlinear predictive controller based on mechanism model |
JP2020160550A (en) * | 2019-03-25 | 2020-10-01 | 株式会社チノー | Control device and control method |
Non-Patent Citations (1)
Title |
---|
吴斌;刘晶;方秀华;: "增量式PID控制在全钢内衬层生产线中的应用", 橡塑技术与装备, no. 03 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117555221A (en) * | 2023-12-28 | 2024-02-13 | 江苏鱼跃医疗设备股份有限公司 | Flow control method, equipment and medium based on variable period PID control |
Also Published As
Publication number | Publication date |
---|---|
CN112859585B (en) | 2024-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102739151B (en) | Online adjustment method for PI (proportion integrate) parameter of asynchronous motor | |
CN105135409B (en) | Supercritical unit boiler master controller control method based on primary frequency modulation action amplitude | |
CN105180135A (en) | Unit plant coordination control method and system | |
CN110513158B (en) | Feed-forward multistage speed regulation method for steam turbine | |
CN113189862B (en) | PID control loop quality evaluation method for thermal power plant | |
CN112859585A (en) | Method for dynamically adjusting control period of PID controller | |
CN104481717B (en) | Engine speed control method with online setting of PID (proportion integration differentiation) parameters | |
CN113110657B (en) | Method, system and medium for controlling hearth pressure and exhaust gas temperature of heating furnace | |
CN113094896B (en) | Power plant heat supply unit optimization control method | |
CN107437815A (en) | The optimal control method and relevant device of speed regulator in Hydropower Unit | |
CN108954286B (en) | A kind of calculation method and system of boiler input dynamic assisted instruction | |
CN103465794A (en) | Train power supply control method and system for electric locomotives and train power supply equipment | |
CN110723173B (en) | Locomotive and constant-speed cruising method thereof | |
CN113485499B (en) | Coal feeding regulation and control method for coal quality working condition change | |
CN117249396A (en) | Automatic separate gas transmission and transportation management system for natural gas pipeline | |
CN111765446B (en) | Boiler control method and system based on automatic optimization fuzzy three-level PID | |
CN112486017A (en) | Blower PID control method for automobile air conditioner controller | |
CN103372570A (en) | Cold rolling process segment auxiliary roll automatic speed regulation method | |
CN115402363A (en) | Rail locomotive constant speed stability control method and corresponding rail locomotive | |
CN116238495A (en) | Heavy truck constant-speed cruising torque calculation method based on multi-parameter control | |
CN102953966B (en) | Self-adaptive iterative control method of variable-frequency pumps in pump station group | |
CN111306536A (en) | Method and device for controlling sulfur dioxide emission of circulating fluidized bed boiler | |
CN114995159B (en) | A stabilization control algorithm for blast furnace top gas pressure in TRT power generation system | |
CN111273625B (en) | Feedforward calculation method and device for dynamic matrix control | |
CN116553256B (en) | Slip shaft tension control method, slip shaft tension control device, slip shaft tension controller and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Country or region after: China Address after: 310053 No. 309 Liuhe Road, Binjiang District, Hangzhou City, Zhejiang Province Applicant after: Zhongkong Technology Co.,Ltd. Address before: 310053 No. 309 Liuhe Road, Binjiang District, Hangzhou City, Zhejiang Province Applicant before: ZHEJIANG SUPCON TECHNOLOGY Co.,Ltd. Country or region before: China |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |