Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making under the creative work prerequisite, and the every other embodiment that obtains belongs to protection domain of the present invention.
In water treatment procedure, the water outlet quality that how much is directly connected to water factory of flocculating agent injected volume.The embodiment of the invention is based on the injected volume that Predictive function control (PFC) realizes intelligent control flocculating agent.Described Predictive function control (PFC) is a kind of advanced control algorithm based on model, and it decides its optimum control effect by the output of prediction controlled device and in conjunction with rolling optimization.
The PFC most important is exactly control inputs to be regarded as the linear combination of one group of basis function.Among the conventional P FC, the selection of basis function depends primarily on the characteristic of reference locus and controll plant, generally can be taken as step function, ramp function and exponential function etc.These basis functions are overall situation function, and their mathematical meaning is clear and definite, it is simple to calculate, but objective function often is reduced to that optimization to prediction time domain terminal point requires or one or two match point wherein, have sacrificed the global optimization target of whole prediction time domain.Therefore, conventional P FC can only carry out approach to limited several match points in the prediction time domain, fail to consider the optimization of whole prediction time domain global error performance, whole approximation capability to reference locus is not very good, has reduced system anti-load disturbance and has eliminated the ability of the deviation that model mismatch causes.
Generally speaking, in control procedure, to reference locus approach requirement should with prediction constantly increase and weaken gradually, utilize these characteristics to adopt certain aggregate measure with the assembly variable replacing of original optimized variable with one group of low-dimensional, then can greatly reduce the on-line optimization calculated amount, improve the rapidity of algorithm, thereby satisfy the purpose of real-time optimization.
Existing approach thought based on Fourier and adopt sinusoidal polynomial function as basis function, the performance that can be well controlled and the scope of application.But sine function is overall situation function, can't arrange flexibly according to the characteristics that approaching of reference locus required to weaken gradually with the increase in the prediction moment, therefore needs to select to have the local function of tight supportive as basis function.And adopt the saturation function approximation method to be difficult to obtain analytical expression.Have, available small echo is as basis function again, and in certain prediction time domain, to the demanding period of approximation accuracy, selecting thin yardstick small echo is basis function; Approximation accuracy is required the not too high period, take thick yardstick small echo as basis function.So both guaranteed that global optimization target and current time controlled quentity controlled variable to next constantly approximation accuracy requirement of reference locus, had reduced as far as possible again the basis function number, thereby reduced weight coefficient number to be optimized, realized the assembly of optimized variable.But neither be easily to choosing of wavelet basis, selecting what wavelet basiss and which selects plant wavelet basis does not have good foundation, can only try to gather relatively to obtain one group of suitable wavelet basis as the basis function of PFC.
Based on this, with reference to figure 1, be a kind of embodiment of the method 1 of controlling supply quantity of water-treatment flocculating agent that the embodiment of the invention provides, described method specifically comprises the steps:
Step 101: on the basis of current time control inputs, choose basis function with undetermined coefficient as next increment of control inputs constantly, default after each constantly the increment of control inputs be that the increment of previous moment control inputs multiply by gene given in advance.
The embodiment of the invention is chosen undetermined coefficient on the basis of current time dosage basis function as next constantly the increment of control inputs control the injected volume of flocculating agent, here, described current time dosage can be given in advance one smaller dosage, perhaps is considered as zero.
Basis function described in the embodiment of the invention is step function, and the step function that this step function is compared conventional P FC has increased a gene given in advance, after default each constantly the increment of control inputs be previous moment control inputs increment gene doubly, even described gene becomes each constantly common ratio of the Geometric Sequence that forms of control inputs increment.
Choose gene for less than 1 number, can realize following each constantly the increment of the flocculating agent injected volume increment of comparing previous moment reducing gradually, namely having genic basis function weakens gradually along with the increase in the prediction moment, can strengthen like this objective function to the degree of fitting of prediction time domain, meet the requirement that approaches of reference locus.
Step 102: by forecast model to current time and following constantly filter before water turbidity predict output, obtain the track of a prediction output.
Before the control flocculating agent was thrown in, forecast model of model, described forecast model were used for water turbidity before current time and the filter in the following moment is predicted output.Described prediction output is comprised of two parts, is respectively that free response responds with being forced to; Wherein, described free response is the model response that the control inputs by previous moment causes, described to be forced to respond be the model response that is caused by the control inputs that current time increases newly, and this two-part model response stack is the prediction output that forecast model draws.In step, described forecast model all obtains a prediction output according to the control inputs in each step at optimal control time domain H, and these prediction outputs can form a curve, claim the track of this curve for prediction output.The time domain of control described in the present embodiment H step is manual control, can determine as the case may be the numerical value of H.
Step 103: the track of being determined a desired output by the expectation value of water turbidity before the prediction of current time output and the given filter.
In water treatment procedure, we can an at first given filter before the expectation value of water turbidity, by the injected volume of control flocculating agent, so that water turbidity progressively approaches or reaches described expectation value before the filter behind the flocculation sediment.But the control injected volume of flocculating agent and non-once just can so that before the filter water turbidity reach expectation value, control procedure always one make water turbidity before the filter slowly near the process of expectation value.Here, the expectation value of water turbidity can be determined the reference locus of a desired output before the prediction output of the current time that is drawn by forecast model and the given filter, in optimal control time domain H goes on foot, regulate control inputs by having genic basis function as the increment of control inputs, prediction output meeting moves closer to the reference locus of desired output with prediction increase constantly under the effect of described control inputs.
Step 104: the track of described prediction output and the track of desired output are carried out match, try to achieve the coefficient of basis function according to the principle of least square, thereby draw next control inputs constantly.
The track of the prediction output that will be obtained by step 102 and carry out match by the reference locus of the determined desired output of step 103, namely choose an evaluation function, described evaluation function can be the difference of desired output and prediction output, according to the principle of least square described evaluation function is carried out the coefficient that differentiate can be tried to achieve basis function, thereby draw next control inputs constantly.In the situation that next control inputs is constantly determined, here the increment of each control inputs constantly after can not determining according to gene described in the step 101, but the basis function that should again choose new undetermined coefficient on the basis of next moment control inputs enters next cyclic process as the lower constantly increment of control inputs.
Step 105: by neural network described forecast model is revised online, then execution in step 101.
Before entering next cyclic process, also should revise online described forecast model by neural network.Because the complexity of flocculation sediment process changes, meeting is so that forecast model departs from the dispensing process at leisure, it is more and more lower to make forecast model meet the degree of dispensing process, at last after forecast model is offset to a boundary, PFC controls inefficacy, therefore should in time revise forecast model in the control procedure, can adapt to the variation of water quality.In the concrete control procedure, can revise online described forecast model according to the residual sum water quality parameter; Wherein, described residual error is the difference of prediction output and actual output; Described water quality parameter comprises the temperature of pH value, water of turbidity, the water of flow, the water of water or dosage etc.After described forecast model revised, execution in step 101 entered in the next cycle control.
Can find out from above-described embodiment, the present invention has adopted to have genic step function and regulates control inputs as the increment of control inputs, by forecast model to current time and following constantly filter before water turbidity predict output, will prediction output and desired output compare the control inputs that just can try to achieve next moment.The embodiment of the invention is regulated control inputs owing to take to have genic step function, thereby so that the increment of flocculating agent injected volume weakens gradually with the increase in the prediction moment, meets the requirement that approaches of reference locus; And the embodiment of the invention adopts neural network that forecast model is revised online, has strengthened the adaptability of forecast model to control procedure.
Technical solution of the present invention is easier to be understood in order to make, and the below describes in detail with a specific embodiment.With reference to figure 2, be a kind of embodiment of the method 2 of controlling supply quantity of water-treatment flocculating agent that the embodiment of the invention provides, present embodiment specifically can comprise the steps:
Step 201: on the basis of current time control inputs, choose basis function with undetermined coefficient as next increment of control inputs constantly, default after each constantly the increment of control inputs be that the increment of previous moment control inputs multiply by gene given in advance.
In specific implementation process, can choose different basis functions according to water factory's actual conditions, can be regulated by the linear combination of basis function the injected volume of flocculating agent as the increment of control inputs.Choosing basis function in the present embodiment is a step function ε, because step function is unit function, so we can think that ε is weight coefficient to be asked, and chooses step function and can so that calculate simply, realize quick computing.The current time dosage is given u (k) in the present embodiment, and wherein, k is current time, and then next is that k+1 control inputs constantly is constantly:
u(k+1)=u(k)+ε(1)
Present embodiment has added gene δ given in advance on the basis of step function ε, in the PFC process, the default later on increment of each moment flocculating agent injected volume is gene δ times of previous moment flocculating agent injected volume increment, and namely the injected volume of k+2 moment flocculating agent is:
u(k+2)=u(k+1)+δε=u(k)+ε+δε(2)
The k+3 constantly injected volume of flocculating agent is:
u(k+3)=u(k+2)+δ
2ε=u(k)+ε+δε+δ
2ε(3)
By that analogy, then in control time domain H went on foot, the default H constantly injected volume of flocculating agent was:
u(k+H)=u(k+H-1)+δ
H-1ε=u(k)+ε+δε+δ
2ε+…+δ
H-1ε(4)
Can be found out that by top relational expression in the step, default each the constantly increment of flocculating agent injected volume forms a Geometric Sequence at control time domain H, the common ratio of described Geometric Sequence namely is gene δ.Select gene δ for less than 1 number herein, can guarantee to have genic basis function with prediction constantly increase and progressively weaken, meet the requirement that approaches of reference locus.
Step 202: set up forecast model.
Choose undetermined coefficient, have genic step function ε after, need to set up a forecast model to current time and following constantly filter before water turbidity predict output.The mathematic(al) representation of the forecast model of setting up in the present embodiment is:
y
m(k+i)=f(u(k+i))(5)
Wherein, f (x) is the functional expression of described forecast model, and u (k+i) is illustrated in constantly default control inputs of k+i, and k represents current time, and the span of i be from 1 to H, then formula (5) expression to filter constantly in future before the prediction of water turbidity export.
Step 203: by forecast model to current time and following constantly filter before water turbidity predict output.
In control time domain H goes on foot, having provided each step in the following moment in the step 201 has a default control inputs u (k+i), forecast model to be used for making the default control input u (k+i) in each step to obtain prediction output under the effect of function f (x).The prediction output in described each step includes two parts content, and a part is free response, and another part is to be forced to response; Wherein, described free response be by the past be the model response that flocculating agent that previous step adds causes constantly, it is described that to be forced to respond be relatively to pass by the model response that the injected volume of newly-increased flocculating agent constantly causes by current time, this two parts model response and namely be forecast model to filter under the default control input action before the prediction output of water turbidity.
Here also should predict output to the control inputs u (k) of current time by forecast model, to make things convenient for the reference locus of determining desired output in the step 205.
Step 204: error compensation is carried out in described prediction output, obtain simultaneously the track of the prediction output after the compensation.
Before the filter that is obtained by described forecast model the prediction of water turbidity output always because time lag, the time change, environment, water quality etc. former thereby with the reality filter before the output of water turbidity be not inconsistent, for this reason, we carry out error compensation to described prediction output, so that its more realistic output.
By forecast model current time control inputs u (k) is predicted that output obtains y
m(k), consider the reason of time lag, water turbidity y before the filter that current time is recorded
m(k) carry out error compensation and obtain y
p(k), y
p(k) expression is:
y
p(k)=y(k)+y
m(k)-y
m(k-L)(6)
Wherein, y (k) is water turbidity before the actual measured filter of current time, and L is the retardation time that current time is exerted an influence, y
m(k-L) be k-L prediction output constantly.
When error compensation is carried out in the prediction output in the moment in future, at first calculate the difference of the prediction output of the actual output of current time and current time, then export the basis in prediction constantly in future and add this difference, can effectively reduce like this each prediction output and actual error of exporting constantly, so that the more approaching actual output of described prediction output, concrete mathematic(al) representation is:
y
p(k+i)=y
m(k+i)+e(k+i)(7)
e(k+i)=y(k)-y
m(k)(8)
Wherein, y
p(k+i) expression k+i exports the prediction after future, prediction output constantly compensated constantly, the current k of e (k+i) expression actual output constantly and the difference of prediction output, and the span of i is from 1 to H.
Prediction output by water turbidity before the filter after current time and the following constantly compensation can be drawn a curve, the prediction output trajectory after this curve is referred to as to compensate.
Step 205: the track of being determined a desired output by the expectation value of water turbidity before the output of the prediction after the current time compensation and the given filter.
In water treatment procedure, always preset an expectation value, choosing the front water turbidity expectation value of filter in the embodiment of the invention is Tu, can not make the prediction output y after current time compensates in the control procedure with settling at one go
p(k) be issued to expectation value Tu in next control inputs effect constantly, control procedure is always As time goes on so that filter gradually convergence expectation value Tu of front water turbidity.Therefore by the prediction output y after the current time compensation
p(k) and expectation value Tu given in advance can determine the reference locus of a desired output, the expression of reference locus described in the present embodiment is:
y
r(k+i)=(1-e
-i)Tu+e
-iy
p(k)(9)
In the formula, Tu is the front water turbidity setting value of filter, and this value is determined value given in advance; y
p(k) be the prediction output of current k after constantly compensating, expression is seen formula (6); The span of i is from 1 to H; E is natural logarithm.
Can be found out in the situation that overhead control time H determines that by formula (9) reference locus of desired output has just had the two ends point value of determining, and then according to the variation of control time i from 1 to H, the whole piece reference locus has just been determined also.
With reference to figure 3, a kind of principle schematic of controlling supply quantity of water-treatment flocculating agent that provides for the embodiment of the invention.The control principle of PFC is exactly to optimize time domain at H() in the step, the controlled quentity controlled variable increment in each step is all definite, they all are the linear combination of one group of basis function, and optimize time domain from the first step to H() variation of step increment has certain rule, can say that it is to change with an acceleration under a speed; So under given reference locus, make before the filter water turbidity along or progressively arrive expectation value near reference locus, try to achieve the linear combination coefficient of basis function according to this principle, try to achieve last controlled quentity controlled variable with this.
Constantly as the separatrix whole control time domain is divided in the past and following two parts take current k among the figure, following control procedure time is from k to k+H.U is illustrated in the control inputs curve under the effect with genic step function among the figure; Ym represents that water turbidity is predicted the curve that output obtains before forecast model is to the filter under the control inputs effect; Yp carries out estimation curve of output after the error compensation to the prediction that obtained by described forecast model output ym, and the expression formula of yp is seen formula (7), and wherein, the difference between yp and the ym is offset e, and the expression formula of described offset e is seen formula (8); Yr is the reference locus of desired output, and expression is seen formula (9).Control procedure is exactly the prediction curve of output yp process of convergence desired output reference locus yr gradually that makes after the compensation.
Step 206: the track of the output of the prediction after the described compensation and the track of desired output are carried out match, try to achieve the coefficient of basis function according to the principle of least square, thereby draw next control inputs constantly.
For prediction output trajectory that can be after mathematics is described compensation and the coincidence degree of desired output track, provide an evaluation function in the embodiment of the invention, expression is:
The J of evaluation function described in the present embodiment is optimizing time domain H in the step, the quadratic sum of the difference of the prediction output after each step desired output and the compensation, the value of described evaluation function J more levels off to zero, show prediction output after the compensation more near desired output, this situation is the control inputs that we want.Therefore according to the principle of least square described evaluation function J is carried out differentiate, gets extreme value, and then can try to achieve the weight coefficient ε of step function, thereby draw exactly next constantly injected volume of flocculating agent.
In next situation that control inputs is determined constantly, the increment of each moment control inputs after can not determining according to gene described in the step 201, but should with next constantly control inputs and then calculate the control inputs in the lower moment by next cyclic process as known dosage.
With reference to figure 4, a kind of structural representation of controlling supply quantity of water-treatment flocculating agent that provides for the embodiment of the invention.The characteristics of PFC maximum are exactly with the control inputs structuring, select suitable basis function, just can obtain the control inputs that we want according to the linear combination of basis function.There is shown the cyclic process of the dosing of under the regulating action of basis function, flocculating, the amount of the flocculating agent constantly thrown in for current k of u (k) wherein, y (k) is the front water turbidity of the constantly actual filter that records of current k, under the acting in conjunction of basis function and current k moment control inputs, forecast model is to predicting output in the following H step optimization time domain, and then draw model value, described model value carries out error compensation through actual delivery turbidity y (k) and obtains the output of process generalized object, described process generalized object output and desired output carry out match, calculate next control inputs u (k+1) constantly by the principle of least square, u (k+1) as the known dosage in the next cyclic process, and then is asked k+2 control inputs constantly.
Step 207: by neural network described forecast model is revised online, then execution in step 201.
Because flocculation sediment is physics, the chemical process of a complexity, therefore, be used for predicting that the forecast model of the front water turbidity of filter can slowly depart from the dispensing process along with the variation of the factors such as environment, water quality, be forecast model meet the degree of dispensing process can be more and more lower, when forecast model was offset to a boundary, PFC control will be lost efficacy.
For so that forecast model can adapt to the variation of water quality, environment etc., need to revise online forecast model.By neural network forecast model is revised online in the embodiment of the invention.With reference to figure 5, for having increased a kind of structural representation of controlling supply quantity of water-treatment flocculating agent after the neural network.Fig. 5 has increased a neural network on the basis of Fig. 4, this neural network can be revised described forecast model online according to the residual sum water quality parameter, the adaptability of forecast model is strengthened, thereby control was lost efficacy.Here, described residual error is the difference of prediction output and actual output, and described water quality parameter comprises the turbidity of pH value, water of temperature, the water of flow, the water of water or dosage etc.
The principle of utilizing neural network that forecast model is revised is: must exist certain linearity or nonlinear funtcional relationship between residual error and the model parameter, be P with function representation
t=F (e
t).But simply can't guarantee the grade of fit of model parameter with residual error correction, so will add that also water quality parameter guarantees.Suppose that residual sequence is designated as: E=(e
1, e
1..., e
n), calculate the prediction model parameters value with the value of residual sum water quality parameter, then funtcional relationship becomes: P=F (e, X).Go to approach this funtcional relationship with neural network model, can fully improve the nonlinear prediction precision of data.
With reference to figure 6, the structural representation of a kind of neural network that provides for the embodiment of the invention.This figure is BP three-layer neural network structural drawing, comprises input layer, hidden layer and output layer; Wherein, input layer and hidden layer are necessary layers, and the input layer number is the input number of samples, and the output layer neuron number is the output sample number; Hidden layer is variable layer, and its neuron number is determined by particular problem, needs could determine after constantly adjustment reaches precision.
In the embodiment of the invention, neural network is revised forecast model according to the residual sum water quality parameter; Described water quality parameter comprises the flow of water, the temperature of water, the pH value of water, turbidity and 5 factors of dosage of water, adds the residual error factor, so the input layer number is 6, certainly, different input layer numbers also can be different according to circumstances; The output layer neuron number is the number of parameters of forecast model.Wherein, the input sample is the residual sum water quality parameter, chooses n group input sample data; The output sample sequence is prediction model parameters, also chooses the n group, and herein, model parameter is the model parameter by the forecast model of the water quality parameter input sample data foundation of correspondence.Constantly adjust weights W through the BP neural network BP training algorithm
IjWith threshold value V
j, and manual adjustments hidden layer neuron number reaches the final weights W of determining after the precision of forecasting model
Ij, threshold value V
jWith the hidden layer neuron number.
When using neural metwork training, at first whole samples are made normalized, then choose at random one group of sample and offer network, calculate the neuronic weights W of each hidden layer and output layer
IjWith threshold value V
j, then choose at random next group sample and carry out same training, until n sample training is complete.From n sample, choose again one group of sample training, until network global error E is less than predetermined minimal value, i.e. network convergence; If frequency of training is greater than predefined value, then network can't be restrained.Train complete after, obtain a model parameter sequence:
The number of prediction model parameters is 14 in the embodiment of the invention, and described model parameter number also can be different and different according to circumstances.The model parameter sequence that obtains with training replaces original model parameter, can obtain more accurately model, and be applied among the PFC this moment, makes the control better effects if.
Certainly, step 207 is not limited to this, as long as the factors such as environment, water quality change, can revise in real time forecast model.Before the next cyclic process of beginning, forecast model is revised online execution in step 201 after revising in the present embodiment.
Present embodiment has been set forth technical scheme of the present invention by comparatively detailed example, relative above-described embodiment, present embodiment can not only satisfy approaching of reference locus required the requirement that weakens and described forecast model is revised online with prediction increase constantly, and owing to error compensation has been carried out in the prediction output that forecast model is recorded, therefore can control more exactly the injected volume of flocculating agent.
The embodiment of the invention also discloses a kind of system that controls supply quantity of water-treatment flocculating agent, with reference to figure 7, be a kind of system embodiment 1 of controlling supply quantity of water-treatment flocculating agent, system specifically comprises described in the present embodiment: control inputs module 701, prediction output module 702, optimization module 703 and correcting module 704.
Wherein, described control inputs module 701 is used for choosing the basis function of undetermined coefficient as the increment of next moment control inputs, and the increment of presetting simultaneously later each moment control inputs is that the increment of previous moment control inputs multiply by gene given in advance.
In the specific implementation process, choose and have genic basis function is regulated flocculating agent as the increment of control inputs injected volume.Choose gene in the present embodiment for less than 1 number, like this so that the increment of the flocculating agent injected volume that basis function is controlled in time increase and successively decrease, satisfy that approaching of reference locus required to weaken with prediction increase constantly, and can strengthen objective function to the degree of fitting of prediction time domain.
Described prediction output module 702 is used for water turbidity before the following filter constantly under current time and 701 effects of control inputs module is predicted output, obtains simultaneously the track of a prediction output.
Under the effect of the constantly given control inputs u (k) of current k, obtain the prediction output that current k filters front water turbidity constantly by prediction output module 702; Simultaneously, under the effect of the following control inputs u (k+i) constantly that control inputs module 701 is preset, obtain following prediction output of constantly filtering front water turbidity by prediction output module 702, these prediction output composition curves constantly in future, this curve is referred to as to predict the track of output.
Described optimization module 703 is used for determining according to the expectation value of water turbidity before the prediction of current time output and the given filter track of a desired output, and the track that described prediction is exported and the track of desired output carry out match, thereby tries to achieve the coefficient of basis function.
In water treatment procedure, always preset an expectation value, described expectation value is the desired output of the front water turbidity of filter behind the flocculation sediment, but just can reach expectation value so that filter front water turbidity owing to throwing in flocculating agent and non-once, but needs repeatedly to throw in make it move closer to expectation value.Therefore, can determine the track of a desired output according to the expectation value of water turbidity before the prediction of current time output and the given filter, in order to make passing that water turbidity before the filter of throwing in after the flocculating agent can be in time progressively approaching or reach expectation value.
Described optimization module 703 is at first determined the reference locus of a desired output according to the expectation value of water turbidity before the prediction of current time output and the given filter, then will carry out match by prediction output trajectory and the desired output track that described prediction output module 702 obtains, try to achieve the undetermined coefficient of basis function according to the principle of least square, and then can draw next constantly injected volume of flocculating agent.With next constantly the injected volume of flocculating agent enter cyclic process next time as known control inputs.
Described correcting module 704 is used for by neural network described prediction output module 702 being revised online.
Because flocculation sediment is physics, the chemical process of a complexity, therefore As time goes on, the variation of the factor such as environment, water quality can make prediction output module 702 slowly depart from the dispensing process, and when prediction output module 702 departed from the dispensing process and reaches a boundary, PFC control will be lost efficacy.Therefore for so that prediction output module 702 can adapt to the variation of water quality, environment etc., need to revise it.
Prediction output module 702 is revised online by neural network by correcting module 704 in the present embodiment.In control procedure, it is a lot of to make prediction output module 702 depart from the reason of dispensing process, and wherein topmost is the residual sum water quality parameter, so neural network is revised described prediction output module 702 online according to the residual sum water quality parameter.Wherein, described residual error is the difference of prediction output and actual output, and described water quality parameter comprises the turbidity of pH value, water of temperature, the water of flow, the water of water or dosage etc.Revised prediction output module 702 continues water turbidity before current time and the filter in the following moment is predicted output.
The system that present embodiment provides has genic basis function is regulated flocculating agent as the increment of control inputs injected volume owing to having adopted in described control inputs module 701, and described gene is set to the number less than 1, like this so that the increment of flocculating agent injected volume weaken with prediction increase constantly, thereby satisfy the requirement that approaches to reference locus; And the system that present embodiment provides has adopted 704 pairs of prediction output modules 702 of correcting module to revise online, has strengthened the adaptability of 702 pairs of control procedures of described prediction output module.
With reference to figure 8, be a kind of system embodiment 2 of controlling supply quantity of water-treatment flocculating agent that the embodiment of the invention provides, system specifically comprises described in the present embodiment: control inputs module 701, prediction output sub-module 801, compensation submodule 802, optimization module 703 and correcting module 704.The relative above-described embodiment of present embodiment, adopt described prediction output sub-module 801 and 802 two submodules of compensation submodule to finish the function of prediction output module 702, roughly the same in other module and above-described embodiment, below simple prediction output sub-module 801 and the compensation submodule 802 introduced.
Described prediction output sub-module 801 is used for water turbidity before the following filter constantly under current time and 701 effects of control inputs module is predicted output.
Described compensation submodule 802 is used for error compensation is carried out in the prediction output that is obtained by described prediction output sub-module 801, obtains simultaneously the track of the prediction output after the compensation.
The prediction output that is obtained by described prediction output sub-module 801 always because time lag, the time change, environment, water quality etc. former thereby with the reality filter before the output of water turbidity be not inconsistent, therefore, need to carry out error compensation to the prediction output that prediction output sub-module 801 obtains, so that its more realistic output.
Prediction output to current time compensates, and needs to consider the reason of time lag.By current k is brought constantly impact retardation time L control inputs predict output, obtain y
m(k-L).Actual output and prediction output sum by current time deduct the prediction output that is obtained by the time lag reason again, are the prediction output after the current time compensation.
Prediction output constantly in future is compensated the difference of the prediction output of the actual output that need to calculate first current time and current time, then all add this difference in the prediction in each step output afterwards, so just can effectively reduce each and go on foot the error of predicting between output and the actual output, so that the more approaching actual output of the prediction output in the moment in future.
Obtain a prediction output trajectory after the compensation according to the output of the prediction after the compensation.
Need to prove, optimize module 703 described in the present embodiment and be used for determining according to the expectation value of water turbidity before the prediction output after the current time compensation and the given filter track of a desired output, and the prediction output trajectory after the described compensation and desired output track carried out match, thereby try to achieve the coefficient of basis function; Described correcting module 704 is used for described compensation submodule 801 is revised online.
The system that present embodiment provides except can satisfy approaching of reference locus required and prediction output sub-module 801 revised online, also owing to the prediction output of having adopted 802 pairs of described prediction output sub-modules 801 of compensation submodule to obtain compensates, therefore, can control more exactly the injected volume of flocculating agent.
With reference to figure 9, a kind of general structure synoptic diagram of controlling supply quantity of water-treatment flocculating agent that provides for the embodiment of the invention.There is shown water turbidity forecast model and genetic algorithm PFC-control; Wherein, comprise soft measuring process and pure lag model in the water turbidity forecast model; Genetic algorithm PFC-control is the injected volume of regulating flocculating agent with genic basis function as the increment of control inputs.Under the effect of the determined controlled quentity controlled variable u of current time, finish flocculation sediment at reaction tank, settling basin on the one hand, and measure actual delivery turbidity; On the other hand water turbidity before the filter of current time is predicted output, at first controlled quentity controlled variable u is carried out Data correction, to eliminate because the appreciable error that flow, turbidity, pH value or the temperature etc. of reaction tank Central Plains water cause, controlled quentity controlled variable u after calibrated is calculated the prediction output of current time by soft measuring process, the prediction output of described current time is further eliminated hysteresis error by pure lag model, and the prediction output of the current time after the elimination hysteresis error and the difference of actual delivery turbidity are the error of current time.Genetic algorithm PFC-control is regulated following control inputs constantly by having genic basis function, and described following control inputs constantly calculates following prediction output constantly through the soft measuring process of water turbidity forecast model.Described following prediction output is constantly compensated by the error of current time again, and then the following turbidity predicted value constantly after being compensated.Described following turbidity predicted value and turbidity setting value constantly compares, match, can calculate next controlled quentity controlled variable constantly according to least square method, thereby enter next cyclic process.
The control system that the embodiment of the invention provides is a kind of control system based on the PFC control strategy, forecast model in the PFC control is according to the difference of water factory's process condition and to some extent difference, and the difference of model structure makes the forecast model of foundation also can be different, so can both use at this as long as meet the model that control requires.
Owing between prediction model parameters and the residual error corresponding relation is arranged to forecast model correction by neural network in the embodiment of the invention, so according to this principle, can both be applied to this for some other model, fuzzy model, expert system etc., as long as can reach the purpose of revising forecast model and correction effect than good can both the substituting of neural network.
Be understandable that the present invention can be used in numerous general or special purpose computingasystem environment or the configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, the system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, small-size computer, mainframe computer, comprise distributed computing environment of above any system or equipment etc.
The present invention can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can in distributed computing environment, put into practice the present invention, in these distributed computing environment, be executed the task by the teleprocessing equipment that is connected by communication network.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
Need to prove, in this article, relational terms such as the first and second grades only is used for an entity or operation are made a distinction with another entity or operation, and not necessarily requires or hint and have the relation of any this reality or sequentially between these entities or the operation.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby not only comprise those key elements so that comprise process, method, article or the equipment of a series of key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, article or equipment.Do not having in the situation of more restrictions, the key element that is limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
For system embodiment, because it corresponds essentially to embodiment of the method, so relevant part gets final product referring to the part explanation of embodiment of the method.System embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, namely can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select according to the actual needs wherein some or all of module to realize the purpose of present embodiment scheme.Those of ordinary skills namely can understand and implement in the situation of not paying creative work.
To the above-mentioned explanation of the disclosed embodiments, make this area professional and technical personnel can realize or use the present invention.Multiple modification to these embodiment will be apparent concerning those skilled in the art, and General Principle as defined herein can in the situation that does not break away from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.