Biological electrical signal polarity optimization method based on bidirectional current excitation and related equipment
Patent Information
- Application Number
- CN202611356933.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-09-29
AI Technical Summary
[0006]本申请实施例公开了一种基于双向电流激励的生物电信号极性优化方法及相关设备,可以解决电子设备在长期佩戴运行过程中面临的稳态极化攀升出现脱落误报的问题
[0018]本申请实施例提供的基于双向电流激励的生物电信号极性优化方法及相关设备,该方法根据至少两种测试电流确定第一电流方向;获取在第一电流方向下的偏置电压;在偏置电压大于预设的电压阈值的情况下,记录预设时间内偏置电压大于电压阈值的次数;在次数大于或等于预设次数的情况下,获取当前电子设备运行时的第一电压;获取电子设备运行在第二电流方向下的第二电压;基于第一电压和第二电压确定评估参数;以及根据所述评估参数执行预设操作。通过上述基于双向电流激励的生物电信号极性优化方法,可以在不增加额外硬件成本的前提下,避免脱落误报,并且可以提升电子设备运行的稳定性。
Smart Images

Figure CN122836631A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a method and related equipment for optimizing the polarity of bioelectric signals based on bidirectional current excitation. Background Technology
[0002] When electronic devices collect bioelectrical signals such as electroencephalograms, electrocardiograms, and electromyograms, the weak physiological electrical signals (microvolts to millivolts) on the skin surface are easily interfered with by power frequency and motion artifacts. Therefore, electronic devices need to ensure good lead-on contact between their electrodes and the skin to ensure the quality of physiological data acquisition.
[0003] To detect electrode lead-off in real time, a weak DC bias excitation current can be injected into the electrodes of electronic devices, and the DC bias voltage (DC offset) at their analog front-end input can be continuously monitored. However, since the electrode-skin contact surface forms an electrochemical "electrical double layer" similar to battery charging, when a unidirectional DC excitation current is continuously applied to the electronic device, electrochemical polarization is triggered at the electrode-skin interface, causing the DC bias voltage to accumulate and rise continuously.
[0004] This polarization phenomenon poses two major risks to the internal circuitry of electronic devices: First, if the accumulated DC bias voltage exceeds the threshold of the device's built-in hardware comparator, it will trigger a false lead-off alarm; second, if the bias is too high, causing the preamplifier or analog-to-digital converter to reach saturation, it will directly cause severe distortion and truncation of the bioelectrical signal.
[0005] To address the aforementioned issues, existing electronic devices typically employ two traditional strategies: one relies on additional hardware depolarization circuits or MOSFET switches for short-circuit discharge; the other requires users to wait a considerable amount of time after wearing the device to allow the electrode potentials to stabilize on their own. However, the former significantly increases the chip area and hardware cost within the electronic device, introducing additional leakage current and high-frequency noise, affecting the device's signal-to-noise ratio; the latter results in a very slow startup response, greatly impacting the user experience, and fails to resolve the issue of false alarms due to steady-state polarization rise during long-term wear. Therefore, there is an urgent need for a closed-loop adaptive control scheme that can be autonomously executed by the electronic device without additional hardware costs, enabling seamless and rapid dynamic polarity optimization and false alarm rollback through software logic. Summary of the Invention
[0006] This application discloses a method and related equipment for optimizing the polarity of bioelectric signals based on bidirectional current excitation, which can solve the problem of false alarms caused by steady-state polarization rise during long-term wear and operation of electronic devices.
[0007] In a first aspect, embodiments of this application provide a method for optimizing the polarity of bioelectrical signals based on bidirectional current excitation. The method includes: in response to detecting that the electrodes of the electronic device change from a detached state to a contact state, determining a first current direction of the electronic device during operation based on at least two test currents; acquiring a bias voltage under the first current direction; if the bias voltage is greater than a preset voltage threshold, determining whether the bias voltage satisfies a preset flip-over trigger condition; if the bias voltage satisfies the preset flip-over trigger condition, acquiring a first voltage currently in operation of the electronic device; acquiring a second voltage of the electronic device operating under a second current direction, wherein the second current direction is opposite to the first current direction; determining evaluation parameters based on the first voltage and the second voltage; and performing a preset operation based on the evaluation parameters.
[0008] Wherein, the evaluation parameter is the ratio between the second voltage and the first voltage, and the step of performing a preset operation according to the evaluation parameter includes: determining the suppression time window of the electronic device, wherein the suppression time window is a silent period during which the next polarity reversal evaluation is prohibited after completing one polarity reversal evaluation operation; if the ratio is greater than a first preset ratio threshold, controlling the electronic device to switch the current direction from the second current direction back to the first current direction, and increasing the duration of the suppression time window according to a preset exponential rule; if the ratio is less than or equal to the first preset ratio threshold, and the ratio is greater than or equal to a second preset ratio threshold, controlling the electronic device to maintain the second current direction, and increasing the duration of the suppression time window according to a preset extension coefficient, wherein the first preset ratio threshold is greater than the second preset ratio threshold; if the ratio is less than the second preset ratio threshold, controlling the electronic device to maintain the second current direction, and resetting the suppression time window to a normal suppression duration.
[0009] In some possible embodiments of this application, determining the first current direction of the electronic device during operation based on at least two test currents includes: controlling the electronic device to operate under a first test current, and after a first stabilization waiting period, averaging the first original sampled values within a preset sampling time window to obtain a first bias voltage for each channel, and obtaining a first voltage based on the sum of the absolute values of the first bias voltages of each channel; controlling the electronic device to operate under a second test current, and after a second stabilization waiting period, averaging the second original sampled values within the preset sampling time window to obtain a second bias voltage for each channel, and obtaining a second voltage based on the sum of the absolute values of the second bias voltages of each channel; and determining the first current direction based on the first voltage and the second voltage.
[0010] In some possible embodiments of this application, determining the direction of the first current based on the first voltage and the second voltage includes: if the first voltage is less than or equal to the second voltage, the direction of the current corresponding to the first test current is taken as the first current direction; or if the first voltage is greater than the second voltage, the direction of the current corresponding to the second test current is taken as the first current direction, wherein the direction of the current corresponding to the first test current is opposite to the direction of the current corresponding to the second test current.
[0011] In some possible embodiments of this application, after controlling the electronic device to operate in the second current direction, the method further includes: during a preset transition period, performing at least one of the following operations to isolate transient glitches in the second voltage: (a) pausing the historical state update of the digital filter or suspending the digital filter; (b) stopping the feature extraction engine and algorithm decision engine from calling and updating abnormal signal samples in the current sampling window; (c) inserting invalid markers into the output data stream, skipping data frames, or performing linear data interpolation or previous value retention based on the historical stable waveform before switching; and (d) performing interpolation smoothing filtering on the signal during the preset transition period.
[0012] In some possible implementations of this application, the preset flip trigger condition includes: within a preset time period, the number of times the bias voltage is greater than a preset voltage threshold is greater than or equal to a preset number; within a preset time period, the duration of the bias voltage being greater than the voltage threshold is determined; within a preset time period, the integral area of the bias voltage being greater than the voltage threshold is determined.
[0013] In some possible implementations of this application, the first stable waiting time is greater than or equal to 400 milliseconds and less than or equal to 600 milliseconds, the second stable waiting time is greater than or equal to 400 milliseconds and less than or equal to 600 milliseconds; the sampling time window is greater than or equal to 200 milliseconds and less than or equal to 300 milliseconds; the voltage threshold is greater than or equal to 120mV and less than or equal to 200mV; the first preset ratio threshold is greater than or equal to 1.2 and less than or equal to 1.5, the second preset ratio threshold is greater than or equal to 0.5 and less than or equal to 0.8; and the conventional suppression time is greater than or equal to 30 seconds and less than or equal to 120 seconds.
[0014] Secondly, embodiments of this application also provide a bioelectric signal polarity optimization system based on bidirectional current excitation, the system comprising: The signal acquisition module is used to acquire the bias voltage corresponding to each of the at least two different polarities of the test current after applying at least two different polarities of the test current through the excitation current source; The data processing and control module is used to run the bioelectric signal polarity optimization method based on bidirectional current excitation as described above, and output polarity adjustment instructions to the signal acquisition module. The data processing and control module is also used to acquire the bias voltage and extract the DC bias component from the bias voltage to realize the polarity switching of the excitation current and the acquisition and control of the bias voltage.
[0015] In some possible embodiments of this application, the signal acquisition module includes a conditioning and excitation circuit built with a single-chip analog front-end or discrete devices; the data processing and control module extracts the DC bias in at least one of the following methods: time-domain window averaging, fast Fourier transform to extract the DC component, and digital low-pass filtering.
[0016] Thirdly, embodiments of this application also provide an electronic device, which includes a processor and a memory. When the processor executes a computer program stored in the memory, it implements the above-described method for optimizing the polarity of bioelectric signals based on bidirectional current excitation.
[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing at least one instruction that, when executed by a processor, implements the bioelectric signal polarity optimization method based on bidirectional current excitation as described above.
[0018] This application provides a method and related equipment for optimizing the polarity of bioelectrical signals based on bidirectional current excitation. The method determines a first current direction based on at least two test currents; acquires a bias voltage under the first current direction; records the number of times the bias voltage exceeds a preset voltage threshold within a preset time period when the bias voltage is greater than the voltage threshold; acquires a first voltage when the number of records is greater than or equal to a preset number; acquires a second voltage when the electronic device operates under a second current direction; determines evaluation parameters based on the first and second voltages; and performs a preset operation based on the evaluation parameters. Through this method for optimizing the polarity of bioelectrical signals based on bidirectional current excitation, false alarms due to detachment can be avoided without increasing additional hardware costs, and the stability of electronic device operation can be improved. Attached Figure Description
[0019] Figure 1 This is a flowchart of a bioelectric signal polarity optimization method based on bidirectional current excitation provided in an embodiment of this application.
[0020] Figure 2 This is a structural diagram of the optimization device in the embodiments of this application.
[0021] Figure 3This is a structural diagram of the bioelectric signal polarity optimization method system based on bidirectional current excitation in the embodiments of this application.
[0022] Figure 4 This is a structural diagram of the electronic device provided in the embodiments of this application.
[0023] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0024] For ease of understanding, some concepts related to the embodiments of this application are illustrated and explained by way of example for reference.
[0025] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.
[0026] Figure 1 This is a flowchart illustrating a method for optimizing the polarity of bioelectrical signals based on bidirectional current excitation, provided in an embodiment of this application. The method in this embodiment can be executed by an electronic device. Figure 1 As shown, the method in this embodiment may include: Step S101: In response to detecting that the electrodes of the electronic device have changed from a detached state to a contact state, a first current direction of the electronic device during operation is determined based on at least two test currents.
[0027] In some embodiments of this application, the electronic device controls a state machine via a microcontroller unit (MCU) to read the status word output by the hardware comparator in the analog front-end (AFE) in real time, and identifies the electrode contact state of the electronic device based on the status word. When the status word indicates that the current electrode has transitioned from a lead-off state to a lead-on state, the electronic device immediately triggers a fast polarity initialization process to configure the current-mode digital-to-analog converter (IDAC) with forward and reverse excitation currents sequentially. Here, the IDAC is a switchable DC excitation device in the analog front-end of the electronic device used to detect electrode lead-off and perform bidirectional polarity optimization.
[0028] In this embodiment, to quickly determine the preferred excitation direction that reduces polarization accumulation during the initial wearing phase, the electronic device applies at least two test currents of different polarities through an excitation current source; acquires the bias voltage corresponding to each of the at least two test currents of different polarities, and determines the first current direction based on the bias voltage. For example, the electronic device statistically compares and contrasts the bias voltages generated by each signal acquisition channel under the first test current and the second test current to determine the first current direction. The first test current can be either a forward excitation current or a reverse excitation current; the second test current can also be either a forward excitation current or a reverse excitation current. The current direction of the first test current is opposite to that of the second test current. Specifically, determining the first current direction of the electronic device during operation based on at least two test currents includes: acquiring multiple first bias voltages of the electronic device operating under the first test current; obtaining a first voltage based on the sum of the absolute values of the multiple first bias voltages; acquiring multiple second bias voltages of the electronic device operating under the second test current; obtaining a second voltage based on the sum of the absolute values of the multiple second bias voltages; and taking the current direction of the test current corresponding to the smaller of the first voltage and the second voltage as the first current direction. For example, the electronic device is controlled to operate under a first test current, and after a first stabilization waiting period, the first original sampled values within a preset sampling time window are averaged to obtain the first bias voltage of each channel. The first voltage is obtained based on the sum of the absolute values of the first bias voltages of each channel. The electronic device is then controlled to operate under a second test current, and after a second stabilization waiting period, the second original sampled values within a preset sampling time window are averaged to obtain the second bias voltage of each channel. The second voltage is obtained based on the sum of the absolute values of the second bias voltages of each channel. The direction of the first current is determined based on the first voltage and the second voltage. Wherein, the sampling time window is greater than or equal to 200 milliseconds and less than or equal to 300 milliseconds, the first stabilization waiting period is greater than or equal to 400 milliseconds and less than or equal to 600 milliseconds, and the second stabilization waiting period is greater than or equal to 400 milliseconds and less than or equal to 600 milliseconds.
[0029] In this embodiment, the electronic device can write instructions to the current polarity configuration register within the AFE via the Serial Peripheral Interface (SPI) bus to configure its internal IDAC as a positive excitation output. For example, the first test current is controlled to flow into the positive input terminal (INP) and out of the negative input terminal (INN). To avoid severe electrochemical double-layer charging and discharging oscillations at the electrode-skin interface at the moment the initial current is applied, the electronic device does not immediately acquire the first bias voltage after configuring the current direction. Instead, it actively waits for a preset first stable waiting time T_settle (e.g., 512 milliseconds) using a built-in hardware timer to avoid the severe fluctuations of the initial unstable state. After the first stable waiting time ends, the electronic device then starts the analog-to-digital converter (ADC) inside the AFE and continuously samples for 256 milliseconds (corresponding to 128 sampling points) to obtain the first bias voltage under the positive excitation. After applying and sampling the forward test current, the electronic device applies the reverse test current as follows: The electronic device again writes a switching instruction to the current polarity configuration register via the SPI bus, switching the IDAC to reverse excitation output. For example, the second test current is controlled to flow into the INN terminal and out of the INP terminal. To mitigate the unsteady-state effects caused by the sudden change in reverse charging and discharging, the electronic device also waits for a second stable waiting period. After this second stable waiting period ends, the electronic device restarts the ADC to perform continuous sampling for 256 milliseconds (128 sampling points) to obtain the second bias voltage under this reverse excitation.
[0030] By applying the forward and reverse test currents sequentially, the electronic device can quickly acquire raw ADC data of the bias voltage under two polarity conditions during the initial wearing phase. The first and / or second stable waiting times are used to filter out transient oscillations during the initial polarization of the electrochemical double layer, and the ADC sampling window ensures sufficient statistical reliability of the samples. For example, when the MCU state machine of the electronic device detects a transition from a low level (drop) to a high level (contact), the electronic device first applies a 512-millisecond T_settle to avoid charging and discharging fluctuations, then acquires samples at 128 points via the ADC, and subsequently performs the same waiting and sampling process in reverse to ensure that the electronic device can complete the application of the test current and the acquisition of initial data within approximately 1.87 seconds.
[0031] After the electronic device completes the stabilization and sampling of the forward test current, its internal digital signal processing unit (DSP) first extracts the DC component of the raw ADC sample acquired under forward excitation, calculates multiple first bias voltages under positive polarity, and further obtains the sum of the absolute values of the forward bias voltages corresponding to multiple bioelectric acquisition channels within the electronic device to obtain the first voltage V_fwd. Subsequently, after the electronic device completes the stabilization and sampling of the reverse test current, it uses the same calculation method to extract multiple second bias voltages under reverse excitation, and calculates the sum of the absolute values of the reverse bias voltages of each channel to obtain the second voltage V_inv. Since the positive and negative bias directions of the electrode-skin interface in the multi-channel system of the electronic device may be inconsistent, the sum of the absolute values of the bias voltages of multiple channels can comprehensively characterize the current total polarization voltage drop level of the electronic device.
[0032] In some embodiments of this application, the electronic device compares the values of a first voltage V_fwd and a second voltage V_inv using its internal state machine, and determines the first current direction based on the comparison result. Specifically: if the first voltage V_fwd is less than or equal to the second voltage V_inv, the electronic device determines that the polarization of the positive excitation is relatively light, and uses the positive excitation current direction corresponding to the first test current as the first current direction; if the first voltage V_fwd is greater than the second voltage V_inv, the electronic device determines that the polarization of the reverse excitation is relatively light, and uses the reverse excitation current direction corresponding to the second test current as the first current direction. After determining the first current direction, the electronic device writes the polarity configuration corresponding to this direction into the configuration register of the IDAC for locking, so as to continuously maintain the excitation output in this direction during the subsequent normal acquisition phase. For example, when the electronic device is a multi-channel EEG acquisition device, if the sum of the absolute values of the positive bias of channel 1 and channel 2 is 50mV and the sum of the absolute values of the reverse bias is 80mV, the electronic device determines that the overall polarization voltage drop under positive excitation is smaller, and determines the positive excitation as the first current direction to be maintained for a long time.
[0033] Step S102: Obtain the bias voltage in the first current direction.
[0034] In some embodiments of this application, after locking the first current direction, the electronic device maintains the current direction and enters the normal acquisition phase, while simultaneously initiating a background closed-loop monitoring process to evaluate the polarization accumulation degree of each signal acquisition channel under the current excitation direction in real time. Obtaining the bias voltage under the first current direction includes: controlling the electronic device to acquire the original signal within the current sampling window at a preset period; extracting the DC bias voltage corresponding to multiple signal acquisition channels of the electronic device from the original signal; calculating the sum of the absolute values of the DC bias voltage corresponding to each signal acquisition channel, and using the sum of absolute values as the bias voltage. The preset period corresponds to a Fast Fourier Transform (FFT) window for spectral analysis performed by the digital signal processing unit inside the electronic device, and this FFT window contains a preset number of sampling points (e.g., 512 sampling points, corresponding to a time length of 0.9 seconds).
[0035] The electronic device calculates the absolute value of each extracted DC bias voltage and sums the absolute values of each signal acquisition channel. The sum of these absolute values is used as the bias voltage within the current sampling window. This bias voltage is used to characterize the overall polarization stress level of the electronic device in the first current direction to determine whether the current electrode contact state exceeds a preset safety threshold.
[0036] Step S103: Compare whether the bias voltage is greater than a preset voltage threshold. If the bias voltage is greater than the voltage threshold, the process proceeds to step S104; if the bias voltage is less than or equal to the voltage threshold, the process returns to step S102.
[0037] In some embodiments of this application, after the electronic device completes the bias voltage calculation for the current cycle and obtains the bias voltage, the internal state machine triggers a comparison operation with a preset voltage threshold according to the preset cycle. After calculating the bias voltage within the current sampling window, the electronic device compares it with a voltage threshold preset in the internal register (e.g., 160 millivolts). The electronic device determines the subsequent control flow based on the comparison result. If the bias voltage is greater than the voltage threshold, the electronic device determines that the bias voltage drop of the current electrode has exceeded the safety threshold and executes step S104; if the bias voltage is less than or equal to the voltage threshold, the electronic device determines that the current electrode contact state is normal (i.e., the polarization voltage drop is within the safe range), returns to execute step S102, and continues to obtain the bias voltage within the next sampling window at a preset cycle, thereby achieving continuous background loop monitoring.
[0038] Step S104: Determine whether the bias voltage meets the preset flip-over trigger condition. If the bias voltage meets the preset flip-over trigger condition, the process proceeds to step S105; if the bias voltage does not meet the preset flip-over trigger condition, the process returns to step S102.
[0039] In some embodiments of this application, the preset flip-over trigger condition includes: within a preset time period, the number of times the bias voltage is greater than a preset voltage threshold is greater than or equal to a preset number; within the preset time period, the duration for which the bias voltage is greater than the voltage threshold is determined; within the preset time period, the integral area for which the bias voltage is greater than the voltage threshold is determined. If the number of times is greater than or equal to the preset number, the bias voltage is determined to satisfy the preset flip-over trigger condition; if the duration is greater than or equal to the preset duration, the bias voltage is determined to satisfy the preset flip-over trigger condition; if the integral area is greater than or equal to a preset area, the bias voltage is determined to satisfy the preset flip-over trigger condition.
[0040] Specifically, when the electronic device determines that the current bias voltage exceeds the safety threshold, it actively triggers the over-limit counter (C_over) in its internal state machine to accumulate and record the number of times this abnormal state occurs. Specifically, each time the electronic device detects that the bias voltage is greater than the voltage threshold, it increments the over-limit counter by 1. By accumulating this number of abnormal occurrences, the electronic device can filter out single transient interferences caused by power frequency noise, brief motion artifacts, etc., avoiding unnecessary frequent decisions and thus ensuring the accuracy of subsequent polarity assessment triggering.
[0041] In this embodiment, the preset time can be the cumulative duration during which the electronic device continuously monitors and the bias voltage exceeds the limit at the preset period. For example, if the electronic device uses a detection period of 0.9 seconds, and the bias voltage exceeds the voltage threshold for five consecutive FFT window periods, the corresponding cumulative duration is 4.5 seconds (i.e., 5 times × 0.9 seconds / time). Therefore, in one specific implementation, the preset time corresponds to 4.5 seconds.
[0042] In some embodiments of this application, the electronic device compares the current count of the over-limit counter with a preset count (e.g., 5 times) in real time, and checks whether the current moment is outside the suppression time window before triggering the next evaluation operation. If the count of the over-limit counter is greater than or equal to the preset count (e.g., 5 consecutive FFT windows, corresponding to 4.5 seconds), and the suppression time window has expired (i.e., the current moment is outside the suppression time window), the electronic device determines that a severe polarization accumulation anomaly has occurred in the current first current direction, and the process executes step S105; if the count of the over-limit counter is less than the preset count, or the current moment is still within the suppression time window, the electronic device determines that the triggering condition for polarity reversal evaluation is not met, the process returns to execute step S102, waits for the next FFT sampling window, and continues to monitor the bias voltage.
[0043] Step S105: Obtain the first voltage during the operation of the current electronic device.
[0044] In some embodiments of this application, after the electronic device confirms that the preset flip trigger condition is met, it first records the bias voltage currently locked in the first current direction and which has not yet performed any flip operation, and uses this bias voltage as the first voltage (V_before). The electronic device writes a switching instruction to the current polarity configuration register in the AFE via the SPI bus to switch the IDAC excitation direction from the first current direction to the second current direction (i.e., polarity flip). To avoid the step glitch generated by the hardware circuit at the moment of polarity flip causing the digital filter state to diverge, and to prevent the subsequent algorithm engine from generating artifacts and misjudging, the electronic device simultaneously initiates a full data processing link isolation mechanism (e.g., data isolation) at the same time as the polarity flip. The full data link isolation mechanism includes performing at least one of the following operations during a preset transition period to isolate transient spikes in the second voltage: (a) pausing the historical state update of the digital filter or suspending the digital filter, for example, stopping the data update and shift operation of the historical delay buffer inside the digital filter, so that the internal state of the filter is maintained in the convergent steady state before the polarity reversal, and preventing step spikes from participating in subsequent filtering operations; (b) suspending the update of the frequency domain analysis and physiological feature extraction algorithm engine, for example, stopping the feature extraction engine and algorithm decision engine from calling and updating abnormal signal samples in the current sampling window, so as to avoid the contamination of statistical features by artifact data; (c) inserting invalid markers into the output data stream, skipping data frames, or performing linear data interpolation or previous value preservation based on the historical stable waveform before the switch, and performing isolation processing on the data stream output to downstream applications. For example, inserting invalid identifiers into the output data frames, or skipping data frames of the current abnormal period in the data sending queue; (d) performing interpolation smoothing filtering processing on the signal during the preset transition period.
[0045] Step S106: Control the electronic device to operate in the second current direction and acquire the second voltage, wherein the second current direction is opposite to the first current direction.
[0046] In some embodiments of this application, the electronic device maintains the aforementioned full data link isolation state for a preset data isolation duration (e.g., 2.7 seconds, corresponding to 3 FFT sampling windows, i.e., a preset transition period) to completely allow the electrochemical double layer at the electrode-skin interface to reach a new steady state after the direction is reversed. After the preset data isolation duration ends, the electronic device resumes the data update and shift operations of the historical delay buffer inside the digital filter, and resumes the calling and calculation of normal signal samples in subsequent sampling windows by the feature extraction engine and algorithm decision engine to restore the normal data processing link. The electronic device re-acquires the original ADC samples of each signal acquisition channel in the current sampling window, extracts the DC bias voltage of each channel, and recalculates the sum of the absolute values of the DC bias voltages of each channel. The sum of the absolute values calculated under the current second current direction is used as the second voltage (e.g., V_after).
[0047] Step S107: Determine the evaluation parameters based on the first voltage and the second voltage.
[0048] In some embodiments of this application, after the electronic device completes full data link recovery and acquires the second voltage under the current second current direction, it pairs the first voltage and the second voltage as correlation parameters to trigger a state comparison analysis process. The state machine inside the electronic device calls division logic to calculate the ratio of the acquired second voltage (V_after) to the first voltage (V_before), and uses the calculated ratio as an evaluation parameter (improvement ratio Ratio = V_after / V_before). This evaluation parameter is used to objectively quantify the actual impact of the polarity reversal operation on the overall polarization voltage drop level of the electronic device, so that subsequent steps can execute the optimal adaptive control strategy based on the quantification result.
[0049] Step S108: Perform preset operations based on the evaluation parameters.
[0050] In some embodiments of this application, after the electronic device has completed the calculation of the evaluation parameters and obtained the evaluation parameters, it inputs the evaluation parameters into an internally preset logic comparison module to activate a corresponding closed-loop control strategy based on the numerical range of the evaluation parameters. The electronic device compares the calculated evaluation parameter Ratio with multiple preset ratio thresholds in segments and performs different preset operations based on the comparison results. Specifically, if the ratio is greater than a first preset ratio threshold, the electronic device is controlled to switch the current direction from the second current direction back to the first current direction; if the ratio is less than or equal to the first preset ratio threshold and the ratio is greater than or equal to a second preset ratio threshold, the electronic device is controlled to maintain the second current direction, wherein the first preset ratio threshold is greater than the second preset ratio threshold; if the ratio is less than the second preset ratio threshold, the electronic device is controlled to maintain the second current direction.
[0051] If the evaluation parameter Ratio is greater than a first preset ratio threshold (e.g., 1.3), the electronic device determines that the current second current direction is causing a deterioration in the polarization voltage drop. The electronic device immediately performs a rollback operation through the configuration register, switching back to the first current direction, and simultaneously increasing the duration of the suppression time window according to a preset exponential rule. Specifically, an exponential backoff strategy is implemented: the electronic device multiplies the current suppression time window duration by a preset backoff coefficient (e.g., the backoff coefficient is 2.0) to obtain the increased suppression time window duration. Furthermore, to prevent prolonged loss of sensitivity, the electronic device is also configured with a maximum suppression duration limit (e.g., 600 seconds), and the increased suppression time window duration is not greater than the maximum suppression duration. It should be noted that the preset exponential rule is the same as the exponential backoff rule here, and the backoff coefficient and maximum suppression duration can be set according to the actual hardware scenario. By implementing exponential backoff on the suppression time window, the quiet period that the device needs to wait before the next evaluation is significantly extended, preventing frequent reversals from causing system oscillations. For example, the current suppression duration is multiplied by 2, and the suppression duration after backoff does not exceed the maximum suppression duration, such as 600 seconds. In this embodiment, the suppression time window refers to a silent period of time that the electronic device enables after completing the polarity reversal evaluation operation, during which the next polarity reversal evaluation is prohibited; the duration of this silent period of time is adaptively adjusted by the electronic device according to the evaluation parameters. Specifically, the first preset ratio threshold is greater than or equal to 1.2 and less than or equal to 1.5, the backoff coefficient is greater than or equal to 1.2 and less than or equal to 2.0, and the maximum suppression duration is greater than or equal to 300 seconds and less than or equal to 1200 seconds.
[0052] If the evaluation parameter Ratio is less than the second preset ratio threshold (e.g., 0.7), the electronic device determines that the current second current direction significantly improves the polarization voltage drop level. Therefore, the electronic device maintains the current second current direction unchanged and resets the suppression time window to the normal suppression duration (e.g., 60 seconds) to restore system sensitivity. The normal suppression duration is greater than or equal to 30 seconds and less than or equal to 120 seconds, and the second preset ratio threshold is greater than or equal to 0.5 and less than or equal to 0.8.
[0053] If the evaluation parameter Ratio is between the second preset ratio threshold and the first preset ratio threshold, the electronic device determines that the current second current direction has no significant effect on improving the polarization voltage drop, keeps the second current direction unchanged, and extends the suppression time window to a preset multiple of the normal suppression time (e.g., 1.5 times, i.e., 90 seconds).
[0054] Through the bidirectional current-excitation-based bioelectric signal polarity optimization method of this application, the electronic device achieves adaptive optimization and closed-loop management of electrode bias voltage drop without the need for additional hardware depolarization circuitry. On the one hand, by rapidly performing bidirectional testing and comparison during the initial wearing phase (e.g., within approximately 1.87 seconds), the electronic device can automatically lock and maintain the initial excitation direction with the minimum polarization voltage, effectively improving the user's wearing and startup experience. On the other hand, through adaptive monitoring in the background, a dynamic control mechanism based on a suppression time window, and precise full data link isolation and rollback evaluation implemented during polarity reversal, the electronic device not only avoids ADC saturation and false alarms caused by continuous unidirectional polarization increases, but also effectively prevents data artifact contamination during the reversal process, ensuring the smoothness and continuity of the output physiological signal.
[0055] Figure 2 This is a structural diagram of a bioelectric signal polarity optimization device based on bidirectional current excitation (hereinafter referred to as the "optimization device") provided in an embodiment of this application. The optimization device 200 may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the optimization device 200 may be stored in the memory of an electronic device and executed by at least one processor to perform (see details). Figure 1 (Description) A function for optimizing the polarity of bioelectric signals based on bidirectional current excitation.
[0056] In this embodiment, the optimization device 200 can be divided into multiple functional modules according to its function. The functional modules may include: a determining module 201, an acquiring module 202, and a processing module 203. A module, as referred to in this application, is a series of computer program segments that can be executed by at least one processor and perform a fixed function, stored in memory. In this embodiment, the optimization device 200 can be used to implement, for example... Figure 1The method shown is a bioelectric signal polarity optimization method based on bidirectional current excitation. For example... Figure 2 As shown, the optimization device 200 is applied to electronic devices (such as...) Figure 4 In the electronic device shown, the optimization device 200 includes: The determination module 201 is used to determine a first current direction of the electronic device during operation based on at least two test currents in response to detecting that the electrode of the electronic device has changed from a detached state to a contact state. The acquisition module 202 is used to acquire the bias voltage in the first current direction; The determining module 201 is used to determine whether the bias voltage meets the preset flip trigger condition when the bias voltage is greater than the preset voltage threshold. The acquisition module 202 is further configured to acquire the first voltage at which the electronic device is currently operating when the bias voltage meets the preset flip trigger condition; The acquisition module 202 is further configured to control the electronic device to operate in the second current direction and acquire the second voltage, wherein the second current direction is opposite to the first current direction; The determining module 201 is used to determine evaluation parameters based on the first voltage and the second voltage; and The processing module 203 is used to perform preset operations based on the evaluation parameters.
[0057] In this application embodiment, a bioelectric signal polarity optimization system 300 based on bidirectional current excitation is also provided. For example... Figure 3 As shown, the system includes a signal acquisition module 301 and a data processing and control module 302.
[0058] The signal acquisition module 301 may specifically include a single-chip analog front-end (AFE), such as a dedicated bioelectrical signal acquisition chip integrating a programmable gain amplifier (PGA), an analog-to-digital converter (ADC), and a built-in current-mode digital-to-analog converter (IDAC); alternatively, the signal acquisition module may also employ a conditioning and excitation circuit built with discrete components, for example, composed of an independent operational amplifier, an ADC chip, and a constant current source circuit (or a MOSFET switching circuit). The signal acquisition module is used to apply at least two test currents of different polarities through its internal excitation current source and acquire the bias voltage corresponding to each of the at least two test currents of different polarities. The specific application method of the test current is consistent with the forward / reverse current configuration logic in step S101 above, and the bias voltage is the original ADC sample data of each signal acquisition channel.
[0059] The data processing and control module 302 can specifically be a combination of a microcontroller unit (MCU) and a digital signal processor (DSP), or an embedded processor with equivalent computing capabilities. This module is used to run the bioelectric signal polarity optimization method based on bidirectional current excitation as described above, and outputs polarity adjustment commands to the signal acquisition module via the Serial Peripheral Interface (SPI) bus to control the polarity switching of the IDAC inside the signal acquisition module, thereby realizing the polarity switching of the excitation current and the acquisition and control of the bias voltage.
[0060] The data processing and control module 302 is further configured to acquire the bias voltage acquired by the signal acquisition module and extract the DC bias component from the bias voltage to achieve polarity switching and closed-loop control of the excitation current. Specifically, the data processing and control module extracts the DC bias component in at least one of the following ways: performing time-domain averaging (i.e., time-domain window mean) on the original sampled values acquired within a preset sampling window; extracting the DC component after performing Fast Fourier Transform (FFT) processing on the original sampled values within the preset sampling window; or performing digital low-pass filtering processing on the original sampled values within the preset sampling window. Based on the extracted DC bias component, the data processing and control module further executes the threshold comparison, count statistics, polarity reversal evaluation, and cooling period adjustment logic in steps S102 to S108 above, thereby completing the closed-loop control of the system.
[0061] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. As shown in the figure, the electronic device 1 can be a server. For example, the electronic device 1 can be a bioelectrical signal acquisition terminal, such as an electroencephalogram (EEG) acquisition device, an electrocardiogram (ECG) monitoring device, an electromyogram (EMG) acquisition device, or a wearable health monitoring device. Each electronic device 1 may include a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104, and a bus 105. The processor 103 is coupled to the communication module 101, the memory 102, and the I / O interface 104 via the bus 105.
[0062] Communication module 101 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB) and Controller Area Network (CAN). Additionally, the wired communication module may provide a Serial Peripheral Interface (SPI) bus, which is used to connect to the Analog Front End (AFE) chip for control bus connection, enabling polarity configuration of the AFE's internal current-mode digital-to-analog converter (IDAC), sampling initiation of the analog-to-digital converter (ADC), and reading of the hardware comparator status word. The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication networks, frequency modulation (FM), near-field communication (NFC), and infrared (IR). The wireless communication module can be used to transmit processed physiological waveform data or status assessment results (such as detachment alarm signals) to external mobile devices or host computer applications.
[0063] Memory 102 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 103 and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data. The RAM may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.
[0064] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 103. Non-volatile memory can include disk storage devices and flash memory.
[0065] Memory 102 is used to store one or more computer programs. These one or more computer programs are configured to be executed by processor 103. The one or more computer programs include multiple instructions that, when executed by processor 103, enable a method for optimizing the polarity of bioelectrical signals based on bidirectional current excitation, which can be executed on electronic device 1. In a specific embodiment, memory 102 stores algorithm instructions for calculating DC bias voltage via an FFT window, multi-channel absolute value summation instructions, over-limit counting logic, polarity reversal improvement ratio (Ratio) evaluation logic, suppression time window adaptive adjustment logic, and configuration parameters such as preset voltage thresholds (e.g., 160mV) and conventional suppression durations (e.g., 60 seconds).
[0066] In other embodiments, the electronic device 1 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 1.
[0067] The processor 103 provides computing and control capabilities. In this embodiment, when the processor 103 (as the physical carrier of the MCU and DSP) executes the computer program stored in the memory 102, it is specifically used to control the IDAC inside the AFE to switch polarity and to extract DC bias by calling the original ADC samples in the FFT window based on a preset period. At the same time, the processor 103 is used to calculate the sum of the absolute values of the DC bias components of multiple channels, compare the bias voltage with the threshold, execute the over-limit counting logic, evaluate the polarity reversal improvement ratio, and at the moment of polarity reversal, execute various adaptive closed-loop control processes in the full data link isolation mechanism, such as freezing the filter history delay cache, pausing the algorithm engine operation, and isolating the output data stream.
[0068] I / O interface 104 provides a channel for user input or output. For example, I / O interface 104 can be used to connect various input / output devices, such as a mouse, keyboard, touchscreen, or display screen, allowing users to input or visualize information. In bioelectrical signal acquisition scenarios, I / O interface 104 connects to the electrode input terminals (INP, INN) of the analog front-end (AFE) to receive the raw bioelectrical signals from the skin surface acquired by the wearable device electrodes. Simultaneously, processed physiological waveforms or device status information can be output to an external display interface or a host computer through this interface.
[0069] Bus 105 is used to provide a channel for communication between communication module 101, memory 102, processor 103, and I / O interface 104 in electronic device 1. In this embodiment, bus 105 includes an SPI control bus for transmitting current polarity configuration instructions and raw ADC sample data between processor 103 and analog front-end AFE.
[0070] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 1. In other embodiments of this application, the electronic device 1 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0071] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, and the method implemented when the program instructions are executed can refer to the methods in the above embodiments of this application.
[0072] The computer-readable storage medium can be the internal memory of the electronic device described in the above embodiments, such as the hard disk or memory of the electronic device. Alternatively, the computer-readable storage medium can be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device.
[0073] In some embodiments, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, etc.; and the data storage area may store data created based on the use of the electronic device, etc.
[0074] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0075] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0076] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or 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 displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0077] 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.
[0078] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for optimizing the polarity of bioelectrical signals based on bidirectional current excitation, applied to electronic devices, characterized in that, The method includes: In response to detecting that the electrodes of the electronic device have changed from a detached state to a contact state, a first current direction of the electronic device during operation is determined based on at least two test currents; Obtain the bias voltage in the first current direction; If the bias voltage is greater than a preset voltage threshold, determine whether the bias voltage meets a preset flip trigger condition. When the bias voltage meets the preset flip trigger condition, the first voltage at which the electronic device is currently operating is obtained; The electronic device is controlled to operate in a second current direction and acquire a second voltage, wherein the second current direction is opposite to the first current direction; Evaluation parameters are determined based on the first voltage and the second voltage; and Perform a preset operation based on the evaluation parameters; Wherein, the evaluation parameter is the ratio between the second voltage and the first voltage, and the step of performing a preset operation according to the evaluation parameter includes: determining the suppression time window of the electronic device, wherein the suppression time window is a silent period during which the next polarity reversal evaluation is prohibited after completing one polarity reversal evaluation operation; if the ratio is greater than a first preset ratio threshold, controlling the electronic device to switch the current direction from the second current direction back to the first current direction, and increasing the duration of the suppression time window according to a preset exponential rule; if the ratio is less than or equal to the first preset ratio threshold, and the ratio is greater than or equal to a second preset ratio threshold, controlling the electronic device to maintain the second current direction, and increasing the duration of the suppression time window according to a preset extension coefficient, wherein the first preset ratio threshold is greater than the second preset ratio threshold; if the ratio is less than the second preset ratio threshold, controlling the electronic device to maintain the second current direction, and resetting the suppression time window to a normal suppression duration.
2. The method for optimizing the polarity of bioelectric signals based on bidirectional current excitation as described in claim 1, characterized in that, Determining the first current direction of the electronic device during operation based on at least two test currents includes: The electronic device is controlled to operate under the first test current, and after the first stable waiting time, the first original sampled value within the preset sampling time window is averaged to obtain the first bias voltage of each channel, and the first voltage is obtained based on the sum of the absolute values of the first bias voltages of each channel. The electronic device is controlled to operate under the second test current, and after a second stabilization waiting period... The second bias voltage of each channel is obtained by averaging the second original sampled values within the preset sampling time window, and the second voltage is obtained by summing the absolute values of the second bias voltages of each channel. The direction of the first current is determined based on the first voltage and the second voltage.
3. The method for optimizing the polarity of bioelectric signals based on bidirectional current excitation as described in claim 2, characterized in that, Determining the direction of the first current based on the first voltage and the second voltage includes: If the first voltage is less than or equal to the second voltage, the direction of the first current is taken as the direction of the first test current; or If the first voltage is greater than the second voltage, the current direction corresponding to the second test current is taken as the first current direction, and the current direction corresponding to the first test current is opposite to the current direction corresponding to the second test current.
4. The method for optimizing the polarity of bioelectric signals based on bidirectional current excitation as described in claim 3, characterized in that, After controlling the electronic device to operate in the second current direction, the method further includes: During a preset transition period, at least one of the following operations is performed to isolate transient glitches in the second voltage: (a) Pause the historical state update of the digital filter or suspend the digital filter; (b) Stop the feature extraction engine and algorithm decision engine from calling and updating the abnormal signal samples in the current sampling window; (c) Insert invalid markers into the output data stream, skip data frames, or perform linear data interpolation or hold previous values based on the historical stable waveform before the switch; (d) Perform interpolation smoothing filtering on the signal within the preset transition period.
5. The method for optimizing the polarity of bioelectric signals based on bidirectional current excitation as described in claim 4, characterized in that, The preset flip trigger conditions include: within a preset time period, the number of times the bias voltage is greater than a preset voltage threshold is greater than or equal to a preset number; within a preset time period, the duration for which the bias voltage is greater than the voltage threshold is determined; within a preset time period, the integral area of the bias voltage being greater than the voltage threshold is determined.
6. The method for optimizing the polarity of bioelectric signals based on bidirectional current excitation as described in claim 5, characterized in that, The first stable wait duration is greater than or equal to 400 milliseconds and less than or equal to 600 milliseconds, and the second stable wait duration is greater than or equal to 400 milliseconds and less than or equal to 600 milliseconds; The sampling time window is greater than or equal to 200 milliseconds and less than or equal to 300 milliseconds; The voltage threshold is greater than or equal to 120mV and less than or equal to 200mV; The first preset ratio threshold is greater than or equal to 1.2 and less than or equal to 1.5, and the second preset ratio threshold is greater than or equal to 0.5 and less than or equal to 0.8; The duration of the conventional suppression is greater than or equal to 30 seconds and less than or equal to 120 seconds.
7. A bioelectric signal polarity optimization system based on bidirectional current excitation, characterized in that, The system includes: The signal acquisition module is used to acquire the bias voltage corresponding to each of the at least two different polarities of the test current after applying at least two different polarities of the test current through the excitation current source; The data processing and control module is used to run the bioelectric signal polarity optimization method based on bidirectional current excitation as described in any one of claims 1 to 6, and output polarity adjustment instructions to the signal acquisition module. The data processing and control module is also used to acquire the bias voltage and extract the DC bias component from the bias voltage, so as to realize the polarity switching of the excitation current and the acquisition and control of the bias voltage.
8. The bioelectric signal polarity optimization system based on bidirectional current excitation as described in claim 7, characterized in that, The signal acquisition module includes a conditioning and excitation circuit built with a single-chip analog front-end or discrete devices; The data processing and control module extracts the DC bias in at least one of the following methods: time-domain window mean, fast Fourier transform to extract the DC component, and digital low-pass filtering.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the processor executes a computer program stored in the memory to implement the bioelectric signal polarity optimization method based on bidirectional current excitation as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which, when executed by a processor, implements the method for optimizing the polarity of bioelectric signals based on bidirectional current excitation as described in any one of claims 1 to 6.