System and electronic device for intelligent correction of electrochemical sensors based on coupling of dynamic parameters

The intelligent calibration system for electrochemical sensors using dynamic parameter coupling solves the accuracy and response speed problems of traditional electrochemical sensors in dynamic environments, achieving high-precision, low-cost real-time calibration and measurement, suitable for water quality monitoring and industrial process control.

CN121347632BActive Publication Date: 2026-05-12SHENZHEN ANGEL DRINKING WATER IND GRP
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN ANGEL DRINKING WATER IND GRP
Filing Date
2025-12-18
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Traditional electrochemical sensors struggle to achieve real-time response in dynamic environments, exhibiting issues such as dynamic compensation lag, parameter coupling interference, and high hardware costs. Furthermore, they suffer from poor noise resistance and stability, failing to meet high-precision requirements.

Method used

采用基于动态参数耦合的电化学传感器智能校正系统,包括电化学传感器模块、信号调整模块、算法补偿模块和MCU控制中心,通过信号动态权重优化的双EDA滤波、温度-TDS联合补偿和相位补偿等技术手段,实现实时校准和高精度测量。

Benefits of technology

It improves the accuracy and response speed of sensors, reduces manual intervention and maintenance costs, lowers hardware costs, and is suitable for water quality monitoring and industrial process control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121347632B_ABST
    Figure CN121347632B_ABST
Patent Text Reader

Abstract

The application provides a system and electronic equipment for intelligent correction of an electrochemical sensor based on dynamic parameter coupling, the system comprising: an electrochemical sensor module for detecting ion concentration, obtaining an original detection voltage signal, and transmitting the original detection voltage signal to a signal adjustment module; the signal adjustment module is used for preprocessing the original detection voltage signal to obtain preprocessed detection voltage data and transmitting the preprocessed detection voltage data to an algorithm compensation module; the algorithm compensation module calibrates the preprocessed detection voltage data through an algorithm model to obtain ion concentration data results and output the ion concentration data results to an MCU control center, wherein the data calibration method comprises: phase compensation, temperature-TDS joint compensation; the MCU control center is used for control and communication interaction to improve the accuracy of the ion concentration data. According to the technical scheme of the application, the accuracy and response speed of the electrochemical sensor can be improved, manual intervention can be reduced, and operation and maintenance costs can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrochemical sensor technology, and more specifically to a system and electronic device for intelligent calibration of electrochemical sensors based on dynamic parameter coupling. Background Technology

