A control method and system for an underwater thruster stepper motor

CN122660482APending Publication Date: 2026-08-28HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611038667.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0007]有鉴于此,本发明旨在提出一种水下推进器步进电机的控制方法和系统,以解决当前水下推进器无法在无额外传感器的前提下,实现扰动的高精度识别,同时保证细分切换与电机电气相位精准同步的问题

Benefits of technology

本发明提出了一种与现有技术不同的技术方案,并非对现有感知与执行模块的简单拼接,而是从水下扰动的物理特性与步进电机的电气特性出发,形成了感知、判决、执行全流程的硬件协同逻辑。在扰动感知层面,现有电流采样方案多采用相电流采集,易受三相不平衡影响丢失侧向流等偏载信息,本发明采用母线全电流采样架构,通过在母线回路串联高精度低漂移采样电阻,完整采集总功率波动,配合后端的共模噪声抑制与带通滤波处理,仅提取与螺旋桨负载波动相关的动态交流纹波,避免了三相电流采样的信号丢失问题。姿态信号处理环节摒弃了耗时数十毫秒的全姿态解算流程,直接对惯性测量单元的原始角速度与加速度数据做特征提取:对角速度取模表征机体瞬时转动剧烈程度,对加速度做1Hz高通滤波后取模,滤除重力与缓慢倾角变化,仅保留水流冲击带来的瞬态平动特征,两类信号分别从负载受力与载体运动两个独立物理维度表征扰动,形成天然互补,覆盖了轴向负载扰动与侧向流非负载扰动两类典型场景,从感知源头弥补了单信号的感知盲区。在扰动判决层面,现有融合方案多采用固定权重,无法适配不同扰动类型的信号特征差异,本发明基于电流波动强度与姿态晃动强度的实时幅值关系动态调整融合权重:当电流波动高、姿态晃动低时,判定为机器人自身加减速工况,调高姿态信号权重以降低自身运动引发的误判;当姿态晃动突增、电流波动平稳时,判定为侧向流冲击工况,进一步压低电流信号权重以提升侧向流识别灵敏度,同时引入双路信号的置信度评估机制,当惯性测量单元出现量程饱和或高频异常振动时,自动降低姿态信号置信度、提升电流信号权重,避免因单路信号失效导致的判决错误,配合匹配电机正常加减速波动峰值的迟滞阈值与10ms稳定维持条件,从判决逻辑上避免了阈值临界振荡问题。在执行控制层面,现有细分切换多采用软件轮询架构,切换时序由主控软件时钟决定,与电机电气相位无关联,本发明重构了切换触发的硬件逻辑,通过高速比较器实时捕捉驱动芯片电流检测引脚的过零脉冲,将电机相电流过零点作为细分切换的唯一主触发源,预先在内存中存储16细分与32细分模式对应的GPIO控制字,过零脉冲直接触发DMA控制器将对应控制字搬运至GPIO输出寄存器,切换动作严格对齐电机转矩穿越零点,从物理时序上避免了切换瞬间的转矩突变。针对突发强冲击场景,专门设置了硬件级紧急切换通路,当角速度超过200°/s的预设阈值时,惯性测量单元的硬件比较器直接生成最高优先级中断,跳过融合判决的等待流程,强制触发DMA完成细分切换,同时配置定时器更新事件作为备用触发源,在启动阶段或电流过零信号异常时自动接管同步任务,保证任意工况下切换时刻均与电机电气相位对齐。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122660482A_ABST
    Figure CN122660482A_ABST
Patent Text Reader

Abstract

The application provides a control method and system of an underwater propeller stepping motor, and belongs to the technical field of underwater robot propeller control. The method and system solve the problems of low disturbance identification accuracy, difficulty in synchronizing fine division switching and motor phase when the underwater propeller has no additional sensor. The method comprises the following steps: synchronously collecting motor bus current dynamic ripple and IMU angular velocity and acceleration signals; the current ripple is converted into a current fluctuation intensity parameter through an effective value conversion; the angular velocity is taken as a rotation intensity parameter, and the acceleration is taken as a transient translation parameter after high-pass filtering; the two parameters are fused to obtain an attitude shaking intensity parameter; the real-time ratio of the two parameters is used to dynamically allocate a fusion weight, and an effective disturbance index is calculated; the index is compared with a threshold value in a delay interval to generate a fine division switching instruction; and the motor phase current zero-crossing point is used as a trigger source to update the driving chip fine division control pin level through DMA operation, so that fine division mode switching is completed. The method and system are mainly used in the field of ocean exploration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of underwater robot thruster control technology, and in particular relates to a control method for an underwater thruster stepper motor. Background Technology

