Ship obstacle avoidance and automatic berthing method based on deep learning algorithm
The deep learning-based method addresses complex marine navigation challenges through multimodal sensor fusion and real-time path optimization, enhancing obstacle detection and multi-ship collaboration for safe and adaptive ship navigation.
Patent Information
- Application Number
- CN202411268312.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-11
AI Technical Summary
Existing ship navigation systems face challenges in complex marine environments due to insufficient obstacle detection, lack of multimodal data fusion, inadequate response to dynamic changes, and limited multi-ship collaboration, leading to inefficiencies and potential accidents.
A deep learning-based method utilizing multimodal sensor fusion, meta-reinforcement learning, and generative adversarial networks for synchronized data calibration, real-time path optimization, and online learning to enhance obstacle avoidance and automatic berthing capabilities.
The method improves environmental perception accuracy, enables efficient multi-ship collaboration, and ensures safe, adaptive navigation in dynamic environments with precise berthing.
Smart Images

Figure CN119088034A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship automation control, and in particular to a ship obstacle avoidance and automatic berthing method based on a deep learning algorithm. Background Art
[0002] In the modern shipping industry, with the expansion of ship size and the complexity of the global shipping network, the requirements for ship navigation and control are becoming increasingly higher. Traditional ship navigation systems usually rely on manual operation and simple automated control equipment. These systems perform well in dealing with navigation and berthing tasks in static environments, but often seem to be unable to cope with complex and changing marine environments. Especially in bad weather, crowded ports or narrow waterways, traditional navigation systems have major limitations, including insufficient obstacle detection capabilities, slow response to dynamic environmental changes, and lack of accurate automatic berthing capabilities.
[0003] Current automated ship control systems mainly rely on the input of a single or a few sensors, such as radar, sonar or GPS, to obtain environmental information around the ship. This way of obtaining information can meet the needs of simple navigation tasks to a certain extent, but due to the lack of multimodal data fusion, its accuracy and reliability are insufficient when processing complex environmental information. For example, a single radar system is prone to misjudgment when encountering sea surface reflections or multipath interference; although the sonar system can detect underwater obstacles, its perception of objects on the water surface is limited; GPS and INS are easily affected by satellite signal obstruction or misalignment, especially in ports or complex sea conditions. Existing technologies usually process the data of these sensors separately, and do not effectively use multimodal sensor fusion technology to improve the comprehensiveness and accuracy of environmental perception.
[0004] With the development of deep learning technology, researchers have begun to apply it to the field of ship automatic control to improve the system's understanding and decision-making capabilities in complex environments. At present, some studies have attempted to use convolutional neural networks (CNNs) to perform image recognition of the ship's surroundings, or to process the ship's time series data through recurrent neural networks to predict the ship's trajectory. However, most of these studies focus on a single task, such as target recognition or trajectory prediction, and have not formed a comprehensive, complete system that can be used in a variety of complex environments. In addition, most existing deep learning models rely on fixed data sets for offline training. Once the model is deployed in a real environment, it is often difficult to cope with new environmental changes or emergencies. This has led to the lack of online learning and adaptive capabilities in existing deep learning control systems, making the system prone to failure or requiring frequent manual adjustments during long-term operation.
[0005] Another significant drawback is the lack of effective solutions for multi-ship collaboration in existing technologies. Current automated ship systems usually only consider the independent navigation and obstacle avoidance of a single ship, while in the actual shipping environment, collaboration between multiple ships is particularly important. Especially in crowded waterways or ports, mutual obstacle avoidance and coordination between multiple ships are the key to ensuring navigation safety and efficiency. However, most existing automatic control systems cannot effectively handle the mutual influence between multiple ships, and may even cause conflicts or accidents between ships.
[0006] In addition, most existing path planning algorithms rely on traditional optimal control methods, which perform well in pre-set static environments, but have difficulty responding and adjusting quickly when encountering dynamically changing environments (such as sudden moving obstacles or emergencies). Traditional path planning algorithms are usually based on fixed paths calculated offline, which cannot meet the needs of real-time obstacle avoidance and path optimization for ships in complex actual scenarios.
[0007] Finally, although generative adversarial networks (GANs) have achieved remarkable results in the field of image generation, their application in the field of ship automation control is still in its infancy. Existing studies usually use GANs to generate training datasets, but these datasets are mainly used for image recognition and classification tasks, and are relatively less used in simulating marine environments and complex scene generation. The lack of a high-fidelity virtual training environment means that the trained models often perform poorly in practical applications and cannot cope with the changing conditions and extreme scenarios in the real environment.
[0008] Therefore, how to provide a ship obstacle avoidance and automatic berthing method based on deep learning algorithm is an urgent problem that technicians in this field need to solve. Summary of the invention
[0009] One purpose of the present invention is to propose a method for ship obstacle avoidance and automatic berthing based on a deep learning algorithm. The present invention comprehensively applies deep learning, multimodal sensor fusion, meta-reinforcement learning and generative adversarial network technology to propose an intelligent method for ship obstacle avoidance and automatic berthing. Through the synchronization and calibration of multimodal data, time series processing of recursive neural networks and real-time path optimization control, the present invention effectively solves the problems of multi-ship collaboration, dynamic obstacle avoidance and emergency response in complex marine environments. This method has the advantages of efficient collaboration, strong safety, excellent environmental adaptability and strong precise berthing capability, providing a comprehensive and reliable solution for the autonomous navigation of intelligent ships.
[0010] A method for ship obstacle avoidance and automatic berthing based on a deep learning algorithm according to an embodiment of the present invention comprises the following steps:
[0011] S1. Deploy a multimodal sensor system on the ship, including lidar, sonar, visual camera, GPS and INS, collect data and build a dataset;
[0012] S2. Using the adaptive synchronization and calibration algorithm based on the dual-stream deep neural network, the collected data from different sensors in the data set are synchronized in time and space to ensure that the data from all sensors can be fused in a unified time and space reference system;
[0013] S3, preprocessing the calibrated dataset, including data cleaning, noise and outlier removal, and data enhancement;
[0014] S4. Perform feature extraction on the preprocessed data set, including using a 3D convolutional neural network to extract spatial features from lidar and sonar data, using a convolutional neural network to extract object features from visual data, and using a multi-layer perceptron to extract key features from GPS and INS data;
[0015] S5. Use the Transformer-based self-attention mechanism to fuse the extracted spatial features, object features, and key features to generate a unified feature space;
[0016] S6. Use the fused unified feature space to model the environment, identify and locate obstacles, target berths and key environmental elements around the ship, and use the adversarial generative network to generate virtual ocean environments and complex scenes;
[0017] S7. Use the distributed deep deterministic policy gradient combined with game theory to train the obstacle avoidance and path planning decision model of ships, and realize multi-ship collaborative obstacle avoidance and path optimization;
[0018] S8. Use meta-reinforcement learning combined with fuzzy logic control to design a hybrid path planning system that adjusts the path in real time to cope with dynamic obstacles and emergencies based on the preliminary path planning;
[0019] S9, based on the recurrent neural network control strategy, real-time processing of ship motion time series data, automatic adjustment of ship speed, heading and thrust, and accurate berthing;
[0020] S10. Use online learning technology to self-adjust and optimize according to new environments and situations, ensuring that obstacle avoidance and automatic berthing tasks in complex environments can be completed safely and accurately.
[0021] Optionally, the lidar is used to capture three-dimensional environmental information, the sonar is used for underwater environmental perception, the camera is used to obtain visual information around the ship, and the GPS and INS are used to provide precise positioning, speed and heading information.
[0022] Optionally, the S2 specifically includes:
[0023] S21. Input the data set into two parallel deep neural networks, namely the time synchronization stream and the space calibration stream. The time synchronization stream handles the timestamp deviation problem of different sensor data. Suppose the multidimensional data vector collected by sensor i at time t is:
[0024]
[0025] in, represents the k-th dimension of sensor data collected by sensor i at time t, and n represents the dimension of the data;
[0026] S22. Calculate the time offset Δt of each sensor through the time synchronization flow model i , and correct the timestamp data to obtain the calibrated unified timestamp T i :
[0027] T i =t+Δt i ;
[0028] Among them, Δt i represents the time offset of sensor i;
[0029] S23, the spatial calibration flow is used to calibrate the spatial reference system of the sensor. Suppose the spatial data collected by sensor j is:
[0030]
[0031] Among them, S j (x,y,z) represents the multidimensional data vector collected by sensor j at the spatial coordinates (x,y,z), represents the k-th dimension of spatial data collected by sensor j at the spatial coordinates (x, y, z), and m represents the dimension of the data;
[0032] The spatial displacement vector ΔS of each sensor is calculated by the spatial calibration flow model j , get the calibrated spatial data S j ′ (x ′ ,y ′ ,z ′ ):
[0033] S j ′ (x ′ ,y ′ ,z ′ )=S j (x+Δx j ,y+Δy j ,z+Δz j );
[0034] Where Δx j represents the displacement vector in the x direction, Δy j represents the displacement vector in the y direction, Δz j represents the displacement vector in the z direction;
[0035] S24. During the training process, construct a composite loss function L:
[0036] L=αL t +βL s +γL c +δL f ;
[0037] Among them, α, β, γ and δ represent weight coefficients;
[0038]
[0039] Among them, L t represents the time deviation loss, N represents the number of sensors, represents the real time deviation of sensor i;
[0040]
[0041] Among them, L s represents the spatial deviation loss, represents the real spatial deviation of sensor j;
[0042]
[0043] Among them, L c represents the consistency loss between sensors, P represents the number of sensor pairs, represents the spatial displacement of sensor j to sensor k, represents the time offset of sensor i to sensor k;
[0044]
[0045] Among them, L f represents the environmental feature matching loss, Q represents the number of data samples, represents the calibrated data collected by the lth sensor at a specific time or position, represents the target environment feature data or the lth sample in the reference data set, φ(·) represents the environmental feature function extracted from the calibrated data and the target data, ensuring that the calibrated sensor data matches the known target environment features;
[0046] S25. Iteratively optimize the composite loss function L through the gradient descent method, thereby optimizing the time deviation, space deviation, consistency between sensors and matching degree of environmental characteristics at the same time, ensuring that the data of all sensors can be fused in a unified time and space reference system and consistent with the environmental characteristics;
[0047] S26. Output the data after time synchronization and space calibration.
[0048] Optionally, the S5 specifically includes:
[0049] S51, the spatial features, object features and key features extracted are respectively expressed as multimodal feature vectors, and the spatial features are in represents the i-th component in the feature vector, p represents the dimension of the spatial feature, and the object feature is in represents the jth component in the feature vector, q represents the dimension of the object feature, and the key feature is in represents the lth component in the feature vector, and r represents the dimension of the key feature;
[0050] S52, input these feature vectors into the Transformer-based self-attention mechanism to calculate the query matrix Q of the spatial features s , the bond matrix K s Sum value matrix V s :
[0051]
[0052] in, represents the weight matrix of the spatial feature query matrix, represents the weight matrix of the spatial feature key matrix, The weight matrix representing the spatial eigenvalue matrix;
[0053] Calculate the query matrix Q of object features o , the bond matrix K o Sum Matrix
[0054]
[0055] in, Represents the weight matrix of the object feature query matrix, represents the weight matrix of the object feature bond matrix, The weight matrix representing the eigenvalue matrix of the object;
[0056] Calculate the query matrix Q of key features o , the bond matrix K oSum Matrix
[0057]
[0058] in, represents the weight matrix of the key feature query matrix, represents the weight matrix of the key feature key matrix, The weight matrix representing the key eigenvalue matrix;
[0059] S53, calculate the attention weights between multimodal features, the attention weight matrix A between spatial features and object features so :
[0060]
[0061] Among them, d k represents the dimension of the feature vector;
[0062] Attention weight matrix A between object features and key features ok :
[0063]
[0064] The attention weight matrix A between spatial features and key features sk :
[0065]
[0066] S54, based on the attention weight, the features are weighted and fused. The weighted feature representation Z after the fusion of spatial features and object features so :
[0067] Z so =A so ·V o ;
[0068] Weighted feature representation Z after fusion of object features and key features ok :
[0069] Z ok =A ok ·V k ;
[0070] The weighted feature representation Z after the fusion of spatial features and key features sk :
[0071] Z sk =A sk ·V k ;
[0072] S55, perform linear transformation and activation processing on the weighted fusion feature representation to obtain the final unified feature space F final :
[0073] F final =σ(W f ·(Z so +Z ok +Z sk )+b f );
[0074] Among them, W f represents the weight matrix of the linear transformation, b f represents the bias vector of the linear transformation, and σ represents the activation function.
[0075] Optionally, the S6 specifically includes:
[0076] S61, the unified feature space F obtained in S55 final Input into the environment modeling network, extract high-level environmental features through the convolutional neural network, and generate an environmental feature map to obtain the output C of the lth convolutional layer l ;
[0077] S62, using environmental feature map C l The information in the environment is used to classify and locate obstacles, target berths and key environmental elements through a multi-layer perceptron:
[0078] O cls =Softmax(W cls ·C l +b cls );
[0079] Among them, O cls represents the classification result, represents the probability distribution of obstacles, berths and key environmental elements, and W cls represents the weight matrix of the classification layer, b cls Represents the bias vector of the classification layer;
[0080] O loc =W loc ·C l +b loc ;
[0081] Among them, O loc represents the positioning result, indicating the spatial coordinates of obstacles, berths and key environmental elements, W loc represents the weight matrix of the positioning layer, b loc Represents the bias vector of the positioning layer;
[0082] S63. Using the classification results and positioning results as a basis, the generator network is used to generate virtual ocean environments and complex scenes. The generator network converts the random noise vector z into a realistic environment image through a convolutional transpose layer, which is expressed as:
[0083] G(z)=Deconv(z,W g )+b g ;
[0084] Among them, G(z) represents the generated virtual ocean environment image, W g represents the weight matrix of the generator network, b g represents the bias vector of the generator network;
[0085] S64, using a discriminator network to evaluate the generated virtual environment image, the discriminator network receives the real environment image and the generated virtual environment image as input, and outputs a classification result, which is expressed as:
[0086] D(x)=Sigmoid(W d ·x+b d );
[0087] Among them, D(x) represents the discrimination result, which represents the probability that the input image is a real environment image, x represents the input image, and W d represents the weight matrix of the discriminator network, b d represents the bias vector of the discriminator network;
[0088] S65. The generator and the discriminator are trained through the adversarial generative network so that the generated virtual ocean environment image gradually approaches the real environment, and finally a virtual ocean environment and a complex scene are generated for the training and optimization of the ship obstacle avoidance and automatic berthing algorithm.
[0089] Optionally, the S7 specifically includes:
[0090] S71. Construct a multi-agent system, where each agent represents a ship, and the state vector s of agent i i for:
[0091] s i =[p i ,v i ,o i ];
[0092] Among them, p i Indicates position, v i Indicates speed, o i Indicates surrounding obstacle information;
[0093] S72. Define a policy network π for each agent i (si |θ i ), where θ i Represents the parameters of the policy network, which receives the state vector s of agent i i As input, and output action a of agent i i ;
[0094] S73. Define a Q-value function Q for each agent i (s i ,a i |φ i ), which estimates the expected cumulative reward for a given state and action:
[0095]
[0096] Among them, φ i represents the parameter of the Q value function, γ represents the discount factor, r i (t) represents the immediate reward of agent i at time step t;
[0097] S74, update the parameters of the policy network and Q-value network through distributed training. For each agent, select actions according to the current strategy, interact with the environment, and collect state transition samples (s i ,a i ,r i ,s′ i ), where s′ i Represents the new state after executing the action, using the loss function L(φ i ) Update the parameters φ of the Q-value network i :
[0098]
[0099] Among them, the target value y i Determined by the Bellman equation, expressed as:
[0100] y i =r i +γQ i (s′ i ,π i (s ′ i |θ i )|φ i );
[0101] S75. After fixing the Q value network, use the policy gradient method to update the policy network parameters θ i , the goal is to maximize the expected return;
[0102] S76. In a distributed system, each agent shares the updated information of the strategy network and uses the Nash equilibrium strategy in game theory for collaborative learning, which is specifically defined as:
[0103]
[0104] in, represents the optimal strategy of agent i under Nash equilibrium conditions, represents the Q value of other agents j under the optimal strategy. This formula means that when agent i chooses its strategy, it must maximize its own Q value and consider the strategies of other agents to achieve a global Nash equilibrium.
[0105] S77. Through continuous training and optimization, a stable multi-ship collaborative obstacle avoidance and path planning strategy is eventually formed.
[0106] Optionally, the S8 specifically includes:
[0107] S81. Construct a preliminary path planning model, calculate the initial path of the ship based on the traditional optimal control method, and generate a path by solving the optimal control problem based on the quadratic cost function. Set the cost function J as
[0108]
[0109] Among them, p(t) represents the position of the ship at time t, g represents the target position, u(t) represents the control input, Q represents the position error weight matrix, R represents the control input weight matrix, and the optimal control strategy is obtained by solving the differential equation:
[0110]
[0111]
[0112] Where A and B represent the dynamic matrices of the system, and P(t) represents the solution of the Riccati equation;
[0113] Generate the initial path through π0(s0,g);
[0114] S82. During the path execution process, the path is adjusted based on the meta-reinforcement learning framework. The meta-reinforcement learning model updates the path planning strategy by quickly adapting to the current environmental changes:
[0115]
[0116] Among them, π meta (θ) represents the meta-strategy adjustment coefficient, θ represents the meta-strategy parameter, represents the task distribution, represents the probability density function of task distribution, r t represents the immediate return at time step t;
[0117] S83. Meta-strategy π meta (θ) is applied to the current ship status and the path planning strategy π is updated in real time t , adjust the path to avoid dynamic obstacles, and the updated path planning strategy is expressed as:
[0118] π t (s t |θ)=π meta (θ)·π0(s0,g);
[0119] Among them, s t represents the state vector, π t (s t |θ) represents the path updated based on the meta-strategy at time step t;
[0120] S84, introduce fuzzy logic control to further optimize path planning, especially in complex and uncertain environments. The fuzzy logic controller receives the current environmental state variable x t And the path planning output, generate the adjustment factor u t , the rule base of the fuzzy logic controller includes a number of fuzzy rules;
[0121] S85, the output u of the fuzzy logic controller t Applied to path planning, the final path planning strategy is updated as follows:
[0122] π final (s t |θ,u t )=π t (s t |θ)+u t ;
[0123] Among them, π final (s t |θ,u t ) represents the final path planning strategy after adjustment by the fuzzy logic controller;
[0124] S86. Repeat steps S81-S85 to adjust the path in real time to cope with dynamic obstacles and emergencies.
[0125] Optionally, the S9 specifically includes:
[0126] S91. Construct a recurrent neural network for processing ship motion time series data. The input sequence is the state vector x at time step t. t ;
[0127] S92, input sequence x t Input into the recurrent neural network unit, through the hidden state vector h t Capture dynamic information in time series;
[0128] S93, using the output of the recurrent neural network to calculate the heading angle and speed predictions;
[0129] S94, heading angle predicted by recurrent neural network and speed Calculate the control input of the ship at the next time step, including the thrust control amount and steering angle control The control input calculation formula is:
[0130]
[0131]
[0132] Among them, K v Indicates the gain coefficient of speed control, K θ Indicates the gain coefficient of heading angle control;
[0133] S95, the calculated control input and Applied to the ship's motion control system to adjust the ship's speed and heading in real time to ensure that the ship berths accurately along the predicted path;
[0134] S96. Through the feedback mechanism, the actual position, speed and heading of the ship are monitored in real time, and this information is input into the recurrent neural network for prediction and adjustment to form a closed-loop control system. The feedback error is defined as:
[0135]
[0136] Among them, e t represents the feedback error at time step t, p t represents the ship position at time step t, represents the predicted ship position, v t represents the ship speed at time step t, represents the predicted ship speed, θ t represents the ship heading vector at time step t, Represents the ship heading vector at time step t.
[0137] The beneficial effects of the present invention are:
[0138] First, the deployment of multimodal sensor systems enables ships to simultaneously obtain environmental information on land and underwater, including obstacle distribution in three-dimensional space, underwater terrain, and visual information around the ship. These data from different sources are effectively fused through a dual-stream deep neural network adaptive synchronization and calibration algorithm, solving the problems of asynchronous and spatial inconsistency of traditional sensor data, thereby ensuring the comprehensive use of multimodal data and greatly improving the system's perception accuracy and comprehensiveness of the environment.
[0139] Secondly, by using the Transformer-based self-attention mechanism, we can highly fuse the features extracted by different sensors to generate a unified feature space. This process enhances the model's ability to focus on key features in complex environments, thereby more accurately identifying and locating obstacles, target berths and other key environmental elements around the ship. Through the application of generative adversarial networks (GANs), the present invention also successfully generated high-fidelity virtual ocean environments and complex scenes, providing rich and diverse simulation data for training deep learning models. It not only reduces the difficulty and cost of collecting actual scene data, but also greatly improves the robustness and response capabilities of the model in the face of extreme environments or rare events.
[0140] In terms of multi-ship collaborative obstacle avoidance and path planning, the present invention uses a distributed deep deterministic policy gradient combined with game theory to successfully achieve collaborative operation of multiple ships in crowded waterways or narrow ports. This method ensures that each ship can take into account the behavior of other ships while making independent decisions, thereby avoiding mutual interference and improving overall navigation efficiency and safety. Especially in complex environments where multiple ships are operating simultaneously, the present invention can effectively prevent conflicts and achieve more intelligent and safer ship collaboration.
[0141] In addition, by introducing meta-reinforcement learning and fuzzy logic control, the present invention realizes adaptive adjustment of real-time path planning. Traditional path planning methods are often difficult to respond quickly in a dynamically changing environment. However, the present invention uses the self-adjustment ability of meta-reinforcement learning and combines fuzzy logic to handle complex environments, so that ships can flexibly respond to sudden obstacles or environmental changes, ensuring the continuity and safety of the navigation process, and enhancing the ship's adaptability and path optimization effect in a dynamic environment.
[0142] Finally, the application of the recurrent neural network control strategy enables the present invention to process the time series data of the ship's motion in real time, automatically adjust the ship's speed, heading and thrust, and ensure the accuracy of the ship during the berthing process. Combined with online learning technology, the system can continuously optimize itself during operation, adapt to new environmental changes and task requirements, and ensure stability and reliability in long-term operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0143] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0144] Figure 1 This is an overall flow chart of a ship obstacle avoidance and automatic berthing method based on a deep learning algorithm proposed by the present invention;
[0145] Figure 2 A schematic diagram of a multi-ship collaborative obstacle avoidance model for a ship obstacle avoidance and automatic berthing method based on a deep learning algorithm proposed in the present invention;
[0146] Figure 3 This is a flow chart of a hybrid power path planning system for a ship obstacle avoidance and automatic berthing method based on a deep learning algorithm proposed in the present invention. DETAILED DESCRIPTION
[0147] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0148] refer to Figure 1-3 , a ship obstacle avoidance and automatic berthing method based on deep learning algorithm, comprising the following steps:
[0149] S1. Deploy a multimodal sensor system on the ship, including lidar, sonar, visual camera, GPS and INS, collect data and build a dataset;
[0150] S2. Using the adaptive synchronization and calibration algorithm based on the dual-stream deep neural network, the collected data from different sensors in the data set are synchronized in time and space to ensure that the data from all sensors can be fused in a unified time and space reference system;
[0151] S3, preprocessing the calibrated dataset, including data cleaning, noise and outlier removal, and data enhancement;
[0152] S4. Perform feature extraction on the preprocessed data set, including using a 3D convolutional neural network to extract spatial features from lidar and sonar data, using a convolutional neural network to extract object features from visual data, and using a multi-layer perceptron to extract key features from GPS and INS data;
[0153] S5. Use the Transformer-based self-attention mechanism to fuse the extracted spatial features, object features, and key features to generate a unified feature space;
[0154] S6. Use the fused unified feature space to model the environment, identify and locate obstacles, target berths and key environmental elements around the ship, and use the adversarial generative network to generate virtual ocean environments and complex scenes;
[0155] S7. Use the distributed deep deterministic policy gradient combined with game theory to train the obstacle avoidance and path planning decision model of ships, and realize multi-ship collaborative obstacle avoidance and path optimization;
[0156] S8. Use meta-reinforcement learning combined with fuzzy logic control to design a hybrid path planning system that adjusts the path in real time to cope with dynamic obstacles and emergencies based on the preliminary path planning;
[0157] S9, based on the recurrent neural network control strategy, real-time processing of ship motion time series data, automatic adjustment of ship speed, heading and thrust, and accurate berthing;
[0158] S10. Use online learning technology to self-adjust and optimize according to new environments and situations, ensuring that obstacle avoidance and automatic berthing tasks in complex environments can be completed safely and accurately.
[0159] In this embodiment, the laser radar is used to capture three-dimensional environmental information, the sonar is used for underwater environmental perception, the camera is used to obtain visual information around the ship, and the GPS and INS are used to provide precise positioning, speed and heading information.
[0160] In this implementation, S2 specifically includes:
[0161] S21. Input the data set into two parallel deep neural networks, namely the time synchronization stream and the space calibration stream. The time synchronization stream handles the timestamp deviation problem of different sensor data. Suppose the multidimensional data vector collected by sensor i at time t is:
[0162]
[0163] in, represents the k-th dimension of sensor data collected by sensor i at time t, and n represents the dimension of the data;
[0164] S22. Calculate the time offset Δt of each sensor through the time synchronization flow model i , and correct the timestamp data to obtain the calibrated unified timestamp T i :
[0165] T i =t+Δt i ;
[0166] Among them, Δt i represents the time offset of sensor i;
[0167] S23, the spatial calibration flow is used to calibrate the spatial reference system of the sensor. Suppose the spatial data collected by sensor j is:
[0168]
[0169] Among them, S j (x,y,z) represents the multidimensional data vector collected by sensor j at the spatial coordinates (x,y,z), represents the k-th dimension of spatial data collected by sensor j at the spatial coordinates (x, y, z), and m represents the dimension of the data;
[0170] The spatial displacement vector ΔS of each sensor is calculated by the spatial calibration flow model j , get the calibrated spatial data S j ′ (x ′ ,y ′ ,z ′ ):
[0171] S j ′ (x ′ ,y ′ ,z ′ )=S j (x+Δx j ,y+Δy j ,z+Δz j );
[0172] Where Δx j represents the displacement vector in the x direction, Δy j represents the displacement vector in the y direction, Δz j represents the displacement vector in the z direction;
[0173] S24. During the training process, construct a composite loss function L:
[0174] L=αL t +βL s +γL c +δL f ;
[0175] Among them, α, β, γ and δ represent weight coefficients;
[0176]
[0177] Among them, L t represents the time deviation loss, N represents the number of sensors, represents the real time deviation of sensor i;
[0178]
[0179] Among them, L s represents the spatial deviation loss, represents the real spatial deviation of sensor j;
[0180]
[0181] Among them, L c represents the consistency loss between sensors, P represents the number of sensor pairs, represents the spatial displacement of sensor j to sensor k, represents the time offset of sensor i to sensor k;
[0182]
[0183] Among them, L f represents the environmental feature matching loss, Q represents the number of data samples, represents the calibrated data collected by the lth sensor at a specific time or position, represents the target environment feature data or the lth sample in the reference data set, φ(·) represents the environmental feature function extracted from the calibrated data and the target data, ensuring that the calibrated sensor data matches the known target environment features;
[0184] S25. Iteratively optimize the composite loss function L through the gradient descent method, thereby optimizing the time deviation, space deviation, consistency between sensors and matching degree of environmental characteristics at the same time, ensuring that the data of all sensors can be fused in a unified time and space reference system and consistent with the environmental characteristics;
[0185] S26. Output the data after time synchronization and space calibration.
[0186] In this implementation manner, S5 specifically includes:
[0187] S51, the spatial features, object features and key features extracted are respectively expressed as multimodal feature vectors, and the spatial features are in represents the i-th component in the feature vector, p represents the dimension of the spatial feature, and the object feature is in represents the jth component in the feature vector, q represents the dimension of the object feature, and the key feature is in represents the lth component in the feature vector, and r represents the dimension of the key feature;
[0188] S52, input these feature vectors into the Transformer-based self-attention mechanism to calculate the query matrix Q of the spatial features s , the bond matrix K s Sum value matrix V s :
[0189]
[0190] in, represents the weight matrix of the spatial feature query matrix, represents the weight matrix of the spatial feature key matrix, The weight matrix representing the spatial eigenvalue matrix;
[0191] Calculate the query matrix Q of object features o , the bond matrix K o Sum Matrix
[0192]
[0193] in, Represents the weight matrix of the object feature query matrix, represents the weight matrix of the object feature bond matrix, The weight matrix representing the eigenvalue matrix of the object;
[0194] Calculate the query matrix Q of key features o , the bond matrix K o Sum Matrix
[0195]
[0196] in, represents the weight matrix of the key feature query matrix, represents the weight matrix of the key feature key matrix, The weight matrix representing the key eigenvalue matrix;
[0197] S53, calculate the attention weights between multimodal features, the attention weight matrix A between spatial features and object features so :
[0198]
[0199] Among them, d k represents the dimension of the feature vector;
[0200] Attention weight matrix A between object features and key features ok :
[0201]
[0202] The attention weight matrix A between spatial features and key features sk :
[0203]
[0204] S54, based on the attention weight, the features are weighted and fused. The weighted feature representation Z after the fusion of spatial features and object features so :
[0205] Z so =A so ·V o ;
[0206] Weighted feature representation Z after fusion of object features and key features ok :
[0207] Z ok =A ok ·V k ;
[0208] The weighted feature representation Z after the fusion of spatial features and key features sk :
[0209] Z sk =A sk ·V k ;
[0210] S55, perform linear transformation and activation processing on the weighted fusion feature representation to obtain the final unified feature space F final :
[0211] F final =σ(W f ·(Z so +Z ok +Z sk )+b f );
[0212] Among them, W f represents the weight matrix of the linear transformation, b f represents the bias vector of the linear transformation, and σ represents the activation function.
[0213] In this implementation manner, S6 specifically includes:
[0214] S61, the unified feature space F obtained in S55 final Input into the environment modeling network, extract high-level environmental features through the convolutional neural network, and generate an environmental feature map to obtain the output C of the lth convolutional layer l ;
[0215] S62, using environmental feature map C l The information in the environment is used to classify and locate obstacles, target berths and key environmental elements through a multi-layer perceptron:
[0216] O cls =Softmax(W cls ·C l +b cls );
[0217] Among them, O cls represents the classification result, represents the probability distribution of obstacles, berths and key environmental elements, and W cls represents the weight matrix of the classification layer, b cls Represents the bias vector of the classification layer;
[0218] O loc =W loc ·C l +b loc ;
[0219] Among them, O loc represents the positioning result, indicating the spatial coordinates of obstacles, berths and key environmental elements, W loc represents the weight matrix of the positioning layer, b loc Represents the bias vector of the positioning layer;
[0220] S63. Using the classification results and positioning results as a basis, the generator network is used to generate virtual ocean environments and complex scenes. The generator network converts the random noise vector z into a realistic environment image through a convolutional transpose layer, which is expressed as:
[0221] G(z)=Deconv(z,W g )+b g ;
[0222] Among them, G(z) represents the generated virtual ocean environment image, W g represents the weight matrix of the generator network, b g represents the bias vector of the generator network;
[0223] S64, using a discriminator network to evaluate the generated virtual environment image, the discriminator network receives the real environment image and the generated virtual environment image as input, and outputs a classification result, which is expressed as:
[0224] D(x)=Sigmoid(W d ·x+b d );
[0225] Among them, D(x) represents the discrimination result, which represents the probability that the input image is a real environment image, x represents the input image, and Wd represents the weight matrix of the discriminator network, b d represents the bias vector of the discriminator network;
[0226] S65. The generator and the discriminator are trained through the adversarial generative network so that the generated virtual ocean environment image gradually approaches the real environment, and finally a virtual ocean environment and a complex scene are generated for the training and optimization of the ship obstacle avoidance and automatic berthing algorithm.
[0227] In this implementation manner, the S7 specifically includes:
[0228] S71. Construct a multi-agent system, where each agent represents a ship, and the state vector s of agent i i for:
[0229] s i =[p i ,v i ,o i ];
[0230] Among them, p i Indicates position, v i Indicates speed, o i Indicates surrounding obstacle information;
[0231] S72. Define a policy network π for each agent i (s i |θ i ), where θ i Represents the parameters of the policy network, which receives the state vector s of agent i i As input, and output action a of agent i i ;
[0232] S73. Define a Q-value function Q for each agent i (s i ,a i |φ i ), which estimates the expected cumulative reward for a given state and action:
[0233]
[0234] Among them, φ i represents the parameter of the Q value function, γ represents the discount factor, r i (t) represents the immediate reward of agent i at time step t;
[0235] S74, update the parameters of the policy network and Q-value network through distributed training. For each agent, select actions according to the current strategy, interact with the environment, and collect state transition samples (s i ,ai ,r i ,s′ i ), where s′ i Represents the new state after executing the action, using the loss function L(φ i ) Update the parameters φ of the Q-value network i :
[0236]
[0237] Among them, the target value y i Determined by the Bellman equation, expressed as:
[0238] y i =r i +γQ i (s′ i ,π i (s ′ i |θ i )|φ i );
[0239] S75. After fixing the Q value network, use the policy gradient method to update the policy network parameters θ i , the goal is to maximize the expected return;
[0240] S76. In a distributed system, each agent shares the updated information of the strategy network and uses the Nash equilibrium strategy in game theory for collaborative learning, which is specifically defined as:
[0241]
[0242] in, represents the optimal strategy of agent i under Nash equilibrium conditions, represents the Q value of other agents j under the optimal strategy. This formula means that when agent i chooses its strategy, it must maximize its own Q value and consider the strategies of other agents to achieve a global Nash equilibrium.
[0243] S77. Through continuous training and optimization, a stable multi-ship collaborative obstacle avoidance and path planning strategy is eventually formed.
[0244] In this implementation manner, S8 specifically includes:
[0245] S81. Construct a preliminary path planning model, calculate the initial path of the ship based on the traditional optimal control method, and generate a path by solving the optimal control problem based on the quadratic cost function. Set the cost function J as
[0246]
[0247] Among them, p(t) represents the position of the ship at time t, g represents the target position, u(t) represents the control input, Q represents the position error weight matrix, R represents the control input weight matrix, and the optimal control strategy is obtained by solving the differential equation:
[0248]
[0249]
[0250] Where A and B represent the dynamic matrices of the system, and P(t) represents the solution of the Riccati equation;
[0251] Generate the initial path through π0(s0,g);
[0252] S82. During the path execution process, the path is adjusted based on the meta-reinforcement learning framework. The meta-reinforcement learning model updates the path planning strategy by quickly adapting to the current environmental changes:
[0253]
[0254] Among them, π meta (θ) represents the meta-strategy adjustment coefficient, θ represents the meta-strategy parameter, represents the task distribution, represents the probability density function of task distribution, r t represents the immediate return at time step t;
[0255] S83. Meta-strategy π meta (θ) is applied to the current ship status and the path planning strategy π is updated in real time t , adjust the path to avoid dynamic obstacles, and the updated path planning strategy is expressed as:
[0256] π t (s t |θ)=π meta (θ)·π0(s0,g);
[0257] Among them, s t represents the state vector, π t (s t |θ) represents the path updated based on the meta-strategy at time step t;
[0258] S84, introduce fuzzy logic control to further optimize path planning, especially in complex and uncertain environments. The fuzzy logic controller receives the current environmental state variable x t And the path planning output, generate the adjustment factor u t , the rule base of the fuzzy logic controller includes a number of fuzzy rules;
[0259] S85, the output u of the fuzzy logic controller t Applied to path planning, the final path planning strategy is updated as follows:
[0260] π final (s t |θ,u t )=π t (s t |θ)+u t ;
[0261] Among them, π final (s t |θ,u t ) represents the final path planning strategy after adjustment by the fuzzy logic controller;
[0262] S86. Repeat steps S81-S85 to adjust the path in real time to cope with dynamic obstacles and emergencies.
[0263] In this implementation manner, the S9 specifically includes:
[0264] S91. Construct a recurrent neural network for processing ship motion time series data. The input sequence is the state vector x at time step t. t ;
[0265] S92, input sequence x t Input into the recurrent neural network unit, through the hidden state vector h t Capture dynamic information in time series;
[0266] S93, using the output of the recurrent neural network to calculate the heading angle and speed predictions;
[0267] S94, heading angle predicted by recurrent neural network and speed Calculate the control input of the ship at the next time step, including the thrust control amount and steering angle control The control input calculation formula is:
[0268]
[0269]
[0270] Among them, K v Indicates the gain coefficient of speed control, K θ Indicates the gain coefficient of heading angle control;
[0271] S95, the calculated control input and Applied to the ship's motion control system to adjust the ship's speed and heading in real time to ensure that the ship berths accurately along the predicted path;
[0272] S96. Through the feedback mechanism, the actual position, speed and heading of the ship are monitored in real time, and this information is input into the recurrent neural network for prediction and adjustment to form a closed-loop control system. The feedback error is defined as:
[0273]
[0274] Among them, e t represents the feedback error at time step t, p t represents the ship position at time step t, represents the predicted ship position, v t represents the ship speed at time step t, represents the predicted ship speed, θ t represents the ship heading vector at time step t, Represents the ship heading vector at time step t.
[0275] Embodiment 1:
[0276] In order to verify the feasibility of the present invention in implementation, the present invention is deployed in a complex port environment to assist a large container ship to safely avoid obstacles and accurately berth in a crowded waterway. The port is located on the eastern coast of China, with a vast port area, large ship traffic, and complex and changeable waterways. The terrain around the port is undulating, the underwater terrain is relatively complex, and the frequent tides and changeable weather make the port environment even more unpredictable. In this context, traditional automated navigation and berthing systems are difficult to cope with complex environmental changes and emergencies, so a more intelligent solution is urgently needed.
[0277] In order to verify the effectiveness and advantages of the present invention, we conducted a three-month test on a 300-meter-long container ship at the port. The multimodal sensor system mentioned in the present invention was deployed on the ship, including lidar, sonar, visual camera, GPS and INS. The system can collect three-dimensional spatial information of the surrounding environment, underwater obstacles, visual data around the ship, and accurate positioning and heading information in real time. In actual operation, the ship needs to cooperate with other ships in crowded waterways to avoid collisions, and also needs to berth accurately at the designated berth.
[0278] During the test, we used the dual-stream deep neural network adaptive synchronization and calibration algorithm to synchronize and calibrate the data collected by multimodal sensors in time and space to ensure high-precision data fusion. The system extracts and fuses features from various sensor data through a Transformer-based self-attention mechanism to generate a unified feature space. In a complex port environment, this feature fusion effectively improves the system's overall perception of the environment. By modeling the environment in the fused unified feature space, the system can accurately identify and locate obstacles, target berths, and other key environmental elements around the ship.
[0279] In order to cope with the frequent entry and exit of ships in the port and the complex tidal changes, the present invention combines the distributed deep deterministic policy gradient and game theory methods to train the obstacle avoidance and path planning decision model of the ship. This model enables the ship to dynamically adjust its own course and speed when cooperating with other ships to avoid obstacles, so as to avoid collisions with other ships. Especially in the case of multiple ships entering and leaving the port at the same time, the system performs well. On a crowded morning, 15 ships entered the port area at the same time, and our system successfully guided all ships to enter the berth safely through real-time analysis and decision-making, avoiding possible collision incidents.
[0280] In the path planning process, the present invention introduces a method of combining meta-reinforcement learning with fuzzy logic control. Through meta-reinforcement learning, the system can quickly adapt to changes in the environment and adjust the planned path in real time during the path execution process. Fuzzy logic control further optimizes the decision-making process of the system, especially when dealing with complex environmental information in the port, such as dealing with sudden obstacles or unexpected situations. Through the combination of these two technologies, the ship was able to stably stay on the planned route during the test, and accurately avoid buoys, other ships and underwater obstacles even in stormy weather or low visibility.
[0281] In terms of precise berthing, the present invention adopts a time series control strategy based on recursive neural networks to process the motion data of the ship in real time. Through this strategy, the ship can automatically adjust its speed, heading and thrust to ensure that it is accurately berthed at the designated berth. It is worth mentioning that in a night operation, facing sudden foggy weather, visibility dropped below 50 meters. The system can still identify the exact location of the berth through data fusion and environmental modeling of multimodal sensors, and steadily berth the ship at the berth. The operation time is only half of that of traditional manual operation, and the berthing error is controlled within 5 centimeters, which is far better than the error range of traditional automatic berthing systems.
[0282] Table 1 Performance comparison of ship obstacle avoidance and automatic berthing method based on deep learning and traditional system
[0283]
[0284] Table 1 shows the performance of the present invention and the traditional system in key performance indicators such as obstacle avoidance success rate, berthing operation time, berthing error and emergency response time, which clearly shows the significant advantages of the present invention in many aspects.
[0285] First, in terms of obstacle avoidance success rate, the obstacle avoidance success rate of the present invention reaches 99.5%, which is 9.5 percentage points higher than the 90% of the traditional system. This improvement is due to the application of multimodal sensor fusion and deep learning algorithms, which enable the system to more accurately identify and avoid obstacles in complex marine environments.
[0286] Secondly, in terms of berthing operation time, the average berthing time of the present invention is 30 minutes, which is 20 minutes shorter than the 50 minutes of the traditional system. This improvement is mainly due to the time series processing capability of the recurrent neural network, which enables the ship to adjust the speed and course more efficiently and achieve fast and accurate berthing.
[0287] In addition, the present invention also performs well in berthing accuracy, with an average berthing error of only 5 cm, significantly better than the 20 cm of the traditional system. Through real-time path optimization and fuzzy logic control, the present invention can maintain high-precision operation in complex and dynamic environments.
[0288] Finally, in terms of the response speed to emergencies, the reaction time of the present invention is only 2 seconds, while the traditional system requires more than 5 seconds. This 3-second difference is crucial in emergency situations, indicating that the present invention has obvious advantages in dynamic adjustment and rapid response.
[0289] In summary, the data in this comparison table fully demonstrates the excellent performance of the present invention in ship obstacle avoidance and automatic berthing tasks. Through the combination of deep learning and multiple advanced technologies, the present invention not only improves operational efficiency and safety, but also significantly enhances the environmental adaptability of the system, providing reliable technical support for the development of future intelligent ships.
[0290] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A ship obstacle avoidance and automatic berthing method based on deep learning algorithm, characterized in that: The steps include: S1. Deploy a multimodal sensor system on the ship, including lidar, sonar, visual camera, GPS and INS, collect data and build a dataset; S2, using the adaptive synchronization and calibration algorithm based on the two-stream deep neural network to perform time synchronization and spatial calibration on the collected data from different sensors in the dataset; S3, preprocessing the calibrated dataset, including data cleaning, noise and outlier removal, and data enhancement; S4. Perform feature extraction on the preprocessed data set, including using a 3D convolutional neural network to extract spatial features from lidar and sonar data, using a convolutional neural network to extract object features from visual data, and using a multi-layer perceptron to extract key features from GPS and INS data; S5. Use the Transformer-based self-attention mechanism to fuse the extracted spatial features, object features, and key features to generate a unified feature space; S6. Use the fused unified feature space to model the environment, identify and locate obstacles, target berths and key environmental elements around the ship, and use the adversarial generative network to generate virtual ocean environments and complex scenes; S7. Use the distributed deep deterministic policy gradient combined with game theory to train the obstacle avoidance and path planning decision model of ships, and realize multi-ship collaborative obstacle avoidance and path optimization; S8. Use meta-reinforcement learning combined with fuzzy logic control to design a hybrid path planning system that adjusts the path in real time to cope with dynamic obstacles and emergencies based on the preliminary path planning; S9, based on the recurrent neural network control strategy, real-time processing of ship motion time series data, automatic adjustment of ship speed, heading and thrust, and accurate berthing; S10. Use online learning technology to adjust and optimize yourself according to new environments and situations.
2. A ship obstacle avoidance and automatic berthing method based on deep learning algorithm according to claim 1, characterized in that: The lidar is used to capture three-dimensional environmental information, the sonar is used for underwater environmental perception, the camera is used to obtain visual information around the ship, and the GPS and INS are used to provide precise positioning, speed and heading information.
3. The method for ship obstacle avoidance and automatic berthing based on deep learning algorithm according to claim 1, characterized in that: The S2 specifically includes: S21. Input the data set into two parallel deep neural networks, namely the time synchronization stream and the space calibration stream. The time synchronization stream handles the timestamp deviation problem of different sensor data. Suppose the multidimensional data vector collected by sensor i at time t is: in, represents the k-th dimension of sensor data collected by sensor i at time t, and n represents the dimension of the data; S22. Calculate the time offset Δt of each sensor through the time synchronization flow model i , and correct the timestamp data to obtain the calibrated unified timestamp T i : T i =t+Δt i ; Among them, Δt i represents the time offset of sensor i; S23, the spatial calibration flow is used to calibrate the spatial reference system of the sensor. Suppose the spatial data collected by sensor j is: Among them, S j (x,y,z) represents the multidimensional data vector collected by sensor j at the spatial coordinates (x,y,z), represents the k-th dimension of spatial data collected by sensor j at the spatial coordinates (x, y, z), and m represents the dimension of the data; The spatial displacement vector ΔS of each sensor is calculated by the spatial calibration flow model j , get the calibrated spatial data S j ′(x′,y′,z′): Where Δx j represents the displacement vector in the x direction, Δy j represents the displacement vector in the y direction, Δz j represents the displacement vector in the z direction; S24. During the training process, construct a composite loss function L: L=αL t +βL s +γL c +δL f ; Among them, α, β, γ and δ represent weight coefficients; Among them, L t represents the time deviation loss, N represents the number of sensors, represents the real time deviation of sensor i; Among them, L s represents the spatial deviation loss, represents the real spatial deviation of sensor j; Among them, L c represents the consistency loss between sensors, P represents the number of sensor pairs, ΔS jk represents the spatial displacement of sensor j relative to sensor k, Δt ik represents the time offset of sensor i to sensor k; Among them, L f represents the environmental feature matching loss, Q represents the number of data samples, represents the calibrated data collected by the lth sensor at a specific time or position, represents the target environmental feature data or the lth sample in the reference data set, φ(·) represents the environmental feature function extracted from the calibrated data and the target data; S25, iteratively optimizing the composite loss function L by gradient descent method; S26. Output the data after time synchronization and space calibration.
4. A ship obstacle avoidance and automatic berthing method based on deep learning algorithm according to claim 1, characterized in that: The S5 specifically includes: S51, the spatial features, object features and key features extracted are respectively expressed as multimodal feature vectors, and the spatial features are in represents the i-th component in the feature vector, p represents the dimension of the spatial feature, and the object feature is in represents the jth component in the feature vector, q represents the dimension of the object feature, and the key feature is in represents the lth component in the feature vector, and r represents the dimension of the key feature; S52, input these feature vectors into the Transformer-based self-attention mechanism to calculate the query matrix Q of the spatial features s , the bond matrix K s Sum value matrix V s : in, represents the weight matrix of the spatial feature query matrix, represents the weight matrix of the spatial feature key matrix, The weight matrix representing the spatial eigenvalue matrix; Calculate the query matrix Q of object features o , the bond matrix K o Sum Matrix in, Represents the weight matrix of the object feature query matrix, represents the weight matrix of the object feature bond matrix, The weight matrix representing the eigenvalue matrix of the object; Calculate the query matrix Q of key features o , the bond matrix K o Sum Matrix in, represents the weight matrix of the key feature query matrix, represents the weight matrix of the key feature key matrix, The weight matrix representing the key eigenvalue matrix; S53, calculate the attention weights between multimodal features, the attention weight matrix A between spatial features and object features so : Among them, d k represents the dimension of the feature vector; Attention weight matrix A between object features and key features ok : The attention weight matrix A between spatial features and key features sk : S54, based on the attention weight, the features are weighted and fused. The weighted feature representation Z after the fusion of spatial features and object features so : From so =A so ·In o ; Weighted feature representation Z after fusion of object features and key features ok : From ok =A ok ·In k ; The weighted feature representation Z after the fusion of spatial features and key features sk : From sk =A sk ·In k ; S55, perform linear transformation and activation processing on the weighted fusion feature representation to obtain the final unified feature space F final : F final =σ(W f ·(WITH so +Z ok +Z sk )+b f ); Among them, W f represents the weight matrix of the linear transformation, b f represents the bias vector of the linear transformation, and σ represents the activation function.
5. A ship obstacle avoidance and automatic berthing method based on deep learning algorithm according to claim 4, characterized in that: The S6 specifically includes: S61, the unified feature space F obtained in S55 final Input into the environment modeling network, extract high-level environmental features through the convolutional neural network, and generate an environmental feature map to obtain the output C of the lth convolutional layer l ; S62, using environmental feature map C l The information in the environment is used to classify and locate obstacles, target berths and key environmental elements through a multi-layer perceptron: O cls =Softmax(W cls ·C l +b cls ); Among them, O cls represents the classification result, represents the probability distribution of obstacles, berths and key environmental elements, and W cls represents the weight matrix of the classification layer, b cls Represents the bias vector of the classification layer; O loc =W loc ·C l +b loc ; Among them, O loc represents the positioning result, indicating the spatial coordinates of obstacles, berths and key environmental elements, W loc represents the weight matrix of the positioning layer, b loc Represents the bias vector of the positioning layer; S63. Using the classification results and positioning results as a basis, the generator network is used to generate virtual ocean environments and complex scenes. The generator network converts the random noise vector z into a realistic environment image through a convolutional transpose layer, which is expressed as: G(z)=Deconv(z,W g )+b g ; Among them, G(z) represents the generated virtual ocean environment image, W g represents the weight matrix of the generator network, b g represents the bias vector of the generator network; S64, using a discriminator network to evaluate the generated virtual environment image, the discriminator network receives the real environment image and the generated virtual environment image as input, and outputs a classification result, which is expressed as: D(x)=Sigmoid(W d ·x+b d ); Among them, D(x) represents the discrimination result, which represents the probability that the input image is a real environment image, x represents the input image, and W d represents the weight matrix of the discriminator network, b d represents the bias vector of the discriminator network; S65. The generator and the discriminator are trained through the adversarial generative network, so that the generated virtual ocean environment image gradually approaches the real environment, and finally a virtual ocean environment and a complex scene are generated.
6. The method for ship obstacle avoidance and automatic berthing based on deep learning algorithm according to claim 1, characterized in that: The S7 specifically includes: S71. Construct a multi-agent system, where each agent represents a ship, and the state vector s of agent i i for: with i =[p i ,in i ,o i ]; Among them, p i Indicates position, v i Indicates speed, o i Indicates surrounding obstacle information; S72. Define a policy network π for each agent i (s i |θ i ), where θ i Represents the parameters of the policy network, which receives the state vector s of agent i i As input, and output action a of agent i i ; S73. Define a Q-value function Q for each agent i (s i ,a i |φ i ), which estimates the expected cumulative reward for a given state and action: Among them, φ i represents the parameter of the Q value function, γ represents the discount factor, r i (t) represents the immediate reward of agent i at time step t; S74, update the parameters of the policy network and Q-value network through distributed training. For each agent, select actions according to the current strategy, interact with the environment, and collect state transition samples (s i ,a i ,r i ,s′ i ), where s′ i Represents the new state after executing the action, using the loss function L(φ i ) Update the parameters φ of the Q-value network i : Among them, the target value y i Determined by the Bellman equation, expressed as: y i =r i +γQ i (s′ i ,p i (s′ i |θ i )|φ i ); S75. After fixing the Q value network, use the policy gradient method to update the policy network parameters θ i , the goal is to maximize the expected return; S76. In a distributed system, each agent shares the updated information of the strategy network and uses the Nash equilibrium strategy in game theory for collaborative learning, which is specifically defined as: in, represents the optimal strategy of agent i under Nash equilibrium conditions, represents the Q value of other agent j under the optimal strategy; S77. Through continuous training and optimization, a stable multi-ship collaborative obstacle avoidance and path planning strategy is eventually formed.
7. The method for ship obstacle avoidance and automatic berthing based on deep learning algorithm according to claim 1, characterized in that: The S8 specifically includes: S81. Construct a preliminary path planning model, calculate the initial path of the ship based on the traditional optimal control method, and generate a path by solving the optimal control problem based on the quadratic cost function. Set the cost function J as Among them, p(t) represents the position of the ship at time t, g represents the target position, u(t) represents the control input, Q represents the position error weight matrix, R represents the control input weight matrix, and the optimal control strategy is obtained by solving the differential equation: Where A and B represent the dynamic matrices of the system, and P(t) represents the solution of the Riccati equation; Generate the initial path through π0(s0,g); S82. During the path execution process, the path is adjusted based on the meta-reinforcement learning framework. The meta-reinforcement learning model updates the path planning strategy by quickly adapting to the current environmental changes: Among them, π meta (θ) represents the meta-strategy adjustment coefficient, θ represents the meta-strategy parameter, represents the task distribution, represents the probability density function of task distribution, r t represents the immediate return at time step t; S83. Meta-strategy π meta (θ) is applied to the current ship status and the path planning strategy π is updated in real time t , adjust the path to avoid dynamic obstacles, and the updated path planning strategy is expressed as: p t (s t |θ)=π meta (θ)·π0(s0,g); Among them, s t represents the state vector, π t (s t |θ) represents the path updated based on the meta-strategy at time step t; S84, introduce fuzzy logic control to further optimize path planning, especially in complex and uncertain environments. The fuzzy logic controller receives the current environmental state variable x t And the path planning output, generate the adjustment factor u t , the rule base of the fuzzy logic controller includes a number of fuzzy rules; S85, the output u of the fuzzy logic controller t Applied to path planning, the final path planning strategy is updated as follows: p final (s t |θ,u t )=π t (s t |θ)+u t ; Among them, π final (s t |θ,u t ) represents the final path planning strategy after adjustment by the fuzzy logic controller; S86. Repeat steps S81-S85 to adjust the path in real time to cope with dynamic obstacles and emergencies.
8. The method for ship obstacle avoidance and automatic berthing based on deep learning algorithm according to claim 1, characterized in that: The S9 specifically includes: S91. Construct a recurrent neural network for processing ship motion time series data. The input sequence is the state vector x at time step t. t ; S92, input sequence x t Input into the recurrent neural network unit, through the hidden state vector h t Capture dynamic information in time series; S93, using the output of the recurrent neural network to calculate the heading angle and speed predictions; S94, heading angle predicted by recurrent neural network and speed Calculate the control input of the ship at the next time step, including the thrust control amount and steering angle control The control input calculation formula is: Among them, K v Indicates the gain coefficient of speed control, K θ Indicates the gain coefficient of heading angle control; S95, the calculated control input and Applied to ship motion control systems to adjust the ship's speed and heading in real time; S96. Through the feedback mechanism, the actual position, speed and heading of the ship are monitored in real time, and this information is input into the recurrent neural network for prediction and adjustment to form a closed-loop control system. The feedback error is defined as: Among them, e t represents the feedback error at time step t, p t represents the ship position at time step t, represents the predicted ship position, v t represents the ship speed at time step t, represents the predicted ship speed, θ t represents the ship heading vector at time step t, Represents the ship heading vector at time step t.
Citation Information
Patent Citations
Ship-shore collaborative simulation system for intelligent navigation and safety of ship
CN111913406A
Unmanned ship multi-sensor situation awareness and collision avoidance decision-making method
CN116740575A
Autonomous obstacle avoidance control system for unmanned ship
CN117420835A
Ship anti-collision method and system based on laser point cloud and video image fusion perception
CN117470249A
Unmanned ship port parking and obstacle avoidance algorithm based on reinforcement learning, parking and obstacle avoidance system and readable storage medium
CN117666590A
Cited By
Underwater robot intelligent control method and system based on deep learning
CN119270882A
An intelligent control method and system for underwater robots based on deep learning
CN119270882B
Ship radar identification method based on deep learning
CN119780871A
Intelligent auxiliary decision-making method for ship entering and leaving port and berthing and leaving berthing based on multi-source data
CN119784102A
Target collaborative sensing method and system based on intelligent fleet navigation
CN120047877A