[0002] Electrochemical sensors, as core tools for ion concentration detection, are widely used in water quality monitoring, environmental analysis, and industrial process control. However, traditional calibration methods for electrochemical sensors primarily rely on physical calibration, which involves periodically injecting standard solutions or adjusting environmental parameters to correct output deviations. The core idea behind traditional calibration methods (such as pH meters, dissolved oxygen sensors, and ion-selective electrodes) is to correct sensor output deviations using standard solutions or standard environments. The drawback of traditional calibration stems from its physical intervention (requiring changes to the sensor's operating state), while intelligent data processing establishes a "software protection layer" at the sensor's raw output; these two approaches represent different levels of technical solutions.

[0003] However, due to changes in the external environment (such as temperature, humidity, and pressure) and sensor aging, traditional calibration methods struggle to meet high-precision requirements. Regarding dynamic environmental adaptability, traditional calibration strategies, based on fixed cycles (e.g., 24 hours / cycle) or threshold triggers (e.g., activation when deviation exceeds ±2%), cannot respond in real-time to instantaneous fluctuations in environmental parameters. For example, in a home setting, water flow disturbances or device start-up / stop may cause the temperature change rate (dT / dt) to exceed 0.5 mV / s, while existing systems must wait for the next cycle to correct, leading to accumulated measurement errors. Furthermore, the synergistic effects of multiple parameters (such as the non-orthogonal interference between temperature and total dissolved solids (TDS)) further exacerbate calibration complexity. Experiments show that in a high-salt environment of 30℃ / 180 ppm, the traditional linear compensation model error of a pH sensor can reach ±1.8 mV, far exceeding the industry standard requirement (±0.5 mV). From a hardware implementation perspective, to improve accuracy, existing solutions often rely on high-precision ADC chips (16 bits or more), external filtering circuits, and complex hardware architectures, increasing the unit cost by more than 30%. Meanwhile, physical calibration requires manual operation and high maintenance frequency (once a week), making automation difficult in remote monitoring scenarios. Regarding noise immunity and stability, traditional single-channel EMA filtering (α=0.7) sacrifices response speed to sudden changes in noise while suppressing high-frequency noise. For example, in scenarios with sudden temperature changes, the baseline tracking delay reaches 2.3 seconds, which cannot meet the requirements of real-time water quality monitoring. In summary, the shortcomings of existing technologies mainly lie in dynamic compensation lag, parameter coupling interference, high hardware costs, and poor noise immunity and stability.

[0004] Therefore, a technical solution is needed to improve the accuracy and response speed of electrochemical sensors, reduce manual intervention, and lower operation and maintenance costs. Summary of the Invention

[0005] This application aims to provide a system and electronic device for intelligent calibration of electrochemical sensors based on dynamic parameter coupling, which can improve the accuracy and response speed of electrochemical sensors, reduce manual intervention, and lower operation and maintenance costs.

[0006] According to one aspect of this application, a system for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling is provided. The system includes: an electrochemical sensor module, a signal adjustment module, an algorithm compensation module, and an MCU control center.

[0007] The electrochemical sensor module is used to detect ion concentration, obtain the original detection voltage signal, and transmit it to the signal adjustment module;

[0008] The signal adjustment module is used to preprocess the original detection voltage signal and transmit the preprocessed detection voltage data to the algorithm compensation module.

[0009] The algorithm compensation module calibrates the preprocessed detection voltage data using an algorithm model to obtain ion concentration data results and outputs them to the MCU control center.

[0010] The MCU control center is used for the control and communication interaction of the electrochemical sensor module, the signal adjustment module, and the algorithm compensation module.

[0011] The data calibration method used in the algorithm compensation module includes phase compensation and temperature-TDS joint compensation to improve the accuracy of the ion concentration data.

[0012] According to some embodiments, the electrochemical sensor module further includes:

[0013] The temperature / total dissolved solids (TDS) sensor collects information on the ambient temperature and total dissolved solids concentration of the electrochemical sensor to provide temperature and total dissolved solids data for subsequent calibration.

[0014] According to some embodiments, the signal adjustment module includes: a signal conditioning unit and a digital-to-analog conversion unit, wherein,

[0015] The signal conditioning unit receives the original detection voltage signal from the electrochemical sensor module and preprocesses the original detection voltage signal to improve the signal-to-noise ratio, thereby obtaining an adjusted original detection voltage signal. The preprocessing includes: dual EDA filtering based on signal dynamic weight optimization and signal dynamic weight optimization, wherein the dual EDA filtering based on signal dynamic weight optimization includes a first filtering channel and a second filtering channel.

[0016] The digital-to-analog conversion unit receives the adjusted original detection voltage signal from the signal conditioning unit, converts the adjusted original detection voltage signal into detection voltage data, and transmits it to the algorithm compensation module.

[0017] According to some embodiments, the signal conditioning unit is configured as follows:

[0018] Micro-gradient detection is performed on the original detection voltage signal. If the rate of change of the original detection voltage signal is greater than the first trigger threshold, the weight factor is optimized according to the dynamic weighting factor optimization formula to obtain the optimized weight factor.

[0019] According to some embodiments, the dynamic weighting factor optimization formula is as follows:

[0020] , ,

[0021] in, The instantaneous rate of change of voltage is used to quantify the degree of signal abrupt change. For dynamic gain, The default value for the weight factor of the first or second filter channel. The optimized weighting factor is the first or second filtering channel.

[0022] According to some embodiments, the signal conditioning unit is configured as follows:

[0023] The modal baselines of the first and second filtering channels of the dual EDA filter based on signal dynamic weight optimization are determined or updated according to the set initial weight factor or the optimized weight factor. The update formula for the modal baseline is as follows:

[0024] ,

[0025] in, This provides the sensor's real-time raw detection voltage signal. The weighting factor can be either the default value or the optimized weighting factor. This is the historical baseline voltage at the previous moment.

[0026] According to some embodiments, the algorithm compensation module is configured as follows:

[0027] A combined linear and nonlinear temperature compensation model, combined with total dissolved solids data, is used to achieve temperature-TDS joint compensation of the ion concentration data. The temperature-TDS joint compensation equation is as follows:

[0028] ,

[0029] in, This is the temperature compensation coefficient. For reference temperature, This is the TDS compensation coefficient. For reference TDS concentration, It is a nonlinear saturation coefficient. It is the cross-coupling factor. For dynamic coupling coefficients.

[0030] According to some embodiments, the MCU control center further includes an output and interaction subunit, which is used to output the ion concentration data result data to the user or an external system.

[0031] According to some embodiments, the output and interaction subunit includes:

[0032] Human-computer interaction interface, including: a display screen and calibration buttons on the device panel, mobile device software, and cloud platform, or one or more of these.

[0033] According to some embodiments, the MCU control center is configured as follows:

[0034] The system receives a calibration command from the output and interaction subunit, and sends a first trigger signal to the signal adjustment module and the algorithm compensation module according to the calibration command, so that the signal adjustment module and the algorithm compensation module perform corresponding preprocessing and data calibration.

[0035] According to another aspect of this application, a method for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling is provided, the method comprising:

[0036] Acquire the raw detection voltage signal from the electrochemical sensor used to detect ion concentration;

[0037] The original detection voltage signal is preprocessed to obtain preprocessed detection voltage data. The preprocessing includes: dual EDA filtering based on signal dynamic weight optimization and signal dynamic weight optimization, wherein the dual EDA filtering based on signal dynamic weight optimization includes a first filtering channel and a second filtering channel.

[0038] The preprocessed detection voltage data is calibrated to obtain ion concentration data. The data calibration includes phase compensation and temperature-TDS joint compensation.

[0039] According to another aspect of this application, an electronic device is provided, comprising:

[0040] Processor; and

[0041] The memory stores a computer program that, when executed by the processor, causes the processor to perform the method described above.

[0042] According to another aspect of this application, a non-transitory computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a processor, cause the processor to perform the method as described above.

[0043] According to the embodiments of this application, by constructing a dual-mode EMA filtering system (fast channel α=0.85, slow channel α=0.6) and introducing a dynamic weight optimization mechanism based on signal gradient, the system can adaptively adjust the filtering parameters according to the real-time voltage change rate (0~0.5mV / s), which effectively suppresses high-frequency noise and avoids response lag caused by excessive smoothing, significantly enhancing the stability and reliability of the sensor in dynamic environments. By innovatively proposing a temperature-TDS cross-coupling compensation model, which integrates linear temperature compensation (0.2mV / ℃), TDS nonlinear saturation correction (γ=0.001), and cross-term optimization (weight factor 0.001), the accuracy is improved by more than 80% compared with the traditional scheme that only uses linear temperature compensation (error up to ±1.8mV), meeting the high accuracy requirements of industrial-grade water quality monitoring. By introducing dynamic phase compensation technology based on the ratio of fast and slow baselines, the phase shift is accurately estimated in the effective frequency band of 0.1~1Hz, and combined with dead zone control strategy, transient oscillations caused by filter mode switching or environmental changes are effectively eliminated. The system stabilization time has been reduced from 120ms to less than 25ms. At the same time, due to the reduction of invalid compensation operations, the overall power consumption has been reduced by about 20%, making it particularly suitable for battery-powered or low-power IoT terminal devices.

[0044] According to some embodiments, the technical solution of the present invention achieves deep optimization at the algorithm level by adding an MCU control center, reducing the calibration calculation load by 60% and RAM usage to only 3.2KB (compared to approximately 8KB in traditional solutions). It successfully adapts to resource-constrained 8-bit MCU platforms (clock frequency ≥ 16MHz), significantly reducing hardware costs. Simultaneously, it supports a "one-click automatic calibration" function, allowing users to complete the entire calibration process within 5 minutes with simple operations (compared to 30 minutes of manual intervention in traditional methods), greatly simplifying the operation and maintenance process and promoting the widespread application of high-precision electrochemical sensing technology in consumer products.

[0045] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below.

[0047] Figure 1 This diagram illustrates a system schematic for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, according to an example embodiment.

[0048] Figure 2 This diagram illustrates a system data processing flow for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, according to an example embodiment.

[0049] Figure 3 This diagram illustrates a system hardware architecture for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, according to an example embodiment.

[0050] Figure 4 This diagram illustrates the automatic triggering process of an electrochemical sensor intelligent calibration system based on dynamic parameter coupling, according to an example embodiment.

[0051] Figure 5 The flowchart illustrates a method for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, according to an example embodiment.

[0052] Figure 6 This diagram illustrates a method for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, according to an example embodiment.

[0053] Figure 7 A block diagram of an electronic device according to an exemplary embodiment is shown. Detailed Implementation

[0054] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.

[0055] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0056] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0057] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0058] It should be understood that although the terms first, second, third, etc., may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this application. As used herein, the term "and / or" includes all combinations of any one and more of the associated listed items.

