Automatic pH value feeding system with automatic calibration function
The automatic pH feeding system with automatic calibration function monitors and adjusts the pH value in real time. By combining historical data and cleaning operations, it solves the problems of large pH measurement error and inflexible feeding control in traditional systems, and achieves rapid and accurate pH control and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-10
AI Technical Summary
Traditional pH measurement and control systems cannot dynamically adjust the calibration frequency according to actual pH value changes, resulting in large measurement errors, low control accuracy, and a lack of flexibility in feeding control, which easily leads to overshoot or undershoot. Furthermore, the probe contact method and reading stability are insufficient.
An automatic pH feeding system with automatic calibration function is adopted. By monitoring the pH value of the standard solution in the mixing tank in real time, a pH deviation signal is generated to control the servo feeding mechanism to add high-concentration reagents. Combined with historical feeding records and drift slope analysis, the feeding control mode is selected to ensure that the pH value returns to the target range. The system also performs pipeline cleaning, standard solution delivery, and probe reading stability assessment.
It achieves rapid and accurate pH control, ensures the constant value of the standard solution in the mixing tank, improves the stability and accuracy of measurement and calibration, reduces human error, and enhances the adaptability and reliability of the system.
Smart Images

Figure CN121635522A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of feeding, and more particularly to an automatic pH feeding system with automatic calibration function. Background Technology
[0002] In numerous fields such as industrial production, environmental monitoring, biopharmaceuticals, and food and beverage, the accurate measurement and control of pH is a crucial step in ensuring product quality, optimizing production processes, ensuring environmental safety, and meeting regulatory requirements. As an important indicator of the acidity or alkalinity of a solution, the accuracy and stability of pH directly affect the efficiency of the production process, the final quality of the product, and the service life of equipment.
[0003] Traditional pH measurement and control methods mainly rely on manual periodic calibration and adjustment, which is not only inefficient but also susceptible to human factors, leading to large measurement errors and low control accuracy. With the development of automation technology, automated pH measurement and control systems have gradually appeared on the market.
[0004] Traditional automated systems often rely on fixed calibration cycles and cannot dynamically adjust the calibration frequency according to changes in actual pH values. This results in untimely calibration during periods of drastic pH changes or critical production stages, affecting measurement accuracy. Existing systems mostly use fixed feeding speed and amount for feeding control, lacking the ability to dynamically adjust based on pH deviation signals, historical feeding records, and mixing tank status. This results in poor control performance when dealing with complex and ever-changing pH values, and is prone to overshoot or undershoot. During the calibration process, it is crucial to ensure that the pH probe to be calibrated is in full contact with the standard solution and that the reading is stable. However, existing systems have shortcomings in probe contact method, stirring and venting control, and reading stability judgment, which may lead to large fluctuations and poor repeatability of calibration results.
[0005] Therefore, we propose an automatic pH / alkalinity feeding system with automatic calibration function to solve the above problems. Summary of the Invention
[0006] This invention provides an automatic pH feeding system with automatic calibration function to ensure the long-term stability and accuracy of calibration results.
[0007] The first aspect of this invention provides an automatic pH dispensing system with automatic calibration function. The automatic pH dispensing system includes: a monitoring module for acquiring the current pH value of the standard solution in three mixing tanks by reading real-time monitoring data from three standard probes; a comparison module for comparing each current pH value with its corresponding target pH value to generate a pH deviation signal; and a maintenance module for generating and executing a dispensing control command when any pH deviation signal exceeds a preset tolerance range, controlling a servo dispensing mechanism to add a high-concentration reagent to the corresponding mixing tank until the current pH value returns to the target pH value range, thereby confirming and maintaining the constant pH state of the standard solution in the mixing tank.
[0008] Optionally, in the first implementation of the first aspect of the present invention, after confirming that the standard solution is in a constant value state, the following control sub-steps are sequentially executed on the standard solutions of pH 4.0, 6.86, and 9.18 in a preset order: a cleaning module, used to generate and execute valve and air pump control commands for venting, air propulsion, backwashing, and drying to complete pipeline cleaning and mark the pipeline as clean and ready in the software; an exhaust module, used to generate and execute valve control commands when the pipeline is in a clean and ready state, so that the current target constant value standard solution flows into the measuring chamber, and at the same time generate and execute agitation and exhaust commands to ensure that the pH probe to be calibrated is in full contact with the standard solution, and then read the original measurement value of the pH probe to be calibrated; a calibration module, used to compare the original measurement value with the theoretical pH value of the current target constant value standard solution, calculate the calibration parameters according to the difference through the calibration algorithm in the PLC program, and use the calibration parameters to correct the measurement output of the pH probe to be calibrated, thus completing the calibration at that point.
[0009] Optionally, in a second implementation of the first aspect of the present invention, based on the sign and magnitude of the pH deviation signal and combined with the historical feeding records of the mixing tank, a state judgment result is obtained, and a corresponding feeding control mode is selected from a preset feeding strategy library according to the state judgment result. Based on the selected feeding control mode, the compensation algorithm bound to that mode is invoked. The pH deviation signal, the current volume information of the mixing tank, and the preset concentration ratio of the high-concentration reagent are used as raw inputs to the compensation algorithm to calculate the initial feeding compensation amount. A first feeding control command is generated and executed to control the servo feeding mechanism to add the high-concentration reagent of the initial feeding compensation amount at a first speed, obtaining the first round of replenished mixture. The monitoring data of the first round of replenished mixture from the standard probe is read in real time to obtain the first round of corrected real-time monitoring data. The residual deviation between the first round of corrected real-time monitoring data and the target pH value is calculated. If the residual deviation has fallen within the preset tolerance range, the constant value state is confirmed and the feeding process ends. If the residual deviation still exceeds the preset tolerance range but is less than the initial pH deviation signal, the compensation amount calculation step is repeated based on the residual deviation to generate a second feeding compensation amount. Subsequently, a second feeding control command is generated and executed to control the servo feeding mechanism to add the high-concentration reagent of the second feeding compensation amount at a second speed lower than the first speed, obtaining the final replenished constant value standard solution.
[0010] Optionally, in the third implementation of the first aspect of the present invention, the historical pH monitoring data sequence stored in the mixing tank over the most recent N monitoring periods, as well as the corresponding historical feeding event records, are retrieved. The historical pH monitoring data sequence is linearly fitted to calculate the drift slope characterizing the direction of pH change in the standard solution and the drift fluctuation value characterizing the stability of the change. Statistical features of feeding frequency and feeding amount are extracted from the historical feeding event records as a reference for historical intervention intensity. The drift slope, drift fluctuation value, and the pH deviation signal of the current period are used as raw inputs and input into a predefined, rule-based state decision logic table to generate the current state decision result. Based on the current state decision result, an index instruction is generated to load the initial control parameter set of the corresponding mode from the strategy library. The initial control parameter set includes at least the initial feeding rate, the feeding increment step size, and the expected response time window, generating an initial control strategy framework that matches the current state.
[0011] Optionally, in the fourth implementation of the first aspect of the present invention, according to a preset cleaning logic sequence, a purging command is generated and executed, the purging valve of the pipeline is controlled to open, and the purging is confirmed to be complete based on the feedback signal of the liquid level sensor of the purging pipeline, obtaining a first pipeline purging confirmation signal. Using the first pipeline purging confirmation signal as the original input, an air-push command is triggered and generated. The air-push command is executed, controlling the pneumatic valve group and air pump to inject compressed air into the pipeline, pushing the residual liquid in the measuring chamber and the end of the pipeline back to the corresponding mixing tank. The data of the pipeline pressure sensor is read in real time. When the pressure value reaches a first preset threshold and remains stable for more than a first preset time, a pressure stabilization signal is generated, triggering and generating a backwash preparation command. After the pressure stabilization signal is generated, a second preset time is delayed to ensure that the residual liquid is fully returned. Then, a shutdown command is generated and executed to cut off the air source and close the relevant valves. The system obtains the air path closure completion status. Based on this status and a preset timer signal, a backwash start command is generated. Executing the backwash start command opens the clean water valve and a specific return valve, allowing clean water to flush the pipeline in the opposite direction to the measurement flow. Simultaneously, the flow meter and timer signals during the flushing process are read. When the cumulative flushing flow reaches a preset value or the flushing time reaches a third preset time, a flushing completion signal is generated, triggering and generating a drying command. Executing the drying command again controls the air pump and pneumatic valve assembly to inject dry air into the pipeline, and reads the data from the pipeline pressure sensor. When the pressure value reaches a second preset threshold higher than the first preset threshold and remains there for more than a fourth preset time, a pipeline drying completion signal is generated. Based on this signal, the pipeline's state variables are updated to "clean ready" within the software control logic, generating a clean ready state.
[0012] Optionally, in the fifth implementation of the first aspect of the present invention, based on the clean-ready state of the pipeline, a set of valve control commands are generated and executed for the outlet valve of the mixing tank to which the current target constant value standard liquid belongs, and the pipeline connecting to the inlet of the measuring chamber, so that the constant value standard liquid flows into the measuring chamber by gravity, obtaining the initial standard liquid flow in the measuring chamber. At the same time, the first flow meter signal at the inlet of the measuring chamber is read in real time. When the cumulative flow reaches the first preset flow threshold of the corresponding standard liquid filling the volume of the measuring chamber, a valve closing command is generated and executed to obtain a chamber full filling confirmation signal. The chamber full filling confirmation signal generates and executes a first aeration and stirring command, controlling the aeration device to inject gas into the initial standard liquid flow at a first frequency and intensity, and continuing to stir for a first duration to obtain a preliminary mixture. Subsequently, a second aeration and stirring command is generated and executed to adjust the gas injection frequency and intensity to a second value lower than the first frequency and intensity, and continuing to stir for a second duration. After a second stirring period, a stable standard solution environment is obtained. After the second stirring period, an exhaust command is generated and executed to open the exhaust valve of the measuring chamber and simultaneously stop the gas blowing. Based on the second flow meter signal or the pressure sensor drop signal at the exhaust valve, it is confirmed that the gas has been basically emptied and a static equilibrium signal is obtained. A preset settling delay time is then waited for the stable standard solution environment to reach equilibrium in temperature and ion diffusion under static conditions, thus obtaining the equilibrium standard solution to be tested. After the settling delay time, the first series of real-time readings output by the pH probe to be calibrated are continuously read, and its standard deviation is calculated. If the standard deviation is less than the preset stability threshold, it is determined that the probe is in sufficient contact with the equilibrium standard solution to be tested and the reading is stable, generating a valid measurement allow signal. Using the valid measurement allow signal as a trigger, the second series of real-time readings output by the pH probe to be calibrated are collected in the next continuous reading cycle, and their average value is calculated as the original measurement value.
[0013] Optionally, in the sixth implementation of the first aspect of the present invention, after the static delay time ends, the first stage of data acquisition is initiated, and the initial reading sequence output by the pH probe to be calibrated is continuously read at a first sampling frequency for a first time window. The initial reading sequence is then processed to obtain a stable reading sequence after preliminary filtering. Piecewise linear fitting is performed on the stable reading sequence to calculate its local trend slope. The standard deviation of the sequence is calculated in real time as a dispersion index. The local trend slope is compared with a convergence threshold approaching zero, and the dispersion index is compared with a preset stability threshold. If the local trend slope is small... If the convergence threshold is met and the dispersion index is less than the stability threshold, the readings are determined to have dynamically converged, and a reading convergence confirmation signal is generated. Based on the reading convergence confirmation signal, the second stage of verification data acquisition is initiated. The subsequent second series of real-time readings are collected at a second sampling frequency lower than the first sampling frequency. The average value and variance of the second series of real-time readings are calculated. If the variance value is less than or equal to the dispersion index calculated in the first stage, and the difference between the average value and the final value of the stationary reading sequence is within a preset small fluctuation range, the system is determined to have reached steady state, and an effective measurement permission signal characterizing the achievement of the final steady state is generated.
[0014] Optionally, in the seventh implementation of the first aspect of the present invention, the original measured value is compared with the theoretical pH value to calculate the absolute deviation value of the current point. The absolute deviation value is then correlated with the absolute deviation values of previously completed calibration points to generate calibration parameter estimates. These estimates are substituted into a preset probe response model to simulate the theoretical reading of the next calibration point. After executing the actual next calibration point process and obtaining its original measured value, the actual original measured value is compared a second time with the simulated theoretical reading to generate a prospective verification deviation value. A reverse correction is then performed to obtain a fitted calibration parameter set. The fitted calibration parameter set is then written back to the non-volatile input of the pH probe or its transmitter to be calibrated via the PLC's communication interface. In the volatile storage area, parameters are solidified. Immediately afterwards, an in-situ verification command is generated to control the measurement chamber to maintain the current standard solution environment or briefly switch to a calibrated standard solution environment. The corrected output value of the pH probe to be calibrated is reread to obtain the verification reading. The verification reading is compared with the theoretical value under the corresponding environment. If the difference is within the preset acceptance threshold, a single-point calibration completion confirmation signal is generated. The single-point calibration completion confirmation signal and the fitted calibration parameter set update the long-term calibration history of the pH probe to be calibrated stored in the PLC. The parameters obtained from this calibration are weighted and fused with the historical average parameters to generate a working parameter set, which is then used to cover the temporary measurement parameters, completing the entire closed loop of this calibration.
[0015] Beneficial effects: By acquiring the pH value of the standard solution in the mixing tank in real time through three standard probes, changes in pH value can be detected in a timely manner. After generating a pH deviation signal, the servo feeding mechanism is precisely controlled to add high-concentration reagents, so that the current pH value quickly returns to the target range, effectively maintaining the constant value of the standard solution in the mixing tank and ensuring the accuracy and timeliness of acidity and alkalinity control. By retrieving historical pH monitoring data sequences and historical feeding event records from the mixing tank, calculating the drift slope and drift fluctuation value, extracting statistical characteristics of feeding frequency and feeding amount, and combining the current period pH deviation signal, the current state judgment result is generated through the state judgment logic table, which can provide a more comprehensive and accurate understanding of the system state. According to the preset cleaning logic sequence, the system sequentially performs operations such as evacuation, air propulsion, backwashing, and drying. Each step has a clear triggering condition and completion confirmation signal. For example, evacuation is confirmed based on the feedback signal from the liquid level sensor, and air propulsion triggers subsequent steps after generating a pressure stabilization signal based on the pressure sensor data. This ensures that the pipeline is thoroughly cleaned and avoids residual liquid from interfering with subsequent measurements and calibrations. Based on the pipeline being clean and ready, the constant standard liquid is allowed to flow into the measuring chamber by gravity through the control valve, and the flow rate is accurately controlled according to the flow meter signal to ensure that the amount of standard liquid in the measuring chamber is appropriate, providing a stable basis for probe measurement. The first stage of data acquisition is initiated, and the initial reading sequence is processed to obtain a stationary reading sequence. The local trend slope and dispersion index are calculated to determine whether the readings have dynamically converged. Based on the reading convergence confirmation signal, the second stage of verification data acquisition is initiated, and the average value and variance are calculated to further determine whether the system has reached a steady state, ensuring that accurate and stable probe readings can be obtained. The confirmation signal and the fitted calibration parameter set are used to update the long-term calibration history of the pH probe to be calibrated stored in the PLC. The working parameter set is generated by weighted fusion of the calibration parameters and the historical average parameters and covers the temporary measurement parameters, providing data support for the long-term stable operation and subsequent maintenance of the probe. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of an embodiment of an automatic pH feeding system with automatic calibration function according to the present invention; Figure 2 This is a diagram illustrating the automatic feeding and maintenance process of the standard solution. Detailed Implementation
[0017] This invention provides an automatic pH dispensing system with automatic calibration function to ensure the long-term stability and accuracy of calibration results. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0018] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the automatic pH feeding system with automatic calibration function in this invention includes: Standard solution constant value maintenance control steps: 101. Monitoring module, used to obtain the current pH value of the standard solution in the three mixing tanks by reading the real-time monitoring data of the three standard probes; 102. Comparison module, used to compare each current pH value with its corresponding target pH value and generate a pH deviation signal; 103. Maintenance module, used to generate and execute feeding control command when any pH deviation signal exceeds the preset tolerance range, control the servo feeding mechanism to add high concentration reagent to the corresponding mixing tank until the current pH value returns to the target pH value range, thereby confirming and maintaining the constant value state of the standard solution in the mixing tank in the software logic; Specifically, the state assessment and strategy selection steps are as follows: Based on the sign and magnitude of the pH deviation signal, combined with the historical feeding records of the mixing tank, it is determined whether the standard solution is currently in a "slow drift" or "rapid imbalance" state; according to the state judgment result, the corresponding feeding control mode is selected from the preset feeding strategy library. The preset feeding strategy library includes at least a micro-compensation mode for dealing with "slow drift" and a rapid correction mode for dealing with "rapid imbalance". Compensation calculation steps: Based on the selected feeding control mode, call the compensation algorithm bound to that mode; take the pH deviation signal, the current volume information of the mixing tank, and the preset concentration ratio of the high-concentration reagent as the raw inputs, input them into the compensation algorithm, and calculate an initial feeding compensation value; Dynamic execution and closed-loop verification steps: Generate and execute the first feeding control command to control the servo feeding mechanism to add the high-concentration reagent calculated at the initial feeding compensation amount at the first speed to obtain the mixture after the first round of replenishment; read the monitoring data of the mixture after the first round of replenishment by the standard probe in real time to obtain the real-time monitoring data after the first round of correction; calculate the residual deviation between the real-time monitoring data after the first round of correction and the target pH value. Iterative optimization steps: If the residual deviation has fallen within the preset tolerance range, the constant value state is confirmed and the current feeding process ends; if the residual deviation still exceeds the preset tolerance range but is less than the initial pH deviation signal, the compensation amount calculation step is repeated based on the residual deviation to generate a second feeding compensation amount calculation value; then, a second feeding control command is generated and executed to control the servo feeding mechanism to add the high-concentration reagent of the second feeding compensation amount calculation value at a second speed lower than the first speed, to obtain the final replenished constant value standard solution, and the pH value is confirmed to be stable within the target range through a standard probe.
[0019] Furthermore, based on the sign and magnitude of the pH deviation signal, combined with the historical feed records of the mixing tank, it is determined whether the standard solution is currently in a state of "slow drift" or "rapid imbalance," including: Historical trend analysis and feature extraction steps: retrieve the historical pH monitoring data sequence stored in the mixing tank for the most recent N monitoring periods, as well as the corresponding historical feeding event records; perform linear fitting on the historical pH monitoring data sequence to calculate the drift slope characterizing the direction of pH change in the standard solution and the drift fluctuation value characterizing the stability of the change; extract the statistical features of feeding frequency and feeding amount from the historical feeding event records as a reference for historical intervention intensity; The state decision step of multi-source information fusion is as follows: The drift slope, drift fluctuation value, and pH deviation signal of the current period are used as raw inputs and input into a predefined, rule-based state decision logic table. The state decision logic table is defined as follows: if the absolute value of the pH deviation signal is less than the first threshold and the drift slope is stable in the low value range, it is determined to be a "slow drift" state; if the absolute value of the pH deviation signal is greater than or equal to the first threshold, or the drift slope and drift fluctuation value exceed their respective thresholds, it is determined to be a "rapid imbalance" state. This step produces a clear current state decision result. Strategy library indexing and initial parameter loading steps: Based on the current state judgment result, generate an index instruction pointing to the corresponding mode (micro-compensation mode or fast correction mode) in the preset feeding strategy library; based on this index instruction, load the initial control parameter set of the corresponding mode from the strategy library. The initial control parameter set includes at least the initial feeding speed, feeding increment step size and expected response time window, generating an initial control strategy framework that matches the current state.
[0020] It is understood that the executing entity of this invention can be an automatic pH dispensing device with automatic calibration function, or it can be a terminal or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example.
[0021] Automated calibration process control steps: After confirming that the standard solution is in a constant value state, the following control sub-steps are executed sequentially for the pH 4.0, 6.86, and 9.18 standard solutions according to a preset order: 201. Cleaning module, used for pipeline cleaning control steps: generates and executes a series of valve and air pump control commands for evacuation, air propulsion, backflushing and drying, completes pipeline cleaning, and marks the pipeline as clean and ready in the software. Specifically, the sequence control and state triggering steps are as follows: According to the preset cleaning logic sequence, firstly, a drain command is generated and executed to control the opening of the drain valve in the pipeline; based on the feedback signal from the liquid level sensor in the drain pipeline, the drain is confirmed to be complete, and a first pipeline drain confirmation signal is obtained; using the first pipeline drain confirmation signal as the original input, a pneumatic push command is triggered and generated. Pressure-assisted purging steps: Execute the pneumatic push command to control the pneumatic valve group and air pump to inject compressed air into the pipeline and push the residual liquid in the measuring chamber and pipeline end back to the corresponding mixing tank; read the data of the pipeline pressure sensor in real time, and generate a pressure stabilization signal when the pressure value reaches the first preset threshold and remains stable for more than the first preset time; use the pressure stabilization signal as the original input to trigger and generate a backwash preparation command; Air propulsion and backflow verification steps: After the pressure stabilization signal is generated, a second preset time is delayed to ensure that the residual liquid is fully backflowed; then a shutdown command is generated and executed to cut off the air source and close the relevant valves to obtain the air path shutdown completion status; based on the air path shutdown completion status and a preset timer signal, a backwash start command is generated; Backwashing and status verification steps: Execute the backwashing start command, open the clean water valve and the specific return valve, so that the clean water flows in the opposite direction to the measurement to flush the pipeline; at the same time, read the flow meter signal and timer signal during the flushing process. When the cumulative flushing flow reaches the preset value or the flushing time reaches the third preset time, generate a flushing completion signal; use the flushing completion signal as the original input to trigger and generate a drying command. Drying and final confirmation steps: Execute the drying command, control the air pump and pneumatic valve group to inject dry air into the pipeline again, and read the data of the pipeline pressure sensor; when the pressure value reaches the second preset threshold higher than the first preset threshold and is maintained for more than the fourth preset time, a pipeline drying completion signal is generated; based on the pipeline drying completion signal, the pipeline status variable is updated to "clean ready" in the software control logic, generating a clean ready state.
[0022] 202. Exhaust module, used for standard liquid delivery and measurement control steps: When the pipeline is in a clean and ready state, generate and execute valve control commands to allow the current target constant value standard liquid to flow into the measurement chamber; at the same time, generate and execute aeration and exhaust commands to ensure that the pH probe to be calibrated is in full contact with the standard liquid; then read the original measurement value of the pH probe to be calibrated. Specifically, the target liquid delivery and initial filling control steps are as follows: Based on the clean and ready state of the pipeline, a set of valve control commands are generated and executed for the outlet valve of the mixing tank to which the current target constant value standard liquid belongs, as well as the pipeline connecting to the inlet of the measuring chamber; the constant value standard liquid flows into the measuring chamber by gravity, obtaining the initial standard liquid flow in the measuring chamber; at the same time, the first flow meter signal at the inlet of the measuring chamber is read in real time, and when the cumulative flow reaches the first preset flow threshold for the corresponding standard liquid to fill the measuring chamber volume, a valve closing command is generated and executed to obtain a chamber full filling confirmation signal; The phased aeration and flow field stabilization steps are as follows: Using the cavity full filling confirmation signal as the original input, a first aeration command is generated and executed, controlling the aeration device to inject gas into the initial standard liquid flow at a first frequency and intensity, and continuing the aeration for a first duration to obtain a preliminary mixture; subsequently, a second aeration command is generated and executed, adjusting the gas injection frequency and intensity to a second value lower than the first frequency and intensity, and continuing the aeration for a second duration to obtain a stable standard liquid environment, thereby eliminating eddies and promoting uniform contact between the standard liquid and the sensitive membrane of the pH probe to be calibrated; Exhaust and Static Equilibrium Steps: After the second stirring time is completed, an exhaust command is generated and executed to open the exhaust valve of the measuring chamber and at the same time stop the blowing; based on the second flow meter signal or the pressure sensor drop signal at the exhaust valve, it is confirmed that the gas has been basically emptied and a static equilibrium signal is obtained; wait for a preset settling delay time to allow the stable flow field of the standard liquid environment to reach the equilibrium of temperature and ion diffusion under static conditions, and obtain the equilibrium standard liquid to be tested; Contact quality verification and data acquisition steps: After the settling delay time, a data stability judgment process is initiated: The first series of real-time readings output by the pH probe to be calibrated are continuously read, and its standard deviation is calculated; if the standard deviation is less than the preset stability threshold, it is determined that the probe is in sufficient contact with the balanced standard solution to be tested and the reading is stable, generating a valid measurement allow signal; triggered by the valid measurement allow signal, in the next continuous reading cycle, the second series of real-time readings output by the pH probe to be calibrated are acquired, and its average value is calculated as the original measurement value for subsequent comparison.
[0023] Furthermore, a data stability assessment process is initiated: the first series of real-time readings output by the pH probe to be calibrated are continuously read, and its standard deviation is calculated; if the standard deviation is less than the preset stability threshold, it is determined that the probe has sufficient contact with the equilibrated standard solution and the readings are stable, generating a valid measurement allowance signal, including: Multi-stage data acquisition and preliminary filtering steps: After the settling delay time ends, the first stage of data acquisition is started, and the initial reading sequence output by the pH probe to be calibrated is continuously read at the first sampling frequency for the first time window; the initial reading sequence is subjected to moving average filtering, and outliers that exceed the physical reasonable range due to instantaneous bubble interference are removed to obtain a stable reading sequence after preliminary filtering. Trend analysis and dynamic convergence judgment steps: Perform piecewise linear fitting on the stationary reading sequence and calculate its local trend slope; at the same time, calculate the standard deviation of the sequence in real time as the dispersion index; compare the local trend slope with a convergence threshold approaching zero, and compare the dispersion index with a preset stability threshold; if the local trend slope is less than the convergence threshold and the dispersion index is less than the stability threshold, it is determined that the reading has dynamically converged, and a reading convergence confirmation signal is generated. Steady-state maintenance verification and final triggering steps: Using the reading convergence confirmation signal as the original input, the second stage of verification data acquisition is started. The second series of real-time readings are collected at a second sampling frequency lower than the first sampling frequency. The average value and variance of the second series of real-time readings are calculated. If the variance value is less than or equal to the dispersion index calculated in the first stage, and the difference between the average value and the final value of the stationary reading sequence is within a preset small fluctuation range, the system is determined to have reached steady-state maintenance, and an effective measurement permission signal characterizing the achievement of the final steady state is generated.
[0024] 203. Calibration module, used for calibration coefficient calculation and correction steps: The original measured value is compared with the theoretical pH value of the current target constant value standard solution. Based on the difference, the calibration parameters are calculated by the calibration algorithm in the PLC program. The measurement output of the pH probe to be calibrated is corrected using the calibration parameters to complete the calibration of this point.
[0025] Specifically, the error decomposition and preliminary parameter generation steps are as follows: the original measured value is compared with the theoretical pH value to calculate the absolute deviation value of the current point; further, this absolute deviation value is correlated with the absolute deviation values of the previously completed calibration points (pH 4.0, 6.86) and distinguished into "zero point offset error" based on the theoretical value of the standard solution and "sensitivity slope error" based on the nonlinear characteristics of the pH probe to be calibrated itself, and a set of preliminary calibration parameter estimates related to the current calibration point and its previous set of points are generated accordingly. Prospective validation and parameter iteration steps: Apply the preliminary calibration parameter estimates to a "virtual validation" process: Substitute these parameters into a preset probe response model to simulate the theoretical reading of the next calibration point (pH 9.18); After executing the actual next calibration point procedure and obtaining its raw measurement value, compare this real raw measurement value with the simulated theoretical reading a second time to generate a prospective validation deviation value; Use this prospective validation deviation value to perform reverse correction and iterative optimization of the preliminary calibration parameter estimates to obtain a set of optimized fitting calibration parameters that take into account multi-point consistency; On-site write-back and instant correction verification steps: The fitted calibration parameter set is written back to the non-volatile storage area of the pH probe or its transmitter to be calibrated via the PLC's communication interface to complete parameter solidification; then, an in-situ verification command is immediately generated to control the measurement chamber to maintain the current standard solution environment or briefly switch to a calibrated standard solution environment, and reread the corrected output value of the pH probe to be calibrated to obtain the verification reading; the verification reading is finally compared with the theoretical value under the corresponding environment. If the difference is within the preset acceptance threshold, a single-point calibration completion confirmation signal is generated, indicating that the single-point calibration process is effective and the parameters have taken effect; Historical fusion and long-term stability update steps: Using the single-point calibration completion confirmation signal and the fitted calibration parameter set as the original input, update the long-term calibration history of the pH probe to be calibrated stored in the PLC; Based on the parameters obtained from this calibration and the historical average parameters, perform weighted fusion to generate a set of final working parameters with long-term stability for online real-time measurement of the probe in future non-calibration periods, and use this to cover temporary measurement parameters, thus completing the entire closed loop of this calibration.
[0026] In this embodiment of the invention, the pH value of the standard solution in the mixing tank is acquired in real time by three standard probes and compared with the target value to generate a deviation signal. When the deviation exceeds the preset range, a high-concentration reagent is automatically added to maintain the constant value of the standard solution, ensuring the stability and accuracy of the pH value of the standard solution and providing a reliable basis for subsequent calibration work. Based on the sign and magnitude of the pH deviation signal, combined with the historical feeding records of the mixing tank, it is determined whether the standard solution is in a "slow drift" or "rapid imbalance" state, and the corresponding feeding control mode is selected from the preset strategy library. The feeding method can be flexibly adjusted according to the actual situation, which improves the system's ability to cope with different states and enhances the stability and adaptability of maintaining the constant value. Based on the selected feeding control mode, the corresponding compensation algorithm is invoked. The pH deviation signal, the current volume information of the mixing tank, and the preset concentration ratio of the high-concentration reagent are used as inputs to calculate the initial feeding compensation amount, making the feeding amount more accurate and reasonable, and avoiding the problems of over-feeding or under-feeding. The initial feeding compensation amount is added at the first speed, and the residual deviation is calculated by reading the monitoring data in real time. If the residual deviation exceeds the range but is less than the initial deviation, the second feeding compensation amount is calculated and added at a lower speed. The feeding strategy can be continuously adjusted according to the actual situation to gradually reduce the deviation and ensure that the standard solution is eventually stable within the target range, thus improving the accuracy and reliability of feeding control. The pipeline cleaning process involves a series of operations including evacuation, air propulsion, backflushing, and drying, and the pipeline is marked as clean and ready in the software. Each step has clear triggering conditions and status verification to ensure thorough pipeline cleaning, avoid interference from residual liquids in subsequent calibration, and improve calibration accuracy. After the pipeline is clean and ready, the exhaust module controls the flow of the target constant value standard solution into the measurement chamber. Through staged aeration, exhaust, and static balancing, the pH probe to be calibrated is made to fully contact the standard solution. The data stability judgment process ensures that the reading is stable before collecting the original measurement value, guaranteeing the stability of the measurement environment and the reliability of the measurement data, providing an accurate basis for calibration. The original measured values are compared with the theoretical pH values, and the errors are decomposed into "zero-point offset error" and "sensitivity slope error" to generate preliminary calibration parameter estimates. The parameters are prospectively verified through a "virtual verification" process. Based on the verification deviation values, the parameters are corrected and iteratively optimized, which improves the accuracy and reliability of the calibration parameters. Multi-point consistency is considered, making the calibration results more accurate. The fitted calibration parameter set is written back to the pH probe to be calibrated and in-situ verification is performed immediately. This ensures that the probe's long-term calibration history is updated after the parameters take effect, generating a final working parameter set with long-term stability. This guarantees the measurement accuracy of the probe in future non-calibration periods and improves the long-term stability and reliability of the system.
[0027] Reference Figure 2 On the left is a main mixing tank containing standard solutions, with monitoring probes inserted inside. The probe signals are transmitted to a central controller (PLC). The controller compares the real-time monitoring values with preset target values. When a deviation occurs, the controller sends a command to the servo feeding mechanism on the right, driving the pump to precisely add high-concentration reagent from the storage bottle to the main mixing tank until the monitoring values return to the target range, forming an automated closed-loop control circuit. The present invention also provides an automatic pH feeding device with automatic calibration function. The automatic pH feeding device with automatic calibration function includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor performs the steps of the automatic pH feeding system with automatic calibration function in the above embodiments.
[0028] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the automatic pH feeding system with automatic calibration function.
[0029] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0030] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0031] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An automatic feeding system for pH having an automatic calibration function, characterized in that, The automatic acid-base value feeding system with automatic calibration function comprises: a monitoring module for obtaining current pH values of standard liquids in three mixing tanks respectively by reading real-time monitoring data of three standard probes; a comparison module for comparing each of the current pH values with a corresponding target pH value to generate a pH deviation signal; a maintenance module for generating and executing a feeding control instruction to control a servo feeding mechanism to add high-concentration reagents into a corresponding mixing tank when any pH deviation signal exceeds a preset tolerance range, until the current pH value returns to the target pH value range, thereby confirming and maintaining a constant value state of the standard liquid in the mixing tank.
2. The automatic dosing system with automatic calibration function for pH according to claim 1, characterized in that, After confirming that the standard liquid is in a constant value state, the following control sub-steps are sequentially executed for pH 4.0, 6.86 and 9.18 standard liquids in a preset order: a cleaning module for generating and executing valve and air pump control instructions for emptying, air pushing, backwashing and blow-drying to complete pipeline cleaning and mark the pipeline as clean and ready in software; an exhaust module for generating and executing valve control instructions to make the current target constant value standard liquid flow into a measuring cavity when the pipeline is in a clean and ready state, and simultaneously generating and executing air blowing and stirring and exhaust instructions to make a to-be-calibrated PH probe fully contact with the standard liquid, and then reading an original measurement value of the to-be-calibrated PH probe; a calibration module for comparing the original measurement value with a theoretical pH value of the current target constant value standard liquid, calculating a calibration parameter through a calibration algorithm in a PLC program according to a difference therebetween, and correcting a measurement output of the to-be-calibrated PH probe by using the calibration parameter to complete calibration of the point.
3. The automatic dosing system with automatic calibration function for pH according to claim 1, characterized in that, Based on the sign and size of the pH deviation signal, in combination with historical feeding records of the mixing tank, a state judgment result is obtained, and according to the state judgment result, a corresponding feeding control mode is selected from a preset feeding strategy library; According to the selected feeding control mode, a compensation algorithm bound to the mode is called, and the pH deviation signal, current volume information of the mixing tank and a preset concentration ratio of the high-concentration reagent are taken as original inputs and input into the compensation algorithm to calculate an initial feeding compensation amount calculation value; a first feeding control instruction is generated and executed to control the servo feeding mechanism to add the high-concentration reagent of the initial feeding compensation amount calculation value at a first speed to obtain a first round of supplemented mixed liquid, real-time monitoring data of the standard probe on the first round of supplemented mixed liquid is read in real time to obtain first round corrected real-time monitoring data, and a residual deviation between the first round corrected real-time monitoring data and the target pH value is calculated; If the residual deviation has fallen within the preset tolerance range, it is confirmed that the constant value state is achieved and the current feeding process is ended, and if the residual deviation still exceeds the preset tolerance range but is smaller than the initial pH deviation signal, the residual deviation is used to repeat the compensation amount calculation step to generate a second feeding compensation amount calculation value, and then a second feeding control instruction is generated and executed to control the servo feeding mechanism to add the high-concentration reagent of the second feeding compensation amount calculation value at a second speed lower than the first speed to obtain a final round of supplemented constant value standard liquid.
4. The automatic dosing system with automatic calibration function for pH according to claim 3, characterized in that, retrieve a pH value historical monitoring data sequence stored by the mixing tank in the last N monitoring periods, and corresponding historical feeding event records, perform linear fitting on the pH value historical monitoring data sequence, calculate a drift slope representing a change direction of a standard solution pH value and a drift fluctuation value representing a change stability, and extract statistical features of feeding frequency and feeding amount from the historical feeding event records as historical intervention intensity references; input the drift slope, the drift fluctuation value, and a pH deviation signal of the current period as original inputs into a pre-defined, rule-based state decision logic table to generate a current state decision result; generate an index instruction according to the current state decision result, load an initial control parameter set of a corresponding mode from a strategy library, the initial control parameter set at least including an initial feeding speed, a feeding increment step, and an expected response time window, and generate an initial control strategy framework matching the current state.
5. The automatic dosing system with automatic calibration function for pH according to claim 2, characterized in that, generate and execute an emptying instruction according to a pre-set cleaning logic sequence, control a pipeline emptying valve to open, confirm emptying completion based on a liquid level sensor feedback signal of an emptying pipeline, obtain a first pipeline emptying confirmation signal, and input the first pipeline emptying confirmation signal as an original input to trigger and generate an air pushing instruction; execute the air pushing instruction to control an air valve group and an air pump, inject compressed air into the pipeline, press residual liquid in the measuring cavity and the pipeline end back into the corresponding mixing tank, read data of a pipeline pressure sensor in real time, generate a pressure stabilization signal when the pressure value reaches a first pre-set threshold and is maintained stably for more than a first pre-set time, and trigger and generate a backwashing preparation instruction; after the pressure stabilization signal is generated, delay for a second pre-set time to ensure that the residual liquid sufficiently flows back, then generate and execute a closing instruction to cut off the air source and close the related valves, obtain a gas path closing completion state, and generate a backwashing start instruction based on the gas path closing completion state and a pre-set timer signal; execute the backwashing start instruction to open a clean water valve and a specific backflow valve to flush the pipeline along a flow direction opposite to that during measurement, read a flowmeter signal and a timer signal of the flushing process at the same time, and generate a flushing completion signal when the cumulative flushing flow reaches a pre-set value or the flushing time reaches a third pre-set time, and trigger and generate a blow-drying instruction; execute the blow-drying instruction to control the air pump and the air valve group to inject dry air into the pipeline again, and read data of the pipeline pressure sensor, generate a pipeline drying completion signal when the pressure value reaches a second pre-set threshold higher than the first pre-set threshold and is maintained for more than a fourth pre-set time, and update a pipeline state variable to a clean readiness in the software control logic based on the pipeline drying completion signal to generate a clean readiness state.
6. The automatic dosing system with automatic calibration function for pH according to claim 2, characterized in that, Based on the pipeline-based cleaning readiness status, a set of valve control instructions for the outlet valve of the current target constant standard liquid belonging to the mixing tank, and the valve of the pipeline connecting the measuring cavity inlet are generated and executed, so that the constant standard liquid flows into the measuring cavity by gravity, and the initial standard liquid flow in the measuring cavity is obtained. At the same time, the first flowmeter signal at the measuring cavity inlet is read in real time. When the cumulative flow reaches a first preset flow threshold corresponding to the standard liquid filling the measuring cavity volume, a valve closing instruction is generated and executed to obtain a cavity filling confirmation signal. The cavity filling confirmation signal generates and executes a first air agitation stirring instruction to control the air injection device to inject gas into the initial standard liquid flow at a first frequency and intensity for a first stirring duration to obtain a preliminary mixed liquid. Subsequently, a second air agitation stirring instruction is generated and executed to adjust the gas injection frequency and intensity to a second value lower than the first frequency and intensity for a second stirring duration to obtain a stable standard liquid environment. After the second stirring duration ends, an exhaust instruction is generated and executed to open the exhaust valve of the measuring cavity while stopping air injection. Based on the second flowmeter signal at the exhaust valve or the pressure sensor drop signal, it is confirmed that the gas has been substantially exhausted, and a static equilibrium signal is obtained. A preset static delay time is waited for to allow the stable standard liquid environment to reach temperature and ion diffusion equilibrium in a static state to obtain the balanced standard liquid to be measured. After the static delay time ends, a first series of real-time readings output by the PH probe to be calibrated are continuously read, and the standard deviation thereof is calculated. If the standard deviation is less than a preset stability threshold, it is determined that the probe is in sufficient contact with the balanced standard liquid to be measured and the readings are stable, and an effective measurement permission signal is generated. The effective measurement permission signal is triggered to collect a second series of real-time readings output by the PH probe to be calibrated in the next continuous reading period, and the average value thereof is calculated as the original measurement value.
7. The automatic dosing system with automatic calibration function for pH according to claim 6, characterized in that, After the static delay time ends, the first stage data acquisition is started to continuously read the initial reading sequence output by the PH probe to be calibrated at a first sampling frequency for a first time window. The initial reading sequence is processed to obtain a smooth reading sequence after preliminary filtering. The smooth reading sequence is subjected to piecewise linear fitting to calculate the local trend slope. The standard deviation of the sequence is calculated in real time as a dispersion index. The local trend slope is compared with a convergence threshold approaching zero, and the dispersion index is compared with a preset stability threshold. If the local trend slope is less than the convergence threshold and the dispersion index is less than the stability threshold, it is determined that the readings have dynamically converged, and a reading convergence confirmation signal is generated. According to the reading convergence confirmation signal, the second stage verification data acquisition is started to continue collecting the second series of real-time readings at a second sampling frequency lower than the first sampling frequency. The average value and variance of the second series of real-time readings are calculated. If the variance value is less than or equal to the dispersion index calculated in the first stage, and the average value is within a preset small floating range from the last value of the smooth reading sequence, it is determined that the system has reached a steady state, and an effective measurement permission signal representing the final steady state is generated.
8. The automatic dosing system with automatic calibration function for pH according to claim 2, characterized in that, The absolute deviation value of the current point is calculated by comparing the original measurement value with the theoretical pH value, the absolute deviation value is associated with the absolute deviation value of the previous completed calibration point, and an estimated calibration parameter value is generated; The estimated calibration parameter value is substituted into a preset probe response model to simulate the theoretical reading of the next calibration point, after the actual next calibration point process is performed and the original measurement value is obtained, the real original measurement value is compared with the simulated theoretical reading to generate a forward-looking verification deviation value, and a fitting calibration parameter set is obtained through reverse correction; The fitting calibration parameter set is written back to the non-volatile storage area of the PH probe or its transmitter through the communication interface of the PLC to complete parameter solidification, then an in-situ verification instruction is immediately generated to control the measurement cavity to remain in the current standard liquid environment or to be temporarily switched to a calibrated standard liquid environment, the output value of the calibrated PH probe is re-read to obtain a verification reading, the verification reading is compared with the theoretical value under the corresponding environment, if the difference is within the preset acceptance threshold, a single-point calibration completion confirmation signal is generated; The single-point calibration completion confirmation signal and the fitting calibration parameter set update the long-term calibration history record of the PH probe to be calibrated stored in the PLC, the parameters obtained based on this calibration and the historical average parameters are weighted and fused to generate a working parameter set, and the temporary measurement parameters are overwritten by the working parameter set to complete the entire closed loop of this calibration.