Submersible buoyancy adjustment and depth control method and system based on machine learning

By constructing a buoyancy adjustment model based on machine learning and combining it with a PID control algorithm, the problem of traditional methods being difficult to adapt to complex underwater environments is solved, and precise control of the submersible's buoyancy and depth is achieved.

CN119336050AActive Publication Date: 2025-01-21CHINA STATE SHIPBUILDING CORP LTD RESEARCH INSTITUTE 719

Patent Information

Application Number
CN202411437908.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-21
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

Traditional submersible buoyancy adjustment methods are difficult to adapt to complex and changeable underwater environments, cannot accurately analyze complex sensor data, and lack adaptive learning ability, resulting in poor buoyancy adjustment effect.

Method used

A method based on machine learning is used to collect environmental and submersible status data through a sensor network, perform denoising and standardization processing, build an initial buoyancy adjustment model and train it through historical data, combined with a PID control algorithm to achieve dynamic adjustment of buoyancy and depth.

Benefits of technology

The accuracy and adaptability of the buoyancy regulation of the submersible is improved, the deep control is optimized, and the operating capacity and control accuracy of the submersible in a complex underwater environment are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336050A_ABST
    Figure CN119336050A_ABST
Patent Text Reader

Abstract

The invention relates to the field of underwater vehicles, and provides a submersible buoyancy adjustment and depth control method and system based on machine learning, and the method comprises the following steps: collecting original data through a sensor network; performing denoising processing and standardization processing on the original data to obtain external environment data and submersible state data; determining a current buoyancy state of the submersible based on the submersible state data and the external environment data, and calculating a compensation buoyancy deviation between the current buoyancy state and a preset target buoyancy state; inputting the compensation buoyancy deviation into a buoyancy adjusting model to obtain a buoyancy adjusting instruction, and dynamically adjusting the displacement of the submersible based on the buoyancy adjusting instruction; the compensation depth deviation between the submersible and the target is calculated based on the depth data, a vertical propulsion control instruction is generated through a PID control algorithm according to the compensation depth deviation, the vertical propulsion control instruction is output to the vertical propeller, and the depth of the submersible is dynamically adjusted through the vertical propeller. Accurate control over the buoyancy and the depth of the submersible is achieved, the buoyancy adjusting precision and adaptability are improved, depth control is optimized, and the operation capacity of the submersible in the complex underwater environment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of underwater vehicles, and in particular to a method and system for adjusting the buoyancy and controlling the depth of a submersible based on machine learning. Background Art

[0002] During underwater operations, a submersible needs to precisely control its buoyancy and depth to achieve stable hovering and precise positioning. Traditional submersible buoyancy adjustment methods mainly rely on simple PID control, which is difficult to adapt to the complex and changing underwater environment.

[0003] In terms of buoyancy adjustment and depth adjustment, traditional methods have difficulty in accurately analyzing complex sensor data, cannot accurately determine the current buoyancy state of the submersible, lack adaptive learning capabilities, and cannot continuously optimize buoyancy adjustment strategies based on historical data. At the same time, fixed control algorithms are difficult to adapt to changes in different environmental factors, resulting in poor results in buoyancy adjustment and depth adjustment. Summary of the invention

[0004] In view of this, the present invention proposes a submersible buoyancy adjustment and depth control method and system based on machine learning, which solves the problem that traditional buoyancy control algorithms are difficult to adapt to changes in different environmental factors.

[0005] The technical solution of the present invention is implemented as follows: In the first aspect, the present invention provides a method for adjusting the buoyancy and controlling the depth of a submersible based on machine learning, comprising the following steps:

[0006] S1, collecting original external environment data and original submersible status data through a sensor network, wherein the original external environment data includes depth data;

[0007] S2, performing denoising and standardization processing on the original external environment data and the original submersible status data to obtain external environment data and submersible status data;

[0008] S3, determining the current buoyancy state of the submersible based on the submersible state data and the external environment data, and calculating the compensating buoyancy deviation between the current buoyancy state and a preset target buoyancy state;

[0009] S4, constructing an initial buoyancy adjustment model, training the initial buoyancy adjustment model through historical buoyancy adjustment data, adjusting model parameters of the initial buoyancy adjustment model, and performing model evaluation on the trained initial buoyancy adjustment model to obtain a buoyancy adjustment model;

[0010] S5, inputting the compensated buoyancy deviation into the buoyancy adjustment model to obtain a buoyancy adjustment instruction, and dynamically adjusting the displacement of the submersible based on the buoyancy adjustment instruction;

[0011] S6, calculates the compensated depth deviation between the submersible and the target based on the depth data, generates a vertical propulsion control instruction through a PID control algorithm according to the compensated depth deviation, outputs the vertical propulsion control instruction to the vertical thruster, and dynamically adjusts the depth of the submersible through the vertical thruster.

[0012] On the basis of the above technical solution, preferably, step S1 includes:

[0013] S11, collecting raw external environment data through a pressure sensor, a temperature sensor, and a depth sensor, wherein the raw external environment data includes water pressure data and water temperature data;

[0014] S12, collecting original submersible status data through an acceleration sensor and an attitude sensor, the original submersible status data including motion acceleration data and attitude angle data, and fusing the data collected by the acceleration sensor and the attitude sensor using a Kalman filter algorithm to eliminate the system error of a single sensor.

