CN117951817A - Unmanned ship dynamics model identification method, unmanned ship dynamics model identification device, unmanned ship dynamics model identification equipment and unmanned ship dynamics model identification medium - Google Patents
Unmanned ship dynamics model identification method, unmanned ship dynamics model identification device, unmanned ship dynamics model identification equipment and unmanned ship dynamics model identification medium Download PDFInfo
- Publication number
- CN117951817A CN117951817A CN202410177490.6A CN202410177490A CN117951817A CN 117951817 A CN117951817 A CN 117951817A CN 202410177490 A CN202410177490 A CN 202410177490A CN 117951817 A CN117951817 A CN 117951817A
- Authority
- CN
- China
- Prior art keywords
- unmanned ship
- parameter
- model
- estimated
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 239000013598 vector Substances 0.000 claims abstract description 51
- 238000004364 calculation method Methods 0.000 claims abstract description 22
- 230000006870 function Effects 0.000 claims description 58
- 238000004590 computer program Methods 0.000 claims description 17
- 239000011159 matrix material Substances 0.000 claims description 14
- 238000012360 testing method Methods 0.000 claims description 12
- 230000008859 change Effects 0.000 claims description 7
- 230000001141 propulsive effect Effects 0.000 claims description 4
- 230000004044 response Effects 0.000 abstract description 7
- 238000004422 calculation algorithm Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 238000012937 correction Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/15—Vehicle, aircraft or watercraft design
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/15—Correlation function computation including computation of convolution operations
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T90/00—Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computational Mathematics (AREA)
- Geometry (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Algebra (AREA)
- Automation & Control Theory (AREA)
- Aviation & Aerospace Engineering (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- Feedback Control In General (AREA)
Abstract
The embodiment of the invention discloses a method, a device, equipment and a medium for identifying a unmanned ship dynamics model, wherein the method comprises the following steps: constructing a dynamic model according to the structural information of the unmanned ship and a ship body coordinate system, and determining parameters to be estimated in the dynamic model; obtaining model output data from a preset input vector through a dynamics model; carrying out residual calculation on actual observation data and model output data under the same preset input vector to determine an objective function, wherein the objective function comprises parameters to be estimated; and determining the gradient of the target parameter according to the target function, determining the estimated value of the target parameter by gradient descent calculation, and replacing the parameter to be estimated with the estimated value of the target parameter. By implementing the method provided by the embodiment of the invention, the motion characteristics and the response modes of the unmanned ship can be accurately predicted, and the control system can be better understood, designed, analyzed and optimized, so that the performance and the reliability of the control algorithm are improved.
Description
Technical Field
The invention relates to the field of unmanned ship control, in particular to an unmanned ship dynamic model identification method, an unmanned ship dynamic model identification device, unmanned ship dynamic model identification equipment and a unmanned ship dynamic model identification medium.
Background
With the development of technology, unmanned ships represent a great potential as an emerging technology in various scenes. The dynamics model of the unmanned ship is an important precondition for designing the unmanned ship control system, and the accuracy of the dynamics model also affects the actual control accuracy of the control system. The prior art typically uses a mechanism model or data driven kinetic modeling. However, data-driven based identification methods require a large amount of training data and computational resources, are sensitive to data, and require re-acquisition of data and training for different boat types. Modeling methods based on mechanism models require extensive physical knowledge understanding, while mechanism models involve complex mathematical equations and calculations, which may result in high computational costs.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for identifying an unmanned ship dynamics model, which aim to improve the modeling precision of the unmanned ship dynamics model and reduce the modeling difficulty.
In a first aspect, an embodiment of the present invention provides a method for identifying an unmanned ship dynamics model, including: constructing a dynamic model according to the structural information of the unmanned ship and a ship body coordinate system, and determining parameters to be estimated in the dynamic model; obtaining model output data from a preset input vector through the dynamics model; carrying out residual calculation on the actual observed data under the same preset input vector and the model output data to determine an objective function, wherein the objective function comprises the parameter to be estimated; and determining the gradient of the target parameter according to the target function, determining the estimated value of the target parameter by gradient descent calculation, and replacing the estimated value of the target parameter with the parameter to be estimated.
In a second aspect, an embodiment of the present invention further provides an unmanned ship dynamics model identification apparatus, which includes: the determining unit is used for constructing a dynamic model according to the structural information of the unmanned ship and a ship body coordinate system and determining parameters to be estimated in the dynamic model; the acquisition unit is used for acquiring model output data from a preset input vector through the dynamic model; the error unit is used for carrying out residual calculation on actual observation data under the same input vector and the model output data to determine an objective function, wherein the objective function comprises the parameter to be estimated; and the updating unit is used for determining the gradient of the target parameter according to the target function, determining the estimated value of the target parameter through gradient descent calculation, and replacing the estimated value of the target parameter with the parameter to be estimated.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method when executing the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, implement the above-described method.
The embodiment of the invention provides an unmanned ship dynamics model identification method, device, equipment and medium. Wherein the method comprises the following steps: constructing a dynamic model according to the structural information of the unmanned ship and a ship body coordinate system, and determining parameters to be estimated in the dynamic model; obtaining model output data from a preset input vector through the dynamics model; carrying out residual calculation on the actual observed data under the same preset input vector and the model output data to determine an objective function, wherein the objective function comprises the parameter to be estimated; and determining the gradient of the target parameter according to the target function, determining the estimated value of the target parameter by gradient descent calculation, and replacing the estimated value of the target parameter with the parameter to be estimated. According to the embodiment of the invention, a dynamic model is built according to the structural information of the unmanned ship, namely, a physical model is combined, the actual motion data of the unmanned ship under different input signals are collected, the mean square error of model prediction data and actual data is calculated to determine an objective function, and a gradient descent method is adopted to obtain parameters to be estimated in the dynamic model, namely, a data driving model is combined. The unmanned ship dynamic model obtained by combining the physical model and the data driving model can accurately predict the motion characteristics and the response modes of the unmanned ship, and is beneficial to better understanding, designing, analyzing and optimizing the control system, so that the performance and the reliability of the control algorithm are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an unmanned ship dynamics model identification method provided by an embodiment of the invention;
FIG. 2 is a schematic flow chart of a method for identifying a dynamic model of an unmanned ship according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a method for identifying a dynamic model of an unmanned ship according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of a method for identifying a dynamic model of an unmanned ship according to an embodiment of the present invention;
FIG. 5 is a schematic sub-flowchart of an unmanned ship dynamics model identification method according to an embodiment of the present invention;
FIG. 6 is a schematic block diagram of an unmanned ship dynamics model identification device provided by an embodiment of the invention;
Fig. 7 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1, fig. 1 is a flow chart of an unmanned ship dynamics model identification method according to an embodiment of the invention. The unmanned ship dynamics model identification method can be applied to the establishment of the unmanned ship dynamics model, the unmanned ship dynamics model is built, the unmanned ship dynamics model is identified, the final unmanned ship dynamics model is obtained, the unmanned ship dynamics model built by the method can accurately predict the unmanned ship movement characteristics and response modes, better understanding, design, analysis and optimization of a control system are facilitated, and therefore performance and reliability of a control algorithm are improved.
Fig. 1 is a flow chart of an unmanned ship dynamics model identification method according to an embodiment of the invention. As shown, the method includes the following steps S110-S140.
S110, constructing a dynamics model according to the structural information of the unmanned ship and a ship body coordinate system, and determining parameters to be estimated in the dynamics model.
In this embodiment, the structural information of the unmanned ship includes information such as a mass, a moment of inertia, a propeller installation position, and a centroid position of the unmanned ship, and the ship body coordinate system is a coordinate system constructed by taking a geometric center of a ship body of the unmanned ship as a coordinate origin, taking a ship head direction as an x axis, taking a right direction perpendicular to the ship head as a y axis, and taking a vertical downward (toward a ground center) direction as a z axis. According to Newton mechanics and hydrodynamics principles, the dynamics model can be constructed from three degrees of freedom of the unmanned ship under a preset ship body coordinate system, wherein the three degrees of freedom are the movement of the unmanned ship around an x axis and a y axis and the rotation of the unmanned ship around a z axis, and the dynamics model is as follows: wherein M is an inertial mass matrix,/> Is a centripetal force and Coriolis force coefficient matrix,/>Is a resistance coefficient matrix, v is the speed of the ship body,/>Is a force and moment vector. Specifically, the inertial mass matrix M in the unmanned ship dynamics model is: /(I)The centripetal force and coriolis force coefficient matrix C (v) is: The drag coefficient matrix D (v) is: /(I) The force and moment vectors in the unmanned ship dynamics model can be expressed as: /(I)Wherein, the vector u represents the propulsion force of the propeller and can be obtained by the fitting relation between the throttle value and the propulsion force. Matrix B describes the distribution of propulsion in the longitudinal, transverse and Z-axis directions of the hull, the matrix being determined by the way the unmanned ship propeller is mounted. The hull velocity v includes a longitudinal velocity u, a transverse velocity v and an angular velocity r, i.e./>, theThe corner mark T is the vector transpose. From the theoretical relationship between the matrices that build the kinetic model it follows: /(I),/>,/>. Mass m of unmanned ship and its moment of inertia along z-axis/>The parameters to be estimated in the kinetic model are therefore known as. And constructing a dynamic model according to the structural information of the unmanned ship and a ship body coordinate system, and determining parameters to be estimated of subsequent dynamic model identification.
S120, obtaining model output data through the dynamics model by using a preset input vector.
In this embodiment, the preset input vector is preset input data, where the input vector is composed of thrust of each propeller of the ship, and the model output data is obtained by using the dynamics model, where the model output data is a longitudinal speed, a transverse speed and an angular speed of the unmanned ship output by using the dynamics model. It will be appreciated that the model output data at this time is an expression, as there are parameters to be estimated in the kinetic model at this time. The data support can be provided for the subsequent estimation of the band estimation parameters by obtaining model output data through the dynamics model by the preset input vector.
In one embodiment, as shown in FIG. 2, the step 120 includes steps S121-S123.
S121, converting the dynamic model into a state space model, and acquiring an observation equation and a state equation of the dynamic model;
S122, inputting the preset input vector into the state equation to obtain a state vector;
S123, obtaining the model output vector according to the state vector and the observation equation.
In this embodiment, the dynamics model is converted into the state space model, wherein the state space model aims at describing the dynamic behavior of the system using state equations and observation equations. Generally, state space equations are used to describe the evolution of the system state over time, while observation equations describe how the output of the system relates to the state vector. The state equation can be expressed as: ; the observation equation can be expressed as: /(I) Wherein/>Is a state vector,/>Is an input vector,/>The model output vector is C, which is a centripetal force and Coriolis force coefficient matrix; d is a resistance coefficient matrix, and B is a matrix of distribution modes of propelling force along the longitudinal direction, the transverse direction and the Z-axis direction of the ship body. In particular, said input vector refers to the control actuation of the system, here consisting of the thrust of each propeller of the ship; the state vector refers to the internal state information of the system, here consisting of the ship longitudinal, transverse and angular velocities; the output vector refers to the measurable output vector of the system, consisting of the ship longitudinal, transverse and angular velocities. And converting the dynamic model into a state space model, acquiring an observation equation and a state equation of the dynamic model, inputting the preset input vector into the state equation, acquiring a state vector to finally acquire the model output vector, and providing data support for subsequent estimation with estimation parameters.
S130, carrying out residual calculation on the actual observed data under the same preset input vector and the model output data to determine an objective function, wherein the objective function comprises the parameter to be estimated.
In this embodiment, the objective function is the mean square error between the model output vector and the actual observed data. The problem of solving the parameters to be estimated can be expressed as finding a set of model parameters such that the sum of squares of the prediction errors of the model on the data is minimized. Specifically, the objective function may be expressed as: Wherein/> For the objective function, the/>Output vector for model,/>For actual measurement data,/>And the parameters to be estimated are. An objective function with the parameter to be estimated can be determined by calculating the mean square error between the predicted and actual values, and data support is provided for the subsequent parameter to be estimated calculation.
And S140, determining the gradient of the target parameter according to the target function, determining the estimated value of the target parameter by gradient descent calculation, and replacing the estimated value of the target parameter with the parameter to be estimated.
In this embodiment, a gradient of an objective function with respect to a target parameter is calculated, the target parameter is iteratively updated by using a gradient descent algorithm to obtain an estimated value thereof, and the estimated value of the target parameter is substituted for the parameter to be estimated, thereby determining a kinetic model of the unmanned ship. And after the dynamic model is obtained, the throttle value is input into the dynamic model, so that the transverse speed, the longitudinal speed and the angular speed of the unmanned ship motion can be obtained, and the result of model prediction is obtained. The motion characteristics and the response modes of the unmanned ship are accurately predicted through the dynamic model, so that the control system can be better understood, designed, analyzed and optimized, and the performance and the reliability of the control algorithm are improved.
In one embodiment, as shown in FIG. 3, the step 140 includes steps S141-S144.
S141, initializing the parameters to be estimated according to preset data, and obtaining initial parameter values;
S142, determining an objective function value according to the initial parameter value;
S143, acquiring a gradient value of the objective function value relative to the initial parameter value, wherein the gradient value is a gradient of the objective function;
s144, carrying out iterative computation on the initial parameter value according to the gradient of the objective function, and stopping computation when the iterated parameter value or objective function value reaches a preset termination condition, wherein the objective parameter is a parameter value when the computation is stopped.
In this embodiment, the preset parameter may be a parameter obtained according to prior information or random initialization, for example, the preset parameter may be determined according to a certain set of values of the observed data, or may be directly defined as a zero vector. Initializing the parameter to be estimated according to preset data, and obtaining an initial parameter value, wherein the initial parameter value is the value of the preset parameter. The gradient value represents the direction of the rate of change of the objective function in the parameter space. The calculation method of the target parameters comprises the following steps: Wherein/> For the target parameter estimation value of the last moment,/>Estimation of target parameters for a current time
The value of the sum of the values,For a preset learning rate, the step size for controlling each iteration is usually 0.1 or 0.01,/>, can be takenIs the gradient value. It will be appreciated that the first calculation of the target parameters is: /(I)Wherein said/>I.e. the initial parameter value,/>Is the parameter after iteration. And repeating the iteration until the parameter value or the objective function value reaches a preset termination condition, and specifically, the parameter value or the objective function value satisfies the preset termination condition, wherein the parameter value change is smaller than a parameter preset threshold, for example, the difference between two continuously acquired parameter values is smaller than 0.001, or the change of the objective function value is smaller than a function preset threshold. The parameter preset threshold or the function preset threshold may be set according to specific situations, and is not limited thereto. Or stopping iterative computation when the preset parameter updating method reaches the maximum iteration number, wherein the maximum iteration number can be 1000 iterations. And carrying out iterative computation on the initial parameter value according to the gradient of the objective function to determine the objective parameter, so that a kinetic model of the unmanned ship can be obtained, and the motion prediction of the unmanned ship is realized, so that the behavior of the unmanned ship is better controlled.
In one embodiment, as shown in fig. 4, the step S140 includes steps S1401-S1403.
S1401, obtaining predicted motion data of the dynamic model under different throttle values;
S1402, comparing the predicted motion data under the same throttle value with actual observed data in a test data set;
S1403, if errors exist, adjusting the target parameters and/or the dynamic model according to the errors to correct the dynamic model.
In this embodiment, the predicted motion data is motion data of the unmanned ship predicted by the dynamics model, where the motion data includes a lateral speed, a longitudinal speed, and an angular speed of the unmanned ship motion. Comparing the predicted motion data under the same throttle value with actual observation data in a test data set, specifically comparing the predicted data of the dynamic model under a fixed throttle value with the actually measured data, and judging the accuracy of the dynamic model under different throttle signal inputs by judging whether the data of the predicted data and the actually measured data are the same. If the data are different, it can be determined which factors cause the prediction error by analyzing the model prediction error, for example, the propulsive force of the propeller actually generates attenuation along with the increase of the signal frequency, so that the model performance can be improved by parameter adjustment and model correction. Comparing the predicted motion data at the same throttle value with actual observed data in a test data set; if errors exist, the target parameters and/or the dynamic model are/is adjusted according to the errors so as to correct the dynamic model, so that the dynamic model is continuously perfected, the motion characteristics and the response modes of the unmanned ship can be further understood, and the stability and the robustness of a control system of the unmanned ship are better improved.
In one embodiment, as shown in FIG. 5, the step 1402 includes steps S14021-S14023.
S14021, acquiring propulsion of the unmanned ship generated by different throttle values;
S14022, acquiring actual observation data of the unmanned ship under different input signals according to the change range and the frequency of the throttle value, wherein the input signals comprise step signals and sine signals, and the actual observation data are the transverse speed, the longitudinal speed and the angular speed of the unmanned ship moving under the propulsive force generated by the throttle value;
S14023, determining the test data set according to the actual observation data.
In this embodiment, the throttle value range is expressed in terms of percentage, i.e., -100%, where negative values indicate reversing the propeller to select throttle values in 10% steps, i.e., -100%, -90%, 90%,100%. Specifically, after selecting a proper test site, a tension meter is fixed on an unmanned ship or a propeller to measure the propulsion of the propeller, and then the propulsion generated by the propeller under the corresponding throttle value is measured by using the tension meter. And carrying out multiple experiments on each group of throttle values, and recording and storing data to obtain a propeller power data set. And removing abnormal data in the propeller power data set, drawing a relationship graph of propeller throttle value and thrust, and fitting the relationship between the accelerator value and the thrust by using a power function. If the difference between the forward rotation power and the reverse rotation power of the propeller is obvious, different power functions are used for carrying out piecewise fitting aiming at the positive and negative of the accelerator value. By fitting the relation between the throttle value and the thrust by using a function, the thrust generated by the throttle value can be conveniently and quickly estimated later. According to the change range and the frequency of the throttle value, acquiring actual observation data of the unmanned ship under different input signals, and particularly, when the input signals are step signals: wherein A represents the throttle value, the throttle value is stepped by 10%, t is the duration, and the calculation unit is seconds. Under the step signals of different throttle values, the gps and imu (inertial) sensors are used for acquiring the motion response record of the unmanned ship and storing the transverse speed, longitudinal speed and angular speed data of the unmanned ship, and when the input signals are sinusoidal signals, the specific form is as follows: /(I) Wherein A is any throttle value between-100% and 100%, and frequency/>Then take any value between 0.1 and 2. In addition, the input signal can also be a signal with non-fixed duration and random throttle values, and the specific form is as follows: /(I)Wherein/>Is an arbitrary accelerator value of-100%Then any time interval between 0 and 60 seconds. Through carrying out multiple experiments under different throttle signals, the unmanned ship motion response data is recorded and stored by using a sensor, so that the actual observation data of the unmanned ship under various signals are obtained to determine a test data set. The motion data of the unmanned ship in various scenes can be simulated, so that the test data set is more universal.
Fig. 6 is a schematic block diagram of an unmanned ship dynamics model identification apparatus 200 according to an embodiment of the present invention. As shown in fig. 6, the present invention further provides an unmanned ship dynamics model identification device corresponding to the above unmanned ship dynamics model identification method. The unmanned ship dynamics model recognition apparatus includes a unit for performing the unmanned ship dynamics model recognition method described above, and the apparatus may be configured in an unmanned ship. Specifically, referring to fig. 6, the unmanned ship dynamics model recognition apparatus includes a determining unit 210, an acquiring unit 220, an error unit 230, and an updating unit 240.
And the determining unit 210 is used for constructing a dynamics model according to the structural information of the unmanned ship and the ship body coordinate system and determining parameters to be estimated in the dynamics model.
The obtaining unit 220 is configured to obtain model output data from the preset input vector through the dynamics model.
In an embodiment, the acquiring unit 220 includes a converting unit, a first acquiring unit, and a second acquiring unit.
The conversion unit is used for converting the dynamic model into a state space model and acquiring an observation equation and a state equation of the dynamic model;
The first acquisition unit is used for inputting the preset input vector into the state equation to acquire a state vector;
and the second acquisition unit is used for acquiring the model output vector according to the state vector and the observation equation.
And an error unit 230, configured to perform residual calculation on actual observation data under the same input vector and the model output data to determine an objective function, where the objective function includes the parameter to be estimated.
In one embodiment, the update unit 230 includes an initial unit, a target unit, a gradient unit, and a termination unit.
The initial unit is used for initializing the parameter to be estimated according to preset data and obtaining an initial parameter value;
A target unit for determining a target function value according to the initial parameter value;
A gradient unit for acquiring a gradient value of the objective function value relative to the initial parameter value, wherein the gradient value is a gradient of the objective function;
And the termination unit is used for carrying out iterative computation on the initial parameter value according to the gradient of the objective function, and stopping computation when the iterated parameter value or objective function value reaches a preset termination condition, wherein the objective parameter is a parameter value when the computation is stopped.
The updating unit 240 is configured to determine a gradient of a target parameter according to a target function, determine an estimated value of the target parameter by gradient descent calculation, and replace the estimated value of the target parameter with the parameter to be estimated.
In an embodiment, the updating unit 230 includes an obtaining unit, a comparing unit and a correcting unit.
The acquisition unit is used for acquiring the predicted motion data of the dynamic model under different throttle values;
The comparison unit is used for comparing the predicted motion data under the same throttle value with actual observation data in a test data set;
and the correction unit is used for adjusting the target parameters and/or the dynamic model according to the errors to correct the dynamic model if the errors exist.
In an embodiment, the comparing unit includes a first acquiring unit, a second acquiring unit, and a determining unit.
The first acquisition unit is used for acquiring the propulsion force to the unmanned ship generated by different throttle values;
The second acquisition unit is used for acquiring actual observation data of the unmanned ship under different input signals according to the change range and the frequency of the throttle value, wherein the input signals comprise step signals and sine signals, and the actual observation data are the transverse speed, the longitudinal speed and the angular speed of the unmanned ship moving under the propulsive force generated by the throttle value;
And the determining unit is used for determining the test data set according to the actual observation data.
It should be noted that, as will be clearly understood by those skilled in the art, the specific implementation process of the unmanned ship dynamics model identification apparatus 200 and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, the description is omitted here.
The unmanned ship dynamics model recognition apparatus described above may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 7.
Referring to fig. 7, fig. 7 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a terminal or a server, wherein the terminal may be an unmanned ship. The server may be an independent server or a server cluster formed by a plurality of servers.
With reference to FIG. 7, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform an unmanned ship dynamics model identification method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the non-volatile storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform an unmanned ship dynamics model identification method.
The network interface 505 is used for network communication with other devices. It will be appreciated by those skilled in the art that the architecture shown in fig. 7 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting of the computer device 500 to which the present inventive arrangements may be implemented, as a particular computer device 500 may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
Wherein the processor 502 is adapted to run a computer program 5032 stored in a memory for implementing the steps of the above method.
It should be appreciated that in embodiments of the present application, the Processor 502 may be a central processing unit (Central Processing Unit, CPU), the Processor 502 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuits (ASICs), off-the-shelf Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program comprises program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. The program instructions, when executed by a processor, cause the processor to perform the steps of the method as described above.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (10)
1. An unmanned ship dynamics model identification method is characterized by comprising the following steps:
constructing a dynamic model according to the structural information of the unmanned ship and a ship body coordinate system, and determining parameters to be estimated in the dynamic model;
obtaining model output data from a preset input vector through the dynamics model;
Carrying out residual calculation on the actual observed data under the same preset input vector and the model output data to determine an objective function, wherein the objective function comprises the parameter to be estimated;
And determining the gradient of the target parameter according to the target function, determining the estimated value of the target parameter by gradient descent calculation, and replacing the estimated value of the target parameter with the parameter to be estimated.
2. The method of claim 1, wherein the step of obtaining model output data from the dynamics model using the preset input vector comprises:
converting the dynamic model into a state space model, and obtaining an observation equation and a state equation of the dynamic model;
Inputting the preset input vector into the state equation to obtain a state vector;
And obtaining the model output vector according to the state vector and the observation equation.
3. The method according to claim 1, wherein the step of determining the gradient of the target parameter from the target function, determining the estimated value of the target parameter by gradient descent calculation of the gradient of the target function, comprises:
initializing the parameters to be estimated according to preset data, and obtaining initial parameter values;
determining an objective function value according to the initial parameter value;
Acquiring a gradient value of the objective function value relative to the initial parameter value, wherein the gradient value is a gradient of the objective function;
and carrying out iterative computation on the initial parameter value according to the gradient of the objective function, and stopping computation when the iterated parameter value or objective function value reaches a preset termination condition, wherein the objective parameter is a parameter value when the computation is stopped.
4. The method of claim 1, further comprising, after the step of replacing the estimated value of the target parameter with the parameter to be estimated:
Obtaining predicted motion data of the dynamic model under different throttle values;
comparing the predicted motion data under the same throttle value with actual observed data in a test data set;
if an error exists, the target parameter and/or the dynamics model are/is adjusted according to the error so as to correct the dynamics model.
5. The method of claim 4, wherein prior to the step of comparing the predicted motion data at the same throttle value with actual observed data in a test data set, comprising:
Obtaining the propulsion force to the unmanned ship generated by different throttle values;
Acquiring actual observation data of the unmanned ship under different input signals according to the change range and the frequency of the throttle value, wherein the input signals comprise step signals and sine signals, and the actual observation data are the transverse speed, the longitudinal speed and the angular speed of the unmanned ship moving under the propulsive force generated by the throttle value;
and determining the test data set according to the actual observation data.
6. The method of claim 1, wherein the unmanned ship dynamics model is: wherein M is an inertial mass matrix,/> Is a centripetal force and Coriolis force coefficient matrix,/>Is a resistance coefficient matrix, v is the speed of the ship body,/>Is a force and moment vector.
7. The method of claim 1, wherein the objective function is: Wherein/> For the objective function, the/>Output data for the model,/>For the actual observation data,/>And the parameters to be estimated are.
8. An unmanned ship dynamics model identification device, comprising:
the determining unit is used for constructing a dynamic model according to the structural information of the unmanned ship and a ship body coordinate system and determining parameters to be estimated in the dynamic model;
the acquisition unit is used for acquiring model output data from a preset input vector through the dynamic model;
the error unit is used for carrying out residual calculation on actual observation data under the same input vector and the model output data to determine an objective function, wherein the objective function comprises the parameter to be estimated;
And the updating unit is used for determining the gradient of the target parameter according to the target function, determining the estimated value of the target parameter through gradient descent calculation, and replacing the estimated value of the target parameter with the parameter to be estimated.
9. A computer device, characterized in that it comprises a memory on which a computer program is stored and a processor which, when executing the computer program, implements the method according to any of claims 1-7.
10. A storage medium storing a computer program comprising program instructions which, when executed by a processor, implement the method of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410177490.6A CN117951817A (en) | 2024-02-08 | 2024-02-08 | Unmanned ship dynamics model identification method, unmanned ship dynamics model identification device, unmanned ship dynamics model identification equipment and unmanned ship dynamics model identification medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410177490.6A CN117951817A (en) | 2024-02-08 | 2024-02-08 | Unmanned ship dynamics model identification method, unmanned ship dynamics model identification device, unmanned ship dynamics model identification equipment and unmanned ship dynamics model identification medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117951817A true CN117951817A (en) | 2024-04-30 |
Family
ID=90797926
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410177490.6A Pending CN117951817A (en) | 2024-02-08 | 2024-02-08 | Unmanned ship dynamics model identification method, unmanned ship dynamics model identification device, unmanned ship dynamics model identification equipment and unmanned ship dynamics model identification medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117951817A (en) |
-
2024
- 2024-02-08 CN CN202410177490.6A patent/CN117951817A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108827310B (en) | Marine star sensor auxiliary gyroscope online calibration method | |
CN107110650B (en) | The method of estimation of controlled navigational state in terms of observability | |
Wu et al. | Parametric identification and structure searching for underwater vehicle model using symbolic regression | |
CN109472418A (en) | Maneuvering target state prediction optimization method based on Kalman filtering | |
CN110658814B (en) | Self-adaptive ship motion modeling method applied to ship motion control | |
KR101234797B1 (en) | Robot and method for localization of the robot using calculated covariance | |
CN112819303B (en) | Aircraft tracking efficiency evaluation method and system based on PCE proxy model | |
WO2020202316A1 (en) | Model prediction control device, model prediction control program, model prediction control system, and model prediction control method | |
US9921306B1 (en) | Active optimal reduced state estimator | |
Baier et al. | Hybrid physics and deep learning model for interpretable vehicle state prediction | |
CN109857127A (en) | The method, apparatus that training neural network model and attitude of flight vehicle resolve | |
CN117268381A (en) | Spacecraft state judging method | |
Liu et al. | Navigation algorithm based on PSO-BP UKF of autonomous underwater vehicle | |
Wang et al. | Physics-informed data-driven approach for ship docking prediction | |
CN117951817A (en) | Unmanned ship dynamics model identification method, unmanned ship dynamics model identification device, unmanned ship dynamics model identification equipment and unmanned ship dynamics model identification medium | |
CN115542746B (en) | Energy control reentry guidance method and device for hypersonic aircraft | |
CN115421483B (en) | Unmanned ship maneuvering motion forecasting method | |
CN107036595A (en) | Deformation of hull angular estimation method based on interacting multiple model filters | |
CN111426322A (en) | Adaptive target tracking filtering method and system for simultaneously estimating state and input | |
CN116338655A (en) | DVL speed error calibration method based on DMD-LSTM model | |
Aghli et al. | Online system identification and calibration of dynamic models for autonomous ground vehicles | |
CN110879530A (en) | Method for the secure training of dynamic models | |
CN117669396B (en) | Unmanned ship movement detection method and device, unmanned ship and storage medium | |
CN117806364B (en) | Fight learning architecture, control method and device for aircraft path tracking controller | |
Harris | Model-based cooperative acoustic navigation and parameter identification for underactuated underwater vehicles |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |