Dredging system control method and system based on STM32

By acquiring multi-source data using an STM32 microcontroller and combining it with first-order time derivatives and fuzzy control, the problems of cutter entanglement and suspension of the dredging robot in complex waters were solved, realizing autonomous collaborative control and efficient operation of the dredging system.

CN123043997APending Publication Date: 2026-11-06XIAN HUAPU WATER TREATMENT EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611253883.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

The existing dredging robot control system lacks multi-source data fusion analysis, which makes it unable to adapt to changes in bottom sediment density, easily leading to water intake, energy waste, and cutter entanglement or suspension, affecting operational efficiency and safety.

Method used

An STM32 microcontroller is used to collect data on the cutter motor torque, track thrust, mud concentration, and attitude sensor data. Abnormal working conditions are identified by the first-order time derivative. Combined with a fuzzy proportional-integral-derivative controller, the cutter speed and track speed are dynamically adjusted. Attitude feedforward compensation is introduced to achieve multi-source collaborative closed-loop control.

Benefits of technology

It improves the autonomous operation capability and equipment safety of the dredging system, avoids motor overload, ensures stable mud concentration, achieves constant bottom-following operation, and improves dredging efficiency and continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123043997A_ABST
    Figure CN123043997A_ABST
Patent Text Reader

Abstract

This invention discloses a control method and system for a dredging system based on STM32, belonging to the field of automation control technology. It synchronously acquires cutter torque, track thrust, mud concentration, and vehicle pitch angle using STM32; calculates the first-order time derivative of torque to obtain the torque gradient; when an entanglement / jamming anomaly is detected, it controls the cutter motor to execute a dynamic escape sequence of full-power reverse and asymmetric jitter; under normal operating conditions, the concentration deviation is input into a fuzzy PID controller, which, combined with thrust threshold attenuation and torque margin allocation, dynamically and collaboratively outputs the adjustment amounts of cutter speed and track propulsion speed; simultaneously, the pitch angle deviation is input into a feedforward compensation algorithm to calculate the hydraulic push rod stroke and output PWM control proportional valve to adjust the boom height. This invention achieves lightweight edge-end computing, possesses the capabilities of autonomous escape from anomalies, adaptive concentration optimization, and terrain-following compensation, significantly improving the operational efficiency and equipment safety of the dredging system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automation control technology, and specifically relates to a control method and system for a dredging system based on STM32. Background Technology

[0002] With the continuous advancement of inland waterway management, urban lake ecological restoration, and reservoir reinforcement projects, the importance of underwater dredging operations is becoming increasingly prominent. Considering that large dredgers cannot enter complex waterways, small tracked dredging robots, with their advantages of small size and high mobility, have become the main equipment for dredging in shallow and restricted water areas. Dredging robots are typically equipped with a auger cutter to cut the bottom sediment and use a mud pump to pump the solid-liquid mixture to the shore.

[0003] Most existing dredging robot control systems rely on manual remote control or simple, fixed-parameter automated control. In actual operation, operators typically pre-set fixed track travel speeds and cutter head rotation speeds. While some devices are equipped with current sensors to monitor motor status, these are limited to providing power-off protection when the absolute threshold is exceeded. The systems lack in-depth fusion analysis of multi-source data such as mud pump outlet concentration, cutter head cutting resistance, and vehicle posture, and the control loops are independent of each other, failing to form a coordinated, closed-loop control mechanism.

[0004] This reveals the following problems with existing technologies: 1. Fixed-parameter operation cannot adapt to non-linear changes in bottom sediment density. When the bottom sediment is sparse, it is easy to draw in a large amount of clean water, resulting in low sludge concentration and wasted energy. 2. When the cutter encounters an extremely hard obstacle or is instantly entangled in a discarded fishing net, the simple overcurrent protection often has a delayed response, leading to motor burnout or requiring manual underwater salvage. 3. In uneven underwater terrain, the lack of an attitude compensation mechanism can cause the cutter to frequently suspend in the air or become excessively stuck in the mud, seriously affecting dredging efficiency and operational continuity. Summary of the Invention

[0005] (a) Technical problems to be solved In view of the problems in the related technologies, the present invention provides a control method and system for a dredging system based on STM32, so as to overcome the above-mentioned technical problems existing in the existing related technologies.

[0006] (II) Technical Solution To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution: On the one hand, the present invention provides a control method for a dredging system based on STM32, comprising the following steps: S1. The real-time torque feedback value of the cutter motor, the real-time thrust feedback value of the track motor, the real-time mud concentration value at the mud pump outlet, and the real-time pitch angle of the six-axis attitude sensor are collected by the STM32 microcontroller. S2. Calculate the first time derivative of the real-time torque feedback value to obtain the real-time torque gradient; Determine whether the real-time torque feedback value is greater than the rated torque threshold and whether the real-time torque gradient is greater than the sudden change gradient threshold. If so, control the cutter motor to execute a dynamic escape sequence until the real-time torque feedback value drops below the safe torque threshold; otherwise, execute step S3. S3. Based on the concentration deviation between the real-time mud concentration value and the target mud concentration, calculate the adjustment amount of the basic cutter head speed and the adjustment amount of the basic track propulsion speed. Determine whether the real-time thrust feedback value is greater than the safe thrust threshold; if so, multiply the basic track propulsion speed adjustment by the thrust attenuation coefficient to obtain the actual track propulsion speed adjustment; otherwise, use the basic track propulsion speed adjustment as the actual track propulsion speed adjustment. Based on the rated torque threshold, real-time torque feedback value, and basic cutter speed adjustment, the actual cutter speed adjustment is calculated; the actual cutter speed adjustment is then sent to the cutter motor, and the actual track propulsion speed adjustment is sent to the track motor. S4. Input the attitude deviation between the real-time pitch angle and the horizontal reference angle into the feedforward compensation algorithm to obtain the hydraulic push rod compensation stroke; use the STM32 microcontroller to control the hydraulic proportional valve to execute the hydraulic push rod compensation stroke and adjust the lifting height of the cutter arm. This invention synchronously acquires multimodal physical quantities during the dredging process using an STM32 microcontroller. It utilizes the first-order time derivative of torque to identify sudden entanglement conditions and execute a dynamic escape sequence, effectively preventing motor overload and burnout. Under normal operating conditions, a fuzzy proportional-integral-derivative controller is introduced to calculate mud concentration deviation. Combined with thrust feedback and torque margin, the control quantity is dynamically allocated to the cutter head and tracks, achieving closed-loop stability and anti-slip control of dredging concentration. The pitch angle obtained from the attitude sensor is input into a feedforward compensation algorithm to adjust the cutter head boom height in real time. Under resource constraints, a lightweight collaborative closed-loop system integrating multi-source perception, abnormal escape, efficiency optimization, and terrain adaptation is achieved, enhancing the autonomous operation capability and equipment safety of the dredging system.

[0007] Preferably, step S1 includes the following steps: S11. Receive the cutter current feedback message sent by the cutter motor driver and the track current feedback message sent by the track motor driver using the controller local area network bus interface of the STM32 microcontroller. S12. Extract the real-time current value of the cutter from the cutter current feedback message, multiply the real-time current value of the cutter by the torque constant of the cutter motor, and obtain the real-time torque feedback value. Extract the real-time track current value from the track current feedback message, multiply the real-time track current value by the track motor thrust constant to obtain the real-time thrust feedback value; S13. Using the STM32 microcontroller's direct memory access controller in conjunction with the analog-to-digital converter interface, continuously read the analog voltage signal from the mud concentration sensor; use a linear mapping function to convert the analog voltage signal into a real-time mud concentration value; S14. Use the internal integrated circuit bus interface of the STM32 microcontroller to read the quaternion data in the internal register of the six-axis attitude sensor, and use the Euler angle conversion formula to convert the quaternion data into real-time pitch angle. Store the real-time torque feedback value, real-time thrust feedback value, real-time mud concentration value, and real-time pitch angle into a sliding window buffer array; This invention utilizes the STM32 microcontroller's Controller Area Network (CLAN) bus, Direct Memory Access Controller (DMI), analog-to-digital converter (ADC) interface, and internal integrated circuit bus to acquire current, voltage, and quaternion data in parallel, and eliminates high-frequency noise through sliding window filtering. Without additional CPU computing power, it constructs a time-synchronized, multi-dimensional underlying data buffer matrix, providing a reliable data foundation for subsequent high-precision closed-loop control.

[0008] Preferably, the specific steps for calculating the real-time torque gradient in step S2 include: S211. Set the discrete time step; extract the real-time torque feedback value of the current time step and the real-time torque feedback value of the previous time step from the sliding window buffer array; S212. Subtract the real-time torque feedback value of the previous time step from the real-time torque feedback value of the current time step to obtain the torque change. S213. Divide the torque change by the discrete time step to obtain the real-time torque gradient; This invention extracts the torque change within a discrete time step and divides it by the time step, transforming the static torque value into a dynamic torque change rate. It can accurately capture the sudden change in mechanical resistance when the auger contacts a hard object or is momentarily entangled in a fishing net, effectively filtering out steady-state torque fluctuations in conventional cutting processes and improving the accuracy of abnormal working condition identification.

[0009] Preferably, the specific steps in S2 for controlling the cutter motor to execute the dynamic escape sequence include: S221, Send a stop command with zero speed to the track motor, and send a set low-frequency protection frequency command to the mud pump; S222. Generate a reverse pulse width modulation signal with a duty cycle of 100% to control the cutter motor to reverse the set first duration with maximum reverse torque. S223. After the first duration ends, an asymmetric forward and reverse jitter command is generated; the asymmetric forward and reverse jitter command includes a second duration set for forward rotation and a third duration set for reverse rotation, and the third duration is greater than the second duration; S224. Control the cutter motor to alternate between forward and reverse rotation, and continuously monitor the real-time torque feedback value during each alternation. S225. Determine whether the real-time torque feedback value has dropped below the safe torque threshold. If so, the escape is deemed successful, and step S3 is resumed. Otherwise, determine whether the number of alternating executions has reached the maximum jitter threshold; if so, trigger an audible and visual alarm and send a shutdown distress signal to the shore-based host computer; otherwise, return to step S224. When the invention detects entanglement and jamming, it first cuts off the track propulsion power to prevent the entanglement from worsening. Then, it uses a reverse pulse width modulation signal with a 100% duty cycle to release the instantaneous maximum reverse torque to tear the entangled object. If the entanglement fails to be resolved, a third asymmetric forward and reverse jitter command with a duration greater than the second duration is introduced. The asymmetric mechanical inertia is used to gradually spin and peel the entangled object off the cutter shaft. The above-mentioned multi-stage dynamic escape sequence requires no manual intervention. While protecting the motor and drive circuit from continuous high current impact, it maximizes the success rate of underwater autonomous escape.

[0010] Preferably, the specific steps for calculating the concentration deviation in S3 include: S311. Retrieve the optimal pumping efficiency curve of the mud pump and extract the concentration value corresponding to the extreme point of the optimal pumping efficiency curve as the preset target mud concentration. S312. Subtract the preset target mud concentration from the real-time mud concentration value at the current time step to obtain the concentration deviation at the current time step. S313. Subtract the concentration deviation of the previous time step from the concentration deviation of the current time step to obtain the concentration deviation change rate. This invention uses the extreme point of the optimal pumping efficiency curve of the mud pump as the preset target mud concentration. By calculating the concentration deviation and the rate of change of the concentration deviation at the current time step, the abstract dredging efficiency is concretized into a quantifiable control input error. The benchmark target point for system optimization is established to ensure that the mud pump always operates within a high-efficiency, anti-clogging fluid dynamic range.

[0011] Preferably, the specific steps in S3 for calculating the adjustment amount of the basic cutterhead rotation speed and the adjustment amount of the basic track propulsion speed include: S321. Input the concentration deviation and the rate of change of concentration deviation at the current time step into the fuzzy proportional-integral-derivative controller; S322. The fuzzy proportional-integral-derivative controller uses a preset fuzzy rule matrix to perform fuzzy inference on the concentration deviation and the rate of change of concentration deviation at the current time step, and outputs the increment of the proportional coefficient, the increment of the integral coefficient and the increment of the derivative coefficient. S323. Add the basic proportional coefficient to the proportional coefficient increment to obtain the current proportional coefficient; add the basic integral coefficient to the integral coefficient increment to obtain the current integral coefficient; add the basic differential coefficient to the differential coefficient increment to obtain the current differential coefficient. S324. Using the current proportional coefficient, current integral coefficient, and current derivative coefficient, combined with the concentration deviation of the current time step, the concentration deviation of the previous time step, and the concentration deviation of the two previous time steps, the total control increment is calculated using the incremental proportional-integral-derivative formula. S325. Multiply the total control increment by the first allocation weight to obtain the basic cutter speed adjustment amount, and multiply the total control increment by the second allocation weight to obtain the basic track propulsion speed adjustment amount. This invention inputs the concentration deviation and rate of change into a fuzzy proportional-integral-derivative (PID) controller, dynamically corrects the proportional, integral, and derivative coefficients online using a fuzzy inference matrix, and then calculates the total control increment using an incremental formula, distributing it to the cutter head and track according to weights. This overcomes the shortcomings of traditional fixed-parameter control in responding to sudden changes in bottom mud density, such as slow response or overshoot oscillation, and achieves adaptive dynamic matching of cutter head cutting amount and track feed amount, ensuring rapid convergence and stability of mud concentration.

[0012] Preferably, the setting rule for the preset fuzzy rule matrix in S322 is as follows: When the concentration deviation is negative and the rate of change of the concentration deviation is negative, the output is a positive proportional coefficient increment and a zero integral coefficient increment. When the concentration deviation is large and the rate of change of the concentration deviation is large, the output is a large negative proportional coefficient increment and a large negative integral coefficient increment. The fuzzy rule of this invention outputs a large positive increment and disables integral action when the concentration is severely low and continues to deteriorate; conversely, it weakens the control input when the concentration is severely high. This nonlinear mapping rule effectively suppresses integral saturation and improves the dynamic response speed and robustness of the system under extreme sediment density distributions.

[0013] Preferably, the specific steps for calculating the hydraulic push rod compensation stroke in S4 include: S411. Obtain the preset horizontal reference angle, and subtract the horizontal reference angle from the real-time pitch angle to obtain the attitude deviation; S412. Extract the physical length parameters of the cutter arm; S413. Convert the attitude deviation to radians and calculate the sine value of the attitude deviation; multiply the sine value of the attitude deviation by the physical length parameter to obtain the vertical height displacement of the end of the cutter arm. S414. Multiply the vertical height displacement by the hydraulic cylinder transmission ratio coefficient to calculate the hydraulic push rod compensation stroke. This invention converts the difference between the real-time pitch angle and the horizontal reference angle into radians, calculates the vertical displacement by combining it with the physical length parameters of the cutter arm, and multiplies it by the hydraulic cylinder transmission ratio coefficient to obtain the compensation stroke; it accurately quantifies the error of the end of the boom being suspended or stuck in mud caused by the vehicle body pitch, and provides a precise physical displacement control target for the subsequent hydraulic actuator.

