STM32-based embedded precise spinal cord striking instrument control method and system

By using an STM32 main control chip to synchronously drive the parallel transmission link of capacitive field strength and tactile pressure data, combined with discrete difference algorithm and inverse dynamics solution, the precise positioning and consistent control of the spinal cord strike device in complex living environments were achieved. This solved the problem of inconsistent strike depth and speed in existing technologies and improved the reliability of neuroscience research.

CN122031130APending Publication Date: 2026-05-15SUZHOU LOUHAISI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-06
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing spinal cord striking devices struggle to achieve precise positioning of the striking head against biological tissue surfaces in complex in vivo environments, leading to inconsistencies in striking depth and speed, which affects the reproducibility and data reliability of neuroscience research.

Method used

By utilizing the STM32 main control chip to synchronously drive the parallel transmission link of capacitive field strength and tactile pressure data, and combining discrete difference algorithm and inverse dynamics solution, a raw dataset of biological interface is generated, and the zero potential surface coordinates of biological tissue are calibrated in real time to ensure the consistency of impact depth and velocity.

Benefits of technology

It achieves submicron-level precise positioning under cerebrospinal fluid and tissue physiological tremor environment, eliminates impact depth drift under nonlinear response environment, and improves the reliability of experimental model and data consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122031130A_ABST
    Figure CN122031130A_ABST
Patent Text Reader

Abstract

The invention relates to the field of embedded precise control, and provides an embedded precise spinal cord striker control method and system based on STM32, and the method comprises the steps: synchronously sampling capacitance field intensity data and touch pressure data, and generating a biological interface original data set; extracting a capacitance change gradient value and a pressure mutation gradient value, constructing a real-time contact confidence value in combination with a global gain operator, and obtaining a zero potential surface coordinate of the biological tissue; a primary voltage reference value is extracted according to the target striking speed, a driving voltage control word is generated in combination with hardware physical parameters, and an electromagnetic valve time sequence control instruction is generated based on biological tissue zero potential surface coordinates, the target striking speed and the striking depth; and capturing a real-time displacement pulse sequence, analyzing the actual strike depth and the actual strike speed, and calculating a target deviation value to generate a damage consistency evaluation coefficient. According to the method, multi-mode heterogeneous feature synchronous perception and reverse dynamic physical compensation are fused, and execution control and digital effect auditing closed loops of spinal cord injury modeling are constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of embedded precision control, and in particular to a control method and system for an embedded precision spinal cord impact device based on STM32. Background Technology

[0002] With the deepening of neuroscience research in areas such as injury mechanism exploration, evaluation of neuroprotective strategies, and regenerative repair, the construction of highly standardized and reproducible experimental spinal cord injury models has become the cornerstone of scientific research in this field. A key technical challenge in the evolution of precision spinal cord impact devices from traditional manual adjustment to system-level intelligent control has emerged. This challenge lies in achieving precise positioning of the impact head against the surface of biological tissue in a living environment with complex interferences such as cerebrospinal fluid infiltration and tissue physiological tremors, while simultaneously compensating for energy losses in the pneumatic actuator under nonlinear response conditions to ensure absolute consistency in impact speed and depth.

[0003] However, current technology still faces many challenges. In experimental spinal cord injury modeling, determining the physical contact point between the impact head and the tissue surface is the absolute benchmark for ensuring consistent impact depth. However, existing equipment often relies on operator visual observation or manual leveling with knobs, a cumbersome process easily introducing subjective experience errors. Although some devices attempt to use single capacitive sensing for non-contact detection, in complex in vivo experimental environments involving cerebrospinal fluid infiltration, local hemorrhage, and tissue physiological tremors, the detection signal is highly susceptible to interference from humidity and sudden changes in the medium, leading to zero-plane recognition bias or false triggering. Once the system fails to accurately lock onto the physical spatial benchmark, its actual impact depth will drift uncontrollably with changes in tissue resistance, failing to guarantee precise alignment with preset parameters. This high degree of inconsistency in experimental models directly leads to the loss of reliability of data for subsequent evaluation of neuroprotective strategies and exploration of injury mechanisms, and may even cause the death of test animals or sample invalidation due to excessive modeling errors, severely restricting the reproducibility and scientific value of neuroscience research. Summary of the Invention

[0004] To achieve the above objectives, this invention provides a control method for an embedded precision spinal cord impact device based on STM32, the specific technical solution of which is as follows:

[0005] By using the update event signal of the hardware timer to synchronously drive two parallel hardware data transmission links, the capacitance field strength data and tactile pressure data of the spinal cord interface to be tested are synchronously collected and mapped to the same sampling time to generate the original dataset of the biological interface.

[0006] The discrete difference algorithm is called to extract the capacitance change gradient value and pressure change gradient value from the original dataset of the biological interface. The real-time contact confidence value is constructed by combining it with the preset global gain operator. When the real-time contact confidence value meets the preset control sampling period, the real-time pulse count of the stepper motor encoder is latched to obtain the zero potential surface coordinates of the biological tissue.

[0007] The primary voltage reference value is extracted based on the preset target impact velocity. The terminal driving pressure is generated by inverse dynamics calculation in combination with the preset hardware physical parameters. The driving voltage control word is generated based on the primary voltage reference value and the terminal driving pressure. Simultaneously, the electromagnetic valve timing control command is generated based on the biological tissue zero potential surface coordinates, the preset target impact velocity, and the target impact depth.

[0008] The real-time displacement pulse sequence is captured based on the driving voltage control word and the solenoid valve timing control command. The actual impact depth and actual impact velocity are analyzed by combining the zero potential surface coordinates of biological tissue. The deviation of the actual impact depth and actual impact velocity from the preset target impact depth and target impact velocity is calculated to generate the damage consistency evaluation coefficient.

[0009] Furthermore, the method for generating the original dataset of the biological interface includes:

[0010] The electrode array at the probe tip is activated by a preset clock drive signal. The sensitivity gain coefficient of the chip is adjusted in real time in conjunction with a preset sensitivity compensation register to capture the induced electrical fluctuations between the probe tip and the spinal cord surface in order to generate capacitance field strength data.

[0011] The axial mechanical load transmitted through the contact interface at the bottom of the striking head is mapped as an analog voltage signal. The analog voltage signal is captured by an oversampling mechanism triggered by a hardware timer. The physiological tremor component is removed by a digital low-pass filtering algorithm to generate tactile pressure data.

[0012] Two parallel hardware data transmission links are synchronously driven by the update event signal of the hardware timer. The capacitance field strength data and tactile pressure data are mapped to the same sampling time through the direct memory access controller to construct heterogeneous feature vectors and form the original dataset of biological interface.

[0013] Furthermore, the execution method of the digital low-pass filtering algorithm includes:

[0014] The effective contact potential increment is obtained by subtracting the preset static bias voltage from the analog voltage signal. The effective contact potential increment is then normalized using a preset reference voltage to obtain the voltage deviation ratio.

[0015] The voltage deviation ratio, the full-scale quantization order of the digital-to-analog converter inside the STM32 main control chip, and the preset pressure-to-voltage conversion calibration coefficient are multiplied together, and the resulting product is rounded down to generate tactile pressure data.

[0016] Furthermore, the method for obtaining the zero potential surface coordinates of the biological tissue includes:

[0017] A sliding parsing window is constructed, and the discrete difference algorithm is called to perform time-domain analysis on the original dataset of biological interfaces to extract the gradient values ​​of capacitance change and pressure change.

[0018] The predicted gain term is obtained by performing an exponential decay mapping on the gradient value of capacitance change. Simultaneously, a confirmation weight term is constructed based on the gradient value of pressure mutation. The preset global gain operator, the predicted gain term, and the confirmation weight term are multiplied together to generate a real-time contact confidence value.

[0019] Based on the comparison and judgment of the real-time contact confidence value and the preset tissue contact critical threshold, when the real-time contact confidence value continuously meets the preset control sampling period, the hardware timer is triggered to read the real-time pulse number of the stepper motor encoder in real time, and the real-time pulse number is marked as the zero potential surface coordinate of the biological tissue to complete the automatic zeroing.

[0020] Furthermore, the method for extracting the capacitance change gradient value and the pressure change gradient value includes:

[0021] Heterogeneous feature vectors from the original dataset of biological interfaces are retrieved sequentially from static random access memory;

[0022] Based on heterogeneous feature vectors, a preset sampling span is constructed. The sliding parsing window will display the sampling time. Subtract the backtracking from the capacitance field strength data Historical capacitance field strength data after each synchronous sampling period are used to obtain the net change in capacitance field strength, which is then divided by... The total sampling time span is determined by multiplying the synchronous sampling period by the total sampling time span, and the gradient value of capacitance change is generated.

[0023] The synchronous sampling period is a fixed time interval in microseconds preset by the internal hardware timer of the STM32 main control chip;

