Disclosure of Invention
The invention aims to solve the technical problems and provide a ship nonlinear roll parameter identification method based on a physical information neural network.
In order to achieve the above object, in some embodiments of the present invention, the following technical solutions are provided:
a ship nonlinear roll parameter identification method based on a physical information neural network comprises the following steps:
S1, determining free attenuation data and norms thereof of a ship rolling angle, initial conditions of rolling motion and norms thereof, and a physical equation of the rolling motion and norms thereof;
S2, determining a feedforward neural network, taking physical time as input of the neural network, taking a roll angle as output of the neural network, taking roll parameters to be identified as unknown quantity of the neural network, and determining a total loss function of the neural network based on norms of free attenuation data of the roll angle of a ship, initial condition norms of roll motions and norms of physical equations of the roll motions;
S3, establishing a super-parameter optimization objective function of the neural network, and carrying out optimization processing on the network super-parameters of the neural network based on the super-parameter optimization objective function to obtain optimized network super-parameters;
and S4, determining a physical information neural network framework based on the optimized network super-parameters, performing minimization treatment on the total loss function, driving the neural network to operate, obtaining the unknown quantity of the neural network, and obtaining the roll parameters to be identified.
In some embodiments of the present invention, in step S1:
Roll angle free decay data Expressed as equation;
Initial conditions for roll motionsAndExpressed as equation;
The physical equation for roll motion is expressed as: Wherein, the method comprises the steps of, The physical equation of the rolling motion comprises a damping term of the ship motion and a restoring moment term of the ship motion;
The physical equation of roll motion is rewritten, including:
and a linear-quadratic-cubic damping model is adopted to represent damping terms of ship motion, namely:
;
and (3) representing a restoring moment term of the ship motion by adopting a linear-cubic restoring force model, namely:
;
Thus, the physical equation of roll motion can be rewritten as:
;
wherein the nonlinear roll parameter I.e. as vectors,As a first-order damping parameter, the damping parameter,Representing the total roll inertia including structural inertia and water added inertia,Representation and representationAndA related nonlinear damping force; Representation and representation In relation to the non-linear restoring moment,Is a second-order damping parameter, and the damping parameter is a second-order damping parameter,Is a third-order damping parameter; as a first order of the restoring force parameter, Is a second-order restoring force parameter, and the second-order restoring force parameter is a second-order restoring force parameter,Indicating the acceleration of the roll angle,Indicating the angular velocity of the roll,Representing the roll angle.
In some embodiments of the invention, in step S2, the steps of the norm of the free damping data of the vessel roll angle, the norm of the initial condition for roll motion, and the norm of the physical equation for roll motion comprise:
roll angle attenuation data A kind of electronic deviceNorm numberExpressed as:
;
initial conditions for roll motions AndA kind of electronic deviceNorms are expressed as:
;
Physical equation of roll motionA kind of electronic deviceNorms are expressed as:
;
Wherein, 、、Representing the physical constraints satisfying the free decay data, the initial conditions and the physical equations, respectively; Representing the coordinates of discrete points of the data; 、 The superscript ". Lambda." represents the estimated value of the variable under the current neural network iteration step.
In some embodiments of the invention, the step of determining the total loss function of the neural network comprises:
determining a network total loss function :
Wherein, 、、Weight allocation representing the corresponding physical constraints respectively; for parameters to be optimized in the neural network, including network weights Network biasRoll parametersExpressed as。
In some embodiments of the present invention, the step of optimizing the neural network superparameter in S3 includes:
selecting super parameters of the neural network to be optimized, including learning rate Layer number of networkNumber of neurons;
Establishing a super-parameter optimization objective function:
;
wherein, Is the number of roll parameters and,Is an estimate of the roll parameter,Is the true value of the roll parameter, the estimated value is the calculated result obtained by the neural network under the current iteration step, the true value is the true result set in advance, and a Bayesian optimization method is adopted to minimize the objective functionAnd optimizing the neural network super-parameters.
In some embodiments of the present invention, the step of minimizing the total network loss function in step S4 includes:
after determining the physical information neural network framework, minimizing the total loss function of the network through an Adam optimization solver :
;
Wherein, Representing an equation minimization operator;
obtaining network parameters to be optimized After the optimal solution of (a), extracting nonlinear roll parameters。
Compared with the prior art, the ship nonlinear roll parameter identification method based on the physical information neural network has the beneficial effects that:
The invention provides a nonlinear roll parameter high-precision identification method based on a small amount of ship roll attenuation data, and a neural network model meeting the physical rule of ship roll is constructed by adding a loss function containing physical information into a feedforward neural network, so that the technical defect that the solution obtained by the traditional data method lacks physical interpretation is overcome, and a neural network method with high precision and high efficiency is provided for the actual ship roll motion analysis.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved more clear, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the embodiment of the application, prefix words such as "first" and "second" are adopted, and only for distinguishing different description objects, no limitation is imposed on the position, sequence, priority, quantity or content of the described objects. The use of ordinal words and the like in embodiments of the present application to distinguish between the prefix words used to describe an object does not limit the described object, and statements of the described object are to be read in the claims or in the context of the embodiments and should not constitute unnecessary limitations due to the use of such prefix words. In addition, in the description of the present embodiment, unless otherwise specified, the meaning of "a plurality" is two or more.
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. In the description of the embodiment of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B, and "and/or" herein is merely an association relationship describing an association object, which means that three relationships may exist, for example, a and/or B, and that three cases, i.e., a alone, a and B together, and B alone, exist.
In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed system and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The roll parameters are used to determine the roll equation of motion and are the basis for modeling the vessel. In the prior art, the problems of low accuracy and low efficiency exist in the identification of the ship rolling parameters. In order to solve the above problems, the present invention provides a method for identifying nonlinear roll parameters of a ship based on a physical information neural network, and referring to fig. 1 and 2, the method provided by the present invention includes the following steps.
And S1, determining free damping data of the ship rolling angle and norms thereof, initial conditions of rolling motion and norms thereof, and physical equations of the rolling motion and norms thereof.
The free attenuation data of the ship rolling angle represent the attenuation trend of the ship rolling angle, wherein the free attenuation data of the ship rolling angle represent the attenuation trend of the ship rolling angle when the ship gradually returns to a static state from an initial rolling state without the action of external force (such as waves, wind force and the like). The free damping data reflects the natural characteristics of the rolling motion of the ship, mainly comprising the stability characteristics, damping characteristics and the like of the ship.
Initial conditions for rolling movement, i.e.Roll angle value at timeAnd a roll angular velocity value。
The physical equation of roll motion is a kinetic model describing the roll motion of a ship under external forces (e.g., waves, wind, etc.). These equations are typically based on newton's second law and euler equations, and are used to analyze the response characteristics of the vessel's roll motions in combination with factors such as the vessel's inertia, damping, restoring moment, and external forces.
In some embodiments of the invention:
Roll angle free decay data Expressed as equation;
Initial conditions for roll motionsAndExpressed as equation。
Under still water condition, physical equation of rolling motionGenerally expressed as:
;
wherein, Representing the non-linear roll parameter,、、Respectively a roll angle, a roll angular velocity and a roll angular acceleration; representing a total roll inertia comprising a structural inertia and a water added inertia; Representation and representation AndA related nonlinear damping force; Representation and representation Related nonlinear restoring moment
Wherein the equation is、Can be obtained based on ship design parameters, which are known in the art and will not be described in detail.
Still further, the physical equation for roll motion is expressed as: Wherein, the method comprises the steps of, The physical equation of the rolling motion comprises a damping term of the ship motion and a restoring moment term of the ship motion;
The physical equation of roll motion is rewritten, including:
And a linear-quadratic-cubic damping model is adopted to represent a nonlinear damping term of ship motion, namely:
;
and a linear-cubic restoring force model is adopted to represent a nonlinear restoring moment term of ship motion, namely:
;
Thus, the physical equation of roll motion can be rewritten as:
wherein the nonlinear roll parameter I.e. as vectors,Representing the total roll inertia including structural inertia and water added inertia,Representation and representationAndA related nonlinear damping force; Representation and representation In relation to the non-linear restoring moment,As a first-order damping parameter, the damping parameter,Is a second-order damping parameter, and the damping parameter is a second-order damping parameter,Is a third-order damping parameter; as a first order of the restoring force parameter, Is a second-order restoring force parameter, and the second-order restoring force parameter is a second-order restoring force parameter,Indicating the acceleration of the roll angle,Indicating the angular velocity of the roll,Representing the roll angle.
S2, determining a feedforward neural network, taking physical time as input of the neural network, taking a roll angle as output of the neural network, taking a roll parameter to be identified as an unknown quantity of the neural network, and determining a total loss function of the neural network based on the norm of free attenuation data of the roll angle of the ship, the initial condition norm of the roll motion and the norm of a physical equation of the roll motion.
In some embodiments of the invention, in step S2, the steps of the norm of the free damping data of the vessel roll angle, the norm of the initial condition for roll motion, and the norm of the physical equation for roll motion comprise:
roll angle attenuation data A kind of electronic deviceNorm numberExpressed as:
;
initial conditions for roll motions AndA kind of electronic deviceNorms are expressed as:
;
Physical equation of roll motionA kind of electronic deviceNorms are expressed as:
;
Wherein, 、、Representing the physical constraints satisfying the free decay data, the initial conditions and the physical equations, respectively; Representing the coordinates of discrete points of the data; 、 The superscript ". Lambda." represents the estimated value of the variable under the current neural network iteration step.
It should be noted that: and the derivative thereof is obtained by calculation in the neural network iterative process. Initial initiation And the derivative data thereof can be given by numerically solving the physical equation of roll motion by adopting the Dragon-Gregory tower methodCorresponding under discrete sampling pointsAnd derivatives thereof. Substituting the data into a neural network, and calculating by a driving network, wherein each iteration step is performedAnd the derivative values are all solved iteratively by a physical neural network calculation method (the calculation flow is shown as figure 1).
In some embodiments of the invention, the step of determining constraints of the neural network comprises:
determining a network total loss function :
;
Wherein, 、、Weight allocation representing the corresponding physical constraints respectively; for parameters to be optimized in the neural network, including network weights Network biasRoll parametersExpressed as。
And S3, establishing a super-parameter optimization objective function of the neural network, and carrying out optimization processing on the network super-parameters of the neural network based on the super-parameter optimization objective function to obtain the optimized network super-parameters.
In some embodiments of the present invention, the step of optimizing the neural network superparameter in S3 includes:
selecting super parameters of the neural network to be optimized, including learning rate Layer number of networkNumber of neurons;
Establishing a super-parameter optimization objective function:
;
wherein, Is the number of roll parameters and,Is an estimate of the roll parameter,The method is characterized in that the method is a true value of the roll parameter, the estimated value is a calculation result obtained by the neural network under the current iteration step, namely a solution obtained by the neural network corresponding to the current learning rate, the network layer number and the neuron number, the true value is a real result set in advance, namely a set value of the network super-parameters such as the learning rate, the network layer number and the neuron number, and the objective function is minimized by adopting a Bayesian optimization methodAnd optimizing the neural network super-parameters.
And S4, determining a physical information neural network framework based on the optimized network super-parameters, performing minimization treatment on the total loss function, driving the neural network to operate, obtaining the unknown quantity of the neural network, and obtaining the roll parameters to be identified.
In some embodiments of the present invention, the step of minimizing the total network loss function in step S4 includes:
after determining the physical information neural network framework, minimizing the total loss function of the network through an Adam optimization solver :
;
Wherein, Representing an equation minimization operator;
obtaining network parameters to be optimized After the optimal solution of (a), extracting nonlinear roll parameters。
The effect of the method according to the present invention will be described below by taking a floating marine structure of a ship as an example.
The embodiment of the invention selects a DTMB5415 eviction ship standard model as a numerical example, see figure 3. The full-size of the ship is 142m long, the waterline length 142.18m, the model width 19.06m, the draft 6.15m and the drainage volume 8424.4m3. And selecting a 1:35.48 reduced scale ship model in numerical simulation, and calculating a square box type area with the domain of 20m x 8m, wherein the x-y plane of the coordinate system is positioned on the still water surface, and the z axis is upward in the forward direction. The present embodiment will calculate roll-damping motion signals for the vessel rotating about the x-axis direction.
Releasing the ship model at an initial rotation angle of 10 degrees, and sampling time stepsThe roll-decay signal over the simulation of 20 seconds is shown in figure 4. The roll physical equation adopted in this embodiment isThe initial conditions are thatAnd。
Based on the physical neural network framework in fig. 1, the first step is to define physical constraints related to the physical equations, initial conditions and measurement data. Loss weights distributed with equal proportionsTotal loss function associated with physical constraintsCan be written out.
After defining the loss function, the next step is to optimize the superparameter to determine the structure of the neural network. Selecting the optimization range of the super parameter as,,400 Tests are carried out by adopting a Bayesian optimization method, and each test iteratesThe optimal super-parameters are as shown in FIG. 5, and the optimal super-parameters are,,。
Based on the physical constraints and the optimization super parameters given above, minimizing the total loss function by adopting an Adam optimization solverThe method can drive the physical information neural network to solve the unknown parameters of the network. Before network training begins, the linear damping parameters can be roughly estimated by a logarithmic decay rate methodWhereinIs the roll period of time and,AndThe amplitude corresponding to two continuous periods can be roughly estimated by resonance methodThe remaining three parametersThe initial values of (1) are all 0. Through the process ofAfter the sub-network iterative optimization, the loss function iteration conditions of the training set and the verification set are plotted in fig. 6, the nonlinear roll parameter iteration process is plotted in fig. 7, and it can be seen that the identification parameters are aboutAfter the steps, the method converges, and the final recognition values are respectively。
Next, the identified roll parameters are re-substituted into the roll physical equation, and the reconstructed roll signal is plotted and compared with the measured signal (first 20 seconds), the predicted signal (20-40 seconds), as shown in fig. 8. The reconstructed signal is not only well matched with the measurement signal of the first 20 seconds, but also can keep good consistency in the verification section of 20-40 seconds, thereby proving the superior performance of the developed method.
The invention provides a nonlinear roll parameter high-precision identification method based on a small amount of ship roll attenuation data, which constructs a neural network model meeting the physical law of ship roll by embedding a plurality of loss functions containing physical equations, initial conditions and measured data into a feedforward neural network, and realizes synchronous and efficient identification of nonlinear damping and recovery parameters by automatically meeting the physical equations by optimizing parameters in a network training stage.
The foregoing description of the preferred embodiments of the present application is not intended to be limiting, but rather to enable any person skilled in the art to make any modifications, equivalents, and improvements within the spirit and principles of the present application. The protection scope of the patent of the application shall therefore be subject to the protection scope of the appended claims.