Disclosure of Invention
The present invention is directed to a PID system control method to solve the above problems in the prior art.
In order to solve the technical problems, the invention provides the following technical scheme: a control method of a PID system is provided,
comprises a controller, an actuator and a controlled object;
the controller sets a set value r (k), and the output result u (k) is executed by an actuator so as to control a controlled object;
the controlled object feeds back the measured value y (k) to the controller to complete a control cycle;
the discretization formula of the operation of the controller is as follows: Δ u (k) ═ ae (k) — Be (k-1) + Ce (k-2);
wherein e (k) is the difference between the set value r (k) and the measured value y (k),
A=Kp+Ki+Kd,
B=Kp+2Kd,
C=Kd,
kp is a proportional regulating coefficient, Ki is an integral regulating coefficient, and Kd is a differential regulating coefficient;
taking a certain interval of the set value r (k) as a target interval, wherein the corresponding | e (k) | parameter is beta;
when the measured value y (k) enters a target interval, the target is considered to be reached, namely | e (k) | is less than or equal to beta, e (k) | 0 is set, and the discretization formula can obtain that Δ u (k) | 0, namely u (k) is kept constant, and the system abandons negative feedback regulation to be open loop regulation, so that the output of the controlled object tends to be stable;
when the measured value y (k) does not enter the target interval, the target is not considered to be reached, namely | e (k) | > beta, the system continues to carry out negative feedback regulation,
the discretization formula is as follows: Δ u (k) ═ ae (k) — Be (k-1) + Ce (k-2) is derived from the following two formulae,
△u(k)=u(k)-u(k-1),
△u(k)=Kp【e(k)-e(k-1)】+Ki e(k)+Kd【e(k)-2e(k-1)+e(k-2)】。
preferably, when the ratio of the pure lag time to the time constant is more than or equal to 0.5, the controlled object is a large-time-lag object, and the PID system is divided into a stationary phase and a transition phase;
when the set value r (k) is changed, the plateau becomes the transition period;
the sum of pure lag and time constant is taken in the time period to satisfy
When the temperature of the water is higher than the set temperature,
is the average value of y over this time period,
is the average value of u over this time period, wherein
1% -3% of the variation range of y (k) l, theta is 1% -3% of the variation range of u (k), and the transition period is converted into the stationary period;
when the PID system is in a transition period, taking beta as 0;
and when the PID system is in a stationary period, taking beta as a positive number.
Preferably, the | e (k) | parameter β ═ 0 is taken as an actual closed-loop operation, the error of the controlled object feedback measurement value y (k) is recorded as ± α, the error range required by the target interval is assumed as ± θ, and if θ > α, β ═ θ - α is taken as β ═ θ - α.
Compared with the prior art, the invention has the following beneficial effects:
1. the frequent actuation of the actuators results from an over-pursuit of accuracy by the PID control algorithm. In fact, the state of the controlled object required by the invention is an interval instead of a point, for example, in the application scene of PID control of the room temperature, the most comfortable temperature is not known to be 24 degrees or 25 degrees, but the most comfortable temperature is generally known to be more comfortable within a certain range around 25 degrees, therefore, the invention is more practical to replace an accurate point with an interval with a certain width range as the control target.
The invention provides that the set value replaces a single point with a section, and when the set value enters a target section, the set value is considered to reach the target. That is, | e (k) ≦ β, let e (k) ≦ 0, and Δ u (k) ≦ 0, that is, u (k), may be obtained by the discretization formula, and the system abandons the negative feedback adjustment and changes it to the open loop adjustment, thereby stabilizing the target output.
The invention sacrifices a little accuracy to remarkably reduce the energy consumption, mechanical abrasion and noise of the actuator and to change the controlled object to be more stable.
The conventional view points are that the technical prejudice of the industry is as follows: due to the existence of errors, the state of the actual controlled object has a certain swing interval above and below the final set value, and the smaller the swing interval is, the higher the control quality is. Only by setting the target to one point, the system swing interval can be minimized, and the best control quality can be obtained.
The invention recognizes that in a substantially steady state of the system, such oscillations are due, on the one hand, to random disturbances and, on the other hand, to the controller itself. If we stabilize the output of the controller, only random interference is left, and better stability can be obtained, and the swing interval is reduced. With a combination of accuracy and stability, it is possible to achieve better control quality. The invention just overcomes the technical bias of the industry and has unexpected technical effect.
2. According to different states of the controlled object, different PID control algorithm adjustments can be carried out, if the controlled object is a common PID algorithm used in a transition period, and if the controlled object is in a stationary period, an interval PID algorithm is adopted, so that the accuracy and stability of system control are improved, and better system control quality is obtained.
3. The industry has not developed the present invention for the following reasons: (1) the index of the evaluation control algorithm is the control quality, the control quality only comprises rapidness, accuracy and stability, the stability is relatively light, and the consumption of an actuator is not included. In fact, a large amount of literature is synthesized, and it can be found that the step response curve of the PID to the set value is used as an evaluation standard, and the stability does not refer to the stability in a steady state, but refers to the oscillation repetition degree in the set value step response. (2) The scholars like to study linear systems, and when the interval target is introduced, the system becomes a nonlinear system, so that theoretical deduction is difficult.
4. In the basic PID control, when there is a large disturbance or a large change of a given value, the integral separation method in the PID position algorithm often generates a large overshoot and a long-time fluctuation under the action of an integral term because of a large deviation and the inertia and hysteresis of the system. This phenomenon is particularly serious in the case of a process in which the temperature, composition, etc. change slowly. Therefore, an integral separation measure can be adopted, namely, when the deviation is large, the integral action is cancelled; the integration is only put into account when the deviation is small.
The discretization formula is as follows: Δ u (t) ═ q0e (t) + q1e (t-1) + q2e (t-2),
when | e (t) | ≦ β 1,
q0=Kp1(1+T/Ti+Td/T),
q1=-Kp1(1+2Ti/T),
q2=Kp1Td/T,
when | e (t) | > β 1,
q0=Kp1(1+Td/T),
q1=-Kp1(1+2Td/T),
q2=Kp1Td/T,
u(t)=u(t-1)+Δu(t)。
wherein u (T) the output value of the controller, e (T) the error between the input of the controller and the set value, kp1 proportionality coefficient, Ti integral time constant, Td differential time constant, T regulation period, β 1 integral separation threshold.
The threshold β 1 for integral separation is set as described above, and the threshold for integral separation should be determined according to specific objects and requirements. If the threshold is too large, the purpose of integration and separation cannot be achieved, and if the threshold is too small, the controlled quantity cannot jump out of the integration and separation area, and only the PD control is carried out, residual errors will appear.
The invention is contrary to the above conclusion, when the deviation is large, the common PID is adopted, when the deviation is small, u (k) is kept unchanged, and the residual error is admitted. Yet another method is to cancel the integration and preserve PD, which is clearly different from keeping u (k) unchanged.
5. In the incremental algorithm of PID, the proportional term has the following relationship with the sign of the integral term: if the controlled quantity continues to deviate from the given value, the signs of the two terms are the same, and if the controlled quantity changes towards the given value, the signs of the two terms are opposite.
Due to this property, when the controlled quantity is close to the given value, the proportional action of the inverse sign hinders the integral action, thus avoiding integral overshoot and consequent oscillation, which is clearly advantageous for control. However, if the controlled quantity is not close to the set value, it will slow down the control process due to the inverse of the proportional and integral, just when the change to the set value is started.
In order to accelerate the starting dynamic process, a deviation range v can be set, when the deviation | e (t) | < beta 2, namely the controlled quantity is close to a given value, the regulation is carried out according to a normal rule, and when | e (t) | is more than or equal to beta 2, the deviation | e (t) |, which has the same sign with an integral term, is adjusted towards the direction favorable for being close to the given value regardless of the proportion action of positive or negative. With such an algorithm, the dynamic process of control can be accelerated.
The difference between the present invention and the incremental algorithm of the PID is as follows: in the PID incremental algorithm, the adjustment is carried out near a steady-state point according to a normal rule, the integral is cancelled in the transition process, and the point of view is the transition process; the invention adjusts the transition process according to the normal point, opens the loop near the steady state point, actually does not adjust, saves the actuator and improves the stability.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-4, the present invention provides the following technical solutions: on the basis of the ordinary PID algorithm, a parameter beta of a target interval width is added to represent an interval of a control target tolerance, if | e (k) | is less than or equal to beta, e (k) | 0, u (k) is kept constant, and if | e (k) | > beta, the normal PID algorithm is recovered.
The set value interval is used for replacing the set value, so that the remarkable reduction of the actuator on energy consumption, mechanical abrasion and noise is realized by sacrificing one point of accuracy, and the controlled object is more stable.
If | e (k) | > β, normal PID control is still resumed.
This control strategy is an improvement over the common PID algorithm, referred to as interval PID.
If beta is 0, the ordinary PID is regressed. Therefore, the control strategy is a generalization of the conventional PID, or the common PID is only a special case of the interval PID.
The specific logic operation execution process is shown in fig. 2.
The premise of the comparison between the 2 algorithm interval PIDs and the ordinary PID is that the system has entered or approached the target equilibrium point, that is, the actuator has not moved much in a long period of time, the system input has not changed much, and the system state and output have not changed significantly, and this stage of the system is called the stationary phase.
The system still has another state, the actuator has just taken place the gross movement, there is a gross change in the system input, the system state and output have not been digested the fluctuation this time. This phase is called the transition period. The transition from the plateau to the transition is typically triggered by 2 factors, one being a change in the set point and the other being a change in the system disturbance.
The process of interconversion between the plateau and the transition is shown in figure 3.
The sum of pure lag and time constant is taken in the time period to satisfy
When the temperature of the water is higher than the set temperature,
is the average value of y over this time period,
is the average value of u over this time period, wherein
1% -3% of the variation range of y (k) l, theta is 1% -3% of the variation range of u (k), and the transition period is converted into the stationary period;
in the transition period, even if | e (k) | is less than or equal to β, at this time, e (k) | 0, u (k) is not changed, whether the system and the output can better reach the target equilibrium point depends on the controlled object. If the controlled object belongs to a large time lag object (the ratio of the pure lag time to the time constant is more than or equal to 0.5), the interval PID algorithm has no advantage. Therefore, the general PID and the interval PID can be comprehensively used. The interval PID is used in the stationary phase, and the ordinary PID is used in the transition phase. The specific logic determination process is shown in fig. 4.
Example one
In the BOX temperature control at the tail end of a Variable Air Volume (VAV) air conditioning system, an air valve is used as an execution device, and the indoor measured temperature is used as a target control point. In summer, the air supply temperature of an air valve is set to be 13 degrees, the indoor temperature is required to be controlled to be 25 +/-1 degrees, a proportional regulating coefficient Kp is 10, an integral regulating coefficient Ki is 1, and a differential regulating coefficient Kd is 0.1. Taking beta as 1, 0.5 and 0 respectively, the obtained control indexes are as follows:
| β
|
1
|
0.5
|
0
|
| number of air valve actions/hour
|
1
|
2
|
13
|
| Average indoor temperature
|
24-26 random
|
24.5 to 25.5 random
|
25
|
| Range of indoor temperature variation
|
23.7-26.3
|
24.2~25.8
|
24.7~25.3 |
When beta is 0, it is the ordinary PID. In contrast, when β is 1, 0.5, the indoor average temperature does not exceed 25 ± 1 degrees of the target requirement. However, in the instantaneous temperature range, the temperature is not exceeded when β is 1 and when β is 0.5. When β is equal to 1 or β is equal to 0.5, the number of times of the damper operation is much lower than that of the general PID when β is equal to 0. Therefore, the requirement of accuracy is met by selecting beta to be 0.5, and the action times of the actuator are greatly reduced, so that the stability of the system is improved and the service life of the equipment is prolonged.
How to calculate the optimal β value is to first take β -0 for actual closed-loop operation, record the error of the target feedback value y (k) as ± α, assume the error range required by the target as ± θ, and if θ > α, take β - θ - α.
Here, α is 0.3 and θ is 1, and since 1 is > 0.3, β is 1 to 0.3 and 0.7.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.