[0024] Based on heterogeneous feature vectors, the sampling time Tactile pressure data minus retrospective Historical tactile pressure data after a synchronous sampling period are used to obtain the net value of tactile pressure change, which is then divided by the total sampling time span to generate the pressure change gradient value.

[0025] Furthermore, the method for generating the drive voltage control word and the solenoid valve timing control instruction includes:

[0026] Based on the preset target impact speed, the aerodynamic flow-voltage nonlinear mapping table stored in the non-volatile memory is retrieved to extract the primary voltage reference value;

[0027] The system retrieves the preset equivalent mass of the impact component, the effective cross-sectional area of ​​the cylinder, the acceleration stroke, and the inherent frictional resistance constant. Based on the inverse dynamics calculation of the law of conservation of energy, it maps the target impact velocity into the terminal driving pressure at the end of the driving cylinder to reach the preset kinetic energy index.

[0028] The terminal driving pressure is mapped to a voltage compensation term and superimposed on the primary voltage reference value to generate a composite target driving voltage. The voltage is then quantitatively calculated by a digital-to-analog converter to generate the driving voltage control word.

[0029] Simultaneously, based on the zero potential surface coordinates of biological tissue, the preset target impact depth, and the target impact velocity, a timing calculation is performed to generate a timing control command for the solenoid valve to control the opening duration.

[0030] Furthermore, the method for performing the inverse dynamics solution includes:

[0031] Retrieve hardware physical parameters stored in the storage unit, including the equivalent mass of the impact component, the effective cross-sectional area of ​​the cylinder, the acceleration stroke, and the inherent frictional resistance constant.

[0032] Calculate the kinetic energy increment required for the strike head to accelerate to the preset target impact velocity;

[0033] Divide the kinetic energy increment by the product of the effective cross-sectional area of ​​the cylinder and the acceleration stroke to map it into the dynamic pressure component required inside the cylinder cavity.

[0034] The dynamic pressure component, the preset ambient atmospheric pressure constant, and the preset inherent frictional resistance constant are algebraically summed to calculate the terminal driving pressure required for the end of the driving cylinder to reach the preset kinetic energy index.

[0035] Furthermore, the method for generating the damage consistency evaluation coefficient includes:

[0036] Configure the drive state of the electric proportional valve and the high-speed solenoid valve according to the drive voltage control word and the solenoid valve timing control command, and synchronously use the hardware timer to capture the pulse count value fed back by the photoelectric encoder at the end of the impact component in real time to obtain the real-time displacement pulse sequence.

[0037] The peak value of the pulse count in the real-time displacement pulse sequence is extracted and combined with the coordinates of the biological tissue zero potential surface to analyze the actual impact depth. At the same time, the sampling point search window covering the biological tissue zero potential surface coordinates and the preset boundary surface domain search deviation is extracted in the real-time displacement pulse sequence to calculate the actual impact velocity.

[0038] The depth normalization deviation rate is calculated based on the actual strike depth and the target strike depth, and the velocity normalization deviation rate is calculated based on the actual strike velocity and the target strike velocity. The combined weighted deviation calculation is performed using preset depth deviation weight operators and velocity deviation weight operators to generate damage consistency evaluation coefficients.

[0039] An embedded precision spinal cord impactor control system based on STM32 is provided to implement the aforementioned embedded precision spinal cord impactor control method based on STM32. The system includes a multi-modal synchronous acquisition module, a zero potential surface reconstruction module, an energy planning module, and a consistency quantization evaluation module.

[0040] The multimodal synchronous acquisition module is used to synchronously drive two parallel hardware data transmission links using the update event signal of the hardware timer, and to map the capacitance field strength data and tactile pressure data of the spinal cord interface to be tested to the same sampling time to generate the original dataset of the biological interface.

[0041] The zero potential surface reconstruction module is used to call the discrete difference algorithm to extract the capacitance change gradient value and pressure change gradient value in the original dataset of the biological interface, combine it with the preset global gain operator to construct the real-time contact confidence value, and latch the real-time pulse number of the stepper motor encoder when the real-time contact confidence value meets the preset control sampling period in order to obtain the zero potential surface coordinates of the biological tissue.

[0042] The energy planning module is used to extract the primary voltage reference value based on the preset target impact velocity, combine the preset hardware physical parameters to generate the terminal driving pressure through inverse dynamics calculation, generate the driving voltage control word based on the primary voltage reference value and the terminal driving pressure, and simultaneously generate the electromagnetic valve timing control command based on the biological tissue zero potential surface coordinates, the preset target impact velocity and the target impact depth.

[0043] The consistency quantification evaluation module is used to capture real-time displacement pulse sequences based on the driving voltage control word and the solenoid valve timing control command, analyze the actual impact depth and actual impact velocity by combining the zero potential surface coordinates of biological tissue, and calculate the deviation of the actual impact depth and actual impact velocity from the preset target impact depth and target impact velocity to generate damage consistency evaluation coefficients.

[0044] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0045] This invention utilizes the update event signal of a hardware timer to synchronously drive two parallel data transmission links for capacitance and pressure, eliminating the nondeterministic delay jitter caused by instruction polling, solving the logic calculation bias problem caused by sampling phase difference in heterogeneous data streams, and ensuring hardware-level phase alignment between spatial approximation field strength characteristics and near-field mechanical load characteristics within a microsecond-level sampling period.

[0046] This invention constructs a multimodal feature coupling judgment logic that includes displacement rate features and stress pulse features, and uses a nonlinear activation function to perform mutual exclusion decoupling on heterogeneous feature gradients. It removes pseudo-touch signals caused by liquid surface tension or medium abrupt changes, solves the problem of zero potential surface determination ambiguity caused by cerebrospinal fluid or blood coverage in live experimental environments, and achieves submicron-level locking of the reference coordinates of the surface of spinal cord biological tissue.

[0047] This invention uses the target impact velocity, the equivalent mass of the impact component, and the effective cross-sectional area of ​​the cylinder as the solution mapping objects, and performs inverse dynamics calculation based on the law of conservation of energy to compensate for the energy loss during the movement of the actuator. This achieves a physical match between the impact kinetic energy demand and the airflow power output, and solves the problem that the actual impact depth of the pneumatic actuator is prone to drift under nonlinear aerodynamic response environment.

[0048] This invention uses real-time displacement pulse sequences and biological tissue zero-potential surface coordinates as the benchmark analysis objects to perform inverse feature calculations on actual impact depth and actual impact velocity and construct consistency evaluation coefficients. This achieves digital causal auditing of impact execution quality and avoids the problem of insufficient reliability of modeling experimental data caused by tissue viscoelasticity differences and uncontrolled displacement interference. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is a flowchart illustrating the principle of a control method for an embedded precision spinal cord impact device based on STM32 according to the present invention.

[0051] Figure 2 This is a functional block diagram of an embedded precision spinal cord impact control system based on STM32 according to the present invention. Detailed Implementation

[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0053] Example 1:

[0054] Please see Figure 1 As shown, this embodiment provides a control method for an embedded precision spinal cord impact device based on STM32, including:

[0055] Step S1000: The update event signal of the hardware timer is used to synchronously drive two parallel hardware data transmission links to synchronously acquire the capacitance field strength data of the spinal cord interface to be tested. and tactile pressure data Mapping to the same sampling time point generates the original dataset of biological interfaces. .

[0056] Specifically, this step aims to address the spinal cord modeling environment, which includes cerebrospinal fluid infiltration, localized blood coverage, and centimeter-level displacement deviations caused by respiratory movements. It uses the spatial electrostatic field disturbance signal and surface mechanical pressure signal between the impactor and the spinal cord surface as co-sensing objects. Leveraging the consistency of hardware-level triggering, it maps the non-contact field strength changes between the impactor and the spinal cord surface caused by the approaching distance into capacitive field strength data. The physical stress generated by the microscopic contact of the striking head is mapped into tactile pressure data. Eliminating logical computation bias caused by asynchronous acquisition at the hardware level, and obtaining the original dataset of biological interfaces containing temporally aligned features. .

[0057] Further, step S1000 includes:

[0058] Step S1100: Drive according to the preset clock signal The electrode array at the probe tip is activated, in conjunction with a preset sensitivity compensation register. The chip sensitivity gain coefficient is adjusted in real time to capture the induced electrical fluctuations between the probe tip and the spinal cord surface, thereby generating capacitance field strength data. .

[0059] Specifically, this step aims to use the surface of the spinal cord under test, which is in a complex in vivo environment including cerebrospinal fluid infiltration and local blood coverage, as the detection object. By utilizing the principle of charge induction, the spatial distance between the probe tip and the spinal cord tissue is mapped into single-channel discrete and digitized capacitance field strength data. By adjusting the sensitivity compensation register in real time By changing the chip sensitivity gain coefficient and introducing the relative permittivity affected by local humidity to perform field strength characteristic calculation, physical-level compensation for environmental humidity interference is achieved at the data acquisition source.

