Bionic underwater robot motion posture control optimization method based on ai vision intelligence
Patent Information
- Application Number
- CN202611217329.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-13
AI Technical Summary
水下强反光、局部遮挡和尾迹纹理变化会引起视觉伪偏移,水压尖峰和乱流冲击会干扰姿态估计,单一时间窗估计方式难以区分尾鳍自扰、水流扰动和真实姿态偏差
本发明通过采集机载视觉数据、尾部局部视觉数据、IMU数据、深度计数据、水压差数据、尾鳍角度编码数据和推进执行反馈数据,生成可信运动状态数据,并构建尾迹涡格能量图、局部光斑遮挡格和能量流半窗谱,使仿生水下机器人运动状态表达从单一姿态量扩展到尾迹扰动、局部视觉遮挡和半窗能量变化,提高水下复杂环境中的状态感知完整性,降低视觉伪偏移和尾鳍自扰造成的姿态估计误差。
Smart Images

Figure CN122902649A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of biomimetic underwater robot motion control technology, and in particular to a method for optimizing the motion posture control of biomimetic underwater robots based on AI visual intelligence. Background Technology
[0002] In underwater inspection, environmental monitoring, target tracking, and near-bottom navigation missions, biomimetic underwater robots rely on onboard vision, tail-mounted local vision, IMU, depth gauge, differential pressure gauge, tail fin angle encoder, and propulsion execution feedback data to achieve attitude perception and motion control. Existing technologies mostly utilize multi-sensor fusion, visual target recognition, inertial navigation correction, PID control, model predictive control, and recurrent neural networks to generate propulsion control variables for adjusting the tail fin, pectoral fin, control surfaces, auxiliary thrusters, and buoyancy adjustment unit.
[0003] Existing biomimetic underwater robot control methods are insufficient in representing the wake disturbances caused by the periodic propulsion of the tail fin. They often directly input visual features, attitude data, and water pressure data into the control model, lacking dedicated data structures for local vortex energy, local light spot occlusion, and energy changes in the half-window of the left and right swaying motion. Strong underwater reflections, local occlusion, and changes in wake texture can cause visual pseudo-shifts, while water pressure spikes and turbulent impacts can interfere with attitude estimation. Single-time-window estimation methods struggle to distinguish between tail fin self-disturbances, water flow disturbances, and true attitude deviations.
[0004] During long-endurance control, existing recurrent neural networks are prone to accumulating hidden state drift, ordinary time gating struggles to maintain phase consistency with tail fin propulsion, and instantaneous hydrodynamic pulses are easily written into control memory, leading to overcorrection, attitude oscillations, and discontinuous control commands. Existing methods lack sufficient capabilities in tail fin phase synchronization, energy consistency between left and right half-windows, local visual delay injection, and MHE closed-loop correction, making it difficult to meet the optimization requirements for biomimetic robot motion and attitude control in complex underwater environments.
[0005] Therefore, how to provide a method for optimizing the motion posture control of biomimetic underwater robots based on AI visual intelligence is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose an AI-based visual intelligence-based biomimetic underwater robot motion attitude control optimization method. This invention utilizes airborne vision, tail local vision, the MHE algorithm, and an improved Phased LSTM model to jointly process wake disturbances, local light spot occlusion, water pressure spikes, and tail fin phase changes to generate cooperative control commands. It has the advantages of high attitude estimation accuracy, strong resistance to water flow disturbances, and good long-endurance control stability.
[0007] The AI-based visual intelligence-based biomimetic underwater robot motion attitude control optimization method according to embodiments of the present invention includes: Collect motion sensing data and perform preprocessing on the motion sensing data to generate reliable motion state data; Based on reliable motion state data, perform tail local visual vortex energy mapping operation and airborne visual spot occlusion marking operation to generate wake vortex energy map and local spot occlusion grid; A caudal fin phase rolling window is constructed based on reliable motion state data. The caudal fin phase rolling window is then split into left and right half-windows to generate an energy flow half-window spectrum. The MHE algorithm is used to generate attitude state vectors, visual pseudo-offset suppression records, and water flow disturbance delays from reliable motion state data, wake vortex energy maps, local spot occlusion grids, and energy flow half-window spectra. An improved Phased LSTM model was constructed, and the attitude state vector, visual pseudo-offset suppression record, water flow disturbance delay and tail fin phase marker were input into the improved Phased LSTM model to generate candidate propulsion control vectors. The candidate propulsion control vector is written into the output consistency residual of the next tail fin phase roll window, and boundary trimming is performed based on the propulsion execution feedback data in the reliable motion state data to generate the final cooperative control command. The final coordinated control command controls the tail fin, pectoral fin, rudder, auxiliary thruster, and buoyancy adjustment unit, and collects multi-source feedback data after execution, which is then fed back to the motion perception data to generate motion attitude control optimization results.
[0008] Optionally, the motion perception data includes onboard visual data, tail-side local visual data, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, and propulsion execution feedback data of the biomimetic underwater robot.
[0009] Optionally, the preprocessing of the motion sensing data includes time synchronization, coordinate unification, tail fin phase marking, and confidence marking.
[0010] Optionally, the generation of the wake vortex grid energy map and the local spot occlusion grid includes: Read the tail local visual data, airborne visual data, tail fin phase marker, tail fin angle encoding data and confidence marker from the reliable motion state data, extract the acquisition time from the tail local visual data and airborne visual data, and extract the tail fin period number from the tail fin angle encoding data. Extract the tail trail edge response, local grayscale changes, tail trail texture displacement direction and tail fin oscillation area from local visual data of the tail. Divide the tail fin oscillation area into vortex grid units and generate vortex grid numbers. Based on the caudal fin period number, the wake edge response, local grayscale change, and wake texture displacement direction within each vortex cell are statistically analyzed to generate a wake vortex energy map with associated vortex cell number, caudal fin period number, local vortex energy density, and confidence level. Visual block numbers, visual block brightness values, and acquisition times are extracted from airborne visual data to generate visual block brightness records. Based on the visual block brightness records, brightness saturation states, saturation continuity records, and delayed injection markers are generated. By combining the visual block number, acquisition time, brightness saturation state, saturation continuous recording, and delayed injection marker, a local spot occlusion grid is generated.
[0011] Optionally, the generation of the energy flow half-window spectrum includes: Read the tail fin phase marker, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, and propulsion execution feedback data from the reliable motion state data; The complete caudal fin cycle is determined based on the caudal fin phase marker and caudal fin angle encoding data, a caudal fin cycle number is generated, and IMU data, depth gauge data, water pressure difference data and propulsion execution feedback data are arranged according to the caudal fin cycle number to generate a caudal fin phase rolling window. According to the swing direction corresponding to the caudal fin phase marker, the caudal fin phase roll window is divided into a left half window and a right half window; The left half-window generates the left half-window propulsion work, the left half-window kinetic energy increment, and the left half-window potential energy increment; the right half-window generates the right half-window propulsion work, the right half-window kinetic energy increment, and the right half-window potential energy increment based on the right half-window. The propulsion work, kinetic energy increment, potential energy increment, propulsion work, kinetic energy increment, and potential energy increment of the left half-window are combined according to the caudal fin period numbering to generate an energy flow half-window spectrum.
[0012] Optionally, the generation of the attitude state vector, visual pseudo-offset suppression record, and water flow disturbance delay includes: The reliable motion state data, wake vortex energy map, local spot occlusion grid and energy flow half window spectrum are input into the MHE algorithm. The caudal fin phase rolling window, left half window, right half window, caudal fin period number and reliability mark are read. Based on the reliability mark, the reliable motion state data participating in the solution of the MHE algorithm are selected. Based on the attitude estimation state of the rear half window in the previous caudal fin phase rolling window, and the IMU data, depth gauge data and caudal fin angle encoding data in the current caudal fin phase rolling window, the initial estimated trajectory of the current caudal fin phase rolling window is generated. Based on the initial estimated trajectory, the left half-window and the right half-window, the attitude estimation states of the left half-window and the right half-window are generated respectively, and the midpoint coupling state record is generated based on the attitude estimation states of the left half-window and the right half-window. Read the wake vortex lattice energy map and energy flow half-window spectrum, generate energy consistency residuals, and write the energy consistency residuals into the residual term of the objective function of the MHE algorithm; Read the delayed injection markers in the local spot occlusion grid, write the visual features corresponding to the delayed injection markers into the next tail fin phase rolling window, and generate a visual pseudo-offset suppression record; Read water pressure difference data, generate pressure spike markers based on the window mean, window fluctuation amplitude and number of consecutive acquisition frames of water pressure difference data, generate frozen measurement records for the measurement data corresponding to the pressure spike markers, and generate water flow disturbance delay based on the frozen measurement records; The attitude state vector is generated by solving the MHE estimated state based on the midpoint coupling state record, energy consistency residual, visual pseudo-offset suppression record, and water flow disturbance delay.
[0013] Optionally, the generation of energy consistency residuals includes: Read the vortex grid number, tail fin period number and local vortex energy density in the wake vortex grid energy map, and read the propulsion work, kinetic energy increment, potential energy increment, propulsion work, kinetic energy increment and potential energy increment of the left half window in the energy flow half window spectrum. The wake vortex energy map and the energy flow half-window spectrum are periodically aligned according to the caudal fin period number to generate a half-window energy alignment record. Arrange the local vortex energy densities of each vortex lattice unit within the same caudal fin period to form a wake vortex energy sequence. The energy closure difference of the left half-window is generated based on the propulsion work of the left half-window, the kinetic energy increment of the left half-window, and the potential energy increment of the left half-window; the energy closure difference of the right half-window is generated based on the propulsion work of the right half-window, the kinetic energy increment of the right half-window, and the potential energy increment of the right half-window. The wake vortex energy sequence, the energy closure difference of the left half window, and the energy closure difference of the right half window are associated according to the tail fin period number and half window label to generate energy consistency residuals.
[0014] Optionally, generating candidate propulsion control vectors includes: An improved Phased LSTM model was constructed. The improved Phased LSTM model retains the time gating unit of the Phased LSTM and sets the tail fin phase modulation time gate, hydrodynamic pulse suppression gate, calibration heartbeat restart unit and control readout unit. The caudal fin phase modulation time gate reads the caudal fin phase marker and caudal fin cycle number, identifies the caudal fin swing phase interval corresponding to the current acquisition time, and controls the opening state of the Phased LSTM time gate unit according to the caudal fin swing phase interval to generate a caudal fin phase gate state synchronized with the caudal fin propulsion cycle. The hydrodynamic pulse suppression gate reads water pressure difference data, water flow disturbance delay and pressure spike marker, identifies the instantaneous water pressure change interval within the current caudal fin phase roll window, and reduces the hidden state write intensity corresponding to the instantaneous water pressure change interval to generate a hydrodynamic pulse gating state. The calibration heartbeat restart unit reads the caudal fin cycle number, attitude state vector and visual pseudo-offset suppression record, identifies the attitude drift accumulation state in consecutive caudal fin cycles, and generates a hidden restart marker when the attitude drift accumulation state reaches the restart judgment condition. The Phased LSTM time-gated unit performs time-series state updates on the attitude state vector, visual pseudo-offset suppression record, and water flow disturbance delay based on the tail fin phase-gated state, hydrodynamic pulse-gated state, and latent restart marker, generating a control latent representation processed by tail fin phase synchronization, hydrodynamic pulse suppression, and long-term drift restart. The control readout unit generates candidate propulsion control vectors based on the control latent state representation. The candidate propulsion control vectors include tail fin oscillation amplitude control, tail fin oscillation frequency control, tail fin oscillation phase control, pectoral fin compensation, rudder adjustment, auxiliary thruster output, and buoyancy adjustment. The improved Phased LSTM model is trained by extracting historical effective control vectors from the final cooperative control commands and corresponding attitude tracking errors of the historical control cycles. The control deviation, attitude tracking error, hydrodynamic pulse gating state error, and hidden restart labeling error between the candidate propulsion control vector and the historical effective control vector are used as joint optimization objectives to iteratively update the parameters of the improved Phased LSTM model, resulting in the trained improved Phased LSTM model.
[0015] Optionally, generating the final cooperative control command includes: Read the candidate propulsion control vector, the next tail fin phase roll window, the attitude state vector, and the propulsion execution feedback data, and extract the execution boundary data and acquisition time from the propulsion execution feedback data; Write the candidate propulsion control vector into the next tail fin phase roll window, and generate an output consistency residual based on the current attitude state vector and the next tail fin phase roll window after writing the candidate propulsion control vector; Control consistency correction records are generated based on output consistency residuals, and these records are associated with candidate propulsion control vectors. Based on the execution boundary data, perform boundary pruning on the candidate propulsion control vectors to generate pruned control vectors; The final coordinated control command is generated by combining the trimmed control vector, control consistency correction record, tail fin cycle number, and acquisition time.
[0016] Optionally, the generation of motion attitude control optimization results includes: Read the final coordinated control command and send it to the tail fin, pectoral fin, rudder, auxiliary thruster and buoyancy adjustment unit; After collecting and executing the final coordinated control command, the system collects airborne visual data, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, and propulsion execution feedback data to generate multi-source feedback data after execution. The attitude tracking error is generated based on the multi-source feedback data and attitude state vector after execution, and the attitude tracking error is associated with the final cooperative control command to generate a control cycle feedback record. The control cycle feedback record is written into the motion sensing data, and the reliable motion state data is updated according to the caudal fin cycle number and the acquisition time. The final coordinated control command, attitude tracking error, visual pseudo-offset suppression record, water flow disturbance delay, and control cycle feedback record are combined to generate motion attitude control optimization results.
[0017] The beneficial effects of this invention are: This invention generates reliable motion state data by collecting airborne visual data, tail local visual data, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, and propulsion execution feedback data. It also constructs a wake vortex energy map, a local light spot occlusion grid, and an energy flow half-window spectrum, which expands the expression of the motion state of the biomimetic underwater robot from a single attitude quantity to wake disturbance, local visual occlusion, and half-window energy change. This improves the integrity of state perception in complex underwater environments and reduces attitude estimation errors caused by visual pseudo-offsets and tail fin self-disruptions.
[0018] This invention performs phase decomposition on the biomimetic tail fin oscillation process using a tail fin phase rolling window, a left half window, and a right half window. It also introduces initial estimated trajectory, midpoint coupling state record, energy consistency residual, visual pseudo-offset suppression record, and water flow disturbance delay into the MHE algorithm. This allows the energy difference between the left and right oscillations of the tail fin, water pressure spikes, and local light spot occlusion to participate in the attitude estimation process, thereby improving the stability and energy consistency of attitude estimation under water flow disturbance conditions.
[0019] This invention improves the Phased LSTM model by setting a tail fin phase modulation time gate, a hydrodynamic pulse suppression gate, a calibration heartbeat restart unit, and a control readout unit. This allows the model's hidden state update to be jointly regulated by the tail fin propulsion cycle, instantaneous water pressure changes, and long-term attitude drift. It generates candidate propulsion control vectors that include tail fin swing amplitude, tail fin swing frequency, tail fin swing phase, pectoral fin compensation, rudder adjustment, auxiliary thruster output, and buoyancy adjustment. After output consistency residuals and execution boundary trimming, the final coordinated control command is formed, improving the accuracy, disturbance rejection capability, and execution continuity of long-endurance motion attitude control. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They explain the invention together with the embodiments of the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of the AI-based visual intelligence-based biomimetic underwater robot motion posture control optimization method proposed in this invention. Figure 2 This is a schematic diagram of the improved Phased LSTM model structure of the AI-based visual intelligence-based biomimetic underwater robot motion posture control optimization method proposed in this invention. Figure 3 This is a flowchart of the MHE algorithm for the AI-based visual intelligence-based biomimetic underwater robot motion posture control optimization method proposed in this invention. Detailed Implementation
[0021] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0022] refer to Figure 1 , Figure 2 and Figure 3 An optimization method for motion attitude control of biomimetic underwater robots based on AI visual intelligence includes: Collect motion sensing data and perform preprocessing on the motion sensing data to generate reliable motion state data; Based on reliable motion state data, perform tail local visual vortex energy mapping operation and airborne visual spot occlusion marking operation to generate wake vortex energy map and local spot occlusion grid; A caudal fin phase rolling window is constructed based on reliable motion state data. The caudal fin phase rolling window is then split into left and right half-windows to generate an energy flow half-window spectrum. The MHE algorithm is used to generate attitude state vectors, visual pseudo-offset suppression records, and water flow disturbance delays from reliable motion state data, wake vortex energy maps, local spot occlusion grids, and energy flow half-window spectra. An improved Phased LSTM model was constructed, and the attitude state vector, visual pseudo-offset suppression record, water flow disturbance delay and tail fin phase marker were input into the improved Phased LSTM model to generate candidate propulsion control vectors. The candidate propulsion control vector is written into the output consistency residual of the next tail fin phase roll window, and boundary trimming is performed based on the propulsion execution feedback data in the reliable motion state data to generate the final cooperative control command. The final coordinated control command controls the tail fin, pectoral fin, rudder, auxiliary thruster, and buoyancy adjustment unit, and collects multi-source feedback data after execution, which is then fed back to the motion perception data to generate motion attitude control optimization results.
[0023] In this embodiment, the motion sensing data includes onboard visual data, tail-side local visual data, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, and propulsion execution feedback data of the biomimetic underwater robot, wherein: The airborne vision data includes airborne vision frames, vision block numbers, vision block brightness values, vision block pixel positions, vision frame acquisition times, and vision frame reliability markers. The tail local visual data includes tail local visual frames, tail trail edge response, local grayscale changes, tail trail texture displacement direction, tail fin swing area, tail visual acquisition time, and tail visual credibility markers. The IMU data includes acceleration data, angular velocity data, attitude angle data, IMU acquisition time, and IMU reliability markers; The depth gauge data includes depth measurements, depth changes, depth gauge acquisition time, and depth gauge reliability markers; The water pressure difference data includes water pressure difference measurement value, water pressure difference window mean, water pressure difference window fluctuation amplitude, number of consecutive acquisition frames, water pressure difference acquisition time, and water pressure difference confidence mark; The caudal fin angle encoding data includes caudal fin angle value, caudal fin angular velocity, caudal fin swing direction, caudal fin phase marker, caudal fin period number, caudal fin angle acquisition time, and caudal fin angle reliability marker. The propulsion execution feedback data includes tail fin execution feedback values, pectoral fin execution feedback values, control surface execution feedback values, auxiliary thruster execution feedback values, buoyancy adjustment unit execution feedback values, execution boundary data, propulsion feedback acquisition time, and propulsion feedback reliability markers.
[0024] In this embodiment, the preprocessing of motion sensing data includes time synchronization, coordinate unification, tail fin phase marking, and confidence marking.
[0025] In this embodiment, generating the wake vortex grid energy map and the local spot occlusion grid includes: Read the tail local visual data, airborne visual data, tail fin phase markers, tail fin angle encoding data, and confidence markers from the reliable motion state data. Extract the acquisition time from the tail local visual data and airborne visual data, and extract the tail fin cycle number from the tail fin angle encoding data. Specifically, extracting the tail fin cycle number from the tail fin angle encoding data involves: Read the caudal fin angle value and the caudal fin angle acquisition time from the caudal fin angle encoding data. Sort the caudal fin angle values in ascending order of acquisition time. Calculate the caudal fin angle difference between adjacent acquisition times. Mark the position where the caudal fin angle difference changes from positive to negative as the left swing peak point and the position where the caudal fin angle difference changes from negative to positive as the right swing peak point. Mark the data segment between two adjacent peak points in the same direction as one complete caudal fin cycle. Generate caudal fin cycle numbers starting from 1 and incrementing them according to the acquisition order. Write the caudal fin cycle numbers into the reliable motion state data at the corresponding acquisition time. From the local visual data of the tail, the edge response of the wake, local grayscale changes, the direction of wake texture displacement, and the tail fin wagging area are extracted. The tail fin wagging area is divided into vortex grid units and vortex grid numbers are generated, where: Extracting the trail edge response from local visual data of the tail is specifically as follows: Read the grayscale image of the local visual frame at the tail, arrange the grayscale image into a two-dimensional grayscale matrix according to the row and column coordinates, calculate the horizontal grayscale gradient of each pixel using a 3×3 Sobel horizontal operator, calculate the vertical grayscale gradient of each pixel using a 3×3 Sobel vertical operator, add the square of the square of the horizontal grayscale gradient and the square of the square of the vertical grayscale gradient to obtain the pixel edge intensity, arrange the pixel edge intensity according to the original row and column coordinates to generate the trail edge response matrix; Extracting local grayscale changes from the tail's local visual data, specifically: Read the local visual grayscale matrix of the tail at adjacent acquisition times within the same caudal fin cycle, subtract the grayscale value of the same row and column coordinates in the previous acquisition time from the grayscale value of the same row and column coordinates in the later acquisition time to obtain the pixel grayscale difference, take the absolute value of the pixel grayscale difference and arrange it according to the row and column coordinates to generate a local grayscale change matrix. The tail texture displacement direction is extracted from the local visual data of the tail, specifically as follows: Read the local visual grayscale matrix of the tail at adjacent acquisition times, extract a 5×5 texture window centered on the current pixel, and extract an 11×11 search window centered on the same row and column coordinates in the grayscale matrix at the next acquisition time. Calculate the sum of the absolute values of the corresponding pixel grayscale differences between the 5×5 texture window and each 5×5 candidate window in the search window. Take the center coordinates of the candidate window with the smallest sum of absolute grayscale differences as the matching coordinates. Subtract the current pixel coordinates from the matching coordinates to obtain the displacement vector. Write the horizontal and vertical components of the displacement vector into the tail texture displacement direction matrix according to the pixel coordinates. Extract the caudal fin oscillation region, divide the caudal fin oscillation region into vortex lattice elements, and generate vortex lattice numbers, specifically as follows: Read the caudal fin boundary pixels and the tail trace edge response matrix in the local visual frame of the tail. Expand the caudal fin boundary pixels by 20 pixels to form a candidate swing region. Retain the pixels with a tail trace edge response greater than 30 in the candidate swing region as caudal fin swing region pixels. Calculate the minimum bounding rectangle of the caudal fin swing region. Divide the minimum bounding rectangle into 64 vortex cells in 8 rows and 8 columns. Generate vortex cell numbers 1 to 64 in the order from top to bottom and from left to right. Based on the caudal fin period number, the wake edge response, local grayscale changes, and wake texture displacement direction within each vortex cell are statistically analyzed to generate a wake vortex grid energy map associated with the vortex grid number, caudal fin period number, local vortex energy density, and confidence level. The wake edge response, local grayscale changes, and wake texture displacement direction within each vortex cell are statistically analyzed according to the caudal fin period number. Specifically: Read the vortex grid number, caudal fin cycle number, wake edge response matrix, local grayscale change matrix, and wake texture displacement direction matrix. Read the pixel coordinates of each vortex grid unit within the same caudal fin cycle in groups according to the caudal fin cycle number. Align the wake edge response value, local grayscale change value, and wake texture displacement direction within the same vortex grid number according to the pixel coordinates to generate a vortex grid cycle statistics table. Generate a wake vortex lattice energy map with associated vortex lattice numbers, tail fin period numbers, local vortex energy densities, and confidence level labels, specifically as follows: Read the vortex grid period statistics table, calculate the difference between the horizontal component of the wake texture displacement direction along the vertical direction to obtain the first directional difference value, calculate the difference between the vertical component of the wake texture displacement direction along the horizontal direction to obtain the second directional difference value, subtract the first directional difference value from the second directional difference value to obtain the local vortex response, multiply the wake edge response value, local grayscale change value and absolute value of local vortex response of each pixel in the same vortex grid unit and sum them up, divide the sum value by the number of pixels in the vortex grid unit to obtain the local vortex energy density, arrange the vortex grid number, tail fin period number, local vortex energy density and confidence mark in the field order to generate the wake vortex grid energy map; Visual patch numbers, brightness values, and acquisition times are extracted from airborne visual data to generate visual patch brightness records. Based on these records, brightness saturation states, saturation continuity records, and delayed injection markers are generated, including: The visual block number is extracted from the airborne visual data, specifically as follows: Read the image width and image height of the airborne visual frame, divide the airborne visual frame into 16 visual block units in 4 rows and 4 columns, the width of the visual block is the image width divided by 4, the height of the visual block is the image height divided by 4, generate visual block numbers 1 to 16 in order from top to bottom and then from left to right, and map the row and column coordinates of each pixel to the corresponding visual block number. Extracting visual block brightness values from airborne visual data, specifically: Read the red, green, and blue channel values of each pixel in the airborne visual frame. Multiply the red channel value by 0.299, the green channel value by 0.587, and the blue channel value by 0.114. Add the three products to get the pixel brightness value. Accumulate the brightness values of all pixels in the same visual block unit according to the visual block number. Divide the accumulated result by the number of pixels in the visual block unit to get the visual block brightness value. Extracting the acquisition time from airborne vision data, specifically: Read the frame sequence number and camera timestamp from the airborne vision data, arrange the frame sequence numbers in the order of acquisition to form an airborne vision frame sequence, and write the camera timestamp into the acquisition time field of the corresponding airborne vision frame. Generate visual block brightness records, specifically: Read the visual block number, visual block brightness value and acquisition time, arrange the visual block numbers in the same airborne visual frame from 1 to 16, write the visual block brightness value and acquisition time corresponding to each visual block number into the same row of records, and generate a visual block brightness record. The brightness saturation state is generated based on visual block brightness records, specifically as follows: Read the brightness record of the visual block, mark the visual block unit with a brightness value greater than 245 as brightness saturation state 1, mark the visual block unit with a brightness value not greater than 245 as brightness saturation state 0, and store the brightness saturation state in association with the visual block number and the acquisition time. Saturated continuous records are generated based on visual block brightness records, specifically as follows: Read the brightness saturation state at each acquisition time according to the visual block number. Accumulate the number of frames with consecutive brightness saturation state of 1 under the same visual block number. When the brightness saturation state is 0, clear the accumulated frame count. Write the visual block number with accumulated frame count greater than or equal to 8 into the saturation continuous record. The saturation continuous record includes the visual block number, the start acquisition time, the end acquisition time, and the number of consecutive saturated frames. Delayed injection tags are generated based on visual block brightness records, specifically as follows: Read the visual block number and end acquisition time from the saturated continuous record, read the caudal fin cycle number and acquisition time index table, map the end acquisition time to the current caudal fin cycle number, add 2 to the current caudal fin cycle number to get the delayed injection cycle number, and combine the visual block number, the current caudal fin cycle number, the delayed injection cycle number and delayed injection state 1 into a delayed injection flag. The delayed injection state corresponding to the visual block number that has not entered the saturated continuous record is 0. By combining the visual block number, acquisition time, brightness saturation state, saturation continuous recording, and delayed injection marker, a local spot occlusion grid is generated. Specifically, the generation of the local spot occlusion grid involves: Read the visual block number, acquisition time, brightness saturation state, saturation continuous record and delay injection flag. Create a row index in ascending order of acquisition time and a column index in visual block number 1 to 16. Write the brightness saturation state, continuous saturation frame number and delay injection state to each row and column position. Form a 4-row 4-column occlusion state matrix for each acquisition time. Stack all occlusion state matrices in the order of acquisition time to generate a local spot occlusion grid.
[0026] In this embodiment, generating the energy flow half-window spectrum includes: Read the tail fin phase marker, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, and propulsion execution feedback data from the reliable motion state data; The complete caudal fin cycle is determined based on caudal fin phase markers and caudal fin angle encoding data. A caudal fin cycle number is generated, and IMU data, depth gauge data, water pressure difference data, and propulsion execution feedback data are arranged according to the caudal fin cycle number to generate a caudal fin phase rolling window. Specifically, the generation of the caudal fin cycle number is as follows: Read the acquisition time, caudal fin phase marker, caudal fin angle value, and caudal fin swing direction from the motion energy calculation table. Sort the caudal fin angle values in ascending order according to the acquisition time. Calculate the caudal fin angle difference between adjacent acquisition times. Mark the acquisition time when the caudal fin angle difference changes from positive to negative as the left swing peak point and the acquisition time when the caudal fin angle difference changes from negative to positive as the right swing peak point. Take the data segment between two adjacent peak points in the same direction as one complete caudal fin cycle. Number the first complete caudal fin cycle as 1. Number subsequent complete caudal fin cycles in ascending order according to the acquisition time. Write the caudal fin cycle number into the motion energy calculation table. According to the swing direction corresponding to the caudal fin phase marker, the caudal fin phase roll window is divided into a left half window and a right half window; The left half-window generates the left half-window propulsion work, the left half-window kinetic energy increment, and the left half-window potential energy increment. The right half-window generates the right half-window propulsion work, the right half-window kinetic energy increment, and the right half-window potential energy increment. Specifically, the left half-window generates the left half-window propulsion work, the left half-window kinetic energy increment, and the right half-window generates the right half-window propulsion work, the right half-window kinetic energy increment, and the right half-window potential energy increment. The acquisition time, tail fin angular velocity, tail fin execution feedback value, auxiliary thruster execution feedback value, acceleration data, depth measurement value, and buoyancy adjustment unit execution feedback value in the left half window are read. The time step is obtained by calculating the difference between adjacent acquisition times. The tail fin execution feedback value is multiplied by the tail fin angular velocity to obtain the instantaneous power of the tail fin. The auxiliary thruster execution feedback value is multiplied by the forward velocity obtained by integrating the IMU data to obtain the instantaneous power of the auxiliary thruster. The instantaneous power of the tail fin and the instantaneous power of the auxiliary thruster are added together, multiplied by the time step, and accumulated along the left half window to obtain the propulsion work of the left half window. The robot mass value is read. The square of the forward velocity at the end of the left half window is subtracted from the square of the forward velocity at the beginning of the left half window. The difference is multiplied by the robot mass value and then by 0.5 to obtain the kinetic energy increment of the left half window. The robot mass value and gravitational acceleration value of 9.8 m / s² are read. The depth measurement value at the end of the left half window is subtracted from the depth measurement value at the beginning of the left half window. The difference is multiplied by the robot mass value and gravitational acceleration value to obtain the potential energy increment of the left half window. The acquisition time, tail fin angular velocity, tail fin execution feedback value, auxiliary thruster execution feedback value, acceleration data, depth measurement value, and buoyancy adjustment unit execution feedback value in the right half window are read. The time step is obtained by calculating the difference between adjacent acquisition times. The tail fin execution feedback value is multiplied by the tail fin angular velocity to obtain the instantaneous power of the tail fin. The auxiliary thruster execution feedback value is multiplied by the forward velocity obtained by integrating the IMU data to obtain the instantaneous power of the auxiliary thruster. The instantaneous power of the tail fin and the instantaneous power of the auxiliary thruster are added together, multiplied by the time step, and accumulated along the right half window to obtain the propulsion work of the right half window. The robot mass value is read. The square of the forward velocity at the end of the right half window is subtracted from the square of the forward velocity at the beginning of the right half window. The difference is multiplied by the robot mass value and then by 0.5 to obtain the kinetic energy increment of the right half window. The robot mass value and gravitational acceleration value of 9.8 m / s² are read. The depth measurement value at the end of the right half window is subtracted from the depth measurement value at the beginning of the right half window. The difference is multiplied by the robot mass value and gravitational acceleration value to obtain the potential energy increment of the right half window. The propulsive work, kinetic energy increment, and potential energy increment of the left half-window are combined according to the caudal fin period numbering to generate an energy flow half-window spectrum. Specifically, the generation of the energy flow half-window spectrum is as follows: Read the caudal fin cycle number, left half-window propulsion work, left half-window kinetic energy increment, left half-window potential energy increment, right half-window propulsion work, right half-window kinetic energy increment, and right half-window potential energy increment, arrange them in ascending order according to the caudal fin cycle number, write the 6 energy fields corresponding to the same caudal fin cycle number into the same row, set the field order to caudal fin cycle number, left half-window propulsion work, left half-window kinetic energy increment, left half-window potential energy increment, right half-window propulsion work, right half-window kinetic energy increment, and right half-window potential energy increment, and form all rows into an energy flow half-window spectrum matrix.
[0027] In this embodiment, the generation of the attitude state vector, visual pseudo-offset suppression record, and water flow disturbance delay includes: The reliable motion state data, wake vortex energy map, local spot occlusion grid, and energy flow half-window spectrum are input into the MHE algorithm. The caudal fin phase rolling window, left half-window, right half-window, caudal fin period number, and reliability marker are read. Based on the reliability marker, the reliable motion state data participating in the MHE algorithm solution are selected, including: The reliable motion state data, wake vortex energy map, local spot occlusion grid, and energy flow half-window spectrum are input into the MHE algorithm, specifically as follows: The acquisition time, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, airborne visual data, tail local visual data, and credibility markers in the reliable motion state data are read and arranged in ascending order of acquisition time to form a state observation table. The tail fin period number, vortex number, and local vortex energy density in the wake vortex grid energy map are read and arranged in ascending order of tail fin period number to form a vortex energy index table. The visual block number, acquisition time, brightness saturation state, and delay injection marker in the local light spot occlusion grid are read and arranged in ascending order of acquisition time to form an occlusion index table. The tail fin period number, left half-window propulsion work, left half-window kinetic energy increment, left half-window potential energy increment, right half-window propulsion work, right half-window kinetic energy increment, and right half-window potential energy increment in the energy flow half-window spectrum are read and arranged in ascending order of tail fin period number to form an energy spectrum table. The state observation table, vortex energy index table, occlusion index table, and energy spectrum table are used to establish an input index based on the tail fin period number and written into the MHE algorithm input cache. Read the caudal fin phase rolling window, left half window, right half window, caudal fin period number, and confidence marker, specifically: Read the data row corresponding to the same caudal fin cycle number from the MHE algorithm input buffer, write the state observation table data that is within the same complete caudal fin cycle at the acquisition time into the caudal fin phase rolling window, write the data row with the caudal fin swing direction to the left into the left half window, write the data row with the caudal fin swing direction to the right into the right half window, write the caudal fin cycle number into the window number field, write the confidence mark corresponding to each data row into the confidence field, and generate window index record; The reliable motion state data used in the MHE algorithm solution is selected based on reliability labeling, specifically as follows: Read the confidence markers in the window index records, write the data rows with confidence marker 1 into the MHE valid observation set, write the data rows with confidence marker 0 into the MHE discard observation set, write the data rows with confidence marker 1 for IMU data, depth gauge data, water pressure difference data and tail fin angle encoding data at the same acquisition time into the basic state observation set, retain only the non-visual observation fields for the data rows with confidence marker 0 for airborne visual data or tail local visual data, and output the reliable motion state data that participates in the MHE algorithm solution; Based on the attitude estimation state of the latter half of the previous caudal fin phase rolling window, and the IMU data, depth gauge data, and caudal fin angle encoded data in the current caudal fin phase rolling window, the initial estimated trajectory of the current caudal fin phase rolling window is generated. Specifically, the initial estimated trajectory of the current caudal fin phase rolling window is generated based on the attitude estimation state of the latter half of the previous caudal fin phase rolling window, and the IMU data, depth gauge data, and caudal fin angle encoded data in the current caudal fin phase rolling window. The system reads the attitude estimation state of the second half of the previous caudal fin phase rolling window from the MHE estimation output data of the previous control cycle. The attitude estimation states of the second half of the window are arranged in ascending order according to the acquisition time to form the historical second half trajectory. The system reads the acceleration data, angular velocity data, depth measurement value, caudal fin angle value, and caudal fin angular velocity from the current caudal fin phase rolling window. The system calculates the time step by the difference between adjacent acquisition times. The system multiplies the angular velocity data by the time step and adds it to the previous attitude angle to obtain the half-step attitude extrapolation value. The system multiplies the acceleration data by the time step and adds it to the previous velocity to obtain the half-step velocity extrapolation value. The system writes the difference in depth measurement values into the half-step depth extrapolation value. The system writes the caudal fin angle value and caudal fin angular velocity into the phase extrapolation field. The system concatenates the end state of the historical second half trajectory with the half-step attitude extrapolation value, half-step velocity extrapolation value, half-step depth extrapolation value, and phase extrapolation field according to the acquisition time to generate the initial estimated trajectory of the current caudal fin phase rolling window. Based on the initial estimated trajectory, the left half-window, and the right half-window, the attitude estimation states for the left and right halves of the window are generated respectively. Then, a midpoint coupling state record is generated based on these two attitude estimation states, where: Based on the initial estimated trajectory, the left half-window, and the right half-window, the pose estimation states for the left and right halves of the window are generated respectively, as follows: The attitude angle, velocity, depth, and tail fin phase fields in the initial estimated trajectory are read. The IMU data, depth gauge data, water pressure difference data, and tail fin angle encoding data in the left half window are read. The attitude difference, velocity difference, depth difference, and phase difference between the initial estimated trajectory and the observation data in the left half window are calculated line by line according to the acquisition time. The four types of differences are written into the observation residual table of the left half window. The MHE algorithm is used to minimize the observation residual table and energy consistency residual in the left half window to generate the attitude estimation state of the left half window. The IMU data, depth gauge data, water pressure difference data, and tail fin angle encoding data in the right half window are read. The observation residual table of the right half window is generated in the same way. The MHE algorithm is used to minimize the observation residual table and energy consistency residual in the right half window to generate the attitude estimation state of the right half window. A midpoint coupled state record is generated based on the left half-window pose estimation state and the right half-window pose estimation state, specifically as follows: Read the attitude angle, velocity, depth, and caudal fin phase corresponding to the end acquisition time of the left half window, and read the attitude angle, velocity, depth, and caudal fin phase corresponding to the beginning acquisition time of the right half window. Subtract the same fields in the end state of the left half window and the beginning state of the right half window one by one to obtain the attitude coupling difference, velocity coupling difference, depth coupling difference, and phase coupling difference. Arrange the four types of coupling differences in the order of the fields to form the midpoint coupling vector. Combine the caudal fin period number, midpoint acquisition time, and midpoint coupling vector to generate the midpoint coupling state record. Read the wake vortex lattice energy map and energy flow half-window spectrum, generate energy consistency residuals, and write the energy consistency residuals into the residual term of the objective function of the MHE algorithm. Specifically, generating the energy consistency residuals involves: Read the tail fin period number, vortex number, and local vortex energy density from the wake vortex grid energy map. Arrange the local vortex energy densities of 64 vortex grid units in the same period according to the tail fin period number to form the wake vortex energy sequence. Read the left half-window propulsion work, left half-window kinetic energy increment, left half-window potential energy increment, right half-window propulsion work, right half-window kinetic energy increment, and right half-window potential energy increment from the energy flow half-window spectrum. Subtract the left half-window kinetic energy increment and the left half-window potential energy increment from the left half-window propulsion work to obtain the left half-window energy closure difference. Subtract the right half-window kinetic energy increment and the right half-window potential energy increment from the right half-window propulsion work to obtain the right half-window energy closure difference. Associate the sum of the wake vortex energy sequence with the left half-window energy closure difference and the right half-window energy closure difference according to the half-window label to generate the energy consistency residual. Write the energy consistency residual into the energy residual field of the residual term in the objective function of the MHE algorithm. Read the delayed injection markers in the local spot occlusion grid, write the visual features corresponding to the delayed injection markers into the next tail fin phase rolling window, and generate a visual pseudo-shift suppression record. Specifically, the generation of the visual pseudo-shift suppression record is as follows: Read the visual block number, acquisition time, brightness saturation state, number of consecutive saturation frames and delay injection flag in the local spot occlusion grid. Write the visual block number with delay injection state 1 into the delayed visual block set. Read the airborne visual features corresponding to the delayed visual block set. Retain the original acquisition time and original tail fin cycle number of the airborne visual features. Write the airborne visual features into the visual delay field of the next tail fin phase rolling window corresponding to the delay injection cycle number. Combine the original tail fin cycle number, delay injection cycle number, visual block number and delay injection state to generate a visual pseudo-offset suppression record. Read water pressure difference data, generate pressure peak markers based on the window mean, window fluctuation amplitude, and number of consecutive acquisition frames of the water pressure difference data, generate frozen measurement records for the measurement data corresponding to the pressure peak markers, and generate water flow disturbance delay based on the frozen measurement records. Specifically, the generation of water flow disturbance delay based on the frozen measurement records is as follows: Read the water pressure difference measurement value and acquisition time in the current caudal fin phase rolling window. Calculate the arithmetic mean of the water pressure difference measurement values in the same window according to the caudal fin cycle number to obtain the window mean. Calculate the square of the difference between each water pressure difference measurement value and the window mean. Take the square root of the average of the squared differences to obtain the window fluctuation amplitude. Mark the acquisition time when the absolute value of the water pressure difference measurement value minus the window mean is greater than 3 times the window fluctuation amplitude as a candidate pressure peak moment. Mark the data segment where two consecutive acquisition frames are candidate pressure peak moments as pressure peak markers. Keep the values of the IMU data, depth gauge data, water pressure difference data, and visual data in the data row corresponding to the pressure peak markers from the previous non-peak acquisition time to generate a frozen measurement record. Subtract the start acquisition time and end acquisition time of the frozen measurement record to obtain the frozen duration. Convert the frozen duration into a flow disturbance delay according to the caudal fin cycle length. Based on the midpoint coupling state record, energy consistency residual, visual pseudo-offset suppression record, and water flow disturbance delay, the MHE estimated state is solved, and an attitude state vector is generated. Specifically, the attitude state vector is generated as follows: The MHE effective observation set, initial estimated trajectory, midpoint coupling state record, energy consistency residual, visual pseudo-offset suppression record, and water flow disturbance delay are read. The attitude angle, angular velocity, linear velocity, depth, tail fin phase, and water flow disturbance delay are arranged in field order to form the state vector to be estimated. The observation residual, midpoint coupling vector, energy consistency residual, and frozen measurement record are written into the MHE objective function residual table. The state vector to be estimated is solved using Gauss-Newton iteration. In each iteration, the residual table is read and the Jacobian matrix of the residual to be estimated is calculated. The incremental equation is solved to obtain the state correction. The state correction is added to the state vector to be estimated. The iteration stops when the number of iterations reaches 20 or the L2 norm of the state correction is less than 0.001. The attitude angle, angular velocity, linear velocity, depth, tail fin phase, and water flow disturbance delay at the stopping point are arranged in field order to generate the attitude state vector.
[0028] In this embodiment, generating energy consistency residuals includes: Read the vortex grid number, tail fin period number and local vortex energy density in the wake vortex grid energy map, and read the propulsion work, kinetic energy increment, potential energy increment, propulsion work, kinetic energy increment and potential energy increment of the left half window in the energy flow half window spectrum. The wake vortex grid energy map and the energy flow half-window spectrum are periodically aligned according to the caudal fin period number to generate a half-window energy alignment record. Specifically, the generation of the half-window energy alignment record is as follows: Read the set of tail fin cycle numbers from the vortex energy reading table and the set of tail fin cycle numbers from the half-window energy reading table. Take the intersection of the two sets of tail fin cycle numbers to obtain the set of valid cycle numbers. Read the vortex grid number, local vortex energy density, left half-window propulsion work, left half-window kinetic energy increment, left half-window potential energy increment, right half-window propulsion work, right half-window kinetic energy increment, and right half-window potential energy increment for the same tail fin cycle number according to the set of valid cycle numbers. Generate two half-window records for each valid cycle number. Write the first half-window record to the left half-window marked half-window and the second half-window record to the right half-window marked half-window. Combine the half-window mark, tail fin cycle number, vortex grid number set, local vortex energy density set, and corresponding half-window energy field to generate a half-window energy alignment record. The local vortex energy densities of each vortex lattice unit within the same caudal fin period are arranged into a wake vortex energy sequence. Specifically, the arrangement of the local vortex energy densities of each vortex lattice unit within the same caudal fin period into a wake vortex energy sequence is as follows: Read the caudal fin period number, vortex grid number set, and local vortex energy density set from the half-window energy alignment record. Sort the vortex grid numbers within the same caudal fin period number in ascending order. Use vortex grid numbers 1 to 64 as sequence position indices. Write the local vortex energy density corresponding to each vortex grid number into the corresponding sequence position. Write 0 into the sequence position corresponding to missing vortex grid numbers. Arrange the 64 local vortex energy densities in order to generate a wake vortex energy sequence of length 64. The energy closure difference of the left half-window is generated based on the propulsion work, kinetic energy increment, and potential energy increment of the left half-window. Similarly, the energy closure difference of the right half-window is generated based on the propulsion work, kinetic energy increment, and potential energy increment of the right half-window. Specifically, the energy closure difference of the left half-window is generated based on the propulsion work, kinetic energy increment, and potential energy increment of the left half-window, and the energy closure difference of the right half-window is generated based on the propulsion work, kinetic energy increment, and potential energy increment of the right half-window. Read the left half-window propulsion work, left half-window kinetic energy increment, and left half-window potential energy increment from the half-window energy alignment record marked as left half-window. Subtract the left half-window kinetic energy increment from the left half-window propulsion work and then subtract the left half-window potential energy increment to obtain the left half-window energy closure difference. Read the right half-window propulsion work, right half-window kinetic energy increment, and right half-window potential energy increment from the half-window energy alignment record marked as right half-window. Subtract the right half-window kinetic energy increment from the right half-window propulsion work and then subtract the right half-window potential energy increment to obtain the right half-window energy closure difference. Write the caudal fin period number, half-window mark, and corresponding energy closure difference into the energy closure difference record. The wake vortex energy sequence, the energy closure difference of the left half-window, and the energy closure difference of the right half-window are associated according to the tail fin period number and half-window label to generate energy consistency residuals. Specifically, the generation of energy consistency residuals is as follows: Read the wake vortex energy sequence and energy closure difference record. Align the wake vortex energy sequence, left half-window energy closure difference and right half-window energy closure difference of the same period according to the tail fin period number. Sum the 64 local vortex energy densities in the wake vortex energy sequence to obtain the total wake vortex energy of the period. Divide the total wake vortex energy of the period by 2 to obtain the half-window wake vortex energy reference quantity. Subtract the half-window wake vortex energy reference quantity from the left half-window energy closure difference to obtain the left half-window energy consistency residual. Subtract the half-window wake vortex energy reference quantity from the right half-window energy closure difference to obtain the right half-window energy consistency residual. Arrange the tail fin period number, half-window mark, wake vortex energy sequence, left half-window energy consistency residual and right half-window energy consistency residual in the order of the fields to generate the energy consistency residual.
[0029] In this embodiment, generating candidate propulsion control vectors includes: An improved Phased LSTM model is constructed. This improved model retains the time-gated unit of the Phased LSTM model and adds a tail fin phase modulation time gate, a hydrodynamic pulse suppression gate, a calibration heartbeat restart unit, and a control readout unit. Specifically, the improved Phased LSTM model is constructed as follows: This invention constructs an improved Phased LSTM model based on the original time-gated unit's backbone structure that controls latent state updates according to a time rhythm. The model inputs include the attitude state vector output by the MHE algorithm, visual pseudo-offset suppression records, water flow disturbance delay, and tail fin phase markers. The model outputs are the coordinated control quantities of the tail fin, pectoral fin, rudder surface, auxiliary thruster, and buoyancy adjustment unit. The improved Phased LSTM model is formed by sequentially connecting an input arrangement layer, a tail fin phase modulation time gate, a hydrodynamic pulse suppression gate, a calibration heartbeat restart unit, a Phased LSTM time-gated unit, and a control readout unit. A tail fin phase modulation time gate is embedded before the Phased LSTM time-gated unit to read the tail fin phase markers and tail fin period numbers, identify the tail fin oscillation phase interval corresponding to the current acquisition time, and control the time gate opening state according to the tail fin oscillation phase interval, thus synchronizing the latent state update with the tail fin propulsion cycle. The latent write path of the LSTM time-gated unit embeds a hydrodynamic pulse suppression gate to read water pressure difference data, water flow disturbance delay, and pressure spike markers. It identifies the instantaneous water pressure change interval within the current tail fin phase roll window and reduces the latent write intensity at the corresponding acquisition time. The latent transmission path of the Phased LSTM time-gated unit embeds a calibration heartbeat restart unit to read the tail fin cycle number, attitude state vector, and visual pseudo-offset suppression record. It identifies the attitude drift accumulation state within consecutive tail fin cycles and generates a latent restart marker when the attitude drift accumulation state reaches the restart judgment condition. The Phased LSTM time-gated unit completes the timing state update based on the tail fin phase gating state, hydrodynamic pulse gating state, and latent restart marker. The control readout unit maps the control latent representation into tail fin swing amplitude control quantity, tail fin swing frequency control quantity, tail fin swing phase control quantity, pectoral fin compensation quantity, rudder adjustment quantity, auxiliary thruster output quantity, and buoyancy adjustment quantity. The attitude state vector, visual pseudo-offset suppression record, water flow disturbance delay, caudal fin phase marker, water pressure difference data, and pressure peak marker output by the MHE algorithm are read. The model input sequence is established in ascending order of acquisition time. The input vector at each acquisition time is set to 22 dimensions, and the fields are in the following order: attitude angle (3D), angular velocity (3D), linear velocity (3D), depth (1D), caudal fin phase (1D), water flow disturbance delay (1D), visual block number (1D), delayed injection state (1D), original caudal fin cycle number (1D), delayed injection cycle number (1D), caudal fin phase marker (1D), caudal fin cycle number (1D), water pressure difference measurement (1D), water pressure difference window mean (1D), water pressure difference window fluctuation amplitude (1D), and pressure peak marker (1D). The 22-dimensional input vector is written into the input arrangement layer, which maintains the sequence order according to the acquisition time and outputs the 22-dimensional input features. Connect the caudal fin phase modulation time gate to the caudal fin phase marker, caudal fin period number and acquisition time field to output a 1D caudal fin phase gating state. Connect the hydrodynamic pulse suppression gate to the fields of water pressure difference measurement, water pressure difference window mean, water pressure difference window fluctuation amplitude, pressure peak marker, and water flow disturbance delay to output a 1D hydrodynamic pulse gating state; connect the calibration heartbeat restart unit to the fields of caudal fin cycle number, attitude angle, depth, visual block number, and delayed injection state to output a 1D hidden restart marker. The Phased LSTM time-gated unit is set to 2 layers. The first layer has an input dimension of 22 and a hidden state dimension of 64. The second layer has an input dimension of 64 and a hidden state dimension of 64. The tail fin phase-gated state and the hydrodynamic pulse-gated state are multiplied to obtain the comprehensive gating coefficient. When the hidden state restart flag is 1, the hidden state vector at the previous acquisition time is set to 0. When the hidden state restart flag is 0, the hidden state vector at the previous acquisition time is retained. The candidate hidden state vector generated by the Phased LSTM time-gated unit is multiplied by the comprehensive gating coefficient to obtain the written hidden state vector. The hidden state vector at the previous acquisition time is multiplied by 1 and the comprehensive gating coefficient is subtracted to obtain the retained hidden state vector. The written hidden state vector and the retained hidden state vector are added element by element to generate a 64-dimensional control hidden state representation. The control readout unit consists of a 64-dimensional to 32-dimensional fully connected layer, a ReLU activation function, and a 32-dimensional to 7-dimensional fully connected layer connected sequentially. It maps the 64-dimensional control latent representation into a 7-dimensional candidate propulsion control vector. The 7-dimensional candidate propulsion control vector consists of, in order, the tail fin oscillation amplitude control, the tail fin oscillation frequency control, the tail fin oscillation phase control, the pectoral fin compensation, the control surface adjustment, the auxiliary thruster output, and the buoyancy adjustment. The caudal fin phase modulation time gate reads the caudal fin phase marker and caudal fin period number, identifies the caudal fin oscillation phase interval corresponding to the current acquisition moment, and controls the opening state of the Phased LSTM time gating unit according to the caudal fin oscillation phase interval to generate a caudal fin phase gating state synchronized with the caudal fin propulsion period, wherein: The caudal fin phase modulation time gate includes: Phase data reader: Stores caudal fin phase markers, caudal fin cycle numbers, caudal fin swing direction, caudal fin angle values, and acquisition time, and generates a phase input sequence; Periodic Index Builder: Stores complete caudal fin period boundaries, left swing peak points, right swing peak points, period start acquisition time, period end acquisition time, and caudal fin period number, and generates a caudal fin period index table; Phase interval discriminator: stores the left swing interval marker, right swing interval marker, left swing peak point marker, right swing peak point marker, and the tail fin swing phase interval corresponding to the current acquisition time; Time gate open state generator: stores the tail fin swing phase interval, the open state of the Phased LSTM time gate unit and the acquisition time. The open state is 1 for the left swing interval and the right swing interval, 0.5 for the left swing peak point and the right swing peak point, and 0 for the non-tail fin effective swing interval. Phase synchronization gating coefficient generator: stores the caudal fin cycle number, caudal fin phase marker, time gate open state and caudal fin phase gating state, and generates a phase synchronization gating coefficient that is synchronized with the caudal fin propulsion cycle; Gated state buffer: Stores the caudal fin phase gating state at the current acquisition time, the caudal fin phase gating state at the previous acquisition time, the phase switching flag, and the phase continuity record; Time gate modulator: Stores the phase synchronization gate coefficients, the original time gate opening value of the Phased LSTM, and the modulated time gate opening value, and writes the modulated time gate opening value into the Phased LSTM time gate control unit; Phase-gated output: Stores the caudal fin phase-gated state, caudal fin period number, acquisition time, phase interval marker and modulated time gate opening value, and outputs the caudal fin phase-gated state used to control the latent state update; The caudal fin phase modulation time gate reads the caudal fin phase marker and caudal fin period number, specifically as follows: Read the caudal fin phase marker, caudal fin cycle number and acquisition time, group according to caudal fin cycle number, arrange the acquisition times within the same caudal fin cycle number in ascending order, write the caudal fin phase marker corresponding to each acquisition time into the phase sequence, and write the left swing interval, right swing interval, left swing peak point and right swing peak point in the phase sequence into the phase interval table respectively. Identify the caudal fin oscillation phase interval corresponding to the current acquisition moment, and control the on / off state of the Phased LSTM time-gated unit according to the caudal fin oscillation phase interval to generate a caudal fin phase-gated state synchronized with the caudal fin propulsion cycle, specifically: Read the current acquisition time and phase interval table, mark the phase interval into which the current acquisition time falls as the current tail fin swing phase interval, write the data rows where the current tail fin swing phase interval is a left swing interval or a right swing interval into the gating candidate set, write the data rows where the current tail fin swing phase interval is a left swing peak point or a right swing peak point into the phase switching set, set the enabled state of the Phased LSTM time gating unit corresponding to the gating candidate set to 1, set the enabled state of the Phased LSTM time gating unit corresponding to the phase switching set to 0.5, set the enabled state of the remaining data rows to 0, and arrange the enabled state, acquisition time, tail fin cycle number and tail fin phase mark in the field order to generate the tail fin phase gating state; The hydrodynamic pulse suppression gate reads water pressure difference data, water flow disturbance delay, and pressure peak markers to identify instantaneous water pressure change intervals within the current caudal fin phase roll window. It then reduces the hidden state write intensity corresponding to these instantaneous water pressure change intervals, generating a hydrodynamic pulse gating state, where: Hydrodynamic pulse suppression gates include: Water pressure differential data reader: used to read water pressure differential measurement values, water pressure differential window mean, water pressure differential window fluctuation amplitude, number of continuous acquisition frames, water flow disturbance delay and pressure spike marker, and generate hydrodynamic pulse input sequence; Pressure spike discriminator: used to calculate the deviation of the water pressure difference measurement value from the window mean, and generate pressure spike discrimination records based on the window fluctuation amplitude and the number of consecutive acquisition frames; Sudden change interval locator: used to locate the start time, end time and duration of instantaneous water pressure sudden change based on continuous pressure spike markers, and generate a water pressure sudden change interval index table; Delay perturbation matcher: used to read the delay of water flow perturbation and map it to the corresponding tail fin cycle number and acquisition time to generate the delay perturbation state; Hidden state write intensity generator: used to set the hidden state write intensity according to the instantaneous water pressure change interval and delay perturbation state, reducing the proportion of hydrodynamic pulses writing to the hidden state of Phased LSTM; Pulse Gated State Buffer: Used to store the hidden write intensity, pressure spike marker and water flow disturbance delay of the current acquisition time and the previous acquisition time, forming a continuous gated state record; Latent state write modulator: used to modulate the candidate hidden state vector of Phased LSTM according to the hidden state write intensity, and generate the modulated written hidden state vector and the retained hidden state vector; Pulse suppression output: Used to summarize the acquisition time, tail fin cycle number, pressure spike marker, instantaneous water pressure change interval, hidden state write intensity and hydrodynamic pulse gating state, and output the hydrodynamic pulse gating state used to control the hidden state update; The hydrodynamic pulse suppression gate reads water pressure difference data, water flow disturbance delay, and pressure spike markers, specifically: Read the water pressure difference measurement, window mean, window fluctuation amplitude, acquisition time, water flow disturbance delay, and pressure spike marker in the current caudal fin phase rolling window. Sort them in ascending order according to acquisition time to form a hydrodynamic disturbance table. Write the data row with pressure spike marker 1 into the spike candidate set and write the data row with water flow disturbance delay not equal to 0 into the delay disturbance set. Merge the spike candidate set and the delay disturbance set according to acquisition time to generate a hydrodynamic pulse input sequence. Identify the instantaneous water pressure change interval within the current caudal fin phase roll window, reduce the hidden state write intensity corresponding to the instantaneous water pressure change interval, and generate a hydrodynamic pulse gating state, specifically: Read the hydrodynamic pulse input sequence, calculate the absolute value of the difference between the measured water pressure difference and the window mean at each acquisition time, mark the continuous acquisition time segment with the absolute value of the difference greater than 3 times the window fluctuation amplitude and the pressure peak marked as 1 as the instantaneous water pressure change interval, set the hidden state write intensity corresponding to the instantaneous water pressure change interval to 0.2, set the hidden state write intensity corresponding to the data row with the water flow disturbance delay greater than 0 and not entering the instantaneous water pressure change interval to 0.6, set the hidden state write intensity corresponding to the remaining data rows to 1, arrange the acquisition time, pressure peak mark, water flow disturbance delay and hidden state write intensity in the field order to generate the hydrodynamic pulse gating state; The calibration heartbeat restart unit reads the caudal fin cycle number, attitude state vector, and visual pseudo-offset suppression record, identifies the cumulative attitude drift state within consecutive caudal fin cycles, and generates a hidden restart marker when the cumulative attitude drift state reaches the restart judgment condition, wherein: The calibration heartbeat restart unit includes: Periodic state reader: used to read the tail fin period number, acquisition time and attitude state vector, and generate a periodic attitude input sequence for cross-period drift judgment; Visual suppression reader: used to read visual pseudo-offset suppression records, extract visual block numbers and delay injection periods affected by local spot occlusion, and generate a visual suppression index table; End-of-cycle state extractor: used to extract the attitude angle, angular velocity, linear velocity, depth and caudal fin phase at the end of each caudal fin cycle, and generate an end-of-cycle state table for calculating the difference between adjacent cycles; Attitude drift accumulator: used to calculate the absolute values of attitude angle difference and depth difference at the end of adjacent caudal fin cycles, and accumulate them over 5 consecutive caudal fin cycles to generate attitude drift accumulation state; Restart Determiner: Used to determine whether a hidden restart is triggered based on the cumulative values of attitude angle drift, depth drift, and delayed injection status, and to generate a set of restart cycles; Hidden Restart Flag Generator: Used to map the set of restart cycles to the corresponding acquisition time and generate hidden restart flags for controlling the hidden update of Phased LSTM; Hidden state buffer clearer: used to clear the hidden state vector of the previous acquisition time when the hidden state restart flag is 1, and to retain the hidden state vector of the previous acquisition time when the hidden state restart flag is 0; Restart Status Outputter: Used to summarize the caudal fin cycle number, acquisition time, attitude drift accumulation status, visual suppression index table and hidden restart flag, and output the calibration heartbeat restart status; The calibration heartbeat restart unit reads the caudal fin cycle number, attitude state vector, and visual pseudo-offset suppression record, specifically as follows: Read the attitude state vector corresponding to the consecutive caudal fin cycle number, arrange the attitude angle, angular velocity, linear velocity, depth and caudal fin phase in the attitude state vector according to the field order to form a periodic attitude matrix, read the visual block number, delay injection state and delay injection cycle number in the visual pseudo-offset suppression record, write the record with delay injection state of 1 into the visual suppression index table, align the periodic attitude matrix and the visual suppression index table according to the caudal fin cycle number, and generate the restart judgment input table; The system identifies the cumulative attitude drift state within consecutive caudal fin cycles and generates a hidden restart flag when the cumulative attitude drift state reaches the restart determination condition. Specifically: Read the restart determination input table, calculate the absolute value of the difference between the attitude angles at the end of adjacent caudal fin cycles, calculate the absolute value of the difference between the depths at the end of adjacent caudal fin cycles, accumulate the absolute values of the attitude angle differences over 5 consecutive caudal fin cycles to obtain the cumulative value of attitude angle drift, accumulate the absolute values of the depth differences over 5 consecutive caudal fin cycles to obtain the cumulative value of depth drift, when the cumulative value of attitude angle drift is greater than 2 degrees or the cumulative value of depth drift is greater than 0.1m and there is a visual suppression record with a delayed injection state of 1 in the corresponding cycle, write the corresponding caudal fin cycle number into the restart cycle set, set the hidden restart flag corresponding to the restart cycle set to 1, and set the hidden restart flag corresponding to the other caudal fin cycle numbers to 0; The Phased LSTM time-gated unit performs time-series state updates on the attitude state vector, visual pseudo-offset suppression record, and flow disturbance delay based on the caudal fin phase-gated state, hydrodynamic pulse-gated state, and latent restart flag. This generates a control latent state representation processed by caudal fin phase synchronization, hydrodynamic pulse suppression, and long-term drift restart. Specifically, the generated control latent state representation, processed by caudal fin phase synchronization, hydrodynamic pulse suppression, and long-term drift restart, is as follows: The system reads the attitude state vector, visual pseudo-offset suppression record, water flow disturbance delay, caudal fin phase gating state, hydrodynamic pulse gating state, and latent state restart flag. It concatenates the attitude state vector, visual pseudo-offset suppression record, and water flow disturbance delay into the current input vector. It multiplies the open state in the caudal fin phase gating state with the latent state write intensity in the hydrodynamic pulse gating state to obtain the comprehensive gating coefficient. When the latent state restart flag is 1, the latent vector of the previous time step is set to 0. When the latent state restart flag is 0, the latent vector of the previous time step is retained. The current input vector is input into the Phased LSTM time gating unit to obtain the candidate latent vector. The candidate latent vector is multiplied by the comprehensive gating coefficient to obtain the written latent vector. The latent vector of the previous time step is multiplied by 1 and the comprehensive gating coefficient is subtracted to obtain the retained latent vector. The written latent vector and the retained latent vector are added element by element to generate the control latent representation of the current acquisition time. The control readout unit generates candidate propulsion control vectors based on the control latent state representation. These candidate propulsion control vectors include tail fin oscillation amplitude control, tail fin oscillation frequency control, tail fin oscillation phase control, pectoral fin compensation, rudder adjustment, auxiliary thruster output, and buoyancy adjustment. Specifically, the generation of candidate propulsion control vectors by the control readout unit based on the control latent state representation is as follows: The control latent state representations at each acquisition time are read and arranged into a latent state matrix in ascending order of acquisition time. The latent state matrix is input into the fully connected mapping layer of the control readout unit. The fully connected mapping layer outputs 7 control fields. The first field is written as the tail fin oscillation amplitude control quantity, the second field is written as the tail fin oscillation frequency control quantity, the third field is written as the tail fin oscillation phase control quantity, the fourth field is written as the pectoral fin compensation quantity, the fifth field is written as the rudder surface adjustment quantity, the sixth field is written as the auxiliary thruster output quantity, and the seventh field is written as the buoyancy adjustment quantity. The 7 control fields are arranged in order of acquisition time to generate candidate propulsion control vectors. The improved Phased LSTM model is trained by extracting historical effective control vectors from the final cooperative control commands and corresponding attitude tracking errors of historical control cycles. The control deviation, attitude tracking error, hydrodynamic pulse gating state error, and hidden restart labeling error between the candidate propulsion control vector and the historical effective control vector are used as joint optimization objectives to iteratively update the parameters of the improved Phased LSTM model, resulting in the trained improved Phased LSTM model. Specifically, the training of the improved Phased LSTM model involves: Read the final coordinated control command, attitude tracking error, and control cycle number from the historical control cycle record. Mark the control cycle with attitude tracking error less than 0.05m and attitude angle error less than 1 degree as the effective control cycle. Extract the final coordinated control command corresponding to the effective control cycle as the historical effective control vector. Arrange the tail fin swing amplitude control quantity, tail fin swing frequency control quantity, tail fin swing phase control quantity, pectoral fin compensation quantity, rudder adjustment quantity, auxiliary thruster output quantity, and buoyancy adjustment quantity in the historical effective control vector according to the field order to generate the training target vector. Read the candidate propulsion control vector, training target vector, attitude tracking error, hydrodynamic pulse gating state, and hidden restart marker. Calculate the sum of squares of the differences between corresponding fields between the candidate propulsion control vector and the training target vector to obtain the control bias loss. Calculate the square of the attitude tracking error to obtain the attitude tracking error loss. Calculate the sum of squares of the differences between the hydrodynamic pulse gating state and the pressure spike marker to obtain the hydrodynamic pulse gating state error loss. Calculate the sum of squares of the differences between the hidden restart marker and the restart cycle set marker to obtain the hidden restart marker error loss. Add the control bias loss, attitude tracking error loss, hydrodynamic pulse gating state error loss, and hidden restart marker error loss to obtain the joint optimization objective. Use backpropagation to calculate the gradient of the joint optimization objective with respect to the parameters of the improved Phased LSTM model. Set the learning rate to 0.001. Multiply the gradient by the learning rate to obtain the parameter update amount. Subtract the parameter update amount from the current model parameters to complete one iteration. Stop when the decrease in the joint optimization objective is less than 0.0001 after 10 consecutive iterations or when the number of iterations reaches 100. The trained improved Phased LSTM model is then obtained.
[0030] In this embodiment, generating the final cooperative control command includes: Read the candidate propulsion control vector, the next tail fin phase roll window, the attitude state vector, and the propulsion execution feedback data, and extract the execution boundary data and acquisition time from the propulsion execution feedback data; The candidate propulsion control vector is written into the next tail fin phase roll window, and an output consistency residual is generated based on the current attitude state vector and the next tail fin phase roll window after writing the candidate propulsion control vector, wherein: The candidate propulsion control vector is written into the next tail fin phase roll window, specifically as follows: Read the 7-dimensional candidate control vector and the next tail fin phase rolling window from the control correction input table. Initialize the control quantity field corresponding to each acquisition time in the next tail fin phase rolling window to 0. Write the tail fin swing amplitude control quantity into the tail fin amplitude field, the tail fin swing frequency control quantity into the tail fin frequency field, the tail fin swing phase control quantity into the tail fin phase field, the pectoral fin compensation quantity into the pectoral fin compensation field, the rudder surface adjustment quantity into the rudder surface adjustment field, the auxiliary thruster output quantity into the auxiliary thrust field, and the buoyancy adjustment quantity into the buoyancy adjustment field. Generate the next tail fin phase rolling window after writing the candidate propulsion control vector. The output consistency residual is generated based on the current attitude state vector and the next tail fin phase roll window after writing the candidate propulsion control vector, specifically as follows: Read the attitude angle, angular velocity, linear velocity, depth, caudal fin phase, and water flow disturbance delay from the current attitude state vector. Read the seven control variable fields from the next caudal fin phase rolling window after writing the candidate propulsion control vector. Perform one-step motion extrapolation based on the current attitude state vector and the seven control variable fields to obtain the predicted attitude angle, predicted angular velocity, predicted linear velocity, predicted depth, and predicted caudal fin phase for the next window. Read the MHE estimated attitude angle, MHE estimated angular velocity, MHE estimated linear velocity, MHE estimated depth, and MHE estimated caudal fin phase from the next caudal fin phase rolling window. Subtract the corresponding fields one by one to obtain the attitude angle residual, angular velocity residual, linear velocity residual, depth residual, and caudal fin phase residual. Arrange the five types of residuals in the order of the fields to generate the output consistency residual. Control consistency correction records are generated based on output consistency residuals, and these records are then associated with candidate propulsion control vectors. Specifically, the generation of control consistency correction records based on output consistency residuals involves: Read the attitude angle residual, angular velocity residual, linear velocity residual, depth residual, and caudal fin phase residual from the output consistency residual. Calculate the absolute values of the five types of residuals. Mark the data rows with an absolute value of attitude angle residual greater than 1 degree as attitude angle correction state 1, the data rows with an absolute value of angular velocity residual greater than 0.05 rad / s as angular velocity correction state 1, the data rows with an absolute value of linear velocity residual greater than 0.03 m / s as linear velocity correction state 1, the data rows with an absolute value of depth residual greater than 0.05 m as depth correction state 1, and the data rows with an absolute value of caudal fin phase residual greater than 5 degrees as caudal fin phase correction state 1. Mark the data rows that do not exceed the corresponding values as correction state 0. Combine the acquisition time, caudal fin cycle number, the five types of residuals, and the five types of correction states to generate a control consistency correction record. Based on the execution boundary data, boundary pruning is performed on the candidate propulsion control vectors to generate pruned control vectors. Specifically, generating pruned control vectors involves: Read the 7-dimensional candidate control vectors from the candidate control correction association table, and read the execution lower limit, execution upper limit, rate of change lower limit, and rate of change upper limit from the execution boundary table. Rewrite data where the caudal fin wiggle amplitude control value is less than the caudal fin amplitude lower limit to the caudal fin amplitude lower limit; rewrite data where the caudal fin wiggle amplitude control value is greater than the caudal fin amplitude upper limit to the caudal fin amplitude upper limit; rewrite data where the caudal fin wiggle frequency control value is less than the caudal fin frequency lower limit to the caudal fin frequency lower limit; rewrite data where the caudal fin wiggle frequency control value is greater than the caudal fin frequency upper limit to the caudal fin frequency upper limit; and rewrite data where the caudal fin wiggle phase control value is less than the caudal fin phase lower limit to the caudal fin phase lower limit. The data where the tail fin swing phase control quantity is greater than the upper limit of the tail fin phase is rewritten to the upper limit of the tail fin phase. The same upper and lower limit clipping is applied to the pectoral fin compensation quantity, rudder adjustment quantity, auxiliary thruster output quantity and buoyancy adjustment quantity. The control change rate is obtained by dividing the difference of the clipped control quantity between adjacent acquisition times by the acquisition time difference. The data where the control change rate is less than the lower limit of the change rate is rewritten as the control quantity of the previous acquisition time plus the lower limit of the change rate multiplied by the acquisition time difference. The data where the control change rate is greater than the upper limit of the change rate is rewritten as the control quantity of the previous acquisition time plus the upper limit of the change rate multiplied by the acquisition time difference. The clipped 7 control fields are arranged according to the acquisition time to generate the clipped control vector. The final coordinated control command is generated by combining the trimmed control vector, control consistency correction record, tail fin cycle number, and acquisition time.
[0031] In this embodiment, generating motion posture control optimization results includes: Read the final coordinated control command and send it to the tail fin, pectoral fin, rudder, auxiliary thruster and buoyancy adjustment unit; After collecting and executing the final coordinated control command, the system collects airborne visual data, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, and propulsion execution feedback data to generate multi-source feedback data after execution. The attitude tracking error is generated based on the multi-source feedback data and attitude state vector after execution, and the attitude tracking error is associated with the final cooperative control command to generate a control cycle feedback record. The control cycle feedback record is written into the motion sensing data, and the reliable motion state data is updated according to the caudal fin cycle number and the acquisition time. The final coordinated control command, attitude tracking error, visual pseudo-offset suppression record, water flow disturbance delay, and control cycle feedback record are combined to generate motion attitude control optimization results.
[0032] Example 1: In a continuous underwater inspection cycle, a biomimetic underwater robot performs an inspection task on the outer surface of a tubular structure in a closed test water area. The total inspection path is 620m long, the single inspection time is 46min, and the average inspection speed is 0.23m / s. The water area includes a weak backflow zone, a localized strong reflective zone, and an obstacle avoidance zone. The robot is affected by self-disruptions from the periodic oscillation of its tail fin, localized light spot obstruction, water pressure spike disturbances, and slow attitude drift. The data acquisition equipment includes an onboard vision device, a tail-mounted local vision device, an IMU, a depth gauge, a differential pressure gauge, a tail fin angle encoder, and a propulsion execution feedback device. The sampling frequency for vision, depth, differential pressure, tail fin angle encoding, and propulsion execution feedback is 20Hz, and the IMU sampling frequency is 60Hz. A single inspection collected 55,200 airborne visual frames, 55,200 tail-view local visual frames, 165,600 IMU data points, 55,200 depth gauge data points, 55,200 water pressure difference data points, 55,200 tail fin angle encoded data points, and 55,200 propulsion execution feedback data points. 18.6% of the original airborne visual frames showed localized light saturation, 23.4% of the tail-view local visual frames showed wake texture diffusion, and the water pressure difference data contained 312 consecutive spike fragments.
[0033] After the data enters the processing flow, the system uses the acquisition time as an index to write motion sensing data within 0.02 seconds into the same row of records, generating reliable motion state data. In the original data, there are 3809 low-reliability records and 51391 original reliable records, representing 93.1% of the original data. After time synchronization, reliability marking, and abnormal record removal, there are 54860 valid data rows, representing 99.4% of the data. In the tail fin angle encoding data, 2764 complete tail fin cycles were detected, with an average cycle length of 0.998 seconds. The average difference in the number of sampling points between left and right tail fin swings was 2.1 frames.
[0034] In the wake vortex energy map generation stage, the system reads the wake edge response, local grayscale changes, and wake texture displacement direction from the local visual data of the tail, dividing the tail fin oscillation area into 64 vortex grid units in 8 rows and 8 columns. In the 820th tail fin cycle, the equivalent local vortex energy of vortex grid number 7 is 0.38J, vortex grid number 34 is 1.72J, and vortex grid number 51 is 0.91J. In the local spot occlusion grid generation stage, the airborne visual frame is divided into 16 visual block units in 4 rows and 4 columns. When the brightness value of the same visual block is greater than 245 for 8 consecutive frames, the system generates a saturated continuous record and sets a delayed injection marker. A total of 1286 local spot occlusion records are generated during the inspection cycle, with visual block numbers 6 and 10 accounting for 41.7% of all occlusion records. The marked visual features are written with a delay of 2 tail fin cycles to reduce attitude pseudo-shifts caused by strong reflections.
[0035] During the energy flow half-window spectrum generation stage, the system establishes a tail fin phase rolling window according to the tail fin cycle number and divides it into a left half-window and a right half-window according to the tail fin swing direction. In the 820th tail fin cycle, the propulsion work of the left half-window is 5.84 J, the kinetic energy increment of the left half-window is 3.12 J, and the potential energy increment of the left half-window is 0.46 J. The propulsion work of the right half-window is 5.61 J, the kinetic energy increment of the right half-window is 2.95 J, and the potential energy increment of the right half-window is 0.41 J. The equivalent total wake vortex energy is 4.88 J, the baseline wake vortex energy of the half-window is 2.44 J, the energy consistency residual of the left half-window is -0.18 J, and the energy consistency residual of the right half-window is -0.19 J.
[0036] In the attitude estimation stage, the MHE algorithm reads reliable motion state data, wake vortex energy map, local spot occlusion grid, and energy flow half-window spectrum. Based on the attitude estimation state of the second half-window of the previous tail fin phase rolling window, it generates the initial estimated trajectory for the current window. After solving the left and right half-windows respectively, the boundary of the combined half-window is recorded through midpoint coupling state. In the comparison of attitude estimation modules, the root mean square error of attitude angle of the traditional MHE method is 2.37 degrees, while that of the method of this invention is 0.91 degrees, and the root mean square error of depth is reduced from 0.18m to 0.06m. For 312 water pressure peak segments, the system generates pressure peak markers and freezes the corresponding measurement data. The average water flow disturbance delay is 0.43 tail fin cycles, and the peak value error of attitude angle within the peak segment is reduced from 5.8 degrees in the traditional method to 2.1 degrees.
[0037] In the control generation phase, the Phased LSTM model was improved to read the attitude state vector, visual pseudo-offset suppression records, water flow disturbance delay, and tail fin phase markers. Training data came from 120 historical inspection segments, containing a total of 328,000 samples: 229,600 training samples, 65,600 validation samples, and 32,800 test samples. Samples with a position tracking error less than 0.05m and an attitude angle error less than 1 degree were marked as valid samples, totaling 184,200. The joint optimization objective included four loss terms with weights set to 0.4, 0.3, 0.2, and 0.1, respectively. After 100 training epochs, the mean control bias on the validation set decreased from 0.126 to 0.041, and the mean attitude tracking error decreased from 0.092m to 0.034m.
[0038] In a comparison of overall control methods, the method of this invention and the traditional visual-inertial fusion plus PID control method were applied to the same inspection data. The average attitude angle error of the traditional method was 2.64 degrees, while that of the method of this invention was 0.96 degrees. The average depth error of the traditional method was 0.21m, while that of the method of this invention was 0.07m. The number of visual pseudo-offset triggers in the local light spot occlusion area of the traditional method was 146, while that of the method of this invention was 39. The number of control variable mutations in the water pressure peak area of the traditional method was 82, while that of the method of this invention was 18. The standard deviation of the tail fin oscillation frequency of the traditional method was 0.31Hz, while that of the method of this invention was 0.12Hz. The average lateral offset of the inspection path of the traditional method was 0.38m, while that of the method of this invention was 0.14m. The power consumption for completing a 620m inspection was 18.6Wh for the traditional method and 16.9Wh for the method of this invention. The effective image coverage rate of the traditional method was 84.3%, while that of the method of this invention was 93.8%. The proportion of the attitude-stable inspection segment was 76.5% for the traditional method and 91.7% for the method of this invention. Example 1 shows that the present invention can complete stable attitude estimation and cooperative control command generation in underwater inspection scenarios where tail fin periodic propulsion, local light spot occlusion and hydrodynamic pulse coexist, and achieves quantifiable improvements in attitude accuracy, disturbance resistance, control continuity and energy consumption control.
[0039] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A biomimetic underwater robot motion attitude control optimization method based on AI visual intelligence, characterized in that, include: Collect motion sensing data and perform preprocessing on the motion sensing data to generate reliable motion state data; Based on reliable motion state data, perform tail local visual vortex energy mapping operation and airborne visual spot occlusion marking operation to generate wake vortex energy map and local spot occlusion grid; A caudal fin phase rolling window is constructed based on reliable motion state data. The caudal fin phase rolling window is then split into left and right half-windows to generate an energy flow half-window spectrum. The MHE algorithm is used to generate attitude state vectors, visual pseudo-offset suppression records, and water flow disturbance delays from reliable motion state data, wake vortex energy maps, local spot occlusion grids, and energy flow half-window spectra. An improved Phased LSTM model was constructed, and the attitude state vector, visual pseudo-offset suppression record, water flow disturbance delay and tail fin phase marker were input into the improved Phased LSTM model to generate candidate propulsion control vectors. The candidate propulsion control vector is written into the output consistency residual of the next tail fin phase roll window, and boundary trimming is performed based on the propulsion execution feedback data in the reliable motion state data to generate the final cooperative control command. The final coordinated control command controls the tail fin, pectoral fin, rudder, auxiliary thruster, and buoyancy adjustment unit, and collects multi-source feedback data after execution, which is then fed back to the motion perception data to generate motion attitude control optimization results.
2. The method for optimizing motion posture control of a biomimetic underwater robot based on AI visual intelligence according to claim 1, characterized in that, The motion perception data includes onboard visual data, tail-side local visual data, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, and propulsion execution feedback data of the biomimetic underwater robot.
3. The method for optimizing motion posture control of a biomimetic underwater robot based on AI visual intelligence according to claim 1, characterized in that, The preprocessing of motion sensing data includes time synchronization, coordinate unification, tail fin phase marking, and confidence marking.
4. The method for optimizing motion posture control of a biomimetic underwater robot based on AI visual intelligence according to claim 1, characterized in that, The generation of the wake vortex lattice energy map and the local spot occlusion lattice includes: Read the tail local visual data, airborne visual data, tail fin phase marker, tail fin angle encoding data and confidence marker from the reliable motion state data, extract the acquisition time from the tail local visual data and airborne visual data, and extract the tail fin period number from the tail fin angle encoding data. Extract the tail trail edge response, local grayscale changes, tail trail texture displacement direction and tail fin oscillation area from local visual data of the tail. Divide the tail fin oscillation area into vortex grid units and generate vortex grid numbers. Based on the caudal fin period number, the wake edge response, local grayscale change, and wake texture displacement direction within each vortex cell are statistically analyzed to generate a wake vortex energy map with associated vortex cell number, caudal fin period number, local vortex energy density, and confidence level. Visual block numbers, visual block brightness values, and acquisition times are extracted from airborne visual data to generate visual block brightness records. Based on the visual block brightness records, brightness saturation states, saturation continuity records, and delayed injection markers are generated. By combining the visual block number, acquisition time, brightness saturation state, saturation continuous recording, and delayed injection marker, a local spot occlusion grid is generated.
5. The method for optimizing motion posture control of a biomimetic underwater robot based on AI visual intelligence according to claim 1, characterized in that, The generated energy flow half-window spectrum includes: Read the tail fin phase marker, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, and propulsion execution feedback data from the reliable motion state data; The complete caudal fin cycle is determined based on the caudal fin phase marker and caudal fin angle encoding data, a caudal fin cycle number is generated, and IMU data, depth gauge data, water pressure difference data and propulsion execution feedback data are arranged according to the caudal fin cycle number to generate a caudal fin phase rolling window. According to the swing direction corresponding to the caudal fin phase marker, the caudal fin phase roll window is divided into a left half window and a right half window; The left half-window generates the left half-window propulsion work, the left half-window kinetic energy increment, and the left half-window potential energy increment; the right half-window generates the right half-window propulsion work, the right half-window kinetic energy increment, and the right half-window potential energy increment based on the right half-window. The propulsion work, kinetic energy increment, potential energy increment, propulsion work, kinetic energy increment, and potential energy increment of the left half-window are combined according to the caudal fin period numbering to generate an energy flow half-window spectrum.
6. The method for optimizing motion posture control of a biomimetic underwater robot based on AI visual intelligence according to claim 1, characterized in that, The generated attitude state vector, visual pseudo-offset suppression record, and water flow disturbance delay include: The reliable motion state data, wake vortex energy map, local spot occlusion grid and energy flow half window spectrum are input into the MHE algorithm. The caudal fin phase rolling window, left half window, right half window, caudal fin period number and reliability mark are read. Based on the reliability mark, the reliable motion state data participating in the solution of the MHE algorithm are selected. Based on the attitude estimation state of the rear half window in the previous caudal fin phase rolling window, and the IMU data, depth gauge data and caudal fin angle encoding data in the current caudal fin phase rolling window, the initial estimated trajectory of the current caudal fin phase rolling window is generated. Based on the initial estimated trajectory, the left half-window and the right half-window, the attitude estimation states of the left half-window and the right half-window are generated respectively, and the midpoint coupling state record is generated based on the attitude estimation states of the left half-window and the right half-window. Read the wake vortex lattice energy map and energy flow half-window spectrum, generate energy consistency residuals, and write the energy consistency residuals into the residual term of the objective function of the MHE algorithm; Read the delayed injection markers in the local spot occlusion grid, write the visual features corresponding to the delayed injection markers into the next tail fin phase rolling window, and generate a visual pseudo-offset suppression record; Read water pressure difference data, generate pressure spike markers based on the window mean, window fluctuation amplitude and number of consecutive acquisition frames of water pressure difference data, generate frozen measurement records for the measurement data corresponding to the pressure spike markers, and generate water flow disturbance delay based on the frozen measurement records; The attitude state vector is generated by solving the MHE estimated state based on the midpoint coupling state record, energy consistency residual, visual pseudo-offset suppression record, and water flow disturbance delay.
7. The method for optimizing motion posture control of a biomimetic underwater robot based on AI visual intelligence according to claim 6, characterized in that, The generation of energy consistency residuals includes: Read the vortex grid number, tail fin period number and local vortex energy density in the wake vortex grid energy map, and read the propulsion work, kinetic energy increment, potential energy increment, propulsion work, kinetic energy increment and potential energy increment of the left half window in the energy flow half window spectrum. The wake vortex energy map and the energy flow half-window spectrum are periodically aligned according to the caudal fin period number to generate a half-window energy alignment record. Arrange the local vortex energy densities of each vortex lattice unit within the same caudal fin period to form a wake vortex energy sequence. The energy closure difference of the left half-window is generated based on the propulsion work of the left half-window, the kinetic energy increment of the left half-window, and the potential energy increment of the left half-window; the energy closure difference of the right half-window is generated based on the propulsion work of the right half-window, the kinetic energy increment of the right half-window, and the potential energy increment of the right half-window. The wake vortex energy sequence, the energy closure difference of the left half window, and the energy closure difference of the right half window are associated according to the tail fin period number and half window label to generate energy consistency residuals.
8. The method for optimizing motion posture control of a biomimetic underwater robot based on AI visual intelligence according to claim 1, characterized in that, The generation of candidate propulsion control vectors includes: An improved Phased LSTM model was constructed. The improved Phased LSTM model retains the time gating unit of the Phased LSTM and sets the tail fin phase modulation time gate, hydrodynamic pulse suppression gate, calibration heartbeat restart unit and control readout unit. The caudal fin phase modulation time gate reads the caudal fin phase marker and caudal fin cycle number, identifies the caudal fin swing phase interval corresponding to the current acquisition time, and controls the opening state of the Phased LSTM time gate unit according to the caudal fin swing phase interval to generate a caudal fin phase gate state synchronized with the caudal fin propulsion cycle. The hydrodynamic pulse suppression gate reads water pressure difference data, water flow disturbance delay and pressure spike marker, identifies the instantaneous water pressure change interval within the current caudal fin phase roll window, and reduces the hidden state write intensity corresponding to the instantaneous water pressure change interval to generate a hydrodynamic pulse gating state. The calibration heartbeat restart unit reads the caudal fin cycle number, attitude state vector and visual pseudo-offset suppression record, identifies the attitude drift accumulation state in consecutive caudal fin cycles, and generates a hidden restart marker when the attitude drift accumulation state reaches the restart judgment condition. The Phased LSTM time-gated unit performs time-series state updates on the attitude state vector, visual pseudo-offset suppression record, and water flow disturbance delay based on the tail fin phase-gated state, hydrodynamic pulse-gated state, and latent restart marker, generating a control latent representation processed by tail fin phase synchronization, hydrodynamic pulse suppression, and long-term drift restart. The control readout unit generates candidate propulsion control vectors based on the control latent state representation. The candidate propulsion control vectors include tail fin oscillation amplitude control, tail fin oscillation frequency control, tail fin oscillation phase control, pectoral fin compensation, rudder adjustment, auxiliary thruster output, and buoyancy adjustment. The improved Phased LSTM model is trained by extracting historical effective control vectors from the final cooperative control commands and corresponding attitude tracking errors of the historical control cycles. The control deviation, attitude tracking error, hydrodynamic pulse gating state error, and hidden restart labeling error between the candidate propulsion control vector and the historical effective control vector are used as joint optimization objectives to iteratively update the parameters of the improved Phased LSTM model, resulting in the trained improved Phased LSTM model.
9. The method for optimizing motion posture control of a biomimetic underwater robot based on AI visual intelligence according to claim 1, characterized in that, The generation of the final cooperative control command includes: Read the candidate propulsion control vector, the next tail fin phase roll window, the attitude state vector, and the propulsion execution feedback data, and extract the execution boundary data and acquisition time from the propulsion execution feedback data; Write the candidate propulsion control vector into the next tail fin phase roll window, and generate an output consistency residual based on the current attitude state vector and the next tail fin phase roll window after writing the candidate propulsion control vector; Control consistency correction records are generated based on output consistency residuals, and these records are associated with candidate propulsion control vectors. Based on the execution boundary data, perform boundary pruning on the candidate propulsion control vectors to generate pruned control vectors; The final coordinated control command is generated by combining the trimmed control vector, control consistency correction record, tail fin cycle number, and acquisition time.
10. The method for optimizing motion posture control of a biomimetic underwater robot based on AI visual intelligence according to claim 1, characterized in that, The generated motion attitude control optimization results include: Read the final coordinated control command and send it to the tail fin, pectoral fin, rudder, auxiliary thruster and buoyancy adjustment unit; After collecting and executing the final coordinated control command, the system collects airborne visual data, IMU data, depth gauge data, water pressure difference data, tail fin angle encoding data, and propulsion execution feedback data to generate multi-source feedback data after execution. The attitude tracking error is generated based on the multi-source feedback data and attitude state vector after execution, and the attitude tracking error is associated with the final cooperative control command to generate a control cycle feedback record. The control cycle feedback record is written into the motion sensing data, and the reliable motion state data is updated according to the caudal fin cycle number and the acquisition time. The final coordinated control command, attitude tracking error, visual pseudo-offset suppression record, water flow disturbance delay, and control cycle feedback record are combined to generate motion attitude control optimization results.