Method for the automated control of the analysis process of water samples

By constructing a unit step response reference model and a two-parameter search space, and combining residual waveform characteristic analysis, the control lag and adaptability problems of the industrial water quality online analysis system were solved, enabling real-time capture and accurate control of water quality changes.

CN121578626BActive Publication Date: 2026-04-17SHANXI ZHIYU WATER CONSERVANCY ENG TECH CONSULTING CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202610110132.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-27
Publication Date
2026-04-17
Estimated Expiration
2046-01-27

AI Technical Summary

Technical Problem

Existing industrial water quality online analysis systems suffer from control lag and phase delay when faced with complex physicochemical reactions, making it difficult for the system to capture rapid changes in water quality in real time. Existing control strategies rely on fixed time series and linear models, which cannot adapt to the time-varying characteristics and structural disturbances of the controlled object.

Method used

A unit step response reference model is constructed, and iterative optimization is performed through a two-parameter search space (amplitude scaling factor and time elasticity factor). The reaction process data is fitted in real time, and the disturbance mode is identified by residual waveform feature analysis, so as to achieve adaptive adjustment of system dynamic parameters and accurate locking of control target.

Benefits of technology

Achieving steady-state control in the non-equilibrium dynamic range improves the robustness and real-time performance of the system, enabling it to adapt to parameter drift and structural disturbances of the controlled object, and enhancing the accuracy and efficiency of the analysis process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121578626B_ABST
    Figure CN121578626B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial process automation control, and discloses an automatic control method for a water sample analysis process, which comprises the following steps: establishing a unit step response reference model representing a normalized standard track of a controlled object; iteratively searching for an optimal amplitude scaling and a time elasticity factor in a double-parameter search space, so that the reference model and real-time data are fitted to minimize residual errors; and determining a projection steady-state value by using the optimal amplitude scaling factor to drive an execution unit, and adaptively adjusting a sampling interval according to the optimal time elasticity factor. The application realizes closed-loop compensation for system dynamics parameter drift by introducing the time elasticity factor, can accurately lock a steady-state target under a non-equilibrium state, and solves the problem of control model mismatch caused by device aging or environmental fluctuation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial process automation control technology, and relates to an automated control method for a water sample analysis process. Background Technology

[0002] In the current automated operation of industrial water quality online analysis systems, maintaining reaction conditions by regulating the addition of reaction reagents is the core task to ensure the accuracy of analysis results. Existing mainstream automated control schemes are based on static equilibrium feedback mechanisms. The controller passively waits for the sensor response value to reach physical steady state or for the rate of change to approach zero before collecting the absolute steady-state value as the basis for feedback deviation calculation, driving the metering execution unit to perform adjustment actions. When applying static feedback to controlled objects with large inertia involving complex physicochemical reactions, it faces time-domain response constraints. The sensor needs to undergo a long physical diffusion and chemical equilibrium relaxation process from contacting the sample to outputting a stable electrical signal, resulting in pure time delay and phase delay in the control loop. In order to obtain a reliable feedback signal, the system needs to insert a long waiting window into the control sequence, reducing the execution frequency of a single analysis cycle and weakening the equipment's ability to capture rapid changes in water quality in real time.

[0003] To address the aforementioned lag issues, existing technologies primarily focus on improving reactor flow paths or the hardware structure of detection components. However, the underlying logic of the control strategy still relies on a fixed time sequence. For example, Chinese invention patent CN107367475B discloses a device and method for analyzing total cyanide in water samples. This scheme reveals a typical sequential control logic, which precisely programs the action sequence of the peristaltic pump and multi-way valve group, operating according to a linear process of dosing, distillation, condensation, color development, settling, and reading. Although it automates the analysis process, the core technology is still based on open-loop control with a preset time schedule. The system assumes that the chemical reaction kinetics are constant and relies on... After the preset settling time, the absolute value of absorbance is read. To solve the lag problem, existing technologies use PID regulation or extrapolation algorithms based on the instantaneous rate of change trend. In actual working conditions, the dynamic model parameters of the controlled object have strong time-varying characteristics. Aging of sensor electrodes, blockage of permeable membrane micropores, or fluctuations in ambient temperature can nonlinearly change the static gain and dynamic time constant of the system, causing the control strategy based on fixed parameters or linear models to fail. In addition, the differential rate prediction logic is sensitive to process noise. Bubbles passing through the injection tube or stirring eddies can cause transient fluctuations, which are often misjudged as drastic changes in the reaction, resulting in oscillations in the control output or excessive accumulation of reagents.

[0004] Therefore, how to construct a control method that accurately locks the steady-state control target in the non-equilibrium dynamic range and has the ability to adaptively decouple the time-varying parameters of the target from structural disturbances is the technical problem to be solved by this invention. Summary of the Invention

[0005] To address the problems mentioned in the background art, the technical solution of the present invention is as follows: An automated control method for a water sample analysis process, applied to a control system including a controller, an execution unit, and a response detection unit, the method comprising the following steps:

[0006] A unit step response reference model is established, which represents the normalized standard trajectory of the controlled object evolving from the initial state to the steady state.

[0007] Within the sampling window of the control cycle, acquire the real-time process data sequence output by the response detection unit;

[0008] A two-parameter search space containing an amplitude scaling factor and a time elasticity factor is constructed. Within the two-parameter search space, the optimal amplitude scaling factor and the optimal time elasticity factor are searched simultaneously through an iterative algorithm to minimize the fitting residual between the unit step response reference model transformed by the optimal amplitude scaling factor and the optimal time elasticity factor and the real-time process data sequence.

[0009] The optimal amplitude scaling factor is determined as the projected steady-state value at the current moment, and the control output is calculated based on the difference between the projected steady-state value and the target set value to drive the action of the execution unit.

[0010] Establish an adjustment correspondence between the optimal time elasticity factor and the sampling period length of the controller. When the optimal time elasticity factor indicates system response hysteresis, extend the sampling interval of the next control cycle according to the adjustment correspondence to achieve closed-loop compensation for the drift of system dynamic parameters.

[0011] Preferably, in the step of simultaneously searching for the optimal amplitude scaling factor and the optimal time elasticity factor using an iterative algorithm, the optimal amplitude scaling factor is solved based on the following objective function. With the optimal time elasticity factor : ,in, For real-time process data sequences at time... The sampled values, This represents the total number of data points within the current sampling window. The function expression for the unit step response reference model, and the optimal time elasticity factor. It is a scaling factor that characterizes the time constant of the controlled object relative to the unit step response reference model.

[0012] Preferably, before calculating the control output, the method further includes performing a residual waveform feature analysis step: obtaining the residual sequence between the real-time process data sequence and the matched unit step response reference model; extracting waveform feature parameters of the residual sequence, the waveform feature parameters including at least the peak density and zero-crossing rate of the residual amplitude; comparing the waveform feature parameters with a preset interference mode fingerprint; when the waveform feature parameters match the bubble interference mode fingerprint or the mixed uneven mode fingerprint, maintaining the current state of the execution unit and pausing the update of the control output until the waveform feature parameters recover to the preset random noise feature range.

[0013] Preferably, the step of comparing the waveform feature parameters with the preset interference mode fingerprint includes: when the residual sequence presents bidirectional large amplitude pulses and returns to the zero axis within a preset time, it is identified as a bubble interference mode fingerprint; when the residual sequence presents low-frequency sinusoidal oscillation, it is identified as a mixed uneven mode fingerprint; keeping the current state of the execution unit means keeping the control output of the previous control cycle unchanged.

[0014] Preferably, the steps for establishing a unit step response reference model include: during the system initialization phase, applying a unit step excitation signal to the controlled object; acquiring the open-loop step response curve of the controlled object; performing amplitude normalization and time axis discretization processing on the open-loop step response curve to generate a lookup table or polynomial fitting function with time as the independent variable and normalized response degree as the dependent variable, which serves as the unit step response reference model.

[0015] Preferably, the specific configuration for adjusting the correspondence is as follows: setting a standard time elasticity factor, which corresponds to the nominal time constant of the unit step response reference model; calculating the ratio of the optimal time elasticity factor to the standard time elasticity factor; setting the sampling interval of the next control cycle to the product of the basic sampling interval and the reciprocal of the ratio, so as to keep the sampling frequency synchronized with the real-time response rate of the controlled object.

[0016] Preferably, the step of calculating the control output based on the difference between the projected steady-state value and the target setpoint includes: calculating the deviation between the optimal time elasticity factor and the standard value; dynamically adjusting the proportional gain and integral time constant of the controller based on the deviation; and reducing the proportional gain and increasing the integral time constant when the deviation exceeds the preset linear region threshold to suppress overshoot caused by model mismatch.

[0017] Preferably, the method further includes a transient prediction truncation control step: real-time monitoring of the root mean square value of the fitted residual and the convergence variance of the projected steady-state value; when the root mean square value of the fitted residual is less than a preset confidence threshold and the convergence variance of the projected steady-state value is less than a preset stability threshold, the current projected steady-state value is determined to be valid; when the real-time process data sequence has not yet reached physical steady state, the sampling process of the response detection unit is directly terminated, and the projected steady-state value is output as the final analysis result.

[0018] Preferably, the iterative algorithm adopts the Levenberg-Marquardt algorithm or the Gauss-Newton algorithm, and applies a non-negative constraint to the optimal amplitude scaling factor and a positive real number field constraint to the optimal time elasticity factor during the search process.

[0019] Preferably, the steps for constructing the interference mode fingerprint database include: simulating bubble injection and stirrer failure conditions offline; collecting raw response data under various abnormal conditions; fitting the raw response data using a unit step response reference model to extract the respective training residual sequences; performing time-domain statistical analysis on the training residual sequences to generate feature vector templates corresponding to various abnormal conditions, and storing them in the interference mode fingerprint database.

[0020] Compared with the prior art, the beneficial effects of the present invention are:

[0021] 1. In the process of water sample analysis, a normalized trajectory homomorphic mapping mechanism is constructed. During the transient response stage before the controlled object reaches physical equilibrium, a morphological correlation is established between real-time process data and the unit response reference model. Utilizing the inherent laws of the topological morphology of the reaction kinetic process, the final steady-state projection value is characterized by full-curve morphological comparison when the sensor response value has not reached the steady-state amplitude. This strategy constructs a zero-phase observation channel that does not depend on the passage of physical time, overcoming the time constraint of traditional feedback control that requires waiting for the physical process relaxation to obtain error signals. The basis for control decision is transformed from absolute numerical deviation to trajectory morphological deviation. The system locks the control target in advance during the large inertial delay of chemical reaction or physical diffusion, enabling the metering execution unit to complete the action adjustment before the physical response stabilizes, thus resolving the contradiction between measurement lag and real-time adjustment in industrial process control.

[0022] 2. In the model reference adaptation process, a time elasticity factor is introduced to construct a two-dimensional parameter identification space including amplitude scaling and time stretching. The static gain change of the controlled object and the dynamic time constant drift are mathematically orthogonally decoupled. The time elasticity factor characterizes the response rate change caused by environmental temperature fluctuations or sensor aging. Based on the real-time identification of time parameters, the control system adaptively adjusts the sampling period length or the stability criterion time window. When the physical characteristics of the controlled object undergo nonlinear distortion in the time axis dimension, the control cycle is kept synchronized with the process evolution rate. This variable structure control strategy eliminates the failure of the reference model caused by device aging or environmental changes, ensuring the system's robust control capability for non-stationary processes throughout its entire life cycle.

[0023] 3. The residual sequence after trajectory fitting is used as the observation carrier of system disturbance state. By extracting the time-domain morphological feature distribution of the residual sequence, structural disturbances caused by non-process mechanisms are identified. Based on the residual extreme value density and sign flip frequency topological fingerprint, normal chemical reaction fluctuations and abnormal physical flow fields of bubbles and eddies are distinguished. When a specific disturbance flow pattern fingerprint is identified, the control logic triggers the actuator state locking mechanism, switching the continuous adjustment action to a discrete hold state until the disturbance characteristics disappear. This disturbance suppression strategy based on signal morphology and semantics does not rely on additional hardware sensors, improves the control system's ability to perceive and defend against fluid physical state, blocks the transmission of environmental transient noise to the control output, and prevents the actuator from malfunctioning due to false signal excitation. Attached Figure Description

[0024] Figure 1 This is a flowchart of the adaptive closed-loop control for dual-parameter synchronous identification according to the present invention.

[0025] Figure 2 This is a comparison diagram of the residual waveform characteristics under normal operating conditions and typical physical disturbances of the present invention;

[0026] Figure 3 This is a diagram of the non-equilibrium steady-state locking and anti-disturbance defense control architecture of the present invention. Detailed Implementation

[0027] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0028] This invention provides an automated control method for a water sample analysis process, comprising a closed-loop control system with an industrial controller, a metering execution unit, and a response detection unit. The industrial controller specifically employs an embedded microprocessor or a programmable logic controller (PLC) for performing algorithm calculations and timing scheduling. The metering execution unit specifically employs a precision syringe pump driven by a stepper motor or a solenoid valve for performing reagent dispensing actions. The response detection unit specifically employs a spectrophotometer detection probe or an ion-selective electrode for real-time acquisition of physical quantity changes during the reaction process. This method addresses the challenges of conventional control systems dealing with large inertia, long time lags, and dynamics in water quality analysis processes by constructing a control architecture based on normalized trajectory homomorphic mapping. This method addresses control failure issues arising from time-varying parameters. It employs a procedure for constructing a unit step response reference model, executed during the initialization or periodic calibration phase. This model acquires the standard kinetic characteristics of the controlled object under ideal conditions. A standard unit concentration step excitation signal is applied to the reaction system at the baseline state; this involves injecting a standard sample solution to instantaneously increase the theoretical concentration to 50% of full scale. The output curve of the response detection unit is recorded at a preset high-frequency sampling rate until the output value stabilizes within a set error band. After acquiring the original response curve, amplitude normalization is performed, mapping the baseline value to 0 and the final steady-state value to 1. Simultaneously, the time axis is discretized to generate a time-varying response. As the independent variable, with normalized response degree The functional relationship of the dependent variable is fixed as a lookup table or a polynomial fitting function. It is stored in the controller's non-volatile memory as a reference trajectory for subsequent control cycles.

