An electrochemical sensor diagnosis method and device based on voltage fluctuation prediction

By monitoring the output voltage fluctuations of the electrochemical sensor in real time and introducing a predictive judgment mechanism, the problem of frequent pulses affecting sensor balance is solved, enabling individualized, low-interference shedding detection and improving detection stability and sensor lifespan.

CN122238751APending Publication Date: 2026-06-19HENAN HANWEI ELECTRONICS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN HANWEI ELECTRONICS
Filing Date
2026-04-01
Publication Date
2026-06-19

Smart Images

  • Figure CN122238751A_ABST
    Figure CN122238751A_ABST
Patent Text Reader

Abstract

This invention provides a diagnostic method and apparatus for electrochemical sensors based on voltage fluctuation prediction. The method includes the following steps: continuously acquiring the voltage signal of the output electrode of the electrochemical sensor and calculating the voltage fluctuation value within a unit time window; determining whether the sensor has entered a suspected shedding prediction state based on the current voltage fluctuation within the unit time window; the determination condition is: when the current voltage fluctuation within the unit time window is less than the voltage fluctuation threshold, or when the current voltage fluctuation within the unit time window is less than the historical average voltage fluctuation and lasts for L unit time windows, the sensor is determined to have entered a suspected shedding prediction state; when the sensor is in a suspected shedding prediction state, applying a diagnostic pulse to the reference electrode of the electrochemical sensor, acquiring and quantifying the dynamic voltage response of the output electrode to obtain the voltage response characteristics corresponding to the pulse; and confirming the shedding state of the sensor based on the voltage response characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrochemical sensor diagnostic technology, and more specifically, to an electrochemical sensor diagnostic method and apparatus based on voltage fluctuation prediction. Background Technology

[0002] Electrochemical sensors are widely used in gas detection, safety monitoring, and industrial process control due to their advantages such as high sensitivity, low power consumption, and good stability. To ensure long-term stable operation of the system, it is usually necessary to detect whether the sensor has become detached, open-circuited, or has abnormal connections.

[0003] In existing technologies, a common method for detecting detachment is to apply a diagnostic pulse to the reference electrode of an electrochemical sensor and then collect the dynamic voltage response of the output electrode for judgment. When the sensor is properly connected, its output electrode voltage will exhibit a characteristic waveform of drop, hold, rise, overshoot, and finally return to steady state under the action of the pulse; while when the sensor is detached or open-circuited, the output electrode voltage remains basically unchanged.

[0004] However, in the absence of an effective prediction mechanism, diagnostic pulses often need to be applied periodically or frequently to ensure detection reliability. Practice shows that frequent application of diagnostic pulses to electrochemical sensors can easily alter their internal electrochemical equilibrium conditions, interfering with the output signal baseline and causing problems such as zero-point drift, baseline shift, and even decreased sensitivity, thus affecting measurement accuracy and shortening sensor lifespan.

[0005] To address the issues of sensor condition monitoring and maintenance, existing research has attempted to introduce self-diagnostic mechanisms for faults. For example, patent CN120870287A discloses a high-sensitivity CO2 concentration detection device for the field and its self-diagnostic method. This device generates a calibration gas using an incense-burning component and compares it with pre-stored concentration calibration values ​​to determine if the detection device is faulty. While this method achieves fault identification for the sensor system, its diagnostic process relies on an external gas generator, resulting in a complex structure. Furthermore, the diagnostic threshold setting is relatively simple, making it difficult to apply to the differentiated characteristics of different individual sensors.

[0006] Furthermore, patent CN121093146A proposes a dynamic maintenance and diagnosis method for sensors. By constructing a data-driven decision model and combining reinforcement learning and knowledge graph technologies, it achieves dynamic optimization of maintenance actions and fault root cause localization. This method has advantages in reducing operation and maintenance costs and improving system reliability, but its focus is on the scheduling of macro-level maintenance strategies and fault reasoning. It does not propose a lightweight, individualized diagnostic triggering mechanism for typical electrical connection anomalies such as sensor detachment and open circuits.

[0007] Therefore, there is an urgent need for a shedding detection method that can be applied to a variety of electrochemical sensors and automatically generate individualized judgment thresholds for each sensor, while reducing the number of unnecessary diagnostic pulse triggers. To address these problems, researchers have been seeking an ideal technical solution. Summary of the Invention

[0008] Therefore, it is necessary to provide a diagnostic method and device for electrochemical sensors based on voltage fluctuation prediction to address the above-mentioned technical problems.

[0009] To achieve the above objectives, the first aspect of the present invention provides a diagnostic method for electrochemical sensors based on voltage fluctuation prediction, comprising the following steps:

[0010] Continuously acquire the voltage signal at the output electrode of the electrochemical sensor and calculate the voltage fluctuation value within a unit time window;

[0011] The sensor is determined to be in a suspected detachment prediction state based on the voltage fluctuation within the current unit time window. The determination conditions are: when the voltage fluctuation within the current unit time window is less than the voltage fluctuation threshold, or when the voltage fluctuation within the current unit time window is less than the historical average voltage fluctuation and lasts for L unit time windows, the sensor is determined to be in a suspected detachment prediction state.

[0012] When the sensor enters the suspected shedding prediction state, a diagnostic pulse is applied to the reference electrode of the electrochemical sensor, the dynamic voltage response of the output electrode is collected and quantified, and the voltage response characteristics corresponding to the pulse are obtained.

[0013] The quantification formula is:

