Seawater density gradient estimation method, device and medium based on Kalman filter

Through Kalman filter technology, the problem of low accuracy of seawater density gradient estimation for underwater vehicles in the deep sea is solved, and high-precision ocean density gradient field acquisition and speed-free and power-free hovering control are achieved, with an observation accuracy of 100,000 points. one.

CN118643594BActive Publication Date: 2024-10-25CHINA STATE SHIPBUILDING CORP NO 707 RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411097206.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-10-25
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

Underwater vehicles need accurate marine environment information when navigating in deep seas, especially seawater density gradient information. However, existing thermo-haline depth gauges have large measurement errors, making it difficult to achieve high-precision seawater density gradient estimation, especially when there is no speed or power. When hovering control.

Method used

The seawater density gradient estimation method based on the Kalman filter is used to establish the zero-speed vertical motion equation of the underwater vehicle, perform linearization processing, design a quadratic optimal regulator, expand the linear motion equation, and use the Kalman filter The vertical acceleration, velocity and buoyancy imbalance are estimated to obtain the Kalman filter observation state quantity, and then the control instructions and discretized signals are obtained through the depth controller to estimate the seawater density gradient field.

Benefits of technology

It achieves high-precision estimation of seawater density gradient changes, with an observation accuracy of up to one hundred thousandth, supports underwater vehicle hovering control at no speed and power, and improves the acquisition speed and accuracy of the ocean density gradient field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643594B_ABST
    Figure CN118643594B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of ship motion control, and provides a method, device and medium for estimating seawater density gradient based on Kalman filter, the method comprising: establishing a zero-speed vertical motion equation for an underwater vehicle; linearizing the vertical motion equation, and designing a quadratic optimal regulator based on the linearized motion equation; obtaining a Kalman filter by expanding the linearized motion equation, estimating vertical acceleration, vertical velocity and buoyancy imbalance, and obtaining a Kalman filter observation state quantity; obtaining a discrete control switch signal by discretizing control instructions; and estimating a seawater density gradient field based on the discrete control switch signal and the Kalman filter observation state quantity. The present invention estimates the seawater density gradient field based on the Kalman filter observation state quantity, quickly and accurately obtains the ocean density gradient field, and realizes the speedless and powerless hovering control of the underwater vehicle, and the observation accuracy can reach one hundred thousandth.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ship motion control, and in particular to a seawater density gradient estimation method, device and medium based on a Kalman filter. Background Art

[0002] Underwater vehicles need reliable marine environment information to provide protection when they are navigating and maneuvering in the deep sea. Although the temperature-salinity-depth instrument can measure the approximate range of changes in seawater density, its measurement error is large. When underwater vehicles are detecting marine resources or sailing at zero speed, they need to stay at a certain position in the ocean for a long time. When sailing at a fixed point, there is usually no speed, and it is necessary to consume energy or use the marine environment to maintain depth. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems existing in the related art. To this end, the present invention provides a seawater density gradient estimation method, device and medium based on a Kalman filter, which improves the estimation accuracy of seawater density gradient change by accumulating the buoyancy change generated by a certain depth, and quickly and accurately obtains the ocean density gradient field based on the Kalman filter observation state quantity, so as to realize the non-speed and non-powered hovering control of underwater vehicles, and the observation accuracy can reach one in one hundred thousand.

[0004] The present invention provides a seawater density gradient estimation method based on a Kalman filter, comprising:

[0005] S1: Establish the vertical motion equation of underwater vehicle at zero speed;

[0006] S2: Obtain the linearized motion equation by linearizing the zero-speed vertical motion equation;

[0007] S3: Design a quadratic optimal regulator based on the linearized equation of motion to obtain the depth controller equation;

[0008] S4: By expanding the linearized motion equation, a Kalman filter is obtained, and the vertical acceleration, vertical velocity and buoyancy imbalance are estimated using the Kalman filter to obtain the Kalman filter observation state quantity;

[0009] S5: obtaining a control instruction through a deep controller equation, and obtaining a discrete control switch signal by discretizing the control instruction;

[0010] S6: Estimate the seawater density gradient field based on the discretized control switch signal and the Kalman filter observation state quantity.

[0011] According to a seawater density gradient estimation method based on a Kalman filter provided by the present invention, the method further includes that in the step S1, the zero-speed vertical motion equation of the underwater vehicle is:

[0012]

[0013] in, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, is the first hydrodynamic coefficient, is the second hydrodynamic coefficient, is the third hydrodynamic coefficient, is the initial vertical force.

[0014] According to a seawater density gradient estimation method based on a Kalman filter provided by the present invention, the method further includes obtaining a linearized motion equation by linearizing the zero speed vertical motion equation in step S2, wherein the linearized motion equation is:

[0015]

[0016] in, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, is the first linearized hydrodynamic coefficient, is the second linearized hydrodynamic coefficient, is the third hydrodynamic coefficient, is the initial vertical force.

[0017] According to a seawater density gradient estimation method based on a Kalman filter provided by the present invention, the method further includes designing an optimal controller based on a linearized motion equation in the step S3, and the standard LQR linear quadratic regulator state equation is:

[0018]

[0019] in, For control, To control the speed of water volume change, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, For depth, is the first linearized hydrodynamic coefficient, is the second linearized hydrodynamic coefficient, is the third hydrodynamic coefficient;

[0020] The parameter matrix of the optimal controller is obtained by solving the Riccati equation, which is:

[0021]

[0022] in, is the system state transfer matrix, is the system input matrix, is the parameter matrix of the optimal controller, is the weight matrix corresponding to the system state, The corresponding weight matrix for the system input, is the transposed matrix of the system state transfer matrix, is the transposed matrix of the system input matrix;

[0023] The depth controller equation is:

[0024]

[0025] in, To control the switch signal; is the first coefficient in the depth controller parameter matrix, is the second coefficient in the depth controller parameter matrix, is the third coefficient in the depth controller parameter matrix, is the instruction depth.

[0026] According to a seawater density gradient estimation method based on a Kalman filter provided by the present invention, the method further includes, in the step S4, establishing an expanded linear motion state equation by processing the linear motion equation:

[0027]

[0028] in, is the first expansion linearized hydrodynamic coefficient, is the linearized hydrodynamic coefficient of the second expansion, is the observed value of buoyancy imbalance, For control, is the buoyancy imbalance rate, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, for depth;

[0029] The depth calculation expression is:

[0030]

[0031] The Kalman filter is:

[0032]

[0033] in, is the observation matrix, , is the first coefficient of the observer, is the second coefficient of the observer, is the third coefficient of the observer; for The observed value of for The observed value of is the state transfer matrix , Input matrix for the system , for ;

[0034] The Kalman filter observation state is:

[0035]

[0036] in, is the Kalman filter observation state quantity, is the observed state quantity of vertical acceleration in the hull coordinate system, is the vertical velocity observation state quantity in the fixed coordinate system, is the observed state quantity of buoyancy imbalance rate, for The observed value of for The observed value of for Observed value of .

[0037] According to a seawater density gradient estimation method based on a Kalman filter provided by the present invention, the method further includes obtaining the coefficients of the observer by using a pole configuration method, and the pole configuration satisfies:

[0038]

[0039] in, , is the first coefficient of the observer, is the second coefficient of the observer, is the third coefficient of the observer; is the state transfer matrix , for , is the first expansion linearized hydrodynamic coefficient, is the complex variable in Laplace transform, is the identity matrix, for the extreme point;

[0040] The observer coefficients obtained are:

[0041]

[0042] The buoyancy imbalance observation value is obtained through the observer coefficient and the Kalman filter observation state equation.

[0043] According to a seawater density gradient estimation method based on a Kalman filter provided by the present invention, the method further includes discretizing the control instruction in the step S5 to obtain a discretized control switch signal, wherein the discretized control switch signal is:

[0044]

[0045] in, is the discrete control switch signal, To control the switch signal, when When water is added, When the pump is turned off, Drain water from time to time.

[0046] According to the present invention, a seawater density gradient estimation method based on a Kalman filter also includes: forming a depth difference and a buoyancy imbalance observation deviation after the underwater vehicle changes from one depth to another by hovering control; calculating the change in the amount of water discharged during the deepening process after the system is stable; and obtaining the seawater density gradient field by combining the depth change and the displacement volume of the underwater vehicle. The calculation expression of the seawater density gradient field is:

[0047]