[0015] Based on the above technical solution, preferably, step S2 includes:

[0016] S21, performing wavelet decomposition on the original external environment data and the original submersible state data to obtain high-frequency coefficients, performing threshold processing on the high-frequency coefficients to obtain preliminary screening high-frequency coefficients, performing wavelet reconstruction on the preliminary screening high-frequency coefficients to obtain denoised external environment data and denoised submersible state data after denoising;

[0017] S22, calculating the first quartile Q1 and the third quartile Q3 of the denoised external environment data and the denoised submersible state data, calculating the difference between the first quartile Q1 and the third quartile Q3 as the interquartile range IQR, marking the data points in the denoised external environment data and the denoised submersible state data that are beyond a preset range as outliers, and replacing the outliers by linear interpolation to obtain interpolated external environment data and interpolated submersible state data, wherein the preset range is (Q1-1.5*IQR, Q3+1.5*IQR);

[0018] S23, determining the maximum value and the minimum value of each feature of the interpolated external environment data and the interpolated submersible status data, and normalizing each data point of the interpolated external environment data and the interpolated submersible status data by Min-Max normalization.

[0019] Based on the above technical solution, preferably, step S4 includes:

[0020] S41, constructing an initial buoyancy adjustment model based on a deep neural network, the initial buoyancy adjustment model comprising an input layer, an output layer and multiple hidden layers, the input layer is used to receive a compensation buoyancy deviation, the output layer is used to output a buoyancy adjustment instruction, the multiple hidden layers use a ReLU activation function, and the number of neurons in the hidden layer is adjusted based on the number of input features of the input layer;

[0021] S42, acquiring historical buoyancy adjustment data, dividing the historical buoyancy adjustment data into a training set and a validation set, training the initial buoyancy adjustment model through the training set, optimizing the model parameters of the initial buoyancy adjustment model through a stochastic gradient descent algorithm, using batch normalization to accelerate the training process, and dynamically adjusting the learning rate according to a learning rate decay strategy;

[0022] S43, the trained model was evaluated by the root mean square error, and the generalization ability of the model was evaluated by the K-fold cross-validation method.

[0023] On the basis of the above technical solution, preferably, step S4 further includes:

[0024] During the forward propagation of the initial buoyancy adjustment model, the calculation formula for the output of the i-th hidden layer is:

[0025] z i =W i ·x i +b i +S i ·(U i ·x i );

[0026] y i =sigmoid(BN(z i ));

[0027] S i =tanh(V i ·x i +c i );

[0028]

[0029] Among them, z i is the input of the i-th hidden layer after linear transformation, x i is the input of the i-th hidden layer, W i is the weight matrix of the i-th hidden layer, b i is the bias of the i-th hidden layer, S i is the adaptive coefficient adjustment matrix of the i-th hidden layer, U i is the weight of the adaptive coefficient adjustment matrix, y iis the input of the i-th hidden layer, sigmoid(·) is the activation function, BN(·) is batch normalization, tanh(·) is the hyperbolic tangent activation function, V i is the weight generation matrix of the adaptive coefficient adjustment matrix of the i-th hidden layer, c i is the bias of the adaptive coefficient adjustment matrix of the i-th hidden layer, is the final output of the output layer when the input feature is X(z), W o is the weight matrix of the output layer, x N is the output of the last hidden layer, b o is the bias of the output layer;

[0030] The calculation formula of the stochastic gradient descent algorithm is:

[0031]

[0032] Among them, m t+1 and v t+1 are the first-order momentum and second-order momentum of the next time step, m t and v t are the first-order momentum and second-order momentum of the current time step, β1 and β2 are the first-order momentum decay rate and second-order momentum decay rate, θ t are the model parameters at the current time step, is the gradient of the loss function with respect to the model parameters, and are the estimated values ​​after first-order momentum and second-order momentum bias correction, τ is the anti-zero constant, θ t+1 is the model parameter of the next time step, η is the learning rate, and λ is the L2 regularization coefficient;

[0033] The calculation formula of the root mean square error RMSE is:

[0034]

[0035] Among them, y j is the true value of the jth sample, is the model prediction value of the jth sample, n is the number of samples, ω j is the dynamic weight of buoyancy change of the jth sample, γ is the buoyancy weight adjustment coefficient, is the instantaneous rate of change of buoyancy of the jth sample.

[0036] On the basis of the above technical solution, preferably, step S6 includes:

[0037] S61, calculating a depth deviation between the submersible and the target position based on the depth data, and compensating the depth deviation based on environmental factors to obtain a compensated depth deviation;

[0038] S62, inputting the compensated depth deviation into a PID controller, calculating the output of the PID controller, obtaining an initial vertical control instruction, and limiting the initial vertical control instruction to obtain a control instruction so that the initial vertical control instruction does not exceed the working range of the vertical thruster;

[0039] S63, converting the control instruction into a driving signal of the vertical thruster, and outputting it to the vertical thruster to achieve buoyancy adjustment of the submersible.

[0040] On the basis of the above technical solution, preferably, step S6 further includes:

[0041] The calculation formula of the output of the PID controller is:

[0042]

[0043] K p (h) = K p0 +k p |e(h)|;

[0044]