[0002] As core equipment for ocean exploration, underwater engineering operation and maintenance, and emergency rescue, the operational stability of underwater robots directly depends on the accuracy of their thruster's power control. The underwater environment is characterized by complex flow field disturbances such as turbulence, lateral flow, and sudden eddies. As the power actuator, the thruster must sense these disturbances and adjust its output strategy within milliseconds to maintain controllable robot attitude. Currently, most mainstream observation and operational underwater robots use open-loop stepper motors to drive their thrusters. However, due to the strong uncertainties in underwater flow fields, the disturbance rejection control of thrusters remains a key focus of industry research and development.

[0003] Early disturbance rejection control schemes often relied on external sensing devices, such as installing pressure sensors or Doppler velocimeters through flow channels in the robot's shell, directly measuring flow field parameters to determine disturbances. While the sensing principle of this approach is intuitive, it has many inherent drawbacks. External sensors require disrupting the robot's sealed structure, increasing the risk of leakage and raising overall power consumption and manufacturing costs. For example, a 300-meter-class observation ROV, after equipping itself with two sets of miniature pressure sensors, experienced a 17% increase in overall power consumption. Furthermore, due to the sensor installation locations being obscured by the robot's structure, the measured flow velocity deviated from the actual flow velocity acting on the thrusters by up to 32%. More critically, the sampling period of these sensors is generally above 10 milliseconds, which cannot meet the response requirements of microsecond-level flow field abrupt changes, often resulting in sensing lag when facing sudden water surges.

[0004] To reduce system complexity, the industry has gradually shifted towards sensorless sensing solutions in recent years, with single-signal sensing being the most representative. One type of solution relies solely on motor current fluctuations to detect disturbances, reflecting propeller load fluctuations by collecting changes in the ripple of the bus current or phase current. However, current signals are highly sensitive to axial load changes but extremely weak in response to non-axial disturbances such as lateral currents. When the propeller is impacted by lateral water flow, the propeller load change is only one-fifth of that of axial disturbances, and the current ripple amplitude is easily submerged in the electromagnetic noise of the motor. A certain type of micro underwater robot using single-current sensing experienced a disturbance miss rate exceeding 45% in a lateral current environment with a flow rate of 1 m / s, repeatedly resulting in roll loss of control due to the failure to recognize the lateral current. Another type of solution relies solely on the attitude signal output by the inertial measurement unit to detect disturbances, identifying external impacts through changes in angular velocity or acceleration. However, inertial measurement units (IMUs) cannot distinguish whether the robot's swaying is caused by external water flow or its own motion. When the robot performs routine maneuvers such as turning, acceleration, and deceleration, the angular velocity characteristics measured by the IMU highly overlap with those caused by water flow impact. A certain type of educational underwater robot using a single IMU sensing scheme exhibits a near 40% probability of misinterpreting its own motion as water flow disturbance during routine acceleration and deceleration. Frequent mis-triggered control strategy adjustments actually lead to operational jitter. Industry attempts have attempted to perform a simple weighted average of the two types of single signals, but due to the significant differences in noise characteristics and response bandwidth between the two types of signals, the stability of the fused result is actually lower than that of the single-signal solution, and a mature commercial technology has yet to be developed.

[0005] Even with accurate disturbance sensing, controlling the timing of microstepping switching remains a major technical challenge. The microstepping mode of a stepper motor determines the smoothness of its output torque and its maximum torque. High microstepping mode results in low torque ripple and stable operation, while low microstepping mode provides high output torque and strong disturbance rejection. Dynamically switching microstepping based on disturbance level is the mainstream approach to improving the overall performance of the actuator. Currently, microstepping switching often employs a software polling execution architecture. The main controller periodically reads the sensing signal, determines the disturbance level, and then rewrites the microstepping control pin level of the driver chip via software. Under this architecture, the delay from sensing to execution is generally over 80 microseconds, while a single microstep cycle of a stepper motor at a 20 kHz drive frequency is only 50 microseconds. If the switching timing does not match the phase of the motor's phase current, it will directly lead to a sudden torque change, causing noticeable vibrations at best, and motor stoppage at worst. A certain type of underwater inspection robot uses an STM32F407 main controller and switches between 16-microstep and 32-microstep modes via software polling. Under step load changes, the peak torque fluctuation can reach 0.28 N·m, leading to several accidents where the thrusters lost synchronization and the robot fell to the bottom. Another solution uses a dedicated driver chip with built-in microstepping switching functionality; however, these chips are expensive, and the switching logic is fixed within the chip, making it impossible to adjust thresholds and response strategies according to actual operating scenarios. This results in extremely poor flexibility and makes it difficult to adapt to different thruster models and operational requirements.

