Control Method for Cable for Unmanned Ship Charging Based on Visual Recognition
By analyzing the attitude changes and water surface disturbance factors of the unmanned ship, predicting the position changes of the charging interface, and planning and adjusting the cable path in real time, the docking accuracy and stability of the unmanned ship charging system in complex sea surface environments is solved, and efficient and safe automatic charging is achieved.
Patent Information
- Application Number
- CN202510649158.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-05-20
AI Technical Summary
In the sea surface environment with fluctuating waves and changing wind speeds, visual recognition technology is difficult to accurately identify the charging interface, resulting in cable connector docking offset or connection failure, affecting the reliability and practicality of automatic charging.
By collecting continuous image frames of the charging area of the unmanned ship, identifying the spatial displacement and inclination angle changes of the unmanned ship, analyzing the periodic and nonlinear offsets of the waves to the attitude, calculating the water surface disturbance factor, predicting the position changes of the charging interface, planning the docking path between the cable and the charging interface, and adjusting the compensation path in real time, generating cable propulsion instructions to ensure docking accuracy.
It significantly improves the accuracy of charging interface identification and the accuracy of cable connectors, enhances the stability and robustness of the charging system, reduces equipment wear, improves the success rate and efficiency of charging operations, and ensures safety.
Smart Images

Figure CN120171326B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a control method for a cable used for charging an unmanned boat based on visual recognition. Background Art
[0002] In the prior art, unmanned boats often face the problem of insufficient endurance during operation at sea and usually rely on charging boats or shore-based equipment for energy replenishment. The existing replenishment methods mainly use manual operation to connect cables to complete the charging operation. However, in the sea surface environment with fluctuating waves and variable wind speeds, manual operation is difficult, especially when it is necessary to accurately dock the cable connector with the charging interface of the unmanned boat. This process is not only time-consuming and laborious but also has a high safety risk.
[0003] Some existing systems have introduced an auxiliary system based on visual recognition technology, which uses cameras, image sensors, and image processing algorithms to identify the position of the unmanned boat and the charging port mark to achieve autonomous guidance control of the cable connector. However, in a fluctuating water surface environment, the system based on visual recognition still has significant technical defects in terms of recognition accuracy and control stability. For example, when the waves cause frequent changes in the attitude of the unmanned boat, it is difficult for the visual system to continuously and stably identify the exact position of the charging interface, which easily leads to offset or connection failure of the connector docking, affecting the reliability and practicality of automatic charging. Summary of the Invention
[0004] The purpose of the present invention is to provide a control method for a cable used for charging an unmanned boat based on visual recognition, aiming to solve the problems mentioned in the background art.
[0005] To solve the above technical problems, the technical solution of the present invention is as follows:
[0006] A control method for a cable used for charging an unmanned boat based on visual recognition, the method includes:
[0007] Collect continuous image frames in the charging area of the unmanned boat to obtain original frame sequence data, and perform temporal image analysis on it to identify the spatial displacement and tilt angle change of the unmanned boat, and obtain an attitude trajectory data set;
[0008] According to the attitude trajectory data set, analyze the periodic and non-linear attitude offsets generated by the waves on the attitude of the unmanned boat, and calculate the water surface disturbance factor;
[0009] Through geometric positioning of the current image frame, identify the position of the charging interface to obtain initial positioning coordinate data;
[0010] According to the water surface disturbance factor and the initial positioning coordinate data, perform predictive analysis on the disturbance trend within a preset time window, predict the position change range of the charging interface, and obtain predicted coordinate data;
[0011] According to the predicted coordinate data, plan the path for the cable to dock with the charging interface, compensate for the attitude offset of the unmanned ship caused by sea waves, and obtain a compensated path sequence;
[0012] Generate a cable propulsion command based on the compensated path sequence, and collect images of the charging interface area to obtain path tracking image data;
[0013] Judge whether the docking of the charging interface is successful according to the path tracking image data. When the result is negative, dynamically correct the compensated path sequence.
[0014] Furthermore, collect continuous image frames of the charging area of the unmanned ship to obtain the original frame sequence data, and perform temporal image analysis on it to identify the spatial displacement and tilt angle change of the unmanned ship, and obtain an attitude trajectory data set, including:
[0015] Enhance the edge contours of the original frame sequence data, extract the outer contour features of the unmanned ship and the feature points of the charging area, and obtain a continuous frame feature data set;
[0016] Track the outer contour features of the unmanned ship according to the continuous frame feature data set, identify the motion trend of the unmanned ship on the time axis, and obtain a set of time curves;
[0017] Calculate the first derivative of each curve in the set of time curves to extract the spatial displacement change and tilt angle change respectively, and obtain an attitude change data set;
[0018] Merge the attitude changes of the unmanned ship in chronological order according to the attitude change data set, draw the three-dimensional attitude trajectory of the unmanned ship, and obtain an attitude trajectory data set.
[0019] Furthermore, according to the attitude trajectory data set, analyze the periodic and non-linear attitude offsets of the sea waves on the attitude of the unmanned ship, and calculate the water surface disturbance factor, including:
[0020] Normalize the tilt angle change of the unmanned ship according to the attitude trajectory data set to obtain a standardized tilt data sequence, and perform frequency transformation on it to obtain a frequency distribution map;
[0021] Extract the main frequency points with amplitudes greater than the preset amplitude from the frequency distribution map, and record the frequencies and frequency domain amplitudes of the main frequency points to obtain a main frequency point data set;
[0022] Analyze the time continuity of the periodic changes of the main frequency points according to the main frequency point data set to obtain the period change length and period change rate;
[0023] Determine the periodic characteristics of the attitude changes of the unmanned ship according to the frequencies, frequency domain amplitudes, period change lengths and period change rates of the main frequency points, and obtain periodic attitude offset data.
[0024] Further, based on the attitude trajectory dataset, analyze the periodic and non-linear attitude offsets generated by ocean waves on the unmanned ship, and calculate the water surface disturbance factor, further including:
[0025] Construct a gradient change sequence of the tilt angle according to the change rate of the tilt angle in the time axis in the attitude trajectory dataset;
[0026] Perform differential calculation on the gradient change sequence of the tilt angle to obtain the instantaneous change rate, and identify the abnormal change points where the instantaneous change rate exceeds three standard deviations of the average change rate, to obtain the set of mutation points;
[0027] According to the set of mutation points, merge adjacent mutation points into the same disturbance segment, and extract the maximum tilt amplitude, fluctuation duration, and change direction for each disturbance segment to obtain the non-linear attitude offset data;
[0028] Analyze the disturbance effect of seawater on the unmanned ship based on the periodic attitude offset data and the non-linear attitude offset data, and calculate the water surface disturbance factor.
[0029] Further, analyze the disturbance effect of seawater on the unmanned ship based on the periodic attitude offset data and the non-linear attitude offset data, and calculate the water surface disturbance factor, including:
[0030] Obtain the periodic disturbance feature vector group according to the frequency, frequency domain amplitude, and period change length of the main frequency points in the periodic attitude offset data, and obtain the non-linear disturbance feature vector group according to the maximum tilt amplitude, fluctuation duration, and change direction in the non-linear attitude offset data;
[0031] Perform dimensional normalization on the periodic disturbance feature vector group and the non-linear disturbance feature vector group, and merge them into a composite disturbance feature matrix;
[0032] According to the composite disturbance feature matrix, calculate the periodic disturbance angular rate and the non-linear disturbance average tilt angular rate to obtain the disturbance enhancement term; calculate the absolute difference between the periodic disturbance rate density and the non-linear disturbance slope, and suppress it to obtain the disturbance constraint term; calculate the direction adjustment term through the non-linear attitude offset direction and the maximum tilt amplitude;
[0033] Fuse the disturbance enhancement term, the disturbance constraint term, and the direction adjustment term to obtain the water surface disturbance factor.
[0034] Further, based on the water surface disturbance factor and the initial positioning coordinate data, perform predictive analysis on the disturbance trend within a preset time window, predict the position change range of the charging interface, and obtain the predicted coordinate data, including:
[0035] Extract the displacement direction, displacement speed, and displacement amplitude of the unmanned ship affected by seawater based on the water surface disturbance factor to obtain a three-dimensional disturbance vector sequence;
[0036] Based on the initial positioning coordinate data, superimpose each group of disturbance components in the three-dimensional disturbance vector sequence respectively to obtain disturbance offset coordinate data;
[0037] By arranging the disturbance offset coordinates, construct a disturbance trajectory coordinate set in chronological order;
[0038] Through the spatial boundary fitting operation on the disturbance trajectory coordinate set, form a closed area containing all trajectory points;
[0039] According to the centroid trajectory of the closed area, perform interpolation smoothing to obtain predicted coordinate data.
[0040] Furthermore, through the spatial boundary fitting operation on the disturbance trajectory coordinate set, form a closed area containing all trajectory points, including:
[0041] According to the disturbance trajectory coordinate set, number all trajectory points in chronological order to construct a three-dimensional discrete point set;
[0042] Through the hierarchical projection of the three-dimensional discrete point set in the coordinate axis direction, extract the edge envelope points in each layer to obtain envelope point data, and perform polygon fitting on it to obtain the in-layer boundary contour line;
[0043] According to the in-layer boundary contour lines between adjacent layers, perform a closed envelope transition from the bottom to the top to establish an interpolation surface;
[0044] Connect all the interpolation surfaces to form an overall spatial boundary surface to obtain a closed area.
[0045] Furthermore, according to the predicted coordinate data, plan the path for the cable to dock with the charging interface, compensate for the attitude offset of the unmanned ship caused by the waves, and obtain a compensation path sequence, including:
[0046] According to the predicted coordinate data, establish a path search area in three-dimensional space, and use the current spatial position of the cable end and the predicted coordinates as the search start and end points to obtain a path node grid;
[0047] According to the path node grid, determine multiple passing paths to obtain an initial path set, and calculate the path stability of each passing path;
[0048] By identifying the passing paths with path stability higher than the preset stability and performing direction change analysis on them, eliminate the passing paths with sharp turns to obtain a candidate path set;
[0049] According to the candidate path set, extract the two candidate paths with the highest stability and perform coordinate fusion on them to obtain a comprehensive path curve;
[0050] According to the comprehensive path curve, determine a sequence of path control points at fixed distance intervals to obtain a compensated path sequence.
[0051] Furthermore, according to the path node grid, determine multiple passing paths to obtain an initial path set, and calculate the path stability of each passing path among them, including:
[0052] According to the passing path, extract the coordinates and quantities of the nodes that make up the passing path to obtain path data;
[0053] According to the path data, calculate the bending degree of the turning angle in the passing path to obtain a turning fluctuation term;
[0054] According to the path data, calculate the total length of the passing path and measure the jitter degree of the passing path to obtain a length deviation term;
[0055] According to the path data and the predicted coordinate data, calculate the concentration degree of the passing path to the center point of the predicted coordinates to obtain a center convergence term;
[0056] Fuse the turning fluctuation term, the length deviation term, and the center convergence term to obtain the path stability.
[0057] Furthermore, according to the path tracking image data, judge whether the charging interface docking is successful. When the result is no, dynamically correct the compensated path sequence, including:
[0058] According to the relative spatial position between the charging interface and the end of the compensated path in the path tracking image data, calculate the docking offset distance between the end control point and the center point of the interface to obtain docking offset data;
[0059] Compare the docking offset data with a preset docking offset range. When the docking offset distance exceeds the preset docking offset range, it is judged that the docking fails;
[0060] By performing error backpropagation on the control point sequence at the end of the compensated path, calculate the adjustment vector of each end control point to obtain an end correction vector group;
[0061] According to the end correction vector group, update the coordinates of the end segment in the compensated path to obtain a corrected end path segment;
[0062] Perform a path fusion operation on the corrected end path segment and the compensated path to obtain a corrected compensated path sequence.
[0063] The above solution of the present invention has at least the following beneficial effects:
[0064] The present invention collects continuous image frames of the unmanned ship charging area and performs time-series image analysis, so as to obtain the spatial displacement and tilt angle change of the unmanned ship in real time, thereby establishing a complete attitude trajectory data set. Based on the attitude trajectory data set, it is possible to accurately identify the attitude change trend caused by external disturbances such as waves and currents, and further combine the initial positioning coordinate data obtained by geometric positioning to effectively predict the position change trend of the unmanned ship charging interface in combination with the water surface disturbance factor. Since the dynamic prediction of the disturbance factor is superimposed on the image analysis, the system can adjust the recognition strategy in advance for the impending position offset of the unmanned ship, and avoid the misjudgment of the interface position due to recognition lag, thereby significantly improving the accuracy of charging interface recognition, and providing a reliable data basis for subsequent path planning and cable advancement.
[0065] The present invention can plan the cable docking path in advance based on the predicted coordinate data. The path is not only generated according to the current interface position, but also dynamically compensated in combination with the possible change range of the charging interface within a certain time window in the future, thereby forming a compensation path sequence. On this basis, the cable propulsion action is strictly controlled according to the compensation path, effectively offsetting the influence of the unmanned ship posture deviation caused by disturbances such as waves on the docking operation. The dynamic compensation mechanism ensures that the cable propulsion process has strong environmental adaptability. Even in a complex and unpredictable sea environment, the docking strategy can be adjusted through real-time compensation, thereby greatly improving the continuity and success rate of the charging operation.
[0066] The present invention dynamically generates cable propulsion instructions through a compensation path sequence after comprehensive prediction, rather than directly based on a single static coordinate point. Since the compensation path takes into account the periodic and nonlinear changes in the posture of the unmanned ship, the propulsion instructions are closely fitted to the predicted motion trajectory of the charging interface at every moment. In this way, the cable connector can always maintain continuous tracking and dynamic alignment with the charging interface during the propulsion process, avoiding problems such as contact offset and connection failure caused by traditional static propulsion, thereby significantly improving the accuracy of the cable connector propulsion and enhancing the execution stability and robustness of the entire charging system.
[0067] The present invention completes the planning of the compensation path before the cable is advanced through posture trajectory tracking and water surface disturbance prediction, and corrects the path in real time in combination with the path tracking image data during the advancement process. Frequent docking failures between the cable connector and the charging interface not only prolong the operation time, but also easily cause damage or even breakage of the cable, increasing the operation risk. Therefore, the spatial relative movement of the cable connector and the charging interface during the entire advancement process is precisely controlled, avoiding large angle errors and high-frequency vibrations, reducing physical impacts and equipment wear, significantly improving the safety of the charging process and the reliability of the connector and interface components, and extending the service life of the equipment.
[0068] Through preprocessing attitude changes, predicting disturbance trends, planning, and dynamically adjusting the compensation path, the present invention ensures that the cable propulsion can always accurately dock with the charging interface. Since each step is executed based on real-time image data and dynamic prediction information, it can effectively avoid docking failures caused by sudden disturbances or drastic attitude changes. Compared with traditional charging methods that rely on fixed paths or static control strategies, it greatly improves the first success rate of docking, reduces the time for repeated adjustments and redocking, significantly shortens the total duration of the charging operation, overall improves the execution efficiency of the charging task, and ensures that the unmanned ship can quickly resume the operation state. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 is a flowchart of a control method for a cable used in charging an unmanned ship based on visual recognition provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0070] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0071] As Figure 1 shown, an embodiment of the present invention proposes a control method for a cable used in charging an unmanned ship based on visual recognition, and the method includes:
[0072] Collect continuous image frames of the charging area of the unmanned ship to obtain the original frame sequence data, and perform temporal image analysis on it to identify the spatial displacement and tilt angle change of the unmanned ship, and obtain the attitude trajectory data set;
[0073] According to the attitude trajectory data set, analyze the periodic and non-linear attitude offsets generated by the waves on the attitude of the unmanned ship, and calculate the water surface disturbance factor;
[0074] Identify the position of the charging interface by performing geometric positioning on the current image frame to obtain the initial positioning coordinate data;
[0075] According to the water surface disturbance factor and the initial positioning coordinate data, perform a predictive analysis on the disturbance trend within a preset time window, predict the position change range of the charging interface, and obtain the predicted coordinate data;
[0076] According to the predicted coordinate data, plan the path for the cable to dock with the charging interface, and compensate for the attitude offset of the unmanned ship caused by the waves to obtain the compensation path sequence;
[0077] Generate a cable propulsion instruction according to the compensation path sequence, and collect an image of the charging interface area to obtain path tracking image data;
[0078] Judge whether the charging interface is successfully docked according to the path tracking image data. When the result is no, dynamically correct the compensation path sequence.
[0079] In the embodiment of the present invention, continuous image frames of the unmanned ship charging area are collected to obtain original frame sequence data, and temporal image analysis is performed on it to identify the spatial displacement and tilt angle change of the unmanned ship, and an attitude trajectory data set is obtained. By accurately identifying the displacement and attitude change of the unmanned ship in a dynamic environment, not only can the real-time spatial relationship between the unmanned ship and the charging interface be grasped, but also the dynamic response characteristics of the unmanned ship after being disturbed by the sea wave can be systematically reflected; according to the attitude trajectory data set, analyze the periodic and non-linear attitude offset generated by the sea wave on the unmanned ship attitude, calculate the water surface disturbance factor, and by quantifying the influence of the sea wave on the unmanned ship attitude change, the system can deduce in advance the possible offset characteristics of the charging interface in a future period of time, so as to provide a scientific basis for dynamic compensation and significantly enhance the adaptability of the system to complex sea conditions; by geometrically positioning the current image frame, identify the position of the charging interface to obtain initial positioning coordinate data. Through high-precision visual positioning means, the spatial position of the charging interface can be quickly and accurately determined under the continuous shaking of the unmanned ship.
[0080] Predict and analyze the disturbance trend within a preset time window according to the water surface disturbance factor and the initial positioning coordinate data, predict the position change range of the charging interface to obtain predicted coordinate data. By predicting in advance the position change range of the charging interface in the future time period, the system can effectively avoid the path deviation caused by judging based on the position at a single moment; according to the predicted coordinate data, plan the path for the cable to dock with the charging interface, compensate for the attitude offset of the unmanned ship caused by the sea wave to obtain a compensation path sequence. By generating a compensation path through a comprehensive disturbance prediction and path optimization algorithm, not only the dynamic adjustment of the cable connector propulsion direction is realized, but also the movement and tilt of the unmanned ship caused by the sea wave can be actively compensated, thus greatly reducing the risk of the path deviating from the charging interface; generate a cable propulsion instruction according to the compensation path sequence, and collect an image of the charging interface area to obtain path tracking image data, ensuring the real-time synchronization and fast response between the propulsion action and the dynamic change of the environment, and greatly improving the robustness of the cable propulsion stage and the success rate of charging docking; judge whether the charging interface is successfully docked according to the path tracking image data. When the result is no, dynamically correct the compensation path sequence. Through the real-time path tracking and dynamic correction mechanism, even if a small path deviation occurs during the cable propulsion process, it can be corrected in time and the docking can be completed, ensuring the high fault tolerance and strong stability of the docking process.
[0081] Among them, by geometrically locating the current image frame, the position of the charging interface is identified to obtain the initial positioning coordinate data, specifically including:
[0082] First, preprocessing operations are performed on the current image frame, including but not limited to grayscale processing, noise filtering, and image enhancement processing. The image information is simplified through grayscale processing to reduce the processing complexity; random noise in the image is removed by methods such as Gaussian filtering or median filtering to enhance the clarity of the contour features; the edge enhancement algorithm is used to highlight the areas with obvious contour changes in the image, laying a foundation for subsequent charging interface feature extraction. Subsequently, the system performs a regional scan on the current frame to determine the candidate region box of the charging interface in the image frame, including the approximate position, size, and confidence score of the interface. The system filters out the most reliable candidate region according to the set confidence threshold as the object for subsequent geometric positioning analysis.
[0083] After the candidate region is determined, shape analysis and template matching techniques are further used to refine the position of the charging interface. By analyzing the spatial distribution characteristics of the contour points in the candidate region, the contour boundary that conforms to the expected geometric features of the charging interface is extracted. For example, a circular interface can be identified using the Hough circle detection algorithm, and a rectangular interface is confirmed using edge straight line fitting and corner detection methods. After identifying the contour structure that meets the requirements, the system calculates the pixel-level two-dimensional position coordinates of the charging interface in the current image frame according to the coordinates of the contour geometric center or the interface marker point.
[0084] In order to map the pixel position in the image plane to the three-dimensional actual space coordinate system, the system performs a coordinate transformation from pixels to three-dimensional space based on the internal parameters of the camera such as focal length, principal point position, distortion coefficient, etc., and the external parameters such as the relative position relationship between the camera and the world coordinate system. The perspective projection inverse transformation model is used to restore the image coordinates to three-dimensional world coordinates, and the coordinate correction is performed in combination with the attitude parameters of the unmanned ship at the current moment, so as to obtain the initial positioning coordinate data of the charging interface in the world coordinate system.
[0085] Among them, according to the compensation path sequence, a cable propulsion instruction is generated, and an image of the charging interface area is collected to obtain the path tracking image data, specifically including:
[0086] First, based on the three-dimensional coordinate information of each control point in the path, the system analyzes the spatial displacement relationship between each adjacent control point, calculates the propulsion vector and propulsion distance for each segment. According to the direction information and propulsion distance of the propulsion vector, combined with the spatial attitude parameters of the current cable end, including the cable front orientation angle and spatial position, a distributed propulsion instruction sequence is generated through a motion control algorithm. Each propulsion instruction clearly includes the propulsion direction, propulsion speed, propulsion step size, and propulsion termination condition. Among them, the propulsion speed is dynamically adjusted according to the path curvature and interface stability requirements to ensure the stability and followability of the cable end during the docking process, and at the same time avoid contact shock or path deviation caused by too fast propulsion speed.
[0087] During the cable propulsion process, the system synchronously enables the image acquisition program in the charging interface area, controls the camera deployed near the end or at an external auxiliary position to continuously capture real-time images of the current docking area at a fixed frame rate. The collected path tracking image data is preprocessed, including denoising, normalization, and enhancement processing, and then input into the image tracking module for feature recognition and position verification, mainly used to identify the real-time spatial relationship between the cable end and the charging interface. Through continuous image frame analysis, the actual execution trajectory of the cable propulsion path can be extracted, the propulsion process can be evaluated in real time whether it deviates from the compensation path, and it can be judged whether the charging interface enters the docking range.
[0088] During the propulsion process, if the path tracking image data shows that there is a significant deviation between the cable end and the preset trajectory of the compensation path, or the position of the charging interface changes due to sudden disturbances, the system dynamically updates the propulsion instruction according to the path tracking result, and immediately fine-tunes the cable propulsion direction or speed to ensure that the cable end always advances stably along the optimal compensation path and finally accurately docks to the center position of the charging interface.
[0089] In a preferred embodiment of the present invention, continuous image frames of the unmanned ship charging area are collected to obtain the original frame sequence data, and temporal image analysis is performed on it to identify the spatial displacement and tilt angle changes of the unmanned ship, and an attitude trajectory data set is obtained, including:
[0090] By performing edge contour enhancement on the original frame sequence data, the outer contour features of the unmanned ship and the feature points of the charging area are extracted to obtain a continuous frame feature data set;
[0091] According to the continuous frame feature data set, the outer contour features of the unmanned ship are tracked to identify the motion trend of the unmanned ship on the time axis, and a time curve group is obtained;
[0092] By calculating the first derivative of each curve in the time curve group, the spatial displacement change amount and tilt angle change amount are respectively extracted to obtain an attitude change data set;
[0093] According to the attitude change data set, the attitude changes of the unmanned ship are merged in chronological order, and the three-dimensional attitude trajectory of the unmanned ship is drawn to obtain the attitude trajectory data set.
[0094] In the embodiment of the present invention, by performing edge contour enhancement on the original frame sequence data, the outer contour features of the unmanned ship and the feature points of the charging area are extracted to obtain a continuous frame feature data set. Through edge contour enhancement and feature point extraction, the important structural features of the unmanned ship and the charging area are effectively highlighted, and the interference of irrelevant backgrounds is weakened; according to the continuous frame feature data set, the outer contour features of the unmanned ship are tracked to identify the movement trend of the unmanned ship on the time axis, and a time curve group is obtained. The time curve group established through continuous frame feature tracking can completely describe the trajectory change details during the movement of the unmanned ship in the charging area; by calculating the first-order derivative of each curve in the time curve group, the spatial displacement change amount and the tilt angle change amount are respectively extracted to obtain the attitude change data set, which can accurately quantify the displacement trend and tilt trend of the unmanned ship on a tiny time scale, so as to carefully capture the continuous dynamic change characteristics under the influence of sea wave disturbance; according to the attitude change data set, the attitude changes of the unmanned ship are merged in chronological order, and the three-dimensional attitude trajectory of the unmanned ship is drawn to obtain the attitude trajectory data set, which can intuitively and accurately reflect the movement mode and attitude change trend of the unmanned ship when it is affected by external disturbances in the charging area.
[0095] Among them, according to the continuous frame feature data set, the outer contour features of the unmanned ship are tracked to identify the movement trend of the unmanned ship on the time axis, and a time curve group is obtained, specifically including:
[0096] In the continuous image frames, the extracted outer contour feature points of the unmanned ship are tracked frame by frame through a feature point matching algorithm such as KLT optical flow tracking. To ensure the stability of the matching results, a method based on random sample consensus is introduced to eliminate abnormal matches. The chronological position changes of each feature point are recorded as a time curve, and multiple time curve groups corresponding to different contour parts are formed, arranged in chronological order and synchronized to a unified time reference to obtain the time curve group.
[0097] Among them, according to the attitude change data set, the attitude changes of the unmanned ship are merged in chronological order, and the three-dimensional attitude trajectory of the unmanned ship is drawn to obtain the attitude trajectory data set, specifically including:
[0098] Synchronously integrate the spatial displacement change and tilt angle change extracted from each feature point in chronological order to construct the attitude change curve of the unmanned ship in three-dimensional space. By fusing the position data of different feature points, for example, assigning higher weights to the feature points in the charging interface area, a unified attitude change path is formed. Finally, use three-dimensional coordinates to draw the attitude trajectory map of the unmanned ship, obtain a complete attitude trajectory data set, and make the trajectory smoother through spline curve interpolation to avoid the problem of discontinuous trajectory caused by discrete points.
[0099] In a preferred embodiment of the present invention, according to the attitude trajectory data set, analyze the periodic and non-linear attitude offsets generated by the waves on the attitude of the unmanned ship, and calculate the water surface disturbance factor, including:
[0100] Normalize the tilt angle change of the unmanned ship according to the attitude trajectory data set to obtain a standardized tilt data sequence, and perform frequency transformation on it to obtain a frequency distribution spectrum;
[0101] According to the frequency distribution spectrum, extract the main frequency points with amplitudes greater than the preset amplitude, and record the frequencies and frequency domain amplitudes of the main frequency points to obtain a main frequency point data set;
[0102] According to the main frequency point data set, analyze the time continuity of the periodic changes of the main frequency points to obtain the period change length and period change rate;
[0103] According to the frequencies, frequency domain amplitudes, period change lengths and period change rates of the main frequency points, determine the periodic characteristics of the attitude change of the unmanned ship to obtain periodic attitude offset data.
[0104] In the embodiments of the present invention, according to the attitude trajectory data set, the change amount of the tilt angle of the unmanned ship is normalized to obtain a standardized tilt data sequence, and frequency transformation is performed on it to obtain a frequency distribution map. Through frequency transformation, the periodic fluctuation characteristics hidden in the attitude change of the unmanned ship can be clearly revealed; according to the frequency distribution map, the main frequency points with amplitudes greater than the preset amplitude are extracted, and the frequencies and frequency domain amplitudes of the main frequency points are recorded to obtain a main frequency point data set, which can accurately screen out the frequency components that play a dominant role in the attitude change of the unmanned ship, thereby avoiding interference from irrelevant information such as low-energy and stray noise; according to the main frequency point data set, the time continuity of the periodic change of the main frequency point is analyzed to obtain the cycle change length and the cycle change rate. The cycle change length reflects the stability of the disturbance characteristics, while the cycle change rate describes the dynamic change trend of the disturbance characteristics. Through these two indicators, the regularity and change intensity of the sea wave's disturbance to the unmanned ship's attitude can be further judged; according to the frequency, frequency domain amplitude, cycle change length and cycle change rate of the main frequency point, the periodic characteristics of the unmanned ship's attitude change are determined to obtain periodic attitude offset data. By comprehensively and accurately grasping the periodic characteristics, it is helpful to achieve early correction for periodic disturbances in the compensation path planning, and improve the adaptability and prediction accuracy of the overall control system to the periodic fluctuation environment.
[0105] Among them, according to the attitude trajectory data set, the change amount of the tilt angle of the unmanned ship is normalized to obtain a standardized tilt data sequence, and frequency transformation is performed on it to obtain a frequency distribution map, specifically including:
[0106] After the acquisition of the attitude trajectory data set is completed, first, the change amount data of the tilt angle at each moment is extracted. The tilt angle can include the pitch angle, roll angle and yaw angle. In order to eliminate the differences between unmanned ships of different ship types and different scales, it is necessary to normalize the change amount of the tilt angle. Specifically, for each item of tilt angle data, the min-max normalization method is used to process it into a standardized tilt data sequence within a unified range, such as [-1, 1]. After obtaining the standardized tilt data sequence, the fast Fourier transform method is used to perform frequency domain conversion on the tilt data. Through frequency transformation, the original time domain data is mapped to the frequency domain to generate a frequency distribution map. The abscissa of the frequency distribution map is the frequency, and the ordinate is the frequency domain amplitude, which can intuitively reflect the energy distribution of different frequency components in the attitude change of the unmanned ship.
[0107] Among them, according to the main frequency point data set, the time continuity of the periodic change of the main frequency point is analyzed to obtain the cycle change length and the cycle change rate, specifically including:
[0108] After completing the extraction of the main frequency point data set, first of all, for each main frequency point corresponding to the frequency value, reverse locate its contribution time period from the standardized tilt data sequence. Specifically, through frequency inversion technology, such as short-time Fourier transform, the standardized tilt data sequence is subjected to local frequency energy analysis with a certain sliding time window. Through this local transformation, the time period with significant main frequency point energy can be accurately marked on the time axis, that is, the continuous time segment where the main frequency point is active can be detected.
[0109] In each time segment, calculate the continuous duration of the main frequency amplitude exceeding the set energy threshold, such as 60% of the overall maximum amplitude, and record the duration as a time length as the basic data of the periodic variation length. At the same time, in order to enhance the robustness, if there is a short-term drop in amplitude but a rapid recovery, a minimum break time threshold can be set, such as energy drops within 2 frames are regarded as the same continuous segment to avoid misjudgment of period interruption due to slight fluctuations, thereby ensuring continuous and reliable measurement of periodic variation length.
[0110] After determining the length of the periodic variation, the amplitude variation trend of the main frequency point within each periodic active segment is further fitted. The linear regression method is used to fit the curve of the main frequency point amplitude variation over time. According to the slope of the fitting curve, the rate of change of the main frequency point amplitude is quantified to obtain the periodic variation rate. If the amplitude shows an increasing trend, the periodic variation rate is positive, otherwise it is negative. The larger the value of the periodic variation rate, the more drastic the change of the periodic disturbance characteristics over time.
[0111] In a preferred embodiment of the present invention, according to the attitude trajectory data set, analyzing the periodicity and nonlinear attitude deviation caused by the waves on the attitude of the unmanned ship, and calculating the water surface disturbance factor, it also includes:
[0112] According to the changing rate of the tilt angle on the time axis in the posture trajectory data set, a tilt angle gradient change sequence is constructed;
[0113] By performing differential calculation on the tilt angle gradient change sequence, the instantaneous change rate is obtained, and the abnormal change points where the instantaneous change rate exceeds three times the standard deviation of the average change rate are identified to obtain the mutation point set;
[0114] According to the mutation point set, adjacent mutation points are merged into the same disturbance segment, and the maximum tilt amplitude, fluctuation duration and change direction of each disturbance segment are extracted to obtain nonlinear attitude deviation data;
[0115] According to the periodic attitude deviation data and nonlinear attitude deviation data, the disturbance effect of seawater on the unmanned ship is analyzed and the water surface disturbance factor is calculated.
[0116] In the embodiments of the present invention, according to the change rate of the tilt angle on the time axis in the attitude trajectory dataset, a tilt angle gradient change sequence is constructed, which can extract the attitude change speed characteristics of the unmanned ship within a continuous time period from the original attitude changes; by performing differential calculation on the tilt angle gradient change sequence, an instantaneous change rate is obtained, and abnormal change points where the instantaneous change rate exceeds three standard deviations of the average change rate are identified to obtain a set of mutation points, effectively identifying the moment of attitude mutation caused by external sudden disturbances in the attitude change of the unmanned ship, eliminating normal small oscillations, and avoiding misjudgment; according to the set of mutation points, adjacent mutation points are merged into the same disturbance segment, and the maximum tilt amplitude, fluctuation duration, and change direction are extracted for each disturbance segment to obtain non-linear attitude offset data, which can not only accurately describe the intensity, action period, and trend direction of sudden disturbances, but also provide a detailed data basis for subsequent quantification and classification of disturbance characteristics; according to the periodic attitude offset data and non-linear attitude offset data, the disturbance influence of seawater on the unmanned ship is analyzed, and the water surface disturbance factor is calculated, which not only retains the dominant characteristics of the influence of the periodic change of sea waves on the attitude of the unmanned ship, but also takes into account the influence of sudden drastic changes on the stability of the charging interface position, greatly improving the comprehensiveness and accuracy of the water surface disturbance factor.
[0117] Among them, according to the set of mutation points, adjacent mutation points are merged into the same disturbance segment, and the maximum tilt amplitude, fluctuation duration, and change direction are extracted for each disturbance segment to obtain non-linear attitude offset data, which specifically includes:
[0118] First, all mutation points need to be sorted in the order of the time axis to ensure that subsequent segment division can be carried out according to time continuity. After sorting, each mutation point in the set of mutation points is traversed in turn to determine whether the time interval between two adjacent mutation points is less than the set maximum segment time window threshold. Usually, this threshold is preset according to the attitude change characteristics of the unmanned ship and the sampling frequency. For example, it is set as the change within 3 consecutive seconds. If the time interval between two adjacent mutation points is less than this threshold, these two mutation points are classified into the same disturbance segment, otherwise they are classified into different disturbance segments. According to this rule, the segment merging of all mutation points is completed to obtain several independent disturbance segment sets.
[0119] After the disturbance segments are divided, for each independent disturbance segment, extract the sequence of tilt angle change data it contains. First, scan all the tilt angle values within the time range of this segment to determine the maximum amplitude of the tilt angle change during the entire segment, that is, select the difference between the two moments with the largest absolute value change of the tilt angle as the maximum tilt amplitude. At the same time, record the start time and end time of the tilt angle change process, and the time difference between the two is the fluctuation duration, which is used to characterize the time length of the continuous influence of this non-linear disturbance event on the attitude change of the unmanned ship. Judge according to the sign of the tilt angle change, that is, the positive and negative directions. If the tilt angle value increases as a whole over time, it is defined as a positive direction fluctuation such as a right tilt, and if it decreases as a whole, it is defined as a negative direction fluctuation such as a left tilt, so as to determine the change direction.
[0120] Unify and organize the maximum tilt amplitude, fluctuation duration, and change direction extracted from each disturbance segment into a set of non-linear attitude offset data, which provides necessary basic data support for further generating the water surface disturbance factor by fusing the periodic attitude offset characteristics.
[0121] In a preferred embodiment of the present invention, analyze the disturbance effect of seawater on the unmanned ship according to the periodic attitude offset data and the non-linear attitude offset data, and calculate the water surface disturbance factor, including:
[0122] Obtain the periodic disturbance feature vector group according to the frequency, frequency domain amplitude, and period change length of the main frequency point in the periodic attitude offset data, and obtain the non-linear disturbance feature vector group according to the maximum tilt amplitude, fluctuation duration, and change direction in the non-linear attitude offset data;
[0123] Normalize the dimensions of the periodic disturbance feature vector group and the non-linear disturbance feature vector group, and merge them into a composite disturbance feature matrix;
[0124] According to the composite disturbance feature matrix, calculate the periodic disturbance angular rate and the non-linear disturbance average tilt angular rate to obtain the disturbance enhancement term; calculate the absolute difference between the periodic disturbance rate density and the non-linear disturbance slope, and suppress it to obtain the disturbance constraint term; calculate the direction adjustment term through the non-linear attitude offset direction and the maximum tilt amplitude;
[0125] Fuse the disturbance enhancement term, the disturbance constraint term, and the direction adjustment term to obtain the water surface disturbance factor.
[0126] In the embodiments of the present invention, according to the frequency, frequency domain amplitude, and period change length of the main frequency point in the periodic attitude offset data, a periodic disturbance feature vector group is obtained. According to the maximum tilt amplitude, fluctuation duration, and change direction in the non-linear attitude offset data, a non-linear disturbance feature vector group is obtained. By accurately extracting the frequency, amplitude, and period continuity parameters of the main frequency point, the periodic disturbance characteristics caused by sea waves can be comprehensively reflected. By separating the non-linear mutation segments in the tilt angle change and extracting their maximum amplitude and duration characteristics, the instantaneous impact of sudden disturbances such as sea wave impacts on the attitude of the unmanned ship within a short period of time can be accurately captured. The periodic disturbance feature vector group and the non-linear disturbance feature vector group are dimensionally normalized and combined into a composite disturbance feature matrix. By standardizing and uniformly encoding different disturbance features, the calculation deviation caused by the direct superposition of parameters with different dimensions is avoided.
[0127] According to the composite disturbance feature matrix, the periodic disturbance angular rate and the non-linear disturbance average tilt angular rate are calculated to obtain a disturbance enhancement term. By introducing the disturbance enhancement term, the dynamic characteristics of periodic and non-linear disturbances can be integrated, and the dual impacts of sea surface disturbances on the change amplitude and change rate of the unmanned ship attitude can be accurately reflected, providing a high dynamic response index for the dynamic adjustment of the subsequent compensation path. Calculate the absolute difference between the periodic disturbance rate density and the non-linear disturbance slope and suppress it to obtain a disturbance constraint term, which helps to determine whether there is a drastic change trend in the sea surface disturbance, thereby dynamically adjusting the conservative or aggressive strategy of the docking path and further improving the robustness of the system in an uncertain environment and the reliability of path planning. Through the non-linear attitude offset direction and the maximum tilt amplitude, a direction adjustment term is calculated, which can not only offset the displacement caused by sea wave disturbances but also actively adapt to the attitude change trend to dynamically adjust the cable propulsion attitude, greatly improving the adaptive ability of the docking operation and the final docking success rate. The disturbance enhancement term, the disturbance constraint term, and the direction adjustment term are fused to obtain a water surface disturbance factor, which greatly improves the accuracy of predicting the change trend of the future charging interface position and provides solid data support for the high-precision planning and dynamic correction of the cable docking path.
[0128] Among them, the calculation formula of the water surface disturbance factor is:
[0129] ,
[0130] Among them, is the water surface disturbance factor, is the frequency of the main frequency point, is the frequency domain amplitude of the main frequency point, is the period change length of the main frequency point, is the maximum tilt amplitude of the non-linear attitude offset, is the fluctuation duration of the non-linear attitude offset, is the change direction of the non-linear attitude offset, and is the coefficient.
[0131] In a preferred embodiment of the present invention, according to the water surface disturbance factor and the initial positioning coordinate data, the disturbance trend within a preset time window is predicted and analyzed to predict the position change range of the charging interface, and the predicted coordinate data is obtained, including:
[0132] According to the water surface disturbance factor, the displacement direction, displacement speed, and displacement amplitude of the unmanned ship affected by seawater are extracted to obtain a three-dimensional disturbance vector sequence;
[0133] According to the initial positioning coordinate data, each disturbance component in the three-dimensional disturbance vector sequence is respectively superimposed to obtain disturbance offset coordinate data;
[0134] By arranging the disturbance offset coordinates, a disturbance trajectory coordinate set is constructed in chronological order;
[0135] Through a spatial boundary fitting operation on the disturbance trajectory coordinate set, a closed area containing all trajectory points is formed;
[0136] According to the centroid trajectory of the closed area, interpolation smoothing is performed to obtain the predicted coordinate data.
[0137] In the embodiment of the present invention, according to the water surface disturbance factor, the displacement direction, displacement speed, and displacement amplitude of the unmanned ship affected by seawater are extracted to obtain a three-dimensional disturbance vector sequence, which not only realizes the dynamic behavior modeling of the unmanned ship affected by the sea surface disturbance, but also can accurately describe the position change trend of the unmanned ship at different time nodes; according to the initial positioning coordinate data, each disturbance component in the three-dimensional disturbance vector sequence is respectively superimposed to obtain disturbance offset coordinate data, which realizes the specific mapping of the abstract disturbance trend to the spatial position change trajectory of the charging interface, so that the future spatial motion state of the interface can be quantified; by arranging the disturbance offset coordinates, a disturbance trajectory coordinate set is constructed in chronological order, so that the spatial motion of the unmanned ship charging interface in the future short time has the characteristics of visualization and continuity; through a spatial boundary fitting operation on the disturbance trajectory coordinate set, a closed area containing all trajectory points is formed, and by constructing the closed area, the spatial range of all possible position changes of the charging interface in the future period of time is limited, effectively avoiding the path deviation problem caused by the disturbance change in the path planning process; according to the centroid trajectory of the closed area, interpolation smoothing is performed to obtain the predicted coordinate data, and by eliminating local abnormal points, the trajectory smoothness and controllability are improved, ensuring that the subsequent compensation path planning based on the predicted coordinates is both accurate and has good stability.
[0138] Among them, according to the initial positioning coordinate data, each group of perturbation components in the three-dimensional perturbation vector sequence is superimposed respectively to obtain the perturbed offset coordinate data, which specifically includes:
[0139] First, it is necessary to determine the position of the charging interface of the unmanned ship at the current moment through the visual recognition module, and the obtained initial positioning coordinate data is used as the reference point. This initial positioning coordinate data generally contains three-dimensional space coordinate values, which clarifies the position state of the charging interface of the unmanned ship at the current moment. The system uses this coordinate as the reference origin for subsequent perturbation prediction to ensure that each perturbation superposition operation starts from an accurate starting position.
[0140] Subsequently, the three-dimensional perturbation vector sequence obtained in the previous step is called. This vector sequence is arranged in chronological order and records the continuous spatial displacement change characteristics of the charging interface under the action of sea wave perturbation. Each group of perturbation vectors represents the displacement change amount per unit time and contains the corresponding horizontal displacement and vertical displacement information. During the processing, the system starts from the first time node of the perturbation vector sequence, extracts the corresponding perturbation component, and performs a coordinate superposition operation with the initial positioning coordinate data to derive the predicted position corresponding to the first time step.
[0141] After obtaining the perturbed offset coordinate of the first step, the system continues to use the new coordinate as the reference and successively superimposes the subsequent components in the perturbation vector sequence to gradually advance the position prediction process on the time axis. Each superposition is based on the cumulative coordinate position of the previous moment to ensure the natural continuation of the perturbation trend in time continuity. The entire superposition process is carried out in the same spatial reference system to maintain the physical consistency of the perturbation accumulation at each time step and prevent prediction errors caused by coordinate drift.
[0142] To improve the stability and accuracy of the calculation results, during the superposition operation, the system usually preprocesses the perturbation vector sequence, such as eliminating occasional high-frequency noise through filtering means or smoothing the abnormally large perturbation data to ensure that the superposition process will not cause distortion of the overall trajectory due to local abnormal perturbations. When necessary, according to the change trend of the perturbation amplitude under different sea conditions, a dynamic adjustment weight can also be introduced during the superposition process to reasonably express the high-frequency fast perturbation and the low-frequency slow change trend respectively, thereby further enhancing the physical authenticity and practical value of the perturbation prediction.
[0143] Through the above continuous and progressive superposition process, a set of continuous disturbance offset coordinate data is finally formed. Each set of data corresponds to a specific future moment and completely depicts the possible position change trajectory of the charging interface of the unmanned ship within a short time scale. This disturbance offset coordinate data set lays a solid data foundation for the subsequent construction of the disturbance trajectory, the fitting of the spatial range, and the generation of the compensation path, ensuring that the entire system has accurate prediction ability and high path self-adaptability in a dynamic sea environment.
[0144] In a preferred embodiment of the present invention, by performing a spatial boundary fitting operation on the disturbance trajectory coordinate set, a closed area including all trajectory points is formed, including:
[0145] According to the disturbance trajectory coordinate set, all trajectory points are numbered in chronological order to construct a three-dimensional discrete point set;
[0146] By performing a hierarchical projection of the three-dimensional discrete point set in the coordinate axis directions, the edge envelope points in each layer are extracted to obtain envelope point data, and polygon fitting is performed on it to obtain the in-layer boundary contour line;
[0147] According to the in-layer boundary contour lines between adjacent layers, the closed envelope transition from the bottom to the top is carried out to establish an interpolation surface;
[0148] All the interpolation surfaces are connected to form an overall spatial boundary surface to obtain a closed area.
[0149] In the embodiment of the present invention, according to the disturbance trajectory coordinate set, all trajectory points are numbered in chronological order to construct a three-dimensional discrete point set. By constructing a three-dimensional discrete point set with chronological order, the position change information of the charging interface affected by disturbance factors such as sea waves within a certain time window can be completely retained; by performing a hierarchical projection of the three-dimensional discrete point set in the coordinate axis directions, the edge envelope points in each layer are extracted to obtain envelope point data, and polygon fitting is performed on it to obtain the in-layer boundary contour line. By performing polygon fitting on the edge points extracted from each layer, the local boundary of the disturbance trajectory can be accurately expressed in the form of a mathematical model, which not only improves the data processability but also enhances the smoothness and continuity of the spatial fitting result; according to the in-layer boundary contour lines between adjacent layers, the closed envelope transition from the bottom to the top is carried out to establish an interpolation surface. By interpolating to establish a continuous surface, the local disturbance trajectory boundaries of each height layer can be organically connected together to construct a complete surface covering the entire disturbance trajectory area; all the interpolation surfaces are connected to form an overall spatial boundary surface to obtain a closed area. By connecting all the interpolation surfaces and closing the upper and lower surfaces, all possible movement trajectories of the charging interface of the unmanned ship within the specified time window are accurately enclosed.
[0150] Among them, by performing hierarchical projection of the three-dimensional discrete point set in the coordinate axis directions, extracting the edge envelope points in each layer to obtain envelope point data, and performing polygon fitting on it to obtain the in-layer boundary contour line, specifically including:
[0151] Taking the z-axis, i.e., the height direction, as the hierarchical axis, the three-dimensional discrete point set is stratified according to a preset height interval, and each layer contains all the trajectory points falling within the corresponding height range. After the stratification is completed, for the point set of each layer, using the method of two-dimensional projection, the three-dimensional point coordinates are projected onto the xy plane to form a two-dimensional plane point set. Subsequently, for each two-dimensional plane point set, an edge detection and convex hull construction algorithm such as the Graham scan method is applied to extract the edge envelope points within this layer. These envelope points reflect the maximum motion boundary formed after the unmanned ship charging interface is disturbed within this height range. To improve the data processing accuracy, the extracted edge envelope point set is further smoothed and polygon-fitted. The least squares curve fitting can be used to fit the discrete envelope points into a continuous, smooth, and closed polygon contour line. Each contour line needs to completely describe the limit distribution form of the disturbance trajectory within this layer and ensure that there are no obvious corners and self-intersections at the vertices of the contour line.
[0152] Among them, according to the in-layer boundary contour lines between adjacent layers, the closed envelope transition from the bottom to the top is carried out to establish an interpolation surface, specifically including:
[0153] Taking the boundary contour lines of two adjacent layers, i.e., the upper and lower layers with similar heights, a node mapping is established based on the corresponding relationship, and a surface interpolation algorithm such as bilinear interpolation is used to generate a continuous surface connecting the contour lines of the upper and lower layers. To maintain the smoothness and spatial continuity of the transition surface, during the interpolation process, it is necessary to dynamically adjust according to the number of control points of each contour line. If the number of contour points in the upper and lower layers is different, node encryption or node matching should be carried out first to make the two contour lines consistent in node indexing. Control the smoothness of the interpolation curve during the interpolation process to avoid sudden changes in curvature, and monitor the continuity of each interpolation surface in the spatial transition direction in real time to ensure that the overall surface system forms a complete connection without breaks and self-intersections in the vertical direction.
[0154] Among them, connecting all the interpolation surfaces to form an overall spatial boundary surface to obtain a closed area, specifically including:
[0155] After generating the interpolation surfaces between all adjacent layer contour lines, connect the interpolation surfaces in order of height. Further, construct closed surfaces at the top and bottom of the overall interpolation surface group respectively. The top closed surface can be generated by polygon fitting of the highest layer contour line to form a top cover surface, and the bottom closed surface can be generated by the lowest layer contour line to form a bottom cover surface, ensuring that the entire spatial boundary forms a closed structure. During the connection process, it should be ensured that the boundary nodes of all interpolation surfaces are continuously docked and the normal vector directions are consistent, avoiding boundary warping or overlapping caused by inconsistent surface normals. Through the above operations, a closed three-dimensional region containing all possible movement ranges of the unmanned ship charging interface in a disturbed environment is finally formed.
[0156] In a preferred embodiment of the present invention, according to the predicted coordinate data, plan the path for the cable to dock with the charging interface, compensate for the attitude offset of the unmanned ship caused by sea waves, and obtain a sequence of compensated paths, including:
[0157] According to the predicted coordinate data, establish a path search area in the three-dimensional space, use the current spatial position and the predicted coordinates of the cable end as the search starting point and ending point, and obtain a path node grid;
[0158] According to the path node grid, determine multiple passing paths to obtain an initial path set, and calculate the path stability of each passing path therein;
[0159] By identifying the passing paths with path stability higher than the preset stability and analyzing their direction changes, eliminate the passing paths with sharp turns to obtain a candidate path set;
[0160] According to the candidate path set, extract the two candidate paths with the highest stability therein and perform coordinate fusion on them to obtain a comprehensive path curve;
[0161] According to the comprehensive path curve, determine a sequence of path control points at fixed distance intervals to obtain a sequence of compensated paths.
[0162] In the embodiments of the present invention, according to the predicted coordinate data, a path search area in the three-dimensional space is established, and the current spatial position of the cable end and the predicted coordinates are used as the search starting point and ending point to obtain a path node grid, which can effectively avoid the problems of the search path exceeding the boundary or deviating from the reasonable range, improve the efficiency and rationality of the path search, and at the same time provide a data basis for path optimization; according to the path node grid, multiple passing paths are determined to obtain an initial path set, and the path stability of each passing path is calculated, which can comprehensively evaluate the advantages and disadvantages of each path, ensure that the subsequent selected path is not only short, but also has better controllability and tracking stability in the dynamic disturbance environment, and improve the overall operation safety; by identifying the passing paths with path stability higher than the preset stability and analyzing their direction changes, the passing paths with sharp turns are eliminated to obtain a candidate path set. By eliminating the paths with sharp turns, it is ensured that the movement trajectory of the cable during the propulsion process is smooth, and the abnormal stress or tracking difficulty of the cable caused by sharp turns is avoided; according to the candidate path set, the two candidate paths with the highest stability are extracted and their coordinates are fused to obtain a comprehensive path curve, which avoids the problem of local optimality but global instability of a single path, and enhances the robustness and response flexibility of the system when executing the cable propulsion instruction; according to the comprehensive path curve, a path control point sequence is determined at a fixed distance interval to obtain a compensated path sequence. Discretizing the comprehensive path curve into a control point sequence with a fixed step size not only improves the controllability and accuracy of the cable propulsion process, but also facilitates real-time position tracking and deviation correction during the propulsion process.
[0163] Among them, by identifying the passing paths with path stability higher than the preset stability and analyzing their direction changes, the passing paths with sharp turns are eliminated to obtain a candidate path set, which specifically includes:
[0164] Set the minimum standard value of the stability evaluation index. For example, the path stability score needs to be greater than 0.7. For all paths, if the comprehensive score of a certain path is higher than this threshold, it is included in the preliminary candidate path set. To further ensure the smoothness and continuity of the path during the cable propulsion process, on this basis, the direction change analysis is carried out on each primary selected path. Specifically, the vector sequence formed by consecutive nodes in the path is extracted, and the angle between each vector and the adjacent vector is calculated. When the angle exceeds the preset maximum turning threshold such as 30 degrees, it is determined that the path has a sharp turn phenomenon. Any path detected with a sharp turn is immediately eliminated, and only the paths with smooth direction changes and continuous turning angles within a small range of fluctuations are retained, and finally a candidate path set is formed.
[0165] Among them, according to the candidate path set, the two candidate paths with the highest stability are extracted and their coordinates are fused to obtain a comprehensive path curve, which specifically includes:
[0166] Extract the spatial coordinate data of all nodes in these two paths, align the nodes according to the time series or spatial step size to ensure that the number of nodes in the two paths is the same or maintain the corresponding relationship through interpolation. For each pair of corresponding nodes, use the weighted average method for coordinate fusion, where the weights can be dynamically allocated according to the stability scores of the two paths. For example, the weight of the path with higher stability is set to 0.6, and the weight of the path with slightly lower stability is set to 0.4. After the fusion is completed, a comprehensive path curve is formed. This curve not only inherits the excellent characteristics of the two original paths in space but also realizes a smooth transition of the path at local details, overall improving the anti-interference ability and tracking accuracy of the path.
[0167] Among them, according to the comprehensive path curve, determine the path control point sequence at fixed distance intervals to obtain the compensated path sequence, specifically including:
[0168] Calculate the cumulative path length along the comprehensive path curve, record the three-dimensional coordinates of a control point every time the set spatial step size is reached, for example, every 10 centimeters. To ensure the continuity of the path control points and the trajectory accuracy, when the remaining path is less than a full step size, the last segment can be directly inserted as a control point. Finally, arrange all the control points in order to form the compensated path sequence, which is used as the input of the cable propulsion control instruction. By this way of setting the control points at a fixed step size, not only can the consistency of path tracking during the propulsion process be ensured, but also a stable trajectory benchmark can be provided for subsequent real-time correction operations, thus greatly improving the accuracy of cable propulsion and the docking success rate.
[0169] In a preferred embodiment of the present invention, according to the path node grid, determine multiple passing paths to obtain the initial path set, and calculate the path stability of each passing path, including:
[0170] According to the passing path, extract the coordinates and the number of nodes that make up the passing path to obtain the path data;
[0171] According to the path data, calculate the bending degree of the turning angle in the passing path to obtain the steering fluctuation term;
[0172] According to the path data, calculate the total length of the passing path and measure the jitter degree of the passing path to obtain the length deviation term;
[0173] According to the path data and the predicted coordinate data, calculate the concentration degree of the passing path to the center of the predicted coordinates to obtain the center convergence term;
[0174] Fuse the steering fluctuation term, the length deviation term and the center convergence term to obtain the path stability.
[0175] In an embodiment of the present invention, based on the passage path, the coordinates and number of nodes constituting the passage path are extracted to obtain path data, thereby ensuring that subsequent analysis has sufficient data integrity and accuracy; based on the path data, the degree of curvature of the turning angle in the passage path is calculated to obtain a steering fluctuation term, and the change in the turning angle in the path is quantified, which can accurately reflect the degree of tortuosity of the path in space. The larger the value of the steering fluctuation term, the more frequent the path bending or the more drastic the angle change, which can easily lead to the risk of unstable posture changes and difficulty in maintaining continuity of the docking path during cable advancement; based on the path data, the total length of the passage path is calculated, and the degree of jitter of the passage path is measured to obtain a length deviation term, and the deviation of the total length of the path from the ideal shortest path is evaluated, which can effectively identify the redundant paths in the path. If there are twists and turns and spatial jitter phenomena and the length deviation term is large, it means that the path requires more posture adjustments and energy consumption during the actual propulsion process, which increases the instability of the propulsion path; based on the path data and the predicted coordinate data, the concentration degree of the pass path to the center point of the predicted coordinate is calculated to obtain the central convergence term, which reflects whether the path nodes are closely distributed around the expected docking area. The higher the concentration, the better the adaptability of the path to the disturbance range, and the smaller the risk of being offset by unexpected disturbances during the propulsion process; the steering fluctuation term, the length deviation term and the central convergence term are integrated to obtain the path stability, and the overall stability of each path is comprehensively evaluated, which not only improves the scientificity and objectivity of path screening, but also significantly reduces the risks of cable oscillation, offset, breakage, etc. caused by path abnormalities in propulsion control.
[0176] The calculation formula of the path stability is:
[0177] ,
[0178] in, is the path stability of the travel path, is the index of the node of the traversable path, is the total number of nodes on the traversable path, For the Node, Nodes and The turning angle formed by the nodes, , For the The coordinates of the nodes, , For the The coordinates of the nodes, , For the The coordinates of the nodes, , are the coordinates of the center point of the closed area, , is the total length of the passing path, , and is a coefficient.
[0179] In a preferred embodiment of the present invention, according to the path tracking image data, it is judged whether the charging interface docking is successful. When the result is negative, the compensation path sequence is dynamically corrected, including:
[0180] According to the relative spatial position between the charging interface and the end of the compensation path in the path tracking image data, calculate the docking offset distance between the end control point and the center point of the interface to obtain docking offset data;
[0181] Compare the docking offset data with a preset docking offset range. When the docking offset distance exceeds the preset docking offset range, it is judged that the docking fails;
[0182] By performing error backpropagation on the control point sequence at the end of the compensation path, calculate the adjustment vector of each end control point to obtain an end correction vector group;
[0183] According to the end correction vector group, update the coordinates of the end segment in the compensation path to obtain a corrected end path segment;
[0184] Perform a path fusion operation on the corrected end path segment and the compensation path to obtain a corrected compensation path sequence.
[0185] In an embodiment of the present invention, according to the relative spatial position between the charging interface and the end of the compensation path in the path tracking image data, the docking offset distance between the end control point and the center point of the interface is calculated to obtain docking offset data, quantify the docking deviation of the cable head, and provide data support for subsequent judgment of whether the docking is successful or not; according to the docking offset data and the preset docking offset range, when the docking offset distance exceeds the preset docking offset range, it is judged that the docking fails, and the docking failure can be quickly detected and responded to at the first time, thereby reducing the waiting time and the number of invalid advancements during the charging process; by performing error back propagation on the control point sequence at the end of the compensation path, the adjustment vector of each end control point is calculated, and the To the terminal correction vector group, through the error back propagation mechanism, the system can distribute and refine the adjustment path so that the overall path transitions smoothly, avoids sharp turns or unnatural curves, and ensures the continuity and stability of the compensation path; according to the terminal correction vector group, the coordinates of the terminal segment in the compensation path are updated to obtain the corrected terminal path segment. By correcting the terminal path in a fine-grained manner, the overall path mutation can be effectively reduced, and the real-time position changes of the charging interface can be quickly adapted; the corrected terminal path segment is fused with the compensation path to obtain a corrected compensation path sequence, which ensures that the corrected compensation path is continuous and executable in space and avoids propulsion abnormalities caused by path breakage or direction jumps.
[0186] Among them, by performing error back propagation on the control point sequence at the end of the compensation path, the adjustment vector of each end control point is calculated to obtain the end correction vector group, which specifically includes:
[0187] During the charging docking process, when it is detected that there is a docking offset between the control point at the end of the cable and the center point of the charging interface that exceeds the preset range, the system first performs an error back propagation operation on the control point sequence at the end of the compensation path. Specifically, based on the real-time path tracking image data, the system extracts several continuous control points in a section of the end path, and uses the current docking offset data as the initial error value of the back propagation. The back propagation algorithm is used to start from the end control point and gradually calculate the adjustment amount to be applied to each control point. The adjustment vector of each control point is weighted according to its sequence position in the compensation path. The adjustment amplitude of the control point close to the end is larger and gradually decreases forward to ensure that the error compensation process presents a continuous change rather than a sudden change. The direction of the adjustment vector depends on the vector direction of the cable end control point pointing to the center point of the charging interface, and the amplitude is proportionally scaled based on the offset distance from the current position to the center point of the interface to avoid path oscillation caused by excessive adjustment. Finally, the system generates a set of adjustment vectors corresponding to each end control point, that is, a terminal correction vector group is formed to provide a data basis for subsequent path correction operations.
[0188] Among them, according to the terminal correction vector group, the coordinates of the terminal segment in the compensation path are updated to obtain a corrected terminal path segment, which specifically includes:
[0189] For the selected terminal control points in the original compensation path, their corresponding adjustment vectors are successively superimposed on the current three-dimensional coordinates to form new corrected control points. The coordinate update process follows a sequence, starting from the control point close to the cable terminal and gradually completing the correction of all terminal segments to ensure the continuity and smoothness of the adjusted path in spatial distribution. In addition, to avoid introducing excessive local curvature changes during the correction process, after updating the coordinates of each control point, the system can also dynamically adjust the correction amplitude according to the position changes of its adjacent control points to achieve smooth transition processing of the local path. After completing the coordinate update of all terminal segment control points, a corrected terminal path segment can be obtained, which has a new spatial orientation and terminal position and can more accurately guide the cable terminal to align with the center point of the charging interface.
[0190] Among them, the corrected terminal path segment and the compensation path are subjected to a path fusion operation to obtain a corrected compensation path sequence, which specifically includes:
[0191] During the fusion process, first, the unmodified part of the original compensation path and the newly generated terminal corrected path segment are subjected to a transition process at the joint. Specifically, the spatial positions of the first control point of the terminal segment and the last unmodified control point in the compensation path are extracted, and methods such as curve fitting and interpolation smoothing are used to generate a transition path segment connecting these two points to eliminate possible angular mutations or velocity discontinuities. Subsequently, the transition segment and the corrected terminal path segment are integrally spliced onto the original compensation path to form a continuous and smooth new corrected compensation path sequence. The new path not only accurately reflects the compensation requirements for real-time docking offsets but also maintains the executability and propulsion stability of the path in terms of geometric structure, ensuring that the cable propulsion action can be smoothly and without impact completed during the actual execution to achieve the final docking.
[0192] The above is the preferred implementation manner of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. Control method for cable used in charging of unmanned ship based on visual recognition, characterized in that, The method includes: Collect continuous image frames of the charging area of the unmanned ship to obtain the original frame sequence data, and perform temporal image analysis on it to identify the spatial displacement and tilt angle change of the unmanned ship, and obtain the attitude trajectory data set; According to the attitude trajectory data set, analyze the periodic and non-linear attitude offsets generated by the waves on the attitude of the unmanned ship, and calculate the water surface disturbance factor; Through geometric positioning of the current image frame, identify the position of the charging interface to obtain the initial positioning coordinate data; According to the water surface disturbance factor and the initial positioning coordinate data, perform predictive analysis on the disturbance trend within the preset time window, predict the range of position change of the charging interface, and obtain the predicted coordinate data; According to the predicted coordinate data, plan the path for the cable to dock with the charging interface, and compensate for the attitude offset of the unmanned ship caused by the waves to obtain the compensated path sequence; According to the compensated path sequence, generate a cable propulsion instruction, and collect the image of the charging interface area to obtain the path tracking image data; According to the path tracking image data, judge whether the docking of the charging interface is successful. When the result is no, the compensated path sequence is dynamically corrected; According to the attitude trajectory data set, analyze the periodic and non-linear attitude offsets generated by the waves on the attitude of the unmanned ship, and calculate the water surface disturbance factor, including: According to the attitude trajectory data set, normalize the change amount of the tilt angle of the unmanned ship to obtain the normalized tilt data sequence, and perform frequency transformation on it to obtain the frequency distribution spectrum; According to the frequency distribution spectrum, extract the main frequency points with amplitudes greater than the preset amplitude, and record the frequencies and frequency domain amplitudes of the main frequency points to obtain the main frequency point data set; According to the main frequency point data set, analyze the time continuity of the periodic change of the main frequency points to obtain the cycle change length and cycle change rate; According to the frequencies, frequency domain amplitudes, cycle change lengths and cycle change rates of the main frequency points, determine the periodic characteristics of the attitude change of the unmanned ship to obtain the periodic attitude offset data; According to the attitude trajectory data set, analyze the periodic and non-linear attitude offsets generated by the waves on the attitude of the unmanned ship, and calculate the water surface disturbance factor, which also includes: According to the change rate of the tilt angle on the time axis in the attitude trajectory data set, construct the tilt angle gradient change sequence; Through differential calculation of the tilt angle gradient change sequence, obtain the instantaneous change rate, and identify the abnormal change points where the instantaneous change rate exceeds three standard deviations of the average change rate to obtain the set of mutation points; According to the set of mutation points, merge adjacent mutation points into the same disturbance segment, and extract the maximum tilt amplitude, fluctuation duration and change direction for each disturbance segment to obtain the non-linear attitude offset data; According to the periodic attitude offset data and the non-linear attitude offset data, analyze the disturbance effect of the sea water on the unmanned ship, and calculate the water surface disturbance factor.
2. The control method of the cable for charging an unmanned ship based on visual recognition according to claim 1, characterized in that, Collect continuous image frames of the charging area of the unmanned ship to obtain the original frame sequence data, and perform temporal image analysis on it to identify the spatial displacement and tilt angle change of the unmanned ship, and obtain the attitude trajectory data set, including: Through edge contour enhancement of the original frame sequence data, extract the outer contour features of the unmanned ship and the feature points of the charging area to obtain the continuous frame feature data set; Track the outer contour features of the unmanned ship based on the continuous frame feature dataset, identify the movement trend of the unmanned ship on the time axis, and obtain a set of time curves; By calculating the first derivative of each curve in the set of time curves, extract the spatial displacement change and tilt angle change respectively, and obtain the attitude change dataset; According to the attitude change dataset, merge the attitude changes of the unmanned ship in chronological order, draw the three-dimensional attitude trajectory of the unmanned ship, and obtain the attitude trajectory dataset.
3. The control method of the cable for charging an unmanned ship based on visual recognition according to claim 2, wherein, Analyze the disturbance effect of seawater on the unmanned ship according to the periodic attitude offset data and non-linear attitude offset data, and calculate the water surface disturbance factor, including: Obtain a set of periodic disturbance feature vectors according to the frequency, frequency domain amplitude and period change length of the main frequency points in the periodic attitude offset data, and obtain a set of non-linear disturbance feature vectors according to the maximum tilt amplitude, fluctuation duration and change direction in the non-linear attitude offset data; Normalize the dimensions of the set of periodic disturbance feature vectors and the set of non-linear disturbance feature vectors, and merge them into a composite disturbance feature matrix; According to the composite disturbance feature matrix, calculate the periodic disturbance angular rate and the non-linear disturbance average tilt angular rate to obtain the disturbance enhancement term; calculate the absolute difference between the periodic disturbance rate density and the non-linear disturbance slope, and suppress it to obtain the disturbance constraint term; calculate the direction adjustment term through the non-linear attitude offset direction and the maximum tilt amplitude; Fuse the disturbance enhancement term, the disturbance constraint term and the direction adjustment term to obtain the water surface disturbance factor.
4. The control method of the cable for charging an unmanned ship based on visual recognition according to claim 3, characterized in that, According to the water surface disturbance factor and the initial positioning coordinate data, predict and analyze the disturbance trend within a preset time window, predict the position change range of the charging interface, and obtain the predicted coordinate data, including: According to the water surface disturbance factor, extract the displacement direction, displacement speed and displacement amplitude of the unmanned ship affected by seawater to obtain a three-dimensional disturbance vector sequence; According to the initial positioning coordinate data, superimpose each group of disturbance components in the three-dimensional disturbance vector sequence respectively to obtain the disturbance offset coordinate data; By arranging the disturbance offset coordinates, construct a disturbance trajectory coordinate set in chronological order; Through the spatial boundary fitting operation on the disturbance trajectory coordinate set, form a closed area containing all trajectory points; According to the centroid trajectory of the closed area, perform interpolation smoothing to obtain the predicted coordinate data.
5. The control method of the cable for charging an unmanned ship based on visual recognition according to claim 4, characterized in that, Through the spatial boundary fitting operation on the disturbance trajectory coordinate set, form a closed area containing all trajectory points, including: According to the disturbance trajectory coordinate set, number all trajectory points in chronological order to construct a three-dimensional discrete point set; Through the hierarchical projection of the three-dimensional discrete point set in the coordinate axis direction, extract the edge envelope points in each layer to obtain the envelope point data, and perform polygon fitting on it to obtain the in-layer boundary contour line; According to the in-layer boundary contour lines between adjacent layers, make the closed envelope transition from bottom to top to establish an interpolation surface; Connect all the interpolation surfaces to form an overall spatial boundary surface to obtain a closed area.
6. The control method of the cable for unmanned ship charging based on visual recognition according to claim 5, characterized in that According to the predicted coordinate data, plan the path for the cable to dock with the charging interface, and compensate for the attitude offset of the unmanned ship caused by the waves to obtain a sequence of compensation paths, including: According to the predicted coordinate data, a path search area in three-dimensional space is established, and the current spatial position of the cable end and the predicted coordinates are used as the search start and end points to obtain a path node grid; According to the path node grid, multiple pass paths are determined to obtain an initial path set, and the path stability of each pass path is calculated; By identifying the paths with higher path stability than the preset stability and analyzing their direction changes, the paths with sharp turns are eliminated to obtain a candidate path set. According to the candidate path set, two candidate paths with the highest stability are extracted, and their coordinates are fused to obtain a comprehensive path curve; According to the comprehensive path curve, the path control point sequence is determined at fixed distance intervals to obtain the compensation path sequence.
7. The control method of the cable for charging an unmanned ship based on visual recognition according to claim 6, wherein, According to the path node grid, multiple pass paths are determined to obtain the initial path set, and the path stability of each pass path is calculated, including: According to the passing path, the coordinates and quantity of the nodes constituting the passing path are extracted to obtain the path data; According to the path data, the curvature of the turning angle in the passage path is calculated to obtain the turning fluctuation term; According to the path data, the total length of the passing path is calculated, and the jitter degree of the passing path is measured to obtain the length deviation term; According to the path data and the predicted coordinate data, the degree of concentration of the pass path to the center point of the predicted coordinate is calculated to obtain the central convergence item; The turning fluctuation term, length deviation term and center convergence term are integrated to obtain path stability.
8. The control method of the cable for charging an unmanned ship based on visual recognition according to claim 7, characterized in that, According to the path tracking image data, it is judged whether the charging interface is successfully docked. If the result is no, the compensation path sequence is dynamically corrected, including: According to the relative spatial position between the charging interface and the end of the compensation path in the path tracking image data, the docking offset distance between the end control point and the center point of the interface is calculated to obtain the docking offset data; Compare the docking offset data with the preset docking offset range, and when the docking offset distance exceeds the preset docking offset range, it is determined that the docking has failed; By performing error back propagation on the control point sequence at the end of the compensation path, the adjustment vector of each end control point is calculated to obtain the end correction vector group; According to the terminal correction vector group, the coordinates of the terminal segment in the compensation path are updated to obtain a corrected terminal path segment; The corrected terminal path segment is fused with the compensation path to obtain a corrected compensation path sequence.
Citation Information
Patent Citations
Vessel berthing charging docking locating method
CN110435467A
Cable conveying control method and system for shore power pile
CN113989638A