Disclosure of Invention
In order to solve the defects and shortcomings in the prior art, the invention provides a control method based on a periodic expert controller, which comprises the following steps:
step 1: acquiring a count value of a controller and a value of a controlled variable, and comparing the value of the controlled variable with a preset conventional control parameter;
step 2: controlling the controlled variable by combining the quick response parameter according to the comparison result;
meanwhile, when the count value does not reach the preset control period, the controlled variable is controlled based on the preset trend control parameter;
and step 3: when the count value reaches the control cycle, the count value is returned to 1, and step 1 is executed again.
Optionally, the control method further includes a configuration process of the conventional control parameter, the quick response parameter, and the trend control parameter, where the configuration process includes:
configuring an upper limit parameter, a lower limit parameter and a first adjusting parameter of a controlled variable in the conventional control parameters;
configuring a quick response switch parameter, an upper limit threshold and a lower limit threshold in the quick response parameters;
configuring a trend control switch parameter, a first mark parameter representing slow change trend of the controlled variable, a second mark parameter representing abrupt change trend of the controlled variable and a second adjusting parameter in the trend control parameter;
wherein, the upper threshold is smaller than the upper parameter, and the lower threshold is larger than the lower parameter.
Optionally, the controlling the controlled variable according to the comparison result and the fast response parameter includes:
when the value of the controlled variable is not greater than the upper limit parameter, acquiring the value of the quick response switch parameter;
when the quick response switch parameter is 1, comparing the value of the controlled variable with an upper limit threshold value, adjusting a count value and a count state according to a comparison result, outputting a control action according to the count value through an actuator, and adjusting the controlled variable;
when the fast response switch parameter is 0, the current counting state is maintained.
Specifically, when the quick response switch parameter is 1, comparing the value of the controlled variable with the upper threshold, adjusting the count value and the count state according to the comparison result, and outputting a control action according to the count value through the actuator, the adjusting the controlled variable includes:
comparing whether the value of the controlled variable is smaller than an upper limit threshold value;
if not, maintaining the current counting state;
if the value is smaller than the upper limit threshold value, the count value is reset to 1, counting is stopped, and when the value of the controlled variable is changed to be larger than the upper limit parameter, the value of the controlled variable is controlled to be smaller than the upper limit parameter through the output control action of the actuator.
Optionally, the controlling the controlled variable according to the comparison result and by combining the quick response parameter further includes:
when the value of the controlled variable is not less than the lower limit parameter, acquiring the value of the quick response switch parameter;
when the quick response switch parameter is 1, comparing the value of the controlled variable with a lower limit threshold, adjusting a count value and a count state according to a comparison result, outputting a control action according to the count value through an actuator, and adjusting the controlled variable;
when the fast response switch parameter is 0, the current counting state is maintained.
Specifically, when the quick response switch parameter is 1, comparing the value of the controlled variable with the lower threshold, adjusting the count value and the count state according to the comparison result, and outputting a control action according to the count value through the actuator, the adjusting the controlled variable includes:
comparing whether the value of the controlled variable is larger than a lower threshold value;
if the current counting state is not greater than the lower limit threshold, maintaining the current counting state;
if the value is larger than the lower limit threshold, the counting value is reset to 1, counting is stopped, and when the value of the controlled variable is changed to be smaller than the lower limit parameter, the value of the controlled variable is controlled to be larger than the lower limit parameter through the output control action of the actuator.
Optionally, when the count value does not reach the preset control period, controlling the controlled variable based on the preset trend control parameter includes:
step 1: acquiring values of the trend control switch parameters;
step 2: if the trend control switch parameter is 1, adjusting a control period based on the first mark parameter, the second mark parameter and the second adjusting parameter, outputting a control action according to the adjusted control period through an actuator, adjusting a controlled variable, and repeating the step 1; if the trend control switch parameter is 0, executing the step 3;
and step 3: and (4) adding 1 to the count value, and then circulating the step 1 and the step 2 until the accumulated count value reaches a preset control period.
Specifically, if the trend control switch parameter is 1, adjusting the control period based on the first flag parameter, the second flag parameter and the second adjustment parameter, outputting a control action according to the adjusted control period through the actuator, and adjusting the controlled variable, including:
when the change rate of the controlled variable is smaller than the first mark parameter, the control period is adjusted to be larger according to the second adjusting parameter;
and when the change rate of the controlled variable is greater than the second mark parameter, the control period is reduced according to the second adjusting parameter.
Optionally, the control method further includes:
when the value of the controlled variable exceeds the range specified by the upper limit parameter and the lower limit parameter, if the current counting state is stop counting, outputting a control action based on a first adjusting parameter through an actuator, adjusting the controlled variable, returning the counting value to 1, restarting counting, and executing the step 1 again; and if the counting is not stopped currently, adding 1 to the counting value and then executing the step 1.
Optionally, the control method further includes performing restrictive control on the controlled variable according to a preset limiting parameter;
the limiting parameters comprise limiting variables, limiting control thresholds used for triggering limiting control, limiting control cycles and third adjusting parameters;
when the value of the limiting variable reaches the limiting control threshold, stopping controlling the controlled variable, and adjusting the limiting variable based on the limiting control period and the third adjusting parameter;
and when the value of the limiting variable is adjusted to be lower than the limiting control threshold, the controlled variable is restored.
The technical scheme provided by the invention has the beneficial effects that:
a trend control mode and a quick response mode are added on the basis of the traditional periodic expert controller, the value of the controlled variable can be timely adjusted through an actuator according to the change trend of the controlled variable, the limitation of a control period is overcome, quick response is realized, and the sensitivity and the control effect of the periodic expert controller are improved.
Detailed Description
To make the structure and advantages of the present invention clearer, the structure of the present invention will be further described with reference to the accompanying drawings.
Example one
As shown in fig. 1, the present invention provides a control method based on a conventional periodic expert controller, which includes:
s1: acquiring a count value of a controller and a value of a controlled variable, and comparing the value of the controlled variable with a preset conventional control parameter;
s2: controlling the controlled variable by combining the quick response parameter according to the comparison result;
meanwhile, when the count value does not reach the preset control period, controlling the controlled variable based on the preset trend control parameter;
s3: when the count value reaches the control cycle, the count value is returned to 1, and S1 is executed again.
The conventional periodic expert controller accumulates a count value through a counting unit, and controls the size of a controlled variable through an actuator when the count value reaches a preset control period. Taking the upper limit control as an example, as shown in fig. 2, a count value variable count, a control period T, and a control upper limit UH of the controlled variable P are configured in advance. After the controller is started, the counter starts counting, if the count is greater than T, a control period is indicated to pass, otherwise, the count is executed as a count +1 statement, and counting is continued. When the count is greater than T, judging the sizes of P and UH at the moment, if P is greater than UH, controlling the action of an actuator to further adjust the controlled variable so as to reduce the value of P, and simultaneously resetting the count to 1 and inputting the next period; otherwise, the actuator does not act. After a plurality of cycles, the value of P is adjusted to be smaller than UH, and the controlled variable is controlled.
A trend control mode and a quick response mode are added on the basis of the traditional periodic expert controller, the value of the controlled variable can be timely adjusted through an actuator according to the change trend of the controlled variable, the limitation of a control period is overcome, quick response is realized, and the sensitivity and the control effect of the periodic expert controller are improved. Meanwhile, the control mode of the periodic expert controller can be flexibly switched through the preset trend control parameter and the quick response parameter, so that the periodic expert controller can control the controlled variable according to the trend control mode and the quick response mode and can also control the controlled variable according to the traditional control mode.
The configuration process of the conventional control parameter, the quick response parameter and the trend control parameter comprises the following steps:
configuring an upper limit parameter, a lower limit parameter and a first adjusting parameter of a controlled variable in the conventional control parameters;
configuring a quick response switch parameter, an upper limit threshold and a lower limit threshold in the quick response parameters;
configuring a trend control switch parameter, a first mark parameter representing slow change trend of the controlled variable, a second mark parameter representing abrupt change trend of the controlled variable and a second adjusting parameter in the trend control parameter;
wherein, the upper threshold is smaller than the upper parameter, and the lower threshold is larger than the lower parameter.
In this embodiment, the conventional control parameters include T, UH, UL, AvgTime, JS _ SW and AM _ AMP, which are also required to be set in the conventional periodic expert controller, the parameter AM _ AMP is required to be set only when the actuator is a valve, which refers to the amplitude of valve adjustment, and the parameters T, UH, UL, AvgTime, JS _ SW are required to be set in all controllers, where: t is the controller adjustment time interval (control period), UH is the upper limit parameter of the controlled variable, UL is the lower limit parameter of the controlled variable, AvgTime is the sampling time taken to measure the average value of the controlled variable, JS _ SW is the count switch, the controller is in the count state when JS _ SW is 1, and the controller stops counting when JS _ SW is 0. It should be noted that, where the parameters UH and UL are often set to be narrower than the critical value, a certain margin is required for control, for example, the pressure is required to be controlled to be 0.25MPa to 0.35MPa, and the parameters UH <0.35MPa and UL >0.25MPa are often set according to the actual process conditions and adjustment.
The trend control parameters comprise TDCT _ SW, TD, TDD and TAD, and the trend control is a control strategy for determining whether the actuator needs to output a control action by judging the change trend of the controlled variable aiming at the conditions of lag and slow response. Wherein: TDCT _ SW is a trend control switch, and the trend control mode is started only when the value of TDCT _ SW is 1, otherwise, other parameter settings of the trend control are invalid; TD is the execution parameter of the trend control, the time interval of the regulation is represented, the unit is second, the interval of the control time is regulated according to the change trend of the controlled variable P, and then the condition of overshooting or untimely regulation is avoided; the TDD is a parameter designed for alleviating slow trend change so as to enable counting accumulation to cause the occurrence of an overshoot phenomenon, when the controlled variable P has a condition set by the TDD, the change rate of the current P is slow, and in order to avoid the overshoot phenomenon, the time interval of control is adjusted by the TD, namely, the control period is adjusted to be large so as to avoid the overshoot phenomenon; TAD is a parameter designed to alleviate the problem that the adjustment is not timely due to sudden change of a curve or a trend caused by factors such as sudden disturbance, when a controlled variable P is set by TAD, it indicates that P is suddenly changed currently, and the time interval of control is adjusted by TD, that is, the control period is adjusted to be small, so as to avoid the control hysteresis phenomenon when the adjustment is not timely. For example, in the main steam pressure control of the steam turbine generator, the control effect of the speed increasing and reducing on the main steam pressure is unstable, the lag is large, and even when the pressure is still lower than the lower limit, the phenomenon that the pressure exceeds the upper limit due to the fact that the speed is reduced once more is often caused, at the moment, the trend control is introduced to have a better effect, and by setting the parameters TDD, TAD and TD, the problems can be effectively relieved, the automatic control of the steam turbine generator is realized, and the labor load of operators is reduced.
The quick response parameters comprise QKRP _ SW, K1 and K2, and the quick response means that the controller can quickly make judgment and respond once the controlled variable exceeds the upper limit and the lower limit. Wherein: the QKRP _ SW is a quick response switch, the quick response is started only when the value of the QKRP _ SW is 1, otherwise, other parameter settings of the quick response are invalid; k1 is suitable for use when the controller is actuated to lower the controlled variable to a value near UH, and is significant in that when the actuator is actuated to lower K1< P < UH, the controller's counter value will not reset immediately in order to prevent overshoot of the counter switch and counter value reset caused by the controlled variable floating up and down UH. When P < K1, the change of P is not caused by fluctuation, but it is determined that there is interference or special condition to make P lower, and the actuator is definitely switched in control. The counting value is reset to 1, JW _ SW is 0, the actuator is in a standby state at any time, once P is larger than UH again, the controller is not limited by the control period at the moment and immediately outputs a control action regulation P, otherwise, when quick response is not started, the controller is always in counting until the control period T is reached and the control action is output, and the problem of untimely response is easily caused.
The meaning of K2 is similar to that of K1, and is suitable for the situation where the controller acts to raise the controlled variable to near UL, and is not described herein.
In addition, an upper limit threshold K1 and a lower limit threshold K2 in the quick response parameters are configured based on an upper limit parameter UH and a lower limit parameter UL in the conventional control parameters, the upper limit threshold K1 is smaller than the upper limit parameter UH of the controlled variable, and the lower limit threshold K2 is larger than the lower limit parameter UL of the controlled variable.
In the present embodiment, the trend control and the quick response are simultaneously possible. The trend control is effected by the control period, and the fast response is independent of the control period.
The configuration of the trend control parameter, the quick response parameter and the conventional control parameter is beneficial to the trend control and the quick response of the subsequent controller to the controlled variable according to different control conditions and control requirements. Meanwhile, by closing the trend control switch and the quick response control switch, namely when TDCT _ SW is 0 and QKRP _ SW is 0, the function of switching from the extended periodic controller to the conventional periodic expert controller can be realized.
In this embodiment, the initial count value at the time of starting the controller is 1, that is, count is 1, and the count value is accumulated by taking 1 as an amplitude according to an instruction cycle of a processing system in the controller, that is, count +1 every time an instruction cycle passes. When the count switch JS _ SW is 1, it indicates that counting is being performed, and at this time, the actuator does not execute the control operation even if the count P > UH; when the count switch is equal to 0, the count value is normally reset to 1, the controller is in a detection standby state, as long as P is greater than UH, the actuator is immediately operated, and simultaneously the count switch is set to 1 to start counting
The control of the controlled variable according to the comparison result and the quick response parameter comprises the following steps:
when the value of the controlled variable is not greater than the upper limit parameter, acquiring the value of the quick response switch parameter;
when the quick response switch parameter is 1, comparing the value of the controlled variable with an upper limit threshold value, adjusting a count value and a count state according to a comparison result, outputting a control action according to the count value through an actuator, and adjusting the controlled variable;
when the fast response switch parameter is 0, the current counting state is maintained.
When the quick response switch parameter is 1, comparing whether the value of the controlled variable is smaller than an upper limit threshold value;
if not, maintaining the current counting state;
if the value is smaller than the upper limit threshold value, the count value is reset to 1, counting is stopped, and when the value of the controlled variable is changed to be larger than the upper limit parameter, the value of the controlled variable is controlled to be smaller than the upper limit parameter through the output control action of the actuator.
Firstly, whether the controlled variable P reaches the critical value is judged, taking the case that the controlled variable P exceeds the upper limit parameter UH in the conventional control parameter as an example, as shown in fig. 3, the magnitudes of P and UH are compared through a condition judgment step, if P is less than or equal to UH, the value of QKRP _ SW is obtained, if QKRP _ SW is 1, it indicates that the controlled variable P has a requirement of fast response, and the controller enters a fast response mode. Comparing the size of P with K1, when K1< P < UH, if JS _ SW equals 1, continuing counting, if JS _ SW equals 0, stopping counting, and keeping count equal to 1, namely, not intervening in the counting state. When P < K1, the change of P is not caused by up-and-down floating, but the disturbance or special working condition is determined to make P lower, at this time, count is reset to 1, JS _ SW is equal to 0, the actuator is in a state of standby at any time, and as long as P exceeds UH again, the actuator can immediately output control action, and the response speed is improved.
If P is greater than UH, the value of the controlled variable exceeds the set upper limit at the moment, and the controller is required to adjust. At this time, if JS _ SW is equal to 0, the control actuator outputs a control operation in response.
The control of the controlled variable according to the comparison result and the quick response parameter also comprises:
when the value of the controlled variable is not less than the lower limit parameter, acquiring the value of the quick response switch parameter; when the quick response switch parameter is 1, comparing the value of the controlled variable with a lower limit threshold, adjusting a count value and a count state according to a comparison result, outputting a control action according to the count value through an actuator, and adjusting the controlled variable; when the fast response switch parameter is 0, the current counting state is maintained.
When the quick response switch parameter is 1, comparing whether the value of the controlled variable is greater than a lower limit threshold value; if the current counting state is not greater than the lower limit threshold, maintaining the current counting state; if the value is larger than the lower limit threshold, the counting value is reset to 1, counting is stopped, and when the value of the controlled variable is changed to be smaller than the lower limit parameter, the value of the controlled variable is controlled to be larger than the lower limit parameter through the output control action of the actuator.
The adjustment principle for the lower threshold is the same as that for the upper threshold, and is not described here again. Referring to the above adjustment process, when QKRP _ SW is equal to 1, when P > K2, the count value is reset to 1, the counting is stopped, the actuator is in the ready-to-use state, at this time, the count is reset to 1, JS _ SW is equal to 0, the actuator is in the ready-to-use state, and as long as P is less than UL again, the actuator immediately outputs a control action, thereby increasing the response speed.
The quick response control is not limited by the control cycle, as long as QKRP _ SW is 1, the controller starts a quick response control mode, no matter whether the count value reaches the control cycle, the actuator is triggered to output a control action as long as the condition that P is greater than UH or P is less than UL occurs, the actuator can adjust the controlled variable at any moment, the problem of untimely response caused by outputting the control action based on the control cycle is solved, and the aim of improving the response speed of the controller is fulfilled.
When the counting value does not reach the preset control period, the controlled variable is controlled based on the preset trend control parameter, and the method comprises the following steps:
step 1: acquiring values of the trend control switch parameters;
step 2: if the trend control switch parameter is 1, adjusting a control period based on the first mark parameter, the second mark parameter and the second adjusting parameter, outputting a control action according to the adjusted control period through an actuator, adjusting a controlled variable, and repeating the step 1; if the trend control switch parameter is 0, executing the step 3;
and step 3: and (4) adding 1 to the count value, and then circulating the step 1 and the step 2 until the accumulated count value reaches a preset control period.
As shown in fig. 3, after the controller is started, it is first determined whether the counter switch is turned ON and whether the count value reaches a preset control period by the counter, and when JS _ SW is equal to 1 and count is less than T, it is determined whether the trend control switch is turned ON, the trend control mode is ON when TDCT _ SW is equal to 1, the controlled variable P has a trend control demand, the trend control mode is OFF when TDCT _ SW is equal to 0, and the controlled variable P has no trend control demand. When TDCT _ SW is equal to 1, counting is suspended, trend control is carried out on P, if the change rate of P is smaller than the value of TDD, the change of P is slow, and the control period is increased according to the value of TD, namely the control period T1 is equal to T + TD. Returning the count value count to the step of judging by the counter, and circulating until TDCT _ SW is equal to 0 according to a control period T1; if the rate of change of P is greater than the value of TAD, it indicates that P is abruptly changed at this time, and the control period is adjusted to be smaller according to the value of TD, that is, the control period T2 is T-TD at this time. The count value count is returned to the counter determination step, and the process is cycled until TDCT _ SW becomes 0 according to the control period T2. And when the TDCT _ SW is equal to 0, adding 1 to the count value count, that is, the count value count is equal to count +1, and returning the count value count to the step of judging by the counter.
For example, in the application scenario of the main steam pressure control of the steam turbine generator, the main steam pressure of the on-site steam turbine generator is controlled by two buttons of speed increasing and speed decreasing on a control system. When the main steam pressure is too large, the speed-up button needs to be pressed to reduce the main steam pressure; otherwise, the main steam pressure is increased by pressing the speed reduction button. If the main steam pressure control is performed manually, the labor intensity of an operator is high, the problem that the action response delay of the speed increasing button and the speed reducing button is large exists, and the phenomenon of overshoot caused by pressing the speed increasing button or the speed reducing button once frequently occurs due to the frequent change of the change trend of the main steam pressure. By applying the control method provided by the invention, the following control parameters are set by selecting the button click-type expanded periodic expert controller:
the control period T is 50 and the unit is second; a trend control switch parameter TDCT _ SW in the trend control parameters is 1, a first flag parameter TDD is 10 with the unit of kPa/s, a second flag parameter TAD is 40 with the unit of kPa/s, and a second regulation parameter TD is 5, so as to alleviate the problem of overshoot or untimely regulation caused by slow change of main steam pressure or sudden change of trend, and regulate a control period with the unit of second; in the conventional control parameters, the upper limit parameter UH is 3.31 and the unit is MPa, the lower limit parameter UL is 3.275 and the unit is MPa, and the average value time AvgTime of the main steam pressure measurement is 5 and the unit is second.
By setting the trend control parameters, the response control action is output according to the change trend of the controlled variable, the situations of delay and slow response are avoided, the overshoot phenomenon and untimely adjustment are avoided, the sensitivity of the controller is improved, and the control effect is optimized.
The control method further comprises the following steps:
when the value of the controlled variable exceeds the range specified by the upper limit parameter and the lower limit parameter, namely P < UL or P > UH, if JS _ SW is 0, the actuator outputs a control action based on the first adjusting parameter, the controlled variable is adjusted, the count value is returned to 1 for restarting counting, and the step 1 is executed again; and if the counting is not stopped currently, adding 1 to the counting value and then executing the step 1.
When the count is T +1, that is, the count value reaches a preset control period, if the value of P at this time exceeds the range specified by the conventional control parameter, that is, P > UH or P < UL, the controller outputs a control action based on the amplitude configured by the first adjustment parameter by using the control method of the conventional periodic expert controller, and further adjusts the value of P. For example, when the actuator is a valve, the amplitude of the valve is adjusted according to the value of AM AMP, so that the controlled variable P is adjusted to be below UH. After the actuator outputs the control action, if JS _ SW is 1, counting is continued, and the values of JS _ SW and count are returned to the new control cycle. The principle here is the same as that of a conventional cyclic expert controller and is not described here in detail.
The control method also carries out restrictive control on the controlled variable by preset limiting parameters, wherein the limiting parameters comprise a limiting variable L, a limiting threshold parameter LIM for triggering the restrictive control, a restrictive control period TLIM and a third adjusting parameter.
In practical control application, the controlled variable is often in linkage relation with other variables, for example, the steam pressure of a steam turbine is controlled while the power of the steam turbine is ensured to be within a specific range, if the power exceeds the specific range, the power is firstly adjusted to be within a normal range, and then the steam pressure is controlled, wherein the power is the limiting variable L.
When the value of L reaches LIM, stopping controlling the controlled variable P, and adjusting the value of L by the set amplitude based on TLIM by a third adjusting parameter;
control of the controlled variable is resumed when the value of L is adjusted to no longer reach TLIM, i.e. when the restrictive control is no longer triggered.
The sequence numbers in the above embodiments are merely for description, and do not represent the sequence of the assembly or the use of the components.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as 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.