[0014] Preferably, the specific steps for adjusting the lifting height of the cutter arm in step S4 include: S421. Extract the control gain parameter of the hydraulic proportional valve, divide the hydraulic push rod compensation stroke by the control gain parameter, and calculate the target pulse width. S422: Use the advanced timer of the STM32 microcontroller to generate a pulse width modulation signal based on the target pulse width; S423. Output the pulse width modulation signal to the control terminal of the hydraulic proportional valve to drive the hydraulic push rod to perform the hydraulic push rod compensation stroke. This invention converts the hydraulic push rod compensation stroke by the control gain parameter into a target pulse width, and uses an advanced timer to generate a pulse width modulation signal to drive the hydraulic proportional valve; based on the hardware drive method of feedforward compensation, the interference of terrain undulations on dredging depth is eliminated, and the constant bottom-following contour operation of the underwater cutter is realized.

[0015] On the other hand, the present invention also provides an STM32-based dredging control system for implementing the STM32-based dredging system control method, the system comprising: The multi-source data acquisition module is used to synchronously acquire multi-source operation data through the peripheral interface on the STM32 microcontroller. The abnormal working condition escape module is used to calculate the real-time torque gradient and control the auger motor to execute a dynamic escape sequence when it is determined that the abnormal working condition of entanglement and jamming has been entered. The adaptive cooperative control module is used to calculate the basic adjustment amount using a fuzzy proportional-integral-derivative controller under normal dredging conditions, and to allocate instructions by combining real-time thrust feedback value and real-time torque feedback value. The bottom-fitting compensation control module is used to calculate the hydraulic push rod compensation stroke and output a pulse width modulation signal to adjust the lifting height of the cutter arm.

[0016] (III) Beneficial Effects The present invention has the following beneficial effects: This invention synchronously acquires multimodal physical quantities using an STM32 microcontroller and introduces the calculation of the first-order time derivative of torque. It transforms the static current amplitude into a dynamic mechanical resistance gradient, enabling the identification of abnormal working conditions such as the auger instantly cutting into hard objects or becoming entangled in fishing nets. Combined with the system's automatically generated full-power reverse and asymmetric forward and reverse jitter escape sequences, this invention protects the motor from continuous stall current impacts while using mechanical inertia to tear and untangle entangled objects, solving the industry pain points of traditional dredging equipment such as difficulty in escaping danger and easy motor burnout.

[0017] Under normal dredging conditions, this invention targets the concentration extreme point corresponding to the optimal pumping efficiency of the mud pump and introduces a fuzzy proportional-integral-derivative controller. The system dynamically corrects the control coefficients based on the concentration deviation and rate of change, and scientifically distributes the calculated total control increment to the cutter head and tracks according to the physical power weight. Combining the safety thrust attenuation based on the ultimate adhesion force and the torque margin constraint based on the thermal limit, this invention achieves adaptive dynamic matching of cutting amount and feed amount, effectively suppressing track slippage and motor overload, and ensuring that the mud concentration is always stable in the most efficient hydrodynamic range.

[0018] This invention addresses complex underwater terrain by constructing an attitude feedforward compensation mechanism independent of concentration control. It acquires real-time pitch angles using a six-axis sensor, combines this with the boom lever's geometric transmission ratio, and precisely calculates the linear compensation stroke of the hydraulic push rod using trigonometric functions. A microcontroller timer then directly drives the hydraulic proportional valve. This eliminates the physical interference of terrain undulations on dredging depth, enabling constant bottom-following operation of the cutter head, significantly reducing suspended water intake, and ensuring the efficiency and continuity of dredging operations.

[0019] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the invention. For those skilled in the art, the drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating the control method of the dredging system based on STM32 according to the present invention. Figure 2 This is a schematic diagram of the torque change curve during the dynamic escape process of the auger getting stuck in the entanglement in this invention; Figure 3 This is a schematic diagram of the response comparison curves for mud concentration control in this invention. Detailed Implementation

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

[0023] This embodiment describes in detail a small tracked dredging robot used in shallow urban rivers and lakes. The dredging robot weighs approximately 1.5 tons, with a auger arm at the front, rubber tracks at the bottom, and a mud pump and discharge pipe connected to the rear. The bottom environment of the working water area is complex, with uneven distribution of bottom mud density, often accompanied by aquatic plants, discarded fishing nets, and domestic waste. Under the traditional fixed parameter control mode, the dredging robot is prone to accidents where the auger gets entangled in foreign objects, causing the motor to burn out. Furthermore, when the bottom mud is thin, a fixed auger speed will cause a large amount of clean water to be sucked in, resulting in low mud concentration and serious energy waste. Due to the small space and poor heat dissipation conditions of the internal pressure chamber of the dredging robot, it is not possible to install a high-power, large-volume high-computing-power industrial control computer. This embodiment selects a low-power STM32F407 microcontroller with a floating-point unit (FPU) as the core control unit to achieve lightweight intelligent closed-loop control at the edge.