[0045] Among them, u(h) is the initial vertical control command, K p (h), K l (h) and K d (h) are the first adaptive gain coefficient, the second adaptive gain coefficient and the third adaptive gain coefficient of the PID controller, e(h) is the compensation depth deviation, K ff is the feedforward gain coefficient, v desired (h) is the expected vertical velocity of the submersible, K p0 , K l0 and K d0 are the initial first adaptive gain coefficient, the initial second adaptive gain coefficient and the initial third adaptive gain coefficient, respectively, p , k l and k d They are respectively a first adaptive gain adjustment coefficient, a second adaptive gain adjustment coefficient and a third adaptive gain adjustment coefficient;

[0046] The calculation formula for limiting the initial vertical control instruction is:

[0047]

[0048] in, is the control command after limitation, u(h) is the initial vertical control command output by the PID controller, and u min and u maxThey are the minimum control instruction limit and the maximum control instruction limit of the vertical thruster respectively.

[0049] In a second aspect, the present invention also provides a submersible buoyancy adjustment and depth control system based on machine learning, the system comprising:

[0050] A data acquisition module, used for acquiring original external environment data and original submersible status data through a sensor network, wherein the original external environment data includes depth data;

[0051] A data processing module, used for performing denoising and standardization processing on the original external environment data and the original submersible status data to obtain external environment data and submersible status data;

[0052] A buoyancy deviation module, used to determine the current buoyancy state of the submersible based on the submersible state data and the external environment data, and calculate the compensating buoyancy deviation between the current buoyancy state and a preset target buoyancy state;

[0053] An adjustment model module is used to construct an initial buoyancy adjustment model, train the initial buoyancy adjustment model through historical buoyancy adjustment data, adjust model parameters of the initial buoyancy adjustment model, and perform model evaluation on the trained initial buoyancy adjustment model to obtain a buoyancy adjustment model;

[0054] A buoyancy adjustment module, configured to input the compensated buoyancy deviation into the buoyancy adjustment model to obtain a buoyancy adjustment instruction, and dynamically adjust the displacement of the submersible based on the buoyancy adjustment instruction;

[0055] A depth adjustment module is used to calculate the compensated depth deviation between the submersible and the target based on the current buoyancy state and the depth data, generate a vertical propulsion control instruction through a PID control algorithm according to the compensated depth deviation, output the vertical propulsion control instruction to the vertical thruster, and dynamically adjust the depth of the submersible through the vertical thruster.

[0056] In a third aspect, the present invention further provides an electronic device, comprising: at least one processor, at least one memory, a communication interface and a bus;

[0057] Among them, the processor, memory, and communication interface communicate with each other through the bus, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement steps such as a submersible buoyancy adjustment and depth control method based on machine learning.

[0058] In a fourth aspect, the present invention also provides a computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to implement steps such as a method for submersible buoyancy adjustment and depth control based on machine learning.

[0059] The method and system for adjusting the buoyancy and controlling the depth of a submersible based on machine learning of the present invention have the following beneficial effects compared with the prior art:

[0060] (1) Through the sensor network, the external environment and submersible status data are collected and processed, combined with the buoyancy adjustment model trained by the machine learning algorithm and the PID control algorithm, the submersible buoyancy and depth are precisely controlled. This not only improves the accuracy and adaptability of buoyancy adjustment, but also optimizes depth control, thus improving the submersible's operational capability and control accuracy in complex underwater environments.

[0061] (2) By adopting a deep neural network structure, using the ReLU activation function and dynamically adjusting the number of hidden layer neurons, using the stochastic gradient descent algorithm, batch normalization and learning rate decay strategy to improve training efficiency, introducing an adaptive coefficient adjustment matrix to enhance the model's adaptability, and using root mean square error and K-fold cross validation for model evaluation, refined control is achieved, the performance of the buoyancy adjustment model is improved, and the submersible can achieve more accurate, stable and efficient buoyancy control in complex underwater environments;

[0062] (3) By considering the environmental factors of liquid flow rate, submersible attitude angle and liquid density, an adaptive PID controller is adopted, whose gain coefficient can be dynamically adjusted according to the actual situation, and the control instructions are restricted. The environmental compensation coefficient and adaptive gain adjustment coefficient are introduced to achieve accurate depth deviation calculation and compensation, improve the flexibility and adaptability of the control, and further enhance the adaptability of the submersible in different underwater environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0064] Figure 1 A flow chart of a method for adjusting buoyancy and controlling depth of a submersible based on machine learning according to the present invention;

[0065] Figure 2 This is a structural diagram of a submersible buoyancy adjustment and depth control system based on machine learning according to the present invention. DETAILED DESCRIPTION

[0066] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0067] See also Figure 1 The present invention provides a method for adjusting the buoyancy and controlling the depth of a submersible based on machine learning, comprising the following steps:

[0068] S1, collecting original external environment data and original submersible status data through a sensor network, wherein the original external environment data includes depth data;

[0069] S2, performing denoising and standardization processing on the original external environment data and the original submersible status data to obtain external environment data and submersible status data;

[0070] S3, determining the current buoyancy state of the submersible based on the submersible state data and the external environment data, and calculating the compensating buoyancy deviation between the current buoyancy state and a preset target buoyancy state;

[0071] S4, constructing an initial buoyancy adjustment model, training the initial buoyancy adjustment model through historical buoyancy adjustment data, adjusting model parameters of the initial buoyancy adjustment model, and performing model evaluation on the trained initial buoyancy adjustment model to obtain a buoyancy adjustment model;

