Medicament adding amount calculation method and device and medicament adding control method and device
By collecting data in real time and using the drug dosage calculation method, using multiple modes of drug dosage models, the problem of difficult to determine the drug dosage in single village water stations is solved, and the accuracy and efficiency of drug dosage is achieved. Meet water quality standards and extend equipment life.
Patent Information
- Application Number
- CN202411471369.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2024-11-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the water production process of Dancun Water Station, due to the different water inlet flow and drug concentration, it is difficult to determine the dosage of drug added, resulting in insufficient or excessive dosage of drug added, which cannot meet the water quality standards of the factory water. The equipment is frequently adjusted and causes damage and wasted drug. and increase management difficulty.
The chemical dosage calculation method is used to collect data on inlet flow, chemical concentration and chlorine residues in effluent in real time. The chemical dosage model with three modes: fixed value, dynamic adjustment between partitions and adaptive dynamic adjustment are used to perform chemical dosage based on the data. The amount is calculated and adjusted to ensure the accuracy and efficiency of the dosage of the drug.
It realizes precise control of the dosage of chemicals, meets the water quality standards of factory water, reduces waste of chemicals and equipment damage, improves management efficiency, extends the service life of the equipment, and supports unattended operations.
Smart Images

Figure CN118978209A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intelligent water treatment control, and in particular to a method for calculating the dosage of a reagent, and a method and device for controlling the dosage of a reagent. Background Art
[0002] The sources of rural tap water usually include rivers, lakes, streams, dams, reservoirs, ponds, groundwater, etc. Chemicals are added to the water production equipment system of the water supply station to filter the source water efficiently to meet the needs of safe drinking water.
[0003] In the water production process of water stations, taking the residual chlorine element (free chlorine) of factory water as an example, the "Sanitary Standard for Drinking Water" (GB5749-2022) stipulates: the contact time with water is ≥30min, the residual chlorine of factory water is ≥0.3mg / L, and the limit of factory water is ≤2mg / L. Single village water stations usually use manual dosing of chemicals or automatic control fixed amount dosing requirements based on experience. The amount of chemical dosing is insufficient, the residual chlorine value of factory water is low and does not meet the standard. The amount of chemical dosing is too large, and the water has a strong taste, which is easy to be complained by residents and wastes chemical. Some water stations use fully automatic control to frequently adjust the dosage, and fail to ensure the full reaction of the chemical, resulting in frequent adjustment of the output frequency of the dosing equipment, which is easy to cause equipment damage. Summary of the invention
[0004] In order to solve the above problems, the embodiments of the present application provide a method for calculating the dosage of a drug, a method for controlling the dosage of a drug, and a device.
[0005] According to a first aspect of an embodiment of the present application, a method for calculating a dosage of a drug is provided, comprising: S1: Real-time collection of inlet flow, reagent concentration and outlet residual chlorine data, and pre-processing; S2: Calculate the dosage of the agent according to the preprocessed data using the agent dosing model, wherein the agent dosing model has three modes: fixed value dosing mode 1, dynamic adjustment dosing mode 2 between partitions, and adaptive dynamic adjustment dosing mode 3; The fixed value addition mode 1 means that the amount of the drug added during the drug addition process is a constant value, and the drug addition amount is Dfin1; The dynamic dosing mode 2 divided into different intervals is to divide the water production capacity Q of the water production equipment into multiple flow intervals according to the inlet flow rate. Different flow intervals where the inlet flow rate Qin is located correspond to different reagent dosages, and the reagent dosage is Dfin2; The adaptive dynamic adjustment dosage mode 3 preliminarily determines the dosage of the reagent according to the size of the inlet water flow rate, adjusts the dosage of the reagent according to the monitored negative feedback of the residual chlorine in the effluent, and corrects the dosage of the reagent according to the monitored concentration of the reagent. The dosage of the reagent is Dfin3, Dfin3= Dbas+Cda*Uda + Cdaa*Uda, wherein Dbas is the dynamic adjustment basic dosage, Cda is the dynamic adjustment unit coefficient, Uda is the dynamic adjustment unit quantity, and Cdaa is the dynamic adjustment reagent concentration correction coefficient.
[0006] Optionally, the dosage of the agent is calculated using a drug dosing model, including: Step S201, determine whether the dosage of the agent needs to be refreshed, if it is necessary to refresh the dosage of the agent, execute step S202, if not, end; Step S202, determining whether water production has started, if water production has started, executing step S203, if water production has not started, then ending; Step S203, determining whether water is automatically produced, if it is automatically produced, executing step S204, if it is not automatically produced, executing step S205c; Step S204, determining whether the dosage is adaptively and dynamically adjusted, if it is adaptive and automatic adjustment, executing step S205b, otherwise executing step S205a; Step S205a, the dosage of the reagent Dfin is the dosage of the reagent Dfin2 calculated by the dynamic adjustment dosage mode 2 between the partitions, that is, Dfin=Dfin2, and then step S208 is executed; Step S205b, the dosage of the reagent Dfin is the dosage of the reagent Dfin3 calculated by the adaptive dynamic adjustment dosage mode 3, that is, Dfin=Dfin3, and then step S206 is executed; Step S205c, the dosage of the reagent Dfin is the dosage of the reagent Dfin1 calculated by the fixed value dosage mode 1, that is, Dfin=Dfin1, and then step S208 is executed; Step S206, determining whether the residual chlorine value of the outlet water is within the target range for several consecutive cycles, if it is within the target range, executing step S207, otherwise executing step S208; Step S207, taking the current dosage of the reagent Dfin as the dosage of the reagent Di corresponding to the i-th water inlet flow interval, that is, Di=Dfin, i=1,2,3...,n, and then executing step S208; Step S208, outputting the dosage of the reagent Dfin.
[0007] Optionally, the calculation of the dosage of the agent under the adaptive dynamic adjustment dosage mode 3 includes: Step S401, determining whether the adaptive dynamic adjustment dosing mode 3 is used for the first time, if it is used for the first time, executing step S409a, otherwise executing step S402; Step S402, determining whether the residual chlorine in the water is within the target range, if yes, executing step S409b, otherwise executing step S403; Step S403, determine whether the change of the inlet flow Qin exceeds a given threshold, if so, execute step S404, and obtain the dosage of the reagent corresponding to the flow interval from the dynamic adjustment dosage mode 2 between the intervals, otherwise execute step S406, and fine-tune the dosage of the reagent according to the value of the effluent residual chlorine Cout and the reagent concentration Cage; Step S404, calculate Dfin2 by dynamically adjusting the dosing mode 2 between partitions, and then execute step S405; Step S405, judging whether the flow rate change and the reagent dosage change change in the same direction according to Dfin2, that is, if the inlet flow rate increases, whether the calculated Dfin2 is greater than the current reagent dosage Dfin, or if the inlet flow rate decreases, whether the calculated Dfin2 is less than the current reagent dosage Dfin, if so, executing step S409c, otherwise executing step S406; Step S406, taking the dynamically adjusted basic dosage as the current dosage of the agent, that is, Dbas=Dfin, and then executing step S407; Step S407, calculating the dynamic adjustment unit coefficient Cda, and then executing step S408; Step S408, calculating the dynamic adjustment concentration correction coefficient Cdaa, and then executing step S409; Step S409a, adaptively and dynamically adjust the dosage of the agent in dosage mode 3 to the dynamically adjusted basic dosage, that is, Dfin3 = Dbas, and then execute step S410; Step S409b, the dosage of the agent in the adaptive dynamic adjustment dosage mode 3 remains unchanged, which is still the current dosage of the agent, that is, Dfin3 = Dfin, and then step S410 is executed; Step S409c, adaptively and dynamically adjust the dosage of the agent in dosage mode 3 to the dosage of the agent calculated by dynamically adjusting the dosage mode 2 between partitions, that is, Dfin3 = Dfin2, and then execute step S410; Step S409d, the dosage of the reagent in the adaptive dynamic adjustment dosage mode 3 is based on the dynamic adjustment basic dosage plus the deviation adjustment value of the distance from the effluent residual chlorine target and the correction value of the reagent concentration, that is, Dfin3 = Dbas+Cda*Uda+Cdaa*Uda, and then execute step S410; Step S410: Output the chemical dosing amount Dfin3 of the adaptive dynamic adjustment dosing mode 3.
[0008] Optionally, the calculation of the dynamic adjustment unit coefficient Cda includes: Judge the magnitude of the residual chlorine Cout in the effluent. With Coutl < Cout < Coutu as the target range of the residual chlorine in the effluent, Coutl is the lower limit of the target range of the residual chlorine in the effluent, and Coutu is the upper limit of the target range of the residual chlorine in the effluent. Divide it into multiple numerical intervals according to the numerical value of Cout. Each numerical interval where Cout is located corresponds to a different dynamic adjustment unit coefficient Cda; if Cout is within the target range, there is no need to adjust the chemical dosing amount, and the dynamic adjustment unit coefficient Cda takes the value of 0; if Cout is not within the target range and the chemical dosing amount needs to be adjusted, the closer the value of Cout is to the target range of the residual chlorine in the effluent, the smaller the absolute value of the dynamic adjustment unit coefficient Cda, and the farther the value of Cout is from the target range of the residual chlorine in the effluent, the larger the absolute value of the dynamic adjustment unit coefficient Cda; if Cout ≥ Coutu, the chemical dosing amount needs to be reduced, and the dynamic adjustment unit coefficient Cda takes a negative value. If Cout ≤ Coutl, the chemical dosing amount needs to be increased, and the dynamic adjustment unit coefficient Cda takes a positive value.
[0009] Optionally, the calculation of the dynamic adjustment chemical concentration correction coefficient Cdaa includes: Judge the magnitude of the chemical concentration Cage. With Cagel < Cage < Cageu as the normal range of the chemical concentration, Cageu is the upper limit of the normal chemical concentration range, and Cagel is the lower limit of the normal chemical concentration range. Divide it into multiple numerical intervals according to the numerical value of Cage. Each numerical interval where Cage is located corresponds to a different dynamic adjustment chemical concentration correction coefficient Cdaa; if Cage is within the normal range of the chemical concentration, there is no need to adjust the chemical dosing amount, and the dynamic adjustment chemical concentration correction coefficient Cdaa takes the value of 0; if Cage is not within the target range and the chemical dosing amount needs to be adjusted, the closer the value of Cout is to the normal range of the chemical concentration, the smaller the absolute value of the dynamic adjustment unit coefficient Cage, and the farther the value of Cout is from the normal range of the chemical concentration, the larger the absolute value of the dynamic adjustment chemical concentration correction coefficient Cdaa; if Cage ≥ Cageu, the chemical dosing amount needs to be reduced, and the dynamic adjustment unit coefficient Cda takes a negative value. If Cage ≤ Cagel, the chemical dosing amount needs to be increased, and the dynamic adjustment chemical concentration correction coefficient Cdaa takes a positive value.
[0010] Optionally, when the influent flow rate data is invalid, switch to the fixed dosing mode 1, and at this time, the chemical dosing amount is not affected by the magnitude of the influent flow rate; When the influent flow rate data is normal and the effluent residual chlorine data is invalid, switch to the interval-based dynamic adjustment dosing mode 2; When the inlet flow data, outlet residual chlorine data, and reagent concentration data are all valid, switch to adaptive dynamic adjustment dosing mode 3.
[0011] According to a second aspect of an embodiment of the present application, a device for calculating a dosage of a drug is provided, comprising: The acquisition and processing module is used to collect the inlet flow rate, reagent concentration and outlet residual chlorine data in real time and perform pre-processing; A calculation module, for calculating the dosage of the agent according to the preprocessed data using the agent dosing model, wherein the agent dosing model has three modes: a fixed value dosing mode 1, a dynamic adjustment dosing mode 2 between partitions, and an adaptive dynamic adjustment dosing mode 3; The fixed value addition mode 1 means that the amount of the drug added during the drug addition process is a constant value, and the drug addition amount is Dfin1; The dynamic dosing mode 2 divided into different intervals is to divide the water production capacity Q of the water production equipment into multiple flow intervals according to the inlet flow rate. Different flow intervals where the inlet flow rate Qin is located correspond to different reagent dosages, and the reagent dosage is Dfin2; The adaptive dynamic adjustment dosage mode 3 preliminarily determines the dosage of the reagent according to the size of the inlet water flow rate, adjusts the dosage of the reagent according to the monitored negative feedback of the residual chlorine in the effluent, and corrects the dosage of the reagent according to the monitored concentration of the reagent. The dosage of the reagent is Dfin3, Dfin3= Dbas+Cda*Uda + Cdaa*Uda, wherein Dbas is the dynamic adjustment basic dosage, Cda is the dynamic adjustment unit coefficient, Uda is the dynamic adjustment unit quantity, and Cdaa is the dynamic adjustment reagent concentration correction coefficient.
[0012] According to a third aspect of an embodiment of the present application, a method for controlling drug dosing is provided, comprising: A1: Execute the method for calculating the dosage of the agent described in the first aspect to obtain the dosage of the agent; A2: According to the calculated dosage of the reagent, the reagent addition execution unit is controlled to add the reagent according to the calculated dosage of the reagent; A3: Determine whether it is necessary to stop water production. If so, end the operation. If not, repeat A1-A2 in sequence until water production is stopped.
[0013] According to a fourth aspect of an embodiment of the present application, there is provided a drug dosing control device, comprising: An execution module, used to execute the drug dosage calculation method described in the first aspect to obtain the drug dosage; A control module, for controlling the agent dosing execution unit to perform agent dosing according to the calculated agent dosing amount; The judgment cycle module is used to judge whether it is necessary to stop water production. If water production is stopped, the operation is terminated. If water production is not stopped, the execution module and the control module are repeatedly executed in sequence until water production is stopped.
[0014] According to a fifth aspect of an embodiment of the present application, there is provided an electronic device, including: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in the first aspect or the third aspect.
[0015] The technical solution provided by the embodiments of the present application may have the following beneficial effects: It can be seen from the above embodiments that the present application collects the inlet flow rate, reagent concentration and outlet residual chlorine data in real time, and performs pretreatment. According to the pretreated data, the reagent dosage is calculated using the reagent dosing model. The reagent dosing model has three modes: fixed value dosing mode 1, dynamic adjustment dosing mode 2 between partitions, and adaptive dynamic adjustment dosing mode 3. Through the setting of the three dosing modes, the inlet flow data is invalid due to temporary damage to the flow meter and other reasons during actual use, and the fixed dosing mode is switched to. At this time, the dosage of the reagent is not affected by the size of the inlet flow rate; the inlet flow data is normal, but the outlet residual chlorine data is invalid due to damage to the water quality analyzer and other reasons, and the dynamic adjustment dosing mode is switched to the partition; the reagent concentration data has a smaller weight for adjusting the dosage of the reagent than the inlet flow data and the outlet residual chlorine data, because the reagent concentration data is invalid and the mode is not switched. When the inlet flow data, the outlet residual chlorine data, and the reagent concentration data are all valid, switch to the adaptive dynamic adjustment dosing mode. The adaptive dynamic adjustment dosage mode preliminarily determines the dosage of the agent according to the size of the inlet flow rate, adjusts the dosage of the agent according to the monitored negative feedback of the residual chlorine in the effluent, and corrects the dosage of the agent according to the monitored concentration of the agent. This solves the problem that the dosage of the agent is difficult to determine due to the different inlet flow rates, concentrations of the agent, and types of agents in the water production process of a single village water station. It ensures that the appropriate amount of agent is added to meet the water quality standards of the outgoing water, and does not add too much agent to make the outgoing water produce a strong irritating odor, leading to complaints from residents and wasting agents. As the method is used more times, the trained dosage of the agent becomes more accurate, the time to reach the target dosage is shorter, and the adjustment efficiency is more efficient.
[0016] The present application can also set parameters such as the adjustment cycle and the adjustment variation range to ensure that the agents and water can fully react with each other when adding different agents, and avoid frequent adjustments of the dosing equipment to extend the service life of the equipment. In addition, when the inlet flow, agent concentration, and outlet water quality monitoring equipment encounter faults, the dosing mode can be switched without affecting the calculation of the agent dosage, thereby improving management efficiency and facilitating unattended operation.
[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] Figure 1 The figure is a structural diagram of a water production equipment according to an exemplary embodiment.
[0020] Figure 2 The present invention is a flow chart of a method for calculating the dosage of a pharmaceutical agent according to an exemplary embodiment.
[0021] Figure 3 The figure is a block diagram of a drug dosage calculation device according to an exemplary embodiment.
[0022] Figure 4 The figure is a flow chart of a method for controlling drug dosing according to an exemplary embodiment.
[0023] Figure 5 The figure is a block diagram of a drug dosing control device according to an exemplary embodiment.
[0024] Figure 6 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0025] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0026] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0027] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0028] Figure 1 A structural diagram of a water production equipment of a possible implementation method provided for Example 1 of the present invention. The water production equipment includes a source water pool 1, a flow meter 2, a reaction tank 3, a water quality analyzer 4, a clean water tank 5, a reagent dosing execution unit 6, a reagent concentration analyzer 7 and a reagent barrel 8. The source water pool 1 is connected to the reaction tank 3 through a pipeline, and a flow meter 2 is installed on the pipeline for real-time monitoring of the water inlet flow Qin; the reagent barrel 8 contains reagents, and the reagents are injected into the reaction tank 3 through the reagent dosing execution unit 6 to react with water, and the reagent concentration analyzer 7 is inserted into the reagent barrel 8 for real-time monitoring of the reagent concentration Cage of the reagent in the reaction tank 3; the water outlet of the reaction tank 3 is connected to the clean water tank 5 through a pipeline, and a pipeline is connected in parallel to the pipeline for installing a water quality analyzer, and the water quality analyzer 4 is used to monitor the residual chlorine Cout of the outlet water in real time; in the water production process of the water production equipment, the amount of reagent added by the reagent dosing execution unit 6 is calculated by a method for calculating the amount of reagents added proposed in this application.
[0029] Embodiment 1: Figure 2 is a flow chart of a method for calculating the dosage of a pharmaceutical agent according to an exemplary embodiment. Figure 2 As shown, the method may include the following steps: S100: collect inlet flow, reagent concentration and outlet residual chlorine data in real time and perform pre-processing; Specifically, the flow meter is used to monitor the water inlet flow Qin in real time; the reagent concentration Cage in the reaction tank is monitored in real time by the reagent concentration analyzer; the water quality analyzer is used to monitor the residual chlorine Cout in the effluent in real time; the above data are preprocessed to filter out abnormal data and eliminate interference with the calculation of reagent dosage caused by abnormal collected data.
[0030] The initial setting data parameters are set, where the initial setting data parameters refer to the basic parameters set before the calculation method of the present application is used, including the upper limit of the target effluent residual chlorine range Coutu, the lower limit of the target effluent residual chlorine range Coutl, the water production capacity of the water production equipment Q, the fixed dosage Dfix, the flow interval agent dosage Di (i=1,2,3...,n), the upper limit of the normal agent concentration range Cageu, the lower limit of the normal agent concentration range Cagel, the dynamic adjustment basic dosage Dbas, the dynamic adjustment period Tda, and the dynamic adjustment unit amount Uda.
[0031] The initial setting data parameters can be set and adjusted according to actual conditions, or the default data size can be used.
[0032] The training learning data parameters refer to the data parameters stored after the calculation method of this application learns and trains, including the dynamically adjusted basic dosage Dbas and the flow interval agent dosage Di (i=1,2,3...,n).
[0033] The maximum value of n of the flow interval agent dosage Di (i=1,2,3...,n) can be adjusted. The flow interval agent dosage Di (i=1,2,3...,n) will automatically learn and optimize according to the usage.
[0034] S200: Calculating the dosage of the agent using the agent dosing model according to the preprocessed data, wherein the agent dosing model has three modes: fixed value dosing mode 1, dynamic adjustment dosing mode 2 between partitions, and adaptive dynamic adjustment dosing mode 3; Through a variety of dosing modes, different methods of calculating the dosage of the agent can be adopted in different situations.
[0035] The fixed value addition mode 1 means that the amount of the drug added during the drug addition process is a constant value, and the drug addition amount is Dfin1; The dynamic dosing mode 2 described in the partitioned intervals is to divide the water production capacity Q of the water production equipment into multiple flow intervals according to the inlet flow rate. The flow intervals where different inlet flows Qin are located correspond to different reagent dosages, and the reagent dosage is Dfin2; the water production capacity Q of the water production equipment refers to the maximum inlet flow rate allowed by the water production equipment, that is, the range of Qin is 0 <Qin≤Q; The adaptive dynamic adjustment dosage mode 3 preliminarily determines the dosage of the reagent according to the size of the inlet water flow rate, adjusts the dosage of the reagent according to the monitored negative feedback of the residual chlorine in the effluent, and corrects the dosage of the reagent according to the monitored concentration of the reagent. The dosage of the reagent is Dfin3, Dfin3= Dbas+Cda*Uda + Cdaa*Uda, wherein Dbas is the dynamic adjustment basic dosage, Cda is the dynamic adjustment unit coefficient, Uda is the dynamic adjustment unit quantity, and Cdaa is the dynamic adjustment reagent concentration correction coefficient.
[0036] The dynamically adjusted basic dosage Dbas is the dosage of the agent used for the first time in the adaptive dynamic adjustment dosage mode, and will automatically learn, optimize and adjust according to the usage.
[0037] The dynamic adjustment period Tda is to adjust the dosage of the reagent according to a certain periodic customization judgment in the automatic water production state, so as to ensure that the reagent and water react fully, and to prevent the frequent adjustment of the reagent addition execution unit from affecting the service life.
[0038] The dynamic adjustment unit amount Uda is the unit amount when adjusting and correcting in the adaptive dynamic adjustment dosage mode.
[0039] The dynamic adjustment unit coefficient Cda is a coefficient for adjusting the dosage of the reagent to meet the effluent residual chlorine target based on the negative feedback of the effluent residual chlorine.
[0040] The dynamic adjustment agent concentration correction coefficient Cdaa is a coefficient for correcting the agent dosage in order to eliminate the influence of agent concentration and meet the effluent residual chlorine target.
[0041] The calculation of the dosage of the agent using the agent dosing model includes the following sub-steps: Step S201, determine whether the dosage of the agent needs to be refreshed, if it is necessary to refresh the dosage of the agent, execute step S202, if not, end; Step S202, determining whether water production has started, if water production has started, executing step S203, if water production has not started, then ending; Step S203, judging whether water is automatically produced, if it is automatic water production, executing step S204, if it is not automatic water production, in order to facilitate manual intervention debugging or operation when non-automatic water production (manual water production) is not automatic, using fixed value addition mode 1, executing step S205c; Step S204, according to different situations, select the corresponding dynamic adjustment mode to determine whether to perform adaptive dynamic adjustment. If it is adaptive automatic adjustment, execute step S205b, otherwise execute step S205a; Step S205a, the dosage of the reagent Dfin is the dosage of the reagent Dfin2 calculated by the dynamic adjustment dosage mode 2 between the partitions, that is, Dfin=Dfin2, and then step S208 is executed; Step S205b, the dosage of the reagent Dfin is the dosage of the reagent Dfin3 calculated by the adaptive dynamic adjustment dosage mode 3, that is, Dfin=Dfin3, and then step S206 is executed; Step S205c, the dosage of the reagent Dfin is the dosage of the reagent Dfin1 calculated by the fixed value dosage mode 1, that is, Dfin=Dfin1, and then step S208 is executed; Step S206, judging whether the residual chlorine value of the effluent water is within the target range for several consecutive cycles (for example, 4 cycles). If it is within the target range, it means that the residual chlorine value of the effluent water is up to standard and stable according to the current dosage of the reagent Dfin, and the dosage of the reagent is relatively ideal. Therefore, the current dosage of the reagent Dfin is updated and stored as the dosage of the reagent corresponding to the inlet flow interval, and step S207 is executed. Otherwise, step S208 is executed. Step S207, taking the current dosage of the reagent as the dosage of the reagent corresponding to the i-th water inlet flow Di interval, that is, Di=Dfin, i=1,2,3...,n, executing this step, as the number of times the method is used increases, the trained dosage of the reagent is more accurate, the time to reach the target dosage is shorter, and the adjustment efficiency is more efficient, and then executing step S208; Step S208, outputting the dosage of the reagent Dfin.
[0042] For the dynamic addition mode 2 in divided intervals, the water production capacity Q of the water production equipment is divided into multiple flow intervals according to the inlet flow rate. The flow intervals where different inlet flow rates Qin are located correspond to different chemical dosages, and the chemical dosage is Dfin2.
[0043] In this embodiment, the inlet flow range is evenly divided into 10 intervals according to the water volume Q treated by the water production equipment, and the corresponding reagent dosages are: the reagent dosage D1 in the first interval of the inlet flow, the reagent dosage D2 in the second interval of the inlet flow, the reagent dosage D3 in the third interval of the inlet flow, the reagent dosage D4 in the fourth interval of the inlet flow, the reagent dosage D5 in the fifth interval of the inlet flow, the reagent dosage D6 in the sixth interval of the inlet flow, the reagent dosage D7 in the seventh interval of the inlet flow, the reagent dosage D8 in the eighth interval of the inlet flow, the reagent dosage D9 in the ninth interval of the inlet flow, and the reagent dosage D10 in the tenth interval of the inlet flow; Dividing the water flow range of the water production equipment into 10 intervals is only for the convenience of explanation in this example. The number of intervals can be adjusted during actual use.
[0044] When the influent flow rate is within the range of 0 to 0.1Q, that is, 0 < Qin ≤ 0.1Q, the chemical dosage is: the chemical dosage D1 in the first interval of the influent flow rate; when the influent flow rate is within the range of 0.1Q to 0.2Q, that is, 0.1 < Qin ≤ 0.2Q, the chemical dosage is: the chemical dosage D2 in the second interval of the influent flow rate; when the influent flow rate is within the range of 0.2Q to 0.3Q, that is, 0.2 < Qin ≤ 0.3Q, the chemical dosage is: the chemical dosage D3 in the third interval of the influent flow rate; when the influent flow rate is within the range of 0.3Q to 0.4Q, that is, 0.3 < Qin ≤ 0.4Q, the chemical dosage is: the chemical dosage D4 in the fourth interval of the influent flow rate; when the influent flow rate is within the range of 0.4Q to 0.5Q, that is, 0.4 < Qin ≤ 0.5Q, the chemical dosage is: the chemical dosage D5 in the fifth interval of the influent flow rate; when the influent flow rate is within the range of 0.5Q to 0.6Q, that is, 0.5 < Qin ≤ 0.6Q, the chemical dosage is: the chemical dosage D6 in the sixth interval of the influent flow rate; when the influent flow rate is within the range of 0.6Q to 0.7Q, that is, 0.6 < Qin ≤ 0.7Q, the chemical dosage is: the chemical dosage D7 in the seventh interval of the influent flow rate; when the influent flow rate is within the range of 0.7Q to 0.8Q, that is, 0.7 < Qin ≤ 0.8Q, the chemical dosage is: the chemical dosage D8 in the eighth interval of the influent flow rate; when the influent flow rate is within the range of 0.8Q to 0.9Q, that is, 0.8 < Qin ≤ 0.9Q, the chemical dosage is: the chemical dosage D9 in the ninth interval of the influent flow rate; when the influent flow rate is within the range of 0.9Q to Q: Qin > 0.9Q, the chemical dosage is: the chemical dosage D10 in the tenth interval of the influent flow rate.
[0045] The calculation of the chemical dosage in the sub - interval dynamic adjustment dosing mode 3 includes the following sub - steps: Step S301, determine the magnitude of Qin. If 0 < Qin ≤ 0.1Q, then proceed to step S302a; if 0.1Q < Qin ≤ 0.2Q, then proceed to step S302b; if 0.2Q < Qin ≤ 0.3Q, then proceed to step S302c; if 0.3Q < Qin ≤ 0.4Q, then proceed to step S302d; if 0.4Q < Qin ≤ 0.5Q, then proceed to step S302e; if 0.5Q < Qin ≤ 0.6Q, then proceed to step S302f; if 0.6Q < Qin ≤ 0.7Q, then proceed to step S302g; if 0.7Q < Qin ≤ 0.8Q, then proceed to step S302h; if 0.8Q < Qin ≤ 0.9Q, then proceed to step S302i; if Qin > 0.9Q, then proceed to step S302j; Execute step S302a, the dosage of the reagent is the dosage of the reagent in the first interval of the inlet flow rate D1, that is, Dfin2=D1, and then execute step S303; Execute step S302b, the dosage of the reagent is the dosage of the reagent in the second interval of the water inlet flow rate D2, that is, Dfin2=D2, and then execute step S303; Execute step S302c, the dosage of the reagent is the dosage of the reagent in the third interval of the water inlet flow rate D3, that is, Dfin2=D3, and then execute step S303; Execute step S302d, the dosage of the reagent is the dosage of the reagent in the fourth interval of the water inlet flow rate D4, that is, Dfin2=D4, and then execute step S303; Execute step S302e, the dosage of the reagent is the dosage of the reagent in the fifth interval of the water inlet flow rate D5, that is, Dfin2=D5, and then execute step S303; Execute step S302f, the dosage of the reagent is the dosage of the reagent in the sixth interval of the water inlet flow rate D6, that is, Dfin2=D6, and then execute step S303; Execute step S302g, the dosage of the reagent is the dosage of the reagent in the seventh interval of the water inlet flow rate D7, that is, Dfin2=D7, and then execute step S303; Execute step S302h, the dosage of the reagent is the dosage of the reagent in the eighth interval of the water inlet flow rate D8, that is, Dfin2=D8, and then execute step S303; Execute step S302i, the dosage of the reagent is the dosage of the reagent in the ninth interval of the water inlet flow rate D9, that is, Dfin2=D9, and then execute step S303; Execute step S302j, the dosage of the reagent is the dosage of the reagent in the tenth interval of the inlet flow rate D10, Dfin2=D10, and then execute step S303; Execute step S303 to output the final dosage Dfin2 of the agent in the dynamic adjustment dosage mode 2 between partitions.
[0046] The calculation of the dosage of the reagent under the adaptive dynamic adjustment dosage mode 3 includes the following sub-steps: Step S401, determining whether the adaptive dynamic adjustment dosing mode 3 is used for the first time, if it is used for the first time, executing step S409a, otherwise executing step S402; Step S402, determining whether the residual chlorine in the water is within the target range, if yes, executing step S409b, otherwise executing step S403; Step S403, determine whether the change of the inlet flow Qin exceeds a given threshold (which can be 0.1Q here), if so, execute step S504, and obtain the dosage of the reagent corresponding to the flow partition interval from the dynamic adjustment dosage mode 2 between partition intervals, otherwise execute step S406, and fine-tune the dosage of the reagent according to the values of the effluent residual chlorine Cout and the reagent concentration Cage; Step S404, calculate Dfin2 by dynamically adjusting the dosing mode 2 between partitions, and then execute step S405; Step S405, judging whether the flow rate change and the reagent dosage change change in the same direction according to Dfin2, that is, if the inlet flow rate increases, whether the calculated Dfin2 is greater than the current reagent dosage Dfin, or if the inlet flow rate decreases, whether the calculated Dfin2 is less than the current reagent dosage Dfin, which is expressed by the formula (Qpre-Qold)*(Dfin2-Dfin)>0. If yes, execute step S409c, otherwise execute step S406; Step S406, taking the dynamically adjusted basic dosage as the current dosage of the agent, that is, Dbas=Dfin, and then executing step S407; Step S407, calculating the dynamic adjustment unit coefficient Cda, and then executing step S408; Step S408, calculating the dynamic adjustment concentration correction coefficient Cdaa, and then executing step S409d; Step S409a, adaptively and dynamically adjust the dosage of the agent in dosage mode 3 to the dynamically adjusted basic dosage, that is, Dfin3 = Dbas, and then execute step S410; Step S409b, the dosage of the agent in the adaptive dynamic adjustment dosage mode 3 remains unchanged, which is still the current dosage of the agent, that is, Dfin3 = Dfin, and then step S410 is executed; Step S409c, adaptively and dynamically adjust the dosage of the agent in dosage mode 3 to the dosage of the agent calculated by dynamically adjusting the dosage mode 2 between partitions, that is, Dfin3 = Dfin2, and then execute step S410; Step S409d, the dosage of the reagent in the adaptive dynamic adjustment dosage mode 3 is based on the dynamic adjustment basic dosage plus the deviation adjustment value of the distance from the effluent residual chlorine target and the correction value of the reagent concentration, that is, Dfin3 = Dbas+Cda*Uda+Cdaa*Uda, and then execute step S410; Step S410, outputting the reagent dosage Dfin3 of the adaptive dynamic adjustment dosage mode 3.
[0047] The calculation of the dynamic adjustment unit coefficient Cda in step S407 includes: Judge the magnitude of the residual chlorine Cout in the effluent. Taking Coutl < Cout < Coutu as the target range of the residual chlorine in the effluent, divide it into multiple numerical intervals according to the numerical value of Cout. Each numerical interval where Cout is located corresponds to a different dynamic adjustment unit coefficient Cda; if Cout is within the target range, there is no need to adjust the chemical dosage, and the dynamic adjustment unit coefficient Cda takes the value of 0; if Cout is not within the target range, the chemical dosage needs to be adjusted. The closer the value of Cout is to the target range of the residual chlorine in the effluent, the smaller the absolute value of the dynamic adjustment unit coefficient Cda, and the farther the value of Cout is from the target range of the residual chlorine in the effluent, the larger the absolute value of the dynamic adjustment unit coefficient Cda; if Cout ≥ Coutu, the chemical dosage needs to be reduced, and the dynamic adjustment unit coefficient Cda takes a negative value. If Cout ≤ Coutl, the chemical dosage needs to be increased, and the dynamic adjustment unit coefficient Cda takes a positive value.
[0048] Specifically, the following is only an embodiment of one situation, and of course it is not limited to this. The calculation of the dynamic adjustment unit coefficient Cda includes the following sub-steps: Execute step S501 to judge the magnitude of the residual chlorine Cout in the effluent. If Cout > 0.7, then execute step S502a next; if 0.5 ≤ Cout ≤ 0.7, then execute step S502b next; if 0.3 < Cout < 0.5, then execute step S502c next; if 0.1 ≤ Cout ≤ 0.3, then execute step S502d next; if Cout < 0.1, then execute step S502e next; Execute step S502a. At this time, the residual chlorine Cout in the effluent is far from the target value, and the chemical dosage needs to be reduced. The dynamic adjustment unit coefficient Cda takes the value of -2, that is, Cda = -2, and then execute step S503; Execute step S502b. At this time, the residual chlorine Cout in the effluent is slightly far from the target value, and a small amount of chemical dosage needs to be reduced. The dynamic adjustment unit coefficient Cda takes the value of -1, that is, Cda = -1, and then execute step S503; Execute step S502c. At this time, the residual chlorine Cout in the effluent reaches the target value, and there is no need to adjust the chemical dosage. The dynamic adjustment unit coefficient Cda takes the value of 0, that is, Cda = 0, and then execute step S503; Execute step S502d. At this time, the residual chlorine Cout in the effluent is slightly far from the target value, and a small amount of chemical dosage needs to be increased. The dynamic adjustment unit coefficient Cda takes the value of 1, that is, Cda = 1, and then execute step S503; Execute step S502e. At this time, the residual chlorine Cout in the effluent is far from the target value, and the chemical dosage needs to be increased. The dynamic adjustment unit coefficient Cda takes the value of 2, that is, Cda = 2, and then execute step S503; Execute step S503 to output the dynamic adjustment unit coefficient Cda.
[0049] Among them, the calculation of the dynamic adjustment chemical concentration correction coefficient Cdaa in step S408 includes: Judge the magnitude of the chemical concentration Cage. The normal range of the chemical concentration is Cage1 < Cage < Cageu. According to the numerical value of Cage, it is divided into multiple numerical intervals, and each numerical interval where Cage is located corresponds to a different dynamic adjustment chemical concentration correction coefficient Cdaa; if Cage is within the normal range of the chemical concentration, there is no need to adjust the chemical dosage, and the value of the dynamic adjustment chemical concentration correction coefficient Cdaa is 0; if Cage is not within the target range, the chemical dosage needs to be adjusted. The closer the value of Cout is to the normal range of the chemical concentration, the smaller the absolute value of the dynamic adjustment unit coefficient Cage, and the farther the value of Cout is from the normal range of the chemical concentration, the larger the absolute value of the dynamic adjustment chemical concentration correction coefficient Cdaa; if Cage ≥ Cageu, the chemical dosage needs to be reduced, and the dynamic adjustment unit coefficient Cda takes a negative value. If Cage ≤ Cage1, the chemical dosage needs to be increased, and the dynamic adjustment chemical concentration correction coefficient Cdaa takes a positive value.
[0050] The upper limit Cageu and the lower limit Cage1 of the normal chemical concentration range are the upper and lower limits of the normal range of the chemical concentration. Compared with the influent flow rate and the residual chlorine in the effluent, after the chemical is prepared, the concentration change is small and has little impact on the water quality treatment result. When the chemical concentration is within the normal range, the influence of the chemical concentration on the chemical dosage is not considered. However, after long-term volatilization, the chemical concentration will decrease, or the concentration of the prepared chemical is too high. At this time, it has a great impact on the water quality treatment process, and it is necessary to consider the influence of the chemical concentration on the chemical dosage, and use the dynamic adjustment chemical concentration correction coefficient Cdaa to correct the chemical dosage.
[0051] When the chemical concentration Cage is greater than the upper limit Cageu of the normal chemical concentration range, that is, Cage > Cageu, the chemical dosage needs to be reduced; when the chemical concentration Cage is less than the lower limit Cage1 of the normal chemical concentration range, that is, Cage < Cage1, the chemical dosage needs to be increased; when the chemical concentration Cage is between the lower limit Cage1 and the upper limit Cageu of the normal chemical concentration range, that is, Cage1 ≤ Cage ≤ Cageu, the influence of the chemical concentration on the chemical dosage is not considered.
[0052] Specifically, the following is only an example of one situation, and of course it is not limited to this. The calculation of the dynamic adjustment chemical concentration correction coefficient Cdaa includes the following sub-steps: Execute step S601 to judge the magnitude of the agent concentration Cage. When the agent concentration Cage is greater than the upper limit Cageu of the normal agent concentration range, that is, Cage > Cageu, then step S602a is executed subsequently; if the agent concentration Cage is less than the lower limit Cagel of the normal agent concentration range, that is, Cage < Cagel, then step S602b is executed subsequently; if the agent concentration Cage is between the lower limit Cagel and the upper limit Cageu of the normal agent concentration range, that is, Cagel ≤ Cage ≤ Cageu, execute 502c; Execute step S602a. At this time, it is necessary to reduce the agent dosage, and the dynamic adjustment of the agent concentration correction coefficient Cdaa takes the value of -0.5, that is, Cdaa = -0.5, then step S603 is executed subsequently; Execute step S602b. At this time, it is necessary to increase the agent dosage, and the dynamic adjustment of the agent concentration correction coefficient Cdaa takes the value of 0.5, that is, Cdaa = 0.5, then step S603 is executed subsequently; Execute step S602c. At this time, the influence of the agent concentration on the agent dosage is not considered, and the dynamic adjustment of the agent concentration correction coefficient Cdaa takes the value of 0, Cdaa = 0, and step S603 is executed subsequently; Execute step S603 and output Cdaa.
[0053] It can be seen from the above embodiments that the present application collects the inlet flow rate, reagent concentration and outlet residual chlorine data in real time, and performs pretreatment. According to the pretreated data, the reagent dosage is calculated using the reagent dosing model. The reagent dosing model has three modes: fixed value dosing mode 1, dynamic adjustment dosing mode 2 between partitions, and adaptive dynamic adjustment dosing mode 3. Through the setting of the three dosing modes, the inlet flow data is invalid due to temporary damage to the flow meter and other reasons during actual use, and the fixed dosing mode is switched to. At this time, the dosage of the reagent is not affected by the size of the inlet flow rate; the inlet flow data is normal, but the outlet residual chlorine data is invalid due to damage to the water quality analyzer and other reasons, and the dynamic adjustment dosing mode is switched to the partition; the reagent concentration data has a smaller weight for adjusting the dosage of the reagent than the inlet flow data and the outlet residual chlorine data, because the reagent concentration data is invalid and the mode is not switched. When the inlet flow data, the outlet residual chlorine data, and the reagent concentration data are all valid, switch to the adaptive dynamic adjustment dosing mode. The adaptive dynamic adjustment dosage mode preliminarily determines the dosage of the agent according to the size of the inlet flow rate, adjusts the dosage of the agent according to the monitored negative feedback of the residual chlorine in the effluent, and corrects the dosage of the agent according to the monitored concentration of the agent. This solves the problem that the dosage of the agent is difficult to determine due to the different inlet flow rates, concentrations of the agent, and types of agents in the water production process of a single village water station. It ensures that the appropriate amount of agent is added to meet the water quality standards of the outgoing water, and does not add too much agent to make the outgoing water produce a strong irritating odor, leading to complaints from residents and wasting agents. As the method is used more times, the trained dosage of the agent becomes more accurate, the time to reach the target dosage is shorter, and the adjustment efficiency is more efficient.
[0054] The present application can also set parameters such as the adjustment cycle and the adjustment variation range to ensure that the agents and water can fully react with each other when adding different agents, and avoid frequent adjustments of the dosing equipment to extend the service life of the equipment. In addition, when the inlet flow, agent concentration, and outlet water quality monitoring equipment encounter faults, the dosing mode can be switched without affecting the calculation of the agent dosage, thereby improving management efficiency and facilitating unattended operation.
[0055] Corresponding to the aforementioned embodiment of the method for calculating the dosage of a pharmaceutical agent, the present application also provides an embodiment of a device for calculating the dosage of a pharmaceutical agent.
[0056] Figure 3 is a block diagram of a device for calculating the dosage of a pharmaceutical agent according to an exemplary embodiment. Figure 3 , the device comprises:
[0057] The acquisition and processing module 100 is used to collect the inlet flow rate, reagent concentration and outlet residual chlorine data in real time and perform pre-processing; A calculation module 200 is used to calculate the dosage of the agent according to the preprocessed data using the agent dosage model, wherein the agent dosage model has three modes: a fixed value dosage mode 1, a dynamic adjustment dosage mode 2 between partitions, and an adaptive dynamic adjustment dosage mode 3; The fixed value addition mode 1 means that the amount of the drug added during the drug addition process is a constant value, and the drug addition amount is Dfin1; The dynamic addition mode 2 divided into different intervals divides the water production capacity Q of the water-making equipment into multiple flow intervals according to the inlet flow rate (it can be set and adjusted during use, or the default number of intervals can be used). Different flow intervals where the inlet flow rate Qin is located correspond to different chemical dosages, and the chemical dosage is Dfin2; the final dosage Din2 is a univariate function of the inlet flow rate Qin, that is, Din2=f(Qin).
[0058] The adaptive dynamic adjustment dosage mode 3 preliminarily determines the dosage of the reagent according to the size of the inlet water flow rate, adjusts the dosage of the reagent according to the monitored negative feedback of the residual chlorine in the effluent, and corrects the dosage of the reagent according to the monitored concentration of the reagent. The dosage of the reagent is Dfin3, Dfin3= Dbas+Cda*Uda + Cdaa*Uda, wherein Dbas is the dynamic adjustment basic dosage, Cda is the dynamic adjustment unit coefficient, Uda is the dynamic adjustment unit quantity, and Cdaa is the dynamic adjustment reagent concentration correction coefficient.
[0059] Here, the degree of intelligence of the dosing mode and the accuracy of the agent adjustment are from high to low as follows: adaptive dynamic adjustment dosing mode 3, interval dynamic adjustment dosing mode 2, and fixed value dosing mode 1.
[0060] In actual use, if the flow meter is temporarily damaged or other reasons cause the inlet flow data to be invalid, switch to fixed dosage mode 1, at which time the dosage of the reagent is not affected by the inlet flow; if the inlet flow data is normal, but the outlet residual chlorine data is invalid due to reasons such as damage to the water quality analyzer, switch to dynamic adjustment dosage mode 2 between different intervals; the weight of the reagent concentration data for adjusting the dosage of the reagent is smaller than that of the inlet flow data and the outlet residual chlorine data, so the mode is not switched because the reagent concentration data is invalid. If the inlet flow data, outlet residual chlorine data, and reagent concentration data are all valid, switch to adaptive dynamic adjustment dosage mode 3.
[0061] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0062] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0063] Embodiment 2: Figure 4 is a flow chart of a method for controlling the dosing of a drug according to an exemplary embodiment. Figure 4 As shown, the method may include the following steps: A1: Execute the method for calculating the dosage of the agent described in Example 1 to obtain the dosage of the agent; A2: According to the calculated dosage of the reagent, the reagent addition execution unit is controlled to add the reagent according to the calculated dosage of the reagent; A3: Determine whether it is necessary to stop water production. If so, end the operation. If not, repeat A1-A2 in sequence until water production is stopped.
[0064] Here, step A1 refers to Example 1 and is not described in detail here.
[0065] Corresponding to the aforementioned embodiment of the method for calculating the dosage of a pharmaceutical agent, the present application also provides an embodiment of a device for calculating the dosage of a pharmaceutical agent.
[0066] Figure 5 is a block diagram of a drug dosing control device according to an exemplary embodiment. Figure 5 , the device comprises:
[0067] An execution module 1 is used to execute the method for calculating the dosage of the drug described in Example 1 to obtain the dosage of the drug; The control module 2 is used to control the agent addition execution unit to perform agent addition according to the calculated agent addition amount; The judgment cycle module 3 is used to judge whether it is necessary to stop water production. If water production is stopped, the operation is terminated. If water production is not stopped, the execution module and the control module are repeatedly executed in sequence until water production is stopped.
[0068] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0069] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0070] Embodiment 3: Accordingly, the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method for calculating the dosage of a pharmaceutical agent or the method for controlling the dosage of a pharmaceutical agent. Figure 6 As shown, it is a hardware structure diagram of a device with data processing capability where a device for calculating the dosage of a medicine or a device for controlling the dosage of a medicine provided by an embodiment of the present invention is located, except Figure 6 In addition to the processor and memory shown, any device with data processing capability in which the apparatus in the embodiment is located may also include other hardware, generally based on the actual functions of the device with data processing capability, which will not be described in detail.
[0071] Accordingly, the present application also provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by the processor, the above-mentioned method for calculating the dosage of the drug or the method for controlling the dosage of the drug is implemented. The computer-readable storage medium can be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium can also include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and can also be used to temporarily store data that has been output or is to be output.
[0072] Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0073] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for calculating the dosage of a drug, characterized in that: include: Collect inlet flow, reagent concentration and outlet residual chlorine data in real time and perform pretreatment; According to the pre-processed data, the dosage of the agent is calculated using the agent dosing model, and the agent dosing model has three modes: fixed value dosing mode 1, dynamic adjustment dosing mode 2 between partitions, and adaptive dynamic adjustment dosing mode 3; The fixed value addition mode 1 means that the amount of the drug added during the drug addition process is a constant value, and the drug addition amount is Dfin1; The dynamic dosing mode 2 divided into different intervals is to divide the water production capacity Q of the water production equipment into multiple flow intervals according to the inlet flow rate. Different flow intervals where the inlet flow rate Qin is located correspond to different reagent dosages, and the reagent dosage is Dfin2; The adaptive dynamic adjustment dosage mode 3 preliminarily determines the dosage of the reagent according to the size of the inlet water flow rate, adjusts the dosage of the reagent according to the monitored negative feedback of the residual chlorine in the effluent, and corrects the dosage of the reagent according to the monitored concentration of the reagent. The dosage of the reagent is Dfin3, Dfin3= Dbas+Cda*Uda + Cdaa*Uda, wherein Dbas is the dynamic adjustment basic dosage, Cda is the dynamic adjustment unit coefficient, Uda is the dynamic adjustment unit quantity, and Cdaa is the dynamic adjustment reagent concentration correction coefficient.
2. The method according to claim 1, characterized in that The calculation of the dosage of the agent is carried out using the agent dosing model, including: Step S201, determine whether the dosage of the agent needs to be refreshed, if it is necessary to refresh the dosage of the agent, execute step S202, if not, end; Step S202, determining whether water production has started, if water production has started, executing step S203, if water production has not started, then ending; Step S203, determining whether water is automatically produced, if it is automatically produced, executing step S204, if it is not automatically produced, executing step S205c; Step S204, determining whether the dosage is adaptively and dynamically adjusted, if it is adaptive and automatic adjustment, executing step S205b, otherwise executing step S205a; Step S205a, the dosage of the reagent Dfin is the dosage of the reagent Dfin2 calculated by the dynamic adjustment dosage mode 2 between the partitions, that is, Dfin=Dfin2, and then step S208 is executed; Step S205b, the dosage of the reagent Dfin is the dosage of the reagent Dfin3 calculated by the adaptive dynamic adjustment dosage mode 3, that is, Dfin=Dfin3, and then step S206 is executed; Step S205c, the dosage of the reagent Dfin is the dosage of the reagent Dfin1 calculated by the fixed value dosage mode 1, that is, Dfin=Dfin1, and then step S208 is executed; Step S206, determining whether the residual chlorine value of the outlet water is within the target range for several consecutive cycles, if it is within the target range, executing step S207, otherwise executing step S208; Step S207, taking the current dosage of the reagent Dfin as the dosage of the reagent Di corresponding to the i-th water inlet flow interval, that is, Di=Dfin, i=1,2,3...,n, and then executing step S208; Step S208, outputting the dosage of the reagent Dfin.
3. The method according to claim 1 or 2, characterized in that: The calculation of the dosage of the agent under the adaptive dynamic adjustment dosage mode 3 includes: Step S401, determining whether the adaptive dynamic adjustment dosing mode 3 is used for the first time, if it is used for the first time, executing step S409a, otherwise executing step S402; Step S402, determining whether the residual chlorine in the water is within the target range, if yes, executing step S409b, otherwise executing step S403; Step S403, determine whether the change of the inlet flow Qin exceeds a given threshold, if so, execute step S404, and obtain the dosage of the reagent corresponding to the flow interval from the dynamic adjustment dosage mode 2 between the intervals, otherwise execute step S406, and fine-tune the dosage of the reagent according to the value of the effluent residual chlorine Cout and the reagent concentration Cage; Step S404, calculate Dfin2 by dynamically adjusting the dosing mode 2 between partitions, and then execute step S405; Step S405, judging whether the flow rate change and the reagent dosage change change in the same direction according to Dfin2, that is, if the inlet flow rate increases, whether the calculated Dfin2 is greater than the current reagent dosage Dfin, or if the inlet flow rate decreases, whether the calculated Dfin2 is less than the current reagent dosage Dfin, if so, executing step S409c, otherwise executing step S406; Step S406, taking the dynamically adjusted basic dosage as the current dosage of the agent, that is, Dbas=Dfin, and then executing step S407; Step S407, calculating the dynamic adjustment unit coefficient Cda, and then executing step S408; Step S408, calculating the dynamic adjustment concentration correction coefficient Cdaa, and then executing step S409d; Step S409a, adaptively and dynamically adjust the dosage of the agent in dosage mode 3 to the dynamically adjusted basic dosage, that is, Dfin3 = Dbas, and then execute step S410; Step S409b, the dosage of the agent in the adaptive dynamic adjustment dosage mode 3 remains unchanged, which is still the current dosage of the agent, that is, Dfin3 = Dfin, and then step S410 is executed; Step S409c, adaptively and dynamically adjust the dosage of the agent in dosage mode 3 to the dosage of the agent calculated by dynamically adjusting the dosage mode 2 between partitions, that is, Dfin3 = Dfin2, and then execute step S410; Step S409d, the dosage of the reagent in the adaptive dynamic adjustment dosage mode 3 is based on the dynamic adjustment basic dosage plus the deviation adjustment value of the distance from the effluent residual chlorine target and the correction value of the reagent concentration, that is, Dfin3 = Dbas+Cda*Uda+Cdaa*Uda, and then execute step S410; Step S410, outputting the reagent dosage Dfin3 of the adaptive dynamic adjustment dosage mode 3.
4. The method according to claim 3, characterized in that The dynamic adjustment unit coefficient Cda calculation includes: Judge the magnitude of the residual chlorine Cout in the effluent. With Coutl < Cout < Coutu as the target range of the residual chlorine in the effluent, Coutl being the lower limit of the target range of the residual chlorine in the effluent, and Coutu being the upper limit of the target range of the residual chlorine in the effluent, divide it into multiple numerical intervals according to the magnitude of the value of Cout. Each numerical interval where Cout is located corresponds to a different dynamic adjustment unit coefficient Cda; if Cout is within the target range, there is no need to adjust the chemical dosage, and the dynamic adjustment unit coefficient Cda takes the value of 0; if Cout is not within the target range and the chemical dosage needs to be adjusted, the closer the value of Cout is to the target range of the residual chlorine in the effluent, the smaller the absolute value of the dynamic adjustment unit coefficient Cda, and the farther the value of Cout is from the target range of the residual chlorine in the effluent, the larger the absolute value of the dynamic adjustment unit coefficient Cda; if Cout ≥ Coutu, the chemical dosage needs to be reduced, and the dynamic adjustment unit coefficient Cda takes a negative value. If Cout ≤ Coutl, the chemical dosage needs to be increased, and the dynamic adjustment unit coefficient Cda takes a positive value.
5. The method according to claim 3, characterized in that: The calculation of the dynamic adjustment chemical concentration correction coefficient Cdaa includes: Judge the magnitude of the chemical concentration Cage. With Cagel < Cage < Cageu as the normal range of the chemical concentration, Cageu being the upper limit of the normal chemical concentration range, and Cagel being the lower limit of the normal chemical concentration range, divide it into multiple numerical intervals according to the magnitude of the value of Cage. Each numerical interval where Cage is located corresponds to a different dynamic adjustment chemical concentration correction coefficient Cdaa; if Cage is within the normal range of the chemical concentration, there is no need to adjust the chemical dosage, and the dynamic adjustment chemical concentration correction coefficient Cdaa takes the value of 0; if Cage is not within the target range and the chemical dosage needs to be adjusted, the closer the value of Cout is to the normal range of the chemical concentration, the smaller the absolute value of the dynamic adjustment unit coefficient Cage, and the farther the value of Cout is from the normal range of the chemical concentration, the larger the absolute value of the dynamic adjustment chemical concentration correction coefficient Cdaa; if Cage ≥ Cageu, the chemical dosage needs to be reduced, and the dynamic adjustment unit coefficient Cda takes a negative value. If Cage ≤ Cagel, the chemical dosage needs to be increased, and the dynamic adjustment chemical concentration correction coefficient Cdaa takes a positive value.
6. The method according to claim 1, characterized in that When the influent flow rate data is invalid, switch to the fixed dosing mode 1, and at this time, the chemical dosage is not affected by the magnitude of the influent flow rate. When the influent flow rate data is normal and the effluent residual chlorine data is invalid, switch to the interval-based dynamic adjustment dosing mode 2. When the influent flow rate data, the effluent residual chlorine data, and the chemical concentration data are all valid, switch to the adaptive dynamic adjustment dosing mode 3.
7. A device for calculating the dosage of a pharmaceutical agent, characterized in that: It includes: A collection and processing module for real-time collection of influent flow rate, chemical concentration, and effluent residual chlorine data and preprocessing them. A calculation module for calculating the chemical dosage using the chemical dosing model according to the preprocessed data. The chemical dosing model has three modes: the fixed value dosing mode 1, the interval-based dynamic adjustment dosing mode 2, and the adaptive dynamic adjustment dosing mode 3. The fixed value addition mode 1 means that the amount of the drug added during the drug addition process is a constant value, and the drug addition amount is Dfin1; The dynamic dosing mode 2 divided into different intervals is to divide the water production capacity Q of the water production equipment into multiple flow intervals according to the inlet flow rate. Different flow intervals where the inlet flow rate Qin is located correspond to different reagent dosages, and the reagent dosage is Dfin2; The adaptive dynamic adjustment dosage mode 3 preliminarily determines the dosage of the reagent according to the size of the inlet water flow rate, adjusts the dosage of the reagent according to the monitored negative feedback of the residual chlorine in the effluent, and corrects the dosage of the reagent according to the monitored concentration of the reagent. The dosage of the reagent is Dfin3, Dfin3= Dbas+Cda*Uda + Cdaa*Uda, wherein Dbas is the dynamic adjustment basic dosage, Cda is the dynamic adjustment unit coefficient, Uda is the dynamic adjustment unit quantity, and Cdaa is the dynamic adjustment reagent concentration correction coefficient.
8. A method for controlling the dosing of a pharmaceutical agent, characterized in that: include: A1: Execute the method for calculating the dosage of the pharmaceutical agent according to any one of claims 1 to 6 to obtain the dosage of the pharmaceutical agent; A2: According to the calculated dosage of the reagent, the reagent addition execution unit is controlled to add the reagent according to the calculated dosage of the reagent; A3: Determine whether it is necessary to stop water production. If so, end the operation. If not, repeat A1-A2 in sequence until water production is stopped.
9. A drug dosing control device, characterized in that: include: An execution module, used to execute the method for calculating the dosage of a pharmaceutical agent according to any one of claims 1 to 6, to obtain the dosage of the pharmaceutical agent; A control module, for controlling the agent dosing execution unit to perform agent dosing according to the calculated agent dosing amount; The judgment cycle module is used to judge whether it is necessary to stop water production. If water production is stopped, the operation is terminated. If water production is not stopped, the execution module and the control module are repeatedly executed in sequence until water production is stopped.
10. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-6 and 8.
Citation Information
Patent Citations
Carbon source addition feedforward-feedback control device and method
CN104298259A
Closed-loop control type system for accurately feeding residual chlorine to tap water and control method of system
CN107697991A
Carbon source feeding dynamic adjustment method and device, electronic equipment and medium
CN115373256A
Automatic adding equipment for sodium hypochlorite
CN116553694A
Automatic adding control system and method for filtered sodium hypochlorite based on AB PLC (programmable logic controller) mode
CN117125805A
Cited By
Intelligent chlorination method and device for waterworks and storage medium
CN120573819A
Edge control method for intelligent dosing of water plant
CN121107554A