[0060] In the specific implementation process, at the initial stage of spinal cord injury modeling, the STM32 main control chip continuously outputs a clock drive signal of a preset frequency to the SSP8011AM capacitance sensing chip through its internal IIC interface. The driving signal excites the electrode array at the probe tip of the impact head, thereby generating a weak alternating electric field into the external space. Meanwhile, the control program running within the STM32 main control chip monitors the electromagnetic induction characteristics of the spinal cord surface in real time, dynamically rewriting the sensitivity compensation register inside the capacitance sensing chip using a preset configuration information sequence. A linear mapping relationship of capacitive coupling is established between the probe tip and the spinal cord surface. As the striking head approaches the target tissue along the axis, driven by the stepping drive device, the spatial mutual capacitance between the probe tip and the spinal cord surface shifts due to a shift in the electric field line distribution density as the distance between them decreases. The sensing chip captures this minute fluctuation in induced electrical charge and quantifies it into 16-bit digitized capacitive field strength data. .

[0061] To eliminate the detection bias caused by abrupt changes in dielectric constant due to the cerebrospinal fluid or blood covering layer, the control program introduces a physical environment compensation parameter when performing field strength calculation. The specific execution logic is as follows: Capacitive field strength data. Numerically, it is defined as the product of the chip sensitivity gain coefficient and the physical terms of the detection environment, plus the system noise term. The chip sensitivity gain coefficient is determined by the STM32 main control chip through a configuration information sequence for the sensitivity compensation register. A dimensionless adjustment operator, obtained through real-time parameterization, is used to dynamically adjust the linear mapping weight between the charge induction and the quantized value based on feedback from the spinal cord surface medium. The physical term of the detection environment is determined by using the vacuum dielectric constant. The relative permittivity affected by local humidity dynamics and the effective sensing area of ​​the detection electrode The system noise term is constructed by multiplying the components and dividing by the instantaneous physical distance. It is a superimposed characteristic quantity including parasitic capacitance of hardware circuits, distributed capacitance of detection cables, and random electromagnetic interference from the external environment. This term is used to perform zero-point offsetting during the solution process, stripping away non-target physical field signals.

[0062] Wherein, the vacuum permittivity It is a physical constant characterizing the free-space capacitance properties, used as the basic proportional reference for the field strength mapping model; the local humidity represents a local humidity parameter reflecting the thickness and proportion of exudate coverage on the surface of living tissue; the relative permittivity affected by the dynamic local humidity is a dielectric characteristic quantity characterizing the influence of cerebrospinal fluid and blood infiltration between the impact head and the spinal cord, used to compensate for the electric field line distribution bias caused by abrupt changes in the liquid medium; the effective sensing area of ​​the detection electrode It is a geometric constant determined by the physical structure of the probe tip of the impact head, used to determine the coverage flux boundary of the spatial electric coupling physical field; the instantaneous physical distance represents the instantaneous physical distance between the probe tip and the surface of the spinal cord at a certain sampling moment, which is the controlled target parameter that the control system of this invention needs to solve in the non-contact detection stage, used to reflect the approach trajectory of the impact head.

[0063] Step S1200: The axial mechanical load transmitted through the contact interface at the bottom of the impact head is mapped into an analog voltage signal. Analog voltage signals are captured through an oversampling mechanism triggered by a hardware timer. Physiological tremor components are removed using a digital low-pass filtering algorithm to generate tactile pressure data. .

[0064] Specifically, this step aims to monitor the physical load on the spinal cord surface under in vivo conditions, including disturbances from respiratory movements and heartbeat fluctuations. It utilizes the piezoresistive effect of a thin-film sensor to map the milligram-level axial mechanical load generated at the moment of impact into an analog voltage signal. Furthermore, by employing a time-dimensional oversampling mechanism and a digital low-pass filtering algorithm, the physiological tremor component superimposed on the mechanical contact characteristics is stripped away, transforming it into logically deterministic and quantifiable tactile pressure data. This achieves feature decoupling between mechanical contact information and live physiological interference at the data source.

[0065] In practice, during the process of the impact head being guided towards the spinal cord surface by the driving device, a thin-film pressure sensor deployed at the contact interface at the bottom of the impact head monitors the axial mechanical load at the milligram force level in real time. The sensor converts the received axial mechanical load into a change in the pressure resistance inside the sensor, and then maps the change in pressure resistance into an analog voltage signal in the range of 0V to 3.3V through an external bridge linear conversion circuit. .

[0066] Subsequently, the STM32 main control chip starts its internal digital-to-analog converter, using an oversampling mechanism triggered by a hardware timer to process the analog voltage signal. Continuous capture is performed. By configuring the sampling frequency to be more than 10 times the physiological fluctuation frequency, and in conjunction with the built-in digital low-pass filtering algorithm, the oscillation amplitude disturbances caused by the experimental animal's heartbeat and respiration are smoothed, thereby generating quantified tactile pressure data with temporal stability. The tactile pressure data The specific generation logic is as follows: The sampling time... The acquired analog voltage signal Subtract the preset static bias voltage To eliminate inherent load interference caused by the physical structural mass of the impact head, an effective contact potential increment is obtained; the effective contact potential increment is then divided by a preset reference voltage. Normalization scaling is performed to obtain a dimensionless voltage deviation ratio. Then, this voltage deviation ratio is multiplied by the full-scale quantization order of the STM32 main control chip's internal digital-to-analog converter and the calibration coefficient of the pressure-to-voltage conversion. The product is then rounded down to the nearest integer, thereby constructing a feedback data stream in the digital space that is linearly mapped to the physical interface pressure.

[0067] Wherein, the preset static bias voltage The voltage reference value is obtained by performing static calibration when the impact head is suspended and not in contact. It is used to offset the gravitational component generated by the inherent mass of the impact head structure and the structural preload bias generated during the assembly process; the preset reference voltage It serves as the absolute level reference standard in the analog voltage quantization process, with a fixed value of 3.3V to ensure the amplitude consistency of the quantization results. The full-scale quantization order of the digital-to-analog converter inside the STM32 main control chip is determined by the 12-bit resolution of the hardware to a fixed value of 4096, which is used to define the linear accuracy distribution range when the physical analog signal is mapped to the digital processing space. The calibration coefficient of the pressure-to-voltage conversion is a proportional adjustment operator preset according to the piezoresistive sensitivity response curve of the thin-film sensor, used to restore the amplitude characteristics of the electrical signal to the physical characteristic quantity characterizing the spinal cord compression intensity.

[0068] Step S1300: The update event signal of the hardware timer is used to synchronously drive two parallel hardware data transmission links, and the capacitance field strength data is transferred through the direct memory access controller. and tactile pressure data Mapping to the same sampling time to construct heterogeneous feature vectors The original dataset of biological interfaces formed by collection .

[0069] Specifically, this step aims to transform the capacitance field strength data into a dynamically approximating state. and tactile pressure data As a packaged object, leveraging the deterministic triggering of the STM32 main control chip's internal hardware timer, the heterogeneous data streams mentioned above are physically mapped to the same sampling pulse timestamp through Direct Memory Access (DMA). This aims to eliminate the non-deterministic latency jitter caused by instruction polling and achieve synchronous sampling cycles at the microsecond level. By aligning the phase consistency of the internal spatial approximation field strength characteristics and the near-field mechanical load characteristics, heterogeneous feature vectors with cross-modal spatiotemporal correlation properties are generated. And packaged into a raw dataset of biological interfaces. .

[0070] The synchronous sampling period It is a fixed time interval at the microsecond level preset by the internal hardware timer of the STM32 main control chip, used to limit the time resolution boundary of the update of heterogeneous data streams.

[0071] In the specific implementation process, in order to achieve deep collaboration of the sensing channels and overcome the uncertain delays caused by the processor executing software instructions, this step bypasses the sequential query of the software logic and directly activates the direct memory access controller inside the STM32 main control chip. The control program configures two parallel hardware data transmission links: one, link A, receives the capacitance field strength data updated in real time in the IIC interface receive register. The first path directly leads to a preset buffer in Static Random-Access Memory (SRAM); the second path is link B. This connects the quantized tactile pressure data from the digital-to-analog converter. The adjacent memory space of the synchronously guided SRAM.

[0072] The transmission trigger sources for both hardware data transmission links are bound to the update event signal of the same hardware timer. This mechanism ensures that the capacitance field strength data loaded into the storage space is updated at each determined sampling pulse arrival time. and tactile pressure data They share the same timestamp at the physical sampling level. This hardware-level alignment transforms heterogeneous data streams from isolated signal sources into joint features with time correlation, eliminating interference caused by sampling phase differences in subsequent zero-potential-level locking logic determination.