[0072] S5, inputting the compensated buoyancy deviation into the buoyancy adjustment model to obtain a buoyancy adjustment instruction, and dynamically adjusting the displacement of the submersible based on the buoyancy adjustment instruction;

[0073] S6, calculates the compensated depth deviation between the submersible and the target based on the depth data, generates a vertical propulsion control instruction through a PID control algorithm according to the compensated depth deviation, outputs the vertical propulsion control instruction to the vertical thruster, and dynamically adjusts the depth of the submersible through the vertical thruster.

[0074] Specifically, this embodiment collects and processes external environment and submersible status data through a sensor network, combines a buoyancy regulation model trained by a machine learning algorithm, and a PID control algorithm, to achieve precise control of the buoyancy and depth of the submersible, which not only improves the accuracy and adaptability of buoyancy regulation, but also optimizes depth control, thereby enhancing the submersible's operational capability and control accuracy in complex underwater environments.

[0075] Step S1 includes:

[0076] S11, collecting raw external environment data through a pressure sensor, a temperature sensor, and a depth sensor, wherein the raw external environment data includes water pressure data and water temperature data;

[0077] S12, collecting original submersible status data through an acceleration sensor and an attitude sensor, the original submersible status data including motion acceleration data and attitude angle data, and fusing the data collected by the acceleration sensor and the attitude sensor using a Kalman filter algorithm to eliminate the system error of a single sensor.

[0078] Specifically, this embodiment achieves comprehensive data collection by using pressure sensors, temperature sensors and depth sensors to collect external environmental data, and acceleration sensors and attitude sensors to collect submersible status data, thereby providing more comprehensive and accurate environmental and status information.

[0079] The Kalman filter algorithm is used to fuse the data collected by the acceleration sensor and attitude sensor, which effectively eliminates the system error of a single sensor and improves the accuracy and reliability of the submersible status data.

[0080] By collecting water pressure data and water temperature data, the system can better adapt to different underwater environmental conditions, improve the adaptability of the submersible to different depths and temperature conditions, and collect motion acceleration data and attitude angle data to accurately capture the motion state and attitude changes of the submersible.

[0081] Step S2 includes:

[0082] S21, performing wavelet decomposition on the original external environment data and the original submersible state data to obtain high-frequency coefficients, performing threshold processing on the high-frequency coefficients to obtain preliminary screening high-frequency coefficients, performing wavelet reconstruction on the preliminary screening high-frequency coefficients to obtain denoised external environment data and denoised submersible state data after denoising;

[0083] S22, calculating the first quartile Q1 and the third quartile Q3 of the denoised external environment data and the denoised submersible state data, calculating the difference between the first quartile Q1 and the third quartile Q3 as the interquartile range IQR, marking the data points in the denoised external environment data and the denoised submersible state data that are beyond a preset range as outliers, and replacing the outliers by linear interpolation to obtain interpolated external environment data and interpolated submersible state data, wherein the preset range is (Q1-1.5*IQR, Q3+1.5*IQR);

[0084] S23, determining the maximum value and the minimum value of each feature of the interpolated external environment data and the interpolated submersible status data, and normalizing each data point of the interpolated external environment data and the interpolated submersible status data by Min-Max normalization.

[0085] Specifically, this embodiment denoises the original data through wavelet decomposition and threshold processing, which can effectively remove high-frequency noise in the data and improve the signal-to-noise ratio of the data. It can not only retain the important features of the data, but also effectively remove interference information. The quartile rule is used to identify and process outliers, which can effectively reduce the impact of extreme data on subsequent analysis. Then, the linear interpolation method is used to replace the outliers, which not only maintains the continuity of the data, but also avoids the interference of outliers on model training and decision-making. The Min-Max normalization method is used to process the data, and the data of different dimensions are unified into the [0,1] interval.

[0086] Specifically, step S3 can accurately evaluate the current buoyancy state of the submersible by combining the denoised and standardized submersible status data and external environment data, and can identify and quantify the adjustment amount required for buoyancy regulation by calculating the compensating buoyancy deviation between the current buoyancy state and the preset target buoyancy state.

[0087] Step S4 includes:

[0088] S41, constructing an initial buoyancy adjustment model based on a deep neural network, the initial buoyancy adjustment model comprising an input layer, an output layer and multiple hidden layers, the input layer is used to receive a compensation buoyancy deviation, the output layer is used to output a buoyancy adjustment instruction, the multiple hidden layers use a ReLU activation function, and the number of neurons in the hidden layer is adjusted based on the number of input features of the input layer;

[0089] S42, acquiring historical buoyancy adjustment data, dividing the historical buoyancy adjustment data into a training set and a validation set, training the initial buoyancy adjustment model through the training set, optimizing the model parameters of the initial buoyancy adjustment model through a stochastic gradient descent algorithm, using batch normalization to accelerate the training process, and dynamically adjusting the learning rate according to a learning rate decay strategy;

[0090] S43, the trained model was evaluated by the root mean square error, and the generalization ability of the model was evaluated by the K-fold cross-validation method.

[0091] Specifically, this embodiment constructs an initial buoyancy regulation model based on a deep neural network, including an input layer, an output layer, and a plurality of hidden layers, uses a ReLU activation function and dynamically adjusts the number of neurons in the hidden layer, and accelerates the training process of the model through training with historical buoyancy regulation data, combined with a stochastic gradient descent algorithm and batch normalization technology, thereby improving the optimization efficiency of the model parameters, and enhancing the convergence of the model by combining a learning rate decay strategy.