[0059] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0060] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing this application, and therefore cannot be used to limit the scope of protection of this application.

[0061] Electrochemical sensors, as core tools for ion concentration detection, are widely used in water quality monitoring, environmental analysis, and industrial process control. However, traditional calibration methods for electrochemical sensors primarily rely on physical calibration, which involves periodically injecting standard solutions or adjusting environmental parameters to correct output deviations. The core idea behind traditional calibration methods (such as pH meters, dissolved oxygen sensors, and ion-selective electrodes) is to correct sensor output deviations using standard solutions or standard environments. The drawback of traditional calibration stems from its physical intervention (requiring changes to the sensor's operating state), while intelligent data processing establishes a "software protection layer" at the sensor's raw output; these two approaches represent different levels of technical solutions.

[0062] To address these challenges, this application proposes a system and electronic device for intelligent calibration of electrochemical sensors based on dynamic parameter coupling. It addresses three major technical difficulties faced by electrochemical sensors in complex environments (dynamic compensation lag, parameter coupling interference, and high hardware cost) by proposing a multi-dimensional collaborative calibration architecture. Specific design objectives include: (1) Real-time response mechanism in dynamic environments: ① Overcoming the prior constraints of traditional periodic / threshold calibration by constructing a dynamic calibration triggering strategy based on the first derivatives (dT / dt, dD / dt) of environmental parameters; ② Solving the problem of synchronous tracking of parameters with rapid and slow changes through an asymmetric sliding window mechanism (temperature window length 5s, TDS window length 15s). (2) Compensation for cross-parameter coupling effects: ① Establishing a voltage compensation equation including a quadratic coupling term (K-cross) to achieve geometric mean compensation for non-orthogonal temperature-TDS interference; ② Developing a parameter sensitivity hierarchical compensation strategy (temperature compensation priority > baseline drift > TDS) to avoid overload risks when multiple parameters change abruptly simultaneously. This can improve the accuracy and response speed of electrochemical sensors, reduce manual intervention, and lower operation and maintenance costs. Before describing the embodiments of this application, some terms or concepts involved in the embodiments are explained.

[0063] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application.

[0064] Figure 1 This diagram illustrates a system schematic for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, according to an example embodiment.

[0065] See Figure 1The figure shows a system for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling. The system includes: an electrochemical sensor module 01, a signal adjustment module 02, an algorithm compensation module 03, and an MCU control center 04.

[0066] According to some embodiments, the electrochemical sensor module 01 is used to detect ion concentration, obtain a raw detection voltage signal, and transmit it to the signal adjustment module 02. Specifically, the electrochemical sensor module 01 senses the activity of the target ion in the test solution and, based on the Nernst response mechanism, generates a potential difference proportional to the logarithm of the ion activity, i.e., the raw detection voltage signal Vraw (unit: mV), and outputs it to the signal adjustment module 02. The electrochemical sensor module 01 includes an ion-selective electrode (ISE) and a reference electrode, forming a complete potential measurement circuit.

[0067] According to some embodiments, the electrochemical sensor module 01 further includes a temperature / total dissolved solids (TDS) sensor, which acquires the ambient temperature and total dissolved solids concentration information of the electrochemical sensor to provide temperature and TDS data for subsequent calibration. Specifically, the electrochemical sensor module 01 also integrates a temperature sensor and a TDS sensor to simultaneously acquire the real-time temperature (°C) and TDS concentration (ppm) of the environment in which the electrochemical sensor is located. These environmental parameters, together with the raw voltage signal, constitute the basic data source required for calibration.

[0068] According to some embodiments, the signal adjustment module 02 is used to preprocess the original detection voltage signal to obtain preprocessed detection voltage data, which is then transmitted to the algorithm compensation module 03. The signal adjustment module 02 is used to perform analog front-end preprocessing on the original detection voltage signal to obtain preprocessed detection voltage data, which is then transmitted to the algorithm compensation module 03. The preprocessing includes, but is not limited to, impedance matching, common-mode noise suppression, low-pass filtering, signal amplification, and analog-to-digital conversion (ADC) to obtain high signal-to-noise ratio digital voltage data.

[0069] According to some embodiments, the signal adjustment module 02 includes: a signal conditioning unit 0201 and a digital-to-analog conversion unit 0202, wherein the signal conditioning unit 0201 receives the original detection voltage signal from the electrochemical sensor module 01, and preprocesses the original detection voltage signal to improve the signal-to-noise ratio to obtain an adjusted original detection voltage signal. The preprocessing includes: dual EDA filtering based on signal dynamic weight optimization and signal dynamic weight optimization, wherein the dual EDA filtering based on signal dynamic weight optimization includes a first filtering channel and a second filtering channel.

[0070] Figure 2 This diagram illustrates a system data processing flow for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, according to an example embodiment.

[0071] See Figure 2 First, the signal conditioning unit 0201 receives the raw detection voltage signal Vraw from the electrochemical sensor module 01. Optionally, the initial weighting factor of the first filter channel can be set to 0.85 by default, and the weighting factor of the second filter channel can be set to 0.6 by default to control the update speed of the current measurement value to the baseline. Generally, the larger the value of the weighting factor, the faster the response, but the correspondingly weaker the noise immunity. The dynamic gain coefficient k can be set to a typical value of 0.02 to achieve a balance between response speed and noise immunity. Furthermore, It also needs to be limited to a reasonable range (e.g., the upper limit should not exceed 0.95) to prevent overshoot.

[0072] Subsequently, the signal conditioning unit 0201 determines the modal baselines of the first and second filtering channels of the dual EDA filter based on signal dynamic weight optimization according to the set initial weight factor. The update formula for the modal baseline is as follows:

[0073] ,

[0074] in, This represents the real-time raw detection voltage signal value of the sensor. As the default value for the weighting factor, or according to some embodiments, generally, the baseline update rule is: New baseline = Current measurement value × α + Historical baseline × (1-α). This invention employs a dual-modal baseline update mechanism to balance rapid response to signal abrupt changes with robust noise suppression. This mechanism is based on two sets of parallel exponential moving average (EMA) filters, defined as a fast-mode channel and a slow-mode channel, whose baseline voltage is updated in real time using the following recursive formula:

[0075] ,

[0076] in, The current sensor output is the raw detection voltage value (unit: mV), without any filtering. This is the historical baseline voltage from the previous moment. Optionally, each can be set separately. =0.85 and =0.6 are the default weighting factors for fast and slow modes, respectively, used to control the proportion of the current measurement value's contribution to the baseline.

[0077] In a typical test scenario (such as a sudden temperature change causing a rapid rise in electrode potential), assuming the original voltage jumps to 12.0mV, the fast baseline update result would be:

[0078] ,

[0079] The slow baseline update result is:

[0080] ,

[0081] As can be seen, the fast mode quickly tracks abrupt changes, with the new baseline close to the current value (originally 10.5 → 11.775 mV). The slow mode, on the other hand, retains more historical information (originally 10.2 → 11.28 mV) and the changes are more gradual. Together, they constitute a multi-scale representation of the signal's dynamic characteristics.

[0082] Optimized weighting factors The voltage is the historical baseline voltage from the previous moment. With this setting, the first filter channel can quickly track voltage abrupt changes (such as potential jumps caused by a sudden rise in temperature), while the second filter channel retains more historical information to suppress high-frequency noise. Together, they achieve an adaptive response to dynamic environmental disturbances.

[0083] To further enhance the system's adaptive capability, this invention introduces a dynamic weight optimization strategy: Micro-gradient detection is performed on the original detected voltage signal. If the rate of change of the original detected voltage signal is greater than a first trigger threshold, the weight factor is optimized according to the dynamic weighting factor optimization formula to obtain the optimized weight factor. The preprocessing process employs a dual-channel exponential moving average (EMA) filter structure based on dynamic signal weight optimization, including a first filter channel (fast response channel) and a second filter channel (slow response channel). Specifically, the signal conditioning unit 0201 performs micro-gradient detection on the original detected voltage signal and calculates the instantaneous rate of change of the original voltage, dV / dt (unit: mV / s), as a quantitative indicator of the degree of signal mutation. When dV / dt exceeds the preset first trigger threshold, the system determines that it is currently in a dynamic disturbance state and initiates the dynamic weight optimization mechanism.

[0084] The weighting factor is then adaptively adjusted according to the following formula:

[0085] , ,

[0086] in, (mV / s) represents the instantaneous rate of change of voltage, used to quantify the degree of signal abrupt change. For dynamic gain, The default value for the weight factor of the first or second filter channel. The optimized weighting factor is the first or second filtering channel.

[0087] Finally, the modal baselines of the first and second filtering channels of the dual EDA filter based on signal dynamic weight optimization are updated according to the optimized weight factors.

[0088] For example, in scenarios where electrode voltage fluctuates rapidly (such as sudden temperature changes), the current voltage change rate At that time, the weights after optimization in fast mode are: , If the limits are not exceeded, it can be used directly. The filtering is faster, thus improving the response speed.

[0089] The slow mode is adjusted similarly. This allows for faster baseline tracking under strong disturbances, while maintaining high noise suppression capability under stable conditions.

[0090] The dual-mode adaptive baseline update mechanism described above provides a stable and reliable reference for subsequent phase compensation, cross-parameter coupling correction, and drift correction, and is the core foundation for achieving high-precision, fast-response intelligent correction.

[0091] According to some embodiments, optionally, a fusion formula can also be used: This results in a stable baseline voltage output. .

[0092] According to some embodiments, the analog-to-digital converter 0202 receives the adjusted raw detection voltage signal from the signal conditioning unit 0201, converts the adjusted raw detection voltage signal into detection voltage data, and transmits it to the algorithm compensation module 03. The voltage signal after conditioning is digitized by the analog-to-digital converter to generate high-precision, low-jitter detection voltage data, which serves as the basic input for the algorithm compensation module 03 to perform temperature-TDS joint compensation, phase compensation, and nonlinear correction, thereby providing a reliable guarantee for the accuracy of the final ion concentration result.

[0093] According to some embodiments, the algorithm compensation module 03 performs data calibration on the preprocessed detection voltage data using an algorithm model to obtain ion concentration data results and outputs them to the MCU control center 04. The data calibration method used by the algorithm compensation module 03 includes phase compensation and temperature-TDS joint compensation to improve the accuracy of the ion concentration data.

[0094] The algorithm compensation module 03 is configured to: employ a combined linear and nonlinear temperature compensation model, combined with total dissolved solids data, to achieve temperature-TDS joint compensation of the ion concentration data. The temperature-TDS joint compensation equation is as follows:

[0095] ,

[0096] in, (Unit: mV / ℃) is the temperature compensation coefficient, with a typical value of 0.2. It is calibrated through a constant temperature bath experiment and is used to correct the potential shift of the sensor caused by temperature drift. (Unit: °C) is the standard temperature, with a default of 25 °C, corresponding to the standard environment for sensor factory calibration. (Unit: ppm) - ¹) is the TDS compensation coefficient, with a typical value of 0.0025, which is obtained through segmented calibration in a salinity gradient experiment. (Unit: ppm) is the reference TDS concentration, with a default value of 150 ppm, which can be dynamically adjusted according to the actual water quality level (such as drinking water, industrial wastewater). (Unit: ppm) - ¹) is the nonlinear saturation coefficient, which defaults to 0.001 and is used to suppress overcompensation caused by nonlinear changes in electrolyte ion activity at high TDS concentrations. (Unitless) is the cross-coupling factor, which defaults to 0.001. It characterizes the coupling effect of temperature and TDS on electrode potential and is determined by fitting a large amount of measured data. is the dynamic coupling coefficient, an empirically optimized value.