[0024] To resolve the above issues, please refer to [link / reference]. Figure 1 This invention discloses a control method for a dredging system based on STM32, comprising the following steps: S1. Multi-source operation data of the dredging system are synchronously collected through the peripheral interface on the STM32 microcontroller. The multi-source operation data includes the real-time torque feedback value of the cutter motor, the real-time thrust feedback value of the track motor, the real-time mud concentration value at the mud pump outlet, and the real-time pitch angle of the six-axis attitude sensor. S1 includes the following steps: S11. Receive the cutter current feedback message sent by the cutter motor driver and the track current feedback message sent by the track motor driver using the controller local area network bus interface of the STM32 microcontroller. Specifically, in embodiment S11, the STM32 microcontroller initializes the internal CAN1 and CAN2 peripheral hardware, and configures the baud rate to 500Kbps; the cutter motor driver and the track motor driver send data frames containing real-time stator current information to the CAN bus with a communication cycle of 20 milliseconds. Configure the STM32 microcontroller to receive the mailbox interrupt, parse the data frame in the interrupt service function, and extract the real-time current value of the cutter head. I cutter For example, 15.5 amperes, extract the real-time track current value. Icrawler For example, 12.0 amperes; S12. Extract the real-time current value of the cutter from the cutter current feedback message, multiply the real-time current value of the cutter by the torque constant of the cutter motor to obtain the real-time torque feedback value; extract the real-time current value of the track from the track current feedback message, multiply the real-time current value of the track by the thrust constant of the track motor to obtain the real-time thrust feedback value. Specifically, in embodiment S12, the formula for calculating the real-time torque feedback value is as follows: ;in, τ real This represents the real-time torque feedback value, in Newton-meters (N·m). I cutter This indicates the real-time current value of the auger, in amperes (A). K τ This represents the torque constant of the auger motor; The torque constant of the auger motor is calculated based on the auger motor's factory rated power, rated speed, and rated current using motor engineering formulas; the calculation formula is as follows: Where P represents rated power; 9.55 is a fixed physical constant for power-torque-speed conversion in electrical engineering. n Indicates the rated speed; I The rated current is indicated by the value of 'A'. In this embodiment, the rated power of the auger motor is 3000 watts, the rated speed is 1500 rpm, and the rated current is 15.9 amperes. Substituting these values ​​into the formula, the torque constant of the auger motor is calculated to be 1.2 N·m / A. Substituting the value of 15.5 amperes from Example S11, the real-time torque feedback value is calculated as 18.6 N·m using the formula for calculating the real-time torque feedback value. The formula for calculating the real-time thrust feedback value is as follows: ;in, F real This represents the real-time thrust feedback value, in Newtons (N). I crawler This indicates the real-time track current value, in amperes (A). K F This represents the thrust constant of the track motor; The track motor thrust constant is calculated based on the track drive wheel radius, the reducer reduction ratio, and the track motor torque constant; the calculation formula is as follows: ;in, K motor This represents the torque constant of the track motor; i Indicates the reduction ratio; r The radius of the drive wheel is indicated; in this embodiment, the torque constant of the track motor is 1.0 N·m / A, the reduction ratio of the reducer is 10, and the radius of the drive wheel is 0.2 meters. Substituting these values ​​into the formula, the thrust constant of the track motor is calculated to be 50 N / A. Substituting the value of 12.0 amperes as in Example S11, the real-time thrust feedback value of 600 Newtons is calculated using the formula for calculating the real-time thrust feedback value. S13. Using the STM32 microcontroller's direct memory access controller in conjunction with the analog-to-digital converter interface, continuously read the analog voltage signal from the mud concentration sensor; use a linear mapping function to convert the analog voltage signal into a real-time mud concentration value; Specifically, in embodiment S13, the ultrasonic mud concentration sensor installed at the mud pump outlet outputs an industrial standard current signal of 4-20 mA, which is converted into an analog voltage signal of 0.8-3.3 volts by a hardware sampling circuit. To avoid consuming CPU resources, the STM32 microcontroller is configured with an ADC1 peripheral and a DMA direct memory access controller to perform continuous cyclic sampling; the read analog voltage signal... V adc For example, 2.05 volts; The formula for calculating the linear mapping of real-time mud concentration is as follows: ;in, C real This indicates the real-time mud concentration value, expressed as a percentage. V adc This indicates the analog voltage signal being read, measured in volts (V). V min This indicates the lower limit voltage of the sensor output, such as 0.8 volts; V max This indicates the upper limit of the sensor output voltage, such as 3.3 volts; substituting the value from the example above, the calculated real-time mud concentration is 50%. S14. Use the internal integrated circuit bus interface of the STM32 microcontroller to read the quaternion data in the internal register of the six-axis attitude sensor, and use the Euler angle conversion formula to convert the quaternion data into the real-time pitch angle; store the real-time torque feedback value, real-time thrust feedback value, real-time mud concentration value and real-time pitch angle into the sliding window buffer array; Specifically, in embodiment S14, the STM32 microcontroller reads the quaternion data calculated by the digital motion processor (DMP) inside the MPU6050 six-axis attitude sensor at a rate of 400 kHz via the I2C interface; and calculates the real-time pitch angle, such as 5.2 degrees, using the quaternion-to-Euler angle formula. The STM32 microcontroller takes the calculated 18.6 Nm, 600 Nm, 50%, and 5.2 degrees as a complete time step data frame, stores it in a sliding window buffer array of length 10, and uses a median average filtering algorithm to remove pulse interference caused by underwater eddies. The above embodiment, by configuring the hardware interrupt and direct memory access controller of the STM32 microcontroller, completes the non-blocking reading of LAN bus messages, analog voltage signals and integrated circuit bus data in parallel, and constructs a multi-dimensional state matrix through linear mapping and Euler angle transformation. Compared with the traditional single-threaded polling acquisition technology, this embodiment reduces the synchronization time delay of multi-source operation data, ensures the alignment of the underlying physical data on the time axis, and eliminates time phase difference interference for subsequent high-frequency closed-loop control. S2. Calculate the first time derivative of the real-time torque feedback value to obtain the real-time torque gradient; determine whether the real-time torque feedback value is greater than the rated torque threshold and whether the real-time torque gradient is greater than the sudden change gradient threshold. If so, the dredging system is determined to be in an abnormal entanglement and jamming condition. The cutter motor is controlled to execute a dynamic escape sequence including reverse full-power pulses and asymmetric forward and reverse shaking until the real-time torque feedback value drops below the safe torque threshold. Otherwise, the dredging system is determined to be in a normal dredging condition, and step S3 is executed. The specific steps for calculating the real-time torque gradient in S2 include: S211. Set the discrete time step; extract the real-time torque feedback value of the current time step from the sliding window buffer array. τ k Real-time torque feedback value compared to the previous time step τ k-1 ; Specifically, in embodiment S21, the discrete time step set by the system is, for example, 0.05 seconds; the STM32 microcontroller extracts the real-time torque feedback value of the current time step, for example, 45.0 Nm, and the real-time torque feedback value of the previous time step, for example, 20.0 Nm. S212. Subtract the real-time torque feedback value of the previous time step from the real-time torque feedback value of the current time step to obtain the torque change. S213. Divide the torque change by the discrete time step to obtain the real-time torque gradient. ; Specifically, in embodiments S22-S23, the real-time torque gradient The calculation formula is The unit of real-time torque gradient is N·m / s; T s This represents the discrete time step, such as 0.05 seconds; when substituted into numerical calculations, the real-time torque gradient is obtained, such as 500 Nm / s; the real-time torque gradient objectively reflects the degree of increase in the mechanical resistance of the cutter in a very short time. The above embodiment extracts the torque change within the time step and performs discrete difference calculation to convert the torque feedback value into a first-order time derivative. This method of converting static amplitude into dynamic gradient can quantify the abrupt change rate of the auger cutting resistance with millisecond-level precision. Compared with the method that relies solely on the absolute current threshold for judgment, this embodiment shortens the identification response time of abnormal jamming conditions and effectively avoids heat accumulation in the early stage of stall. Further, please refer to Figure 2 The specific steps in S2 for controlling the cutter motor to execute the dynamic escape sequence include: S221, Send a stop command with zero speed to the track motor, and send a set low-frequency protection frequency command to the mud pump; Specifically, in embodiment S221, the rated torque threshold is calculated based on the limiting thermodynamic tolerance parameter of the stator coil of the auger motor; specifically, the rated torque threshold is obtained by reading the continuous operating rated torque in the motor datasheet and multiplying it by a short-time overload safety factor of 1.2. The mutation gradient threshold is calculated based on the yield strength of the cutter blade material and the shear limit of the spindle. Specifically, the maximum allowable transient torsional stress of the cutter spindle is extracted, divided by the discrete time step set by the system, and the lower bias correction is performed in combination with the variance of the conventional cutting resistance of underwater sediment. In specific implementation, the threshold is set according to the material in the specific scenario. In this embodiment, the continuous operating rated torque is 33.3 Nm, the preset rated torque threshold is 40.0 Nm, and the sudden change gradient threshold is 300 Nm / s. Since the current real-time torque feedback value of 45.0 Nm is greater than 40.0 Nm, and the real-time torque gradient of 500 Nm / s is greater than 300 Nm / s, the STM32 microcontroller determines that the cutter has cut into an extremely hard obstacle or is instantly entangled by a discarded fishing net, entering an abnormal entanglement and jamming condition. The STM32 microcontroller immediately sends a zero-speed command to the track motor to stop the track from moving forward, preventing the track from continuing to advance and causing the fishing net to become more and more entangled; at the same time, it sends a low-frequency protection command to the mud pump, such as reducing it to 20% of the rated speed, to prevent the cutter from stopping and causing the mud pump to run dry and become stuck. S222. Generate a reverse pulse width modulation signal with a duty cycle of 100% to control the cutter motor to reverse the set first duration with maximum reverse torque. Specifically, in embodiment S222, the advanced timer of the STM32 microcontroller generates an inverted pulse width modulation signal with a duty cycle of, for example, 100%, to control the cutter motor to perform reverse rotation with maximum reverse torque; the first duration is set to, for example, 0.5 seconds; this operation utilizes the huge reverse mechanical inertia released instantaneously at full power to attempt to break or tear tangled seaweed or fishing nets. S223. After the first duration ends, an asymmetric forward and reverse jitter command is generated; the asymmetric forward and reverse jitter command includes a second duration set for forward rotation and a third duration set for reverse rotation, and the third duration is greater than the second duration; Specifically, in embodiment S223, if full-power reverse rotation fails to completely free the object, the system enters an asymmetric jitter mode; the set second duration of forward rotation is 0.3 seconds, and the third duration of reverse rotation is 0.6 seconds; the physical principle of the asymmetric parameter setting is that underwater foreign object entanglement usually occurs in the forward rotation direction of the operation, and the asymmetric short forward rotation and long reverse rotation can gradually untangle the entangled object from the cutter shaft without introducing a continuous excessive current impact; S224. Control the cutter motor to alternate between forward and reverse rotation, and continuously monitor the real-time torque feedback value during each alternation. Specifically, in embodiment S224, the STM32 microcontroller utilizes the dead-time control function of the internal advanced timer TIM1 to automatically insert a dead-time of 3 microseconds during forward / reverse switching to prevent the upper and lower bridge arms of the drive circuit from being directly short-circuited; during the alternating execution, the STM32 microcontroller continuously reads the real-time torque feedback value. S225. Determine whether the real-time torque feedback value has dropped below the safe torque threshold; if so, determine that the escape was successful and resume execution of step S3; otherwise, determine whether the number of alternating executions has reached the maximum jitter number threshold; if so, trigger the audible and visual alarm and send a stop distress signal to the shore-based host computer; otherwise, return to execution of step S224. Specifically, in embodiment S225, the set safety torque threshold is 15.0 Nm and the maximum number of vibrations threshold is 10 times; if the real-time torque feedback value drops to 12.0 Nm during the 4th vibration, which is not greater than the safety torque threshold of 15.0 Nm, it is determined that the entangled object has been detached, the detachment is successful, and the system automatically switches back to normal dredging operation. If the real-time torque feedback value is still as high as 40 Nm after 10 alternating executions, it indicates that a rigid knot such as a steel wire rope that cannot be broken free on its own has been encountered. The STM32 microcontroller triggers the relay to light up the warning light and sends a stop distress signal to the shore-based host computer through the wireless transparent transmission module connected via the serial port, cutting off the main power protection equipment. Upon detecting abnormal operating conditions, the above embodiment immediately cuts off the track thrust and reduces the frequency of the mud pump. Subsequently, it precisely controls full-power reverse rotation and asymmetric forward and reverse rotation jitter through an advanced timer. Utilizing the time difference between forward and reverse rotation, combined with anti-straight-through dead zone, it achieves mechanical unwinding and peeling of entangled materials while ensuring the safety of the hardware circuitry. Compared to the traditional method of directly stopping dredging equipment in case of danger and requiring manual retrieval, the dynamic escape sequence of this embodiment improves the success rate of autonomous escape of aquatic plants and abandoned fishing nets, and significantly reduces equipment downtime maintenance time and the safety hazards of manual underwater operations. S3. Under normal dredging conditions, calculate the concentration deviation between the real-time mud concentration value and the preset target mud concentration. The concentration deviation is input into the fuzzy proportional-integral-derivative controller, which outputs the adjustment amount of the basic cutter speed and the adjustment amount of the basic track propulsion speed; it is then determined whether the real-time thrust feedback value is greater than the safe thrust threshold. If so, multiply the basic track propulsion speed adjustment by the thrust attenuation coefficient to obtain the actual track propulsion speed adjustment; otherwise, use the basic track propulsion speed adjustment as the actual track propulsion speed adjustment. Calculate the torque difference between the rated torque threshold and the real-time torque feedback value; divide the torque difference by the rated torque threshold to obtain the torque margin coefficient; multiply the basic cutter speed adjustment amount by the torque margin coefficient to obtain the actual cutter speed adjustment amount; The actual cutter speed adjustment is sent to the cutter motor, and the actual track propulsion speed adjustment is sent to the track motor; Please see Figure 3 The specific steps for calculating the concentration deviation in S3 include: S311. Retrieve the optimal pumping efficiency curve of the mud pump and extract the concentration value corresponding to the extreme point of the optimal pumping efficiency curve as the preset target mud concentration. Specifically, in embodiment S311, the system internally stores an array of efficiency curve data for the mud pump; the concentration value corresponding to the highest efficiency point is extracted, and a preset target mud concentration is set to 45%. At this concentration, a high solids content in the discharged mud can be ensured, while avoiding pipe blockage due to excessive viscosity. S312. Subtract the preset target mud concentration from the real-time mud concentration value at the current time step to obtain the concentration deviation at the current time step. S313. Subtract the concentration deviation of the previous time step from the concentration deviation of the current time step to obtain the change in concentration deviation. Specifically, in embodiments S312 and S313, if the real-time mud concentration is 30%, the concentration deviation at the current time step is calculated as 30% - 45% = -15%; if the concentration deviation at the previous time step is -10%. The concentration deviation change is calculated as -15% - (-10%) = -5%; a negative deviation and a negative change indicate that the currently extracted mud is not only too thin, but is also becoming thinner at an accelerated rate, and the system still needs to increase the amount of mud it can handle. The above embodiment extracts the extreme point of the optimal pumping efficiency curve, sets 45% as the target concentration, and calculates the concentration deviation and change rate in real time, accurately depicting the direction and speed of the current dredging state deviating from the optimal hydrodynamic range; it transforms the control objective from blindly pursuing the amount of dredging to pursuing the optimal solid-liquid two-phase flow pumping ratio, reducing the energy consumption per unit volume of sludge pump by about 30% compared to fixed parameter operation; Furthermore, the specific steps for the fuzzy proportional-integral-derivative controller to output the basic adjustment quantity include: S321. Input the concentration deviation and the rate of change of concentration deviation at the current time step into the fuzzy proportional-integral-derivative controller; S322. The fuzzy proportional-integral-derivative controller uses a preset fuzzy rule matrix to perform fuzzy inference on the concentration deviation and the rate of change of concentration deviation at the current time step, and outputs the increment of the proportional coefficient, the increment of the integral coefficient and the increment of the derivative coefficient. Specifically, in embodiment S322, the setting rule of the fuzzy rule matrix is: when the concentration deviation is negative and the rate of change of the concentration deviation is negative, the output is a positive proportional coefficient increment and a zero integral coefficient increment; the physical meaning of this rule is: when the concentration is seriously low and is still deteriorating, a very strong proportional action is needed to quickly increase the control quantity, while the integral action is turned off to prevent the system from over-responding and generating overshoot oscillation. S323. Add the basic proportional coefficient to the proportional coefficient increment to obtain the current proportional coefficient; add the basic integral coefficient to the integral coefficient increment to obtain the current integral coefficient; add the basic differential coefficient to the differential coefficient increment to obtain the current differential coefficient. Specifically, in embodiment S313, the basic proportional coefficient is obtained based on the step response test curve of the dredging system in a clean water environment, using the Ziegler-Nichols critical proportionality method and conservatively corrected by combining the large hysteresis characteristics of the dredging system; during the test, the pure proportional control gain is continuously increased until the mud concentration shows constant amplitude oscillation, and the critical proportional gain and critical oscillation period at this time are recorded, thereby calculating the basic proportional, integral, and differential coefficients; S324. Using the current proportional coefficient, current integral coefficient, and current derivative coefficient, combined with the concentration deviation of the current time step, the concentration deviation of the previous time step, and the concentration deviation of the two previous time steps, the total control increment is calculated using the incremental proportional-integral-derivative formula. Specifically, in embodiment S324, the incremental proportional-integral-differential formula is: ; where Δ U ( k This indicates the total control increment, expressed as a percentage of duty cycle. K p , K i , K d The current proportional, integral, and derivative coefficients are all dimensionless control coefficients tuned by time discretization. E ( k ), E ( k -1) E ( k-2) indicates the concentration deviation over three consecutive time steps, e.g., the total control increment is calculated to be +12%; S325. Multiply the total control increment by the first allocation weight to obtain the basic cutter speed adjustment amount, and multiply the total control increment by the second allocation weight to obtain the basic track propulsion speed adjustment amount. Specifically, in embodiment S325, the first allocation weight is calculated based on the ratio of the maximum allowable output power of the auger motor to the total walking and cutting power of the system; the total walking and cutting power of the system is the sum of the maximum power of the auger motor and the maximum power of the track motor; for example, in this embodiment, the maximum power of the auger motor is 3 kW and the maximum power of the track motor is 12 kW, and the first allocation weight is calculated as 3 / (3+12)=0.2. The second allocation weight is calculated based on the ratio of the maximum allowable output power of the track motor to the total walking and cutting power of the system. For example, the second allocation weight is 12 / (3+12)=0.8. The calculated adjustment range for the basic cutter head speed is 12% × 0.2 = 2.4%, and the adjustment range for the basic track propulsion speed is 12% × 0.8 = 9.6%. The above embodiments utilize fuzzy inference matrices to dynamically correct proportional-integral-derivative coefficients in real time based on concentration deviation and rate of change, effectively overcoming the control delay caused by nonlinear abrupt changes in underwater sediment density; by scientifically allocating the calculated total control increment to the cutter speed adjustment and track propulsion speed adjustment according to physical power weights, adaptive coordination between the cutting system and the feeding system is achieved; compared with traditional single-variable independent control, this embodiment reduces the variance of the discharge sludge concentration fluctuation by about 60%, ensuring the continuity and efficiency of dredging operations; Furthermore, step S3, which sends the actual cutter speed adjustment to the cutter motor and the actual track propulsion speed adjustment to the track motor, also includes command allocation and feedback constraint steps: The safety thrust threshold is calculated based on the ultimate adhesion between the track and the bottom silt. Specifically, it is obtained by extracting the ground contact area parameter of the track, multiplying it by the average bearing shear stress of the bottom silt, and then multiplying it by a safety factor of 0.8. In this embodiment, the track ground contact area is 0.5 square meters, the average shear stress of the silt is 2500 Pascals, and the calculated safety thrust threshold is 1000 Newtons. The thrust attenuation coefficient is calculated based on the ratio of the dynamic friction coefficient to the static friction coefficient of the track in the silt; specifically, by consulting the empirical model of underwater tracked vehicle traction force, the ratio of dynamic and static friction coefficients is extracted, and in this embodiment, the thrust attenuation coefficient is set to 0.5. Determine whether the real-time thrust feedback value obtained in S12, such as 600 Newtons, is greater than the safe thrust threshold of 1000 Newtons. Since 600 is not greater than 1000, it indicates that there is no risk of track slippage or overload. The basic track propulsion speed adjustment amount of 9.6% is directly used as the actual track propulsion speed adjustment amount. If the real-time thrust feedback value is 1100 Newtons, which is greater than 1000 Newtons, then 9.6% is multiplied by the attenuation coefficient of 0.5 to get 4.8% as the actual track propulsion speed adjustment amount to prevent the tracks from getting stuck in the mud and slipping. The torque difference between the rated torque threshold (40.0 Nm) and the real-time torque feedback value (20.0 Nm) is calculated to be 20.0 Nm; the torque margin coefficient is calculated using the following formula: ;in, K margin Indicates the torque margin coefficient; τ rated Indicates the rated torque threshold; τ real This represents the real-time torque feedback value; substituting the value, the torque margin coefficient is calculated to be 20.0 / 40.0=0.5; Multiplying the basic cutter speed adjustment of 2.4% by the torque margin coefficient of 0.5 yields the actual cutter speed adjustment of 1.2%. The actual cutter speed adjustment is then sent to the cutter motor, and the actual track propulsion speed adjustment is sent to the track motor. The robot accelerates its mud-eating process while ensuring that the motors are not overloaded, and the mud concentration rises back to the target value of 45%. Before issuing control commands, the above embodiments introduce a hard constraint judgment based on real-time thrust and torque margin; when the thrust exceeds the limit, the attenuation coefficient is forcibly executed to prevent the track from slipping in place; when the torque margin is insufficient, the cutter speed increment is automatically reduced to prevent motor overload; the above feedback constraint mechanism, while pursuing the optimal mud concentration, safeguards the physical safety boundary of the mechanical structure, and reduces the track getting stuck and slipping accident rate compared with unconstrained control. S4. Calculate the attitude deviation between the real-time pitch angle and the horizontal reference angle; input the attitude deviation into the feedforward compensation algorithm to calculate the hydraulic push rod compensation stroke; use the STM32 microcontroller to output the pulse width modulation signal to control the hydraulic proportional valve to execute the hydraulic push rod compensation stroke and adjust the lifting height of the cutter arm. The specific steps for calculating the hydraulic push rod compensation stroke in S4 include: S411. Obtain the preset horizontal reference angle, and subtract the horizontal reference angle from the real-time pitch angle to obtain the attitude deviation; Specifically, in embodiment S411, the horizontal reference angle of the robot when calibrated on flat ground is 0 degrees; when the robot climbs the underwater slope, the real-time pitch angle is read as 5.2 degrees; the calculated attitude deviation is 5.2 degrees; this deviation will cause the front cutter arm to tilt up with the vehicle body, detach from the bottom mud surface, and then suck in clean water, resulting in a sudden drop in concentration. S412. Extract the physical length parameters of the cutter arm; Specifically, in embodiment S412, the system parameters are read, and the physical length parameter of the cutter arm is 2.5 meters; S413. Convert the attitude deviation to radians and calculate the sine value of the attitude deviation; multiply the sine value of the attitude deviation by the physical length parameter to obtain the vertical height displacement of the end of the cutter arm. Specifically, in embodiment S413, the mathematical formula for calculating the vertical height displacement is as follows: ; where Δ H This indicates the vertical displacement, expressed in meters (m). L arm This indicates the physical length parameter of the cutter arm, such as 2.5 meters; θ err This represents the attitude deviation converted to radians; the calculated vertical height displacement is approximately 0.226 meters, meaning the cutter head is suspended 0.226 meters in the air. S414, the vertical height displacement Δ H Multiply by the hydraulic cylinder transmission ratio coefficient K hydraulic The hydraulic push rod compensation stroke was calculated. S comp ; Specifically, in embodiment S414, the hydraulic cylinder transmission ratio coefficient is calculated based on the lever geometry of the auger boom hinge point and the hydraulic cylinder mounting point; specifically, it is obtained by extracting the distance from the hydraulic cylinder mounting point to the boom rotation hinge center and dividing it by the distance from the auger end to the boom rotation hinge center; for example, if the hydraulic cylinder mounting point is 1.0 meter from the center and the total boom length is 2.5 meters, the hydraulic cylinder transmission ratio coefficient is calculated to be 1.0 / 2.5=0.4; the hydraulic push rod compensation stroke is calculated to be 0.226×0.4=0.0904 meters, or 90.4 millimeters. This embodiment extracts the real-time pitch angle calculated by the six-axis attitude sensor, combines the physical length of the boom with the transmission ratio coefficient of the hydraulic cylinder, and uses trigonometric functions to accurately convert the angle deviation into the linear compensation stroke of the hydraulic push rod; the above spatial geometry calculation process is based on physical structure parameters, realizes the quantification of terrain undulation error, and provides an accurate millimeter-level displacement target for subsequent rapid follow-up compensation. Furthermore, the specific steps for adjusting the lifting height of the cutter arm in S4 include: S421. Extract the control gain parameter of the hydraulic proportional valve, divide the hydraulic push rod compensation stroke by the control gain parameter, and calculate the target pulse width. Specifically, in embodiment S421, the control gain parameter is calculated based on the flow characteristic curve of the hydraulic proportional valve and the cross-sectional area of ​​the hydraulic cylinder's inner diameter. Specifically, the actual elongation of the hydraulic cylinder is recorded in a land calibration test using a laser displacement sensor when a 1-millisecond pulse width modulation signal is applied, and this calibration data is used as the control gain parameter. The control gain parameter of the hydraulic proportional valve is, for example, 10 mm per millisecond pulse width. The target pulse width is calculated to be 90.4 / 10 = 9.04 milliseconds. S422: Use the advanced timer of the STM32 microcontroller to generate a pulse width modulation signal based on the target pulse width; Specifically, in embodiment S422, the STM32 microcontroller is configured with a TIM3 timer, the period is set to 20 milliseconds, and the output pulse width modulation signal has a high level duration of 9.04 milliseconds. S423. Output the pulse width modulation signal to the control terminal of the hydraulic proportional valve to drive the hydraulic push rod to perform the hydraulic push rod compensation stroke. Specifically, in embodiment S423, after receiving the pulse width modulation signal, the hydraulic proportional valve opens the corresponding valve port, drives the hydraulic cylinder to extend by 90.4 mm, and presses the raised cutter arm back onto the bottom mud surface. This bottom-adhering compensation control is executed in parallel with the concentration control in S3. The interference caused by terrain undulations is offset in advance through feedforward compensation, ensuring that the dredging robot maintains a stable mud collection concentration in complex underwater terrain. The above embodiment divides the compensation stroke by the control gain parameter to convert it into the target pulse width, and uses the advanced timer inside the microcontroller to directly generate a hardware pulse width modulation signal to drive the hydraulic proportional valve. This direct drive mechanism based on feedforward compensation bypasses the complex hydraulic closed-loop feedback delay, and can simultaneously lower or raise the boom at the moment the robot climbs the slope or goes down the ditch. Compared with the operation mode without compensation, it reduces the proportion of time the cutter is suspended and sucking water.

[0025] A control method for a dredging system based on STM32 is provided for implementing the control method of the dredging system based on STM32; the system includes: The multi-source data acquisition module includes a CAN bus controller with hardware receiver interrupt, an ADC sampling circuit with DMA transmission, and an I2C communication bus. It is used to synchronously acquire cutter motor current, track motor current, mud concentration, analog voltage, and sensor quaternions, and perform median average filtering and unit conversion to construct a multi-dimensional state buffer array. The abnormal working condition escape module includes a first-order differential calculation unit and an advanced timer complementary PWM generation unit, which is used to calculate the torque gradient in real time. When the gradient is determined to be out of limit, the module generates a duty cycle inversion signal with adjustable dead time and an asymmetric forward and reverse jitter signal to control the H-bridge drive circuit to execute the escape sequence. The adaptive cooperative control module includes a fuzzy rule inference matrix and an incremental PID calculation unit. After extracting the extreme point of the optimal pumping concentration, it dynamically corrects the PID coefficients based on the concentration deviation and rate of change, calculates the total control increment, and combines a thrust attenuator based on the friction factor and a torque margin distributor based on the motor thermal limit to output the actual adjustment amount. The bottom-fitting compensation control module includes a spatial geometric trigonometric function calculation unit and a timer PWM generator. It is used to convert the pitch angle deviation into the hydraulic push rod linear compensation stroke by combining the boom lever transmission ratio. Based on the calibrated control gain, it outputs a PWM wave with the corresponding duty cycle to the hydraulic proportional valve to realize the feedforward compensation of terrain undulation. This invention leverages the computing power limitations of embedded microcontrollers to construct a lightweight closed-loop control method encompassing multi-source sensing, anomaly interception, performance optimization, and attitude compensation. It extracts torque gradients using a differential algorithm to intercept entanglement situations instantaneously before physical damage occurs, and utilizes asymmetric mechanical vibration to achieve autonomous escape, ensuring the safety of the underlying equipment. Using mud concentration as the ultimate representation of system performance, it processes nonlinear disturbances in mud density through fuzzy logic, and employs power weights and physical boundary constraints to achieve dynamic coordination between the cutter head and tracks, ensuring the system always operates within the optimal hydrodynamic pumping range. Furthermore, it eliminates environmental terrain interference through feedforward attitude compensation derived from spatial geometric calculations. This invention effectively overcomes the shortcomings of low efficiency and susceptibility to damage in fixed-parameter operations, achieving high efficiency, safety, and a high degree of autonomy in dredging operations.

[0026] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0027] The preferred embodiments of the invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, 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 dredging system based on STM32, characterized by including the following steps: S1. The real-time torque feedback value of the cutter motor, the real-time thrust feedback value of the track motor, the real-time mud concentration value at the mud pump outlet, and the real-time pitch angle of the six-axis attitude sensor are collected by the STM32 microcontroller. S2. Calculate the first time derivative of the real-time torque feedback value to obtain the real-time torque gradient; Determine whether the real-time torque feedback value is greater than the rated torque threshold and whether the real-time torque gradient is greater than the sudden change gradient threshold. If so, control the cutter motor to execute a dynamic escape sequence until the real-time torque feedback value drops below the safe torque threshold; otherwise, execute step S3. S3. Based on the concentration deviation between the real-time mud concentration value and the target mud concentration, calculate the adjustment amount of the basic cutter head speed and the adjustment amount of the basic track propulsion speed. Determine whether the real-time thrust feedback value is greater than the safe thrust threshold; If so, multiply the basic track propulsion speed adjustment by the thrust attenuation coefficient to obtain the actual track propulsion speed adjustment; otherwise, use the basic track propulsion speed adjustment as the actual track propulsion speed adjustment. The actual cutter speed adjustment is calculated based on the rated torque threshold, real-time torque feedback value, and basic cutter speed adjustment. The actual cutter speed adjustment is sent to the cutter motor, and the actual track propulsion speed adjustment is sent to the track motor; S4. Input the attitude deviation between the real-time pitch angle and the horizontal reference angle into the feedforward compensation algorithm to obtain the hydraulic push rod compensation stroke; use the STM32 microcontroller to control the hydraulic proportional valve to execute the hydraulic push rod compensation stroke and adjust the lifting height of the cutter arm.