[0073] Finally, in each sampling sequence index and synchronous sampling period... The sampling time determined by the product The control program will then use the capacitance field strength data, which reflects the spatial displacement trend. Tactile pressure data reflecting contact stress characteristics Heterogeneous feature vectors combined into column vector form And the heterogeneous feature vectors generated during the full approximation process Collect and form the original dataset of biological interfaces The sampling sequence index is a continuous integer sequence starting from 1, used to identify the current heterogeneous feature vector. In the original dataset of biological interfaces The temporal arrangement position in the sequence.

[0074] Step S2000: Use the discrete difference algorithm to extract the original dataset of biological interfaces. Gradient value of capacitance change in and pressure change gradient value Real-time contact confidence values ​​are constructed by combining the preset global gain operator ω. and in real-time contact confidence value The real-time pulse count of the stepper motor encoder is latched when the preset control sampling period is met. To obtain the coordinates of the zero potential surface of biological tissue .

[0075] Specifically, this step aims to use the spinal cord interface under test, which is in a complex in vivo environment including cerebrospinal fluid infiltration and local blood coverage, as the judgment object. Automated zeroing solves the objective errors and cumbersome operation problems of traditional manual visual leveling. It utilizes the original biological interface dataset from step S1300. The heterogeneous variation trends of the capacitive induced field strength and mechanical load on the time axis are used to map the physical signal, which is susceptible to humidity interference in a single mode, into a contact confidence evaluation system with logical determinism. This process eliminates spurious touch signals caused by liquid surface tension or abrupt changes in the medium, and realizes the zero potential surface coordinates of spinal cord solid biological tissue. The submicron-level locking, namely automated zero-locking, provides a closed-loop reference for subsequent steps to perform strike depth control based on an absolute physical reference.

[0076] Further, step S2000 includes:

[0077] Step S2100: Construct a sliding parsing window and call the discrete difference algorithm to process the original biological interface dataset. Perform time-domain analysis to extract the gradient value of capacitance change. and pressure change gradient value .

[0078] Specifically, this step aims to process the raw dataset of biological interfaces from step S1300. Heterogeneous feature vectors that are synchronized on the time axis As a data processing object, the time-domain analytical characteristics of the discrete difference algorithm are utilized to analyze the capacitance field strength data during the process of the impact head approaching the spinal cord surface. Amplitude fluctuations are mapped to the gradient value of capacitance changes. The displacement rate signal and the tactile pressure data at the moment of contact are included. Dramatic changes are mapped to gradient values ​​of stress mutations. The stress pulse signal in the data provides differential decoupling data support for automated zeroing by providing spatial motion information and mechanical interaction information in the dimension of feature extraction.

[0079] In the specific implementation process, the STM32 main control chip sequentially retrieves the original biological interface dataset from the static random access memory (SRAM). Heterogeneous feature vectors in the storage area To capture the transient physical interaction characteristics of the probe as it approaches the spinal cord interface and to eliminate static background drift, the control program does not directly utilize capacitance field strength data. and tactile pressure data Instead of determining contact based on the sampling amplitude, it constructs a preset sampling span. Using a sliding analytical window, the instantaneous rate of change of the electric coupling field strength and the interface mechanical stress in the time domain is calculated using the discrete difference algorithm, thus obtaining the capacitance gradient value. and pressure change gradient value Wherein, the differential window length operator It is a positive integer with a value greater than or equal to 2, used to determine the discrete sampling scale for performing gradient calculation. Its value is positively correlated with the system's ability to smooth high-frequency random electromagnetic interference.

[0080] The capacitance change gradient value The specific generation logic is as follows: The sampling time... capacitance field strength data Subtract backtracking One synchronous sampling period Historical capacitance field strength data To obtain the net change in capacitance field strength, divide this net change in capacitance field strength by the value determined by the differential window length operator. With synchronous sampling period By multiplying the determined total sampling time span, the amplitude fluctuations of the spatial electric field are transformed into a differential signal with displacement rate implications, thus obtaining the capacitance change gradient value. Wherein, the capacitance change gradient value Indicates at the sampling time The extracted capacitance gradient value is a differential feature that characterizes the speed at which the probe tip approaches the target spinal cord tissue. It is used to quantitatively describe the shrinkage trend of the spatial distance between the probe head and the surface of the spinal cord parenchyma.

[0081] Synchronous, pressure abrupt gradient values The specific generation logic is as follows: The sampling time... Tactile pressure data Subtract backtracking One synchronous sampling period Historical tactile pressure data To obtain the net value of the tactile pressure change, and divide it by the capacitance change gradient value. The same total sampling time span is used to capture the stress slope jump caused by the viscoelastic resistance of the tissue at the moment of mechanical contact. The pressure abrupt change gradient value is mentioned. Indicates at the sampling time The extracted pressure abrupt change gradient value is a characteristic quantity that characterizes the drastic change in mechanical impedance at the detection interface. It is used to capture the mechanical load jump pulse generated by the step change in tissue mechanical impedance at the moment the impact head touches the spinal cord.

[0082] Step S2200, change the gradient value of the capacitance. The predicted gain term is obtained by performing an exponential decay mapping, and is simultaneously based on the pressure mutation gradient value. Construct a confirmation weight term, and perform a multiplication operation on the preset global gain operator ω, the predicted gain term, and the confirmation weight term to generate a real-time contact confidence value. .

[0083] Specifically, this step aims to transform the capacitance change gradient value from step S2100. and pressure change gradient value As a logical mapping object, it provides a criterion with a deterministic decision boundary for automated zeroing. Utilizing the transformation characteristics of a nonlinear activation function, it maps the spatial displacement feature reflecting the probe's approach trend, accompanied by electric field shift, between the impact head and the spinal cord entity, into a prediction gain term in the evaluation logic to characterize the spatial approach probability. Furthermore, it maps the axial mechanical load signal jump feature, reflecting the contact strength at the probe interface, excited by tissue mechanical impedance, into a confirmation weight term in the evaluation logic to characterize abrupt changes in tissue impedance. This achieves mutual exclusion decoupling between liquid wetting interference and entity tissue signals in the feature dimension, providing a real-time contact confidence value with a deterministic decision boundary for subsequent steps in determining the physical contact boundary. .

[0084] In the specific implementation process, this step involves obtaining the synchronous capacitance change gradient value. and pressure change gradient value Subsequently, the STM32 main control chip calls its built-in floating-point unit to execute the confidence assessment program. To eliminate the ambiguity in physical judgment caused by cerebrospinal fluid or blood coverage during the injury model construction process, this step constructs a multimodal feature coupling judgment logic based on a dual nonlinear mapping. This multimodal feature coupling judgment logic uses the capacitance change gradient value... Exponential decay mapping is performed to quantitatively characterize the spatial approximation probability of the probe relative to the spinal cord; simultaneously, the pressure mutation gradient value is... The input is fed into a logic gating function to identify impedance step characteristics of spinal cord tissue within a microsecond-level window. The specific execution logic of the multimodal feature coupling determination logic is as follows: A preset global gain operator is used... Based on the gradient value of capacitance change Constructed predictive gain term and pressure mutation gradient value The constructed confirmation weights are multiplied together to obtain the real-time contact confidence value. The preset global gain operator The value is a floating-point number ranging from 0 to 1, used to adjust the range boundary of the confidence output according to the physiological characteristics of the test animal, such as weight and spinal cord diameter; the real-time contact confidence value The probability distribution characteristic value used to quantitatively assess the current contact of the striking head with the spinal cord parenchyma surface is within a closed interval between 0 and 1, and serves as the core decision criterion for the control program to execute zero-position locking.

[0085] The predicted gain term is calculated by subtracting a preset proximity rate adjustment coefficient and the capacitance change gradient value from 1. The negative value of the product is obtained by a natural exponential function of the power of a power, and is used to predict the approach state in the far-field region; the confirmation weight term is obtained by calculating 1 divided by the sum of natural exponential terms that include the negative value of the product of a preset pressure sensitivity operator and the effective pressure deviation value, and by utilizing the variant characteristics of the Sigmoid activation function to lock the tissue impedance step in the near-field region; the effective pressure deviation value is the pressure abrupt gradient value. With the preset physiological noise suppression threshold difference.

[0086] The preset proximity rate adjustment coefficient is used to adjust the gradient value of the capacitance change. The proportional coefficient for the contribution of the predicted gain term is determined by the preset downward axial velocity calibration value of the impact head; the natural exponential function is used to perform a smooth probabilistic feature transformation in the nonlinear mapping; the preset pressure sensitivity operator is an adjustment constant modified by the viscoelastic coefficient of biological tissue, used to define the steepness of the confidence curve at the moment of contact, to adapt to the different mechanical impedance characteristics of the dura mater and nerve parenchyma; the viscoelastic coefficient of biological tissue is a mechanical feature operator reflecting the stress response and deformation hysteresis relationship of the target spinal cord tissue under axial compression, and its value is preset by the system according to the test animal species, used to compensate the gain of the pressure sensitivity operator, thereby correcting the nonlinear impedance deviation generated by the heterogeneous biological medium at the moment of contact; the preset physiological noise suppression threshold It is a pressure reference preset based on the reference noise amplitude generated by the respiratory movements and pulse tremors of experimental animals in the pressure detection channel, used to shield the influence of live physiological interference on the judgment result at the logic level.