[0006] In summary, there is currently no complete solution in the field of underwater thruster control that balances perception accuracy, real-time response, and cost advantages. How to achieve high-precision disturbance identification without additional sensors, while ensuring precise synchronization between microstepping and motor electrical phase, and avoiding torque shocks and loss of synchronization during the switching process, remains a technical challenge that urgently needs to be solved in this field. Summary of the Invention

[0007] In view of this, the present invention aims to propose a control method and system for a stepper motor of an underwater thruster, in order to solve the problem that current underwater thrusters cannot achieve high-precision identification of disturbances without additional sensors, while ensuring precise synchronization of microstepping switching and motor electrical phase.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: a control method for a stepper motor of an underwater thruster, the method comprising: Synchronously acquire the dynamic ripple signal of the motor bus current and the angular velocity and acceleration signals of the inertial measurement unit of the machine body; The effective value of the bus current dynamic ripple signal is converted to obtain the current fluctuation intensity parameter. The rotational severity parameter is obtained by taking the modulus of the angular velocity signal, and the transient translational parameter is obtained by taking the modulus of the acceleration signal after high-pass filtering. The rotational severity parameter and the transient translational parameter are then fused to obtain the attitude sway intensity parameter. Based on the real-time ratio between the current fluctuation intensity parameter and the attitude sway intensity parameter, the fusion weights of the two are dynamically allocated, and an effective disturbance index is calculated and generated. The effective disturbance index is compared with a preset threshold with a hysteresis interval to generate a detailed switching instruction; In response to the microstepping switching command, the microstepping control pin level of the driver chip is updated through direct memory access operation, using the zero-crossing point of the motor phase current as the trigger source, to complete the microstepping mode switching.

[0009] Furthermore, a preferred method is proposed, in which the step of synchronously acquiring the dynamic ripple signal of the motor bus current is performed by connecting a sampling resistor in series in the bus circuit for full current acquisition. After noise suppression by a common-mode choke, the signal is amplified by a fixed-gain differential amplifier and then the dynamic ripple signal is extracted by a second-order Butterworth bandpass filter with a lower cutoff frequency of 5Hz and an upper cutoff frequency of 18kHz.

[0010] Furthermore, a preferred method is proposed, wherein in the step of calculating and generating the effective disturbance index, confidence coefficients corresponding to the current signal and the attitude signal are introduced respectively. When the inertial measurement unit is detected to have range saturation or high-frequency abnormal vibration, the confidence coefficient of the attitude signal is reduced and the confidence coefficient of the current signal is increased accordingly. The effective disturbance index is generated through normalization processing.

[0011] Furthermore, a preferred method is proposed, wherein the preset threshold with hysteresis interval includes a strong disturbance threshold and a weak disturbance threshold, wherein the strong disturbance threshold corresponds to a 16-microstep mode and the weak disturbance threshold corresponds to a 32-microstep mode; the strong disturbance threshold is higher than the weak disturbance threshold, and the difference between the two is greater than the peak value of the fluctuation caused by the normal acceleration and deceleration of the motor; the generation of the microstep switching command also needs to satisfy that the effective disturbance index is stably maintained outside the threshold for a preset duration.

[0012] Furthermore, a preferred method is proposed, in which, in the step of using the zero-crossing point of the motor phase current as the trigger source, a high-speed comparator is connected to the current detection pin of the driver chip to monitor the zero-crossing moment of the bus current in real time, and the zero-crossing pulse signal is used as the hardware trigger source for direct memory access transmission.

[0013] Furthermore, a preferred approach is proposed, wherein the method further includes an emergency switching step: when the angular velocity of the body is detected to exceed a preset impact threshold, a hardware interrupt of the highest priority is generated, directly triggering a direct memory access operation to force a switch to 16 subdivision mode. The emergency switching step skips the calculation and filtering waiting process of the effective disturbance index.

[0014] Furthermore, a preferred method is proposed: when updating the microstepping control pin level of the driver chip through direct memory access operation, GPIO control words corresponding to 16-microstep mode and 32-microstep mode are stored in memory in advance, and the trigger source directly starts DMA transfer to write the corresponding control word into the GPIO output register, thereby realizing microsecond-level synchronous toggling of the microstepping control pin level.

[0015] Furthermore, a preferred method is proposed, wherein the step of dynamically allocating the fusion weights of the two specifically includes: when the current fluctuation intensity parameter is high and the attitude sway intensity parameter is low, it is determined to be a motor self-acceleration and deceleration condition, and the weight of the current signal is allocated lower than the weight of the attitude signal; when the attitude sway intensity parameter suddenly increases and the current fluctuation intensity parameter is stable, it is determined to be a lateral flow impact condition, and the weight of the current signal is allocated lower than the weight of the attitude signal.