[0097] Corrected voltage value V corr =V raw V comp Substituting these values ​​into the Nernst equation, the final result is converted into physically meaningful ion concentration data.

[0098] To more intuitively illustrate the actual effect of the temperature-TDS joint compensation model, the following section uses a typical water quality testing scenario as an example to expand on each item and perform numerical calculations.

[0099] Test scenario settings: T=30℃, D=180ppm, total dissolved solids concentration D=180ppm, raw detection voltage output by electrochemical sensor. =10mV.

[0100] Temperature compensation:

[0101] ,

[0102] TDS term compensation (including saturation correction):

[0103] ,

[0104] Cross-coupling term compensation:

[0105] ,

[0106] Total compensation voltage:

[0107] ,

[0108] In summary, under the same test conditions, if the traditional scheme containing only linear temperature compensation (i.e. ignoring the TDS term and cross-coupling term) is adopted, the compensation voltage is only 1.0mV, which significantly enhances the measurement reliability and long-term stability of the sensor in complex water quality environments with high temperature and high salinity, verifying the effectiveness and advancement of the multi-dimensional dynamic coupling compensation mechanism proposed in this invention.

[0109] Furthermore, using a phase synchronization engine, the phase compensation amount is estimated by calculating the modal baseline ratio of the first filter channel and the second filter channel, thereby compensating for phase delay and shortening the system transient response time. The formula for calculating the phase compensation amount is as follows:

[0110] ,

[0111] in, (Hz) is the cutoff frequency, with a default value of 0.5Hz. It serves as the reference parameter for low-pass filters, used to suppress high-frequency noise and define the effective response frequency band. The modal baseline ratio between the first filter channel and the second filter channel quantifies the degree of baseline difference.

[0112] Furthermore, to eliminate transient oscillations caused by fast / slow baseline switching or sudden environmental changes, the algorithm compensation module 03 also integrates a phase synchronization engine. This engine dynamically estimates and injects the phase compensation amount Δ by calculating the modal baseline ratio between the first filter channel (fast mode) and the second filter channel (slow mode) in real time. This is to compensate for system phase delay and shorten transient response time. For example,

[0113] In scenarios where a sudden temperature rise causes abrupt changes in electrode output, assuming the fast-mode baseline voltage jumps to... The slow mode baseline still lags behind. ,but:

[0114] Calculate the phase compensation amount by substituting the values ​​into the formula:

[0115] ,

[0116] Although the calculated result is in the sub-millisecond range, this value is used to trigger an equivalent 14ms phase offset injection (that is, to compensate for a time offset that matches the system delay in advance in the subsequent signal processing chain), thereby effectively canceling transient overshoot or oscillation caused by baseline switching at the output.

[0117] Through the phase compensation mechanism described above, the system's settling time after encountering sudden disturbances is significantly reduced from approximately 120ms in the traditional scheme to less than 20ms, while simultaneously employing an appropriate dead-time control strategy (such as when | Compensation is not triggered when -1|<0.5, avoiding over-response to small fluctuations and balancing stability and energy efficiency.

[0118] Furthermore, the algorithm compensation module 03, as the core data processing engine of the system, integrates multiple complementary algorithm models to achieve high-precision and robust intelligent correction. According to some embodiments, the algorithm compensation module 03 integrates mathematical modeling methods (such as polynomial fitting and recursive least squares estimation) for fast linear compensation, filtering optimization techniques (such as improved Kalman filtering and dynamic weighted sliding window) for noise suppression and tracking of abrupt signals, and lightweight data-driven models (such as two-layer MLP neural networks) for handling nonlinear coupling effects. These models obtain initial parameters through offline training (based on standard solution experimental data) and support online learning. When calibration is triggered, the system iteratively updates the model weights using lightweight methods such as momentum gradient descent based on the current measurement error, and writes the optimized parameters back to the parameter library in real time, forming a closed-loop optimization mechanism of "perception-computation-correction-storage".

[0119] Figure 3 This diagram illustrates a system hardware architecture for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, according to an example embodiment.

[0120] See Figure 3 The algorithm compensation module 03 also undertakes the key tasks of sensor fusion and state judgment. It synchronously receives raw voltage signals from the electrochemical sensor module 01, environmental data from the temperature sensor and TDS sensor, performs weighted fusion, and introduces cross-coupling terms at the decision level to achieve dynamic joint compensation of temperature, TDS, and ion concentration. Simultaneously, this layer continuously evaluates the rationality of sensor outputs, identifies health status issues such as drift, abnormal jumps, or response hysteresis, and feeds the diagnostic results back to the MCU control center 04, providing a basis for system self-maintenance.

[0121] In terms of dynamic response, the algorithm compensation module 03 achieves adaptive signal tracking through a dual-modal baseline update mechanism. Its baseline is iterated using the recursive formula described above, where the weighting factor α can be dynamically optimized based on the signal gradient. Combined with phase compensation and an asymmetric time window strategy, it effectively shortens the response delay to sudden changes and avoids drift accumulation. The entire processing flow is scheduled and triggered by the MCU control center 04—the MCU is responsible for monitoring the signal change rate, managing human-machine interaction, receiving manual commands, and issuing calibration trigger signals, while the algorithm compensation layer focuses on performing high-density computation and model inference. The two have a clear division of labor: the MCU is the "scheduling and triggering brain," and the algorithm compensation layer is the "data computation engine," jointly supporting the system to achieve high-performance, maintenance-free intelligent correction capabilities on low-cost hardware.

[0122] According to some embodiments, the MCU control center 04 further includes an output and interaction subunit 0401, which is used to output the ion concentration data results to a user or an external system. The output and interaction subunit 0401 includes a human-machine interface, comprising: a display screen and calibration buttons on the device panel, a mobile device software client, and a cloud platform, or one or more of the following: a local display device (such as an LCD or OLED display), physical operation buttons on the device panel (including a one-click calibration button), a mobile device software client (such as an application on a smartphone or tablet) connected to the system, and a remote cloud platform interface, used to realize data visualization, user operation input, and remote monitoring functions.

[0123] According to some embodiments, the parameter library, optionally stored in the Flash memory of the MCU control center 04, is part of the algorithm compensation module 03 and is used to store calibration parameters and compensation coefficients. The system supports online learning, dynamically updating weights using the momentum gradient descent method. When manual or automatic calibration is performed, the parameter library is rewritten; for example, if the user replaces the sensor and recalibrates, the new parameters will overwrite the old values. Figure 3 In the example, the system has two key interfaces: one is the UART serial port, used to output the final ion concentration data; the other is the bond calibration interface, which is essentially a specific UART command (such as 0xCA). This command can force the start of the calibration process, immediately reset the dual EMA baseline and update the parameters, without waiting for automatic triggering conditions.

[0124] This key calibration interface is also used for production line calibration—standard parameters are written to Flash via this interface during factory shipment. Its advantages include: users can complete calibration on-site with a single click, avoiding returns to the factory; simultaneously, in extreme scenarios where automatic failure is detected (such as severe contamination), manual triggering can quickly restore system accuracy, improving overall reliability and ease of use.

[0125] According to some embodiments, the MCU control center 04 is used for the control and communication interaction of the electrochemical sensor module 01, the signal adjustment module 02, and the algorithm compensation module 03. The MCU control center 04 is configured to: receive calibration instructions from the output and interaction subunit; and send a first trigger signal to the signal adjustment module 02 and the algorithm compensation module according to the calibration instructions, causing the signal adjustment module 02 and the algorithm compensation module to perform the corresponding preprocessing and data calibration. Specifically, the MCU control center 04 also supports an external active calibration trigger mechanism: when receiving a calibration instruction from the output and interaction subunit 0401 (such as a user pressing the "calibrate" button on the device panel, sending a calibration command via a mobile app, or remotely issuing a calibration request from a cloud platform), the MCU control center 04 will also generate the first trigger signal, driving the system into a complete calibration process to ensure the long-term accuracy of the measurement results.