2. The control method for a dredging system based on STM32 according to claim 1, characterized in that step S1 includes the following steps: S11. Receive the cutter current feedback message sent by the cutter motor driver and the track current feedback message sent by the track motor driver using the controller local area network bus interface of the STM32 microcontroller. S12. Extract the real-time current value of the cutter from the cutter current feedback message, multiply the real-time current value of the cutter by the torque constant of the cutter motor, and obtain the real-time torque feedback value. Extract the real-time track current value from the track current feedback message, multiply the real-time track current value by the track motor thrust constant to obtain the real-time thrust feedback value; S13. Using the STM32 microcontroller's direct memory access controller in conjunction with the analog-to-digital converter interface, continuously read the analog voltage signal from the mud concentration sensor; use a linear mapping function to convert the analog voltage signal into a real-time mud concentration value; S14. Use the internal integrated circuit bus interface of the STM32 microcontroller to read the quaternion data in the internal register of the six-axis attitude sensor, and use the Euler angle conversion formula to convert the quaternion data into real-time pitch angle. The real-time torque feedback value, real-time thrust feedback value, real-time mud concentration value, and real-time pitch angle are stored in a sliding window buffer array.

3. The control method for a dredging system based on STM32 according to claim 2, characterized in that the specific steps for calculating the real-time torque gradient in step S2 include: S211. Set the discrete time step; extract the real-time torque feedback value of the current time step and the real-time torque feedback value of the previous time step from the sliding window buffer array; S212. Subtract the real-time torque feedback value of the previous time step from the real-time torque feedback value of the current time step to obtain the torque change. S213. Divide the torque change by the discrete time step to obtain the real-time torque gradient.

4. The control method for a dredging system based on STM32 according to claim 1, characterized in that the specific steps in S2 of controlling the cutter motor to execute the dynamic escape sequence include: S221, Send a stop command with zero speed to the track motor, and send a set low-frequency protection frequency command to the mud pump; S222. Generate a reverse pulse width modulation signal with a duty cycle of 100% to control the cutter motor to reverse the set first duration with maximum reverse torque. S223. After the first duration ends, an asymmetric forward and reverse jitter command is generated; the asymmetric forward and reverse jitter command includes a second duration set for forward rotation and a third duration set for reverse rotation, and the third duration is greater than the second duration; S224. Control the cutter motor to alternate between forward and reverse rotation, and continuously monitor the real-time torque feedback value during each alternation. S225. Determine whether the real-time torque feedback value has dropped below the safe torque threshold. If so, the escape is deemed successful, and step S3 is resumed. Otherwise, determine whether the number of alternating executions has reached the maximum jitter threshold; if so, trigger an audible and visual alarm and send a shutdown distress signal to the shore-based host computer; otherwise, return to step S224.

5. The control method for a dredging system based on STM32 according to claim 1, characterized in that the specific steps for calculating the concentration deviation in S3 include: S311. Retrieve the optimal pumping efficiency curve of the mud pump and extract the concentration value corresponding to the extreme point of the optimal pumping efficiency curve as the preset target mud concentration. S312. Subtract the preset target mud concentration from the real-time mud concentration value at the current time step to obtain the concentration deviation at the current time step. S313. Subtract the concentration deviation of the previous time step from the concentration deviation of the current time step to obtain the concentration deviation change rate.