[0029] During the real-time control phase of automated analysis, the system executes a trajectory fitting procedure based on dual-parameter synchronous identification. Within the sampling window of the current control cycle, the system continuously reads the real-time process data sequence output by the response detection unit. Real-time process data sequence ,in This represents the total number of data points within the current window. At this point, due to fluctuations in ambient temperature, electrode aging, or the matrix effect of the water sample, the actual response curve may be distorted in both the amplitude and time dimensions. The controller construction includes an amplitude scaling factor. With time elasticity factor A two-parameter search space is used to decouple these two types of changes; within this search space, the controller employs the Levenberg-Marquardt algorithm, iteratively solving for the objective function of minimizing the sum of squared residuals between the real-time process data sequence and the transformed reference model. The definition is as follows: ,in, For real-time process data sequences at time... The sampled values; This is the amplitude scaling factor, representing the ratio of the current water sample concentration to the standard unit concentration; This is the functional expression for the unit step response reference model; The time elasticity factor characterizes the scaling factor of the current reaction kinetic rate relative to the standard model. The algorithm iteratively searches under preset constraints until the objective function converges, and outputs the optimal magnitude scaling factor at the current moment. With the optimal time elasticity factor .

[0030] After obtaining the optimal parameters, the system executes the bifurcation control strategy, utilizing the optimal amplitude scaling factor. As the best estimate of the final steady-state value at the current moment, i.e., the projected steady-state value, the controller calculates the difference between this projected steady-state value and the target setpoint, and calculates the control output based on this difference to drive the metering execution unit to adjust the reagent dosage. This process allows the system to predict the endpoint and apply control in advance based on the trajectory characteristics in the early stage of the reaction without waiting for the actual response of the sensor to reach steady state; and utilizes the optimal time elasticity factor. Adaptive correction is performed on the timing of the control system when... When the system response is found to be sluggish, maintaining the original fixed sampling frequency would cause control actions to oscillate. Therefore, the controller adjusts its response accordingly. The sampling interval for the next control cycle is dynamically adjusted. The adjustment of the correspondence follows the inverse proportionality law, that is... ,in The reference sampling interval is used.

[0031] Before calculating the control output, this method performs a residual waveform characteristic analysis step to identify and block structural disturbances caused by non-process mechanisms. The controller obtains the residual sequence between the real-time process data sequence and the matched reference model. The residual sequence is calculated The residual sequence is then subjected to time-domain feature extraction, and the peak density of the residual amplitude is calculated. With zero crossing rate The system has a pre-built interference pattern fingerprint library, including bubble interference pattern fingerprints and mixed unevenness pattern fingerprints. Bubble interference pattern fingerprints are defined as residual sequences exhibiting bidirectional large amplitude pulses that rapidly return to the zero axis within a preset short time window, characterized by high peak density. With a relatively low duration, the mixed heterogeneous pattern fingerprint is defined as a residual sequence exhibiting low-frequency sinusoidal oscillations, characterized by a specific zero-crossing rate. During the interval, the controller compares the waveform feature parameters extracted in real time with the fingerprint database. When the above interference fingerprint is matched, the system determines that the current data fluctuation is caused by the abnormal physical flow field and triggers the abnormal blocking mechanism. This mechanism keeps the current state of the metering execution unit unchanged, that is, locks the control output of the previous control cycle and suspends the update until the residual feature parameters are detected to recover to the preset random noise feature range before normal closed-loop control is restored.

[0032] The residual sequence waveform feature parameters are extracted, and a statistical noise threshold peak selection procedure is performed. The background noise standard deviation is calculated using residual data from the pure water baseline operating state. When the absolute value of the amplitude of the local extreme point of the residual sequence exceeds Extreme points are marked as peak values ​​and included in the peak density. Statistics, setting the zero-crossing rate The calculation only considers cases where the amplitude crosses the zero axis and the absolute values ​​of the amplitudes before and after the cross are both greater than 100. To mitigate the impact of flip events on feature extraction, sensor thermal noise and quantization errors are avoided. The interference mode fingerprint comparison step employs a weighted Euclidean distance-based decision method in feature vector space, constructing a peak density... Zero crossing rate In a two-dimensional feature space with orthogonal coordinates, the preset bubble interference mode is defined as centered at the coordinates of the two sides. Center and threshold For a closed region by radius, the weighted Euclidean distance between the feature vector and the fingerprint center coordinates is calculated in real time. ,when The method determines the fingerprint of the interference mode matching the operating condition and triggers the execution unit state locking mechanism; in addition, this method also includes a transient prediction truncation control step, in which the controller monitors the root mean square value of the fitted residual in real time. and the projected steady-state value over several consecutive control cycles convergence variance ,when Less than the preset confidence threshold, and When the value is less than the preset stability threshold, the system determines that the current projection steady-state value has sufficient credibility. At this time, the controller terminates the sampling process of the response detection unit and outputs the current projection steady-state value as the final analysis result.