[0126] Optionally, according to some embodiments, automatic trigger calibration can also be achieved by configuring the MCU control center 04. Specifically, micro-gradient detection can be performed on the original detection voltage signal. If the rate of change of the original detection voltage signal of the ion concentration is greater than a second trigger threshold and / or the rate of change of the environmental parameter is greater than a third trigger threshold (e.g., |dT / dt|>0.5℃ / s or |dD / dt|>10ppm / s), then a first trigger signal is sent to the signal adjustment module 02 and the algorithm model compensation module, causing the signal adjustment module 02 and the algorithm model compensation module to perform the corresponding preprocessing and data calibration operations. Micro-gradient detection can be performed on the ion concentration data results output by the algorithm compensation module 03, and its rate of change (i.e., the amount of concentration change per unit time) can be calculated in real time. Specifically, the present invention can also achieve automatic trigger calibration function by configuring the MCU control center 04. Specifically, the MCU control center 04 performs real-time micro-gradient detection on the raw detection voltage signal from the electrochemical sensor module 01 and its corresponding ion concentration change rate, while simultaneously monitoring the rate of change of environmental parameters (such as temperature and total dissolved solids concentration). When the detected ion concentration signal change rate exceeds the second trigger threshold, and / or the ambient temperature change rate exceeds the third trigger threshold (e.g., |dT / dt|>0.5℃ / s or |dD / dt|>10ppm / s), it is determined that a significant disturbance has occurred in the current operating condition. The MCU control center 04 then generates a first trigger signal and sends it to the signal adjustment module 02 and the algorithm compensation module 03, driving them to perform corresponding signal preprocessing and data calibration operations, including dynamic weight optimization, dual-channel baseline update, temperature-TDS joint compensation, and phase compensation. This enables rapid adaptive correction to sudden environmental changes without manual intervention, effectively ensuring the accuracy of measurement results and the stability of system operation.

[0127] Figure 4 This diagram illustrates the automatic triggering process of an electrochemical sensor intelligent calibration system based on dynamic parameter coupling, according to an example embodiment.

[0128] See Figure 4 This invention employs a dual-mode calibration mechanism of "automatic triggering as the primary method and manual triggering as the secondary method" to ensure continuous high-precision operation of the system without human intervention, while retaining the user's active control capability. The MCU control center 04 includes an automatic calibration trigger to monitor the rate of change of ion concentration data or raw voltage signals from the algorithm compensation module 03 in real time. When the rate of change exceeds a preset threshold, it is determined that a sudden change in the environment has occurred (such as a sudden rise in temperature, water flow disturbance, or TDS fluctuation), and the complete calibration process is automatically initiated, including dynamic weight adjustment, dual-channel baseline update, temperature-TDS joint compensation, and phase compensation, achieving millisecond-level adaptive response.

[0129] Manual calibration supports user-initiated calibration operations through various interactive methods, including physical calibration buttons on the device panel, local commands sent via interfaces such as UART, and remote calibration commands from mobile apps or cloud platforms. These methods meet calibration needs in different scenarios, such as manual calibration using standard solutions after sensor replacement, or remote forced calibration by maintenance personnel.

[0130] In terms of execution logic, the system assigns the highest priority to manual triggering. Upon receiving a valid manual calibration command, regardless of whether automatic calibration is currently in progress, the MCU immediately interrupts the automatic process to prioritize responding to the user request, ensuring the timeliness and controllability of the operation. This design, combining automatic and manual operation, enhances the system's intelligence and long-term stability while also ensuring flexibility and reliability in practical use.

[0131] According to some embodiments, the MCU control center 04, as the intelligent hub of the system, is not only responsible for the coordinated control and data interaction of various functional modules, but also integrates a number of advanced management functions, such as a power optimization scheduler and a fault self-diagnosis module, to improve the system's intelligence level, operating efficiency, and reliability. The power optimization scheduler dynamically adjusts system resource allocation based on the current operating state. During stable operation, it reduces the sampling frequency and shuts down unnecessary peripherals; when disturbances or user requests are detected, it quickly wakes up the relevant modules and enters a high-response mode. Through task priority scheduling and low-power mode switching, it effectively reduces overall power consumption, enabling the system to operate stably on an 8-bit MCU platform and meeting the energy-saving requirements of portable or battery-powered devices. The fault self-diagnosis module continuously monitors sensor output, filter stability, communication status, and algorithm execution results. When an anomaly occurs (such as excessive voltage drift, baseline oscillation, communication timeout, or calibration failure), it automatically identifies the fault type and generates diagnostic information, supporting local alarms (such as LED flashing) or remote reporting to the cloud platform, facilitating timely handling by maintenance personnel and improving the system's long-term robustness and maintainability.

[0132] The above-mentioned functional modules work together to make the MCU control center 04 not only a simple controller, but also a "core brain" with intelligent perception, autonomous decision-making and self-maintenance capabilities, fully supporting the efficient, stable and reliable operation of this invention in practical applications.

[0133] Figure 5 The flowchart illustrates a method for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, according to an example embodiment.

[0134] Figure 6 This diagram illustrates a method for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, according to an example embodiment.

[0135] See Figure 5 as well as Figure 6 The figure illustrates a method for intelligent calibration of electrochemical sensors based on dynamic parameter coupling, aiming to address the problem of decreased measurement accuracy of traditional sensors under complex environments (such as temperature fluctuations and TDS variations) due to signal drift, noise interference, and parameter coupling. This method achieves high-precision, adaptive calibration of the original detection voltage signal by constructing a closed-loop processing architecture of "dual-channel filtering—dynamic fusion—multi-parameter joint compensation." The method includes the following steps.

[0136] In S101, the raw detection voltage signal from the electrochemical sensor used to detect ion concentration is acquired.

[0137] According to some embodiments, a real-time raw detection voltage signal V for detecting ion concentration is acquired from the electrochemical sensor module 01. rawThe signal is an analog quantity, containing target ion concentration information as well as noise and drift components introduced by factors such as temperature, TDS, and electromagnetic interference.

[0138] In S103, the original detection voltage signal is preprocessed to obtain preprocessed detection voltage data. The preprocessing includes: dual EDA filtering based on signal dynamic weight optimization and signal dynamic weight optimization. The dual EDA filtering based on signal dynamic weight optimization includes a first filtering channel and a second filtering channel.