[0092] The root mean square error (RMSE) and K-fold cross validation method were used to evaluate the trained model to ensure that the model had good generalization ability and prediction accuracy.

[0093] By introducing an adaptive coefficient adjustment matrix in the forward propagation process of the model, the model's adaptability to different input features is enhanced, and the model's buoyancy adjustment accuracy under different environmental conditions is improved.

[0094] Step S4 also includes:

[0095] During the forward propagation of the initial buoyancy adjustment model, the calculation formula for the output of the i-th hidden layer is:

[0096] z i =W i ·x i +b i +S i ·(U i ·x i );

[0097] y i =sigmoid(BN(z i ));

[0098] S i =tanh(V i ·x i +c i );

[0099]

[0100] Among them, z i is the input of the i-th hidden layer after linear transformation, x i is the input of the i-th hidden layer, W i is the weight matrix of the i-th hidden layer, b i is the bias of the i-th hidden layer, S i is the adaptive coefficient adjustment matrix of the i-th hidden layer, U i is the weight of the adaptive coefficient adjustment matrix, y iis the input of the i-th hidden layer, sigmoid(·) is the activation function, BN(·) is batch normalization, tanh(·) is the hyperbolic tangent activation function, V i is the weight generation matrix of the adaptive coefficient adjustment matrix of the i-th hidden layer, c i is the bias of the adaptive coefficient adjustment matrix of the i-th hidden layer, is the final output of the output layer when the input feature is X(z), W o is the weight matrix of the output layer, x N is the output of the last hidden layer, b o is the bias of the output layer;

[0101] The calculation formula of the stochastic gradient descent algorithm is:

[0102]

[0103] Among them, m t+1 and v t+1 are the first-order momentum and second-order momentum of the next time step, m t and v t are the first-order momentum and second-order momentum of the current time step, β1 and β2 are the first-order momentum decay rate and second-order momentum decay rate, θ t are the model parameters at the current time step, is the gradient of the loss function with respect to the model parameters, and are the estimated values ​​after first-order momentum and second-order momentum bias correction, τ is the anti-zero constant, θ t+1 is the model parameter of the next time step, η is the learning rate, and λ is the L2 regularization coefficient;

[0104] The calculation formula of the root mean square error RMSE is:

[0105]

[0106] Among them, y j is the true value of the jth sample, is the model prediction value of the jth sample, n is the number of samples, ω j is the dynamic weight of buoyancy change of the jth sample, γ is the buoyancy weight adjustment coefficient, is the instantaneous rate of change of buoyancy of the jth sample.

[0107] Specifically, this embodiment dynamically adjusts the weight matrix by introducing an adaptive coefficient adjustment matrix in the calculation of each hidden layer. The weight and bias parameters of this matrix can be adaptively learned according to the characteristics of the input data. This enhances the sensitivity and adaptability of the model to different input features, improves the model's ability to capture complex nonlinear relationships, and thus improves the accuracy of buoyancy adjustment.

[0108] By using both the ReLU activation function and the hyperbolic tangent activation function in the hidden layer, the ReLU function has linear characteristics when processing positive values, while the tanh function can map the input to the [-1,1] interval to capture more nonlinear features. By combining different activation functions, the model can better handle diverse data distributions and features, improving the model's nonlinear expression capabilities.

[0109] By adding a batch normalization layer to the calculation of each layer, the distribution of input data is standardized and the impact of data offset is mitigated. This speeds up the training of the model, stabilizes the training process, and prevents the gradient vanishing and gradient exploding problems.

[0110] The first-order and second-order momentum are introduced into the traditional stochastic gradient descent algorithm, and the historical information of the gradient is used to update the model parameters, which speeds up the parameter update and avoids falling into the local minimum during training.

[0111] In the calculation of the root mean square error (RMSE), this embodiment adds a dynamic weight for buoyancy change, takes the instantaneous rate of change of buoyancy as a weight factor, and gives a higher weight to samples with larger buoyancy changes, so that the model pays more attention to key samples, thereby improving the prediction accuracy of the model when the buoyancy changes dramatically.

[0112] Step S6 includes:

[0113] S61, calculating a depth deviation between the submersible and the target position based on the depth data, and compensating the depth deviation based on environmental factors to obtain a compensated depth deviation;

[0114] S62, inputting the compensated depth deviation into a PID controller, calculating the output of the PID controller, obtaining an initial vertical control instruction, and limiting the initial vertical control instruction to obtain a control instruction so that the initial vertical control instruction does not exceed the working range of the vertical thruster;

[0115] S63, converting the control instruction into a driving signal of the vertical thruster, and outputting it to the vertical thruster to achieve buoyancy adjustment of the submersible.

[0116] Specifically, this embodiment calculates the depth deviation between the submersible and the target position and compensates for it in combination with environmental factors, so as to more accurately determine the difference between the actual depth of the submersible and the target depth, use the PID control algorithm to generate a vertical propulsion control instruction, and limit the initial vertical control instruction to ensure that the control instruction is within the working range of the vertical thruster, and realizes dynamic adjustment of the depth of the submersible by inputting the compensated depth deviation into the PID controller and generating a driving signal for the vertical thruster according to the output. By limiting the initial vertical control instruction, the control signal is prevented from exceeding the working range of the thruster, and over-adjustment is avoided.