[0087] Step S2300, based on real-time contact confidence value and preset tissue contact threshold Execute value comparison and judgment, and contact confidence value in real time. When the preset control sampling period is met continuously, the hardware timer is triggered to read the real-time pulse count of the stepper motor encoder. Real-time pulse count Marked as the coordinates of the zero potential surface of biological tissue Complete automated zeroing.

[0088] Specifically, this step aims to convert the real-time contact confidence value from step S2200 into a state involving physiological tremors of experimental animals and interference from interfacial fluid adhesion. As a logical judgment feature, and based on the real-time pulse count of the synchronously captured stepper motor encoder. As a spatial displacement reference, utilizing the clock triggering characteristics of the STM32 main control chip, by applying a continuity constraint in the control time domain to eliminate the interference of instantaneous physical fluctuations, the random signal of confidence fluctuations is mapped into a substantial contact trigger pulse characterizing the actual physical contact between the impact head and the spinal cord parenchyma surface. At the control decision point, the magnitude comparison and determination of physiological noise and substantial physical contact are realized, and the coordinates of the biological tissue zero potential surface are latched. This enables automated physical benchmark calibration, providing an absolute spatial feedback benchmark for subsequent closed-loop adjustment of the strike depth.

[0089] In the specific implementation, the control program establishes a touch state determination procedure based on time series stability to eliminate false triggers caused by instantaneous pulse noise or interface fluid adhesion. As the striking head, guided by the drive device, approaches the spinal cord surface, the STM32 main control chip continuously monitors the real-time contact confidence value. and it is brought into contact with a preset tissue contact threshold. Perform a value comparison and judgment. When the judgment program detects a real-time contact confidence value... Continuously meet the preset quantity When the sampling period is determined, it is assumed that the impact head has crossed the surface of the liquid and touched the surface of the spinal cord. At this point, the STM32 main control chip immediately triggers the input capture function of the hardware timer, reads the absolute pulse value of the stepper motor encoder at the moment of triggering in real time, and marks it as the zero potential surface coordinate of the biological tissue. Stored in a register. The preset tissue contact threshold is included. It is a quantitative decision boundary for determining whether physical contact has occurred, used to determine the real-time contact confidence value. Perform binary attribute determination. The preset quantity... The time-domain continuous determination length is a positive integer sequence index ranging from 3 to 10, used to limit the stability of the logic state to ensure that the trigger signal is not generated by instantaneous physiological fluctuations.

[0090] The zero potential surface coordinates of the biological tissue The specific execution logic for the comparison and determination of quantitative values ​​is as follows: coordinates of the zero potential surface of biological tissue The value is taken at the sampling time. The corresponding real-time pulse count of the stepper motor encoder Its validity is contingent upon the current sampling time. At that time Within a continuous time window, at each sampling time Real-time contact confidence value All are not less than the tissue contact critical threshold. .

[0091] Step S3000, based on the preset target strike speed Extracting the primary voltage reference value The terminal driving pressure is generated by inverse dynamics calculation based on preset hardware physical parameters. Based on primary voltage reference value and terminal drive pressure Generate drive voltage control word Synchronous based on the zero potential surface coordinates of biological tissue Preset target strike speed and target strike depth Generate solenoid valve timing control instructions .

[0092] Specifically, this step aims to treat the strike actuator, which is operating under a nonlinear aerodynamic response environment, as a controlled object, utilizing a user-preset target strike velocity. and target strike depth Combined with the biological tissue zero potential surface coordinates from step S2300 This allows for speed calibration by mapping the potential drag loss of the pneumatic system to a primary voltage reference value. The steady-state compensation component is used to map the dynamic characteristics of the impact head acceleration process into the terminal driving pressure. The dynamic boost component in the control module achieves deep coupling between steady-state flow demand and transient pressure compensation, generating the final drive voltage control word. Timing control commands for solenoid valves To control the source and ensure the accuracy of the strike speed.

[0093] Further, step S3000 includes:

[0094] Step S3100, based on the preset target strike speed Retrieve the aerodynamic flow-voltage nonlinear mapping table stored in nonvolatile memory. Extract the primary voltage reference value .

[0095] Specifically, this step aims to improve the user-defined target firing speed. As a logic input, the abstract speed index is mapped to the primary voltage reference value of the electro-proportional valve by utilizing the physical evolution law of intake flow rate with regulating voltage under stable operation of the pneumatic system through a nonlinear lookup table method. This enables the initial conversion of strike kinetic energy demand into electrical control quantity at the data source.

[0096] In the specific implementation process, the control program retrieves the pneumatic flow-voltage nonlinear mapping table stored in the non-volatile memory EEPROM. This aerodynamic flow-voltage nonlinear mapping table It is based on Bernoulli's equation and is pre-calibrated to quantitatively describe the regulating drive level of the electro-proportional valve and the instantaneous intake air flow acting on the pneumatic actuator. The nonlinear physical correspondence between them. Due to the flow saturation effect of pneumatic actuators at different valve openings and the nonlinear characteristics of airflow damping caused by the limitation of air passage cross-section, the STM32 main control chip retrieves the target impact velocity set by the user. In the nonlinear mapping table of pneumatic flow-voltage The numerical range is determined by calling a piecewise linear interpolation operator to transform the discrete physical characteristic mapping relationship into a continuous voltage control quantity, in order to calculate the primary voltage reference value required to satisfy the uniform downward movement of the striking head. The user-defined target strike speed. The value determines the amount of air intake per unit time required when the drive cylinder drives the striking head to perform accelerated displacement; the piecewise linear interpolation operator is used to calculate continuous voltage control values ​​between discrete mapped data points to ensure the primary voltage reference value. Speed ​​of strike The smooth evolution.

[0097] Step S3200: Retrieve the preset equivalent mass of the impact component. Cylinder effective cross-sectional area Accelerate the journey and inherent frictional resistance constant Based on the inverse dynamics solution of the law of conservation of energy, the target impact velocity is calculated. Mapped to the terminal driving pressure at the end of the driving cylinder to reach the preset kinetic energy index. .

[0098] Specifically, this step aims to treat the strike actuator, which operates in a nonlinear aerodynamic response environment and possesses kinematic damping characteristics, as the logical solution object. It utilizes the law of conservation of energy to establish an inverse dynamic mapping, thereby converting the user-defined target strike velocity... The preset kinetic energy requirement, which characterizes the impact capability of the striking head, is mapped to the terminal driving pressure required to drive the cylinder. The physical matching between the strike kinetic energy demand and the airflow power output is achieved at the control and calculation end.

[0099] In the specific implementation process, the control program retrieves the hardware physical parameters stored in the storage unit and performs inverse dynamics calculations based on the law of conservation of energy to quantitatively calibrate the energy loss of the strike component during its acceleration from rest to the target velocity. The hardware physical parameters include the equivalent mass of the strike component. Cylinder effective cross-sectional area Accelerate the journey and inherent frictional resistance constant The equivalent mass of the strike component. It is the total inertial load including the striking head, drive linkage, and cylinder piston, the value of which is calibrated by the hardware structure of the actuator; the effective cross-sectional area of ​​the cylinder Its value is determined by the cylinder's inner diameter and is used to perform the dimensional conversion of gas pressure into mechanical axial force; the acceleration stroke This represents the acceleration stroke of the cylinder from a stationary state to a preset peak speed. Its value is determined by the physical stroke limit of the cylinder and is used to define the spatial span of kinetic energy conversion; the inherent frictional resistance constant... It is a characteristic operator that reflects the frictional loss between the sealing ring and the inner wall of the cylinder. Its value is obtained through pre-calibration and is used to compensate for energy dissipation in the mechanical transmission chain.

[0100] The execution logic of the inverse dynamics solution based on the law of conservation of energy is as follows: First, calculate the velocity at which the impact head accelerates to the user-defined target impact velocity. The required increase in kinetic energy will soon impact the equivalent mass of the component. Speed ​​of strike against target The product of squares is halved; subsequently, the control program divides the kinetic energy increment by the effective cross-sectional area of ​​the cylinder. With accelerated journey The product of these factors is used to map the kinetic energy increment into the required dynamic pressure component inside the cylinder cavity; finally, the control program multiplies the dynamic pressure component with the ambient atmospheric pressure constant. And the inherent frictional resistance constant used to offset mechanical wear losses. By performing algebraic accumulation, the total pressure required for the end of the driving cylinder to reach the preset kinetic energy target is calculated, i.e., the terminal driving pressure. This achieves alignment of the target velocity at the physical dimension level. The ambient atmospheric pressure constant is mentioned above. It is the absolute physical reference for pressure calculation. Its value is determined based on the environmental pressure of the geographical location of the equipment. It is used to eliminate the interference of initial pressure deviation caused by different altitudes on the consistency of pneumatic output.

