Machine learning based submersible buoyancy adjustment and depth control method and system
By combining machine learning and PID control, the problem of traditional submersible buoyancy adjustment methods being unable to adapt to complex environments has been solved, achieving precise buoyancy and depth control and improving the submersible's operational capabilities in complex underwater environments.
Patent Information
- Application Number
- CN202411437908.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-10-15
AI Technical Summary
Traditional methods of adjusting buoyancy in submersibles are ill-suited to the complex and ever-changing underwater environment, cannot precisely control buoyancy and depth, and lack adaptive learning capabilities.
A machine learning-based approach is used to collect data through a sensor network, perform noise reduction and standardization processing, construct a deep neural network buoyancy adjustment model, and combine it with a PID control algorithm to dynamically adjust the buoyancy and depth of the submersible.
It enables precise buoyancy and depth control of submersibles in complex underwater environments, improving operational capabilities and control accuracy, and enhancing adaptability and flexibility.
Smart Images

Figure CN119336050B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of underwater vehicles, and particularly relates to a submersible buoyancy adjustment and depth control method and system based on machine learning. BACKGROUND
[0002] During underwater operation, the submersible needs to accurately 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 complex and variable underwater environments.
[0003] In terms of buoyancy adjustment and depth adjustment, traditional methods are difficult to accurately analyze complex sensor data, cannot accurately determine the current buoyancy state of the submersible, lack adaptive learning ability, and cannot continuously optimize the buoyancy adjustment strategy based on historical data. At the same time, fixed control algorithms are difficult to adapt to changes in different environmental factors, resulting in poor buoyancy adjustment and depth adjustment results. SUMMARY
[0004] Therefore, the present application provides 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 application is as follows: In a first aspect, the present application provides a submersible buoyancy adjustment and depth control method based on machine learning, comprising the following steps:
[0006] S1, collecting original external environment data and original submersible state 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 state data to obtain external environment data and submersible state 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 compensation 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 the 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 compensation 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, calculate a compensated depth deviation of the submersible from the target based on the depth data, generate a vertical propulsion control instruction according to the compensated depth deviation through a PID control algorithm, output the vertical propulsion control instruction to a vertical propeller, and dynamically adjust the depth of the submersible through the vertical propeller.
[0012] Preferably, the step S1 comprises:
[0013] S11, collect original external environment data through a pressure sensor, a temperature sensor and a depth sensor, wherein the original external environment data comprises water pressure data and water temperature data;
[0014] S12, collect original submersible state data through an acceleration sensor and an attitude sensor, wherein the original submersible state data comprises motion acceleration data and attitude angle data, and the data collected by the acceleration sensor and the attitude sensor is fused and processed through a Kalman filtering algorithm to eliminate the system error of a single sensor.
[0015] Preferably, the step S2 comprises:
[0016] S21, perform wavelet decomposition on the original external environment data and the original submersible state data to obtain high-frequency coefficients, perform threshold processing on the high-frequency coefficients to obtain primary screening high-frequency coefficients, and perform wavelet reconstruction on the primary screening high-frequency coefficients to obtain denoised external environment data and denoised submersible state data;
[0017] S22, calculate a first quartile Q1 and a third quartile Q3 of the denoised external environment data and the denoised submersible state data, calculate a difference between the first quartile Q1 and the third quartile Q3 as an interquartile range IQR, mark data points exceeding a preset range in the denoised external environment data and the denoised submersible state data as abnormal values, replace the abnormal values through a linear interpolation method to obtain interpolated external environment data and interpolated submersible state data, and the preset range is (Q1-1.5*IQR, Q3+1.5*IQR);
[0018] S23, determine a maximum value and a minimum value of each feature of the interpolated external environment data and the interpolated submersible state data, and perform standardization processing on each data point of the interpolated external environment data and the interpolated submersible state data through Min-Max standardization.
[0019] Preferably, the step S4 comprises:
[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 a plurality of hidden layers, the input layer being configured to receive the compensated buoyancy deviation, the output layer being configured to output the buoyancy adjustment instruction, and the plurality of hidden layers being configured to utilize a ReLU activation function, and a number of neurons of a hidden layer being adjusted based on a number of input features of the input layer;
[0021] S42, obtaining 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 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 a learning rate according to a learning rate decay strategy;
[0022] S43, evaluating the trained model through a root mean square error, and evaluating a generalization ability of the model through a K-fold cross-validation method.
[0023] Based on the above technical solutions, preferably, the step S4 further comprises:
[0024] In a forward propagation process of the initial buoyancy adjustment model, a calculation formula of an output of an 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] wherein z i is an input of the i-th hidden layer after linear transformation, x i is an input of the i-th hidden layer, W i is a weight matrix of the i-th hidden layer, b i is a bias of the i-th hidden layer, S i is an adaptive coefficient adjustment matrix of the i-th hidden layer, U i is a weight of the adaptive coefficient adjustment matrix, and y iis the input of the i-th hidden layer, sigmoid(·) is an activation function, BN(·) is batch normalization, tanh(·) is a 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] wherein, m t+1 and v t+1 are the first-order momentum and the second-order momentum of the next time step, m t and v t are the first-order momentum and the second-order momentum of the current time step, β1 and β2 are the first-order momentum decay rate and the second-order momentum decay rate, θ t is the model parameter of the current time step, is the gradient of the loss function with respect to the model parameter, and are the estimated values of the first-order momentum and the second-order momentum after bias correction, τ is a zero-prevention 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] wherein, y j is the true value of the j-th sample, is the model prediction value of the j-th sample, n is the sample quantity, ω j is the buoyancy change dynamic weight of the j-th sample, γ is the buoyancy weight adjustment coefficient, is the instantaneous change rate of buoyancy of the j-th sample.
[0036] On the basis of the above technical solutions, preferably, step S6 comprises:
[0037] S61, calculating a depth deviation of the submersible from the target position based on the depth data, compensating the depth deviation based on environmental factors to obtain a compensated depth deviation;
[0038] S62, input the compensation depth deviation into a PID controller, calculate an output of the PID controller to obtain an initial vertical control instruction, limit the initial vertical control instruction to obtain a control instruction, so that the initial vertical control instruction does not exceed a working range of a vertical thruster;
[0039] S63, convert the control instruction into a driving signal of the vertical thruster, and output to the vertical thruster to realize buoyancy adjustment of the submersible.
[0040] In the above technical solution, preferably, the step S6 further comprises:
[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] Wherein, u(h) is the initial vertical control instruction, K p (h), K l (h) and K d (h) are respectively a first adaptive gain coefficient, a second adaptive gain coefficient and a third adaptive gain coefficient of the PID controller, e(h) is the compensation depth deviation, K ff is a feedforward gain coefficient, v desired (h) is a desired vertical velocity of the submersible, K p0 , K l0 and K d0 are respectively an initial first adaptive gain coefficient, an initial second adaptive gain coefficient and an initial third adaptive gain coefficient, k p , k l and k d 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] Wherein, is the limited control instruction, u(h) is the initial vertical control instruction output by the PID controller, u min and u maxMinimum and maximum control command limits for the vertical thrusters, respectively.
[0049] In a second aspect, the present application also provides a submersible buoyancy adjustment and depth control system based on machine learning, comprising:
[0050] A data acquisition module for acquiring raw external environment data and raw submersible state data through a sensor network, wherein the raw external environment data comprises depth data;
[0051] A data processing module for denoising and standardizing the raw external environment data and the raw submersible state data to obtain external environment data and submersible state data;
[0052] A buoyancy deviation module for determining the current buoyancy state of the submersible based on the submersible state data and the external environment data, and calculating the compensation buoyancy deviation between the current buoyancy state and a preset target buoyancy state;
[0053] An adjustment model module for constructing an initial buoyancy adjustment model, training the initial buoyancy adjustment model through historical buoyancy adjustment data, adjusting the 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;
[0054] A buoyancy adjustment module for inputting the compensation 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;
[0055] A depth adjustment module for calculating the compensation depth deviation between the submersible and a target based on the current buoyancy state and the depth data, generating a vertical propulsion control instruction through a PID control algorithm according to the compensation depth deviation, outputting the vertical propulsion control instruction to a vertical thruster, and dynamically adjusting the depth of the submersible through the vertical thruster.
[0056] In a third aspect, the present application also provides an electronic device, comprising at least one processor, at least one memory, a communication interface and a bus;
[0057] The processor, memory and communication interface can communicate with each other through the bus, the memory stores program instructions executable by the processor, and the processor invokes the program instructions to implement the steps of a submersible buoyancy adjustment and depth control method based on machine learning.
[0058] In a fourth aspect, the present application also provides a computer readable storage medium storing computer instructions, which cause a computer to implement the steps of a method for adjusting buoyancy and controlling depth of a submersible based on machine learning.
[0059] The method and system for adjusting buoyancy and controlling depth of a submersible based on machine learning of the present application have the following beneficial effects over the prior art:
[0060] (1) By collecting and processing external environment and submersible state data through a sensor network, combining a buoyancy adjustment model trained by a machine learning algorithm, and a PID control algorithm, precise control of the buoyancy and depth of the submersible is achieved, which not only improves the precision and adaptability of buoyancy adjustment, but also optimizes depth control, and enhances the operating ability and control precision of the submersible in complex underwater environments;
[0061] (2) By using a deep neural network structure, a ReLU activation function and a dynamically adjusted number of hidden layer neurons, using a stochastic gradient descent algorithm, batch normalization and a learning rate decay strategy to improve training efficiency, introducing an adaptive coefficient adjustment matrix to enhance the adaptive ability of the model, and using root mean square error and K-fold cross-validation for model evaluation, fine control is achieved, and the performance of the buoyancy adjustment model is improved, enabling the submersible to achieve more precise, stable and efficient buoyancy control in complex underwater environments;
[0062] (3) By considering environmental factors such as liquid flow rate, submersible attitude angle and liquid density, using an adaptive PID controller whose gain coefficient can be dynamically adjusted according to actual conditions to limit the processing of control commands, and introducing an environmental compensation coefficient and an adaptive gain adjustment coefficient, precise depth deviation calculation and compensation are achieved, improving the flexibility and adaptability of control, and further enhancing the adaptability of the submersible in different underwater environments. BRIEF DESCRIPTION OF DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, brief descriptions will be given below of the drawings needed to be used in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0064] Figure 1 A flowchart of the method for adjusting buoyancy and controlling depth of a submersible based on machine learning of the present application;
[0065] Figure 2 A structural diagram of the system for adjusting buoyancy and controlling depth of a submersible based on machine learning of the present application. DETAILED DESCRIPTION
[0066] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0067] Please refer to Figure 1 The present application provides a kind of based on machine learning's submersible buoyancy regulation and depth control method, comprising the following steps:
[0068] S1, the original external environment data and the original submersible state data are collected by sensor network, the original external environment data includes depth data;
[0069] S2, the original external environment data and the original submersible state data are carried out denoising processing and standardization processing, and external environment data and submersible state data are obtained;
[0070] S3, based on the submersible state data and the external environment data, the current buoyancy state of submersible is determined, and the compensation buoyancy deviation of the current buoyancy state and preset target buoyancy state is calculated;
[0071] S4, an initial buoyancy regulation model is constructed, the initial buoyancy regulation model is trained by historical buoyancy regulation data, the model parameters of the initial buoyancy regulation model are adjusted, and the initial buoyancy regulation model after training is carried out model evaluation, and buoyancy regulation model is obtained;
[0072] S5, the compensation buoyancy deviation is input to the buoyancy regulation model, and buoyancy regulation instruction is obtained, and the displacement of submersible is dynamically adjusted based on the buoyancy regulation instruction;
[0073] S6, the compensation depth deviation of submersible and target is calculated based on the depth data, and vertical propulsion control instruction is generated according to the compensation depth deviation by PID control algorithm, and the vertical propulsion control instruction is output to vertical propeller, and the depth of submersible is dynamically adjusted by the vertical propeller.
[0074] Specifically, the external environment and submersible state data are collected and processed by sensor network in the embodiment, the buoyancy regulation model trained by machine learning algorithm is combined, and the PID control algorithm is used to realize the accurate control of the buoyancy and depth of submersible, which not only improves the accuracy and adaptability of buoyancy regulation, but also optimizes the depth control, and improves the operation ability and control accuracy of submersible in complex underwater environment.
[0075] Step S1 includes:
[0076] S11, collecting original external environment data including water pressure data and water temperature data through a pressure sensor, a temperature sensor and a depth sensor;
[0077] S12, collecting original submersible state data including motion acceleration data and attitude angle data through an acceleration sensor and an attitude sensor, and fusing the data collected by the acceleration sensor and the attitude sensor by using a Kalman filtering algorithm to eliminate the system error of a single sensor.
[0078] Specifically, the embodiment realizes comprehensive data collection by using the pressure sensor, the temperature sensor and the depth sensor to collect external environment data, and the acceleration sensor and the attitude sensor to collect submersible state data, thereby providing more comprehensive and accurate environmental and state information.
[0079] The data collected by the acceleration sensor and the attitude sensor are fused by using the Kalman filtering algorithm, effectively eliminating the system error of a single sensor and improving the accuracy and reliability of the submersible state data.
[0080] By collecting water pressure data and water temperature data, the system can better adapt to different underwater environmental conditions, improving the adaptability of the submersible under different depth and temperature conditions. By collecting motion acceleration data and attitude angle data, the motion state and attitude change of the submersible can be accurately captured.
[0081] Step S2 includes:
[0082] S21, wavelet decomposing the original external environment data and the original submersible state data to obtain high-frequency coefficients, threshold processing the high-frequency coefficients to obtain preliminary screened high-frequency coefficients, and wavelet reconstructing the preliminary screened 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 outside the preset range in the denoised external environment data and the denoised submersible state data as outliers, and replacing the outliers by linear interpolation to obtain interpolated external environment data and interpolated submersible state data, the preset range being (Q1-1.5*IQR, Q3+1.5*IQR);
[0084] S23, determine the maximum value and the minimum value of each feature of the interpolated external environment data and the interpolated submersible state data, and standardize each data point of the interpolated external environment data and the interpolated submersible state data by Min-Max standardization.
[0085] Specifically, the original data is denoised by the wavelet decomposition and threshold processing method, which can effectively remove high-frequency noise in the data and improve the signal-to-noise ratio of the data. Not only the important features of the data can be retained, but also the interference information can be effectively removed. The quartile rule is used to identify and process outliers, which can effectively reduce the influence 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 the outliers on model training and decision-making. The Min-Max standardization method is used to process the data, which unifies the data of different dimensions to the interval [0, 1].
[0086] Specifically, step S3 combines the submersible state data and the external environment data after denoising and standardization processing, which can accurately evaluate the current buoyancy state of the submersible. By calculating the compensation buoyancy deviation between the current buoyancy state and the preset target buoyancy state, the adjustment amount required for buoyancy adjustment can be identified and quantified.
[0087] Step S4 includes:
[0088] S41, an initial buoyancy adjustment model is constructed based on a deep neural network, the initial buoyancy adjustment model includes an input layer, an output layer and a plurality of hidden layers, the input layer is used to receive the compensation buoyancy deviation, the output layer is used to output the buoyancy adjustment instruction, the plurality of hidden layers use ReLU activation function, and the number of neurons of the hidden layer is adjusted based on the number of input features of the input layer;
[0089] S42, historical buoyancy adjustment data is obtained, the historical buoyancy adjustment data is divided into a training set and a validation set, the initial buoyancy adjustment model is trained through the training set, the model parameters of the initial buoyancy adjustment model are optimized by a stochastic gradient descent algorithm, batch normalization is used to accelerate the training process, and the learning rate is dynamically adjusted according to a learning rate decay strategy;
[0090] S43, the trained model is evaluated by root mean square error, and the generalization ability of the model is evaluated by K-fold cross-validation method.
[0091] Specifically, the initial buoyancy adjustment model is constructed based on a deep neural network, including an input layer, an output layer and a plurality of hidden layers, a ReLU activation function is used, and the number of hidden layer neurons is dynamically adjusted. Through the training of historical buoyancy adjustment data, the model training process is accelerated, the optimization efficiency of model parameters is improved, and the convergence of the model is enhanced by combining the learning rate decay strategy.
[0092] The trained model is evaluated by using the root mean square error (RMSE) and the K-fold cross-validation method to ensure that the model has good generalization ability and prediction accuracy.
[0093] By introducing an adaptive coefficient adjustment matrix in the forward propagation process of the model, the adaptability of the model to different input features is enhanced, and the buoyancy adjustment accuracy of the model under different environmental conditions is improved.
[0094] Step S4 further includes:
[0095] In the forward propagation process of the initial buoyancy adjustment model, the calculation formula of 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] wherein 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, and y iis the input of the i-th hidden layer, sigmoid(·) is the activation function, BN(·) is the 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] wherein, m t+1 and v t+1 are the first-order momentum and the second-order momentum of the next time step, m t and v t are the first-order momentum and the second-order momentum of the current time step, β1 and β2 are the first-order momentum decay rate and the second-order momentum decay rate, respectively, θ t is the model parameter of the current time step, is the gradient of the loss function with respect to the model parameter, and are the estimated values of the first-order momentum and the second-order momentum after bias correction, respectively, τ 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] wherein, y j is the true value of the j-th sample, is the model prediction value of the j-th sample, n is the sample quantity, ω j is the buoyancy change dynamic weight of the j-th sample, γ is the buoyancy weight adjustment coefficient, is the buoyancy instantaneous change rate of the j-th sample.
[0107] Specifically, in the calculation of each hidden layer, an adaptive coefficient adjustment matrix is introduced to dynamically adjust the weight matrix. The weight and bias parameters of this matrix can be adaptively learned according to the characteristics of the input data. The sensitivity and adaptability of the model to different input features are enhanced, the model's ability to capture complex nonlinear relationships is improved, and the accuracy of buoyancy adjustment is improved.
[0108] ReLU activation function and hyperbolic tangent activation function are used in the hidden layer at the same time. ReLU function has linear characteristics when processing positive values, while tanh function can map input to [-1, 1] interval, capturing more nonlinear features. By combining different activation functions, the model can better handle diverse data distribution and features, improving the nonlinear expression ability of the model.
[0109] By adding a batch normalization layer in each layer calculation, the distribution of input data is standardized, and the influence of data deviation is reduced. The training speed of the model is accelerated, the training process is stabilized, and the problems of gradient vanishing and gradient explosion are prevented.
[0110] First and second order momentum are introduced in the traditional stochastic gradient descent algorithm, and the historical information of the gradient is used to update the model parameters, which accelerates the parameter update speed and avoids falling into local minimum in the training process.
[0111] In the calculation of root mean square error RMSE, a dynamic weight of buoyancy change is added, and the instantaneous change rate of buoyancy is used as a weight factor. Higher weight is given to samples with larger buoyancy changes, so that the model pays more attention to key samples and improves the prediction accuracy of the model in the case of large buoyancy changes.
[0112] Step S6 includes:
[0113] S61, calculate the depth deviation of the submersible from the target position based on the depth data, compensate the depth deviation based on environmental factors to obtain a compensated depth deviation;
[0114] S62, input the compensated depth deviation into a PID controller, calculate the output of the PID controller to obtain an initial vertical control instruction, limit 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, convert the control instruction into a driving signal of the vertical thruster and output it to the vertical thruster to realize buoyancy adjustment of the submersible.
[0116] Specifically, the embodiment can more accurately determine the difference between the actual depth of the submersible and the target depth by calculating the depth deviation of the submersible from the target position and combining with environmental factors for compensation, generate a vertical propulsion control instruction using a PID control algorithm, and limit the initial vertical control instruction, so as to ensure that the control instruction is within the working range of the vertical thruster, input the compensated depth deviation into the PID controller, and generate a driving signal of the vertical thruster according to the output, thereby realizing dynamic adjustment of the depth of the submersible. By limiting the initial vertical control instruction, the control signal is prevented from exceeding the working range of the thruster, and excessive adjustment is avoided.
[0117] By considering environmental factors such as liquid flow rate, submersible attitude angle and liquid density for depth deviation compensation, the adaptability of the submersible in complex underwater environment is enhanced.
[0118] Step S6 further comprises:
[0119] The calculation formula of the compensated 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] Wherein, e(h) is the compensated depth deviation, e initial (h) is the depth deviation, C(h) is the environmental compensation, D current (h) is the current 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, and α1, α2 and α3 are the environmental compensation coefficients of the liquid flow rate, the attitude angle of the submersible and the 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] wherein u(h) is an initial vertical control instruction, K p (h), K l (h) and K d (h) are respectively a first adaptive gain coefficient, a second adaptive gain coefficient and a third adaptive gain coefficient of the PID controller, e(h) is a compensation depth deviation, K ff is a feedforward gain coefficient, v desired (h) is a desired vertical velocity of the submersible, K p0 , K l0 and K d0 are respectively an initial first adaptive gain coefficient, an initial second adaptive gain coefficient and an initial third adaptive gain coefficient, k p , k l and k d 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] wherein u is a limited control instruction, u(h) is an initial vertical control instruction output by the PID controller, u min and u max are respectively a minimum control instruction limit value and a maximum control instruction limit value of the vertical thruster.
[0132] Specifically, when calculating the depth deviation of the submersible, the embodiment not only considers the difference between the current actual depth and the target depth, but also introduces an environmental compensation term, which takes into account environmental factors such as fluid flow rate, submersible attitude angle and fluid density in the calculation. By introducing environmental compensation, the submersible can more accurately reflect the actual depth deviation, taking into account the effects of water flow rate, attitude angle and water density changes on depth control, improving the accuracy and reliability of depth control.
[0133] The proportional, integral and differential gain coefficients K p (h), K l (h) and K d (h) of the PID controller are no longer fixed values, but are adaptively adjusted according to the change of the depth deviation. The adaptive adjustment of the gain coefficients enables the PID controller to dynamically adapt to changes in the depth deviation, enhancing control strength and speeding up response when the deviation is large; when the deviation is small, the control strength is reduced to avoid excessive adjustment, improving the stability and accuracy of the control.
[0134] The embodiment adds a feedforward control term in the output of the PID controller, which is combined with the expected vertical speed, so that the influence of the expected speed can be considered in advance, the response speed and accuracy of the PID control system are improved, and the hysteresis effect in the depth adjustment process is reduced.
[0135] The embodiment limits the initial vertical control instruction output by the PID controller, ensures that the instruction is within the physical working range of the vertical thruster, prevents the control instruction from exceeding the physical limit of the thruster, and avoids thruster damage or control failure caused by excessive or insufficient instructions.
[0136] Please refer to Figure 2 The application also provides a submersible buoyancy adjustment and depth control system based on machine learning, which comprises:
[0137] A data acquisition module is configured to acquire original external environment data and original submersible state data through a sensor network, wherein the original external environment data comprises depth data.
[0138] A data processing module is configured to perform denoising and standardization processing on the original external environment data and the original submersible state data to obtain external environment data and submersible state data.
[0139] A buoyancy deviation module is configured to determine the current buoyancy state of the submersible based on the submersible state data and the external environment data, and calculate the compensation buoyancy deviation between the current buoyancy state and a preset target buoyancy state.
[0140] An adjustment model module is configured to construct an initial buoyancy adjustment model, train the initial buoyancy adjustment model through historical buoyancy adjustment data, adjust the 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 is configured to input the compensation 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 configured to calculate the compensation depth deviation between the submersible and a 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 compensation depth deviation, output the vertical propulsion control instruction to a vertical thruster, and dynamically adjust the depth of the submersible through the vertical thruster.
[0143] Specifically, the machine learning-based submersible buoyancy adjustment and depth control system of the embodiment achieves comprehensive data collection, efficient and reliable data processing, precise buoyancy adjustment, and dynamically responsive depth control through multiple modules working in coordination. The system's adaptability and intelligent features enable it to maintain efficient operation in complex underwater environments. By integrating multiple functional modules, the system significantly improves the operational performance and safety of submersibles in complex underwater environments, enabling precise control and efficient operation.
[0144] The application further discloses an electronic device, comprising at least one processor, at least one memory, a communication interface and a bus: wherein the processor, the memory and the communication interface complete mutual communication through the bus; the memory stores program instructions executable by the processor, and the processor invokes the program instructions to implement the machine learning-based submersible buoyancy adjustment and depth control method.
[0145] The application further discloses a computer-readable storage medium storing computer instructions, which enable the computer to implement all or part of the steps of the machine learning-based submersible buoyancy adjustment and depth control method. The storage medium includes a variety of storage media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0146] The above merely describes the preferred embodiments of the application and is not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the application shall be included in the protection scope of the application.
Claims
1. A method for machine learning based buoyancy adjustment and depth control of a submersible, characterized by, The method comprises the following steps: S1, collecting original external environment data and original submersible state data through a sensor network, the original external environment data comprising depth data; S2, performing denoising processing and standardization processing on the original external environment data and the original submersible state data to obtain external environment data and submersible state data; S3, determining a current buoyancy state of the submersible based on the submersible state data and the external environment data, calculating a compensation 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 compensation buoyancy deviation into the buoyancy adjustment model to obtain a buoyancy adjustment instruction, and dynamically adjusting a displacement of the submersible based on the buoyancy adjustment instruction; S6, calculating a compensation depth deviation between the submersible and a target based on the depth data, generating a vertical propulsion control instruction through a PID control algorithm according to the compensation depth deviation, outputting the vertical propulsion control instruction to a vertical propeller, and dynamically adjusting a depth of the submersible through the vertical propeller.
2. A machine learning based submersible buoyancy adjustment and depth control method as claimed in claim 1, wherein, Step S1 comprises: S11, collecting original external environment data through a pressure sensor, a temperature sensor and a depth sensor, the original external environment data comprising water pressure data and water temperature data; S12, collecting original submersible state data through an acceleration sensor and an attitude sensor, the original submersible state data comprising motion acceleration data and attitude angle data, and performing fusion processing on the data collected by the acceleration sensor and the attitude sensor through a Kalman filtering algorithm to eliminate system errors of a single sensor.
3. A machine learning based submersible buoyancy adjustment and depth control method as claimed in claim 1, wherein, Step S2 comprises: 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 screened high-frequency coefficients, and performing wavelet reconstruction on the preliminary screened high-frequency coefficients to obtain denoised external environment data and denoised submersible state data; S22, calculating a first quartile Q1 and a third quartile Q3 of the denoised external environment data and the denoised submersible state data, calculating a difference between the first quartile Q1 and the third quartile Q3 as an interquartile range IQR, marking data points exceeding a preset range in the denoised external environment data and the denoised submersible state data as abnormal values, and replacing the abnormal values through a linear interpolation method to obtain interpolated external environment data and interpolated submersible state data, the preset range being (Q1-1.5*IQR, Q3+1.5*IQR); S23, determining a maximum value and a minimum value of each feature of the interpolated external environment data and the interpolated submersible state data, and performing standardization processing on each data point of the interpolated external environment data and the interpolated submersible state data through Min-Max standardization.
4. A machine learning based submersible buoyancy adjustment and depth control method as claimed in claim 1, wherein, Step S4 comprises: S41, an initial buoyancy adjustment model is constructed based on a deep neural network, the initial buoyancy adjustment model comprising an input layer, an output layer and a plurality of hidden layers, the input layer being configured to receive a compensation buoyancy deviation, the output layer being configured to output a buoyancy adjustment instruction, and the plurality of hidden layers being configured to use a ReLU activation function, and a number of neurons of a hidden layer being adjusted based on a number of input features of the input layer; S42, historical buoyancy adjustment data is obtained, the historical buoyancy adjustment data is divided into a training set and a validation set, the initial buoyancy adjustment model is trained by using the training set, model parameters of the initial buoyancy adjustment model are optimized by using a stochastic gradient descent algorithm, a batch normalization is used to accelerate a training process, and a learning rate is dynamically adjusted according to a learning rate decay strategy; S43, a trained model is evaluated by using a root mean square error, and a generalization ability of the model is evaluated by using a K-fold cross-validation method.
5. A machine learning based submersible buoyancy adjustment and depth control method as claimed in claim 4, wherein, Step S4 further comprises: In a forward propagation process of the initial buoyancy adjustment model, a calculation formula of an output of an 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 ); wherein 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 output of the i-th hidden layer, sigmoid(·) is an activation function, BN(·) is batch normalization, tanh(·) is a 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; A calculation formula of the stochastic gradient descent algorithm is: m t+1 = β1m t + (1 - β1)▽L(θ t ); v t+1 = β2v t +(1-β2)[▽L(θ t )] 2 ; wherein m t+1 and v t+1 are the first and second order momentum of the next time step, m t and v t are the first and second order momentum of the current time step, β1 and β2 are the first and second order momentum decay rate, θ t is the model parameter of the current time step, and ▽L(θ t ) is the gradient of the loss function with respect to the model parameter, and are the estimated values of the first and second order momentum after 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. A calculation formula of the root mean square error RMSE is: wherein y j is the true value of the jth sample, is the model predicted value of the jth sample, n is the number of samples, ω j is the buoyancy change dynamic weight of the jth sample, γ is the buoyancy weight adjustment coefficient, is the instantaneous change rate of the buoyancy of the jth sample.
6. A machine learning based submersible buoyancy adjustment and depth control method as claimed in claim 1, wherein, Step S6 comprises: S61, a depth deviation of the submersible from a target position is calculated based on the depth data, the depth deviation is compensated based on environmental factors, and a compensated depth deviation is obtained; S62, the compensated depth deviation is input into a PID controller, an output of the PID controller is calculated, an initial vertical control instruction is obtained, the initial vertical control instruction is limited, and a control instruction is obtained, so that the initial vertical control instruction does not exceed a working range of a vertical thruster; S63, the control instruction is converted into a driving signal of the vertical thruster, and is output to the vertical thruster, so as to realize buoyancy adjustment of the submersible.
7. A machine learning based submersible buoyancy adjustment and depth control method as claimed in claim 6, wherein, Step S6 further comprises: A calculation formula of the output of the PID controller is: K p (h) = K p0 +k p · |e(h)|; where u(h) is the initial vertical control command, K p (h), K l (h), and K d (h) are the first, second, and third adaptive gain coefficients of the PID controller, respectively, e(h) is the compensation depth deviation, K ff is the feedforward gain coefficient, v desired (h) is the desired vertical velocity of the submersible, K p0 , K l0 , and K d0 are the initial first, second, and third adaptive gain coefficients, respectively, k p , k l , and k d are the first, second, and third adaptive gain adjustment coefficients, respectively. A calculation formula for limiting the initial vertical control instruction is: wherein, u(h) is the initial vertical control command output by the PID controller, u min and u max are the minimum and maximum control command limits for the vertical thrusters, respectively.
8. A machine learning based submersible buoyancy adjustment and depth control system, characterized by, The system comprises: A data acquisition module is configured to acquire original external environment data and original submersible state data by using a sensor network, the original external environment data comprising depth data; A data processing module is configured to perform denoising processing and standardization processing on the original external environment data and the original submersible state data, so as to obtain external environment data and submersible state data; A buoyancy deviation module is configured to determine a current buoyancy state of a submersible based on the submersible state data and the external environment data, and calculate a compensation buoyancy deviation between the current buoyancy state and a preset target buoyancy state; An adjustment model module is configured to construct an initial buoyancy adjustment model, train the initial buoyancy adjustment model by using historical buoyancy adjustment data, adjust model parameters of the initial buoyancy adjustment model, and evaluate the trained initial buoyancy adjustment model, so as to obtain a buoyancy adjustment model; A buoyancy adjustment module is configured to input the compensation buoyancy deviation into the buoyancy adjustment model, obtain a buoyancy adjustment instruction, and dynamically adjust a displacement of the submersible based on the buoyancy adjustment instruction. A depth adjustment module is configured to calculate a compensation depth deviation of the submersible from a 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 compensation depth deviation, output the vertical propulsion control instruction to a vertical propeller, and dynamically adjust the depth of the submersible through the vertical propeller.
9. An electronic device, comprising: The method comprises: at least one processor, at least one memory, a communication interface and a bus; wherein the processor, the memory and the communication interface communicate with each other through the bus, the memory stores program instructions executable by the processor, and the processor invokes the program instructions to implement the method of any one of claims 1-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 of any one of claims 1-7.
Citation Information
Patent Citations
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