Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, 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 the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The embodiment of the invention discloses a kind of chlorination control method,, and need not use a large amount of detecting instruments, practice thrift investment with the chlorination control effect that realizes to reach higher.
Referring to Fig. 1, be the process flow diagram of a kind of chlorination control method that the embodiment of the invention provided, specifically comprise:
S11, obtain the real-time working condition data;
Said operating mode is the variables that chlorination is had material impact; In the present embodiment; Operating mode comprises: filter back discharge, temperature, pH value, clear water reserviors water level, the chlorine residue of last stage, temperature and illumination, the acute variation of these factors has decisive influence to the dosage of chlorine.Those skilled in the art can define the variables of operating mode according to actual conditions, and to this, the present invention does not do qualification.
S12, inquiry set up in advance with reference to the environmentalist storehouse, saidly be used to indicate the various information of controlling the corresponding relation of value with reference to floor data and its chlorination with reference to comprising in the environmentalist storehouse;
Said foundation with reference to the environmentalist storehouse specifically comprises following substep:
A1, through analyzing adjustment, obtain stable chlorination state;
In chlorination system, judge that the quality of chlorination effect mainly is the value according to chlorine residue, the chlorine residue error explains that then chlorination is suitable in critical field.When at the appointed time, when said error can maintain the control aperture in the specialized range, we thought that this moment, chlorination system had stable chlorination state.
This step can adopt fuzzy control strategy to obtain the chlorination control value under the floor data of each sampling instant, and through constantly analyzing adjustment, obtain stable chlorination state.
B1, under said stable chlorination state, obtain pairing chlorination control value under the various operating modes by fuzzy control strategy, and will said various operating modes and corresponding chlorination control value and deposit primary database in;
Said fuzzy control strategy is a kind of computer numerical control (CNC) technology that is the basis with fuzzy set theory, fuzzy language variable and fuzzy logic inference.Adopt after the fuzzy logic, its control ability is more near the human mode of thinking,, expert's control experience, the representation of knowledge become the language control law that is, carries out control with these rules then.
In this step, adopt fuzzy control strategy to obtain chlorination control value and specifically comprise following substep:
A2, confirm input quantity and output quantity;
B2, input quantity is carried out Fuzzy processing;
C2, infer fuzzy output quantity through the fuzzy control strategy rule;
D2, fuzzy output quantity is carried out defuzzification obtain chlorination control value.
C1, primary database is added up optimization, and choose typical condition as storing, thereby set up with reference to the environmentalist storehouse with reference to operating mode.
S13, according to Query Result confirm with said real-time working condition Data Matching with reference to operating mode, with said with reference to the corresponding chlorination controlled quentity controlled variable of operating mode as the first control value;
S14, utilize fuzzy control strategy to said first control value handle, obtain second control value;
S15, the weighted sum of controlling value through the said first control value and second obtain current control value, and carry out chlorination control according to said current control value.
The embodiment of the invention set up in advance comprise various with reference to floor data; And with the corresponding relation of its chlorination control value with reference to the environmentalist storehouse, when getting access to the real-time working condition data, said with reference to the environmentalist storehouse through inquiring about; Confirm with said real-time working condition Data Matching with reference to operating mode; And with said with reference to the corresponding chlorination controlled quentity controlled variable of operating mode as the first control value, utilize fuzzy control strategy that the said first control value is handled again, obtain the second control value; Weighted sum through the said first control value and the second control value obtains current control value at last, and carries out chlorination control according to said current control value.Through this mode, can improve chlorination control effect greatly, and not need a large amount of detecting instruments, practice thrift investment.
For technical scheme of the present invention is understood more easily, with a specific embodiment technical scheme provided by the present invention is described in detail below.
Process flow diagram referring to shown in Figure 2 specifically comprises:
S21, through fuzzy control strategy, obtain pairing chlorination control value under the multiple sampling instant operating mode, and, obtain stable chlorination state through analyzing adjustment.
In chlorination system, judge that the quality of chlorination effect mainly is the value according to chlorine residue, the chlorine residue error explains that then chlorination is suitable in critical field.When at the appointed time, when said error can maintain the control aperture in the specialized range, we thought that this moment, chlorination system had stable chlorination state.
Said fuzzy control strategy is a kind of computer numerical control (CNC) technology that is the basis with fuzzy set theory, fuzzy language variable and fuzzy logic inference.Adopt after the fuzzy logic, its control ability is more near the human mode of thinking,, expert's control experience, the representation of knowledge become the language control law that is, carries out control with these rules then.
Said operating mode is the variables that chlorination is had material impact; In the present embodiment; Operating mode comprises: filter back discharge, temperature, pH value, clear water reserviors water level, the chlorine residue of last stage, temperature and illumination, the acute variation of these factors has decisive influence to the dosage of chlorine.Those skilled in the art can define the variables of operating mode according to actual conditions, and to this, the present invention does not do qualification.
S22, under said stable chlorination state, obtain pairing chlorination control value under the various operating modes by fuzzy control strategy, and will said various operating modes and corresponding chlorination control value and deposit primary database in.
Schematic diagram referring to fuzzy control strategy shown in Figure 3; The process that realizes fuzzy control strategy simply is described below: microcomputer interrupts the exact value that controlled variable is obtained in sampling; Then this amount is relatively obtained error signal E with set-point, generally select the input quantity of error signal E as fuzzy control.Carry out obfuscation to the accurate amount of error signal E and become fuzzy quantity.The fuzzy quantity of error E can be represented with corresponding fuzzy language, obtains a sub-set e of the fuzzy language set of error E, carries out fuzzy decision by e and fuzzy control rule R composition rule by inference again, obtains fuzzy control quantity u.
Describe in detail below.
Fuzzy control strategy specifically comprises following substep:
A3, confirm input quantity and output quantity;
The control law of general fuzzy control strategy is that the experience of summing up expert or operating personnel gets; So when definite input quantity, output quantity; Mainly observed which amount when fully taking into account their control of expert or on-the-spot experienced operating personnel; That is, as the control foundation, which amount to output to the Be Controlled object through again with the variation of which amount.
In water factory's chlorination system, judge that the leading indicator of chlorination controlled quentity controlled variable is exactly the value of chlorine residue.Chlorine residue conformance with standard (error is in allowed band) explains that then chlorination is suitable, otherwise, be exactly control fails.So judge that the chlorination controlled quentity controlled variable is exactly to carry out according to the size of error, therefore, error is an input variable of fuzzy control strategy strategy, another input variable is exactly an error rate, and it also affects chlorine dosage.Because it has determined error change trend.Thus, it is error and error rate that present embodiment has designed an input variable, and output variable is the two-dimentional fuzzy control strategy strategy of chlorination controlled quentity controlled variable.
By Fig. 3, error obtains through sensor measurement, and said error is the poor of chlorine content and setting value, obtains error rate through error of calculation inverse again.
B3, input quantity is carried out Fuzzy processing;
Input quantity in the fuzzy control strategy and output quantity all are accurate amounts, and fuzzy reasoning all carries out to fuzzy quantity, therefore must carry out Fuzzy processing to input quantity.
Carry out the variable obfuscation and will know the basic domain and the fuzzy language value of variable before.Like Fig. 4, described is the domain (representing the actual change scope of variable for this reason) and the fuzzy language value of input variable (error e, error rate EC) and output variable (controlled quentity controlled variable u).Because of requiring the chlorination control accuracy, the owner must in ± 0.1, be [0.1,0.1] so locate the domain of chlorine residue error; The valve opening increment of controlled quentity controlled variable is 2 to the maximum, and the domain of controlled quentity controlled variable is [2,2].The mapping of input and output conversion as follows so: input: [0.1,0.1] → e; Output: it is 3 that quantification gradation is chosen at this in u → [2,2], and then the fuzzy subset of input/output variable is that { NB, NS, ZO, PS, PB} represent { PB (honest), PS (just little), ZO (zero), NS (negative little), NB (negative big) } respectively.If the domain of chlorine residue error, chlorine residue error rate and controlled quentity controlled variable linguistic variable is respectively X, Y, Z, X=Y=Z={-3 then ,-2 ,-1,0,1,2,3}.
Then, obtaining quantizing factor, is example with the error; The domain maximal value of error is 0.1, seven grades of the branches of fuzzy language, and the quantizing factor of error is exactly ke=7/0.1 so; The value of obfuscation is exactly that actual value multiply by this quantizing factor, if be not integer then round.
Referring to Fig. 5, be fuzzy membership function.The subordinate function of traditional fuzzy control strategy generally all is equally distributed, and in fact the subordinate function curve resolution rate of shape point is high, and control sensitivity is also higher; On the contrary, the subordinate function curve shape is more slow, and control characteristic is also more steady; System stability is better; Relative merits are respectively arranged therefore, present embodiment has proposed to choose the subordinate function of non-uniform Distribution, promptly adopts the fuzzy set of low resolution in the bigger zone of error; Adopt the fuzzy set of high-resolution in the less zone of error, when error approaches zero, select high-resolution fuzzy set for use.In order to improve chlorination control accuracy, response speed, chlorine residue is controlled in the scope of regulation like this, membership function adopts following non-uniform Distribution subordinate function.Degree of membership is exactly to be assigned to the value of fuzzy quantity among the fuzzy subset through degree of membership, is used for control law with this and infers.
C3, infer fuzzy output quantity through the fuzzy control strategy rule;
Referring to Fig. 6, be the fuzzy control strategy rule base of being set up, said fuzzy rule base is write as a rule fuzzy relation through expertise, the such fuzzy rule base that forms at last.
1) deviation e>0, deviation changes e '<0, in phase place 1.Deviation is for just, and deviation is changed to negative, the ultra assigned direction variation of the output c of system.If e is that PM and e ' are NM, although explain that deviation is bigger, in rapid minimizing, the ultra assigned direction of system output changes fast, if controlled quentity controlled variable is P, then system will overshoot, so control is output as ZO, it is regular as follows:
If?e?is?PM?and?e′isNM?then?u?is?ZO
When the deviation minimizing, as be PS, and deviation variation e ' is NM, explains under little overgauge, the direction of the ultra set-point of the output c of system changes fast, and for the possible overshoot trend of inhibition system, not only controlled quentity controlled variable u is not P but also should be N, and its rule can be
If?e?is?PS?and?e′is?NM?then?u?is?NS
2) deviation e<0, deviation changes e '<0, and e * e '>0 is in phase place 2.System overshoot, and continue to change to deviating from the set-point direction, drawing close set-point as early as possible in order to make the output c of system, the output u of fuzzy control strategy device is that N and absolute value are bigger.For example, when e is NS, e ' is NM, and its control law can be
If?e?is?NS?and?e′isNM?then?u?is?NM
This rule declaration is though deviation is little.But the deviation pace of change is fast, thereby controlled device applies a bigger controlled quentity controlled variable.
3) deviation e<0, deviation changes e '>0, and e * e '<0 is in phase place 3.The output c of system changes to the set-point direction, and very fast if deviation changes when deviation is big in order to prevent unbalance of system, the output c of system changes fast to set-point, and control law can be:
If?e?is?NM?and?e′isPM?then?u?is?ZO
If?e?is?NS?and?e′isPM?then?u?is?PS
4) deviation e>0, deviation changes e '>0, and e * e '>0 is in phase place 4.This situation is the same with 2, and just system's output changes in the opposite direction, and the fuzzy control strategy device provides bigger controlled quentity controlled variable u, and control law can be:
If?e?is?PS?and?e′isPM?then?u?is?PM
If?e?is?PS?and?e′isPS?then?u?is?PM
D2, fuzzy output quantity is carried out defuzzification obtain the chlorination controlled quentity controlled variable.
The fuzzy output quantity that obtains through fuzzy input quantity and control law can not directly apply to real process, also will carry out defuzzification to it.Defuzzification is exactly the Converse solved of obfuscation, and the defuzzification of controlled quentity controlled variable is exactly that fuzzy value multiply by one than the row factor, and the domain maximal value of scale factor controlled quentity controlled variable is removed with fuzzy grade, i.e. ku=2/7.
S23, primary database is added up optimization, and choose typical condition as storing, to set up with reference to the environmentalist storehouse with reference to operating mode;
Said statistics optimization comprises the data in the said primary database is gone heavily, gone wrong operation, and data are handled, so that data adapting is in the memory module of database.Referring to Fig. 7 and Fig. 8, be respectively in the present embodiment elementary environment data base and with reference to the data type of a variable of being stored in the environmentalist storehouse.
S24, obtain the real-time working condition data;
S25, inquiry set up in advance with reference to the environmentalist storehouse, saidly be used to indicate the various information of controlling the corresponding relation of value with reference to floor data and its chlorination with reference to comprising in the environmentalist storehouse.
S26, according to Query Result confirm with said real-time working condition Data Matching with reference to operating mode, with said with reference to the corresponding chlorination controlled quentity controlled variable of operating mode as the first control value;
S27, utilize fuzzy control strategy to said first control value handle, obtain second control value;
S28, the weighted sum of controlling value through the said first control value and second obtain current control value, and carry out chlorination control according to said current control value;
S29, according to control effect said confidence level with reference to stored relation in the environmentalist storehouse is estimated;
Can estimate its confidence level through setting evaluation of estimate, said confidence level just can be with reference to property, in order to the quality of record controls effect.When system initially is written into raw readings,, increase and decrease one according to practical operation situation later on for the evaluation of estimate of the confidence level of every corresponding relation is set to a fixing value.If a certain corresponding relation can be used for control, and can in three control cycles, keep departure in specialized range; We think that this corresponding relation has reference significance; Confidence level adds one, otherwise subtracts one, when the evaluation of estimate of the confidence level of a certain corresponding relation is 0 or when negative; Think that then this corresponding relation does not have reference significance, can be with this corresponding relation deletion.
S210, according to the evaluation of estimate of said confidence level, make amendment and optimize with reference to the environmentalist storehouse said, improve said reference value with reference to the environmentalist storehouse.
This step can be through being provided with online learning functionality in reference to the environment experts database and realizing said.Because chlorination system is can be by the single output system that different operating mode influenced; Its output under the normal condition (being the chlorine dosage set-point) should constitute certain mapping relations with floor data; Wherein dosage is a variations per hour; Relevant with multiple factor, therefore can obtain the approximate value that the ideal corresponding with it adds concentration through on-line study through setting up the form of a chlorinating machine aperture under duty parameters such as difference filter back discharge, the different clear water reserviors water levels content in the environmentalist storehouse as a reference.Be responsible for estimating with reference to the study of environment experts database and adaptive mechanism and add effect (chlorinating machine aperture), realize online correction reference data, rolling optimization, and confirm that in real time suitable chlorinating machine adds aperture and some other controller parameter.Through on-line study, make with reference to the data in the environment experts database to obtain revising and optimizing, improved the control effect greatly.
The embodiment of the invention has also proposed a kind of chlorination control device; Referring to apparatus structure synoptic diagram shown in Figure 9, said device comprises: acquiring unit 901, with reference to environmentalist storehouse 902, query unit 903, first acquiring unit 904, second acquisition unit 905 and control module 906.Wherein:
Acquiring unit 901 is used to obtain the real-time working condition data;
Said operating mode is the variables that chlorination is had material impact; In the present embodiment; Operating mode comprises: filter back discharge, temperature, pH value, clear water reserviors water level, the chlorine residue of last stage, temperature and illumination, the acute variation of these factors has decisive influence to the dosage of chlorine.Those skilled in the art can define the variables of operating mode according to actual conditions, and to this, the present invention does not do qualification.
With reference to environmentalist storehouse 902, be used to store the various information of controlling the corresponding relation of value with reference to floor data and its chlorination of indication;
Query unit 903 is used to inquire about said with reference to the environmentalist storehouse;
First acquiring unit 904, be used for according to Query Result confirm with said real-time working condition Data Matching with reference to operating mode, with said with reference to the corresponding chlorination controlled quentity controlled variable of operating mode as the first control value;
Second acquisition unit 905 is used to utilize fuzzy control strategy that the said first control value is handled, and obtains the second control value;
Control module 906 is used for obtaining current control value through the weighted sum of the said first control value and the second control value, and carries out chlorination control according to said current control value.
The embodiment of the invention has also proposed another kind of chlorination control device; Referring to Figure 10; This device except comprise with said apparatus in intimate acquiring unit 101, with reference to environmentalist storehouse 102, query unit 103, first acquiring unit 104, second acquisition unit 105 and the control module 106, also comprise: build library unit 107, evaluation unit 108 and on-line study unit 109.Wherein:
Build library unit 107, be used for setting up in advance with reference to the environmentalist storehouse, its step specifically comprises:
Obtain stable chlorination state;
Under said stable chlorination state, obtain pairing chlorination control value under the various operating modes by fuzzy control strategy, and deposit said various operating modes and corresponding chlorination control value in primary database;
Primary database is added up optimization, and choose typical condition as storing, to set up with reference to the environmentalist storehouse with reference to operating mode.
Evaluation unit 108 is used for estimating with reference to the environmentalist storehouse said, and said evaluation specifically comprises: write down said with reference to each bar corresponding relation in the environmentalist storehouse by the number of times of reference;
According to what of said reference count its evaluation of estimate is added 1 or subtract 1;
When the evaluation of estimate of a certain said corresponding relation is 0 or when negative, delete said corresponding relation.
On-line study unit 109 is used for according to said evaluation of estimate, to said with reference to making amendment and optimize in the environmentalist storehouse, thereby can improve said reference value with reference to the environmentalist storehouse.
The embodiment of the invention set up in advance comprise various with reference to floor data; And with the corresponding relation of its chlorination control value with reference to the environmentalist storehouse, when getting access to the real-time working condition data, said with reference to the environmentalist storehouse through inquiring about; Confirm with said real-time working condition Data Matching with reference to operating mode; And with said with reference to the corresponding chlorination controlled quentity controlled variable of operating mode as the first control value, utilize fuzzy control strategy that the said first control value is handled again, obtain the second control value; Weighted sum through the said first control value and the second control value obtains current control value at last, and carries out chlorination control according to said current control value.Through this mode, can improve chlorination control effect greatly, and not need a large amount of detecting instruments, practice thrift investment.
In addition, the present invention implements also to be directed against with reference to environmentalist lab setting on-line study function, through on-line study, makes with reference to the environmentalist storehouse constantly to obtain revising and optimizing, thereby can improve the reference value in environmentalist storehouse, has guaranteed chlorination control effect.
Each embodiment adopts the mode of going forward one by one to describe in this instructions, and what each embodiment stressed all is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For the disclosed device of embodiment, because it is corresponding with the embodiment disclosed method, so description is fairly simple, relevant part is partly explained referring to method and is got final product.
It will be understood by those skilled in the art that and to use in many different processes and the technology any one to come expression information, message and signal.For example, the message of mentioning in the above-mentioned explanation, information can be expressed as voltage, electric current, electromagnetic wave, magnetic field or magnetic particle, light field or above combination in any.
The professional can also further recognize; The unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein; Can realize with electronic hardware, computer software or the combination of the two; For the interchangeability of hardware and software clearly is described, the composition and the step of each example described prevailingly according to function in above-mentioned explanation.These functions still are that software mode is carried out with hardware actually, depend on the application-specific and the design constraint of technical scheme.The professional and technical personnel can use distinct methods to realize described function to each certain applications, but this realization should not thought and exceeds scope of the present invention.
The method of describing in conjunction with embodiment disclosed herein or the step of algorithm can be directly with the software modules of hardware, processor execution, and perhaps the combination of the two is implemented.Software module can place the storage medium of any other form known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or the technical field.
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 conspicuous concerning those skilled in the art, and defined General Principle can realize under the situation that does not break away from the spirit or scope of the present invention in other embodiments among this paper.Therefore, the present invention will can not be restricted to these embodiment shown in this paper, but will meet and principle disclosed herein and features of novelty the wideest corresponding to scope.