[0139] According to some embodiments, a first filtering channel (fast mode) and a second filtering channel (slow mode) are set, and the exponential moving average (EMA) algorithm is used for filtering. The fast channel weight factor... =0.85, used for fast tracking of signal abrupt changes; slow channel weighting factor =0.6, used to suppress high-frequency noise. Further, the weighting factor is dynamically adjusted according to the instantaneous rate of change of the signal, dV / dt, to achieve adaptive filtering. The filtering results of the fast and slow channels are then weighted and averaged or fused with equal weights to obtain a stable, denoised, fused output value V. fused .

[0140] In S105, the preprocessed detection voltage data is calibrated to obtain ion concentration data. The data calibration includes phase compensation and temperature-TDS joint compensation.

[0141] According to some embodiments, the preprocessed detection voltage data is calibrated. Specifically, the fused output value V is calibrated. fused Compensation is performed, such as phase compensation and temperature-TDS joint compensation. Specifically, the phase delay is estimated using the modal baseline ratio of the first and second filter channels, and switching transient oscillations are eliminated by injecting dynamic phase offsets (e.g., 14ms), thus shortening the system response time. When an environmental parameter change is detected to exceed a threshold (e.g., |dT / dt|>0.5℃ / s or |dD / dt|>10ppm / s), the joint compensation mechanism is triggered. The compensation model is as follows:

[0142] ,

[0143] in, (Unit: mV / ℃) is the temperature compensation coefficient, with a typical value of 0.2. It is calibrated through a constant temperature bath experiment and is used to correct the potential shift of the sensor caused by temperature drift. (Unit: °C) is the standard temperature, with a default of 25 °C, corresponding to the standard environment for sensor factory calibration. (Unit: ppm) -¹) is the TDS compensation coefficient, with a typical value of 0.0025, which is obtained through segmented calibration in a salinity gradient experiment. (Unit: ppm) is the reference TDS concentration, with a default value of 150 ppm, which can be dynamically adjusted according to the actual water quality level (such as drinking water, industrial wastewater). (Unit: ppm) - ¹) is the nonlinear saturation coefficient, which defaults to 0.001 and is used to suppress overcompensation caused by nonlinear changes in electrolyte ion activity at high TDS concentrations. (Unitless) is the cross-coupling factor, which defaults to 0.001. It characterizes the coupling effect of temperature and TDS on electrode potential and is determined by fitting a large amount of measured data. is the dynamic coupling coefficient, an empirically optimized value.

[0144] like Figure 6 As shown, starting from the "original sensor voltage", the "fusion output value V" is generated through "dual-channel filtering". fused Then, based on whether the temperature / TDS changes, it determines whether to perform "joint compensation" and finally outputs the "final calibration value". This realizes full automation from signal acquisition to intelligent correction, which significantly improves the measurement accuracy and stability of electrochemical sensors in complex scenarios such as home water purification and environmental monitoring.

[0145] According to some embodiments, the technical solution of the present invention constructs a dual-mode EMA filter system (fast channel α=0.85, slow channel α=0.6) and introduces a dynamic weight optimization mechanism based on signal gradient, enabling the system to adaptively adjust the filter parameters according to the real-time voltage change rate (0~0.5mV / s). This effectively suppresses high-frequency noise and avoids response lag caused by excessive smoothing, significantly enhancing the stability and reliability of the sensor in dynamic environments.

[0146] According to some embodiments, the technical solution of the present invention innovatively proposes a temperature-TDS cross-coupling compensation model to address the measurement deviation caused by the strong coupling between temperature and TDS under high temperature and high salinity environments. This model integrates linear temperature compensation (0.2mV / ℃), TDS nonlinear saturation correction (γ=0.001), and cross-term optimization (weight factor 0.001). Compared with the traditional scheme that only uses linear temperature compensation (error up to ±1.8mV), the accuracy is improved by more than 80%, meeting the high accuracy requirements of industrial-grade water quality monitoring.

[0147] According to some embodiments, the technical solution of the present invention introduces dynamic phase compensation technology based on the fast-slow baseline ratio to accurately estimate the phase offset within the effective frequency band of 0.1 to 1 Hz. Combined with dead-zone control strategy, it effectively eliminates transient oscillations caused by filter mode switching or sudden environmental changes. The system stabilization time is shortened from 120 ms to less than 25 ms. At the same time, due to the reduction of invalid compensation operations, the overall power consumption is reduced by about 20%, making it particularly suitable for battery-powered or low-power IoT terminal devices.

[0148] According to some embodiments, the technical solution of the present invention achieves deep optimization at the algorithm level by adding an MCU control center, reducing the calibration calculation load by 60% and RAM usage to only 3.2KB (compared to approximately 8KB in traditional solutions). It successfully adapts to resource-constrained 8-bit MCU platforms (clock frequency ≥ 16MHz), significantly reducing hardware costs. Simultaneously, it supports a "one-click automatic calibration" function, allowing users to complete the entire calibration process within 5 minutes with simple operations (compared to 30 minutes of manual intervention in traditional methods), greatly simplifying the operation and maintenance process and promoting the widespread application of high-precision electrochemical sensing technology in consumer products.

[0149] In summary, this invention achieves a harmonious balance between high precision, fast response, strong robustness, and low cost through a software-defined intelligent calibration architecture, without relying on high-cost hardware and frequent physical calibration. This provides a practical technical solution for fields such as home water purification, environmental monitoring, and industrial process control.

[0150] Figure 7 A block diagram of an electronic device according to an example embodiment of this application is shown.

[0151] like Figure 7 As shown, the electronic device 30 includes a processor 12 and a memory 14. The electronic device 30 may also include a bus 22, a network interface 16, and an I / O interface 18. The processor 12, memory 14, network interface 16, and I / O interface 18 can communicate with each other via the bus 22.

[0152] Processor 12 may include one or more general-purpose CPUs (Central Processing Units), microprocessors, or application-specific integrated circuits, for executing relevant program instructions. According to some embodiments, electronic device 30 may also include a high-performance display adapter (GPU) 20 for accelerating processor 12.

[0153] Memory 14 may include a machine-readable medium in the form of volatile memory, such as random access memory (RAM), read-only memory (ROM), and / or cache memory. Memory 14 is used to store one or more programs containing instructions, as well as data. Processor 12 may read the instructions stored in memory 14 to perform the methods described above according to embodiments of this application.

