An artificial intelligence-based electric stimulation output precision adaptive control method
Patent Information
- Application Number
- CN202610879192.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-08-18
AI Technical Summary
现有的数字控制方法通常采用开环或基于单步反馈的补偿策略,主要依赖于静态的电路参数模型与线性补偿假设进行驱动编码生成,存在以下显著缺陷:现有恒流源控制多采用硬性标定的开环方式,忽略了核心驱动器件(如MOSFET或三极管)工作在放大区时发热导致的关键参数漂移问题
[0062] (1) This invention achieves deep decoupling of hardware parasitic response and electrochemical interface response and pure polarization state reconstruction by constructing a cascaded feature extraction process of source separation decoupling and time-domain orthogonal decoupling. Based on the statistical distribution characteristics of the time-domain relaxation feature sequence, the transient hardware response decay parameters are estimated, parasitic charge-discharge decay components are extracted and differential elimination is performed. Combined with the sampled current at the current stimulus pulse cutoff time, the time-domain orthogonal projection basis vector is calculated. Orthogonal projection transformation is performed to separate the transient current response component and the interface polarization relaxation component, and the current interface polarization state space is reconstructed by dimension reduction projection. This process accurately decomposes the mixed relaxation response signal to an independent physical source, completely filters out the parasitic charge-discharge interference introduced by the hardware circuit, and provides a high-purity state input containing only the true electrochemical polarization kinetic characteristics.
Smart Images