[0101] Step S3300, based on terminal drive pressure This is mapped to a voltage compensation term and superimposed on the primary voltage reference value. The composite target driving voltage is generated, and then quantitatively calculated by a digital-to-analog converter to generate the driving voltage control word. Synchronization based on the zero potential surface coordinates of biological tissue Preset target strike depth and target strike speed Perform timing calculations to generate solenoid valve timing control commands that control the opening duration of the solenoid valve. .

[0102] Specifically, this step aims to use the primary voltage reference value from step S3100. and the terminal drive pressure from step S3200 As an object of electrical quantity fusion, the linear mapping ratio between the regulating voltage and the output pressure of the electric proportional valve is used to map the terminal pressure deviation as a level adjustment weight, combined with the biological tissue zero potential surface coordinates from step S2300. The timing calculation of the strike stroke is performed to generate a drive voltage control word that meets the quantization requirements of the actuator. Solenoid valve timing control command for controlling the opening duration of the solenoid valve At the electrical control layer, cross-dimensional phase alignment between strike energy planning and physical space benchmarks is achieved.

[0103] In the specific implementation process, the control program converts the terminal pressure load required for speed calibration into a discrete control code recognizable by the register by executing the electrical signal conversion logic of static mapping and dynamic compensation. The specific execution logic of the electrical signal conversion logic is as follows: First, calculate the terminal driving pressure. With ambient atmospheric pressure constant The terminal pressure deviation is calculated, and this deviation is multiplied by a preset voltage-pressure linear mapping operator to obtain a voltage compensation term for counteracting the nonlinear resistance of the air path; subsequently, the voltage compensation term is superimposed on the primary voltage reference value. The composite target driving voltage after energy efficiency compensation is obtained, and combined with the preset reference voltage in the digital-to-analog converter inside the STM32 main control chip. 12-bit quantization is performed using the full-scale quantization order, i.e., using the reference voltage. After normalizing the composite target driving voltage and multiplying it by the full-scale quantization order, the quantized control value after continuous quantity mapping is obtained. Finally, by performing a floor operation on the quantized control value, a driving voltage control word recognizable by the STM32 main control chip's digital-to-analog converter is generated. This achieves cross-dimensional phase alignment between the physical space reference and the release of impact energy, ensuring absolute consistency in impact speed. The preset voltage-pressure linear mapping operator is a proportional constant reflecting the adjustment sensitivity of the electro-proportional valve. Its value is calibrated by the linear transfer slope between the input control voltage range and the output pressure range of the electro-proportional valve, and is used to map the terminal pressure deviation into a level adjustment weight.

[0104] Synchronously, the control program calls the coordinates of the biological tissue's zero potential surface stored in the register. As the physical starting point coordinates of the strike trajectory, based on the user-preset target strike depth. Speed ​​of strike against target To strike the target deep With the preset displacement compensation constant Perform algebraic summation and divide the total accumulated distance by the target's strike speed. This allows for the calculation of the millisecond-level solenoid valve opening and holding time required for the drive cylinder to achieve the preset displacement. The preset displacement compensation constant is mentioned above. It is a characteristic component used to compensate for the backlash of the transmission system and the ineffective displacement stroke caused by the mechanical response lag of the solenoid valve. Its value is obtained through system no-load test calibration.

[0105] Obtain the solenoid valve opening and holding time Subsequently, the STM32 main control chip calls its built-in general-purpose timer module to execute timing instruction synthesis logic to construct an ordered control vector consisting of the turn-on pulse edge and the turn-off pulse edge, i.e., the solenoid valve timing control instruction. The specific execution logic of the timing instruction synthesis logic is as follows: The STM32 main control chip will convert the coordinates of the biological tissue zero potential surface. Defined as the physical reference origin for timing initiation, this is achieved by having the solenoid valve's opening level signal and the impact head coordinates cross the biological tissue's zero potential surface coordinates. Hardware-level synchronous triggering is executed at the specified time; synchronously, the control program performs a deterministic time delay offset relative to the opening level signal on the time axis, and this time delay offset is set to the solenoid valve opening holding time. And insert a shutdown level signal at the end of the delay; finally, the solenoid valve timing control command. The timer output comparison channel of the STM32 main control chip is mapped to physical control pulses to limit the effective time window for the driving air pressure to act on the cylinder piston, thereby stopping the axial displacement of the impact head within the spinal cord at the preset target impact depth. .

[0106] Step S4000, according to the drive voltage control word and solenoid valve timing control commands Capture real-time displacement pulse sequence Combining the zero potential surface coordinates of biological tissues Analysis of actual strike depth and actual strike speed And calculate the actual strike depth respectively. and actual strike speed Relative to the preset target depth and target strike speed Deviation is used to generate damage consistency evaluation coefficients. .

[0107] Specifically, this step aims to control the drive voltage from step S3300. Timing control commands for solenoid valves The striking mechanism, driven by the system and in dynamic displacement stroke, is used as the monitoring object, and the real-time displacement pulse sequence is captured. Combined with the coordinates of the biological tissue zero potential surface determined by the automated zeroing in step S2300 The physical displacement trajectory during execution is mapped to the actual impact depth, reflecting the true modeling energy. Compared with actual strike speed And the model consistency evaluation coefficient is calculated in closed loop at the control end. At the control decision level, the causal relationship between the execution process and preset indicators is verified and digitally audited, thereby completing the quantitative audit of the effects of automated zeroing and speed calibration compensation.

[0108] Further, step S4000 includes:

[0109] Step S4100, according to the drive voltage control word and solenoid valve timing control commands Configure the drive status of the electric proportional valve and the high-speed solenoid valve, and synchronously use a hardware timer to capture the pulse count value fed back by the photoelectric encoder at the end of the impact component in real time to obtain the real-time displacement pulse sequence. .

[0110] Specifically, this step aims to utilize the drive voltage control word from step S3300. Timing control commands for solenoid valves The actuator generates physical impact kinetic energy, and through the synchronous capture mechanism of the STM32 main control chip's hardware timer, the transient displacement of the impact head is mapped into a real-time displacement pulse sequence with time index characteristics within the time window when energy injection is enabled. Hardware-level phase alignment of instruction triggering and feedback acquisition is achieved at the physical execution dimension.

[0111] In the specific implementation process, the STM32 main control chip executes the impact drive and data capture logic based on hardware synchronous triggering, and converts the actuator drive instruction generated in step S3300, i.e., the drive voltage control word, into the data. Timing control commands for solenoid valves This is transformed into a physical impact action with a deterministic trajectory. The specific execution logic of the impact drive and data capture logic is as follows: First, the execution command level applies physical drive pressure to the actuator. The STM32 main control chip converts the 12-bit precision drive voltage control word into a quantization value. Write to the digital-to-analog converter. The control program controls the drive voltage via the word. Divide by the full-scale quantization order and multiply the resulting quotient by the reference voltage of the digital-to-analog converter. This will control the drive voltage word. Mapped to continuously distributed analog control voltage The analog control voltage By changing the current in the electromagnetic coil inside the proportional valve, a proportional electromagnetic force is generated, which overcomes the resistance of the return spring and drives the valve core to move, thereby adjusting the cross-sectional area of ​​the airflow passage. This establishes a control relationship with the drive voltage in the airflow circulation. The corresponding numerical value is the execution driving pressure. .

[0112] Secondly, based on the timing control command of the solenoid valve The pneumatic kinetic energy is injected with a time-truncation mechanism. The STM32 main control chip is equipped with a built-in hardware timer output comparison channel, which controls the solenoid valve timing instructions. A timing trigger signal is generated to drive the high-speed solenoid valve. This timing trigger signal drives the high-speed solenoid valve to open at a preset time and maintains the solenoid valve open for the duration determined in step S3300. Then, a forced shutdown is executed. This process involves applying pressure to the execution drive. By controlling the total volume of compressed air entering the drive cylinder within the time domain, static pressure is converted into axial driving energy acting on the drive impact component, thereby controlling the impact head to cross the biological interface and perform the impact task.

[0113] Finally, synchronous digital capture of the motion trajectory is performed. At the instant the high-speed solenoid valve opens, the STM32 main control chip initiates the encoder capture mode using its built-in hardware timer. The main control chip captures the pulse count values ​​fed back from the photoelectric encoder at the end of the strike component in real time with a fixed sampling period. The control program constructs a discrete dataset, i.e., a real-time displacement pulse sequence, from the pulse count values ​​corresponding to each sampling moment. This real-time displacement pulse sequence It fully characterizes the complete physical motion trajectory of the striking head from acceleration and initiation to contact with the spinal cord parenchyma and the end of the execution journey, achieving logical alignment between driving execution and trajectory perception.