[0048] in, is the seawater density gradient field, is the cumulative amount of water discharged, is the depth variation, is the displacement of the underwater vehicle, To observe the buoyancy imbalance deviation.

[0049] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned methods for estimating seawater density gradient based on a Kalman filter are implemented.

[0050] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for estimating seawater density gradient based on a Kalman filter are implemented.

[0051] The above one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects:

[0052] The present invention provides a seawater density gradient estimation method, device and medium based on a Kalman filter. The Kalman filter is used to observe the vertical speed, vertical acceleration and buoyancy imbalance of an underwater vehicle. The designed vertical controller is used to control the underwater vehicle from one depth to another depth. The seawater density gradient field is obtained based on the ratio of the accumulated buoyancy displacement change to the depth difference. The present invention improves the estimation accuracy of the seawater density gradient change by accumulating the buoyancy change generated at a certain depth, quickly and accurately obtains the ocean density gradient field, and realizes the non-speed and non-powered hovering control of the underwater vehicle. The observation accuracy can reach one hundred thousandth.

[0053] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0055] Figure 1 A schematic flow chart of a seawater density gradient estimation method based on a Kalman filter provided by the present invention.

[0056] Figure 2 A depth variation curve of an underwater vehicle according to a seawater density gradient estimation method based on a Kalman filter provided by the present invention.

[0057] Figure 3 The present invention provides a Kalman filter-based seawater density gradient estimation method for an underwater vehicle buoyancy cumulative water discharge and injection curve.

[0058] Figure 4 The invention provides a seawater density gradient estimation method based on a Kalman filter, and a seawater density variation curve measured at 40 m by a temperature-salinity-depth instrument.

[0059] Figure 5 A block diagram of an electronic device for a seawater density gradient estimation method based on a Kalman filter provided by the present invention.

[0060] Reference numerals:

[0061] 201, processor; 202, communication bus; 203, communication interface; 204, memory. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme in the present invention will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present invention. The following embodiments are used to illustrate the present invention, but cannot be used to limit the scope of the present invention.

[0063] In the description of the embodiments of the present invention, it should be noted that the terms “first”, “second” and “third” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0064] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0065] Combine the following Figures 1 to 5 The present invention describes a seawater density gradient estimation method, device and medium based on a Kalman filter.

[0066] like Figure 1 As shown, a seawater density gradient estimation method based on a Kalman filter comprises:

[0067] S1: Establish the vertical motion equation of underwater vehicle at zero speed;

[0068] S2: Obtain the linearized motion equation by linearizing the zero-speed vertical motion equation;

[0069] S3: Design a quadratic optimal regulator based on the linearized equation of motion to obtain the depth controller equation;

[0070] S4: By expanding the linearized motion equation, a Kalman filter is obtained, and the vertical acceleration, vertical velocity and buoyancy imbalance are estimated using the Kalman filter to obtain the Kalman filter observation state quantity;

[0071] S5: obtaining a control instruction through a deep controller equation, and obtaining a discrete control switch signal by discretizing the control instruction;

[0072] S6: Estimate the seawater density gradient field based on the discretized control switch signal and the Kalman filter observation state quantity.

[0073] In some specific embodiments of the present invention, the vertical motion equation of the underwater vehicle at zero speed is established; the linearized motion equation is obtained by linearizing the vertical motion equation; the quadratic optimal regulator is designed based on the linearized motion equation to obtain the depth controller equation; the Kalman filter is obtained by expanding the linearized motion equation, and the vertical acceleration, vertical velocity and buoyancy imbalance are estimated by using the Kalman filter to obtain the Kalman filter observation state quantity; the control instruction is obtained through the depth controller equation, and the control instruction is discretized to obtain the discrete control switch signal; the seawater density gradient field is estimated according to the discretized control switch signal and the Kalman filter observation state quantity. The ocean density gradient field can be obtained quickly and accurately to meet the requirements of the underwater vehicle's zero-speed and powerless hovering control, and the observation accuracy can reach one hundred thousandth.

[0074] Specifically, S1: establish the zero-speed vertical motion equation of the underwater vehicle; the zero-speed vertical motion equation of the underwater vehicle is:

[0075]

[0076] in, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, is the first hydrodynamic coefficient, is the second hydrodynamic coefficient, is the third hydrodynamic coefficient, is the initial vertical force.