[0117] By taking into account environmental factors such as liquid flow rate, submersible attitude angle and liquid density to compensate for depth deviation, the submersible's adaptability in complex underwater environments is enhanced.

[0118] Step S6 also includes:

[0119] The calculation formula for compensating the depth deviation is:

[0120] e(h)=e initial (h)+C(h);

[0121] e initial (h) = D target (h)-D current (h);

[0122] C(h)=α1·v water (h)+α2·θ(h)+α3·ρ(h);

[0123] Where, e(h) is the compensation depth deviation, e initial (h) is the depth deviation, C(h) is the environmental compensation, D current (h) is the actual depth of the submersible, D target (h) is the depth of the preset target position, v water (h) is the liquid flow rate of the environment where the submersible is located, θ(h) is the attitude angle of the submersible, ρ(h) is the liquid density of the environment where the submersible is located, α1, α2 and α3 are the environmental compensation coefficients of liquid flow rate, submersible attitude angle and liquid density respectively;

[0124] The calculation formula of the output of the PID controller is:

[0125]

[0126] K p (h) = K p0 +k p |e(h)|;

[0127]

[0128] Among them, u(h) is the initial vertical control command, K p (h), K l (h) and K d (h) are the first adaptive gain coefficient, the second adaptive gain coefficient and the third adaptive gain coefficient of the PID controller, e(h) is the compensation depth deviation, K ff is the feedforward gain coefficient, v desired (h) is the expected vertical velocity of the submersible, K p0 , K l0 and K d0 are the initial first adaptive gain coefficient, the initial second adaptive gain coefficient and the initial third adaptive gain coefficient, respectively, p , k l and k d They are respectively a first adaptive gain adjustment coefficient, a second adaptive gain adjustment coefficient and a third adaptive gain adjustment coefficient;

[0129] The calculation formula for limiting the initial vertical control instruction is:

[0130]

[0131] in, is the control command after limitation, u(h) is the initial vertical control command output by the PID controller, and u min and u max They are the minimum control instruction limit and the maximum control instruction limit of the vertical thruster respectively.

[0132] Specifically, when calculating the depth deviation of the submersible, this embodiment not only takes into account the difference between the current actual depth and the target depth, but also introduces an environmental compensation item, and incorporates environmental factors such as fluid flow rate, submersible attitude angle and fluid density into the calculation. By introducing environmental compensation, the submersible can more accurately reflect the actual depth deviation, take into account the impact of water flow velocity, attitude angle and water density changes on depth control, and improve the accuracy and reliability of depth control.

[0133] Proportional, integral and differential gain coefficients K of PID controller p (h), K l (h) and K d (h) is no longer a fixed value, but is adaptively adjusted according to the change of depth deviation. The adaptive adjustment of the gain coefficient enables the PID controller to dynamically adapt to the change of depth deviation, enhance the control force and speed up the response speed when the deviation is large; reduce the control force when the deviation is small to avoid over-adjustment, thereby improving the stability and accuracy of control.

[0134] In this embodiment, a feedforward control item is added to the output of the PID controller and combined with the desired vertical speed. The addition of the feedforward control item makes it possible to take the influence of the desired speed into account in advance, thereby improving the response speed and accuracy of the PID control system and reducing the lag effect in the depth adjustment process.

[0135] This embodiment performs limiting processing on the initial vertical control command output by the PID controller to ensure that the command is within the physical working range of the vertical thruster, prevent the control command from exceeding the physical limitation of the thruster, and avoid thruster damage or control failure due to excessively large or small commands.

[0136] See also Figure 2 The present invention also provides a submersible buoyancy adjustment and depth control system based on machine learning, the system comprising:

[0137] A data acquisition module, used for acquiring original external environment data and original submersible status data through a sensor network, wherein the original external environment data includes depth data;

[0138] A data processing module, used for performing denoising and standardization processing on the original external environment data and the original submersible status data to obtain external environment data and submersible status data;

[0139] A buoyancy deviation module, used to determine the current buoyancy state of the submersible based on the submersible state data and the external environment data, and calculate the compensating buoyancy deviation between the current buoyancy state and a preset target buoyancy state;

[0140] An adjustment model module is used to construct an initial buoyancy adjustment model, train the initial buoyancy adjustment model through historical buoyancy adjustment data, adjust model parameters of the initial buoyancy adjustment model, and perform model evaluation on the trained initial buoyancy adjustment model to obtain a buoyancy adjustment model;

[0141] A buoyancy adjustment module, configured to input the compensated buoyancy deviation into the buoyancy adjustment model to obtain a buoyancy adjustment instruction, and dynamically adjust the displacement of the submersible based on the buoyancy adjustment instruction;

[0142] A depth adjustment module is used to calculate the compensated depth deviation between the submersible and the target based on the current buoyancy state and the depth data, generate a vertical propulsion control instruction through a PID control algorithm according to the compensated depth deviation, output the vertical propulsion control instruction to the vertical thruster, and dynamically adjust the depth of the submersible through the vertical thruster.

[0143] Specifically, a submersible buoyancy adjustment and depth control system based on machine learning in this embodiment realizes comprehensive data collection, efficient and reliable data processing, precise buoyancy adjustment, and dynamic response depth control through multiple collaborative modules. The system's adaptability and intelligent characteristics enable it to maintain efficient operation in complex and changing underwater environments. By integrating multiple functional modules, the system significantly improves the operational performance and safety of the submersible in complex underwater environments, and realizes precise control and efficient operation.