[0016] Based on the same inventive concept, the present invention also proposes an underwater thruster control system, the system comprising: The sampling circuit, connected in series in the motor bus, is used to collect the dynamic ripple signal of the current. Inertial measurement unit, used to collect angular velocity and acceleration signals of the machine body; The main control chip has a built-in analog-to-digital converter and a direct memory access controller, which are used to execute the methods described in any of the above, and pre-store the GPIO control words corresponding to the 16-microstep mode and the 32-microstep mode. The driver chip receives the stepping pulses and microstepping control levels sent by the main control chip and drives the stepper motor. The high-speed comparator connects the input terminal to the sampling circuit and the current detection pin of the driver chip, and the output terminal connects to the external interrupt interface of the main control chip and the trigger interface of the direct memory access controller to generate a current zero-crossing pulse signal.

[0017] Furthermore, a preferred embodiment is proposed, wherein the main control chip is also configured with a timer update event as a backup trigger source. When the startup phase or the current zero-crossing signal is abnormal, the system automatically switches to the timer update event to trigger direct memory access operation in order to calibrate the phase alignment of the subdivision switching.

[0018] Compared with the prior art, the beneficial effects of the present invention are: This invention proposes a technical solution different from existing technologies. It is not a simple assembly of existing sensing and execution modules, but rather, starting from the physical characteristics of underwater disturbances and the electrical characteristics of stepper motors, it forms a hardware-coordinated logic for the entire process of sensing, decision-making, and execution. At the disturbance sensing level, existing current sampling schemes mostly use phase current acquisition, which is easily affected by three-phase imbalance and loses information such as lateral current and off-center load. This invention adopts a bus full-current sampling architecture. By connecting high-precision, low-drift sampling resistors in series in the bus circuit, it fully acquires total power fluctuations. Combined with backend common-mode noise suppression and bandpass filtering, it extracts only the dynamic AC ripple related to propeller load fluctuations, avoiding the signal loss problem of three-phase current sampling. The attitude signal processing stage abandons the full attitude calculation process that takes tens of milliseconds and directly extracts features from the raw angular velocity and acceleration data of the inertial measurement unit: the angular velocity is modulated to represent the instantaneous intensity of the body's rotation, and the acceleration is modulated after being filtered by a 1Hz high-pass filter to remove gravity and slow tilt angle changes, retaining only the transient translational features caused by the water flow impact. The two types of signals represent disturbances from two independent physical dimensions, namely load force and carrier motion, forming a natural complement, covering two typical scenarios: axial load disturbance and lateral flow non-load disturbance, thus making up for the perception blind spot of a single signal from the source of perception. At the disturbance judgment level, existing fusion schemes mostly use fixed weights, which cannot adapt to the differences in signal characteristics of different disturbance types. This invention dynamically adjusts the fusion weights based on the real-time amplitude relationship between current fluctuation intensity and attitude sway intensity: when the current fluctuation is high and the attitude sway is low, it is judged as the robot's own acceleration and deceleration condition, and the attitude signal weight is increased to reduce misjudgments caused by its own motion; when the attitude sway suddenly increases and the current fluctuation is stable, it is judged as the lateral flow impact condition, and the current signal weight is further reduced to improve the lateral flow recognition sensitivity. At the same time, a confidence evaluation mechanism for dual signals is introduced. When the inertial measurement unit experiences range saturation or high-frequency abnormal vibration, the confidence of the attitude signal is automatically reduced and the weight of the current signal is increased to avoid judgment errors caused by the failure of a single signal. Combined with the hysteresis threshold of the peak value of the normal acceleration and deceleration fluctuation of the matching motor and the 10ms stable maintenance condition, the threshold critical oscillation problem is avoided from the judgment logic. At the execution control level, existing microstepping switching mostly adopts a software polling architecture, and the switching timing is determined by the main control software clock, which is unrelated to the motor electrical phase. This invention reconstructs the hardware logic of switching triggering, and captures the zero-crossing pulse of the current detection pin of the driver chip in real time through a high-speed comparator. The zero-crossing point of the motor phase current is used as the sole main trigger source for microstepping switching. The GPIO control words corresponding to the 16-microstepping and 32-microstepping modes are stored in memory in advance. The zero-crossing pulse directly triggers the DMA controller to move the corresponding control word to the GPIO output register. The switching action is strictly aligned with the motor torque crossing the zero point, thus avoiding the sudden torque change at the moment of switching from a physical timing perspective.For sudden strong impact scenarios, a hardware-level emergency switching path is specially set up. When the angular velocity exceeds the preset threshold of 200° / s, the hardware comparator of the inertial measurement unit directly generates the highest priority interrupt, skips the waiting process of fusion decision, and forcibly triggers DMA to complete the subdivision switching. At the same time, a timer update event is configured as a backup trigger source, which automatically takes over the synchronization task during the startup phase or when the current zero-crossing signal is abnormal, ensuring that the switching time is aligned with the electrical phase of the motor under any operating condition.