[0077] In some embodiments of the present invention, when an underwater vehicle is sailing in the deep sea, it needs to be fixed at a certain position in the ocean for a long time, and there is usually no speed during the fixed-point sailing.

[0078] S2: By linearizing the zero-speed vertical motion equation, the linearized motion equation is obtained; the linearized motion equation is:

[0079]

[0080] in, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, is the first linearized hydrodynamic coefficient, is the second linearized hydrodynamic coefficient, is the third hydrodynamic coefficient, is the initial vertical force.

[0081] In some embodiments of the present invention, during the stable depth control process, according to the vertical speed The fluctuation range of , the linearization initial condition is selected as: .

[0082] S3: Design a quadratic optimal regulator based on the linearized equation of motion to obtain the depth controller equation;

[0083] Design the optimal controller based on the linearized equation of motion. The state equation of the standard LQR linear quadratic regulator is:

[0084]

[0085] in, For control, To control the speed of water volume change, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, For depth, is the first linearized hydrodynamic coefficient, is the second linearized hydrodynamic coefficient, is the third hydrodynamic coefficient;

[0086] By selecting parameters and Then, the parameter matrix of the optimal controller is obtained by solving the Riccati equation, which is:

[0087]

[0088] in, is the system state transfer matrix, is the system input matrix, is the parameter matrix of the optimal controller, is the weight matrix corresponding to the system state, The corresponding weight matrix for the system input, is the transposed matrix of the system state transfer matrix, is the transposed matrix of the system input matrix;

[0089] The depth controller equation is:

[0090]

[0091] in, To control the switch signal; is the first coefficient in the depth controller parameter matrix, is the second coefficient in the depth controller parameter matrix, is the third coefficient in the depth controller parameter matrix, is the instruction depth.

[0092] In some embodiments of the present invention, due to , as well as It is difficult to measure accurately, and the vertical acceleration in the hull coordinate system, the vertical velocity in the fixed coordinate system, and the buoyancy imbalance rate need to be estimated through a state observer.

[0093] S4: By expanding the linearized motion equation, a Kalman filter is obtained, and the vertical acceleration, vertical velocity and buoyancy imbalance are estimated using the Kalman filter to obtain the Kalman filter observation state quantity;

[0094] By processing the linear motion equation, the expanded linear motion state equation is established:

[0095]

[0096] in, is the first expansion linearized hydrodynamic coefficient, is the linearized hydrodynamic coefficient of the second expansion, is the observed value of buoyancy imbalance, For control, is the buoyancy imbalance rate, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, for depth;

[0097] The depth calculation expression is:

[0098]

[0099] The Kalman filter is:

[0100]

[0101] in, is the observation matrix, , is the first coefficient of the observer, is the second coefficient of the observer, is the third coefficient of the observer; for The observed value of for The observed value of is the state transfer matrix , Input matrix for the system , for ;

[0102] The Kalman filter observation state is:

[0103]

[0104] in, is the Kalman filter observation state quantity, is the observed state quantity of vertical acceleration in the hull coordinate system, is the vertical velocity observation state quantity in the fixed coordinate system, is the observed state quantity of buoyancy imbalance rate, for The observed value of for The observed value of for Observed value of .

[0105] In some embodiments of the present invention, due to:

[0106]

[0107] in, for , for , the system needs to converge on the imaginary axis of the complex plane, so the pole configuration method can be used to find the corresponding coefficients of the observer.

[0108] Using the pole configuration method, the coefficients of the observer are obtained, and the pole configuration satisfies:

[0109]

[0110] in, is the complex variable in Laplace transform, is the identity matrix, for the extreme point;

[0111] The observer coefficients obtained are:

[0112]

[0113] The buoyancy imbalance observation value is obtained through the observer coefficient and the Kalman filter observation state equation.

[0114] In some embodiments of the present invention, the continuous control signal cannot directly control the switching of the pump.

[0115] S5: obtaining a control instruction through a deep controller equation, and obtaining a discrete control switch signal by discretizing the control instruction;

[0116] The control command is discretized to obtain a discrete control switch signal. The discrete control switch signal is:

[0117]

[0118] in, is the discrete control switch signal, To control the switch signal, when When water is added, When the pump is turned off, Drain water from time to time.