[0154] Electronic device 30 can also communicate with one or more networks via network interface 16. The network interface 16 can be a wireless network interface.

[0155] Bus 22 can include address bus, data bus, control bus, etc. Bus 22 provides a path for exchanging information between components.

[0156] It should be noted that, in specific implementations, the electronic device 30 may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the device described above may include only the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0157] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), network storage devices, cloud storage devices, or any type of medium or device suitable for storing instructions and / or data.

[0158] This application also provides a computer program product including a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments.

[0159] Those skilled in the art will clearly understand that the technical solutions of this application can be implemented using software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware capable of independently performing or cooperating with other components to perform a specific function, where the hardware may be, for example, a field-programmable gate array (FPGA), integrated circuit, etc.

[0160] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0161] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0162] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.

[0163] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0164] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0165] 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 device. Based on this understanding, the technical solution of this application, 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 memory 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 of the various embodiments of this application.

[0166] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0167] The exemplary embodiments of this application have been specifically shown and described above. It should be understood that this application is not limited to the detailed structures, arrangements, or implementation methods described herein; rather, this application is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended provisions.

Claims

1. A system for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, characterized in that, The system includes: an electrochemical sensor module, a signal conditioning module, an algorithm compensation module, and an MCU control center. The electrochemical sensor module is used to detect ion concentration, obtain the original detection voltage signal, and transmit it to the signal adjustment module; The signal adjustment module is used to preprocess the original detection voltage signal and transmit the preprocessed detection voltage data to the algorithm compensation module. The algorithm compensation module calibrates the preprocessed detection voltage data using an algorithm model to obtain ion concentration data results and outputs them to the MCU control center. The MCU control center is used for the control and communication interaction of the electrochemical sensor module, the signal adjustment module, and the algorithm compensation module. The data calibration method employed by the algorithm compensation module includes phase compensation and temperature-TDS combined compensation to improve the accuracy of the ion concentration data. The signal adjustment module includes a signal conditioning unit that receives the original detection voltage signal from the electrochemical sensor module and preprocesses the original detection voltage signal to improve the signal-to-noise ratio, thereby obtaining an adjusted original detection voltage signal. The preprocessing includes dual EDA filtering based on dynamic signal weight optimization and dynamic signal weight optimization, wherein the dual EDA filtering based on dynamic signal weight optimization includes a first filtering channel and a second filtering channel. The signal conditioning unit is configured as follows: The original detection voltage signal is subjected to micro-gradient detection. If the rate of change of the original detection voltage signal is greater than the first trigger threshold, the weighting factor is optimized according to the dynamic weighting factor optimization formula to obtain the optimized weighting factor. The dynamic weighting factor optimization formula is as follows: , , in, The instantaneous rate of change of voltage is used to quantify the degree of signal abrupt change. For dynamic gain, The default value for the weight factor of the first or second filter channel. The optimized weighting factor is either the first filtering channel or the second filtering channel. α The default value of the weighting factor or the optimized weighting factor.

2. The system according to claim 1, characterized in that, The electrochemical sensor module also includes: A temperature / total dissolved solids sensor is used to collect information on the ambient temperature and total dissolved solids concentration of the electrochemical sensor, providing temperature and total dissolved solids data for subsequent calibration.

3. The system according to claim 1, characterized in that, The signal adjustment module further includes: a digital-to-analog conversion unit, wherein... The digital-to-analog conversion unit receives the adjusted original detection voltage signal from the signal conditioning unit, converts the adjusted original detection voltage signal into detection voltage data, and transmits it to the algorithm compensation module.

4. The system according to claim 1, characterized in that, The signal conditioning unit is configured as follows: The modal baselines of the first and second filtering channels of the dual EDA filter based on signal dynamic weight optimization are determined or updated according to the set initial weight factor or the optimized weight factor. The update formula for the modal baseline is as follows: , in, For the new baseline voltage, The original detection voltage, The weighting factor can be either the default value or the optimized weighting factor. This is the historical baseline voltage at the previous moment.

5. The system according to claim 1, characterized in that, The algorithm compensation module is configured as follows: A combined linear and nonlinear temperature compensation model, combined with total dissolved solids data, is used to achieve temperature-TDS joint compensation of the ion concentration data. The temperature-TDS joint compensation equation is as follows: , in, This is the temperature compensation coefficient. For reference temperature, This is the TDS compensation coefficient. For reference TDS concentration, It is a nonlinear saturation coefficient. It is the cross-coupling factor. For dynamic coupling coefficients, Baseline voltage, To compensate for voltage, To measure temperature, To measure TDS concentration.

6. The system according to claim 1, characterized in that, The MCU control center also includes an output and interaction subunit, which is used to output the ion concentration data results to the user or an external system.

7. The system according to claim 6, characterized in that, The output and interaction sub-unit includes: Human-computer interaction interface, including: a display screen and calibration buttons on the device panel, mobile device software, and cloud platform, or one or more of these.

8. The system according to claim 7, characterized in that, The MCU control center is configured as follows: The system receives a calibration command from the output and interaction subunit, and sends a first trigger signal to the signal adjustment module and the algorithm compensation module according to the calibration command, so that the signal adjustment module and the algorithm compensation module perform the corresponding preprocessing and data calibration.

9. A method for intelligent calibration of an electrochemical sensor based on dynamic parameter coupling, characterized in that, The method includes: Acquire the raw detection voltage signal from the electrochemical sensor used to detect ion concentration; The original detection voltage signal is preprocessed to obtain preprocessed detection voltage data. The preprocessing includes: dual EDA filtering based on signal dynamic weight optimization and signal dynamic weight optimization. The dual EDA filtering based on signal dynamic weight optimization includes a first filtering channel and a second filtering channel. The signal dynamic weight optimization includes performing micro-gradient detection on the original detection voltage signal. If the signal change rate of the original detection voltage signal is greater than a first trigger threshold, the weight factor is optimized according to the dynamic weighting factor optimization formula to obtain the optimized weight factor. The preprocessed detection voltage data is calibrated to obtain ion concentration data. This calibration includes phase compensation and temperature-TDS joint compensation. The optimization formula for the dynamic weighting factor is as follows: , , in, The instantaneous rate of change of voltage is used to quantify the degree of signal abrupt change. For dynamic gain, The default value for the weight factor of the first or second filter channel. The optimized weighting factor is either the first filtering channel or the second filtering channel. α The default value of the weighting factor or the optimized weighting factor.

10. An electronic device, characterized in that, include: processor; as well as A memory storing a computer program that, when executed by the processor, causes the processor to perform the method as described in claim 9.