A kind of anti-interference control method and system of chlorine addition process
Technical field
The present invention relates to a kind of anti-interference control methods of chlorine addition process in water process, especially a kind of to use disturbance
Observer reduces the control method of disturbing influence.
Background technique
For disinfection of tap water technique, chlorination side is usually taken in China cities and towns tap water common process treatment process
Formula, effect are the microorganisms such as algae, bacterium, virus in killing water body.Common chlorhexidine-containing disinfectant have liquid chlorine, chlorine dioxide,
Chloramines, bleaching powder etc., wherein cost is relatively low for liquid chlorine disinfection, simple and easy to do, low for equipment requirements, therefore most widely used.Liquid
Total chlorine can be divided into two parts in water body when chlorination, and one is fallen with consumption of chemical reaction such as such as ammonia nitrogens of the substance in water
Chlorine, the other is chlorine residue.Residual chlorine amount is most important index in disinfection by chlorine technique, it refers to adds liquid chlorine in water body,
After certain time reacts to each other, the summation of the free residual chlorine and combinative residual chlorine that come is left behind in water body.Country
It is provided in standard: in order to inhibit remaining microorganism in water to breed once again, it is ensured that chlorine contacts 30 points in clear water reserviors with water
More than clock and guarantee there is certain residual chlorine amount when tap water factory.
The treatment effect of the most of waterworks water treatment procedures in China often cannot get effective guarantee at present.On the one hand by
In physics, chemistry, bioprocesses that chlorine addition process is complexity.In addition the entire chemical reaction process time is longer, makes
This process has the characteristics that the serious uncertainty of typical non-linear, large dead time, big inertia and time-varying, along with there is raw water
Water quality (including water temperature, pH value, ammonia nitrogen amount etc.) variation, flow of inlet water variation, (such as level-one repumping house pump group opens process operating condition
Stop, filter back washing etc.) etc. interference so that the variation water quality of output water is larger.Sometimes for effluent water quality is improved, manually
The dosage for increasing chlorine, is not only difficult to accurately hold the accuracy and timeliness of control amount, but also increase water producing cost,
Also increase the possibility for generating the harmful substances such as chloroform, bromate.Therefore the research for carrying out chlorine addition control, solves water
Series of key techniques point in treatment process, designs and develops a set of control for overcoming long time delay, big inertia, nonlinear time-varying process
System processed has highly important economic and social effect to effluent water quality is improved.
Summary of the invention
Goal of the invention: the external interferences such as changing greatly for existing control method in face of raw water flow and raw water quality,
And internal condition variation and chlorinating machine is non-linear etc. prevent widely used pid control algorithm is from fine in Industry Control
The problem of adapting to, and then cannot controlling the residual chlorine amount of output water well, the present invention propose that a kind of the anti-of chlorine addition process is done
Control method and system are disturbed, improves the rejection ability to disturbance using disturbance observer.
Technical solution: the present invention proposes a kind of anti-interference control method of chlorine addition process, comprising: is analyzed using chlorine residue
The residual chlorine amount of instrument real-time detection output water, and be transmitted in host computer database by PLC controller;Host computer operation is anti-interference
Control algolithm obtains control amount, and controls chlorinating machine by PLC controller to control chlorine dosage, is finally completed chlorine addition technique
Automation control.The feedback that the feedforward controller and traditional PID that the control algolithm is constituted using disturbance observer are constituted
The control method that controller combines codetermines subsequent time by the output of disturbance observer and the output of PID controller
The chlorine dosage of chlorinating machine, specific formula for calculation are as follows:
In formula, X (s) is chlorine flowrate, and N (s) is that the control of PID controller exports,For the defeated of disturbance observer
Out;
N (s) andIt is expressed as follows:
In formula, KpFor proportionality coefficient, TiFor integration time constant, TdFor derivative time constant, r (s) is residual chlorine amount setting
Value, Y (s) are residual chlorine amount in water after processing, gnIt (s) is the minimum phase part of process channel nominal model, θnFor nominal model
Time delay, F (s) are filter used in disturbance observer.
Prolong process since chlorine addition process can be approximated to be a second-order inertia added-time, the filter in the disturbance observer
Wave device F (s) is designed as a second-order low-pass filter, while the steady-state gain of the low-pass filter is 1, low-pass filter F (s)
It is expressed as follows:
After the anti-interference and realizability for comprehensively considering system carry out the rationally parameter such as λ of setting disturbance observer,
It includes the internal disturbances such as the external disturbances such as raw water flow variation and raw water quality variation and model parameter mismatch that lump, which disturbs, can
Tend to 0 with progressive, i.e., can be very good to inhibit outwardly and inwardly to disturb using the control method that disturbance observer and PID are combined.
After the control algolithm that disturbance observer and traditional PID controller combine passes through host computer IFIX configuration software
Platform programming realizes that calculated control amount controls chlorinating machine by PLC controller.
A kind of system of the anti-interference control method of chlorine addition process, including chlorine residue analyzer, chlorinating machine, PLC control
Device and host computer, PLC controller are connect with chlorine residue analyzer, chlorinating machine and host computer respectively;Wherein chlorine residue analyzer is used for
Sampling obtains the contents of residual chlorine in output water, and is transmitted in host computer database by PLC controller;Host computer is for calculating
Control amount is obtained, and process is added by PLC controller control chlorinating machine realization chlorine;The host computer passes through IFIX configuration
The background program of software realizes the calculating of chlorinating machine chlorine dosage, and circular is shown in formula (1) (2) (3).
The utility model has the advantages that the feedforward controller and traditional that 1, control method provided by the invention is constituted using disturbance observer
The method that the feedback controller that PID is constituted combines is changed using disturbance observer to for raw water flow variation and raw water quality
Etc. external interferences and model parameter the internal interferences such as mismatch and be effectively estimated, thus in the environment of big external disturbance
It can be very good to control contents of residual chlorine, guarantee that the residual chlorine amount of output water is maintained at reasonable range, can effectively inhibit micro-
The breeding of biology, and will not influence the health of people.
2, anti-interference control method provided by the invention is by common host computer configuration software IFIX software realization, can be with
Pid control algorithm and disturbance observer very easily are realized using background program Programming with Pascal Language, so that the programming in PLC is more simple
It is single, while being realized in the case where not needing detection raw water flow and raw water quality using software approach and soft survey is carried out to disturbance
Amount can effectively inhibit external disturbance and internal model to mismatch disturbance, improve the anti-interference ability of control system.
Detailed description of the invention
Fig. 1 is the chlorine addition antidisturbance control system block diagram of the embodiment of the present invention.
Fig. 2 is the design frame chart of the disturbance observer of the embodiment of the present invention.
Fig. 3 is the disturbance observer of the embodiment of the present invention and the control method block diagram that PID is combined.
Specific embodiment
With reference to the accompanying drawing, the method for the present invention is explained in detail.
The present invention proposes a kind of anti-interference control method of chlorine addition process in water treatment, uses chlorine residue analyzer
The residual chlorine amount of real-time detection output water, and be transmitted in host computer database by PLC controller, host computer runs anti-interference control
Method processed obtains control amount, and controls chlorinating machine by PLC controller to control chlorine dosage, is finally completed chlorine addition technique
Automation control.
The feedback controller phase that the feedforward controller and traditional PID that the control method constitutes disturbance observer are constituted
In conjunction with by the chlorine dosage of the output co-determination subsequent time chlorinating machine of the output and PID controller of disturbance observer, specifically
Calculation formula is as follows:
In formula, X (s) is chlorine flowrate, and N (s) is that the control of PID controller exports,For the defeated of disturbance observer
Out;
N (s) andIt is expressed as follows:
In formula, KpFor proportionality coefficient, TiFor integration time constant, TdFor derivative time constant, r (s) is residual chlorine amount setting
Value, Y (s) are residual chlorine amount in water after processing, gnIt (s) is the minimum phase part of process channel nominal model, θnFor nominal model
Time delay, F (s) are filter used in disturbance observer;Step can be added in process channel input terminal herein, then to defeated
The step response curve of outlet is fitted the minimum phase part and time delay part for obtaining process channel nominal model.Make herein
Chlorine addition is that second-order inertia adds Time Delay Model.
Y (s) is expressed as follows:
Y (s)=Gco(s)N(s)+Gdo(s)Dex(s) (4)
In formula, GcoIt (s) is the transmission function of control channel, GdoIt (s) is the transmission function in disturbance channel, DexIt (s) is raw water
The external disturbances amount such as changes in flow rate and raw water quality variation;
Gco(s) and Gdo(s) it is expressed as follows:
In formula, g (s) is the minimum phase part of process channel transmission function, and θ is time delay.
Filter F (s) in the disturbance observer is designed as a second-order low-pass filter, while the low-pass filter
Steady-state gain be 1, low-pass filter F (s) is expressed as follows:
After the anti-interference and realizability for comprehensively considering system carry out the rationally parameter such as λ of setting disturbance observer,
Lump disturbance includes changing d for raw water flowfChange d with raw water qualityaEqual external disturbances and model parameter mismatch etc. are internal to disturb
It is dynamic, it progressive can tend to 0, i.e., can be very good to inhibit outwardly and inwardly using the control method that disturbance observer and PID are combined
Disturbance.
After the control algolithm that disturbance observer and traditional PID controller combine passes through host computer IFIX configuration software
Platform programming realizes that calculated control amount controls chlorinating machine by PLC controller.
Various pieces are described as follows:
Using the system of the method for the present invention as shown in Figure 1, within the system, sampling the chlorine residue analyzer of output water residual chlorine amount
It is connected with the AI input module in PLC controller, control system timing samples the reflection of chlorine residue analyzer by PLC controller
Contents of residual chlorine.PLC and host computer configuration software IFIX is communicated by PROFIBUS simultaneously, real-time chlorine residue can be contained
Magnitude is transmitted and is stored in the database of host computer.
The realization of PID controller:
In the background program environment of host computer, programming is realized and collected real-time chlorine content y and chlorine residue setting value r is done
Difference obtains difference, and proportionality coefficient, integration time constant and the derivative time constant adjusted out is combined to obtain the defeated of PID controller
Output.
The realization of disturbance observer contains as shown in Fig. 2, in the background program environment of host computer real-time chlorine residue is collected
The chlorination value of magnitude and previous moment passes through two―step element, second-order low-pass filter, the delay link for the nominal model adjusted out
(wherein second-order low-pass filter will select reasonable filtering parameter), obtains the output quantity of disturbance observer.
The realization of the chlorine dosage of chlorinating machine is controlled as shown in figure 3, in the background program environment of host computer, PID control
The output quantity of device and the output quantity of disturbance observer make the difference, and difference x is then passed through the PROFIBUS between host computer and PLC
Communication passes to PLC controller, and PLC controller is transferred to the control amount by analog output module AO the 4- of chlorinating machine
20mA control interface, the final chlorination speed for controlling chlorinating machine.