[0114] Step S4200: Extract the real-time displacement pulse sequence Peak value of pulse count in Combining the zero potential surface coordinates of biological tissues To analyze the actual strike depth And synchronized in the real-time displacement pulse sequence Extracting the coordinates of the zero potential surface covering biological tissue Deviation from the preset interface for domain search The sampling point search window is used to calculate the actual strike velocity. .

[0115] Specifically, this step aims to process the real-time displacement pulse sequence captured in step S4100. Compared with the biological tissue zero potential surface coordinates obtained from the automated zeroing in step S2300 As input data, the modeling parameters based on spatial anchor point alignment are used inverse analytical logic to map the dynamic trajectory characteristics of the strike actuator evolving over time into physical displacement extrema and transient slope relative to the spinal cord surface. This aims to calculate the actual strike depth that reflects the true modeling energy. Compared with actual strike speed At the end of the execution layer, digital causal auditing of the impact effect is achieved, providing feedback data to verify the accuracy of speed calibration.

[0116] In the specific implementation process, the control program executes reverse analysis logic for modeling parameters based on spatial anchor point alignment to eliminate invalid displacement interference during the cylinder acceleration stroke and extract the physical force of the impact head penetrating the spinal cord. The specific execution logic of the reverse analysis logic for modeling parameters is as follows:

[0117] First, the control program uses a peak lookup algorithm in the real-time displacement pulse sequence. In the process, the maximum value of the pulse count during the downward axial stroke of the impact head after the impact action is triggered is retrieved and defined as the peak value of the pulse count. Subsequently, using the zero potential surface coordinates of biological tissue... Using the physical space origin as the reference point, perform displacement difference calculation, which involves calculating the peak value of the pulse count. Coordinates of the zero potential surface of the biological tissue The absolute value of the difference is multiplied by a preset pulse-displacement conversion coefficient to remove the invalid no-load stroke and extract the physical displacement representing the actual penetration of the impact head into the spinal cord parenchyma, i.e., the actual impact depth. The preset pulse-to-displacement conversion coefficient represents the physical length of the axial displacement of the striking component corresponding to a single pulse signal generated by the encoder. Its value is obtained by calibrating the physical line count of the photoelectric encoder and the mechanical transmission ratio of the actuator, and is used to map the count value in the digital domain to the length dimension in the physical domain.

[0118] Secondly, the control program executes transient rate extraction logic based on interface-side domain slicing to capture the dynamic characteristics of the interaction between the impact head and biological tissue. The specific extraction logic of the transient rate extraction logic is as follows: First, using the zero potential surface coordinates of the biological tissue... Centered on the real-time displacement pulse sequence Extracting coordinates of the zero potential surface of biological tissue and the pre-defined boundary domain search deviation of this distribution before and after it. The sampling point search window. The boundary domain search deviation. Defined as: the pulse number increment, based on the motion envelope of the striking head before and after contacting the biological interface, used to limit the range of velocity feature extraction, and is used in real-time displacement pulse sequences. The pulse count increment of the mid-frame positioning displacement sensor feedback value within the valid search interval is calculated. Subsequently, the control program calculates the difference between adjacent pulse counts within the sampling point search window and divides it by the sampling period of the main control chip's fixed step size and the pulse equivalent per unit stroke. The product of these values ​​yields a set of instantaneous velocities characterizing the process of the striking head traversing the biological interface. Subsequently, the velocity component with the largest value is retrieved and locked from this set of instantaneous velocities, defined as the actual striking velocity reflecting the kinetic energy characteristics of the striking head at the moment of contact with the spinal cord. Wherein, the unit stroke pulse equivalent The conversion ratio between encoder feedback frequency and physical motion rate is used to correct the conversion ratio between encoder feedback frequency and physical motion rate. Its value is obtained by calibrating the encoder physical line count and actuator transmission ratio, and is used to map digital pulse changes into physical velocity dimensions.

[0119] Step S4300, based on the actual strike depth and target strike depth Calculate the depth normalized deviation rate and adjust it according to the actual strike velocity. and target strike speed The normalized deviation rate of velocity is calculated, and a joint weighted deviation calculation is performed by combining the preset depth deviation weight operator and velocity deviation weight operator to generate the damage consistency evaluation coefficient. .

[0120] Specifically, this step aims to obtain the actual impact displacement depth from step S4200. Compared with actual strike speed As an audit indicator, the depth of the target strike Speed ​​of strike against target Construct an energy consistency evaluation logic and calculate the damage consistency evaluation coefficient that reflects the performance quality of the impact mission. This enables the consistent quantitative auditing of physical space displacement and transient energy release at the control decision level, providing digital evidence for identifying and filtering uncontrolled experimental variables caused by differences in tissue viscoelasticity.

[0121] In the specific implementation process, the control program transforms the complex impact execution results into verification coefficients with deterministic judgment significance by executing a multi-dimensional parameter-coupled energy consistency evaluation logic. The specific execution logic of the energy consistency evaluation logic is as follows: First, the control program extracts the actual impact depth, which reflects the actual execution state of the impact mission. Compared with actual strike speed Subsequently, the actual strike depths were calculated respectively. Relative to target strike depth The depth normalization bias rate and the actual strike speed relative to the speed of the target strike The velocity normalized deviation rate is then calculated. Next, using preset depth deviation weighting operators and velocity deviation weighting operators, square root operations are performed on the depth normalized deviation rate and velocity normalized deviation rate to construct a joint weighted deviation feature value. Finally, by subtracting the joint weighted deviation feature value from the baseline value 1, a baseline normalized complement operation is performed to generate a damage consistency evaluation coefficient with a value range between 0 and 1. This provides digital evidence to identify errors caused by automated zeroing bias or insufficient actuator power compensation. Specifically, the preset depth deviation weight operator is a proportional coefficient used to adjust the contribution of actual displacement error to the quantitative score of the damage model's standardization, and its value is determined based on the damage sensitivity of the tested spinal cord anatomy. The preset velocity deviation weight operator is a proportional coefficient used to adjust the contribution of transient impact velocity error to the quantitative score of the damage model's standardization, and its value reflects the consistency index requirements of impact momentum during the experimental impact modeling process.

[0122] Example 2:

[0123] This embodiment, based on Embodiment 1, provides an embedded precision spinal cord impact control system based on STM32, such as... Figure 2 As shown, the system includes a multimodal synchronous acquisition module, a zero potential surface reconstruction module, an energy planning module, and a consistency quantification evaluation module;

[0124] The multimodal synchronous acquisition module is used to synchronously drive two parallel hardware data transmission links using the update event signal of a hardware timer, thereby synchronously acquiring the capacitance field strength data of the spinal cord interface under test. and tactile pressure data Mapping to the same sampling time point generates the original dataset of biological interfaces. .

[0125] The zero potential surface reconstruction module is used to call the discrete difference algorithm to extract the original dataset of the biological interface. Gradient value of capacitance change in and pressure change gradient value Real-time contact confidence values ​​are constructed by combining the preset global gain operator ω. and in real-time contact confidence value The real-time pulse count of the stepper motor encoder is latched when the preset control sampling period is met. To obtain the coordinates of the zero potential surface of biological tissue .

[0126] The energy planning module is used to determine the preset target strike speed. Extracting the primary voltage reference value The terminal driving pressure is generated by inverse dynamics calculation based on preset hardware physical parameters. Based on primary voltage reference value and terminal drive pressure Generate drive voltage control word Synchronous based on the zero potential surface coordinates of biological tissue Preset target strike speed and target strike depth Generate solenoid valve timing control instructions .

[0127] The consistency quantification evaluation module is used to evaluate the driving voltage control word. and solenoid valve timing control commands Capture real-time displacement pulse sequence Combining the zero potential surface coordinates of biological tissues Analysis of actual strike depth and actual strike speed And calculate the actual strike depth respectively. and actual strike speed Relative to the preset target depth and target strike speed Deviation is used to generate damage consistency evaluation coefficients. .

[0128] The parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.

[0129] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A control method for an embedded precision spinal cord impact device based on STM32, characterized in that, include: By using the update event signal of the hardware timer to synchronously drive two parallel hardware data transmission links, the capacitance field strength data and tactile pressure data of the spinal cord interface to be tested are synchronously collected and mapped to the same sampling time to generate the original dataset of the biological interface. The discrete difference algorithm is called to extract the capacitance change gradient value and pressure change gradient value from the original dataset of the biological interface. The real-time contact confidence value is constructed by combining it with the preset global gain operator. When the real-time contact confidence value meets the preset control sampling period, the real-time pulse count of the stepper motor encoder is latched to obtain the zero potential surface coordinates of the biological tissue. The primary voltage reference value is extracted based on the preset target impact velocity. The terminal driving pressure is generated by inverse dynamics calculation in combination with the preset hardware physical parameters. The driving voltage control word is generated based on the primary voltage reference value and the terminal driving pressure. Simultaneously, the electromagnetic valve timing control command is generated based on the biological tissue zero potential surface coordinates, the preset target impact velocity, and the target impact depth. The real-time displacement pulse sequence is captured based on the driving voltage control word and the solenoid valve timing control command. The actual impact depth and actual impact velocity are analyzed by combining the zero potential surface coordinates of biological tissue. The deviation of the actual impact depth and actual impact velocity from the preset target impact depth and target impact velocity is calculated to generate the damage consistency evaluation coefficient.