6. The control method for a dredging system based on STM32 according to claim 5, characterized in that the specific steps in S3 for calculating the adjustment amount of the basic cutter head rotation speed and the adjustment amount of the basic track propulsion speed include: S321. Input the concentration deviation and the rate of change of concentration deviation at the current time step into the fuzzy proportional-integral-derivative controller; S322. The fuzzy proportional-integral-derivative controller uses a preset fuzzy rule matrix to perform fuzzy inference on the concentration deviation and the rate of change of concentration deviation at the current time step, and outputs the increment of the proportional coefficient, the increment of the integral coefficient and the increment of the derivative coefficient. S323. Add the basic proportional coefficient to the proportional coefficient increment to obtain the current proportional coefficient; add the basic integral coefficient to the integral coefficient increment to obtain the current integral coefficient; add the basic differential coefficient to the differential coefficient increment to obtain the current differential coefficient. S324. Using the current proportional coefficient, current integral coefficient, and current derivative coefficient, combined with the concentration deviation of the current time step, the concentration deviation of the previous time step, and the concentration deviation of the two previous time steps, the total control increment is calculated using the incremental proportional-integral-derivative formula. S325. Multiply the total control increment by the first allocation weight to obtain the basic cutter speed adjustment amount, and multiply the total control increment by the second allocation weight to obtain the basic track propulsion speed adjustment amount.