[0144] The present invention also discloses an electronic device, comprising: at least one processor, at least one memory communication interface and a bus: wherein the processor, memory and communication interface communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement a submersible buoyancy adjustment and depth control method based on machine learning.

[0145] The present invention also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to implement all or part of the steps of a method for adjusting the buoyancy and controlling the depth of a submersible based on machine learning according to an embodiment of the present invention. The storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0146] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for adjusting the buoyancy and controlling the depth of a submersible based on machine learning, characterized in that: The following steps are involved: S1, collecting original external environment data and original submersible status data through a sensor network, wherein the original external environment data includes depth data; S2, performing denoising and standardization processing on the original external environment data and the original submersible status data to obtain external environment data and submersible status data; S3, determining the current buoyancy state of the submersible based on the submersible state data and the external environment data, and calculating the compensating buoyancy deviation between the current buoyancy state and a preset target buoyancy state; S4, constructing an initial buoyancy adjustment model, training the initial buoyancy adjustment model through historical buoyancy adjustment data, adjusting model parameters of the initial buoyancy adjustment model, and performing model evaluation on the trained initial buoyancy adjustment model to obtain a buoyancy adjustment model; S5, inputting the compensated buoyancy deviation into the buoyancy adjustment model to obtain a buoyancy adjustment instruction, and dynamically adjusting the displacement of the submersible based on the buoyancy adjustment instruction; S6, calculates the compensated depth deviation between the submersible and the target based on the depth data, generates a vertical propulsion control instruction through a PID control algorithm according to the compensated depth deviation, outputs the vertical propulsion control instruction to the vertical thruster, and dynamically adjusts the depth of the submersible through the vertical thruster.

2. A method for submersible buoyancy adjustment and depth control based on machine learning as claimed in claim 1, characterized in that: Step S1 includes: S11, collecting raw external environment data through a pressure sensor, a temperature sensor, and a depth sensor, wherein the raw external environment data includes water pressure data and water temperature data; S12, collecting original submersible status data through an acceleration sensor and an attitude sensor, the original submersible status data including motion acceleration data and attitude angle data, and fusing the data collected by the acceleration sensor and the attitude sensor using a Kalman filter algorithm to eliminate the system error of a single sensor.

3. A method for submersible buoyancy adjustment and depth control based on machine learning as claimed in claim 1, characterized in that: Step S2 includes: S21, performing wavelet decomposition on the original external environment data and the original submersible state data to obtain high-frequency coefficients, performing threshold processing on the high-frequency coefficients to obtain preliminary screening high-frequency coefficients, performing wavelet reconstruction on the preliminary screening high-frequency coefficients to obtain denoised external environment data and denoised submersible state data after denoising; S22, calculating the first quartile Q1 and the third quartile Q3 of the denoised external environment data and the denoised submersible state data, calculating the difference between the first quartile Q1 and the third quartile Q3 as the interquartile range IQR, marking the data points in the denoised external environment data and the denoised submersible state data that are beyond a preset range as outliers, and replacing the outliers by linear interpolation to obtain interpolated external environment data and interpolated submersible state data, wherein the preset range is (Q1-1.5*IQR, Q3+1.5*IQR); S23, determining the maximum value and the minimum value of each feature of the interpolated external environment data and the interpolated submersible status data, and normalizing each data point of the interpolated external environment data and the interpolated submersible status data by Min-Max normalization.

4. A method for submersible buoyancy adjustment and depth control based on machine learning as claimed in claim 1, characterized in that: Step S4 includes: S41, constructing an initial buoyancy adjustment model based on a deep neural network, the initial buoyancy adjustment model comprising an input layer, an output layer and multiple hidden layers, the input layer is used to receive a compensation buoyancy deviation, the output layer is used to output a buoyancy adjustment instruction, the multiple hidden layers use a ReLU activation function, and the number of neurons in the hidden layer is adjusted based on the number of input features of the input layer; S42, acquiring historical buoyancy adjustment data, dividing the historical buoyancy adjustment data into a training set and a validation set, training the initial buoyancy adjustment model through the training set, optimizing the model parameters of the initial buoyancy adjustment model through a stochastic gradient descent algorithm, using batch normalization to accelerate the training process, and dynamically adjusting the learning rate according to a learning rate decay strategy; S43, the trained model was evaluated by the root mean square error, and the generalization ability of the model was evaluated by the K-fold cross-validation method.