[0014] ΔV drop =max(V pre_pulse -V min )

[0015] ΔV recover =V final - Vmin

[0016] In the formula, V pre_pulse V is the steady-state voltage before the pulse. min V is the minimum voltage during the pulse. final The steady-state voltage at the end of the pulse; ΔV drop The voltage drop, ΔV recover This is the voltage recovery amount;

[0017] The detachment status of the sensor is diagnosed based on voltage response characteristics, where ΔV drop ≥V th_drop And ΔV recover ≥V th_recoverIf the sensor is in a certain condition, it is determined that it has not detached; otherwise, it is determined that the sensor has detached. th_drop and V th_recover All are preset thresholds.

[0018] In traditional electrochemical sensor diagnostic procedures, the system often applies diagnostic pulses at fixed intervals or under fixed conditions. While simple, this approach can disrupt the internal electrochemical equilibrium of the sensor with frequent pulses, leading to baseline drift or decreased response sensitivity. To address this issue, this technical solution introduces a predictive judgment mechanism based on voltage fluctuations. The system monitors the sensor's output voltage fluctuation characteristics in real time, triggering a diagnostic pulse only when the fluctuation characteristics meet preset conditions. This mechanism essentially establishes a pre-judgment threshold, transforming pulse application from timed execution to on-demand execution. When the sensor operates stably without significant abnormal fluctuations, the system proactively avoids unnecessary pulse outputs, thereby minimizing disturbances to the electrode interface double-layer structure and electrolyte distribution, and maintaining the sensor's electrochemical stability during long-term operation.

[0019] In one possible embodiment, the steps for obtaining the voltage fluctuation threshold are as follows:

[0020] In the detached state, the voltage signal at the output electrode of the electrochemical sensor is continuously acquired, and the voltage fluctuation characteristic value in the detached state is calculated.

[0021] Under normal conditions, the voltage signal at the output electrode of the electrochemical sensor is continuously acquired, and the voltage fluctuation value within a unit time window is calculated to form a voltage fluctuation sequence.

[0022] The fluctuation energy of the voltage fluctuation sequence is accumulated and calculated using a preset sliding window to obtain the fluctuation energy value;

[0023] Based on the fluctuation energy value and the characteristic value of the voltage fluctuation in the shedding state, determine whether the current sliding window is an effective working band interval;

[0024] In response to the effective working range, the voltage signal of the output electrode of the electrochemical sensor is continuously acquired, and the voltage fluctuation value within a unit time window is calculated as the voltage fluctuation characteristic value under normal working conditions.

[0025] A voltage fluctuation threshold is constructed based on the voltage fluctuation characteristics of the shedding state and the voltage fluctuation characteristics of the normal operating state.

[0026] By extracting voltage fluctuation characteristics of the shedding state and the normal operating state respectively, and constructing an individualized fluctuation threshold between the two, the shedding determination does not depend on a fixed threshold, thus improving the adaptability to different types and individual electrochemical sensors.

[0027] In one possible embodiment, the voltage fluctuation threshold is updated based on the confirmed diagnosis result for the next suspected shedding prediction;

[0028] Among them, when the confirmed result is that the detachment has not been shed, Φ new =α·Φ+(1-α)·Δ r ;

[0029] In the formula, Φ new The updated voltage fluctuation threshold is Φ, where Φ is the voltage fluctuation threshold and α∈(0,1) is the weighting coefficient.

[0030] When the diagnosis result is detachment, the voltage fluctuation threshold is not updated.

[0031] During long-term operation, sensors inevitably experience electrode aging, film changes, environmental temperature and humidity drift, and surface contamination. These changes directly affect the fluctuation characteristics of the output voltage. If the detachment detection threshold remains fixed, its applicability will gradually decrease with prolonged use. To address this issue, this solution introduces a negative feedback adjustment mechanism based on the diagnostic results. After each confirmation of detachment or normal operation, the system uses the current actual fluctuation characteristics as feedback input to dynamically correct the individualized fluctuation threshold. This closed-loop adjustment mechanism allows the threshold to continuously update along with the sensor's state evolution, thereby maintaining the stability and accuracy of detachment detection under long-term operating conditions and avoiding performance degradation caused by sensor characteristic drift.

[0032] In one possible embodiment, a time tracking variable is introduced while calculating the voltage fluctuation value within a unit time window;

[0033] While determining whether the sensor has entered the suspected detachment prediction state based on the voltage fluctuation of the current unit time window, the time tracking variable is compared with the preset tracking time. When the time tracking variable is greater than or equal to the preset tracking time, the sensor is determined to have entered the suspected detachment prediction state.

[0034] The formula for calculating the time-tracking variable is:

[0035]

[0036] In the formula, Δt is the unit time window, Δ r The voltage fluctuation is represented in real time, and t is the current time.

[0037] It is understandable that relying solely on a single amplitude value in the predictive judgment mechanism of electrochemical sensors is insufficient to overcome inherent deficiencies in reliability, anti-interference capability, and dynamic adaptability. This embodiment employs a judgment method that arbitrarily satisfies preset conditions for both time and amplitude. It is understood that, in terms of response speed, the single-choice logic can achieve the fastest anomaly identification. For applications highly sensitive to response delays, such as medical monitoring, industrial safety, or real-time control, timely detection of sensor detachment is crucial. When the voltage fluctuation amplitude instantaneously exceeds a preset threshold, the system can immediately trigger a diagnostic pulse without waiting for verification of time conditions, compressing the response delay to within a single sampling period. This design ensures that any sudden detachment event can be detected immediately, effectively avoiding potential safety risks or missing critical data due to accumulated waiting time.

[0038] However, amplitude conditions excel at capturing sudden, large-amplitude abrupt anomalies, such as the output being pulled to power rail saturation the instantaneously after a physical detachment; while time conditions are better at identifying gradual, small-amplitude evolutionary anomalies, such as gradually increasing contact resistance, slow drift in interface characteristics, or poor contact in sensor components. These two types of anomalies rarely coexist significantly—large-amplitude abrupt changes may be extremely short-lived, failing to meet time accumulation requirements; while gradual evolution may never exceed the amplitude threshold. Employing a selective mechanism ensures accurate identification of the anomaly regardless of its form, fundamentally eliminating blind spots.

[0039] To achieve the above objectives, a second aspect of the present invention provides an electrochemical sensor diagnostic device based on voltage fluctuation prediction, comprising:

[0040] The real-time acquisition module is used to continuously acquire the voltage signal at the output electrode of the electrochemical sensor and calculate the voltage fluctuation value within a unit time window.

[0041] The suspected detachment prediction module is used to determine whether the sensor has entered the suspected detachment prediction state based on the voltage fluctuation of the current unit time window. The determination conditions are: when the voltage fluctuation of the current unit time window is less than the voltage fluctuation threshold, or when the voltage fluctuation of the current unit time window is less than the historical average voltage fluctuation and lasts for L unit time windows, the sensor is determined to have entered the suspected detachment prediction state.

[0042] The detachment diagnosis module is used to apply a diagnostic pulse to the reference electrode of the electrochemical sensor when the sensor enters a suspected detachment prediction state, acquire and quantify the dynamic voltage response of the output electrode, and obtain the voltage response characteristics corresponding to the pulse; the quantization formula is:

[0043] ΔV drop =max(V pre_pulse -V min )

[0044] ΔVrecover =V final - Vmin

[0045] In the formula, V pre_pulse V is the steady-state voltage before the pulse. min V is the minimum voltage during the pulse. final The steady-state voltage at the end of the pulse; ΔV drop The voltage drop, ΔV recover This is the voltage recovery amount;

[0046] Furthermore, the detachment status of the sensor is diagnosed based on voltage response characteristics, where ΔV drop ≥V th_drop And ΔV recover ≥V th_recover If the sensor is in a certain condition, it is determined that it has not detached; otherwise, it is determined that the sensor has detached. th_drop and V th_recover All are preset thresholds.

[0047] To achieve the above objectives, a third aspect of the present invention provides a computer device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor is used to execute the program stored in the memory to implement the steps of the electrochemical sensor diagnostic method based on voltage fluctuation prediction as described in the first aspect.

[0048] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of an electrochemical sensor diagnostic method based on voltage fluctuation prediction as described in the first aspect.

[0049] To achieve the above objectives, a fifth aspect of the present invention provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of an electrochemical sensor diagnostic method based on voltage fluctuation prediction as described in the first aspect.

[0050] The beneficial effects of this invention are as follows:

[0051] 1. By introducing a voltage fluctuation-based prediction and judgment mechanism before pulse diagnosis, the diagnostic pulse is triggered only when the fluctuation and time conditions are met, which effectively reduces the number of unnecessary pulse applications and reduces the disturbance to the internal electrochemical balance of the electrochemical sensor.

[0052] 2. By introducing a negative feedback adjustment mechanism based on the diagnostic results, the fluctuation threshold is adaptively updated, allowing the threshold to dynamically adjust with sensor aging, environmental changes, and changes in operating conditions, thereby improving the stability and accuracy of detachment detection under long-term operating conditions. Furthermore, the introduction of feedback adjustment to the judgment threshold can form a closed-loop control process of prediction, diagnosis, and feedback update, thus reducing the trigger frequency of diagnostic pulses and minimizing interference with sensor baseline stability while ensuring the reliability of detachment detection.

[0053] 3. The prediction and judgment stage is based solely on the statistical fluctuation characteristics of the output voltage, without the need for additional hardware or complex models, thus reducing system implementation costs and improving engineering feasibility.

[0054] 4. By forming a closed-loop control logic through prediction, diagnosis, and feedback adjustment, the reliability of shedding detection is ensured while significantly reducing interference with the sensor baseline, which helps extend the service life of the electrochemical sensor and is suitable for long-term online monitoring applications. Attached Figure Description

[0055] Figure 1 This is a flowchart of the electrochemical sensor diagnostic method based on voltage fluctuation prediction as described in Embodiment 1 of the present invention;

[0056] Figure 2 This is a flowchart of the electrochemical sensor diagnostic method based on voltage fluctuation prediction as described in Embodiment 2 of the present invention;

[0057] Figure 3 This is a schematic block diagram of the electrochemical sensor diagnostic device of the present invention;

[0058] Figure 4 This is a schematic diagram of the structure of the computer device of the present invention. Detailed Implementation

[0059] This method continuously monitors the voltage fluctuation characteristics of the output electrode of the electrochemical sensor and introduces a prediction and judgment mechanism based on the synergy of fluctuation and time. The diagnostic pulse is triggered only when the synergy of fluctuation and time is met, which effectively reduces the number of unnecessary pulse applications and reduces the disturbance to the internal electrochemical balance of the electrochemical sensor.

[0060] The technical solution of the present invention will be further described in detail below through specific embodiments.

[0061] Example 1

[0062] This embodiment provides a diagnostic method for electrochemical sensors based on voltage fluctuation prediction, such as... Figure 1 As shown, it includes the following steps:

[0063] Step S1, Calculation of voltage fluctuation.

[0064] The specific steps are as follows:

[0065] Continuously acquire the voltage signal at the output electrode of the electrochemical sensor and calculate the voltage fluctuation value Δ within a unit time window. r .

[0066] Specifically, the sampling unit for the voltage signal is millivolts (mV), and the voltage fluctuation value is calculated using the following unified formula:

[0067]

[0068] Among them, V j The j-th sampled output voltage value (mV) within a unit time window;

[0069] The average voltage value within the unit time window;

[0070] n is the number of sampling points within a unit time window.

[0071] Step S2, prediction based on voltage fluctuations.

[0072] The specific steps are as follows: determine whether the sensor has entered the suspected detachment prediction state based on the voltage fluctuation within the current unit time window.

[0073] Specifically, the historical average voltage fluctuation Δ is defined. avg It is based on Δ r Calculations are performed within the same unit time window.

[0074] The determination condition is: the voltage fluctuation Δ within the current unit time window. r Less than the voltage fluctuation threshold Ф, or the voltage fluctuation Δ within the current unit time window r Less than the historical average voltage fluctuation Δ avg Furthermore, if the sensor remains in a state of suspected detachment prediction for a period of L unit time windows, it is determined that the sensor has entered such a state.

[0075] Step S3, diagnosis of detachment.

[0076] Specifically, when the sensor enters the suspected shedding prediction state, a diagnostic pulse is applied to the reference electrode of the electrochemical sensor, the dynamic voltage response of the output electrode is collected and quantified, and the voltage response characteristics corresponding to the pulse are obtained.

[0077] The quantification formula is:

[0078] ΔV drop =max(V pre_pulse -V min )

[0079] ΔV recover =Vfinal - Vmin

[0080] In the formula, V pre_pulse V is the steady-state voltage before the pulse. min V is the minimum voltage during the pulse. final The steady-state voltage at the end of the pulse; ΔV drop The voltage drop, ΔV recover This is the voltage recovery amount;

[0081] The detachment status of the sensor is diagnosed based on voltage response characteristics, where ΔV drop ≥V th_drop And ΔV recover ≥V th_recover If the sensor is in a certain condition, it is determined that it has not detached; otherwise, it is determined that the sensor has detached. th_drop and V th_recover All are preset thresholds.

[0082] In traditional electrochemical sensor diagnostic procedures, the system often applies diagnostic pulses at fixed intervals or under fixed conditions. While simple, this approach can disrupt the internal electrochemical equilibrium of the sensor with frequent pulses, leading to baseline drift or decreased response sensitivity. To address this issue, this technical solution introduces a predictive judgment mechanism based on voltage fluctuations. The system monitors the sensor's output voltage fluctuation characteristics in real time, triggering a diagnostic pulse only when the fluctuation characteristics meet preset time-amplitude coordination conditions. This mechanism essentially establishes a pre-judgment threshold, transforming pulse application from timed execution to on-demand execution. When the sensor operates stably without significant abnormal fluctuations, the system proactively avoids unnecessary pulse outputs, thereby minimizing disturbances to the electrode interface double-layer structure and electrolyte distribution, and maintaining the sensor's electrochemical stability during long-term operation.

[0083] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0084] Example 2

[0085] The difference between this embodiment and Embodiment 1 is that, Figure 2 The steps for obtaining the voltage fluctuation threshold are shown in the figure.

[0086] Specifically, the steps for obtaining the voltage fluctuation threshold are as follows:

[0087] Step 01: Under the detachment state, continuously acquire the voltage signal at the output electrode of the electrochemical sensor and calculate the voltage fluctuation characteristic value V under the detachment state. d .

[0088] Specifically, the sampling unit for the voltage signal is millivolts (mV), and the voltage fluctuation characteristic value is calculated using the following unified formula:

[0089]

[0090] Among them, V j The j-th sampled output voltage value (mV) within a unit time window;

[0091] The average voltage value within the unit time window;

[0092] n is the number of sampling points within a unit time window.

[0093] In an electrochemical sensor measurement system, the electrical connection between the sensor and the detection circuit directly affects the output signal characteristics. When the sensor is working normally, a stable electrochemical circuit is formed between the output electrode and the reference electrode, the detection circuit is in a closed-loop state, and the output voltage dynamically changes with the concentration of the analyte, exhibiting fluctuations of a certain amplitude. However, when the sensor experiences physical detachment (e.g., the electrode separates from the skin or solution) or electrical open circuit (e.g., broken wires or poor contact), the electrochemical circuit is interrupted, and the input terminal of the detection circuit is left floating or exhibits extremely high impedance. At this time, the amplifier is in an open-loop state, and its output is rapidly driven to the limit of the power supply voltage (usually the upper limit of the positive power supply voltage or the lower limit of the negative power supply voltage, depending on the circuit topology and bias design) under the action of the open-loop gain. The output voltage is clamped near the power rail. Therefore, in this detachment state, sampling the output voltage and calculating the voltage fluctuation value according to the aforementioned unified formula yields the characteristic value V of the voltage fluctuation in the detachment state. d .

[0094] The engineering significance of this eigenvalue is reflected in the following aspects: First, it provides a quantitative basis for detachment detection based on measured fluctuations, avoiding misjudgments that may result from relying solely on amplitude thresholds (e.g., the normal signal amplitude is low during low-concentration detection). Second, as a characteristic quantity determined by the actual circuit state, it can naturally adapt to different hardware platforms, different amplifier parameters, and different environmental noise levels, laying a data foundation for constructing individualized detachment judgment thresholds. Finally, during system operation, it can be updated through periodic or event-triggered self-testing, enabling it to track changes in circuit characteristics with factors such as temperature and aging, thereby maintaining the long-term reliability of detachment detection.

[0095] Step S02: Under normal conditions, continuously collect the voltage signal of the output electrode of the electrochemical sensor and calculate the voltage fluctuation value within a unit time window to form a voltage fluctuation sequence.

[0096] Specifically, when the electrochemical sensor is properly installed and gradually enters the working state, its output voltage changes from an approximately constant value in the detached state to a fluctuating state caused by electrochemical reactions, changes in the measured medium, and environmental disturbances. In this process, the sensor output voltage is first continuously sampled based on the unified formula described in step S1, and the voltage fluctuation value ΔV is calculated within a continuous time window to form a voltage fluctuation sequence {ΔV}.

[0097] The fluctuation energy of the voltage fluctuation sequence is accumulated by performing a preset sliding window calculation to obtain the fluctuation energy value.

[0098] The calculation formula is as follows:

[0099]

[0100] Where, Δ i Let W be the voltage fluctuation value at time i; W be the preset sliding window length; E t This represents the fluctuation energy value.

[0101] Based on the fluctuation energy value and the characteristic value of the voltage fluctuation in the shedding state, determine whether the current sliding window is an effective working band interval;

[0102] The specific steps are as follows: The fluctuation energy value E... t With the characteristic value V of voltage fluctuation in the shedding state d If the following conditions are met, the current sliding window is determined to be a valid working band interval.

[0103] The specific conditions are as follows:

[0104]

[0105] In the formula, k1∈(0,1) is a preset amplification factor, used to characterize the significant increase in the current wave energy relative to the wave characteristic value of the shedding state; E t V represents the fluctuation energy value. d c1 represents the characteristic value of voltage fluctuation in the shedding state; c1 represents the basic fluctuation energy threshold, which is used to provide a basic lower limit for judging fluctuation energy when the characteristic value of voltage fluctuation in the shedding state is close to zero or at a minimum value, thus avoiding the degradation of the judgment condition.

[0106] In response to the effective operating range, the voltage signal at the output electrode of the electrochemical sensor is continuously acquired, and the voltage fluctuation value within a unit time window is calculated as the voltage fluctuation characteristic value V under normal operating conditions. a .

[0107] In some embodiments, the voltage fluctuation values ​​ΔV within multiple consecutive unit time windows can be statistically analyzed, and the voltage fluctuation characteristic value V under normal operating conditions can be obtained based on the average value of multiple voltage fluctuation values ​​ΔV. a .

[0108] Step S03: Construct a voltage fluctuation threshold based on the voltage fluctuation characteristic values ​​of the shedding state and the voltage fluctuation characteristic values ​​of the normal operating state.

[0109] In some embodiments, the voltage fluctuation threshold is obtained by performing nonlinear difference fitting between the voltage fluctuation characteristic values ​​under the detachment state and the voltage fluctuation characteristic values ​​under the normal operating state; the specific calculation formula is as follows:

[0110]

[0111] In the formula, k2∈(0,1) is the proportionality coefficient, p is the nonlinear modulation index, and p≥1; c2 is the compensation term, which is used to correct the effects of system noise, environmental disturbances or circuit bias.

[0112] By configuring the above parameters, the fluctuation threshold Φ is always located at V. d With V a This allows for the formation of adaptive judgment thresholds that address the individual differences between different sensors.

[0113] In one embodiment, after confirming the detachment status of the sensor based on the voltage response characteristics, the voltage fluctuation threshold can be updated according to the confirmation result for the next suspected detachment prediction.

[0114] Among them, when the confirmed result is that the detachment has not been shed, Φ new =α·Φ+(1-α)·Δ r ;

[0115] In the formula, Φ newThe updated voltage fluctuation threshold is Φ, where Φ is the voltage fluctuation threshold and α∈(0,1) is the weighting coefficient.

[0116] When the diagnosis result is detachment, the voltage fluctuation threshold is not updated.

[0117] Example 3

[0118] The difference between this embodiment and Embodiment 2 is that it provides a prediction method based on voltage fluctuation and time coordination.

[0119] The specific steps are as follows:

[0120] While calculating the voltage fluctuation value within a unit time window, a time tracking variable τ is also introduced;

[0121] While determining whether the sensor has entered the suspected detachment prediction state based on the voltage fluctuation of the current unit time window, the time tracking variable τ is compared with the preset tracking time. When the time tracking variable is greater than or equal to the preset tracking time, the sensor is determined to have entered the suspected detachment prediction state.

[0122] The formula for calculating the time-tracking variable τ is:

[0123]

[0124] In the formula, Δt is the unit time window, Δ r The voltage fluctuation is represented in real time, and t is the current time.

[0125] It is understandable that in this method, the sensor is determined to enter a suspected detachment prediction state when any of the following conditions are met:

[0126] 1.Δ r <Ф;

[0127] 2.Δ r <Δ r And it lasts for L unit time windows;

[0128] 3. τ≥τ max Where M is the historical window length, L is the number of consecutive low-fluctuation windows, and τ max This is the time threshold.

[0129] It is understandable that, based on Δ r的Amplitude-based conditions excel at capturing sudden, large-amplitude abrupt anomalies, such as the output being pulled to power rail saturation the instantaneously after a physical detachment. Time-based conditions, on the other hand, are better at identifying gradual, small-amplitude evolutionary anomalies, such as gradually increasing contact resistance, slow drift in interface characteristics, or poor contact in sensor components. These two types of anomalies rarely coexist significantly—large-amplitude abrupt changes may be extremely short-lived, failing to meet time accumulation requirements; while gradual evolution may never exceed the amplitude threshold. Employing a selective mechanism ensures accurate identification of the anomaly regardless of its form, fundamentally eliminating blind spots.

[0130] Example 4

[0131] This embodiment applies the diagnostic method described in Example 3 to an electrochemical sensor detection system with an output voltage range of 0–3300mV.

[0132] The specific steps are as follows:

[0133] (1) Characteristic value of voltage fluctuation in the shedding state V d Acquisition

[0134] When the sensor is not installed or is physically detached or electrically open-circuited, the detection circuit is in an open-loop state, and the output voltage is stabilized in the high-level range close to the upper limit of the power supply under the action of the amplifier.

[0135] At this point, the output voltage is continuously sampled within a unit time window, with n=50 sampling points, and the voltage fluctuation value Δ is calculated. The unified formula for calculating voltage fluctuation is as follows: .

[0136] Multi-window statistics show that the voltage fluctuation value Δ under the shedding state is concentrated in the range of 0.02–0.04 mV. Based on this, the characteristic value V of the voltage fluctuation under the shedding state is determined. d Less than 0.05mV.

[0137] (2) Voltage fluctuation characteristic value V under normal operating conditions a Acquisition

[0138] Once the sensor is correctly installed and powered on, as the electrochemical reaction is established, the output voltage gradually changes from an approximately constant value in the shedding state to a working fluctuation state with random disturbance characteristics.

[0139] During this process, the system continuously samples the output voltage and calculates the voltage fluctuation value ΔV within a continuous time window, forming a voltage fluctuation sequence {ΔV}.

[0140] With a sliding window length W=10, the fluctuation energy of the voltage fluctuation sequence is accumulated to obtain the fluctuation energy value E at the corresponding time. t .

[0141] When detected When k1 is 5 and c1 is 0.1, it is determined that the sensor has broken free from the detachment state and entered the effective working fluctuation range.

[0142] Subsequently, the voltage fluctuation values ​​within multiple unit time windows were statistically analyzed within this interval to obtain the voltage fluctuation characteristic value V under normal operating conditions. a Actual V a It is concentrated in the range of 1.8–3.0 mV, and V a Greater than 1.5mV.

[0143] (3) Construction of individualized fluctuation threshold Φ

[0144] Based on the V obtained above d With V a According to the formula An individualized voltage fluctuation threshold Φ is constructed. Specifically, the proportional coefficient k2 = 0.5, the nonlinear modulation index p = 1, and the compensation term c2 = 0 are taken, and the corresponding calculations are obtained:

[0145]

[0146] The resulting fluctuation threshold Φ is located in the range of 0.5–1.5mV. For example, in this embodiment, the threshold Φ is about 1.0mV, which is used to distinguish between the detachment state and the normal operation state of the sensor.

[0147] (4) Predictive judgment and pulse diagnosis process

[0148] During operation, the system calculates the voltage fluctuation value Δ within the current unit time window in real time. r And simultaneously update the historical average voltage fluctuation Δ avg And the time-tracking variable τ.

[0149] When Δ is detected r The fluctuation value is less than the fluctuation threshold Φ, and this state lasts for L = 3 unit time windows, or τ reaches the preset time threshold τ. max When the sensor enters a suspected detachment prediction state, the system determines that the sensor has entered a pulse diagnosis process in step S6.

[0150] During the diagnostic process, a diagnostic pulse is applied to the sensor reference electrode, and the dynamic voltage response V at the output electrode is acquired. resp (t), and extract the voltage drop V. drop and recovery amount ΔV recover If ΔV drop With ΔV recover If all preset threshold conditions are met, the sensor is confirmed to be intact; otherwise, the sensor is determined to have detached.

[0151] (5) Feedback adjustment and threshold adaptive update

[0152] When the pulse diagnosis result is "not detached," the system updates the fluctuation threshold Φ using negative feedback adjustment according to step S7:

[0153] Φ new =α·Φ+(1-α)·Δ r

[0154] The threshold is set to 0.8 to gradually match the actual fluctuation characteristics of the sensor during long-term operation; when the diagnosis result is detachment, the original threshold remains unchanged.

[0155] Through the closed-loop execution of the above-mentioned prediction, diagnosis, and feedback adjustment, low-interference and high-reliability detection of the detachment state of electrochemical sensors is achieved.

[0156] Example 5

[0157] Based on the same inventive concept, this application also provides a voltage fluctuation prediction-based electrochemical sensor diagnostic device for implementing the voltage fluctuation prediction-based electrochemical sensor diagnostic method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the voltage fluctuation prediction-based electrochemical sensor diagnostic device provided below can be found in the limitations of the voltage fluctuation prediction-based electrochemical sensor diagnostic method described above, and will not be repeated here.

[0158] Specifically, such as Figure 3 As shown, the electrochemical sensor diagnostic device based on voltage fluctuation prediction includes:

[0159] The real-time acquisition module is used to continuously acquire the voltage signal at the output electrode of the electrochemical sensor and calculate the voltage fluctuation value within a unit time window.

[0160] The suspected detachment prediction module is used to determine whether the sensor has entered the suspected detachment prediction state based on the voltage fluctuation of the current unit time window. The determination conditions are: when the voltage fluctuation of the current unit time window is less than the voltage fluctuation threshold, or when the voltage fluctuation of the current unit time window is less than the historical average voltage fluctuation and lasts for L unit time windows, the sensor is determined to have entered the suspected detachment prediction state.

[0161] The detachment diagnosis module is used to apply a diagnostic pulse to the reference electrode of the electrochemical sensor when the sensor enters a suspected detachment prediction state, acquire and quantify the dynamic voltage response of the output electrode, and obtain the voltage response characteristics corresponding to the pulse; the quantization formula is:

[0162] ΔV drop=max(V pre_pulse -V min )

[0163] ΔV recover =V final - Vmin

[0164] In the formula, V pre_pulse V is the steady-state voltage before the pulse. min V is the minimum voltage during the pulse. final The steady-state voltage at the end of the pulse; ΔV drop The voltage drop, ΔV recover This is the voltage recovery amount;

[0165] Furthermore, the detachment status of the sensor is diagnosed based on voltage response characteristics, where ΔV drop ≥V th_drop And ΔV recover ≥V th_recover If the sensor is in a certain condition, it is determined that it has not detached; otherwise, it is determined that the sensor has detached. th_drop and V th_recover All are preset thresholds.

[0166] Furthermore, the electrochemical sensor diagnostic device also includes:

[0167] The first calculation module is used to continuously acquire the voltage signal of the output electrode of the electrochemical sensor in the detachment state and calculate the voltage fluctuation characteristic value in the detachment state.

[0168] The second calculation module is used to continuously acquire the voltage signal of the output electrode of the electrochemical sensor under normal conditions, and calculate the voltage fluctuation value within a unit time window to form a voltage fluctuation sequence.

[0169] The effective working band interval determination module is used to perform cumulative calculation of the fluctuation energy of the voltage fluctuation sequence within a preset sliding window to obtain the fluctuation energy value; and to determine whether the current sliding window is an effective working band interval based on the fluctuation energy value and the voltage fluctuation characteristic value of the shedding state.

[0170] The voltage fluctuation threshold setting module is used to continuously acquire the voltage signal of the output electrode of the electrochemical sensor in response to the effective working range, calculate the voltage fluctuation value within a unit time window as the voltage fluctuation characteristic value under normal working conditions, and construct the voltage fluctuation threshold based on the voltage fluctuation characteristic value under the shedding state and the voltage fluctuation characteristic value under normal working conditions.

[0171] Example 6

[0172] Based on the above embodiments, this embodiment provides a computer device, such as... Figure 4As shown, it includes a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory communicate with each other through the communication bus. The memory is used to store computer programs. When the processor executes the program stored in the memory, it implements the steps of an electrochemical sensor diagnostic method based on voltage fluctuation prediction as described in Example 1, 2, or 3.

[0173] Example 7

[0174] Based on the above embodiments, this embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of an electrochemical sensor diagnostic method based on voltage fluctuation prediction as described in Embodiment 1, 2, or 3.

[0175] Example 8

[0176] Based on the above embodiments, this embodiment provides a computer program product, including a computer program that, when executed by a processor, implements the steps of an electrochemical sensor diagnostic method based on voltage fluctuation prediction as described in Embodiment 1, 2, or 3.

[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of the present invention or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of the present invention, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in the present invention.

Claims

1. A diagnostic method for electrochemical sensors based on voltage fluctuation prediction, characterized in that, Includes the following steps: Continuously acquire the voltage signal at the output electrode of the electrochemical sensor and calculate the voltage fluctuation value within a unit time window; The sensor is determined to be in a suspected detachment prediction state based on the voltage fluctuation within the current unit time window. The determination conditions are: when the voltage fluctuation within the current unit time window is less than the voltage fluctuation threshold, or when the voltage fluctuation within the current unit time window is less than the historical average voltage fluctuation and lasts for L unit time windows, the sensor is determined to be in a suspected detachment prediction state. When the sensor enters the suspected shedding prediction state, a diagnostic pulse is applied to the reference electrode of the electrochemical sensor, the dynamic voltage response of the output electrode is collected and quantified, and the voltage response characteristics corresponding to the pulse are obtained. The quantification formula is: ΔV drop =max(V pre_pulse -V min ) ΔV recover =V final - Vmin In the formula, V pre_pulse V is the steady-state voltage before the pulse. min V is the minimum voltage during the pulse. final The steady-state voltage at the end of the pulse; ΔV drop The voltage drop, ΔV recover This is the voltage recovery amount; The detachment status of the sensor is diagnosed based on voltage response characteristics, where ΔV drop ≥V th_drop And ΔV recover ≥V th_recover If the sensor is in a certain condition, it is determined that it has not detached; otherwise, it is determined that the sensor has detached. th_drop and V th_recover All are preset thresholds.

2. The electrochemical sensor diagnostic method based on voltage fluctuation prediction according to claim 1, characterized in that, The steps for obtaining the voltage fluctuation threshold are as follows: In the detached state, the voltage signal at the output electrode of the electrochemical sensor is continuously acquired, and the voltage fluctuation characteristic value in the detached state is calculated. Under normal conditions, the voltage signal at the output electrode of the electrochemical sensor is continuously acquired, and the voltage fluctuation value within a unit time window is calculated to form a voltage fluctuation sequence. The fluctuation energy of the voltage fluctuation sequence is accumulated and calculated using a preset sliding window to obtain the fluctuation energy value; Based on the fluctuation energy value and the characteristic value of the voltage fluctuation in the shedding state, determine whether the current sliding window is an effective working band interval; In response to the effective working range, the voltage signal of the output electrode of the electrochemical sensor is continuously acquired, and the voltage fluctuation value within a unit time window is calculated as the voltage fluctuation characteristic value under normal working conditions. A voltage fluctuation threshold is constructed based on the voltage fluctuation characteristics of the shedding state and the voltage fluctuation characteristics of the normal operating state.

3. The electrochemical sensor diagnostic method based on voltage fluctuation prediction according to claim 2, characterized in that, Based on the voltage fluctuation characteristic values ​​of the shedding state and the normal operating state, a voltage fluctuation threshold is constructed, including: The voltage fluctuation threshold is obtained by nonlinearly fitting the voltage fluctuation characteristic values ​​under detachment and normal operation conditions; the calculation formula is as follows: In the formula, k2∈(0,1) is the proportionality coefficient, p is the nonlinear modulation index, and p≥1; c2 is the compensation term, which is used to correct the effects of system noise, environmental disturbances or circuit bias.

4. The electrochemical sensor diagnostic method based on voltage fluctuation prediction according to claim 3, characterized in that, After confirming the sensor's detachment status based on voltage response characteristics, the voltage fluctuation threshold can be updated according to the confirmation results for the next suspected detachment prediction. Among them, when the confirmed result is that the detachment has not been shed, Φ new =α·Φ+(1-α)·Δ r ; In the formula, Φ new The updated voltage fluctuation threshold is Φ, where Φ is the voltage fluctuation threshold and α∈(0,1) is the weighting coefficient. When the diagnosis result is detachment, the voltage fluctuation threshold is not updated.

5. A diagnostic method for electrochemical sensors based on voltage fluctuation prediction according to any one of claims 2-4, characterized in that, Determining whether the current sliding window is an effective working band interval based on the fluctuation energy value and the characteristic value of the voltage fluctuation in the shedding state includes: In the formula, k1∈(0,1) is a preset amplification factor, used to characterize the significant increase in the current wave energy relative to the wave characteristic value of the shedding state; E t V represents the fluctuation energy value. d c1 represents the characteristic value of voltage fluctuation in the shedding state; c1 represents the basic fluctuation energy threshold, which is used to provide a basic lower limit for judging fluctuation energy when the characteristic value of voltage fluctuation in the shedding state is close to zero or at a minimum value, thus avoiding the degradation of the judgment condition.

6. The electrochemical sensor diagnostic method based on voltage fluctuation prediction according to claim 1, characterized in that: While calculating the voltage fluctuation value within a unit time window, a time tracking variable is also introduced; While determining whether the sensor has entered the suspected detachment prediction state based on the voltage fluctuation of the current unit time window, the time tracking variable is compared with the preset tracking time. When the time tracking variable is greater than or equal to the preset tracking time, the sensor is determined to have entered the suspected detachment prediction state. The formula for calculating the time-tracking variable is: In the formula, Δt is the unit time window, Δ r The voltage fluctuation is represented in real time, and t is the current time.

7. An electrochemical sensor diagnostic device based on voltage fluctuation prediction, characterized in that, include: The real-time acquisition module is used to continuously acquire the voltage signal at the output electrode of the electrochemical sensor and calculate the voltage fluctuation value within a unit time window. The suspected detachment prediction module is used to determine whether the sensor has entered the suspected detachment prediction state based on the voltage fluctuation of the current unit time window. The determination conditions are: when the voltage fluctuation of the current unit time window is less than the voltage fluctuation threshold, or when the voltage fluctuation of the current unit time window is less than the historical average voltage fluctuation and lasts for L unit time windows, the sensor is determined to have entered the suspected detachment prediction state. The detachment diagnosis module is used to apply a diagnostic pulse to the reference electrode of the electrochemical sensor when the sensor enters a suspected detachment prediction state, acquire and quantize the dynamic voltage response of the output electrode, and obtain the voltage response characteristics corresponding to the pulse; quantization The formula is: ΔV drop =max(V pre_pulse -V min ) ΔV recover =V final - Vmin In the formula, V pre_pulse V is the steady-state voltage before the pulse. min V is the minimum voltage during the pulse. final The steady-state voltage at the end of the pulse; ΔV drop The voltage drop, ΔV recover This is the voltage recovery amount; Furthermore, the detachment status of the sensor is diagnosed based on voltage response characteristics, where ∆V drop ≥V th_drop And ΔV recover ≥V th_recover If the sensor is in a certain condition, it is determined that it has not detached; otherwise, it is determined that the sensor has detached. th_drop and V th_recover All are preset thresholds.

8. A computer device, characterized in that: It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in a memory, it implements the steps of an electrochemical sensor diagnostic method based on voltage fluctuation prediction as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the electrochemical sensor diagnostic method based on voltage fluctuation prediction as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of any one of claims 1 to 6 for the diagnostic method of an electrochemical sensor based on voltage fluctuation prediction.