7. The control method for a dredging system based on STM32 according to claim 6, characterized in that the setting rule for the preset fuzzy rule matrix in S322 is: When the concentration deviation is negative and the rate of change of the concentration deviation is negative, the output is a positive proportional coefficient increment and a zero integral coefficient increment. When the concentration deviation is positive and the rate of change of the concentration deviation is positive, the output is a negative proportional coefficient increment and a negative integral coefficient increment.

8. The control method for a dredging system based on STM32 according to claim 1, characterized in that, The specific steps for calculating the hydraulic push rod compensation stroke in S4 include: S411. Obtain the preset horizontal reference angle, and subtract the horizontal reference angle from the real-time pitch angle to obtain the attitude deviation; S412. Extract the physical length parameters of the cutter arm; S413. Convert the attitude deviation to radians and calculate the sine value of the attitude deviation; multiply the sine value of the attitude deviation by the physical length parameter to obtain the vertical height displacement of the end of the cutter arm. S414. Multiply the vertical height displacement by the hydraulic cylinder transmission ratio coefficient to calculate the hydraulic push rod compensation stroke.

9. The control method for a dredging system based on STM32 according to claim 8, characterized in that the specific steps of adjusting the lifting height of the cutter arm in step S4 include: S421. Extract the control gain parameter of the hydraulic proportional valve, divide the hydraulic push rod compensation stroke by the control gain parameter, and calculate the target pulse width. S422: Use the advanced timer of the STM32 microcontroller to generate a pulse width modulation signal based on the target pulse width; S423. Output the pulse width modulation signal to the control terminal of the hydraulic proportional valve to drive the hydraulic push rod to perform the hydraulic push rod compensation stroke.

10. A dredging control system based on STM32, used to implement the dredging system control method based on STM32 as described in any one of claims 1 to 9; the system comprises: The multi-source data acquisition module is used to synchronously acquire multi-source operation data through the peripheral interface on the STM32 microcontroller. The abnormal working condition escape module is used to calculate the real-time torque gradient and control the auger motor to execute a dynamic escape sequence when it is determined that the abnormal working condition of entanglement and jamming has been entered. The adaptive cooperative control module is used to calculate the basic adjustment amount using a fuzzy proportional-integral-derivative controller under normal dredging conditions, and to allocate instructions by combining real-time thrust feedback value and real-time torque feedback value. The bottom-fitting compensation control module is used to calculate the hydraulic push rod compensation stroke and output a pulse width modulation signal to adjust the lifting height of the cutter arm.