[0119] In some embodiments of the present invention, the asymptotic stability of the depth control closed-loop system and the absence of static error of the equilibrium position are effectively guaranteed by discretizing the control switch signal.

[0120] S6: Estimate the seawater density gradient field according to the discretized control switch signal and the Kalman filter observation state quantity;

[0121] By hovering and controlling the underwater vehicle to change from one depth to another, the depth difference and buoyancy imbalance observation deviation are formed. After the system is stable, the change in the amount of water discharged during the deepening process is calculated. The seawater density gradient field is obtained by combining the depth change and the displacement volume of the underwater vehicle. The calculation expression of the seawater density gradient field is:

[0122]

[0123] in, is the seawater density gradient field, is the cumulative amount of water discharged, is the depth variation, is the displacement of the underwater vehicle, To observe the buoyancy imbalance deviation.

[0124] In a specific embodiment of the present invention, the underwater vehicle goes deeper relatively slowly. Assuming that the speed varies between [-0.1, 0.1] m / s, the motion equation is linearized in this interval, the standard quadratic regulator state equation is established, and the Q and R parameters are set to [0 2 1] and 0.1 respectively. The depth controller design is completed and the parameters are set. =0.1, complete the Kalman filter settings, set the seawater density gradient to 5 / 100,000, the vehicle displacement is 80 tons, the depth is changed from 50 meters to 40 meters through buoyancy drainage and injection, and the cumulative drainage and injection volume after stabilization is 40L. After stabilization, the seawater density gradient is calculated to be 5 / 100,000, and the maximum deviation does not exceed 1 / 100,000. The simulation results are as follows Figure 2 and Figure 3 The observation accuracy can reach one part in one hundred thousand, such as Figure 2 FIG. 4 is a depth variation curve of an underwater vehicle according to a seawater density gradient estimation method based on a Kalman filter provided by the present invention. Figure 3 FIG. 4 is a curve of the cumulative water discharge and injection of the underwater vehicle buoyancy according to a seawater density gradient estimation method based on a Kalman filter provided by the present invention. Figure 4 Shown is the curve of seawater density change measured by a temperature-salinity-depth meter at a specific depth. The curve shows that the measurement error is one in ten thousand.

[0125] Figure 5 A block diagram of an electronic device is shown as an example. Figure 5 As shown, the electronic device may include: a processor 201, a communication interface 203, a memory 204 and a communication bus 202, wherein the processor 201, the communication interface 203 and the memory 204 communicate with each other through the communication bus 202. The processor 201 may call the logic instructions in the memory 204 to execute a seawater density gradient estimation method based on a Kalman filter.

[0126] In addition, the logic instructions in the above-mentioned memory 204 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0127] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a seawater density gradient estimation method based on a Kalman filter provided by the above methods.

[0128] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the above-mentioned seawater density gradient estimation method based on a Kalman filter.

[0129] The beneficial effects of the present invention are as follows: the present invention provides a method, device and medium for estimating seawater density gradient based on Kalman filter, which observes the vertical speed, vertical acceleration and buoyancy imbalance of an underwater vehicle through the Kalman filter, controls the underwater vehicle from one depth to another through a designed vertical controller, and obtains the seawater density gradient field based on the ratio of the accumulated buoyancy displacement change to the depth difference. The present invention improves the estimation accuracy of seawater density gradient change by accumulating the buoyancy change generated at a certain depth, quickly and accurately obtains the ocean density gradient field, and realizes the non-speed and non-powered hovering control of the underwater vehicle, with the observation accuracy reaching one hundred thousandth.