[0019] Regarding sensing accuracy, under standard operating conditions of a flow velocity of 1.0 m / s and turbulence intensity of 20%, the lateral leakage detection rate of this invention is reduced from 47% in the single-current scheme to 3%, and the self-motion false detection rate is reduced from 38% in the single-IMU scheme to 2%. No additional external pressure or flow velocity sensors are required, thus avoiding damage to the machine's sealing structure and introducing no additional power consumption. Regarding switching smoothness, under a 0.2 N·m step load change, the peak torque fluctuation is reduced from 0.28 N·m in the traditional software switching scheme to 0.03 N·m, a reduction of 89.3%. There is no step loss during switching, significantly improving motor running smoothness. Regarding real-time response, under sudden angular velocity step impact conditions, the response time is shortened from 82 μs in the traditional software polling scheme to 2.3 μs, an improvement of approximately 35 times. Switching can be completed within a single 50 μs microstep cycle of a 20 kHz stepper drive, with a hard real-time response bandwidth exceeding 1 kHz, far surpassing the 100 Hz level of traditional schemes. In terms of system robustness, the hysteresis interval design can effectively suppress threshold critical oscillations, the dynamic weight and confidence mechanism can adapt to different types of disturbances, the backup trigger source can ensure switching phase alignment when the current zero-crossing signal is abnormal, and the thruster can still maintain stable operation even under extreme conditions such as inertial measurement unit saturation and sudden flow field changes, which can support the long-term stable operation of underwater robots in complex turbulent environments. Attached Figure Description

[0020] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a logic block diagram of a control method for a stepper motor of an underwater thruster according to the present invention; Figure 2 This is a logic block diagram of an underwater thruster control system according to the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other, and the described embodiments are only some embodiments of the present invention, not all embodiments.

[0022] Implementation Method 1: This implementation method proposes a control method for a stepper motor of an underwater thruster, the method comprising: Synchronously acquire the dynamic ripple signal of the motor bus current and the angular velocity and acceleration signals of the inertial measurement unit of the machine body; The effective value of the bus current dynamic ripple signal is converted to obtain the current fluctuation intensity parameter. The rotational severity parameter is obtained by taking the modulus of the angular velocity signal, and the transient translational parameter is obtained by taking the modulus of the acceleration signal after high-pass filtering. The rotational severity parameter and the transient translational parameter are then fused to obtain the attitude sway intensity parameter. Based on the real-time ratio between the current fluctuation intensity parameter and the attitude sway intensity parameter, the fusion weights of the two are dynamically allocated, and an effective disturbance index is calculated and generated. The effective disturbance index is compared with a preset threshold with a hysteresis interval to generate a detailed switching instruction; In response to the microstepping switching command, the microstepping control pin level of the driver chip is updated through direct memory access operation, using the zero-crossing point of the motor phase current as the trigger source, to complete the microstepping mode switching.

[0023] In this embodiment, in the step of synchronously acquiring the dynamic ripple signal of the motor bus current, a full current acquisition is performed by connecting a sampling resistor in series in the bus circuit. After noise suppression by a common-mode choke, the signal is amplified by a fixed-gain differential amplifier and then the dynamic ripple signal is extracted by a second-order Butterworth bandpass filter with a lower cutoff frequency of 5Hz and an upper cutoff frequency of 18kHz.

[0024] In this embodiment, in the step of calculating and generating the effective disturbance index, confidence coefficients corresponding to the current signal and the attitude signal are introduced respectively. When the inertial measurement unit is detected to have range saturation or high-frequency abnormal vibration, the confidence coefficient of the attitude signal is reduced and the confidence coefficient of the current signal is increased accordingly. The effective disturbance index is generated through normalization processing.

[0025] In this embodiment, the preset threshold with hysteresis interval includes a strong disturbance threshold and a weak disturbance threshold. The strong disturbance threshold corresponds to a 16-microstep mode, and the weak disturbance threshold corresponds to a 32-microstep mode. The strong disturbance threshold is higher than the weak disturbance threshold, and the difference between the two is greater than the peak value of the fluctuation caused by the normal acceleration and deceleration of the motor. The generation of the microstep switching command also needs to satisfy that the effective disturbance index is stably maintained outside the threshold for a preset duration.

[0026] In this embodiment, in the step of using the zero-crossing point of the motor phase current as the trigger source, a high-speed comparator is connected to the current detection pin of the driver chip to monitor the zero-crossing moment of the bus current in real time, and the zero-crossing pulse signal is used as the hardware trigger source for direct memory access transmission.