2. The control method for an embedded precision spinal cord impact device based on STM32 according to claim 1, characterized in that, The method for generating the original dataset of the biological interface includes: The electrode array at the probe tip is activated by a preset clock drive signal. The sensitivity gain coefficient of the chip is adjusted in real time in conjunction with a preset sensitivity compensation register to capture the induced electrical fluctuations between the probe tip and the spinal cord surface in order to generate capacitance field strength data. The axial mechanical load transmitted through the contact interface at the bottom of the striking head is mapped as an analog voltage signal. The analog voltage signal is captured by an oversampling mechanism triggered by a hardware timer. The physiological tremor component is removed by a digital low-pass filtering algorithm to generate tactile pressure data. Two parallel hardware data transmission links are synchronously driven by the update event signal of the hardware timer. The capacitance field strength data and tactile pressure data are mapped to the same sampling time through the direct memory access controller to construct heterogeneous feature vectors and form the original dataset of biological interface.

3. The control method for an embedded precision spinal cord impact device based on STM32 according to claim 2, characterized in that, The execution method of the digital low-pass filtering algorithm includes: The effective contact potential increment is obtained by subtracting the preset static bias voltage from the analog voltage signal. The effective contact potential increment is then normalized using a preset reference voltage to obtain the voltage deviation ratio. The voltage deviation ratio, the full-scale quantization order of the digital-to-analog converter inside the STM32 main control chip, and the preset pressure-to-voltage conversion calibration coefficient are multiplied together, and the resulting product is rounded down to generate tactile pressure data.

4. The control method for an embedded precision spinal cord impact device based on STM32 according to claim 1, characterized in that, The method for obtaining the zero potential surface coordinates of the biological tissue includes: A sliding parsing window is constructed, and the discrete difference algorithm is called to perform time-domain analysis on the original dataset of biological interfaces to extract the gradient values ​​of capacitance change and pressure change. The predicted gain term is obtained by performing an exponential decay mapping on the gradient value of capacitance change. Simultaneously, a confirmation weight term is constructed based on the gradient value of pressure mutation. The preset global gain operator, the predicted gain term, and the confirmation weight term are multiplied together to generate a real-time contact confidence value. Based on the comparison and judgment of the real-time contact confidence value and the preset tissue contact critical threshold, when the real-time contact confidence value continuously meets the preset control sampling period, the hardware timer is triggered to read the real-time pulse number of the stepper motor encoder in real time, and the real-time pulse number is marked as the zero potential surface coordinate of the biological tissue to complete the automatic zeroing.

5. The control method for an embedded precision spinal cord impact device based on STM32 according to claim 4, characterized in that, The methods for extracting the capacitance change gradient value and the pressure sudden change gradient value include: Heterogeneous feature vectors from the original dataset of biological interfaces are retrieved sequentially from static random access memory; Based on heterogeneous feature vectors, a preset sampling span is constructed. The sliding parsing window will display the sampling time. Subtract the backtracking from the capacitance field strength data Historical capacitance field strength data after each synchronous sampling period are used to obtain the net change in capacitance field strength, which is then divided by... The total sampling time span is determined by multiplying the synchronous sampling period by the total sampling time span, and the gradient value of capacitance change is generated. The synchronous sampling period is a fixed time interval in microseconds preset by the internal hardware timer of the STM32 main control chip; Based on heterogeneous feature vectors, the sampling time Tactile pressure data minus retrospective Historical tactile pressure data after a synchronous sampling period are used to obtain the net value of tactile pressure change, which is then divided by the total sampling time span to generate the pressure change gradient value.

6. The control method for an embedded precision spinal cord impact device based on STM32 according to claim 1, characterized in that, The method for generating the drive voltage control word and the solenoid valve timing control instruction includes: Based on the preset target impact speed, the aerodynamic flow-voltage nonlinear mapping table stored in the non-volatile memory is retrieved to extract the primary voltage reference value; The system retrieves the preset equivalent mass of the impact component, the effective cross-sectional area of ​​the cylinder, the acceleration stroke, and the inherent frictional resistance constant. Based on the inverse dynamics calculation of the law of conservation of energy, it maps the target impact velocity into the terminal driving pressure at the end of the driving cylinder to reach the preset kinetic energy index. The terminal driving pressure is mapped to a voltage compensation term and superimposed on the primary voltage reference value to generate a composite target driving voltage. The voltage is then quantitatively calculated by a digital-to-analog converter to generate the driving voltage control word. Simultaneously, based on the zero potential surface coordinates of biological tissue, the preset target impact depth, and the target impact velocity, a timing calculation is performed to generate a timing control command for the solenoid valve to control the opening duration.

7. The control method for an embedded precision spinal cord impact device based on STM32 according to claim 1, characterized in that, The method for performing the inverse dynamics solution includes: Retrieve hardware physical parameters stored in the storage unit, including the equivalent mass of the impact component, the effective cross-sectional area of ​​the cylinder, the acceleration stroke, and the inherent frictional resistance constant. Calculate the kinetic energy increment required for the strike head to accelerate to the preset target impact velocity; Divide the kinetic energy increment by the product of the effective cross-sectional area of ​​the cylinder and the acceleration stroke to map it into the dynamic pressure component required inside the cylinder cavity. The dynamic pressure component, the preset ambient atmospheric pressure constant, and the preset inherent frictional resistance constant are algebraically summed to calculate the terminal driving pressure required for the end of the driving cylinder to reach the preset kinetic energy index.

8. The control method for an embedded precision spinal cord impact device based on STM32 according to claim 1, characterized in that, The method for generating the damage consistency evaluation coefficient includes: Configure the drive state of the electric proportional valve and the high-speed solenoid valve according to the drive voltage control word and the solenoid valve timing control command, and synchronously use the hardware timer to capture the pulse count value fed back by the photoelectric encoder at the end of the impact component in real time to obtain the real-time displacement pulse sequence. The peak value of the pulse count in the real-time displacement pulse sequence is extracted and combined with the coordinates of the biological tissue zero potential surface to analyze the actual impact depth. At the same time, the sampling point search window covering the biological tissue zero potential surface coordinates and the preset boundary surface domain search deviation is extracted in the real-time displacement pulse sequence to calculate the actual impact velocity. The depth normalization deviation rate is calculated based on the actual strike depth and the target strike depth, and the velocity normalization deviation rate is calculated based on the actual strike velocity and the target strike velocity. The combined weighted deviation calculation is performed using preset depth deviation weight operators and velocity deviation weight operators to generate damage consistency evaluation coefficients.

9. A control system for an embedded precision spinal cord impactor based on STM32, used to implement the control method for an embedded precision spinal cord impactor based on STM32 as described in any one of claims 1-8, characterized in that, The system includes a multimodal synchronous acquisition module, a zero potential surface reconstruction module, an energy planning module, and a consistency quantification evaluation module. The multimodal synchronous acquisition module is used to synchronously drive two parallel hardware data transmission links using the update event signal of the hardware timer, and to map the capacitance field strength data and tactile pressure data of the spinal cord interface to be tested to the same sampling time to generate the original dataset of the biological interface. The zero potential surface reconstruction module is used to call the discrete difference algorithm to extract the capacitance change gradient value and pressure change gradient value in the original dataset of the biological interface, combine it with the preset global gain operator to construct the real-time contact confidence value, and latch the real-time pulse number of the stepper motor encoder when the real-time contact confidence value meets the preset control sampling period in order to obtain the zero potential surface coordinates of the biological tissue. The energy planning module is used to extract the primary voltage reference value based on the preset target impact velocity, combine the preset hardware physical parameters to generate the terminal driving pressure through inverse dynamics calculation, generate the driving voltage control word based on the primary voltage reference value and the terminal driving pressure, and simultaneously generate the electromagnetic valve timing control command based on the biological tissue zero potential surface coordinates, the preset target impact velocity and the target impact depth. The consistency quantification evaluation module is used to capture real-time displacement pulse sequences based on the driving voltage control word and the solenoid valve timing control command, analyze the actual impact depth and actual impact velocity by combining the zero potential surface coordinates of biological tissue, and calculate the deviation of the actual impact depth and actual impact velocity from the preset target impact depth and target impact velocity to generate damage consistency evaluation coefficients.