[0033] Example 1: In a petrochemical wastewater treatment monitoring station, the water quality composition is complex and fluctuates wildly, making conventional online ammonia nitrogen monitoring systems inadequate. Frequent adjustments to upstream production loads and seasonal temperature changes cause significant and irregular fluctuations in the organic matter content of the water sample matrix and the ambient temperature. These fluctuations induce nonlinear drift in the chemical reaction rate constant, making it difficult for traditional control logic based on fixed reaction times to capture the reaction endpoint. Measurement results are often biased due to incomplete or over-reaction. The technical solution of this invention reconstructs the control logic for water sample analysis under the above conditions through automated control methods. During the system initialization phase, under standard laboratory conditions, a unit step response reference model describing the ideal reaction kinetics is constructed using standard sample solutions. During real-time operation, after the water sample is introduced into the reaction unit, the response detection unit collects data at a frequency of 10Hz, forming a real-time process data sequence. The sudden drop in water temperature at night during winter causes a sluggish response. The dual-parameter synchronous identification mechanism captures the extension characteristics of the real-time response curve on the time axis and calculates the optimal time elasticity factor of less than 1. .

[0034] The bifurcation control strategy utilizes Correct the sampling interval for the next control cycle This extends the sampling interval to 1.5 times the baseline sampling interval and adjusts the control system's observation cycle to synchronize with the current slow physicochemical reaction rate, avoiding false steady-state interpretations due to excessively fast sampling. Simultaneously, the algorithm calculates the optimal amplitude scaling factor. Locking in the temperature-compensated projected steady-state value, during the non-equilibrium phase (60% reaction progress), the transient prediction cutoff control step monitors the fitted residuals. convergence variance of projected steady-state values Once the prediction result meets the confidence threshold, sampling is terminated and the analysis result is output. When microbubbles are generated in the injection pipeline due to pressure fluctuations, the residual waveform feature analysis step calculates the residual sequence in real time. peak density With zero crossing rate The system captures the bidirectional large-amplitude pulse characteristics generated when bubbles pass over the electrodes. These characteristics match the preset bubble interference pattern fingerprint, triggering an abnormal blocking mechanism. The system locks the current state of the metering execution unit and refuses to misjudge signal fluctuations caused by non-reaction mechanisms as concentration changes. After the bubbles are expelled, the residual characteristics return to the random noise range, and the system resumes closed-loop control. This embodiment verifies that in a complex industrial environment, by introducing a time elasticity factor and residual fingerprint analysis, the system can achieve predictive and disturbance rejection control in a non-equilibrium state.

[0035] Example 2: On a water sample analysis test platform used to verify the effectiveness of the automated control method of the present invention, a systematic experiment was conducted to test the large hysteresis and disturbance suppression capabilities in a simulated industrial wastewater treatment process. The platform consisted of a reaction vessel equipped with a precision temperature control and stirring system, a reagent metering unit based on a high-precision peristaltic pump, and an industrial-grade ammonia nitrogen sensor. To simulate the complex working conditions of a real industrial site, specific interference sources were introduced during the experiment. A benchmark control group was set up, which used a traditional PID control algorithm. Its proportional, integral, and derivative parameters were tuned based on the Ziegler-Nichols method and operated at a standard temperature of 25°C. To achieve the optimal response, a sample group for this invention is constructed. This sample group is deployed with a control strategy based on normalized trajectory homomorphic mapping and two-parameter synchronous identification. To ensure the reproducibility of the experimental results, a unit step response reference model is used. In the initialization phase before the experiment, standard sample solution was injected into the reaction system and 25 was recorded. The open-loop response curve was established; during the experiment, both sample groups faced the same challenge: increasing the ambient temperature of the reaction system from 25°C. Plummeted to 10 The reaction kinetics were simulated to slow down due to low temperatures in winter. When the reaction was in the middle stage, pulsed bubbles of a specific frequency and amplitude were artificially injected into the injection pipeline to simulate physical flow field interference. The data acquisition system recorded the sensor response values, control output and the final measured ammonia nitrogen concentration of the two sample groups in real time with a sampling period of 100ms.

[0036] During the low-temperature hysteresis phase, the control group showed a significant deterioration in control quality. Because the PID parameters could not adaptively adjust to match the slower response rate, the system experienced substantial overshoot and oscillations, resulting in a final reading stabilization time exceeding 45 minutes. In contrast, the sample group of this invention, through a dual-parameter synchronous identification mechanism, calculated the optimal time elasticity factor in real time. Data shows that as temperatures drop, The value gradually decreases from 1.0 to around 0.6, and the controller adjusts the sampling interval accordingly. The timeframe is automatically extended from the baseline of 100ms to approximately 167ms, achieving synchronization between the control cycle and the reaction rate. During the bubble interference stage, the sensor readings of the control group experience instantaneous spikes due to bubbles passing over the electrodes. The PID algorithm responds to this spurious error signal, incorrectly adjusting the reagent dosage, causing subsequent concentration measurements to deviate from the true value by more than 15%. In contrast, the sample group of this invention performs residual waveform feature analysis, extracting the residual sequence in real time. peak density When detected When a sudden increase in fingerprints is matched with a bubble interference pattern, the system triggers an abnormal blocking mechanism to lock the state of the metering execution unit. Table 1 shows a comparison of the key performance data of the two control strategies under interference.

[0037] Table 1: Comparison of Performance Indicators under Different Control Strategies

[0038] ;