[0027] In this embodiment, the method further includes an emergency switching step: when the angular velocity of the body exceeds a preset impact threshold, a hardware interrupt with the highest priority is generated, directly triggering a direct memory access operation to force a switch to 16 subdivision mode. The emergency switching step skips the calculation and filtering waiting process of the effective disturbance index.

[0028] In this embodiment, when updating the microstepping control pin level of the driver chip through direct memory access operation, GPIO control words corresponding to 16-microstepping mode and 32-microstepping mode are stored in memory in advance. The trigger source directly starts DMA transfer to write the corresponding control word into the GPIO output register, thereby realizing microsecond-level synchronous toggling of the microstepping control pin level.

[0029] In this embodiment, the step of dynamically allocating the fusion weights of the two specifically includes: when the current fluctuation intensity parameter is high and the attitude sway intensity parameter is low, it is determined to be a motor acceleration and deceleration condition, and the weight of the current signal is allocated lower than the weight of the attitude signal; when the attitude sway intensity parameter suddenly increases and the current fluctuation intensity parameter is stable, it is determined to be a lateral flow impact condition, and the weight of the current signal is allocated lower than the weight of the attitude signal.

[0030] Implementation Method 2: This implementation method proposes an underwater thruster control system, the system comprising: The sampling circuit, connected in series in the motor bus, is used to collect the dynamic ripple signal of the current. Inertial measurement unit, used to collect angular velocity and acceleration signals of the machine body; The main control chip has a built-in analog-to-digital converter and a direct memory access controller, and is used to execute the method as described in any one of claims 1 to 8, and pre-store the GPIO control words corresponding to the 16-microstep mode and the 32-microstep mode; The driver chip receives the stepping pulses and microstepping control levels sent by the main control chip and drives the stepper motor. The high-speed comparator connects the input terminal to the sampling circuit and the current detection pin of the driver chip, and the output terminal connects to the external interrupt interface of the main control chip and the trigger interface of the direct memory access controller to generate a current zero-crossing pulse signal.

[0031] In this embodiment, the main control chip is also configured with a timer update event as a backup trigger source. When the startup phase or the current zero-crossing signal is abnormal, it automatically switches to the timer update event to trigger direct memory access operation in order to calibrate the phase alignment of the subdivision switching.

[0032] Implementation Method 3, see below Figure 1 and Figure 2 This embodiment describes a specific application example of the underwater thruster control system described in Embodiment 2, applicable to vector propulsion control scenarios for observation-level ROVs, AUVs, and other underwater robots. The system hardware is based on the STM32G474 main control chip, combined with a DRV8825 stepper motor driver chip, a BMI088 six-axis inertial measurement unit, and peripheral analog circuitry. The thruster motor is a 57 series two-phase stepper motor with an operating voltage of 24V and a rated load of 0.5 N·m.

[0033] In the signal acquisition stage, the system implements a dual-dimensional sensing scheme without additional sensors. For current fluctuation signals, a 10mΩ high-precision sampling resistor is connected in series in the motor bus circuit. This resistor has an accuracy of ±1% and a temperature drift of no more than 50ppm / ℃. A 100μH common-mode choke is connected in series after the sampling resistor to suppress common-mode noise, achieving a common-mode rejection ratio greater than 60dB at a 40kHz switching frequency. The processed signal is then fed into an INA826 differential amplifier with a fixed gain of 50. Subsequently, the signal enters a second-order Butterworth bandpass filter. The lower cutoff frequency of this filter is set to 5Hz to filter out DC components and slowly varying motor components, corresponding to a time constant of approximately 0.032s; the upper cutoff frequency is set to 18kHz to provide sufficient attenuation margin for the 40kHz PWM carrier. The filter ultimately outputs a clean dynamic AC ripple signal. For attitude sway signals, an SPI interface is used to communicate with the BMI088 at a communication rate of 10MHz. The system abandons the traditional Euler angle or Kalman filter full solution scheme and directly reads the raw sensor data: the three-axis angular velocity data is subjected to modulus calculation, and the result is used to characterize the instantaneous intensity of the body's rotation; the three-axis acceleration data is first subjected to a 1Hz high-pass filter to filter out gravitational acceleration and slow tilt angle changes, and then the filtered data is subjected to modulus calculation, and the result only retains the transient translational component generated by the water flow impact.

[0034] In the data processing and disturbance determination stage, the main control chip performs feature extraction and fusion on the two acquired signals. The AC current component is input to the AD637 chip for hardware RMS-DC conversion. A 50ms time window is set, and the output DC voltage with an amplitude proportional to the load fluctuation intensity is defined as the current fluctuation intensity. Regarding the attitude signal, the high-pass filtered acceleration magnitude and angular velocity magnitude are complementaryly filtered and fused, with a fixed fusion coefficient a=0.8. The signal is updated in a 50ms sliding window, and the output is a scalar representing the total sway energy of the aircraft, defined as the attitude sway intensity. The system dynamically allocates fusion weights based on the real-time characteristics of the two types of signals:

[0035] That is, when detected High amplitude and When the amplitude is low, it is determined to be a motor acceleration / deceleration condition, and a weighting coefficient is set accordingly. When detected sudden increase When the flow remains stable, it is determined to be a lateral flow impact condition, and a weighting coefficient is set accordingly. Simultaneously, the system monitors the status register of the BMI088 in real time and performs real-time spectrum analysis to calculate the confidence levels of the two signals. When the IMU experiences range saturation or abnormal high-frequency vibration, the system automatically reduces cG to 0.4 and increases it accordingly. The weight.

[0036] Ultimately based on the formula Calculate the effective disturbance index. The system has preset thresholds with hysteresis intervals. After prototype calibration, the strong disturbance threshold is set to 2.5V, corresponding to 16-microstep mode; the weak disturbance threshold is set to 1.8V, corresponding to 32-microstep mode. The hysteresis interval width is 0.7V, which covers the peak value of 0.5V during normal acceleration and deceleration of the motor to prevent critical oscillation. The generation of microstep switching commands must also meet the condition: effective disturbance index. It must completely traverse the hysteresis interval and remain stable for 10ms within the target interval.

[0037] In the microstepping switching execution phase, the system constructs a pure hardware synchronization engine. Current zero-crossing detection is implemented using an external TLV3501 high-speed comparator connected to the ISEN pin of the DRV8825. This comparator has a propagation delay of only 4.5ns, and its output zero-crossing pulse serves as the main trigger source for DMA transfer. The system pre-stores two sets of GPIO control words in memory: one corresponding to 16 microstepping modes (MO=0, M1=0, M2=1), and the other corresponding to 32 microstepping modes (MO=1, M1=0, M2=1). When the fusion algorithm determines that a microstepping mode switch is needed, the system does not directly rewrite the GPIO port. Instead, it waits for a current zero-crossing interrupt to trigger the DMA controller, instantly transferring the GPIO control word corresponding to the target microstepping mode to the output register. This ensures that the switching point accurately falls on the current zeroing and torque zeroing point, achieving zero-impact switching. Furthermore, the update event of the master timer is configured as a backup DMA trigger source, automatically taking over the synchronization task during system startup or when the current zero-crossing signal is abnormal, ensuring the reliability of phase alignment. In response to sudden, severe impacts, the system activates a hardware emergency switching mechanism: when the angular velocity modulus detected by the BMI088 exceeds 200° / s, its internal hardware comparator directly generates a highest priority (level 0) interrupt. This interrupt does not require waiting for software filtering and fusion calculations; it directly forces a DMA operation, forcibly switching the subdivision mode to 16 subdivisions. Actual test data shows that the average time from interrupt triggering to GPIO level update completion is only 2.3μs (standard deviation 0.4μs), approximately 35 times faster than the traditional software polling scheme's average response time of 82μs, sufficient to complete the switching action within a single 50μs microstep cycle.

[0038] Based on the above specific implementation, under the test environment of 24V working voltage and 0.5N·m load, this solution shows significant advantages over the traditional solution: under the standard working condition of flow velocity 1.0m / s and turbulence intensity 20%, the lateral leakage detection rate is reduced from 47% of the single current solution to 3%, and the self-motion false detection rate is reduced from 38% of the single IMU solution to 2%; under the condition of 0.2N·m step load change, the peak torque fluctuation is reduced from 0.28N·m of the traditional software switching to 0.03N·m, a reduction of 89.3%; under the condition of sudden angular velocity step impact, the response time is shortened from 82μs of the traditional solution to 2.3μs, and the hard real-time response bandwidth is increased to more than 1kHz.

[0039] The specific embodiments of the present invention disclosed above are merely illustrative of the invention. These embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention.

Claims

1. A control method for a stepper motor of an underwater thruster, characterized in that, The method includes: Synchronously acquire the dynamic ripple signal of the motor bus current and the angular velocity and acceleration signals of the inertial measurement unit of the machine body; The effective value of the bus current dynamic ripple signal is converted to obtain the current fluctuation intensity parameter. The rotational severity parameter is obtained by taking the modulus of the angular velocity signal, and the transient translational parameter is obtained by taking the modulus of the acceleration signal after high-pass filtering. The rotational severity parameter and the transient translational parameter are then fused to obtain the attitude sway intensity parameter. Based on the real-time ratio between the current fluctuation intensity parameter and the attitude sway intensity parameter, the fusion weights of the two are dynamically allocated, and an effective disturbance index is calculated and generated. The effective disturbance index is compared with a preset threshold with a hysteresis interval to generate a detailed switching instruction; In response to the microstepping switching command, the microstepping control pin level of the driver chip is updated through direct memory access operation, using the zero-crossing point of the motor phase current as the trigger source, to complete the microstepping mode switching.