5. A method for submersible buoyancy adjustment and depth control based on machine learning as claimed in claim 4, characterized in that: Step S4 also includes: During the forward propagation of the initial buoyancy adjustment model, the calculation formula for the output of the i-th hidden layer is: z i =W i ·x i +b i +S i ·(U i ·x i ); y i =sigmoid(BN(z i )); S i =tanh(V i ·x i +c i ); Among them, z i is the input of the i-th hidden layer after linear transformation, x i is the input of the i-th hidden layer, W i is the weight matrix of the i-th hidden layer, b i is the bias of the i-th hidden layer, S i is the adaptive coefficient adjustment matrix of the i-th hidden layer, U i is the weight of the adaptive coefficient adjustment matrix, y i is the input of the i-th hidden layer, sigmoid(·) is the activation function, BN(·) is batch normalization, tanh(·) is the hyperbolic tangent activation function, V i is the weight generation matrix of the adaptive coefficient adjustment matrix of the i-th hidden layer, c i is the bias of the adaptive coefficient adjustment matrix of the i-th hidden layer, is the final output of the output layer when the input feature is X(z), W o is the weight matrix of the output layer, x N is the output of the last hidden layer, b o is the bias of the output layer; The calculation formula of the stochastic gradient descent algorithm is: Among them, m t+1 and v t+1 are the first-order momentum and second-order momentum of the next time step, m t and v t are the first-order momentum and second-order momentum of the current time step, β1 and β2 are the first-order momentum decay rate and second-order momentum decay rate, θ t are the model parameters at the current time step, is the gradient of the loss function with respect to the model parameters, and are the estimated values ​​after first-order momentum and second-order momentum bias correction, τ is the anti-zero constant, θ t+1 is the model parameter of the next time step, η is the learning rate, and λ is the L2 regularization coefficient; The calculation formula of the root mean square error RMSE is: Among them, y j is the true value of the jth sample, is the model prediction value of the jth sample, n is the number of samples, ω j is the dynamic weight of buoyancy change of the jth sample, γ is the buoyancy weight adjustment coefficient, is the instantaneous rate of change of buoyancy of the jth sample.

6. A method for submersible buoyancy adjustment and depth control based on machine learning as claimed in claim 1, characterized in that: Step S6 includes: S61, calculating a depth deviation between the submersible and the target position based on the depth data, and compensating the depth deviation based on environmental factors to obtain a compensated depth deviation; S62, inputting the compensated depth deviation into a PID controller, calculating the output of the PID controller, obtaining an initial vertical control instruction, and limiting the initial vertical control instruction to obtain a control instruction so that the initial vertical control instruction does not exceed the working range of the vertical thruster; S63, converting the control instruction into a driving signal of the vertical thruster, and outputting it to the vertical thruster to achieve buoyancy adjustment of the submersible.

7. A method for submersible buoyancy adjustment and depth control based on machine learning as claimed in claim 6, characterized in that: Step S6 also includes: The calculation formula of the output of the PID controller is: K p (h)=K p0 +k p ·|e(h)|; Among them, u(h) is the initial vertical control command, K p (h), K l (h) and K d (h) are the first adaptive gain coefficient, the second adaptive gain coefficient and the third adaptive gain coefficient of the PID controller, e(h) is the compensation depth deviation, K ff is the feedforward gain coefficient, v desired (h) is the expected vertical velocity of the submersible, K p0 , K l0 and K d0 are the initial first adaptive gain coefficient, the initial second adaptive gain coefficient and the initial third adaptive gain coefficient, respectively, p , k l and k d They are respectively a first adaptive gain adjustment coefficient, a second adaptive gain adjustment coefficient and a third adaptive gain adjustment coefficient; The calculation formula for limiting the initial vertical control instruction is: in, is the control command after limitation, u(h) is the initial vertical control command output by the PID controller, and u min and u max They are the minimum control instruction limit and the maximum control instruction limit of the vertical thruster respectively.

8. A submersible buoyancy adjustment and depth control system based on machine learning, characterized in that: The system comprises: A data acquisition module, used for acquiring original external environment data and original submersible status data through a sensor network, wherein the original external environment data includes depth data; A data processing module, used for performing denoising and standardization processing on the original external environment data and the original submersible status data to obtain external environment data and submersible status data; A buoyancy deviation module, used to determine the current buoyancy state of the submersible based on the submersible state data and the external environment data, and calculate the compensating buoyancy deviation between the current buoyancy state and a preset target buoyancy state; An adjustment model module is used to construct an initial buoyancy adjustment model, train the initial buoyancy adjustment model through historical buoyancy adjustment data, adjust model parameters of the initial buoyancy adjustment model, and perform model evaluation on the trained initial buoyancy adjustment model to obtain a buoyancy adjustment model; A buoyancy adjustment module, configured to input the compensated buoyancy deviation into the buoyancy adjustment model to obtain a buoyancy adjustment instruction, and dynamically adjust the displacement of the submersible based on the buoyancy adjustment instruction; A depth adjustment module is used to calculate the compensated depth deviation between the submersible and the target based on the current buoyancy state and the depth data, generate a vertical propulsion control instruction through a PID control algorithm according to the compensated depth deviation, output the vertical propulsion control instruction to the vertical thruster, and dynamically adjust the depth of the submersible through the vertical thruster.

9. An electronic device, characterized in that: include: at least one processor, at least one memory, a communication interface, and a bus; The processor, memory, and communication interface communicate with each other via the bus, the memory stores program instructions executable by the processor, and the processor calls the program instructions to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions enable a computer to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Underwater vehicle vertical plane navigation attitude optimization control method

    CN114690789A

  • Seawater density gradient estimation method and equipment based on Kalman filter and medium

    CN118643594A

  • AUV (Autonomous Underwater Vehicle) path tracking method and system based on adaptive sight angle guidance and PID (Proportion Integration Differentiation) control

    CN118732687A

Cited By

  • Undulating fin robot control method based on residual MLP and active disturbance rejection controller

    CN120469465A

  • Benthic submersible of deep sea hydrothermal sampling system and state control method

    CN120507956A