[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A seawater density gradient estimation method based on Kalman filter, characterized in that: include: S1: Establish the vertical motion equation of underwater vehicle at zero speed; S2: Obtain the linearized motion equation by linearizing the zero-speed vertical motion equation; S3: Design a quadratic optimal regulator based on the linearized equation of motion to obtain the depth controller equation; S4: By expanding the linearized motion equation, a Kalman filter is obtained, and the vertical acceleration, vertical velocity and buoyancy imbalance are estimated using the Kalman filter to obtain the Kalman filter observation state quantity; S5: obtaining a control instruction through a deep controller equation, and obtaining a discrete control switch signal by discretizing the control instruction; S6: Estimate the seawater density gradient field based on the discretized control switch signal and the Kalman filter observation state quantity.

2. The method for estimating seawater density gradient based on a Kalman filter according to claim 1, characterized in that: In step S1, the zero-speed vertical motion equation of the underwater vehicle is: in, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, is the first hydrodynamic coefficient, is the second hydrodynamic coefficient, is the third hydrodynamic coefficient, is the initial vertical force.

3. The method for estimating seawater density gradient based on a Kalman filter according to claim 1, characterized in that: In the step S2, the linearized motion equation is obtained by linearizing the zero speed vertical motion equation, and the linearized motion equation is: in, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, is the first linearized hydrodynamic coefficient, is the second linearized hydrodynamic coefficient, is the third hydrodynamic coefficient, is the initial vertical force.

4. The method for estimating seawater density gradient based on a Kalman filter according to claim 1, characterized in that: In the step S3, the optimal controller is designed based on the linearized motion equation. The state equation of the standard LQR linear quadratic regulator is: in, For control, To control the speed of water volume change, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, For depth, is the first linearized hydrodynamic coefficient, is the second linearized hydrodynamic coefficient, is the third hydrodynamic coefficient; The parameter matrix of the optimal controller is obtained by solving the Riccati equation, which is: in, is the system state transfer matrix, is the system input matrix, is the parameter matrix of the optimal controller, is the weight matrix corresponding to the system state, The corresponding weight matrix for the system input, is the transposed matrix of the system state transfer matrix, is the transposed matrix of the system input matrix; The depth controller equation is: in, To control the switch signal; is the first coefficient in the depth controller parameter matrix, is the second coefficient in the depth controller parameter matrix, is the third coefficient in the depth controller parameter matrix, is the instruction depth.

5. The method for estimating seawater density gradient based on a Kalman filter according to claim 1, characterized in that: In step S4, the linear motion equation is processed to establish an expanded linear motion state equation: in, is the first expansion linearized hydrodynamic coefficient, is the linearized hydrodynamic coefficient of the second expansion, is the observed value of buoyancy imbalance, For control, is the buoyancy imbalance rate, is the vertical velocity in the ship coordinate system, is the vertical acceleration in the hull coordinate system, is the vertical velocity in the fixed coordinate system, for depth; The depth calculation expression is: The Kalman filter is: in, is the observation matrix, , is the first coefficient of the observer, is the second coefficient of the observer, is the third coefficient of the observer; for The observed value of for The observed value of is the state transfer matrix , Input matrix for the system , for ; The Kalman filter observation state is: in, is the Kalman filter observation state quantity, is the observed state quantity of vertical acceleration in the hull coordinate system, is the vertical velocity observation state quantity in the fixed coordinate system, is the observed state quantity of buoyancy imbalance rate, for The observed value of for The observed value of for Observed value of .

6. The method for estimating seawater density gradient based on a Kalman filter according to claim 5, characterized in that: Using the pole configuration method, the coefficients of the observer are obtained, and the pole configuration satisfies: in, is the complex variable in Laplace transform, is the identity matrix, for the extreme point; The observer coefficients obtained are: The buoyancy imbalance observation value is obtained through the observer coefficient and the Kalman filter observation state equation.

7. The method for estimating seawater density gradient based on a Kalman filter according to claim 1, characterized in that: In the step S5, the control instruction is discretized to obtain a discretized control switch signal, and the discretized control switch signal is: in, is the discrete control switch signal, To control the switch signal, when When water is added, When the pump is turned off, Drain water from time to time.

8. The method for estimating seawater density gradient based on a Kalman filter according to claim 1, characterized in that: In step S6, the underwater vehicle is controlled by hovering to change from one depth to another depth to form a depth difference and buoyancy imbalance observation deviation. After the system is stable, the change in the amount of water discharged during the deepening process is calculated. The seawater density gradient field is obtained by combining the depth change and the displacement volume of the underwater vehicle. The calculation expression of the seawater density gradient field is: in, is the seawater density gradient field, is the cumulative amount of water discharged, is the depth variation, is the displacement of the underwater vehicle, To observe the buoyancy imbalance deviation.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the seawater density gradient estimation method based on the Kalman filter as described in any one of claims 1 to 8 are implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a seawater density gradient estimation method based on a Kalman filter as claimed in any one of claims 1 to 8 are implemented.