CN111766777B - PID controller and PID control method - Google Patents

PID controller and PID control method Download PDF

Info

Publication number
CN111766777B
CN111766777B CN202010750804.9A CN202010750804A CN111766777B CN 111766777 B CN111766777 B CN 111766777B CN 202010750804 A CN202010750804 A CN 202010750804A CN 111766777 B CN111766777 B CN 111766777B
Authority
CN
China
Prior art keywords
error
value
pid
control
adjustment coefficient
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.)
Active
Application number
CN202010750804.9A
Other languages
Chinese (zh)
Other versions
CN111766777A (en
Inventor
赵潮
刘家国
仝晓杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Environmental Features
Original Assignee
Beijing Institute of Environmental Features
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Environmental Features filed Critical Beijing Institute of Environmental Features
Priority to CN202010750804.9A priority Critical patent/CN111766777B/en
Publication of CN111766777A publication Critical patent/CN111766777A/en
Application granted granted Critical
Publication of CN111766777B publication Critical patent/CN111766777B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B11/00Automatic controllers
    • G05B11/01Automatic controllers electric
    • G05B11/36Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
    • G05B11/42Automatic 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.
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/0265Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric the criterion being a learning criterion
    • G05B13/0295Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric the criterion being a learning criterion using fuzzy logic and expert systems
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/04Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
    • G05B13/042Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Feedback Control In General (AREA)

Abstract

The invention relates to a PID controller and a control method, wherein the PID controller comprises: an error calculation unit for calculating an error value based on the input controlled amount and the output feedback amount; an error change rate calculation unit for calculating an error change rate from the error value; the fuzzy control unit is used for receiving the error value and the error change rate, carrying out self-adaptive setting on the PID parameters of the PID controller by utilizing a fuzzy rule, and outputting the change quantity of the PID parameters; the expert control unit is used for receiving the error value and the error change rate and obtaining an initial value of the PID parameter by utilizing an expert knowledge base; and the PID control unit is used for obtaining PID parameter values according to the initial values and the variation of the PID parameters during each PID calculation and calculating control output quantity to the controlled object according to the PID parameter values. According to the invention, the dual setting of the PID parameters is realized through expert control, fuzzy control and a PID controller, so that the control precision and performance of the PID controller are improved.

Description

PID controller and PID control method
Technical Field
The invention relates to the field of electric automation control, in particular to a PID controller and a PID control method.
Background
PID control is a relatively mature control method applied to equipment control and automatic production at present, and has the advantages of relatively simple algorithm, high stability and good robustness. Along with the development of industrial technology, the control precision requirement of the servo motor is continuously improved, and the common PID controller is difficult to meet the high-precision index.
The fuzzy self-adaptive PID algorithm is mainly formed by combining a fuzzy controller and a PID controller, wherein the fuzzy controller takes an error value e and related characteristic quantity thereof as input, and utilizes a fuzzy rule to carry out self-adaptive adjustment on PID controller parameters, namely a proportional adjustment coefficient Kp, an integral adjustment coefficient Ki and a differential adjustment coefficient Kd, the output of the fuzzy PID controller is the variation of the PID parameters, namely the variation delta Kp of the proportional adjustment coefficient, the variation delta Ki of the integral adjustment coefficient and the variation delta Kd of the differential adjustment coefficient, when the fuzzy PID controller is used, a certain initial value is required to be applied to the fuzzy controller, the current initial value is determined by adopting experience trial and error, when the initial value is selected inappropriately, the adjustment effect is difficult to achieve, and the initial value cannot be changed after the initial value is selected.
Disclosure of Invention
Aiming at the defect that the initial value determination in the fuzzy self-adaptive PID algorithm in the prior art adopts empirical trial and error and is difficult to achieve the setting effect, the invention provides a PID controller and a PID control method, wherein expert control is introduced on the basis of the fuzzy PID controller to set the parameter initial value of the fuzzy PID.
In order to solve the above technical problem, the present invention provides a PID controller, preferably comprising:
an error calculation unit for calculating an error value based on the input controlled amount and the output feedback amount;
an error change rate calculation unit for calculating an error change rate from the error value;
the fuzzy control unit is connected with the error calculation unit and the error change rate calculation unit and is used for receiving the error value and the error change rate, adaptively setting the PID parameters of the PID controller by utilizing a fuzzy rule and outputting the change quantity of the PID parameters;
the expert control unit is connected with the error calculation unit and the error change rate calculation unit and is used for receiving the error value and the error change rate and obtaining an initial value of the PID parameter by utilizing an expert knowledge base;
the PID control unit is connected with the fuzzy control unit, the expert control unit, the error calculation unit and the error change rate calculation unit and is used for obtaining a PID parameter value according to the initial value and the change amount of the PID parameter during each PID calculation and calculating the control output quantity to the controlled object according to the PID parameter value.
In the PID controller according to the present invention, preferably, the PID parameters include: proportional, integral and differential adjustment coefficients.
In the PID controller according to the present invention, preferably, the expert control unit generates initial values of the corresponding PID parameters according to the error value and the error rate of change according to the following rule mathematical model:
|e|≥ε 1 when Kp 0 =Kp 01 ,Ki 0 =Ki 01 ,Kd 0 =Kd 01
ε 2 ≤|e|<ε 1 When Kp 0 =Kp 02 ,Ki 0 =Ki 02 ,Kd 0 =Kd 02
|e|<ε 2 And |ec| is not less than delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 03
|e|<ε 2 And |ec| < delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 04
Where e is the calculated error value and ec is the calculated error rate; epsilon 1 、ε 2 Respectively are provided withA first error level value and a second error level value, delta 1 Kp is the first error variation level value 0 、Ki 0 、Kd 0 Initial values of the proportional adjustment coefficient, the integral adjustment coefficient and the differential adjustment coefficient are respectively; kp 01 、Kp 02 、Kp 03 Respectively a preset first proportion regulating value, a preset second proportion regulating value and a preset third proportion regulating value; ki (Ki) 01 、Ki 02 、Ki 03 The first integral regulating value, the second integral regulating value and the third integral regulating value are respectively preset; kd 01 、Kd 02 、Kd 03 、Kd 04 The differential control device comprises a first differential control value, a second differential control value, a third differential control value and a fourth differential control value which are preset respectively; and Kp 01 ≈Kp 03 >Kp 02 ,Kd 01 ≈Kd 02 ≈Kd 03 <Kd 04 ,0=Ki 01 <Ki 02 <Ki 031 >ε 2 >0,δ 1 >0。
In the PID controller according to the present invention, preferably, the PID control unit calculates the PID parameter value by the following formula:
Kp=Kp 0 +ΔKp
Figure BDA0002609986790000032
wherein Kp, ki and Kd are PID parameter values of the proportional adjustment coefficient, the integral adjustment coefficient and the differential adjustment coefficient respectively; Δkp, Δki, and Δkd are the amounts of change in the proportional adjustment coefficient, the integral adjustment coefficient, and the differential adjustment coefficient, respectively.
In the PID controller according to the present invention, preferably, the PID control unit calculates the control output by the following formula:
Figure BDA0002609986790000031
where u (k) is the control output of the kth time, e (k) is the error value calculated by the kth time, and e (j) is the error value calculated by the jth time; e (k-1) is the error value of the k-1 th calculation.
The invention also provides a PID control method, which comprises the following steps:
calculating an error value according to the input controlled quantity and the output feedback quantity;
calculating an error change rate according to the error value;
performing self-adaptive setting on PID parameters of the PID controller according to the error value and the error change rate by using a fuzzy rule, and outputting the change quantity of the PID parameters;
obtaining an initial value of the PID parameter according to the error value and the error change rate by using an expert knowledge base;
and obtaining PID parameter values according to the initial values and the variation of the PID parameters in each PID timing, and calculating control output quantity to the controlled object according to the PID parameter values.
In the PID control method according to the present invention, preferably, the PID parameters include: proportional, integral and differential adjustment coefficients.
In the PID control method according to the present invention, it is preferable that initial values of the corresponding PID parameters are generated from the error value and the error rate according to the following rule mathematical model in the method:
|e|≥ε 1 when Kp 0 =Kp 01 ,Ki 0 =Ki 01 ,Kd 0 =Kd 01
ε 2 ≤|e|<ε 1 When Kp 0 =Kp 02 ,Ki 0 =Ki 02 ,Kd 0 =Kd 02
|e|<ε 2 And |ec| is not less than delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 03
|e|<ε 2 And |ec| < delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 04
Where e is the calculated error value and ec is the calculated error rate; epsilon 1 、ε 2 A first error level value and a second error level value, delta, respectively 1 Kp is the first error variation level value 0 、Ki 0 、Kd 0 Initial values of the proportional adjustment coefficient, the integral adjustment coefficient and the differential adjustment coefficient are respectively; kp 01 、Kp 02 、Kp 03 Respectively a preset first proportion regulating value, a preset second proportion regulating value and a preset third proportion regulating value; ki (Ki) 01 、Ki 02 、Ki 03 The first integral regulating value, the second integral regulating value and the third integral regulating value are respectively preset; kd 01 、Kd 02 、Kd 03 、Kd 04 The differential control device comprises a first differential control value, a second differential control value, a third differential control value and a fourth differential control value which are preset respectively; and Kp 01 ≈Kp 03 >Kp 02 ,Kd 01 ≈Kd 02 ≈Kd 03 <Kd 04 ,0=Ki 01 <Ki 02 <Ki 031 >ε 2 >0,δ 1 >0。
In the PID control method according to the present invention, preferably, the PID parameter value is calculated by the following formula:
Kp=Kp 0 +ΔKp
Figure BDA0002609986790000041
wherein Kp, ki and Kd are PID parameter values of the proportional adjustment coefficient, the integral adjustment coefficient and the differential adjustment coefficient respectively; Δkp, Δki, and Δkd are the amounts of change in the proportional adjustment coefficient, the integral adjustment coefficient, and the differential adjustment coefficient, respectively.
In the PID control method according to the present invention, preferably, the control output is calculated by the following formula:
Figure BDA0002609986790000042
where u (k) is the control output of the kth time, e (k) is the error value calculated by the kth time, and e (j) is the error value calculated by the jth time; e (k-1) is the error value of the k-1 th calculation.
The PID controller and the control method thereof have the following beneficial effects: according to the invention, the dual setting of the PID parameters is realized through expert control, fuzzy control and a PID controller, so that the control precision and performance of the PID controller are improved.
Drawings
FIG. 1 is a schematic diagram of the structure of a PID controller according to a preferred embodiment of the invention;
FIG. 2 is a schematic diagram of a schematic configuration of a fuzzy control unit in a PID controller according to a preferred embodiment of the invention;
FIG. 3 is a flow chart of a PID control method according to a preferred embodiment of the invention;
FIG. 4 is a graph of error mean square error trend for four control methods of sinusoidal disturbance;
fig. 5 is an error mean square error trend graph of four control methods of step disturbance.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a schematic diagram of a PID controller according to a preferred embodiment of the present invention is shown. The PID controller of the present invention can also be referred to as an expert-fuzzy PID controller. As shown in fig. 1, the PID controller provided in this embodiment includes at least: an error calculation unit 100, an error change rate calculation unit 200, a fuzzy control unit 300, an expert control unit 400, and a PID control unit 500.
Wherein the error calculation unit 100 is configured to calculate an error value e based on the input controlled variable r and the output feedback variable y. Specifically, e=r-y. When the PID controller is started, as no output exists, the initial output feedback quantity is 0, and the difference value between the initial controlled quantity r and 0 is calculated, namely the initial error value e. After the PID controller is started, the error calculation unit 100 calculates a difference between the controlled variable r input in real time and the output feedback variable y measured in real time as an error value e calculated by the present PID. The PID controller of the invention can be applied to equipment control and automatic production, such as turntable control of azimuth rotation angle, wherein the controlled quantity r, the control output quantity u and the output feedback quantity y of the input PID controller are all azimuth rotation angles; for example, the controlled amount r is 100 °, that is, the turntable azimuth is rotated to a position of 100 °, the control output amount u given to the controlled object 600 by the PID controller is an amount calculated by the PID controller combination, for example, 99.98 °, and the output feedback amount y is an actual angle, for example, 90 °, of the turntable azimuth currently detected.
The error change rate calculation unit 200 is configured to calculate an error change rate ec from the error value e. Specifically, the first derivative of the error value e with respect to time t is calculated as the error change rate ec.
The fuzzy control unit 300 is connected with the error calculation unit 100 and the error change rate calculation unit 200, and is used for receiving the error value e and the error change rate ec, adaptively setting the PID parameters of the PID controller by using a fuzzy rule, and outputting the variation of the PID parameters. Preferably, the PID parameters include: proportional, integral and differential adjustment coefficients.
The expert control unit 400 is connected to the error calculation unit 100 and the error change rate calculation unit 200, and is configured to receive the error value e and the error change rate ec, and obtain an initial value of the PID parameter by using an expert knowledge base.
The PID control unit 500 is connected to the fuzzy control unit 300, the expert control unit 400, the error calculation unit 100, and the error rate calculation unit 200, and is configured to obtain a PID parameter value according to an initial value and a variation of a PID parameter at each PID calculation, and calculate a control output u to the controlled object 600 according to the PID parameter value. The output feedback quantity y of the controlled object is fed back to the error calculation unit 100 for the next PID operation.
In the invention, the PID parameter value adopted by the PID controller is continuously updated when each calculation is performed, which is equivalent to one judgment per round, namely, during each PID calculation, the expert control unit 400 generates the initial value of a new PID parameter according to the new error value e and the error change rate ec, the fuzzy control unit 300 generates the change quantity of the new PID parameter according to the new error value e and the error change rate ec, and the PID control unit 500 adds the two values to obtain the PID parameter value for subsequent control. Compared with the prior art that the initial value is manually preset according to the empirical value, the control precision and performance of the PID controller can be improved. Referring to fig. 2 in combination, a schematic diagram of a simulation control unit 300 in a PID controller according to a preferred embodiment of the present invention is shown. The fuzzy control unit 300 may be constructed using various fuzzy control designs well known and applicable to those skilled in the art, typically as shown in FIG. 2, including a fuzzy calculation module 310, a fuzzy rule base 320, a fuzzy inference engine 330, a defuzzification calculation module 340. The fuzzy control unit 300 uses the error value e calculated by the error calculation unit 100 and the relevant characteristic quantity of the error value as input signals, and obtains a set of variable quantities of PID parameters, namely the variable quantity delta Kp of the proportional adjustment coefficient, the variable quantity delta Ki of the integral adjustment coefficient and the variable quantity delta Kd of the differential adjustment coefficient through the processes of fuzzification, fuzzy reasoning and defuzzification. Wherein the relevant characteristic of the error value comprises a first derivative, a second derivative, and a higher derivative of the error value. I.e. the error rate of change ec, the rate of change of the error rate of change ec, etc.
The expert control unit 400 is used for determining an initial value of the PID controller, firstly, an expert knowledge base is constructed through a certain experience rule, in the expert knowledge base, error values e and error change rates ec in different ranges correspond to different sets of PID parameter values, when the PID controller works, the expert control unit 400 obtains a corresponding set of parameter values of a proportional adjustment coefficient, an integral adjustment coefficient and a differential adjustment coefficient by judging the error values e and the error change rates ec, and the set of values are used as initial values of PID control, namely, initial values Kp of the proportional adjustment coefficient 0 Initial value Ki of integral adjustment coefficient 0 And initial value Kd of differential adjustment coefficient 0
The basic rules of the expert knowledge base are:
(a) When |e| is large, in order for the system to have better tracking performance, a larger Kp and a smaller Kd should be taken, while in order to avoid a larger overshoot, the integration action should be limited, usually ki=0.
(b) When |e| is of medium magnitude, kp should be small in order for the system to have a small overshoot. In this case, the Kd value has a large influence on the system, and the Ki value should be smaller.
(c) When |e| is small, kp and Ki should be both large in order for the system to have good stability. Meanwhile, in order to avoid oscillation of the system at a set value and consider the anti-interference performance of the system, kd may be smaller when |ec| is larger, and Kd may be larger when |ec| is smaller.
Thus, in a more preferred embodiment of the present invention, the expert control unit 400 generates initial values of the corresponding PID parameters from the error value and the error rate of change according to the following rule mathematical model:
|e|≥ε 1 when Kp 0 =Kp 01 ,Ki 0 =Ki 01 ,Kd 0 =Kd 01
ε 2 ≤|e|<ε 1 When Kp 0 =Kp 02 ,Ki 0 =Ki 02 ,Kd 0 =Kd 02
|e|<ε 2 And |ec| is not less than delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 03
|e|<ε 2 And |ec| < delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 04
Where e is the calculated error value and ec is the calculated error rate; epsilon 1 、ε 2 A first error level value and a second error level value, delta, respectively 1 Kp is the first error variation level value 0 、Ki 0 、Kd 0 The primary of the proportional, integral and differential adjustment coefficients, respectivelyA value; kp 01 、Kp 02 、Kp 03 Respectively a preset first proportion regulating value, a preset second proportion regulating value and a preset third proportion regulating value; ki (Ki) 01 、Ki 02 、Ki 03 The first integral regulating value, the second integral regulating value and the third integral regulating value are respectively preset; kd 01 、Kd 02 、Kd 03 、Kd 04 The differential control device comprises a first differential control value, a second differential control value, a third differential control value and a fourth differential control value which are preset respectively; and Kp 01 ≈Kp 03 >Kp 02 ,Kd 01 ≈Kd 02 ≈Kd 03 <Kd 04 ,0=Ki 01 <Ki 02 <Ki 031 >ε 2 >0,δ 1 > 0. The symbol "≡" in the present invention means that the error of the two numbers is within 5% of the average value of the two numbers.
Taking the control of the azimuth angle of the turntable as an example, the following values can be adopted:
ε 1 =0.3,ε 2 =0.1,δ 1 =1;Kp 01 =Kp 03 =30,Kp 02 =15;
Ki 01 =0,Ki 02 =1,Ki 03 =10;
Kd 01 =12,Kd 02 =12,Kd 03 =12,Kd 04 =18。
preferably, the PID control unit 500 calculates the PID parameter value by the following formula:
Kp=Kp 0 +ΔKp
Figure BDA0002609986790000081
wherein Kp, ki and Kd are PID parameter values of the proportional adjustment coefficient, the integral adjustment coefficient and the differential adjustment coefficient respectively; Δkp, Δki, and Δkd are the amounts of change in the proportional adjustment coefficient, the integral adjustment coefficient, and the differential adjustment coefficient, respectively.
The PID control unit 500 calculates the control output by the following formula:
Figure BDA0002609986790000082
where u (k) is the control output of the kth time, e (k) is the error value calculated by the kth time, and e (j) is the error value calculated by the jth time; e (k-1) is the error value of the k-1 th calculation.
The invention realizes double setting of PID parameters through the expert control unit, the fuzzy control unit and the PID control unit.
Referring to FIG. 3, a flow chart of a PID control method according to a preferred embodiment of the invention is shown. As shown in fig. 3, the PID control method provided in this embodiment includes the following steps:
s1, calculating an error value according to an input controlled quantity r and an output feedback quantity y control output quantity;
s2, calculating an error change rate ec according to the error value e;
s3, performing self-adaptive setting on PID parameters of the PID controller according to the error value e and the error change rate by using a fuzzy rule, and outputting the change quantity of the PID parameters; preferably, the PID parameters include: proportional, integral and differential adjustment coefficients. For example, the error value e and the relevant characteristic quantity of the error value are used as input signals, and the variable quantity of a group of PID parameters, namely the variable quantity delta Kp of the proportional adjustment coefficient, the variable quantity delta Ki of the integral adjustment coefficient and the variable quantity delta Kd of the differential adjustment coefficient, are obtained through the processes of blurring, fuzzy reasoning and defuzzification.
S4, obtaining an initial value of the PID parameter according to the error value and the error change rate by using an expert knowledge base;
preferably, in the step S4, initial values of the corresponding PID parameters are generated according to the error value and the error rate according to the following rule mathematical model:
|e|≥ε 1 when Kp 0 =Kp 01 ,Ki 0 =Ki 01 ,Kd 0 =Kd 01
ε 2 ≤|e|<ε 1 When Kp 0 =Kp 02 ,Ki 0 =Ki 02 ,Kd 0 =Kd 02
|e|<ε 2 And |ec| is not less than delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 03
|e|<ε 2 And |ec| < delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 04
Where e is the calculated error value and ec is the calculated error rate; epsilon 1 、ε 2 A first error level value and a second error level value, delta, respectively 1 Kp is the first error variation level value 0 、Ki 0 、Kd 0 Initial values of a proportional adjustment coefficient Kp, an integral adjustment coefficient Ki and a differential adjustment coefficient Kd are respectively set; kp 01 、Kp 02 、Kp 03 Respectively a preset first proportion regulating value, a preset second proportion regulating value and a preset third proportion regulating value; ki (Ki) 01 、Ki 02 、Ki 03 The first integral regulating value, the second integral regulating value and the third integral regulating value are respectively preset; kd 01 、Kd 02 、Kd 03 、Kd 04 The differential control device comprises a first differential control value, a second differential control value, a third differential control value and a fourth differential control value which are preset respectively; and, in addition, the processing unit,
Kp 01 ≈Kp 03 >Kp 02 ,Kd 01 ≈Kd 02 ≈Kd 03 <Kd 04 ,0=Ki 01 <Ki 02 <Ki 031 >ε 2 >0,δ 1 >0。
s5, obtaining PID parameter values according to the initial values and the variation of the PID parameters during each PID calculation, and calculating control output quantity to the controlled object according to the PID parameter values.
Preferably, the PID parameter values are calculated in this step S5 by the following formula:
Kp=Kp 0 +ΔKp
Figure BDA0002609986790000101
wherein Kp, ki and Kd are PID parameter values of the proportional adjustment coefficient, the integral adjustment coefficient and the differential adjustment coefficient respectively; Δkp, Δki, and Δkd are the amounts of change in the proportional adjustment coefficient, the integral adjustment coefficient, and the differential adjustment coefficient, respectively.
Preferably, the control output is calculated in this step S5 by the following formula:
Figure BDA0002609986790000102
where u (k) is the control output of the kth time, e (k) is the error value calculated by the kth time, and e (j) is the error value calculated by the jth time; e (k-1) is the error value of the k-1 th calculation.
The above-described PID control method can be implemented using the PID controller of fig. 1.
Please refer to fig. 4 for a graph of error mean square error trend for four control methods of adding sinusoidal disturbance, and fig. 5 for a graph of error mean square error trend for four control methods of adding step disturbance. In the experiment, tracking error mean square error of four control modes of PID control, expert PID control, fuzzy PID control and expert-fuzzy PID control are obtained by tracking a sinusoidal curve with a period of 2s and an amplitude of 10 degrees and respectively applying a sinusoidal interference signal and a step interference signal to the system, wherein the expert-fuzzy PID control is the PID controller of the invention. Therefore, the expert-fuzzy PID control error mean square error is smaller, and the control performance is more excellent.
In summary, an expert control system is introduced into the invention, an expert knowledge base is constructed through a certain experience rule, error values e in different ranges and error related characteristic quantities correspond to different sets of PID parameters, when the controller works, a corresponding set of Kp, ki and Kd values are obtained through judging the input error values e and the error related characteristic quantities, the set of values are used as initial values of fuzzy PID control, the initial values are switched according to the change of errors under the method, so that the PID controller realizes double setting of expert control and fuzzy control, and through simulation experiments, the expert-fuzzy PID controller has obvious advantages in system stability and error control compared with the common PID controller, the expert PID controller and the fuzzy PID controller.
It should be noted that the PID control method of the present invention is the same as the PID controller in principle and inventive concept, so that the detailed description of the PID controller embodiment is also applicable to the PID control method.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A PID controller, comprising:
an error calculation unit for calculating an error value based on the input controlled amount and the output feedback amount;
an error change rate calculation unit for calculating an error change rate from the error value;
the fuzzy control unit is connected with the error calculation unit and the error change rate calculation unit and is used for receiving the error value and the error change rate, adaptively setting the PID parameters of the PID controller by utilizing a fuzzy rule and outputting the change quantity of the PID parameters;
the expert control unit is connected with the error calculation unit and the error change rate calculation unit and is used for receiving the error value and the error change rate and obtaining an initial value of the PID parameter by utilizing an expert knowledge base;
the PID control unit is connected with the fuzzy control unit, the expert control unit, the error calculation unit and the error change rate calculation unit, and is used for obtaining a PID parameter value according to the initial value and the change amount of the PID parameter during each PID calculation and calculating a control output quantity to a controlled object according to the PID parameter value;
the expert control unit generates initial values of the corresponding PID parameters according to the error value and the error change rate according to the following rule mathematical model:
|e|≥ε 1 when Kp 0 =Kp 01 ,Ki 0 =Ki 01 ,Kd 0 =Kd 01
ε 2 ≤|e|<ε 1 When Kp 0 =Kp 02 ,Ki 0 =Ki 02 ,Kd 0 =Kd 02
|e|<ε 2 And |ec| is not less than delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 03
|e|<ε 2 And |ec| < delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 04
Where e is the calculated error value and ec is the calculated error rate; epsilon 1 、ε 2 A first error level value and a second error level value, delta, respectively 1 Kp is the first error variation level value 0 、Ki 0 、Kd 0 Initial values of the proportional adjustment coefficient, the integral adjustment coefficient and the differential adjustment coefficient are respectively; kp 01 、Kp 02 、Kp 03 Respectively a preset first proportion regulating value, a preset second proportion regulating value and a preset third proportion regulating value; ki (Ki) 01 、Ki 02 、Ki 03 The first integral regulating value, the second integral regulating value and the third integral regulating value are respectively preset; kd 01 、Kd 02 、Kd 03 、Kd 04 The differential control device comprises a first differential control value, a second differential control value, a third differential control value and a fourth differential control value which are preset respectively; and Kp 01 ≈Kp 03 >Kp 02 ,Kd 01 ≈Kd 02 ≈Kd 03 <Kd 04 ,0=Ki 01 <Ki 02 <Ki 031 >ε 2 >0,δ 1 >0。
2. The PID controller of claim 1, wherein the PID parameters comprise: proportional, integral and differential adjustment coefficients.
3. PID controller according to claim 1, characterized in that the PID control unit calculates the PID parameter value by the following formula:
Figure FDA0004226544270000021
wherein Kp, ki and Kd are PID parameter values of the proportional adjustment coefficient, the integral adjustment coefficient and the differential adjustment coefficient respectively; Δkp, Δki, and Δkd are the amounts of change in the proportional adjustment coefficient, the integral adjustment coefficient, and the differential adjustment coefficient, respectively.
4. A PID controller according to claim 3, characterized in that the PID control unit calculates the control output by the following formula:
Figure FDA0004226544270000022
where u (k) is the control output of the kth time, e (k) is the error value calculated by the kth time, and e (j) is the error value calculated by the jth time; e (k-1) is the error value of the k-1 th calculation.
5. A PID control method, characterized by comprising the steps of:
calculating an error value according to the input controlled quantity and the output feedback quantity;
calculating an error change rate according to the error value;
performing self-adaptive setting on PID parameters of the PID controller according to the error value and the error change rate by using a fuzzy rule, and outputting the change quantity of the PID parameters;
obtaining an initial value of the PID parameter according to the error value and the error change rate by using an expert knowledge base;
obtaining PID parameter values according to the initial values and the variation of the PID parameters during each PID calculation, and calculating control output quantity to a controlled object according to the PID parameter values;
in the method, a mathematical model generates initial values of corresponding PID parameters according to error values and error change rates according to the following rules:
|e|≥ε 1 when Kp 0 =Kp 01 ,Ki 0 =Ki 01 ,Kd 0 =Kd 01
ε 2 ≤|e|<ε 1 When Kp 0 =Kp 02 ,Ki 0 =Ki 02 ,Kd 0 =Kd 02
|e|<ε 2 And |ec| is not less than delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 03
|e|<ε 2 And |ec| < delta 1 When Kp 0 =Kp 03 ,Ki 0 =Ki 03 ,Kd 0 =Kd 04
Where e is the calculated error value and ec is the calculated error rate; epsilon 1 、ε 2 A first error level value and a second error level value, delta, respectively 1 Kp is the first error variation level value 0 、Ki 0 、Kd 0 Initial values of the proportional adjustment coefficient, the integral adjustment coefficient and the differential adjustment coefficient are respectively; kp 01 、Kp 02 、Kp 03 Respectively a preset first proportion regulating value, a preset second proportion regulating value and a preset third proportion regulating value; ki (Ki) 01 、Ki 02 、Ki 03 The first integral regulating value, the second integral regulating value and the third integral regulating value are respectively preset; kd 01 、Kd 02 、Kd 03 、Kd 04 The differential control device comprises a first differential control value, a second differential control value, a third differential control value and a fourth differential control value which are preset respectively; and Kp 01 ≈Kp 03 >Kp 02 ,Kd 01 ≈Kd 02 ≈Kd 03 <Kd 04 ,0=Ki 01 <Ki 02 <Ki 031 >ε 2 >0,δ 1 >0。
6. The PID control method of claim 5, wherein the PID parameters comprise: proportional, integral and differential adjustment coefficients.
7. The PID control method according to claim 5, wherein the PID parameter values are calculated by the following formula:
Figure FDA0004226544270000031
wherein Kp, ki and Kd are PID parameter values of the proportional adjustment coefficient, the integral adjustment coefficient and the differential adjustment coefficient respectively; Δkp, Δki, and Δkd are the amounts of change in the proportional adjustment coefficient, the integral adjustment coefficient, and the differential adjustment coefficient, respectively.
8. The PID control method according to claim 7, characterized in that the control output is calculated by the following formula:
Figure FDA0004226544270000032
where u (k) is the control output of the kth time, e (k) is the error value calculated by the kth time, and e (j) is the error value calculated by the jth time; e (k-1) is the error value of the k-1 th calculation.
CN202010750804.9A 2020-07-30 2020-07-30 PID controller and PID control method Active CN111766777B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010750804.9A CN111766777B (en) 2020-07-30 2020-07-30 PID controller and PID control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010750804.9A CN111766777B (en) 2020-07-30 2020-07-30 PID controller and PID control method

Publications (2)

Publication Number Publication Date
CN111766777A CN111766777A (en) 2020-10-13
CN111766777B true CN111766777B (en) 2023-06-16

Family

ID=72727777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010750804.9A Active CN111766777B (en) 2020-07-30 2020-07-30 PID controller and PID control method

Country Status (1)

Country Link
CN (1) CN111766777B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111766777B (en) * 2020-07-30 2023-06-16 北京环境特性研究所 PID controller and PID control method
CN112748658B (en) * 2021-01-07 2023-06-06 上海辛格林纳新时达电机有限公司 Constant-pressure water supply method and device, electronic equipment and storage medium
CN112842771B (en) * 2021-02-03 2023-03-24 潍坊医学院附属医院 Diabetic foot of endocrinology department is with device of creating clearly
CN112962993A (en) * 2021-02-05 2021-06-15 洛阳城市建设勘察设计院有限公司 Rainwater leakage prevention device for reserved hole of exterior wall of multifunctional building and control method
CN113038508A (en) * 2021-02-26 2021-06-25 浙江方大通信有限公司 5G communication network operation and maintenance system and method based on data perception fusion evaluation
CN113281990B (en) * 2021-05-24 2022-07-26 无锡威孚高科技集团股份有限公司 Pressure control method, device and system for DPF testing
CN113608671B (en) * 2021-06-19 2024-05-17 山东云海国创云计算装备产业创新中心有限公司 Method, system, equipment and medium for improving solid state disk reading performance
CN113721455A (en) * 2021-09-06 2021-11-30 华帝股份有限公司 Efficient PID control method, device and controller
CN113998767B (en) * 2021-10-28 2023-09-15 重庆文理学院 Electrocatalytic pH value treatment system based on automatic control

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5831850A (en) * 1994-07-11 1998-11-03 Elf Exploration Production Method and device for control over an admissable range with contextual anticipation using fuzzy logic
CN1952819A (en) * 2005-10-17 2007-04-25 中国科学院沈阳计算技术研究所有限公司 Fuzzy PID control method and execution apparatus of numerical control machine
CN101672509A (en) * 2009-09-02 2010-03-17 东莞市广大制冷有限公司 Air-conditioning control technique with variable air quantity based on enthalpy value control
CN101710245A (en) * 2009-12-03 2010-05-19 徐州雷奥医疗设备有限公司 PID control based self-focusing lens ion exchange temperature control method and device
CN102073274A (en) * 2011-01-21 2011-05-25 北京工业大学 Expert fuzzy incremental type self-adapting parameter on-line setting and optimizing system and method thereof
CN102426417A (en) * 2011-12-13 2012-04-25 中冶南方(武汉)自动化有限公司 PI (Proportional Integral) parameter mixed setting method
CN202453708U (en) * 2011-11-22 2012-09-26 陈汝明 Brick tile entire plant DCS central distributed control system
CN103499920A (en) * 2013-09-03 2014-01-08 北京工业大学 Control parameter optimization method and system through vector time series prediction and expert fuzzy transformation ratio
CN103536367A (en) * 2013-10-23 2014-01-29 沈阳工业大学 Master-slave minimally invasive surgical robot system and control method
CN104019526A (en) * 2014-06-24 2014-09-03 河海大学常州校区 Fussily self-adaptive PID temperature and humidity control system and method based on improved PSO (Particle Swarm Optimization) algorithm
CN104199283A (en) * 2014-06-30 2014-12-10 张万军 Test system and control method for electro-hydraulic servo online self-adjusting fuzzy PID control
CN105045137A (en) * 2015-08-12 2015-11-11 中国航空工业集团公司西安飞机设计研究所 Adaptive PID control method and control system of executing mechanism
CN105955017A (en) * 2016-06-08 2016-09-21 山西大学 Denitration system hierarchical optimization adaptive intelligent control method based on expert fuzzy
CN106597840A (en) * 2017-01-16 2017-04-26 杭州电子科技大学 PID parameter setting method based on production rule reasoning
CN107065560A (en) * 2017-05-15 2017-08-18 北京环境特性研究所 A kind of two axle singular path photoelectric tracking control methods
CN107894716A (en) * 2017-11-28 2018-04-10 昆山艾派科技有限公司 Temprature control method
CN108572548A (en) * 2018-03-02 2018-09-25 曾喆昭 A kind of disturbance sensing control method
CN109581863A (en) * 2019-01-02 2019-04-05 青岛理工大学 A kind of intelligence complex fertilizer control system liquid manure consistency controller
CN111766777A (en) * 2020-07-30 2020-10-13 北京环境特性研究所 PID controller and PID control method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160209031A1 (en) * 2015-01-20 2016-07-21 Alstom Technology Ltd Model-based controls for a furnace and method for controlling the furnace

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5831850A (en) * 1994-07-11 1998-11-03 Elf Exploration Production Method and device for control over an admissable range with contextual anticipation using fuzzy logic
CN1952819A (en) * 2005-10-17 2007-04-25 中国科学院沈阳计算技术研究所有限公司 Fuzzy PID control method and execution apparatus of numerical control machine
CN101672509A (en) * 2009-09-02 2010-03-17 东莞市广大制冷有限公司 Air-conditioning control technique with variable air quantity based on enthalpy value control
CN101710245A (en) * 2009-12-03 2010-05-19 徐州雷奥医疗设备有限公司 PID control based self-focusing lens ion exchange temperature control method and device
CN102073274A (en) * 2011-01-21 2011-05-25 北京工业大学 Expert fuzzy incremental type self-adapting parameter on-line setting and optimizing system and method thereof
CN202453708U (en) * 2011-11-22 2012-09-26 陈汝明 Brick tile entire plant DCS central distributed control system
CN102426417A (en) * 2011-12-13 2012-04-25 中冶南方(武汉)自动化有限公司 PI (Proportional Integral) parameter mixed setting method
CN103499920A (en) * 2013-09-03 2014-01-08 北京工业大学 Control parameter optimization method and system through vector time series prediction and expert fuzzy transformation ratio
CN103536367A (en) * 2013-10-23 2014-01-29 沈阳工业大学 Master-slave minimally invasive surgical robot system and control method
CN104019526A (en) * 2014-06-24 2014-09-03 河海大学常州校区 Fussily self-adaptive PID temperature and humidity control system and method based on improved PSO (Particle Swarm Optimization) algorithm
CN104199283A (en) * 2014-06-30 2014-12-10 张万军 Test system and control method for electro-hydraulic servo online self-adjusting fuzzy PID control
CN105045137A (en) * 2015-08-12 2015-11-11 中国航空工业集团公司西安飞机设计研究所 Adaptive PID control method and control system of executing mechanism
CN105955017A (en) * 2016-06-08 2016-09-21 山西大学 Denitration system hierarchical optimization adaptive intelligent control method based on expert fuzzy
CN106597840A (en) * 2017-01-16 2017-04-26 杭州电子科技大学 PID parameter setting method based on production rule reasoning
CN107065560A (en) * 2017-05-15 2017-08-18 北京环境特性研究所 A kind of two axle singular path photoelectric tracking control methods
CN107894716A (en) * 2017-11-28 2018-04-10 昆山艾派科技有限公司 Temprature control method
CN108572548A (en) * 2018-03-02 2018-09-25 曾喆昭 A kind of disturbance sensing control method
WO2019165801A1 (en) * 2018-03-02 2019-09-06 曾喆昭 Disturbance perception control method
CN109581863A (en) * 2019-01-02 2019-04-05 青岛理工大学 A kind of intelligence complex fertilizer control system liquid manure consistency controller
CN111766777A (en) * 2020-07-30 2020-10-13 北京环境特性研究所 PID controller and PID control method

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
Research on the Control of Adding Acid to Circulating Water Based on Expert Fuzzy PID Control;Jin LIU etal.;《2016 Chinese Control and Decision Conference (CCDC)》;第4853-4858页 *
基于专家协调级的模糊PID在pH值串级控制回路中的应用;张爱娟等;《中国造纸》;第44-48页 *
基于专家-模糊PID的通用温度控制系统研究;蔡恩丰等;《宁波大学学报(理工版)》;第48-52页 *
基于遗传优化的工程整定模糊PID陶瓷窑温控制器;蒋勇等;《冶金自动化》;第153-156页 *
寇怀成 ; 吴云洁 ; 陈燕娥.基于模糊多模型的专家PID在主汽温控制系统中的应用研究.《信息科技》.2007,第1-6页. *
恒压供水模糊自适应PID控制器的设计、仿真;黄祥源;《计算机技术与自动化》;第56-61页 *
王耀南著.《智能控制系统 模糊逻辑·专家系统·神经网络控制》.长沙:湖南大学出版社,1996,第54-93页. *
谢蓉,王晓燕,王新民,巩建英编著.《先进控制理论及应用导论》.西北工业大学出版社,2015,第164-170页. *

Also Published As

Publication number Publication date
CN111766777A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
CN111766777B (en) PID controller and PID control method
KR900005546B1 (en) Adaptive process control system
CN111459051A (en) Discrete terminal sliding mode model-free control method with disturbance observer
CN109508510B (en) Improved Kalman filtering-based rubidium atomic clock parameter estimation algorithm
CN111546346B (en) Flexible joint disturbance observation method, moment control method and equipment
CN109901511B (en) Control algorithm for servo system contour error
CN111142404A (en) Micro-positioning platform based on piezoelectric ceramic drive and modeling and control method thereof
CN109612289A (en) Fuzzy Temperature Control of Electric Resistance Furnace method based on PREDICTIVE CONTROL
CN115993778A (en) Fuzzy control method and device for temperature control system of high-low temperature test chamber
CN112346335A (en) Temperature control method and device for reflow soldering equipment, electronic equipment and storage medium
CN116700393A (en) Reaction kettle temperature control method based on fuzzy control
CN116991068A (en) Motor control method and system based on distributed preset time gradient descent method
WO2020140188A1 (en) Intelligent mixed fertilizer control method and control system
CN109946979B (en) Self-adaptive adjusting method for sensitivity function of servo system
CN109856959A (en) A kind of linear motor control method and system based on PID
CN108563123A (en) The adaptive iteration study robust control system and design method of linear motor X-Y
CN108227476A (en) A kind of control method of AGV trolleies
CN113419432B (en) Sewage treatment system accurate dosing method based on dynamic matrix control algorithm
US20230324885A1 (en) Control assistance device, control system, and control assistance method
CN112152529B (en) Maximum thrust control method and system for permanent magnet linear motor
CN110045616B (en) Robust prediction control method for stirring reaction tank
CN110865535A (en) Novel mutual coupling PD cooperative control theory method
CN111679578A (en) Novel active disturbance rejection control method for temperature system of ethylene cracking furnace
CN111835250A (en) 1/2 power finite value attraction repetitive control method for servo motor driving system
CN116149262B (en) Tracking control method and system of servo system

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
GR01 Patent grant
GR01 Patent grant