[0039] Referring to Table 1, the sample group of this invention shortens the low-temperature steady-state time by approximately 42%, improving analytical efficiency; the concentration deviation under bubble interference is only 0.8%, verifying the effective blocking capability of residual fingerprint analysis against non-process interference; furthermore, the effectiveness of the transient prediction cutoff control step was verified, and the sample group of this invention monitored the fitting residual when the reaction reached 60%. It drops below 0.02, and the projected steady-state value convergence variance Five consecutive periods less than The system determines that the cutoff condition is met and outputs the predicted concentration value in advance. The deviation between the predicted value and the measured value after the reaction is complete is less than 1%.

[0040] Example 3: This example combines Figures 1 to 3 The method for automating the water sample analysis process is described, such as... Figure 1 As shown, a unit step response reference model representing the normalized standard trajectory of the controlled object is established. Real-time process data sequences output by the response detection unit are acquired within the sampling window of the control cycle. A two-parameter search space containing an amplitude scaling factor and a time elasticity factor is then constructed and an iterative search is performed. The aim is to minimize the fitting residual between the transformed reference model and the real-time data. This process consists of two parallel execution paths: the optimal amplitude scaling factor is used to determine the projected steady-state value at the current moment, and the control output is calculated based on the difference between the projected steady-state value and the set value to drive the execution unit's action. The optimal time elasticity factor representing the system response rate and dynamic parameters is determined, and the sampling interval of the next cycle is adaptively adjusted accordingly. This achieves closed-loop compensation for the drift of the system's dynamic parameters by adjusting the next cycle.

[0041] like Figure 2 As shown in the figure, the residual values ​​evolve over a time interval from 0 to 10 seconds. The solid line represents the normal operating condition residual sequence, which exhibits slight random fluctuations near the zero axis. The dashed line represents the bubble interference residual sequence, which shows violent bidirectional large-amplitude pulses at specific time points, such as around 3.6 seconds and 6.4 seconds. The dotted line represents the mixed uneven residual sequence, which exhibits a clear low-frequency sinusoidal oscillation pattern. The system uses these waveform differences to identify structural disturbances not caused by process mechanisms. Figure 3As shown, the automated control technology system for water sample analysis takes the precise locking of the steady state in non-equilibrium state as its core objective, and has four main functional support modules. The reference model construction module is responsible for establishing the unit step response and normalized standard trajectory. The dual-parameter synchronous identification module is responsible for real-time calculation of the amplitude scaling factor and time elasticity factor. The closed-loop control strategy module includes projection steady-state value driving, sampling interval adaptive and transient prediction truncation logic. The anomaly blocking defense module achieves state locking through residual waveform analysis and interference fingerprint matching. Together, they form a stable automated control architecture.

[0042] Example 4: In the upgrade project of the automated control system for optimizing the dosing efficiency of industrial water treatment processes, conventional control strategies suffer from severe response hysteresis and overshoot when facing nonlinear fluctuations in water quality. Through in-depth analysis of the original control logic, two core problems were identified: first, the parameter threshold problem, where the threshold setting used to trigger dosing actions in the original system mainly relied on the experience of field engineers and lacked an adaptive adjustment mechanism based on data statistical characteristics; second, the algorithm path black box, where the logic used to predict the reaction endpoint lacked a clear feature extraction and anti-disturbance judgment process when facing complex water quality matrix interference. To address the parameter threshold black box problem, an adaptive threshold setting mechanism based on process data statistical characteristics was introduced. This mechanism defines a sliding time window, the length of which is set to 3 to 5 times the average response time constant of the system. Within this window, the system calculates the standard deviation of the sensor response value sequence in real time. with the mean A dynamic threshold calculation model was constructed to determine the trigger threshold for drug dosing control. Defined as a functional relationship between the benchmark setpoint and the statistical fluctuation: ,in, As the baseline setting value, The confidence coefficient is set to a range of 2.0 to 3.0 to cover more than 95% of random noise fluctuations. When the real-time monitoring value deviates from this dynamic threshold, the system determines it as a valid water quality change signal, thereby triggering control actions.

[0043] To address the algorithm path issue, a three-stage processing flow was constructed, comprising feature extraction, interference identification, and endpoint prediction. The first stage preprocesses the real-time acquired sensor data sequence, using a five-point cubic smoothing algorithm to remove high-frequency noise spikes and generate a smooth response curve. The second stage performs interference identification based on morphological features. The system calculates the rate of change of the first derivative and the curvature of the second derivative of the smooth curve in real time and maps these two features to a preset feature space. If the current feature point falls into a predefined bubble interference zone or electromagnetic interference zone, the system automatically freezes the current control output until the feature point returns to the normal region. The bubble interference zone is characterized by a very large instantaneous rate of change and rapid recovery, while the electromagnetic interference zone is characterized by discontinuous step jumps. The third stage, under the premise of confirming the absence of interference, uses the Levenberg-Marquardt algorithm to fit the unit step response reference model in real time and solve for the optimal amplitude scaling factor. As the projected steady-state value, it is directly used in the feedback control loop to replace the lagging measured value and achieve advance locking of the reaction endpoint. Through the above-mentioned repair measures, the system's control stability is improved when dealing with complex water samples containing high concentrations of suspended solids and bubble interference. The measured data shows that during 72 hours of continuous operation, the number of accidental dosing of chemicals was reduced by more than 85% compared with before the upgrade, the average time for a single analysis was shortened by about 30%, and the amount of chemicals consumed was reduced by 12%.