2. The control method for a stepper motor of an underwater thruster according to claim 1, characterized in that, In the step of synchronously acquiring the dynamic ripple signal of the motor bus current, a sampling resistor is connected in series in the bus circuit to acquire the full current. After noise is suppressed by a common-mode choke, the signal is amplified by a fixed-gain differential amplifier and then the dynamic ripple signal is extracted by a second-order Butterworth bandpass filter with a lower cutoff frequency of 5Hz and an upper cutoff frequency of 18kHz.

3. The control method for a stepper motor of an underwater thruster according to claim 1, characterized in that, In the step of calculating and generating the effective disturbance index, confidence coefficients corresponding to the current signal and the attitude signal are introduced respectively. When the inertial measurement unit is detected to have range saturation or high-frequency abnormal vibration, the confidence coefficient of the attitude signal is reduced and the confidence coefficient of the current signal is increased accordingly. The effective disturbance index is generated through normalization processing.

4. The control method for a stepper motor of an underwater thruster according to claim 1, characterized in that, The preset threshold with hysteresis interval includes a strong disturbance threshold and a weak disturbance threshold. The strong disturbance threshold corresponds to a 16-microstep mode, and the weak disturbance threshold corresponds to a 32-microstep mode. The strong disturbance threshold is higher than the weak disturbance threshold, and the difference between the two is greater than the peak value of the fluctuation caused by the normal acceleration and deceleration of the motor. The generation of the microstep switching command also needs to satisfy that the effective disturbance index is stably maintained outside the threshold for a preset duration.

5. The control method for a stepper motor of an underwater thruster according to claim 1, characterized in that, In the step of using the zero-crossing point of the motor phase current as the trigger source, a high-speed comparator is connected to the current detection pin of the driver chip to monitor the zero-crossing moment of the bus current in real time, and the zero-crossing pulse signal is used as the hardware trigger source for direct memory access transmission.

6. The control method for a stepper motor of an underwater thruster according to claim 1, characterized in that, The method also includes an emergency switching step: when the angular velocity of the body exceeds the preset impact threshold, a hardware interrupt with the highest priority is generated, which directly triggers a direct memory access operation to force a switch to the 16-subdivision mode. The emergency switching step skips the calculation and filtering waiting process of the effective disturbance index.

7. The control method for a stepper motor of an underwater thruster according to claim 1, characterized in that, When updating the microstepping control pin level of the driver chip via direct memory access, GPIO control words corresponding to 16-microstepping mode and 32-microstepping mode are pre-stored in memory. The trigger source directly initiates DMA transfer to write the corresponding control word into the GPIO output register, thereby achieving microsecond-level synchronous toggling of the microstepping control pin level.

8. The control method for a stepper motor of an underwater thruster according to claim 1, characterized in that, The specific steps of dynamically allocating the fusion weights of the two include: when the current fluctuation intensity parameter is high and the attitude sway intensity parameter is low, it is determined to be a motor acceleration / deceleration condition, and the weight of the current signal is allocated lower than the weight of the attitude signal; when the attitude sway intensity parameter suddenly increases and the current fluctuation intensity parameter is stable, it is determined to be a lateral flow impact condition, and the weight of the current signal is allocated lower than the weight of the attitude signal.

9. An underwater thruster control system, characterized in that, The system includes: The sampling circuit, connected in series in the motor bus, is used to collect the dynamic ripple signal of the current. Inertial measurement unit, used to collect angular velocity and acceleration signals of the machine body; The main control chip has a built-in analog-to-digital converter and a direct memory access controller, and is used to execute the method as described in any one of claims 1 to 8, and pre-store the GPIO control words corresponding to the 16-microstep mode and the 32-microstep mode; The driver chip receives the stepping pulses and microstepping control levels sent by the main control chip and drives the stepper motor. The high-speed comparator connects the input terminal to the sampling circuit and the current detection pin of the driver chip, and the output terminal connects to the external interrupt interface of the main control chip and the trigger interface of the direct memory access controller to generate a current zero-crossing pulse signal.

10. An underwater thruster control system according to claim 9, characterized in that, The main control chip is also configured with a timer update event as a backup trigger source. When the startup phase or the current zero-crossing signal is abnormal, it automatically switches to the timer update event to trigger direct memory access operation to calibrate the phase alignment of the subdivision switching.