Figure CN122582470A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of biomedical engineering and neuroelectrophysiology, and in particular to an adaptive control method for electrical stimulation output accuracy based on artificial intelligence. Background Technology
[0002] With the widespread application of neurostimulation technology in clinical treatment, the requirements for the accuracy of stimulation current output are becoming increasingly stringent. Existing digital control methods typically employ open-loop or single-step feedback-based compensation strategies, mainly relying on static circuit parameter models and linear compensation assumptions for drive encoding generation. This approach has the following significant drawbacks: Existing constant current source control often uses a hard-calibrated open-loop method, neglecting the critical parameter drift problem caused by heat generation when the core driving device (such as MOSFET or transistor) operates in the amplification region. As the device operates for an extended period, the increased device temperature causes nonlinear shifts in parameters such as emitter junction voltage with temperature and current, resulting in fluctuations in the actual output current. This is particularly pronounced in the low-current output region, where the accuracy deviation exceeds the design error range, making it impossible to maintain high-precision output over a long period. Existing methods neglect the complex electrochemical kinetics of the electrode-tissue interface, especially the cumulative effect of interface polarization and multidimensional nonlinear coupling distortion caused by charge transfer relaxation. Furthermore, they fail to adequately decouple the parasitic response of the hardware circuit from the interface electrochemical response, making it impossible to accurately predict the evolution trajectory of polarization states across cycles. This leads to severe distortion of the current waveform when outputting stimulation pulses. The existing control logic lacks a robust closed-loop calibration system, failing to perform real-time sampling and dynamic compensation of the actual output current. Consequently, when generating digital domain drive codes, it is unable to effectively offset the nonlinear distortion of the circuit caused by device temperature drift and the electrochemical polarization distortion caused by interface relaxation, significantly increasing the error in the output current and reducing stimulation safety.
[0003] Therefore, how to provide an adaptive control method for the accuracy of electrical stimulation output based on artificial intelligence is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] This invention proposes an artificial intelligence-based adaptive control method for electrical stimulation output accuracy. Through a closed-loop adaptive compensation process based on an improved IndRNN model and circuit inverse transfer characteristics, the time-domain relaxation feature sequence is decoupled by source separation and time-domain orthogonal decoupling according to its physical origin. The current interface polarization state space is extracted and input into the improved IndRNN model. Within the improved IndRNN model, decoupling recursively tracks the decay trajectory along the time axis for each physical dimension, introducing a potential energy percolation mechanism. Dimensionally independent recursive features are mapped to the potential energy space to calculate the cross-dimensional percolation potential energy difference as the driving force. The dynamic percolation coefficient is adaptively extracted and modulation is performed to generate cross-dimensional percolation flux. The percolation flux is aggregated along the dimensional channels and reconstructed by residual fusion with the original recursive features to reconstruct the inter-dimensional coupling effect. Adaptive nonlinear fusion of multi-dimensional polarization effects outputs a predicted interface polarization state space. Based on the predicted interface polarization state space, feedforward polarization compensation mapping is performed on the target command current to offset polarization distortion components and output an initial compensation driving current. The current is then adjusted according to the Vo of the core transistor in the driving output channel. BE -TI C The characteristic curve is used to calculate the temperature drift compensation amount, and the initial compensation drive current is subjected to distortion cancellation in combination with the channel nonlinear mapping relationship to generate a digital domain drive code. Based on the digital domain drive code, a Boost boost compensation value and an H-bridge timing control signal are generated to output a corrected amplitude pulse for tissue stimulation. At the same time, closed-loop feedback calibration is performed based on the error between the actual load current and the target command current to dynamically correct the Boost boost compensation value. During the interval, the relaxation recovery time is adaptively determined based on the pulse cumulative energy and decay time constant to re-trigger the detection. This invention overcomes the shortcomings of traditional methods, such as difficulty in polarization distortion offsetting, neglect of dimensional coupling, lack of temperature drift compensation for core devices, and limitations of open-loop control, providing an efficient solution for precise control of nerve electrical stimulation.
[0005] An adaptive control method for electrical stimulation output accuracy based on artificial intelligence, according to an embodiment of the present invention, specifically includes:
[0006] S1. During the interval between the end of the current stimulation pulse, detect the charge transfer relaxation process at the interface between the electrode and the tissue to obtain the temporal relaxation feature sequence.
[0007] S2. The time-domain relaxation feature sequence is decoupled from the transient hardware response and the electrochemical interface response according to the physical cause, the parasitic charge-discharge decay component is removed, and the parasitic interference-free relaxation feature sequence is reconstructed.
[0008] S3. Perform time-domain orthogonal decoupling between the deparasitic interference relaxation feature sequence and the sampling current at the current stimulus pulse cutoff time, and extract the current interface polarization state space.
[0009] S4. Input the current interface polarization state space obtained from continuous historical cycles into the improved IndRNN model, perform decoupling recursive tracking of decay trajectory along the time axis for each physical dimension, introduce potential energy percolation mechanism to construct potential energy field based on recursive features, reconstruct interdimensional coupling effect through dynamic percolation driven by cross-dimensional potential energy difference, and adaptively nonlinearly fuse multi-dimensional polarization effect to output the predicted interface polarization state space.
[0010] S5. Obtain the input target command current, perform feedforward polarization compensation mapping on the target command current based on the predicted interface polarization state space, offset the electrochemical interface polarization distortion component, and output the initial compensation driving current.
[0011] S6. Acquire the real-time junction temperature and collector current of the core transistor in the drive output channel, based on V. BE -TI C The temperature drift compensation amount is calculated using the characteristic curve, and distortion cancellation is performed on the initial compensation drive current in combination with the channel nonlinear mapping relationship to generate digital domain drive code.
[0012] S7. Generate Boost compensation value and H-bridge timing control signal based on the digital domain driving code to output corrected amplitude pulse for tissue stimulation. At the same time, perform closed-loop feedback calibration based on the error between the actual load current and the target command current to dynamically correct the Boost compensation value. Re-trigger detection during the interval after the end of the current stimulation cycle and return to obtain the time domain relaxation feature sequence.
[0013] Optionally, S1 specifically includes:
[0014] S11. Acquire the relaxation response electrical signal at the interface between the probe electrode and the tissue during the interval after the current stimulation pulse ends. Perform time-domain discretization sampling on the relaxation response electrical signal to generate an attenuation response sequence. Determine the dynamic truncation threshold based on the statistical distribution of the attenuation response sequence. Perform truncation filtering and feature encoding on the attenuation response sequence based on the dynamic truncation threshold to output the original relaxation feature sequence.
[0015] S12. Perform attenuation response parameterization analysis based on the original relaxation feature sequence, decouple and extract the dynamic attenuation time constant of charge transfer and the steady-state response baseline value, and combine them to generate a relaxation dynamic parameter set.
[0016] S13. Perform nonlinear mapping based on the relaxation dynamics parameter set, and perform interval quantization based on the relaxation dynamics parameter set. Arrange the mapping and quantization results in time sequence and output the relaxation state evolution sequence.
[0017] Optionally, the attenuation response parameterization analysis specifically includes:
[0018] The initial time constant is estimated based on the amplitude extrema and time position of the original relaxed feature sequence. The transient decay factor is generated by exponentially calculating the amplitude extrema and natural constant according to the initial time constant. The fitted decay sequence is generated by performing point-by-point multiplication operation on the amplitude extrema and transient decay factor.
[0019] Calculate the pointwise residual between the original relaxed feature sequence and the fitted decay sequence, perform gradient descent correction on the initial time constant based on the pointwise residual, and output the dynamic decay time constant;
[0020] The truncation time window is determined based on the dynamic decay time constant. The tail subsequence is extracted by truncating the original relaxation feature sequence based on the truncation time window. The mean of the tail subsequence is calculated to determine the steady-state response reference baseline. The point-by-point difference operation is performed between the original relaxation feature sequence and the steady-state response reference baseline to extract the steady-state response baseline value.
[0021] The dynamic decay time constant and the steady-state response baseline value are concatenated by an execution vector to output a set of relaxation dynamic parameters.
[0022] Optionally, S2 specifically includes:
[0023] S21. Estimate transient hardware response attenuation parameters based on statistical distribution characteristics of time-domain relaxation feature sequences, perform parameterized analysis on time-domain relaxation feature sequences based on transient hardware response attenuation parameters, and extract parasitic charge-discharge attenuation components.
[0024] S22. Perform a difference operation between the time-domain relaxation feature sequence and the parasitic charge-discharge decay component to generate the residual relaxation response component.
[0025] S23. Perform time-domain reconstruction based on residual relaxation response components and output parasitic interference-free relaxation feature sequence.
[0026] Optionally, S3 specifically includes:
[0027] S31. Based on the parasitic interference relaxation feature sequence and the statistical distribution characteristics of the sampled current at the current stimulus pulse cutoff time, calculate the time-domain orthogonal projection basis vector.
[0028] S32. Based on the time-domain orthogonal projection basis vector, perform orthogonal projection transformation on the deparasitic interference relaxation feature sequence and the sampled current at the current stimulus pulse cutoff time to separate and generate transient current response components and interface polarization relaxation components.
[0029] S33. Perform dimensionality reduction projection and state reconstruction based on the interface polarization relaxation components, and output the current interface polarization state space.
[0030] Optionally, the improved IndRNN model includes an independent channel mapping layer, a time-domain independent recursive layer, a potential energy percolation reconstruction layer, and an inter-layer nonlinear fusion layer:
[0031] The independent channel mapping layer is used to receive the current interface polarization state space, split the temporal sequence of each physical dimension in the current interface polarization state space into independent dimension sub-sequences, map each independent dimension sub-sequence to its respective neuron channel through the corresponding channel projection matrix, and output dimension-independent initial features.
[0032] The time-domain independent recursive layer is used to input dimension-independent initial features into the corresponding independent neuron channels, and based on the independent recursive weight parameters of each independent neuron channel, to perform recursive cumulative calculations without cross-channel interaction along the time axis for each physical dimension, and output dimension-independent recursive features.
[0033] The potential energy permeation reconstruction layer is used to introduce a potential energy permeation mechanism, which maps dimensionally independent recursive features to the potential energy space to obtain the permeation potential energy of each physical dimension, calculates the permeation potential energy difference between any two physical dimensions as the cross-dimensional permeation driving force, adaptively extracts dynamic permeation coefficients based on the current dimensionally independent recursive features, performs modulation operations on the cross-dimensional permeation driving force and the dynamic permeation coefficients to generate cross-dimensional permeation flux, aggregates the cross-dimensional permeation flux along the dimensional channels, and performs residual fusion with the original dimensionally independent recursive features to output dimensionally coupled permeation features.
[0034] The interlayer nonlinear fusion layer is used to extract the statistical distribution features of the dimensional coupling seepage features, adaptively calculate the interlayer fusion weights based on the statistical distribution features, perform fully connected mapping and nonlinear activation operations on the dimensional coupling seepage features based on the interlayer fusion weights, fuse the coupling effect of multi-dimensional polarization effects, and output the predicted interface polarization state space.
[0035] Optionally, the potential energy permeation mechanism specifically includes:
[0036] Based on the dimension-independent recursive features at the current time step, perform feature space transformation and dimension reorganization, and dynamically calculate and generate the potential energy mapping weight matrix.
[0037] Based on the potential energy mapping weight matrix, a linear projection is performed on the dimension-independent recursive features to map the dimension-independent recursive features to the potential energy space to obtain the seepage potential energy of each physical dimension and generate a dimension-independent seepage potential energy tensor.
[0038] Perform feature copying and dimension transpose operations on the dimensionally independent seepage potential energy tensor to expand the one-dimensional channel axis into a two-dimensional interactive mesh, and construct the source dimension potential energy tensor and the target dimension potential energy tensor.
[0039] Perform a bitwise subtraction operation on the source dimension potential energy tensor and the target dimension potential energy tensor to calculate the seepage potential energy difference between any two physical dimensions as the cross-dimensional seepage driving force, and generate the cross-dimensional seepage driving force tensor.
[0040] Parallel feature mapping is performed based on the dimension-independent recursive features of the current time step, and the modulation factors of the seepage source dimension and the seepage target dimension are extracted separately to generate the first dynamic seepage modulation operator and the second dynamic seepage modulation operator.
[0041] Based on the first dynamic percolation modulation operator and the second dynamic percolation modulation operator, a symmetric feature transformation is performed on the dimension-independent recursive features of the current time step to generate the first mapping feature and the second mapping feature.
[0042] The first mapping feature and the second mapping feature are respectively input into a nonlinear activation function to perform nonlinear mapping, and the first dynamic permeability scalar and the second dynamic permeability scalar are calculated and generated.
[0043] Perform a feature copying and expansion operation on the first dynamic penetration rate scalar to generate a first penetration rate source dimension tensor; perform a dimension transpose and expansion operation on the second dynamic penetration rate scalar to generate a second penetration rate target dimension tensor;
[0044] Perform a bitwise fusion operation on the first permeability source dimension tensor and the second permeability target dimension tensor to construct an anisotropic two-dimensional interactive mesh and generate a dynamic permeation coefficient tensor.
[0045] Element-wise multiplication is performed on the cross-dimensional seepage driving force tensor and the dynamic seepage coefficient tensor. The cross-dimensional seepage driving force tensor is modulated based on the dynamic seepage coefficient tensor to generate a cross-dimensional seepage flux tensor.
[0046] The cross-dimensional percolation flux tensor is aggregated along the dimensional channel and residual fusion is performed with the original dimensionally independent recursive features to output dimensionally coupled percolation features.
[0047] Optionally, S5 specifically includes:
[0048] S51. Based on the predicted interface polarization state space, extract the polarization relaxation time constant and polarization relaxation amplitude, and perform frequency domain transformation on the target command current to extract the time-varying frequency.
[0049] S52. Calculate the frequency-dependent compensation factor based on the polarization relaxation time constant and the time-varying frequency, perform a product operation between the frequency-dependent compensation factor and the polarization relaxation amplitude, and output the dynamic polarization compensation coefficient.
[0050] S53. Perform amplitude scaling operation on the target command current based on the dynamic polarization compensation coefficient to generate polarization distortion offset current component. Perform summation operation on the target command current and polarization distortion offset current component to output the initial compensation drive current.
[0051] Optionally, S6 specifically includes:
[0052] S61. Real-time junction temperature T and collector current I of the core transistor in the drive output channel. C Based on V BE -TI C Characteristic curves, which correlate the real-time junction temperature T with the collector current I C Substituting into the preset temperature compensation formula, calculate the emitter junction voltage V after temperature drift compensation. BE ;
[0053] S62. Fit the voltage and current nonlinear mapping relationship based on the voltage and current sampling sequence of the drive output channel, perform point-by-point differentiation on the voltage and current nonlinear mapping relationship to calculate the transient gain coefficient, extract the tangent slope at the zero point as the reference gain, perform difference operation on the transient gain coefficient and the reference gain to generate the gain distortion coefficient, and perform product operation on the gain distortion coefficient and the initial compensation drive current to output the distortion compensation term.
[0054] S63. Extract the inverse function mapping coefficients based on the voltage-current nonlinear mapping relationship, and combine them with the emitter junction voltage V. BE The initial compensation drive current is subjected to inverse offset mapping with the inverse function mapping coefficients to output linearized compensation code;
[0055] S64. Perform a summation operation between the linearization compensation code and the distortion compensation term, and output the digital domain driven code.
[0056] Optionally, S7 specifically includes:
[0057] S71. Calculate the Boost target voltage value V based on the digital domain drive code. H Based on the target voltage value V H With input low voltage V L The ratio is used to calculate the PWM0 duty cycle to generate the Boost compensation value; at the same time, the alternating conduction logic is extracted according to the digital domain drive code to generate an H-bridge timing control signal containing dead time and rest time; the Boost compensation value is used as the power supply reference, and the H-bridge timing control signal is combined to output a modified amplitude pulse sequence for tissue stimulation;
[0058] S72, Collect the actual load current I flowing through the sampling resistor load Calculate the target command current I set With actual load current I load The error ΔI is input into the PID controller to calculate and generate the voltage compensation increment ΔV. H The voltage compensation increment ΔV H Superimposed on the target voltage value V HGenerate the final boost target voltage, and dynamically update the PWM0 duty cycle based on the final boost target voltage to correct the Boost boost compensation value in a closed loop and generate the updated Boost boost compensation value.
[0059] S73. Based on the falling edge time of the modified amplitude pulse sequence, generate a period end marker to trigger the interval timing, extract the cumulative energy of the modified amplitude pulse sequence and the decay time constant of the historical time domain relaxation feature sequence, perform a product operation based on the cumulative energy and the decay time constant to output the relaxation recovery judgment duration, and output a re-probe trigger signal when the interval timing duration reaches the relaxation recovery judgment duration.
[0060] S74. In response to the re-detection trigger signal, inject microcurrent detection excitation into the target tissue, collect the time-domain response voltage signal of the target tissue, perform feature extraction on the time-domain response voltage signal, and output the time-domain relaxation feature sequence.
[0061] The beneficial effects of this invention are:
[0062] (1) This invention achieves deep decoupling of hardware parasitic response and electrochemical interface response and pure polarization state reconstruction by constructing a cascaded feature extraction process of source separation decoupling and time-domain orthogonal decoupling. Based on the statistical distribution characteristics of the time-domain relaxation feature sequence, the transient hardware response decay parameters are estimated, parasitic charge-discharge decay components are extracted and differential elimination is performed. Combined with the sampled current at the current stimulus pulse cutoff time, the time-domain orthogonal projection basis vector is calculated. Orthogonal projection transformation is performed to separate the transient current response component and the interface polarization relaxation component, and the current interface polarization state space is reconstructed by dimension reduction projection. This process accurately decomposes the mixed relaxation response signal to an independent physical source, completely filters out the parasitic charge-discharge interference introduced by the hardware circuit, and provides a high-purity state input containing only the true electrochemical polarization kinetic characteristics.
[0063] (2) This invention introduces a potential energy percolation mechanism using an improved IndRNN model, establishing a decoupled tracking and cross-dimensional coupling reconstruction system for multi-dimensional polarization effects. The time-domain independent recursive layer performs recursive accumulation calculations without cross-channel interaction along the time axis for each physical dimension, accurately tracking the single-dimensional decay trajectory; the potential energy percolation reconstruction layer maps the dimension-independent recursive features to the potential energy space, calculates the percolation potential energy difference between any two physical dimensions as the cross-dimensional percolation driving force, adaptively extracts the dynamic percolation coefficient, performs modulation operations to generate cross-dimensional percolation flux, aggregates the percolation flux along the dimensional channel, and performs residual fusion with the original recursive features; the inter-layer nonlinear fusion layer adaptively calculates the inter-layer fusion weights based on statistical distribution characteristics, performs fully connected mapping and nonlinear activation. This system, through independent channel temporal recursion, potential energy difference-driven percolation modulation, and adaptive nonlinear fusion, realizes the reconstruction from single-dimensional independent evolution to cross-dimensional coupling, ensuring that the output prediction interface polarization state space accurately captures the dynamic coupling law of multi-dimensional polarization effects.
[0064] (3) This invention achieves triple offsetting of electrochemical polarization distortion, device temperature drift offset, and circuit nonlinear distortion by constructing a joint compensation process of feedforward polarization compensation mapping, temperature adaptive compensation, and inverse propagation distortion cancellation superposition. Based on the predicted interface polarization state space, the polarization relaxation time constant and polarization relaxation amplitude are extracted to calculate the frequency-dependent compensation factor. The target command current is scaled to generate the polarization distortion offset current component. The real-time junction temperature and collector current of the core transistor driving the output channel are collected, based on V BE -TI C The characteristic curve is used to calculate the temperature drift compensation, and the distortion compensation term is derived by combining the channel nonlinear mapping relationship to perform inverse mapping and distortion cancellation, generating digital domain drive code. This process simultaneously eliminates current waveform distortion caused by interface polarization, parameter drift caused by core device heating, and gain offset caused by drive channel nonlinearity through cascaded operations of polarization state feedforward offset, real-time device temperature drift correction, and circuit inverse mapping.
[0065] (4) This invention achieves dynamic and accurate calibration of the output current and high-precision stability across the entire range by constructing a collaborative closed-loop control system for Boost voltage boosting and constant current output. The Boost voltage boosting target voltage value is calculated based on the digital domain drive code to generate the Boost voltage boosting compensation value and H-bridge timing control signal. Simultaneously, the error between the actual load current and the target command current is collected. The voltage compensation increment is calculated by the PID controller and superimposed to generate the final boosting target voltage. The PWM0 duty cycle is dynamically updated to correct the Boost voltage boosting compensation value in a closed loop. This mechanism, through the dual regulation of "feedforward temperature compensation + PID closed-loop feedback," effectively overcomes random deviations such as load impedance fluctuations and line losses, ensuring that the output current always matches the set value across the entire range of 0~100mA (especially in the low current region), significantly improving the long-term accuracy and safety of the electrical stimulation output. Attached Figure Description
[0066] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0067] Figure 1 This is an overall flowchart of an artificial intelligence-based adaptive control method for electrical stimulation output accuracy proposed in this invention.
[0068] Figure 2 This is a flowchart illustrating the working principle of the improved IndRNN model for an artificial intelligence-based adaptive control method for electrical stimulation output accuracy proposed in this invention. Detailed Implementation
[0069] The invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0070] refer to Figure 1 and Figure 2 An adaptive control method for electrical stimulation output accuracy based on artificial intelligence, specifically including:
[0071] S1. During the interval between the end of the current stimulation pulse, detect the charge transfer relaxation process at the interface between the electrode and the tissue to obtain the temporal relaxation feature sequence.
[0072] S2. The time-domain relaxation feature sequence is decoupled from the transient hardware response and the electrochemical interface response according to the physical cause, the parasitic charge-discharge decay component is removed, and the parasitic interference-free relaxation feature sequence is reconstructed.
[0073] S3. Perform time-domain orthogonal decoupling between the deparasitic interference relaxation feature sequence and the sampling current at the current stimulus pulse cutoff time, and extract the current interface polarization state space.
[0074] S4. Input the current interface polarization state space obtained from continuous historical cycles into the improved IndRNN model, perform decoupling recursive tracking of decay trajectory along the time axis for each physical dimension, introduce potential energy percolation mechanism to construct potential energy field based on recursive features, reconstruct interdimensional coupling effect through dynamic percolation driven by cross-dimensional potential energy difference, and adaptively nonlinearly fuse multi-dimensional polarization effect to output the predicted interface polarization state space.
[0075] S5. Obtain the input target command current, perform feedforward polarization compensation mapping on the target command current based on the predicted interface polarization state space, offset the electrochemical interface polarization distortion component, and output the initial compensation driving current.
[0076] S6. Acquire the real-time junction temperature and collector current of the core transistor in the drive output channel, based on V. BE -TI C The temperature drift compensation amount is calculated using the characteristic curve, and distortion cancellation is performed on the initial compensation drive current in combination with the channel nonlinear mapping relationship to generate digital domain drive code.
[0077] S7. Generate Boost compensation value and H-bridge timing control signal based on the digital domain driving code to output corrected amplitude pulse for tissue stimulation. At the same time, perform closed-loop feedback calibration based on the error between the actual load current and the target command current to dynamically correct the Boost compensation value. Re-trigger detection during the interval after the end of the current stimulation cycle and return to obtain the time domain relaxation feature sequence.
[0078] In this embodiment, S1 specifically includes:
[0079] S11. During the interval between the end of the current stimulation pulse, the relaxation response electrical signal of the probe electrode and the tissue interface is acquired. The relaxation response electrical signal is discretized in the time domain to generate a decay response sequence. The mean and standard deviation of the decay response sequence are calculated. The mean and three times the standard deviation are added to calculate the dynamic truncation threshold. Data points in the decay response sequence that are greater than the dynamic truncation threshold are set to zero and truncation filtering is performed. The filtered decay response sequence is normalized and binary hash encoded to output the original relaxation feature sequence.
[0080] S12. Read the original relaxation feature sequence, search for the point with the maximum absolute value of the amplitude in the original relaxation feature sequence as the amplitude extremum point and record the corresponding time position. Divide the value of the amplitude extremum point by the natural constant e raised to the power of 0.01 seconds to estimate and generate the initial time constant 0.01 seconds. Calculate the transient decay factor by exponentially multiplying the amplitude extremum point value and the natural constant e by the initial time constant 0.01 seconds. Perform point-by-point multiplication on the amplitude extremum point value and the transient decay factor to generate the fitted decay sequence. Calculate the point-by-point residual between the original relaxation feature sequence and the fitted decay sequence. Based on the point-by-point residual... An initial time constant of 0.01 seconds is used to perform gradient descent correction iterations with a step size of 0.001 seconds until the sum of squared residuals is minimized, outputting the dynamic decay time constant. A truncation time window is determined based on 5 times the value of the dynamic decay time constant. The tail subsequence is extracted by truncating the original relaxed feature sequence based on the truncation time window. The mean of the tail subsequence is calculated to determine the steady-state response reference baseline. The steady-state response baseline value is extracted by performing point-by-point difference operation between the original relaxed feature sequence and the steady-state response reference baseline. The dynamic decay time constant and the steady-state response baseline value are concatenated as a vector to output the relaxation dynamic parameter set.
[0081] S13. Input the relaxation dynamics parameter set into the hyperbolic tangent activation function tanh to perform nonlinear mapping to generate a normalized dynamics eigenvector. Calculate the interval width of 0.01 seconds for the dynamic decay time constant and the interval width of 10 microvolts for the steady-state response baseline value in the relaxation dynamics parameter set. Divide the dynamic decay time constant by the interval width of 0.01 seconds and round it to perform interval quantization. Divide the steady-state response baseline value by the interval width of 10 microvolts and round it to perform interval quantization. Concatenate the normalized dynamics eigenvector with the quantized dynamic decay time constant and steady-state response baseline value in chronological order to output the relaxation state evolution sequence.
[0082] In this embodiment, the parameterization and analysis of the attenuation response specifically includes:
[0083] The point with the maximum absolute value of the amplitude in the original relaxed feature sequence is searched to determine the extreme point of the amplitude and the corresponding time position is recorded. The time position of the extreme point of the amplitude is used as the initial time constant 0.01 seconds. The natural constant e is calculated by exponentially raising the natural constant e to the initial time constant 0.01 seconds to generate the transient decay factor.
[0084] The extreme points of amplitude and the transient decay factor are multiplied point by point to generate a fitted decay sequence. The point-by-point residual between the original relaxation feature sequence and the fitted decay sequence is calculated. Gradient descent correction is performed on the initial time constant of 0.01 seconds with a step size of 0.001 seconds until the sum of squares of the point-by-point residuals is minimized. The dynamic decay time constant is then output.
[0085] Five times the value of the dynamic decay time constant is set as the truncation time window. Based on the truncation time window, the tail subsequence is extracted by truncating the original relaxation feature sequence. The mean of the tail subsequence is calculated to determine the steady-state response reference baseline. The steady-state response baseline value is extracted by performing point-by-point difference operation between the original relaxation feature sequence and the steady-state response reference baseline. The dynamic decay time constant and the steady-state response baseline value are vector concatenated to output the relaxation dynamic parameter set.
[0086] In this embodiment, S2 specifically includes:
[0087] S21. Calculate the mean and standard deviation of the time-domain relaxation feature sequence. Set the mean minus twice the standard deviation as the fast decay search threshold. Extract the data points in the time-domain relaxation feature sequence that are first less than the fast decay search threshold as the transient hardware response starting points. Set the absolute value of the amplitude at the starting point to the initial hardware amplitude of 0.5 mV. Set the time coordinate of the starting point to the initial time zero point of 0 ms. Set the preset value of the hardware decay time constant to 0.05 ms. Perform exponential decay calculation on the initial hardware amplitude of 0.5 mV and the natural constant e according to the preset value of the hardware decay time constant of 0.05 ms to generate transient hardware response decay parameters. Use the transient hardware response decay parameters to perform parameterized analysis on the time-domain relaxation feature sequence. Calculate and extract the parasitic charge and discharge decay components point by point by raising the ratio of the negative time difference between the initial hardware amplitude of 0.5 mV and the natural constant e to the preset value of the hardware decay time constant of 0.05 ms.
[0088] S22. Perform point-by-point difference operation on the time-domain relaxation feature sequence and the extracted parasitic charge-discharge decay component to remove hardware parasitic effects and generate residual relaxation response components.
[0089] S23. Calculate the maximum absolute value of the residual relaxation response component as the reconstruction amplitude scaling factor. Divide the residual relaxation response component by the reconstruction amplitude scaling factor to perform normalization mapping. Input the normalized residual relaxation response component into the hyperbolic tangent activation function tanh to perform nonlinear modulation. Multiply the modulation result by the reconstruction amplitude scaling factor to perform inverse normalization. Perform time-domain reconstruction based on the inverse normalization result and output the parasitic interference-free relaxation feature sequence.
[0090] In the specific implementation process, this implementation method inherits the mathematical processing idea of parametric analysis of relaxation signals in traditional technology, but deeply recognizes the fundamental defect of traditional methods that confuse hardware response with organizational response, resulting in feature extraction distortion. Therefore, it has carried out targeted and in-depth modifications.
[0091] This step abandons the crude methods of directly fitting or filtering the mixed signal in the traditional way. Instead, it is driven by physical causes and pioneers the use of the statistical distribution characteristics of the time-domain relaxation feature sequence itself to accurately estimate the specific transient hardware response decay parameters. Using this as the analytical anchor, the mixed sequence is subjected to targeted parameterization analysis, thereby cleanly and efficiently separating and extracting the charge and discharge decay components that belong to the hardware parasitic characteristics from the mixed signal. Then, the parasitic components are completely removed by explicit difference operation to obtain the residual relaxation response components. Finally, time-domain reconstruction is performed based on the pure residual components.
[0092] This transformation process completely severed the interference coupling between hardware parasitic charging and discharging effects and the real electrochemical response. It solved the problem of inaccurate prediction and compensation distortion of subsequent polarization states caused by the hardware parasitic response masking the real polarization characteristics of the tissue. It produced the beneficial effect of providing the downstream model with a highly pure deparasitic interference relaxation feature sequence, ensuring the accuracy and reliability of the entire closed-loop adaptive control system from the signal source.
[0093] In this embodiment, S3 specifically includes:
[0094] S31. Calculate the mean and variance of the deparasitic relaxation feature sequence, calculate the mean and variance of the sampling current at the current stimulus pulse cutoff time, combine the mean of the deparasitic relaxation feature sequence and the mean of the sampling current at the current stimulus pulse cutoff time into a two-dimensional mean vector, combine the variance of the deparasitic relaxation feature sequence and the variance of the sampling current at the current stimulus pulse cutoff time into a two-dimensional variance vector, divide the two-dimensional mean vector by the Euclidean norm of the two-dimensional variance vector, calculate the normalized mean direction, divide the two-dimensional variance vector by the Euclidean norm of the two-dimensional variance vector, calculate the normalized variance direction, perform Schmitt orthogonalization on the normalized mean direction and the normalized variance direction, and calculate the time-domain orthogonal projection basis vector.
[0095] S32. Construct a 2-row, 2-column orthogonal projection transformation matrix based on the time-domain orthogonal projection basis vectors. Concatenate the parasitic interference-free relaxation feature sequence with the sampled current at the current stimulus pulse cutoff time into a two-dimensional input matrix. Multiply the orthogonal projection transformation matrix by the two-dimensional input matrix to perform orthogonal projection transformation. Extract the elements in the first row of the transformed two-dimensional matrix to generate transient current response components. Extract the elements in the second row of the transformed two-dimensional matrix to generate interface polarization relaxation components.
[0096] S33. Calculate the covariance matrix of the interface polarization relaxation components, solve for the eigenvalues and eigenvectors of the covariance matrix, select the eigenvector corresponding to the largest eigenvalue as the dimension reduction projection direction, project the interface polarization relaxation components onto the dimension reduction projection direction to calculate the one-dimensional principal component score, input the one-dimensional principal component score into the hyperbolic tangent activation function tanh to perform nonlinear mapping, perform affine reconstruction operation on the mapping result and the variance and mean of the interface polarization relaxation components, and output the current interface polarization state space.
[0097] In this embodiment, the improved IndRNN model includes an independent channel mapping layer, a time-domain independent recursive layer, a potential energy percolation reconstruction layer, and an inter-layer nonlinear fusion layer:
[0098] The independent channel mapping layer receives the current interface polarization state space, splits it into 3 independent dimensional subsequences according to the number of physical dimensions of 3, sets the channel projection matrix dimension to 1 row and 128 columns, multiplies each independent dimensional subsequence by the corresponding channel projection matrix and maps it to 128 neuron channels, and outputs dimensionally independent initial features.
[0099] The temporally independent recursive layer inputs the dimensionally independent initial features into the corresponding 128 independent neuron channels, sets the initial value of the independent recursive weight parameter to 0.5, multiplies the neuron state of the previous time step by the recursive weight parameter 0.5 along the time axis, and adds it to the dimensionally independent initial features of the current time step. It performs recursive cumulative calculation without cross-channel interaction on each physical dimension and outputs dimensionally independent recursive features.
[0100] The potential energy permeation reconstruction layer introduces a potential energy permeation mechanism. The potential energy mapping matrix is set to a dimension of 128 rows and 1 column. Dimensionally independent recursive features are multiplied by the potential energy mapping matrix to map to the potential energy space to obtain the permeation potential energy of each physical dimension. The difference in permeation potential energy between any two physical dimensions is calculated as the cross-dimensional permeation driving force. The permeation coefficient weight matrix is set to a dimension of 128 rows and 1 column, with an initial value of 0.1 for the permeation bias term. The current dimensionally independent recursive feature is multiplied by the permeation coefficient weight matrix and the permeation bias term 0.1 is added to calculate the permeation modulation logarithm. The permeation modulation logarithm is input into the sigmoid activation function to calculate a value mapped to between 0 and 1 as the dynamic permeation coefficient. A point-by-point multiplication modulation operation is performed on the cross-dimensional permeation driving force and the dynamic permeation coefficient to generate cross-dimensional permeation flux. The cross-dimensional permeation flux is summed and aggregated along the dimensional channels, and residual fusion is performed with the original dimensionally independent recursive features through element-by-element addition to output the dimensionally coupled permeation feature.
[0101] The mean and variance of the dimensional coupling seepage features calculated by the interlayer nonlinear fusion layer are used as statistical distribution features. The mean and variance are concatenated and then input into the softmax activation function to adaptively calculate the interlayer fusion weights. Based on the interlayer fusion weights, a fully connected mapping is performed on the dimensional coupling seepage features. The mapping result is input into the modified linear unit activation function ReLU to perform a nonlinear activation operation, which integrates the coupling effect of multidimensional polarization effects and outputs the predicted interface polarization state space.
[0102] This step abandons the recursive calculation and static linear feature fusion mode of cross-channel weight entanglement in traditional networks. It pioneers a physical prior-driven network architecture of "decoupling and tracking first, then percolation reconstruction". By using independent channel mapping layers and temporal independent recursive layers, it forces each physical dimension to perform pure recursive accumulation without cross-channel interaction in independent neuron channels, accurately tracking the single-dimensional decay trajectory. Then, the core introduces a potential energy percolation mechanism to map the dimension-independent recursive features to the potential energy space. It innovatively uses the percolation potential energy difference between any two physical dimensions as the driving force for cross-dimensional percolation, and adaptively extracts the dynamic percolation coefficient to perform modulation operation to generate cross-dimensional percolation flux. After aggregation along the dimensional channel, it is fused with the original recursive feature residual to reconstruct the coupling effect between dimensions. Finally, the inter-layer nonlinear fusion layer adaptively calculates the weights based on statistical distribution characteristics to complete the nonlinear mapping.
[0103] This transformation process completely breaks through the bottleneck of traditional black-box networks in modeling multidimensional polarization coupling effects with distortion. It solves the technical problem of the intertwining of multidimensional polarization effects and the difficulty in accurately analyzing and predicting dynamic nonlinear coupling at complex electrochemical interfaces. It produces the beneficial effect of accurately reconstructing multidimensional dynamic coupling laws while maintaining the purity of single-dimensional time series and achieving highly accurate prediction of interface polarization states. It provides advanced and extremely reliable state basis for subsequent accurate feedforward compensation.
[0104] In this embodiment, the potential energy seepage mechanism specifically includes:
[0105] Based on the dimensionally independent recursive features of the current time step, the transformation weight matrix is set to 128 rows and 128 columns. The dimensionally independent recursive features are multiplied by the transformation weight matrix to perform feature space transformation, and the output results are reorganized according to the three physical dimensions to dynamically calculate and generate the potential energy mapping weight matrix.
[0106] Based on the potential energy mapping weight matrix, linear projection is performed on the dimension-independent recursive features to map the dimension-independent recursive features to the potential energy space to obtain the seepage potential energy of each physical dimension and generate the dimension-independent seepage potential energy tensor.
[0107] Perform feature copying and dimension transpose operations on the dimension-independent seepage potential energy tensor to expand the 1-dimensional channel axis into a 3-row, 3-column 2D interactive grid, and construct the source dimension potential energy tensor and the target dimension potential energy tensor.
[0108] Perform a bitwise subtraction operation on the source dimension potential energy tensor and the target dimension potential energy tensor to calculate the seepage potential energy difference between any two physical dimensions as the cross-dimensional seepage driving force, and generate the cross-dimensional seepage driving force tensor.
[0109] The seepage modulation weight matrix is set to have a dimension of 128 rows and 1 column, and the initial value of the modulation bias term is 0.1. Based on the dimension-independent recursive features of the current time step, the seepage modulation weight matrix is multiplied and the modulation bias term of 0.1 is added to perform parallel feature mapping. The seepage source dimension modulation factor and the seepage target dimension modulation factor are extracted separately to generate the first dynamic seepage modulation operator and the second dynamic seepage modulation operator.
[0110] Based on the first dynamic percolation modulation operator and the second dynamic percolation modulation operator, a symmetric feature transformation is performed on the dimensionally independent recursive features of the current time step. The dimensionally independent recursive features are multiplied by the first dynamic percolation modulation operator and the second dynamic percolation modulation operator respectively to generate the first mapping feature and the second mapping feature.
[0111] The first mapping feature and the second mapping feature are respectively input into the sigmoid activation function to perform nonlinear mapping, and the first dynamic permeability scalar and the second dynamic permeability scalar are calculated and generated; the first dynamic permeability scalar is subjected to feature copying and expansion operation along the physical dimension channel to generate the first permeability source dimension tensor;
[0112] Perform a dimension transpose expansion operation on the second dynamic penetration rate scalar to generate a target dimension tensor for the second penetration rate.
[0113] Perform a bitwise multiplication and fusion operation on the first permeability source dimension tensor and the second permeability target dimension tensor to construct an anisotropic two-dimensional interactive mesh and generate a dynamic permeation coefficient tensor.
[0114] Element-wise multiplication is performed on the cross-dimensional seepage driving force tensor and the dynamic seepage coefficient tensor. The cross-dimensional seepage driving force tensor is modulated based on the dynamic seepage coefficient tensor to generate the cross-dimensional seepage flux tensor.
[0115] The cross-dimensional percolation flux tensor is summed and aggregated along the dimensional channels, and residual fusion is performed with the original dimensionally independent recursive features by element-wise addition, outputting dimensionally coupled percolation features.
[0116] In this embodiment, S5 specifically includes:
[0117] S51. Read the polarization state space of the prediction interface, extract the time constant dimension value as the polarization relaxation time constant 0.05 seconds, extract the amplitude dimension value as the polarization relaxation amplitude 1.2 millivolts, perform a fast Fourier transform on the target command current, and extract the frequency value corresponding to the maximum peak value of the spectrum amplitude as the time-varying frequency 50 Hz.
[0118] S52. Divide the value 1 by the polarization relaxation time constant 0.05 seconds to generate a polarization characteristic angular frequency of 20 radians per second. Multiply the polarization characteristic angular frequency of 20 radians per second with the angular frequency of 314.16 radians per second corresponding to the extracted time-varying frequency of 50 Hz. Add the value 1 and calculate the square root. Take the reciprocal of the square root to generate a frequency dependence compensation factor of 0.056. Multiply the frequency dependence compensation factor of 0.056 with the extracted polarization relaxation amplitude of 1.2 millivolts to output a dynamic polarization compensation coefficient of 0.067 milliamperes.
[0119] S53. Based on the dynamic polarization compensation coefficient of 0.067 mA, perform point-by-point amplitude scaling operation on the target command current, divide the target command current by 1 mA to extract the dimensionless current scaling factor, multiply the dynamic polarization compensation coefficient of 0.067 mA by the dimensionless current scaling factor to generate the polarization distortion offset current component, perform point-by-point summation operation on the target command current and the polarization distortion offset current component, and output the initial compensation drive current.
[0120] In this embodiment, S6 specifically includes:
[0121] S61. Real-time junction temperature T and collector current of the core transistor in the acquisition drive output channel. Based on V BE -TI C Characteristic curves, which correlate real-time junction temperature T with collector current Substituting the preset temperature compensation formula, calculate the emitter junction voltage after temperature drift compensation. ;
[0122] The temperature compensation formula is as follows:
[0123] ;
[0124] in, This represents the emitter-junction voltage after temperature drift compensation, corresponding to the real-time junction temperature and collector current of the core transistor. The reference voltage value is the value at room temperature; T is the real-time junction temperature of the core transistor in the channel. This is the temperature value at room temperature; This is the collector current; This is the collector current at room temperature; for Temperature coefficient, silicon tube (follow) (Slightly different); k is the Boltzmann constant ( ); q is the electron charge ( C);
[0125] S62. Extract statistical distribution features from the voltage and current sampling sequence of the drive output channel, perform polynomial fitting based on the statistical distribution features to generate a nonlinear voltage-current mapping relationship, perform point-by-point differentiation on the nonlinear voltage-current mapping relationship to calculate the transient gain coefficient, extract the tangent slope at the zero point as the reference gain, perform difference operation between the transient gain coefficient and the reference gain to generate the gain distortion coefficient, and perform product operation between the gain distortion coefficient and the initial compensation drive current to output the distortion compensation term.
[0126] S63. Extract the inverse function mapping coefficients of the inverse function based on the voltage-current nonlinear mapping relationship, and combine them with the emitter junction voltage V. BE The inverse function mapping coefficients are used to perform a reverse offset mapping on the initial compensation drive current, and the output is a linearized compensation code;
[0127] S64. Perform a summation operation on the linearization compensation code and the distortion compensation term, and output the digital field driven code.
[0128] In this embodiment, S7 specifically includes:
[0129] S71. Calculate the target voltage value V of the Boost converter based on the digital domain drive code. H Based on the target voltage value V H With input low voltage V L The ratio is used to calculate the PWM0 duty cycle to generate the Boost compensation value; at the same time, the alternating conduction logic is extracted based on the digital domain drive code to generate the H-bridge timing control signal containing dead time and rest time; the Boost compensation value is used as the power supply reference, and the H-bridge timing control signal is combined to output the corrected amplitude pulse sequence for tissue stimulation;
[0130] S72, Collect the actual load current I flowing through the sampling resistor load Calculate the target command current I set With actual load current I load The error ΔI is input into the PID controller to calculate and generate the voltage compensation increment ΔV. H The voltage compensation increment ΔV H Superimposed on the target voltage value V H Generate the final boost target voltage, dynamically update the PWM0 duty cycle based on the final boost target voltage, and use closed-loop correction of the Boost boost compensation value to generate the updated Boost boost compensation value;
[0131] S73. Based on the falling edge time of the modified amplitude pulse sequence, generate a period end marker to trigger the interval timing, extract the cumulative energy of the modified amplitude pulse sequence and the decay time constant of the historical time domain relaxation feature sequence, perform a product operation based on the cumulative energy and the decay time constant to output the relaxation recovery judgment duration, and output a re-probe trigger signal when the interval timing duration reaches the relaxation recovery judgment duration.
[0132] S74. In response to the re-detection trigger signal, inject microcurrent detection excitation into the target tissue, collect the time-domain response voltage signal of the target tissue, perform feature extraction on the time-domain response voltage signal, and output the time-domain relaxation feature sequence.
[0133] Example 1: To verify the feasibility of this invention in adaptive control of neural electrical stimulation output accuracy, the method of this invention was applied to the deep brain stimulation (DBS) clinical system of a neuromedical research center (hereinafter referred to as "Center N"). In traditional neural electrical stimulation systems, open-loop drive or single-step feedback compensation strategies based on static circuit parameters are usually adopted. These methods not only make it difficult to accurately separate the hardware parasitic response from the tissue electrochemical response, but also ignore the temperature drift problem of key parameters caused by heat generation when the core driving device (such as MOSFET or transistor) is operating in the amplification region, which can easily lead to severe distortion of the stimulation current waveform, accuracy decay in the low current region, and tissue safety risks. To solve the above problems, Center N decided to adopt the artificial intelligence-based adaptive control method for electrical stimulation output accuracy proposed in this invention.
[0134] During implementation, center N first uses implanted electrodes and driving circuits to detect the charge transfer relaxation process during the interval between the end of the current stimulation pulse. It acquires the relaxation response electrical signal and performs time-domain discretization sampling to generate a decay response sequence. Based on statistical distribution, a dynamic truncation threshold is determined, and truncation filtering and feature encoding are performed to output the original relaxation feature sequence. Subsequently, parameterized analytical decoupling of the decay response is performed to extract the dynamic decay time constant and the steady-state response baseline value, generating a relaxation dynamics parameter set. After nonlinear mapping and interval quantization, the relaxation state evolution sequence is output as the time-domain relaxation feature sequence.
[0135] Center N uses source separation decoupling and time-domain orthogonal decoupling mechanisms to estimate transient hardware response decay parameters based on the statistical distribution characteristics of the time-domain relaxation feature sequence, extracts parasitic charge-discharge decay components and performs difference removal, outputs a parasitic interference-free relaxation feature sequence, calculates the time-domain orthogonal projection basis vector by combining the sampled current at the current stimulus pulse cutoff time, performs orthogonal projection transformation to separate transient current response components and interface polarization relaxation components, and reconstructs the current interface polarization state space by dimension reduction projection. Next, the current interface polarization state space obtained from continuous historical cycles is input into the improved IndRNN model. The independent channel mapping layer and the temporal independent recursive layer perform recursive cumulative calculations along the time axis for each physical dimension without cross-channel interaction, outputting dimension-independent recursive features. The potential energy permeation reconstruction layer maps the dimension-independent recursive features to the potential energy space to calculate the permeation potential energy difference as the cross-dimensional permeation driving force, adaptively extracts the dynamic permeation coefficient, performs modulation operations to generate cross-dimensional permeation flux, and performs residual fusion to reconstruct the inter-dimensional coupling effect. The inter-layer nonlinear fusion layer adaptively calculates the inter-layer fusion weights based on statistical distribution characteristics, performs fully connected mapping and nonlinear activation, and outputs the predicted interface polarization state space.
[0136] In the core compensation and hardware driver generation stage, this invention extracts the polarization relaxation time constant and calculates the frequency-dependent compensation factor for the polarization relaxation amplitude based on the predicted interface polarization state space. It then performs amplitude scaling on the target command current to generate the polarization distortion offset current component, outputting the initial compensation drive current. Subsequently, addressing the accuracy bottleneck caused by transistor temperature drift, it collects the real-time junction temperature and collector current of the core transistor in the drive output channel, based on V... BE -TI C Substituting the characteristic curve into the preset temperature compensation formula, the emitter-junction voltage V after temperature drift compensation is calculated. BE Combine the voltage-current nonlinear mapping relationship to extract the inverse function mapping coefficients, and use the emitter junction voltage V BE The inverse function mapping coefficients are used to perform reverse offset mapping and distortion cancellation on the initial compensation drive current to generate digital domain drive codes.
[0137] In the final output stage, the target boost voltage V is calculated based on the digital domain drive code. H Based on the target voltage value V H With input low voltage V LThe ratio is used to calculate the PWM0 duty cycle to generate the Boost compensation value. Simultaneously, based on the digital domain drive encoding, the alternating conduction logic is extracted to generate an H-bridge timing control signal containing dead time and rest time to prevent bridge arm shoot-through short circuits. The Boost compensation value is used as the power supply reference, and combined with the H-bridge timing control signal, a corrected amplitude pulse sequence is output for stimulation. Simultaneously, the actual load current flowing through the sampling resistor is collected, the error between the target command current and the actual load current is calculated, and input to the PID controller. Voltage compensation increments are generated and superimposed to produce the final boost target voltage. The PWM0 duty cycle is dynamically updated to correct the Boost compensation value in a closed loop. During the interval, the relaxation recovery time is adaptively determined based on the pulse accumulated energy and decay time constant to re-trigger the detection, achieving a complete leap from state awareness and temperature drift offsetting to closed-loop calibration.
[0138] During implementation, the technical team at Center N discovered that, compared to traditional open-loop drive and conventional linear compensation methods, the method of this invention significantly improves the fidelity and safety of the electrical stimulation current output. Traditional methods cannot address low-current fluctuations caused by device temperature drift and have poor compensation effects for cross-cycle multi-dimensional polarization coupling effects. In contrast, the method of this invention, through source separation decoupling, potential energy percolation cross-dimensional coupling reconstruction, and combined with V... BE -TI C Temperature drift compensation and PID dynamic closed-loop calibration effectively achieve accurate output of the stimulation current waveform and complete elimination of polarization cumulative distortion.
[0139] To further verify the actual performance of the method of the present invention, Center N conducted a detailed comparative test between the method of the present invention and the traditional method. The specific performance data is shown in Table 1:
[0140] Table 1. Performance Comparison of Adaptive Control Methods for Central N-Stimulation Output Accuracy
[0141]
[0142] As can be seen from Table 1, the control precision of the neural electrical stimulation system was comprehensively improved after applying the method of this invention. This is thanks to V BE -TI C The temperature compensation and PID closed-loop mechanism significantly reduced temperature drift fluctuation in the low-current region from 8.5% to 0.4%, decreased the steady-state error of current output from 15.2% to 1.8% using traditional methods, and reduced the residual polarization distortion rate from 22.5% to 2.4%, thereby significantly improving the accuracy of current output and providing reliable assurance for clinical treatment. Hardware parasitic interference suppression improved from 18.5dB to 42.0dB, effectively filtering out spurious responses at the hardware level. The mean square error of cross-cycle polarization prediction decreased from 85.0... Significantly reduced to 6.5 The system's ability to perceive complex interface states has been significantly enhanced. Furthermore, the setting of the H-bridge dead time and precise current control prevented bridge arm short circuits and high-current surges, reducing the number of tissue safety threshold exceedances from 8.5 times / thousand cycles to 0.2 times / thousand cycles, and increasing the clinical treatment effectiveness from 68.0% to 92.0%, significantly ensuring stimulation safety and improving treatment efficacy. Single-channel computation time was reduced from 450 microseconds to 120 microseconds, meeting the real-time requirements of high-density stimulation. Electrode lifespan decay rate decreased from 3.5% / month to 0.8% / month, significantly extending the service life of the implanted device.
[0143] Through the method of this invention, Center N successfully achieved precise hedging of polarization distortion at the neuro-electric stimulation interface, adaptive compensation for hardware temperature drift, and closed-loop control of current output. This effectively reduced waveform distortion and tissue damage risks, ensured the long-term safe operation of electrical stimulation therapy, significantly improved the intelligence and digitalization level of the neuromodulation system, significantly reduced the parameter adjustment burden on clinicians, and enhanced the stability and robustness of the stimulation system. This provides strong technical support for the research and development of precise neuromodulation medical equipment.
[0144] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An adaptive control method for electrical stimulation output accuracy based on artificial intelligence, characterized in that, Includes the following steps: S1. During the interval between the end of the current stimulation pulse, detect the charge transfer relaxation process at the interface between the electrode and the tissue to obtain the temporal relaxation feature sequence. S2. The time-domain relaxation feature sequence is decoupled from the transient hardware response and the electrochemical interface response according to the physical cause, the parasitic charge-discharge decay component is removed, and the parasitic interference-free relaxation feature sequence is reconstructed. S3. Perform time-domain orthogonal decoupling between the deparasitic interference relaxation feature sequence and the sampling current at the current stimulus pulse cutoff time, and extract the current interface polarization state space. S4. Input the current interface polarization state space obtained from continuous historical cycles into the improved IndRNN model, perform decoupling recursive tracking of decay trajectories for each physical dimension along the time axis, introduce a potential energy permeation mechanism to construct a potential energy field based on recursive features, reconstruct the interdimensional coupling effect through dynamic permeation, and integrate multi-dimensional polarization effects to output the predicted interface polarization state space. S5. Obtain the input target command current, perform feedforward polarization compensation mapping on the target command current based on the predicted interface polarization state space, offset the electrochemical interface polarization distortion component, and output the initial compensation driving current. S6. Acquire the real-time junction temperature and collector current of the core transistor in the drive output channel, based on V. BE -TI C The temperature drift compensation amount is calculated using the characteristic curve, and distortion cancellation is performed on the initial compensation drive current in combination with the channel nonlinear mapping relationship to generate digital domain drive code. S7. Generate Boost compensation value and H-bridge timing control signal based on the digital domain driving code to output corrected amplitude pulse for tissue stimulation. At the same time, perform closed-loop feedback calibration based on the error between the actual load current and the target command current to dynamically correct the Boost compensation value. Re-trigger detection during the interval after the end of the current stimulation cycle and return to obtain the time domain relaxation feature sequence.
2. The adaptive control method for electrical stimulation output accuracy based on artificial intelligence according to claim 1, characterized in that, S1 specifically includes: S11. Acquire the relaxation response electrical signal at the interface between the probe electrode and the tissue during the interval after the current stimulation pulse ends. Perform time-domain discretization sampling on the relaxation response electrical signal to generate an attenuation response sequence. Determine the dynamic truncation threshold based on the statistical distribution of the attenuation response sequence. Perform truncation filtering and feature encoding on the attenuation response sequence based on the dynamic truncation threshold to output the original relaxation feature sequence. S12. Perform attenuation response parameterization analysis based on the original relaxation feature sequence, decouple and extract the dynamic attenuation time constant of charge transfer and the steady-state response baseline value, and combine them to generate a relaxation dynamic parameter set. S13. Perform nonlinear mapping based on the relaxation dynamics parameter set, and perform interval quantization based on the relaxation dynamics parameter set. Arrange the mapping and quantization results in time sequence and output the relaxation state evolution sequence.
3. The adaptive control method for electrical stimulation output accuracy based on artificial intelligence according to claim 2, characterized in that, The parameterization and analysis of the attenuation response specifically includes: The initial time constant is estimated based on the amplitude extrema and time position of the original relaxed feature sequence. The transient decay factor is generated by exponentially calculating the amplitude extrema and natural constant according to the initial time constant. The fitted decay sequence is generated by performing point-by-point multiplication operation on the amplitude extrema and transient decay factor. Calculate the pointwise residual between the original relaxed feature sequence and the fitted decay sequence, perform gradient descent correction on the initial time constant based on the pointwise residual, and output the dynamic decay time constant; The truncation time window is determined based on the dynamic decay time constant. The tail subsequence is extracted by truncating the original relaxation feature sequence based on the truncation time window. The mean of the tail subsequence is calculated to determine the steady-state response reference baseline. The point-by-point difference operation is performed between the original relaxation feature sequence and the steady-state response reference baseline to extract the steady-state response baseline value. The dynamic decay time constant and the steady-state response baseline value are concatenated by an execution vector to output a set of relaxation dynamic parameters.
4. The adaptive control method for electrical stimulation output accuracy based on artificial intelligence according to claim 1, characterized in that, S2 specifically includes: S21. Estimate transient hardware response attenuation parameters based on statistical distribution characteristics of time-domain relaxation feature sequences, perform parameterized analysis on time-domain relaxation feature sequences based on transient hardware response attenuation parameters, and extract parasitic charge-discharge attenuation components. S22. Perform a difference operation between the time-domain relaxation feature sequence and the parasitic charge-discharge decay component to generate the residual relaxation response component. S23. Perform time-domain reconstruction based on residual relaxation response components and output parasitic interference-free relaxation feature sequence.
5. The adaptive control method for electrical stimulation output accuracy based on artificial intelligence according to claim 1, characterized in that, S3 specifically includes: S31. Based on the parasitic interference relaxation feature sequence and the statistical distribution characteristics of the sampled current at the current stimulus pulse cutoff time, calculate the time-domain orthogonal projection basis vector. S32. Based on the time-domain orthogonal projection basis vector, perform orthogonal projection transformation on the deparasitic interference relaxation feature sequence and the sampled current at the current stimulus pulse cutoff time to separate and generate transient current response components and interface polarization relaxation components. S33. Perform dimensionality reduction projection and state reconstruction based on the interface polarization relaxation components, and output the current interface polarization state space.
6. The adaptive control method for electrical stimulation output accuracy based on artificial intelligence according to claim 1, characterized in that, The improved IndRNN model includes an independent channel mapping layer, a time-domain independent recursive layer, a potential energy percolation reconstruction layer, and an inter-layer nonlinear fusion layer: The independent channel mapping layer is used to receive the current interface polarization state space, split the temporal sequence of each physical dimension in the current interface polarization state space into independent dimension sub-sequences, map each independent dimension sub-sequence to its respective neuron channel through the corresponding channel projection matrix, and output dimension-independent initial features. The time-domain independent recursive layer is used to input dimension-independent initial features into the corresponding independent neuron channels, and based on the independent recursive weight parameters of each independent neuron channel, to perform recursive cumulative calculations without cross-channel interaction along the time axis for each physical dimension, and output dimension-independent recursive features. The potential energy permeation reconstruction layer is used to introduce a potential energy permeation mechanism, which maps dimensionally independent recursive features to the potential energy space to obtain the permeation potential energy of each physical dimension, calculates the permeation potential energy difference between any two physical dimensions as the cross-dimensional permeation driving force, adaptively extracts dynamic permeation coefficients based on the current dimensionally independent recursive features, performs modulation operations on the cross-dimensional permeation driving force and the dynamic permeation coefficients to generate cross-dimensional permeation flux, aggregates the cross-dimensional permeation flux along the dimensional channels, and performs residual fusion with the original dimensionally independent recursive features to output dimensionally coupled permeation features. The interlayer nonlinear fusion layer is used to extract the statistical distribution features of the dimensional coupling seepage features, adaptively calculate the interlayer fusion weights based on the statistical distribution features, perform fully connected mapping and nonlinear activation operations on the dimensional coupling seepage features based on the interlayer fusion weights, fuse the coupling effect of multi-dimensional polarization effects, and output the predicted interface polarization state space.
7. The adaptive control method for electrical stimulation output accuracy based on artificial intelligence according to claim 6, characterized in that, The potential energy permeation mechanism specifically includes: Based on the dimension-independent recursive features at the current time step, perform feature space transformation and dimension reorganization, and dynamically calculate and generate the potential energy mapping weight matrix. Based on the potential energy mapping weight matrix, a linear projection is performed on the dimension-independent recursive features to map the dimension-independent recursive features to the potential energy space to obtain the seepage potential energy of each physical dimension and generate a dimension-independent seepage potential energy tensor. Perform feature copying and dimension transpose operations on the dimensionally independent seepage potential energy tensor to expand the one-dimensional channel axis into a two-dimensional interactive mesh, and construct the source dimension potential energy tensor and the target dimension potential energy tensor. Perform a bitwise subtraction operation on the source dimension potential energy tensor and the target dimension potential energy tensor to calculate the seepage potential energy difference between any two physical dimensions as the cross-dimensional seepage driving force, and generate the cross-dimensional seepage driving force tensor. Parallel feature mapping is performed based on the dimension-independent recursive features of the current time step, and the modulation factors of the seepage source dimension and the seepage target dimension are extracted separately to generate the first dynamic seepage modulation operator and the second dynamic seepage modulation operator. Based on the first dynamic percolation modulation operator and the second dynamic percolation modulation operator, a symmetric feature transformation is performed on the dimension-independent recursive features of the current time step to generate the first mapping feature and the second mapping feature. The first mapping feature and the second mapping feature are respectively input into a nonlinear activation function to perform nonlinear mapping, and the first dynamic permeability scalar and the second dynamic permeability scalar are calculated and generated. Perform a feature copying and expansion operation on the first dynamic penetration rate scalar to generate a first penetration rate source dimension tensor; perform a dimension transpose and expansion operation on the second dynamic penetration rate scalar to generate a second penetration rate target dimension tensor. Perform a bitwise fusion operation on the first permeability source dimension tensor and the second permeability target dimension tensor to construct an anisotropic two-dimensional interactive mesh and generate a dynamic permeation coefficient tensor. Element-wise multiplication is performed on the cross-dimensional seepage driving force tensor and the dynamic seepage coefficient tensor. The cross-dimensional seepage driving force tensor is modulated based on the dynamic seepage coefficient tensor to generate a cross-dimensional seepage flux tensor. The cross-dimensional percolation flux tensor is aggregated along the dimensional channel and residual fusion is performed with the original dimensionally independent recursive features to output dimensionally coupled percolation features.
8. The adaptive control method for electrical stimulation output accuracy based on artificial intelligence according to claim 1, characterized in that, S5 specifically includes: S51. Based on the predicted interface polarization state space, extract the polarization relaxation time constant and polarization relaxation amplitude, and perform frequency domain transformation on the target command current to extract the time-varying frequency. S52. Calculate the frequency-dependent compensation factor based on the polarization relaxation time constant and the time-varying frequency, perform a product operation between the frequency-dependent compensation factor and the polarization relaxation amplitude, and output the dynamic polarization compensation coefficient. S53. Perform amplitude scaling operation on the target command current based on the dynamic polarization compensation coefficient to generate polarization distortion offset current component. Perform summation operation on the target command current and polarization distortion offset current component to output the initial compensation drive current.
9. The adaptive control method for electrical stimulation output accuracy based on artificial intelligence according to claim 1, characterized in that, S6 specifically includes: S61. Real-time junction temperature T and collector current I of the core transistor in the drive output channel. C Based on V BE -TI C Characteristic curves, which correlate the real-time junction temperature T with the collector current I C Substituting into the preset temperature compensation formula, calculate the emitter junction voltage V after temperature drift compensation. BE ; S62. Fit the voltage and current nonlinear mapping relationship based on the voltage and current sampling sequence of the drive output channel, perform point-by-point differentiation on the voltage and current nonlinear mapping relationship to calculate the transient gain coefficient, extract the tangent slope at the zero point as the reference gain, perform difference operation on the transient gain coefficient and the reference gain to generate the gain distortion coefficient, and perform product operation on the gain distortion coefficient and the initial compensation drive current to output the distortion compensation term. S63. Extract the inverse function mapping coefficients based on the voltage-current nonlinear mapping relationship, and combine them with the emitter junction voltage V. BE The initial compensation drive current is subjected to inverse offset mapping with the inverse function mapping coefficients to output linearized compensation code; S64. Perform a summation operation between the linearization compensation code and the distortion compensation term, and output the digital domain driven code.
10. The adaptive control method for electrical stimulation output accuracy based on artificial intelligence according to claim 1, characterized in that, Specifically, S7 includes: S71. Calculate the Boost target voltage value V based on the digital domain drive code. H Based on the target voltage value V H With input low voltage V L The ratio is used to calculate the PWM0 duty cycle to generate the Boost compensation value; at the same time, the alternating conduction logic is extracted according to the digital domain drive code to generate an H-bridge timing control signal containing dead time and rest time; the Boost compensation value is used as the power supply reference, and the H-bridge timing control signal is combined to output a modified amplitude pulse sequence for tissue stimulation; S72, Collect the actual load current I flowing through the sampling resistor load Calculate the target command current I set With actual load current I load The error ΔI is input into the PID controller to calculate and generate the voltage compensation increment ΔV. H The voltage compensation increment ΔV H Superimposed on the target voltage value V H Generate the final boost target voltage, and dynamically update the PWM0 duty cycle based on the final boost target voltage to correct the Boost boost compensation value in a closed loop and generate the updated Boost boost compensation value. S73. Based on the falling edge time of the modified amplitude pulse sequence, generate a period end marker to trigger the interval timing, extract the cumulative energy of the modified amplitude pulse sequence and the decay time constant of the historical time domain relaxation feature sequence, perform a product operation based on the cumulative energy and the decay time constant to output the relaxation recovery judgment duration, and output a re-probe trigger signal when the interval timing duration reaches the relaxation recovery judgment duration. S74. In response to the re-detection trigger signal, inject microcurrent detection excitation into the target tissue, collect the time-domain response voltage signal of the target tissue, perform feature extraction on the time-domain response voltage signal, and output the time-domain relaxation feature sequence.