[0044] Example 5: In the upgrade and renovation project of industrial wastewater treatment facilities, in order to ensure that the automatic control system can maintain control accuracy under different batches of sensor hardware and varying influent water quality conditions, a standardized on-site deployment pre-calibration procedure was formulated and implemented, and a baseline establishment phase was defined. The system does not directly intervene in closed-loop control, but operates in bypass monitoring mode. Technicians inject a standard ammonia nitrogen solution of known concentration into the reaction tank to construct a series of concentration steps with gradients. The system records the original potential response of the sensor at each concentration step, uses the least squares method to fit and generate the concentration and potential characteristic curve of the specific sensor under the current physical environment, and updates the internal mapping parameters of the controller accordingly. This step eliminates the measurement baseline drift caused by individual sensor differences and different on-site electromagnetic environments.

[0045] In the dynamic response characteristic calibration procedure, the system applies instantaneous pulse disturbances to the reaction tank through an automatic dosing device, i.e., rapidly injects a quantitative amount of tracer, and records the dynamic response curve of the sensor in a high-frequency sampling mode. By analyzing the rise time and settling time of the response curve, the system identifies the actual hydraulic residence time and mixing time constant of the current reaction system. These kinetic parameters are used to initialize the range of the time elasticity factor in the two-parameter search space, ensuring that the search starting point of the control algorithm is close to the real physical process. Through the above-mentioned standardized pre-calibration process, the system can automatically adapt to different hardware combinations and operating environments, ensuring the effectiveness and safety of the control model in the cold start state.

[0046] Example 6: In a multi-site industrial water quality online monitoring network project, to ensure the universality and stability of the core control algorithm across different geographical regions, water quality characteristics, and aging levels on hardware platforms, a standardized engineering calibration and adaptive parameter matrix construction procedure was developed and implemented. A calibration process for physical environment characteristic parameters was defined. Before deployment at each monitoring station, technicians calibrated the thermal inertia time constant of the reaction system by injecting deionized water into the reaction tank and applying a step heating signal, recording the response curve of the temperature sensor. Simultaneously, a step experiment of the stirrer speed, combined with the conductivity tracer method, was used to calibrate the mixing uniformity time constant of the reaction system. For the calibration of process control parameters, the procedure introduced an offline optimization mechanism based on historical data. The system collected historical water quality data from the past six months for each station, particularly the daily variation curves of ammonia nitrogen concentration and records of abrupt events. Using this historical data, the control process was replayed in a simulation environment. With the dual optimization objectives of minimizing the fitting residual and ensuring the smoothness of the control action, a grid search algorithm was used to traverse the amplitude scaling factor in the dual-parameter search space. With time elasticity factor The initial value range and step size are determined, and the specific optimal parameter search boundary and iteration termination condition for the site are finally determined. A dedicated parameter configuration matrix for the site is generated. This offline calibration process ensures that the control algorithm has the optimal search efficiency for the specific water quality characteristics when it is put into online operation.

[0047] In addition, a multi-level fault-tolerant mechanism based on a state machine is constructed to address online operational anomalies. The system monitors the signal-to-noise ratio and drift rate of the original sensor signal in real time. When the signal-to-noise ratio is lower than a preset threshold, the filtering algorithm is automatically upgraded, switching from a five-point smoothing mode to a wavelet denoising mode. When the sensor baseline drift rate is detected to exceed the allowable range, the system automatically suspends the current control loop and triggers an automatic cleaning and calibration process. Closed-loop control is resumed only after the baseline returns to normal. This fault-tolerant mechanism ensures the continuous availability of the system under sensor performance degradation or harsh environmental conditions.

