DVL error correction method, device and system based on BP neural network and particle swarm optimization
By combining BP neural network and particle swarm optimization algorithm with GPS and INS data, the problems of large computational load and slow convergence speed in traditional DVL error calibration methods are solved, achieving efficient and accurate DVL error correction and improving the accuracy and reliability of underwater navigation systems.
Patent Information
- Application Number
- CN202411413916.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-31
- Filing Date
- 2024-10-11
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-10-11
AI Technical Summary
Traditional DVL error calibration methods involve large computational loads and slow convergence speeds in complex multivariable systems, making it difficult to guarantee calibration accuracy and stability, thus affecting the navigation accuracy of underwater operation platforms.
A method based on BP neural network and particle swarm optimization is adopted. By establishing a DVL velocity measurement model and error loss function, the DVL error is solved iteratively using BP neural network and particle swarm optimization algorithm, and error correction is performed by combining GPS and INS data.
This improved the optimization speed and accuracy of DVL error calibration, and enhanced the positioning accuracy and reliability of the underwater autonomous navigation system.
Smart Images

Figure CN119513446B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of underwater autonomous navigation system, in particular to a DVL error correction method and device based on BP (Back Propagation) neural network and particle swarm optimization. BACKGROUND
[0002] In the exploration and development of marine resources, with the continuous deepening of the operation, the demand for navigation accuracy of underwater operation platform is gradually increasing. Among them, as the key equipment of AUV (Autonomous Underwater Vehicle), the installation accuracy of DVL directly affects the measurement performance, especially the installation error of acoustic array, including but not limited to the deviation of array position and the deviation of beam axis, which will have a significant impact on the velocity measurement result. Further, the accurate calibration of parameters such as lever arm vector, positioning angle of acoustic array and velocity measurement scale factor is of great importance to improve the accuracy of navigation system.
[0003] However, the traditional calibration methods, such as least squares method, gradient descent method or Gauss-Newton method, often face the problems of huge calculation amount, slow convergence speed and even unable to converge when calibrating error parameters in a complex multivariable system model, which is not conducive to the improvement of calibration accuracy and stability. Therefore, researchers need to develop a new calibration method to overcome the shortcomings of the existing technology. SUMMARY
[0004] The purpose of the present application is to provide a DVL error correction method and device based on BP neural network and particle swarm optimization, which can ensure the optimization speed and accuracy of the calibration process.
[0005] To achieve the above purpose, the present application provides a DVL error correction method based on BP neural network and particle swarm optimization, which comprises:
[0006] Step one, establishing a DVL velocity measurement model,
[0007]
[0008] Wherein, v d is the speed of underwater submersible provided by DVL; v n is the speed of underwater submersible provided by GPS; k d is the DVL scale factor; is the direction cosine matrix of INS coordinate system to DVL coordinate system installation error angle, is the direction cosine matrix of GPS coordinate system to INS coordinate system installation error angle, is the gyro measured angular velocity in the INS frame, l b is the negative arm vector from the origin of the DVL frame to the origin of the INS frame.
[0009] Step two, establish the DVL error loss function, replace with equivalent quaternion and reorganize the terms to obtain:
[0010]
[0011] where,
[0012]
[0013] Step three, use the BP neural network and particle swarm optimization algorithm to obtain the minimum value, and calibrate the DVL error calibration with the minimum value.
[0014] Further, before step one includes:
[0015] a model establishing unit for establishing a DVL velocity measurement model,
[0016] The DVL velocity measurement model is established as:
[0017]
[0018] where, is the angular velocity of the INS frame relative to the GPS frame.
[0019] Further, the value of k d is obtained by the following method,
[0020]
[0021] The right side except l b can be directly calculated or measured, l b The impact of k d calibration only occurs when the vehicle performs angular motion. In addition, if the vehicle performs angular motion in the opposite direction, the effect will be offset. Since underwater robots mainly do linear motion and rarely do angular motion in practice, the impact of l b is weak. Therefore, it is not necessary to calibrate the accurate negative arm vector. A rough cross arm vector given by hand can meet the navigation accuracy requirements. Based on the above analysis, it can be seen that the calibration accuracy of k d derived from this is not affected by attitude misalignment, and becomes higher with the increase of time n.
[0022] Further, according to formula (1) Observation equation:
[0023]
[0024] Let The observation equation is obtained:
[0025]
[0026] Further, the BP neural network and particle swarm algorithm are used to search for the minimum value of the loss function:
[0027]
[0028] Wherein, the equivalent quaternion is used to replace And reorganize the terms to get
[0029]
[0030] Further, the BP neural network predicts the current attitude calibration parameter according to the DVL speed, GPS speed, and INS angular velocity
[0031] Design a BP neural network NN, taking the DVL speed GPS speed INS angular velocity As the input of the BP neural network. The output of the hidden layer is:
[0032]
[0033] The output of the output layer is:
[0034]
[0035] Further, the predicted value of the BP neural network is used as the initial position of the particle swarm algorithm, and the updating method of the particle speed information and position information is as follows:
[0036]
[0037] Wherein, kg=1,2,...,G, i=1,2,...,Size, r1 and r2 are random numbers between 0 and 1, c1 is a local learning factor, c2 is a global learning factor, and c2 is generally taken to be larger. Wherein And Indicate the local optimal solution and global optimal solution of particle i in the kgth iteration, respectively.
[0038] Further, the DVL error correction method based on BP neural network and particle swarm optimization further includes defining the index ε:
[0039]
[0040] If the value of the loss function corresponding to the result of the k-th iteration is less than a preset value ε, the BP neural network and the particle swarm optimization algorithm are ended, otherwise the optimization iteration is continued.
[0041] The application also provides a DVL error calibration system, comprising:
[0042] a Doppler velocity log (DVL) ;
[0043] a global positioning system (GPS) ;
[0044] an inertial navigation system (INS) ;
[0045] a data workstation;
[0046] an application program;
[0047] and one or more programs, wherein the one or more programs are stored in the data workstation memory, and when the one or more programs are executed on the data workstation by the application program, the BP neural network and particle swarm optimization DVL error correction device executes the BP neural network and particle swarm optimization DVL error correction method as claimed in any one of claims 1-8.
[0048] The application also provides a BP neural network and particle swarm optimization DVL error correction device, comprising:
[0049] a DVL velocity measurement model described as formula (1) :
[0050]
[0051] wherein, v d is the speed of the underwater submersible provided by the DVL; v n is the speed of the underwater submersible provided by the GPS; k d is the DVL scale factor; is the direction cosine matrix of the installation error angle of the INS coordinate system to the DVL coordinate system, is the direction cosine matrix of the installation error angle of the GPS coordinate system to the INS coordinate system, is the self angular velocity measured by the gyroscope in the INS coordinate system, l b is the negative arm vector from the origin of the DVL coordinate system to the origin of the INS coordinate system;
[0052] DVL error loss function, which uses equivalent quaternions Instead And reorganize the items, expressed as formula (2):
[0053]
[0054] Wherein,
[0055]
[0056] DVL error calibration unit, for using BP neural network and particle swarm optimization algorithm to get minimum value, with the minimum value calibrating the DVL error calibration.
[0057] The present application proposes a new method of applying particle swarm optimization (PSO) algorithm fused with BP neural network to DVL installation error calibration. This method is based on a kind of advanced swarm intelligence algorithm-particle swarm optimization algorithm, which is inspired by the foraging behavior of birds in nature, relying on information exchange between individuals in the group to facilitate rapid positioning to the global optimal solution. The main innovation of this method is that it uses particle swarm optimization algorithm fused with BP neural network technology, which significantly improves the efficiency and accuracy of the error calibration process by integrating the deep learning ability of BP neural network and the excellent global search ability of PSO. This not only effectively solves the difficulties faced by traditional error calibration strategies in dealing with complex environments or parameter diversity, but also takes advantage of the fast convergence characteristics of particle swarm algorithm to ensure the optimization speed and accuracy of the calibration process. In addition, the introduction of this method provides a new solution for DVL installation error calibration, which is of great significance for improving the positioning accuracy and reliability of underwater navigation systems.
[0058] In the field of underwater autonomous navigation system technology, the present application relates to a DVL device that uses Doppler effect to measure and calculate the three-dimensional velocity of a vehicle relative to the water and seabed in the marine environment, which is crucial for ensuring accurate navigation and position positioning of marine exploration and other underwater tasks. In order to enhance the navigation accuracy and reliability of underwater autonomous navigation system, the present application suggests to systematically integrate DVL and other navigation technologies such as Global Positioning System (GPS) and Inertial Navigation System (INS). This integrated navigation system uses GPS high-precision positioning to correct the position drift of INS when navigating on the water surface, and combines the velocity data of DVL and the internal data of INS to maintain accurate navigation when navigating underwater. BRIEF DESCRIPTION OF DRAWINGS
[0059] Figure 1 is a flowchart of a DVL installation error calibration method of an embodiment of the present application.
[0060] Figure 2 is a sensor installation diagram of an embodiment of the present application.
[0061] Figure 3 is a BP neural network and particle swarm optimization flowchart of an embodiment of the present application. DETAILED DESCRIPTION
[0062] In the drawings, the same or similar notations are used to represent the same or similar elements or elements having the same or similar functions. The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0063] In view of the high sensitivity of DVL to installation errors in practical applications, the present application proposes an innovative error correction method based on the fusion of BP neural network and particle swarm optimization algorithm. This method effectively combines the excellent performance of PSO algorithm in group search and the fast convergence characteristics, as well as the powerful ability of BP neural network in processing complex data patterns and recognition. Through the fusion of this algorithm, the error correction process is given higher data processing capability, adaptability, and the correction speed is accelerated and the accuracy is improved. The algorithm embodiment of the present application points out a particle swarm optimization framework fused with BP neural network, especially for iterative correction of DVL errors, which is superior to existing calculation methods, brings significant improvement to the accuracy of underwater autonomous navigation, and can be expanded to deeper ocean exploration tasks.
[0064] Figure 1 An AUV device equipped with a GPS receiver, an INS (Inertial Navigation System) and a DVL is shown. The GPS receiver, the INS and the DVL provide navigation information respectively. The AUV device executes the DVL error correction method described in the following embodiments and any implementation thereof according to the received GPS information, INS information and DVL information.
[0065] Embodiment 1
[0066] The present embodiment provides a DVL error correction method based on BP neural network and particle swarm optimization. Figure 2 A flowchart of the method is shown. As shown in Figure 2 , the method comprises:
[0067] Step 21, establishing a DVL velocity measurement model,
[0068]
[0069] wherein vd is the velocity of the underwater vehicle provided by the DVL, v n is the velocity of the underwater vehicle provided by the GPS, k d is the DVL scale factor, is the direction cosine matrix of the installation error angle from the INS coordinate system to the DVL coordinate system, is the direction cosine matrix of the installation error angle from the GPS coordinate system to the INS coordinate system, is the self angular velocity measured by the gyroscope in the INS coordinate system, l b is the negative arm vector from the origin of the DVL coordinate system to the origin of the INS coordinate system;
[0070] Step 22, establishing a DVL error loss function; comprising:
[0071] According to formula (1) to construct Observation equation:
[0072]
[0073] Let Get the observation equation:
[0074]
[0075] Replace with the equivalent quaternion And reorganize the terms to get formula (23):
[0076]
[0077] Where, κ is the quadratic function of the quaternion is the conjugate matrix of ;
[0078] The DVL error loss function is established as:
[0079]
[0080] Where, norm(·) is the operator for calculating the modulus;
[0081] Step 23, using the BP neural network and the particle swarm optimization algorithm to solve the minimum value of the DVL error loss function, to get the corresponding quaternion With the solved quaternion DVL error correction is performed.
[0082] Wherein, step 23 can include:
[0083] Predicting the initial quaternion through the BP neural network;
[0084] The initial quaternion is optimized using a particle swarm optimization algorithm, and the final optimized quaternion is taken as the solved quaternion.
[0085] In an embodiment, the BP neural network comprises an input layer, one hidden layer and an output layer; wherein the input of the input layer comprises DVL speed readings, GPS speed readings and INS angular velocity readings; and the output layer outputs a quaternion.
[0086] The method further comprises, before predicting the initial quaternion using the BP neural network:
[0087] The BP neural network is pre-trained using training data.
[0088] In an embodiment, optimizing the quaternion using the particle swarm optimization algorithm comprises:
[0089] Randomly generating initial values of each particle of the particle swarm, each particle representing a quaternion
[0090] Substituting the quaternion of each particle into a DVL error loss function to calculate a fitness value of each particle as the result;
[0091] Selecting position information of the particle with the minimum fitness value as a local optimal solution;
[0092] Comparing the fitness value corresponding to the local optimal solution and the current quaternion, and taking the smaller fitness value;
[0093] If the smaller fitness value meets a threshold condition, then taking the quaternion corresponding to the smaller fitness value as an optimization result;
[0094] If the smaller fitness value does not meet the threshold condition, then updating a training data set of the BP neural network;
[0095] Training the BP neural network using the updated training data set;
[0096] And predicting the quaternion using the latest trained BP neural network.
[0097] If the smaller fitness value does not meet the threshold condition,
[0098] Determining whether the number of updates of the BP neural network reaches a maximum number;
[0099] If yes, then taking the quaternion corresponding to the smaller fitness value as the optimization result;
[0100] Otherwise, performing the operation of updating the training data set of the BP neural network.
[0101] In an embodiment, randomly generating initial values of each particle of the particle swarm comprises:
[0102] Initial values are assigned to the position coordinates and velocity vectors of individual particles in the particle swarm; wherein the velocity vector is a vector composed of four elements of the particle, and the position coordinates are set as candidate values of the installation error angle of the inertial navigation system.
[0103] In an embodiment, updating the training data set of the BP neural network based on the quaternion corresponding to the smaller fitness value comprises:
[0104] The quaternion corresponding to the smaller fitness value is used as the initial position of the particle swarm, and the updating method of the speed information and position information of the particle is as follows:
[0105]
[0106] Wherein, kg=1, 2,..., G, i=1, 2,..., Size, r1 and r2 are random numbers between 0 and 1, c1 is a local learning factor, and c2 is a global learning factor; wherein And The local optimal solution and the global optimal solution of particle i in the kgth iteration are represented by p
[0107] Embodiment 2
[0108] The embodiment provides a DVL error correction method based on a BP neural network and a particle swarm optimization. Figure 3 The flowchart of the method is shown. As Figure 3 shown, the method comprises:
[0109] Step 31, establishing a DVL speed measurement model:
[0110]
[0111] Wherein, v d is the speed of the underwater vehicle provided by the DVL; v n is the speed of the underwater vehicle provided by the GPS; k d is the DVL scale factor; is the direction cosine matrix of the installation error angle from the INS coordinate system to the DVL coordinate system, is the direction cosine matrix of the installation error angle from the GPS coordinate system to the INS coordinate system, is the angular velocity measured by the gyroscope in the INS coordinate system, l b is the negative arm vector from the origin of the DVL coordinate system to the origin of the INS coordinate system.
[0112] Wherein, the establishment process of the model (1) is as follows:
[0113] During calibration, GPS speed is used as the reference speed. For ease of explanation, the INS vehicle coordinate system coincides with the vehicle body coordinate system. The relationship between DVL speed and GPS CSS speed can be expressed as follows:
[0114]
[0115] Among them, v d This refers to the speed of the underwater vehicle provided by DVL; v n The speed of the underwater vehicle is provided by GPS; k d It is the DVL scaling factor; Install an error angle direction cosine matrix for the transition from the INS coordinate system to the DVL coordinate system. Install an error angle direction cosine matrix to bridge the GPS coordinate system to the INS coordinate system. Let l be the angular velocity of the INS coordinate system relative to the GPS coordinate system. b It is the negative arm vector from the origin of the DVL coordinate system to the origin of the INS coordinate system.
[0116] k d , and l b It is an unknown parameter. and v d The value of is known and can be calculated using equation (12). Value:
[0117]
[0118] It is the angular velocity ε measured by the gyroscope in the INS coordinate system. b This is the gyroscope bias, which is negligible due to its small magnitude. This is the Earth's rotation rate, approximately 7.3 × 10⁻⁶. -5 rad / s, which can also be ignored. Equation (13) is obtained from the following formula:
[0119]
[0120] v N and v E R is the north and east vector of velocity. M It is the radius of the Earth's meridian; R N It is the radius of the vertical circle of the Earth; h and L represent the altitude and latitude of the vehicle's position, respectively. In equation (13), the speed of the underwater vehicle is much smaller than the Earth's radius, therefore The elements in the matrix are approximately 0. Based on the above analysis, this embodiment can be considered... because Other variables are small, the present embodiment will formula (11) is written as formula (1):
[0121]
[0122] Step 32, the establishment of DVL error loss function:
[0123] According to formula (1) to construct Observation equation:
[0124]
[0125] Let Get observation equation:
[0126]
[0127] The most common use of quaternions in physics is to represent rotations in three-dimensional space. Compared with the traditional rotation matrix or Euler angle, quaternion is more efficient and stable in dealing with rotation. The invention uses equivalent quaternion Instead of installing error angle direction cosine matrix And reorganize the items, get formula (4):
[0128]
[0129] Wherein, Is The conjugate matrix of
[0130] The establishment of DVL error loss function is:
[0131]
[0132] Wherein, norm (·) is the modulus of the operator.
[0133] Wherein, the iterative calibration method based on particle swarm algorithm can calibrate all error terms in formula 1. According to formula (1) to construct The process of observation equation (2) includes:
[0134] Because the direction cosine matrix Will not change the modulus of the vector, formula (6) can be obtained:
[0135]
[0136] The scale factor k d Can be obtained by the following formula:
[0137]
[0138] In the formula, v n , v dand The noise of the DVL will reduce the accuracy of the calibration of k d In order to eliminate this negative effect, the embodiment integrates the time period [0, T] to obtain:
[0139]
[0140] Discretize formula (8) to obtain formula (9):
[0141]
[0142] In formula (9), l b is a preset value, which can be an empirical value. In addition to l b , the remaining parameters can be directly calculated or measured, l b The impact of k d calibration only occurs when the vehicle performs angular motion. In addition, if the vehicle performs angular motion in the opposite direction, its effect will be offset. Since the underwater robot mainly performs linear motion in practice and rarely performs angular motion, the impact of l b is weak. Therefore, it is not necessary to calibrate the accurate negative arm vector. A rough lateral arm vector given by hand can meet the navigation accuracy requirement. Based on the above analysis, it can be seen that the calibration accuracy of k d derived from formula (9) is not affected by attitude misalignment, and becomes higher with the increase of time n.
[0143] Attitude misalignment calibration is to solve k d has been solved, l b is also given a rough value, and is the only remaining unknown matrix. Therefore, the embodiment will construct an observation equation according to formula (9), and similarly, the integral of the velocity will be used to calibrate the attitude misalignment, rather than the velocity containing noise. The discrete form of formula (9) directly gives the above formula (2).
[0144] Step 33, solve the minimum value of the DVL error loss function, and calibrate the DVL error corresponding to the minimum value of the quaternion.
[0145] The goal of this step is to improve the accuracy of the prediction of the DVL attitude calibration parameters (i.e. the quaternion ) through an alternating optimization strategy. The fast prediction capability of the BP neural network and the global search capability of the PSO can be complementary while pursuing a high-precision solution.
[0146] In this step, a quaternion is solved according to the above formula (5) to minimize the value of the loss function, and the following formula is obtained:
[0147]
[0148] wherein, R 4*1 represents a set of real numbers in 1 row and 4 columns.
[0149] In addition, let α = [α x α y α z ] T , β = [β x β y β z ] T , substituting equation (10) gives k as equation
[0150]
[0151] In equation (11), k is a quadratic function of quaternion , and the modulus norm(k) is also a quadratic function. The optimal solution of k is obtained by equation (11).
[0152] If a first-order optimization algorithm such as gradient descent is used to search for the optimal solution of k, the optimization efficiency will not be very high. The embodiment of the present application uses a particle swarm optimization algorithm to search for the optimal solution.
[0153] This step can include:
[0154] (1) Predicting the initial attitude calibration parameter by BP neural network
[0155] Design a 3-layer BP neural network NN:
[0156] Let j represent the number of layers of the neural network:
[0157] j = 1 is the input layer, the input features include 3 DVL speed readings, 3 GPS speed readings and 3 INS angular velocity readings, and the input layer will contain 9 neurons.
[0158] j = 2 is the hidden layer, a single hidden layer is selected, the number of neurons in the hidden layer is 10, and the activation function is selected as the Sigmoid function to introduce nonlinear characteristics.
[0159] j = 3 is the output layer, the number of output layer neurons should match the target output. If the target is to predict a quaternion, the output layer should contain 4 neurons, each corresponding to a component (w, x, y, z) of the quaternion.
[0160] First, train the BP neural network until the difference between the predicted value of the output and the preset optimal value meets the preset condition.
[0161] The training process can include:
[0162] Perform forward propagation: input data into the neural network, calculate the output of each layer until the final prediction. Use the loss function of the neural network to calculate the difference between the predicted value and the optimal value.
[0163] Perform backpropagation: calculate the gradient of the loss function with respect to each weight, and update the weights using the gradient descent algorithm to gradually reduce the prediction error.
[0164] Iterative training: iterate the forward propagation and backpropagation process multiple times until the network converges, that is, the prediction error reaches a set threshold or no longer significantly reduces.
[0165] The trained neural network can be used to predict new attitude data, including:
[0166] Input new data: the input layer receives new sensor readings.
[0167] Predict quaternion initial value: the neural network processes the input data, calculates through the hidden layer, and gives the initial value prediction of the quaternion in the output layer. At this time, the output quaternion represents the estimated value of the current attitude.
[0168] For example, the speed of the DVL GPS speed And the angular velocity of the INS As the input of the BP neural network, the output of the hidden layer is calculated as formula (12):
[0169]
[0170] In the formula, j represents the number of layers of the neural network, i represents the number of the j-th layer of the neural network, h ij represents the value of the output of the i-th neuron of the j-th layer, f j represents the activation function of the i-th neuron of the j-th layer, W ij represents the weight matrix from the j-1-th layer to the j-th layer, X ij represents the value of the i-th neuron of the j-1-th layer to the j-th layer, b1 represents the bias from the 1st layer to the 2nd layer, and the Sigmoid function is used as the excitation function, which is:
[0171]
[0172] For attitude calibration, the output is usually one or a set of parameters describing the attitude of the device. In this embodiment, the quaternion represents the quaternion of the attitude, and the output of the output layer is the predicted attitude calibration parameter, which is described as formula (14):
[0173]
[0174] The prediction process of initial attitude calibration parameters is explained in detail below through an example.
[0175] Suppose the following input data are given:
[0176] DVL velocity reading GPS velocity and INS angular velocity The input layer has 9 neurons for
[0177] The prediction process of initial attitude calibration parameters includes:
[0178] Step 1: input these input data into the input layer of the neural network. The input layer neurons will read the above 9 data points.
[0179] Step 2: during the forward propagation process, the input data are processed by the hidden layer, and the output of each layer is calculated until the final output layer.
[0180] Initial weights and biases: W i1(0) = rand(10, 1), b1 = rand(1, 1)
[0181]
[0182] where k represents the number of neurons in the second layer when j = 2, k = 10.
[0183] The hidden layer output is [h 1,2 h 2,2 h 3,2 h 4,2 h 5,2 h 6,2 h 7,2 h 8,2 h 9,2 h 10,2 ]
[0184] Step 3: the 4 neurons of the output layer give the initial value prediction of the quaternion.
[0185] Initial output layer weights and biases: V i2(0) = rand(10, 1), b2 = rand(1, 1)
[0186]
[0187] where l represents the number of neurons in the third layer when j = 3, l = 4.
[0188] The output layer output is [h 1,3 h2,3 h 3,3 h 4,3 ]
[0189] Predicted attitude calibration parameters are
[0190] (2) Optimizing attitude calibration parameters using PSO (Particle Swarm Optimization) algorithm
[0191] Initialize the mathematical model of the particle swarm optimization (PSO) algorithm, which involves assigning initial values to the velocity vectors and position coordinates of individual particles in the swarm. Among them, the position coordinates of individual particles are directly mapped as candidate values of inertial navigation system installation error angles, while the velocity vectors reflect the updating strength and directionality of inertial navigation system installation error angle values in the subsequent iterative optimization process.
[0192] This step specifically includes:
[0193] a. Initialize the particle swarm
[0194] Express the attitude calibration parameters in quaternions, with each particle representing a quaternion Generate an initial particle swarm, with each particle generated with a random initial value. Ensure that each quaternion satisfies the unit length constraint, i.e. Assign an initial position and a random initial velocity to each particle The initial velocity is also a vector composed of four quaternion numbers, which determines the moving direction and step size of the particle in the next iteration.
[0195] b. Calculate the fitness value
[0196] Loss function is expressed as equation (17):
[0197]
[0198] For each particle, substitute its quaternion into the loss function to calculate and obtain the fitness value, i.e., the function value. The smaller the fitness value, the better the current solution.
[0199] c. Update individual and global optimal solutions
[0200] Select the position information of the particle with the smallest fitness value as the local optimal solution. As shown in equation (18):
[0201]
[0202] where, represents the optimal solution of the ith particle in the kgth iteration, i.e., the optimal position of the ith particle;
[0203] Xk g (i) represents the current global optimal solution of the particle in the particle swarm in the kth iteration.
[0204] and Xk g (i) represents the current global optimal solution of the particle in the particle swarm in the kth iteration.
[0205] d. Update the particle position and velocity
[0206] Update the velocity and position of the particle, generate a new population, and perform a boundary check on the velocity and position of the particle. In order to avoid the algorithm falling into a local optimal solution, a local adaptive mutation operator is added for adjustment.
[0207] The update of the particle position and velocity is as follows:
[0208]
[0209] where kg = 1, 2, …, G, represents the number of iterations (updates), and G is the maximum number of iterations; i = 1, 2, …, Size, represents the i-th particle in the particle swarm, and Size is the number of particles in the particle swarm;
[0210] Xk g (i) represents the velocity vector of the i-th particle at the kth iteration. This is the velocity of the particle in this iteration, which determines how the particle moves based on the current position; Xk g+1 (i) represents the velocity vector of the i-th particle at the kth iteration, which is the new velocity obtained by updating the particle after the current iteration, and is used for position update in the next iteration. w(t) represents the inertia weight, which is usually a function of the number of iterations. The inertia weight in PSO is used to control the ability of the particle to retain its current velocity. The larger the inertia weight, the greater the tendency of the particle to retain the current velocity, making it explore a wider search space; on the contrary, a smaller inertia weight will help the particle converge to a local area. Xk g (i) represents the position vector of the i-th particle at the kth iteration, which is the specific position of the particle in the current iteration, and is used to represent the attitude calibration parameters.
[0211] c1 is a preset local learning factor, and c2 is a preset global learning factor, preferably c2 is greater than c1;
[0212] r1 and r2 are random numbers between 0 and 1.
[0213] e. Update the fitness value of the particle
[0214] Compare the current fitness value F(X i ) of the particle with its own historical optimal value p i , if F(X i ) is better than p i , then pi F(x i ), and update the particle position.
[0215] Compare the current fitness value F(x i ) of the particle with the population optimal value BestS, if F(x i ) is better than BestS, then set BestS as the current value F(x i ), update the population global optimal value.
[0216] In an embodiment, it can also include:
[0217] (3) error back propagation
[0218] Using the calibration data corresponding to the global optimal value in the PSO process Calculate the error of the neural network prediction, update the parameters of the neural network prediction. The calibration data is the optimal calibration data.
[0219] Where the error of the neural network prediction is calculated as:
[0220]
[0221] Given the historical data D:
[0222]
[0223] According to the neural network loss function Calculate the error term of the output unit and the error term of the hidden unit. The gradient value of the loss function with respect to the hidden unit is: The gradient value of the output unit is:
[0224] The weights between nodes of each layer will also be updated iteratively, and the hidden unit parameter update is:
[0225]
[0226] η(t)=2 λ η(t-1) (24)
[0227]
[0228] Output unit parameter update:
[0229]
[0230] η(t)=2λη(t-1) (28)
[0231]
[0232] where η > 1 is the learning rate; and a is the momentum factor, 0 < a < 1.
[0233] (4) Alternating cycles
[0234] The process of (2) to (3) is repeated. Each time the estimated value of the BP neural network is used to initialize the PSO process, and the pose calibration parameters of the output of PSO are used to update the training data set and the BP neural network, such as updating the "hidden unit parameters" and "output unit parameters" as described above. Check the end condition, if the maximum number of iterations is reached or the fitness function is less than the predetermined threshold, stop the iteration. Otherwise, go to the iteration of the BP neural network. The end condition is that the optimization reaches the maximum evolution number, or the evaluation value is less than the given accuracy.
[0235] Experimental data show that the BP neural network and particle swarm algorithm have many advantages compared with traditional methods:
[0236] In the field of optimization algorithms, gradient descent and Newton iteration, as two widely used traditional methods, although they show effectiveness in most scenarios, they are still limited by specific difficulties: one is the potential slow convergence rate, two is the possibility of falling into local minimum or saddle point, three is the dependence on gradient information, and four is the uncertainty of convergence. In the face of the above restrictions, the appropriate selection of algorithm is crucial for specific problems, and for some specific problems, modern algorithms such as particle swarm optimization (PSO) may provide superior performance.
[0237] The particle swarm optimization algorithm combined with BP neural network, a modern optimization strategy, integrates the advantages of deep learning and global search, especially suitable for handling complex problems. This method takes the unique advantages of both algorithms in the following aspects:
[0238] 1. Combining the high-precision data pattern learning ability of BP neural network with the global optimization ability of PSO, this synergistic effect enhances the search efficiency and the accuracy of parameter optimization, while maintaining the accuracy of prediction ability.
[0239] 2. Particle swarm optimization algorithm can effectively search for global optimal solution in the case of more data limitations, and combined with data-driven BP neural network, it can provide satisfactory performance even in the case of insufficient data.
[0240] 3. Through PSO global optimization search, the parameters of BP neural network are adjusted with higher precision, thereby not only enhancing the performance on the training set, but also improving the generalization ability of the model to unseen samples.
[0241] 4. PSO algorithm, with its fewer parameters, relatively simple adjustment and easy implementation, provides a flexible and stable way to adjust and optimize the structure of BP neural network model.
[0242] In summary, the particle swarm optimization algorithm combined with BP neural network as an innovative strategy, in dealing with highly complex optimization problems and multi-parameter space problems, shows excellent performance and results, expands the application scope of traditional technology, and gives a new perspective and method to solve the complex problems in the real world. With the help of this strategy, the advanced mapping function of BP neural network and the global search mechanism of PSO can be effectively utilized to achieve accurate performance improvement, especially suitable for scenarios that require high-precision prediction and have highly complex problem-solving space.
[0243] By appropriately modifying the error calibration algorithm in the application, or introducing other types of data processing methods for replacement, fine-tuning the key parameters and calibration standards in the algorithm, and reordering or optimizing the steps of the processing flow, similar calibration effects can be achieved, but these methods are within the basic framework and core principles of the application.
[0244] Finally, it should be pointed out that: the above examples are only used to illustrate the technical solutions of the application, but not to limit it. Those skilled in the art should understand that the technical solutions described in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application.
Claims
1. A Doppler velocity meter (DVL) error correction method based on BP neural network and particle swarm optimization, characterized in that, include: Step 1: Establish the DVL speed measurement model. Among them, v d It is the speed of the underwater vehicle provided by DVL, v n The speed of the underwater vehicle is provided by GPS, k. d It is the DVL scaling factor. Install an error angle direction cosine matrix for the transition from the INS coordinate system to the DVL coordinate system. Install an error angle direction cosine matrix to bridge the GPS coordinate system to the INS coordinate system. It is the angular velocity of the gyroscope measured in the INS coordinate system. b The negative arm vector from the origin of the DVL coordinate system to the origin of the INS coordinate system; Step 2, establish the DVL error loss function; including: Construct according to equation (1) Observation equation: make The observation equation is obtained as follows: Using equivalent quaternions replace And by reorganizing the terms, we get equation (23): Where k is a quaternion a quadratic function, yes The conjugate matrix; The DVL error loss function is established as follows: Where norm(·) is the operator for calculating the modulus; Step 3: Use a backpropagation neural network and particle swarm optimization algorithm to find the minimum value of the DVL error loss function, and obtain the corresponding quaternion. The quaternion obtained by solving Perform DVL error correction; Step three includes: Predicting initial quaternions using a BP neural network; The initial quaternion is optimized using the particle swarm optimization algorithm, and the final optimized quaternion is used as the solved quaternion. Optimizing quaternions using the particle swarm optimization algorithm includes: The initial values for each particle in the particle swarm are randomly generated. Each particle is randomly assigned an initial velocity and an initial position value, and each particle corresponds to a quaternion. and Substitute the quaternion of each particle into the DVL error loss function, and use the calculation result as the fitness value of each particle. If the minimum fitness value of the particle swarm satisfies the threshold condition, then the quaternion corresponding to the minimum fitness value is used as the optimization result. If the minimum fitness value of the particle swarm does not meet the threshold condition, update the velocity and position values of the particles in the particle swarm, calculate the error of the BP neural network prediction using the quaternion corresponding to the current minimum fitness value of the particle swarm, and update the parameters of the BP neural network prediction.
2. The DVL error correction method based on BP neural network and particle swarm optimization according to claim 1, characterized in that, A BP neural network consists of an input layer, a hidden layer, and an output layer; the input layer takes into account DVL velocity readings, GPS velocity readings, and INS angular velocity readings; the output layer outputs quaternions.
3. The DVL error correction method based on BP neural network and particle swarm optimization according to claim 2, characterized in that, Before predicting the initial quaternion using a BP neural network, the following steps are also included: Use training data to pre-train the BP neural network.
4. The DVL error correction method based on BP neural network and particle swarm optimization according to claim 1, characterized in that, If the minimum fitness value does not meet the threshold condition, it also includes: Determine whether the number of updates for the BP neural network has reached the maximum. If so, the quaternion corresponding to the minimum fitness value of the current particle swarm is used as the optimization result; Otherwise, perform the operation to update the velocity and position values of the particles in the particle swarm.
5. A DVL error correction device based on BP neural network and particle swarm optimization, used to perform the method according to any one of claims 1-4, characterized in that, include: The DVL speed measurement model processing module is used for: Establish a DVL speed measurement model. Among them, v d It is the speed of the underwater vehicle provided by DVL, v n The speed of the underwater vehicle is provided by GPS, k. d It is the DVL scaling factor. Install an error angle direction cosine matrix for the transition from the INS coordinate system to the DVL coordinate system. Install an error angle direction cosine matrix to bridge the GPS coordinate system to the INS coordinate system. It is the angular velocity of the gyroscope measured in the INS coordinate system. b The negative arm vector from the origin of the DVL coordinate system to the origin of the INS coordinate system; Establish the DVL error loss function; including: Construct according to equation (14) Observation equation: make The observation equation is obtained as follows: Using equivalent quaternions replace And by reorganizing the terms, we get equation (23): Where κ is a quaternion a quadratic function, yes The conjugate matrix; The DVL error loss function is established as follows: Where norm(·) is the operator for calculating the modulus; The correction module is used to find the minimum value of the DVL error loss function using a BP neural network and particle swarm optimization algorithm, and obtain the corresponding quaternion. The quaternion obtained by solving Perform DVL error correction.
6. A DVL error correction system based on BP neural network and particle swarm optimization, characterized in that, This includes a Doppler velocity meter (DVL), a global positioning system (GPS), an inertial navigation system (INS), and a controller; among which... The controller is used for: It receives positioning information transmitted from the Doppler DVL velocities, the Global Positioning System (GPS), and the Inertial Navigation System (INS). Perform the method according to any one of claims 1-4 based on the received location information.
Citation Information
Patent Citations
DVL installation error calibration method, device and system
CN114459507A
DVL error parameter estimation method based on particle swarm optimization
CN116337111A