[0048] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0049] Finally, it should be noted that the above 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 preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for automatically controlling a water sample analysis process, applied to a control system comprising a controller, an execution unit, and a response detection unit, characterized by, The method includes the following steps: A unit step response reference model is established, which represents the normalized standard trajectory of the controlled object evolving from the initial state to the steady state. Within the sampling window of the control cycle, acquire the real-time process data sequence output by the response detection unit; A two-parameter search space containing an amplitude scaling factor and a time elasticity factor is constructed. Within the two-parameter search space, the optimal amplitude scaling factor and the optimal time elasticity factor are searched simultaneously through an iterative algorithm to minimize the fitting residual between the unit step response reference model transformed by the optimal amplitude scaling factor and the optimal time elasticity factor and the real-time process data sequence. The optimal amplitude scaling factor is determined as the projected steady-state value at the current moment, and the control output is calculated based on the difference between the projected steady-state value and the target set value to drive the action of the execution unit. Establish an adjustment correspondence between the optimal time elasticity factor and the sampling period length of the controller. When the optimal time elasticity factor indicates system response hysteresis, extend the sampling interval of the next control cycle according to the adjustment correspondence to achieve closed-loop compensation for the drift of system dynamic parameters. The controller construction includes an amplitude scaling factor. With time elasticity factor A two-parameter search space is used to decouple these two types of changes; within this search space, the controller employs the Levenberg-Marquardt algorithm, iteratively solving for the objective function of minimizing the sum of squared residuals between the real-time process data sequence and the transformed reference model. The definition is as follows: ,in, For real-time process data sequences at time... The sampled values; This is the amplitude scaling factor, representing the ratio of the current water sample concentration to the standard unit concentration; This is the functional expression for the unit step response reference model; The time elasticity factor characterizes the scaling factor of the current reaction kinetic rate relative to the standard model. The algorithm iteratively searches under preset constraints until the objective function converges, and outputs the optimal magnitude scaling factor at the current moment. With the optimal time elasticity factor .

2. The method of claim 1, wherein, Before calculating the control output, the method also includes performing a residual waveform feature analysis step: obtaining the residual sequence between the real-time process data sequence and the matched unit step response reference model; extracting the waveform feature parameters of the residual sequence, which at least include the peak density and zero-crossing rate of the residual amplitude; comparing the waveform feature parameters with a preset disturbance mode fingerprint; when the waveform feature parameters match the bubble disturbance mode fingerprint or the mixed uneven mode fingerprint, maintaining the current state of the execution unit and pausing the update of the control output until the waveform feature parameters recover to the preset random noise feature range.

3. The method of claim 2, wherein the method further comprises: The steps of comparing waveform feature parameters with preset interference mode fingerprints include: when the residual sequence presents bidirectional large amplitude pulses and returns to the zero axis within a preset time, it is identified as bubble interference mode fingerprint; when the residual sequence presents low-frequency sinusoidal oscillation, it is identified as mixed uneven mode fingerprint; keeping the current state of the execution unit means keeping the control output of the previous control cycle unchanged.

4. The method of claim 1, wherein the method further comprises: The steps for establishing a unit step response reference model include: during the system initialization phase, applying a unit step excitation signal to the controlled object; acquiring the open-loop step response curve of the controlled object; performing amplitude normalization and time axis discretization on the open-loop step response curve to generate a lookup table or polynomial fitting function with time as the independent variable and normalized response degree as the dependent variable, which serves as the unit step response reference model.

5. The method for automated control of water sample analysis process as claimed in claim 1 wherein, The specific configuration for adjusting the correspondence is as follows: set a standard time elasticity factor, which corresponds to the nominal time constant of the unit step response reference model; calculate the ratio of the optimal time elasticity factor to the standard time elasticity factor; The sampling interval for the next control cycle is set to the product of the basic sampling interval and the reciprocal of the ratio, in order to keep the sampling frequency synchronized with the real-time response rate of the controlled object.

6. The method of claim 1, wherein, The steps for calculating the control output based on the difference between the projected steady-state value and the target setpoint include: calculating the deviation between the optimal time elasticity factor and the standard value; dynamically adjusting the proportional gain and integral time constant of the controller based on the deviation; and reducing the proportional gain and increasing the integral time constant when the deviation exceeds the preset linear region threshold to suppress overshoot caused by model mismatch.

7. The method of claim 1, wherein, The method also includes a transient prediction truncation control step: real-time monitoring of the root mean square value of the fitted residual and the convergence variance of the projected steady-state value; when the root mean square value of the fitted residual is less than a preset confidence threshold and the convergence variance of the projected steady-state value is less than a preset stability threshold, the current projected steady-state value is determined to be valid. Before the real-time process data sequence reaches physical steady state, the sampling process of the response detection unit is directly terminated, and the projected steady-state value is output as the final analysis result.

8. The method of claim 1, wherein the method further comprises: The iterative algorithm employs either the Levenberg-Marquardt algorithm or the Gauss-Newton algorithm, and applies a non-negative constraint to the optimal magnitude scaling factor and a positive real-field constraint to the optimal time elasticity factor during the search process.

9. The automated control method for a water sample analysis process according to claim 2, characterized in that, The steps for constructing the interference mode fingerprint database include: simulating bubble injection and stirrer failure conditions offline; collecting raw response data under various abnormal conditions; fitting the raw response data using a unit step response reference model to extract the respective training residual sequences; performing time-domain statistical analysis on the training residual sequences to generate feature vector templates corresponding to various abnormal conditions, and storing them in the interference mode fingerprint database.

Citation Information

Patent Citations

  • Total cyanide analysis device and analysis method for water samples

    CN107367475B

  • Plant water culture method based on RO (reverse osmosis) water treatment

    CN118133712A

  • Time sequence analysis-based state monitoring data cleaning method for power transmission and transformation device

    WO2016101690A1