Ship motion multi-step prediction method and system based on causal convolution, and medium
By processing ship motion data based on causal convolution, the problems of long prediction time and cumulative error in the prior art are solved, and more accurate and longer-range ship motion prediction is achieved.
Patent Information
- Application Number
- CN202411106078.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-08-13
AI Technical Summary
The existing multi-step prediction model for ship motion has problems with long prediction time and cumulative errors, and convolutional neural networks are prone to introduce future information when processing time series data, which violates the principle of causality and leads to inaccurate predictions.
Using a neural network based on causal convolution, the causal convolution neural network is trained by collecting ship acceleration and control quantity data, preprocessing and establishing a multi-step prediction model for ship motion to ensure that prediction depends on current and past information and does not rely on future information. .
It realizes reducing prediction time and error accumulation, capturing longer-range time dependencies, and achieving ship motion prediction with longer prediction steps, improving prediction accuracy and real-timeness.
Smart Images

Figure CN119176227A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of ship data processing, and in particular to a method, system and medium for multi-step prediction of ship motion based on causal convolution. Background Art
[0002] Ship motion prediction is of great significance in the fields of shipping, port scheduling, maritime safety, etc. The existing multi-step prediction models of ship motion (mechanism model, support vector machine, recurrent neural network, etc.) are essentially single-step prediction models. The prediction time is long when performing multi-step prediction, and there is a problem of cumulative error. The method of using convolutional neural network for multi-step prediction of ships, its standard convolution operation is easy to introduce future information when processing time series data, which violates the principle of causality and leads to inaccurate prediction. At the same time, the prediction length is limited by the receptive field of the convolution kernel. Summary of the invention
[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a multi-step prediction method, system and medium for ship motion based on causal convolution, which can predict multi-step ship motion.
[0004] To achieve the above object, one aspect of an embodiment of the present application proposes a multi-step prediction method for ship motion based on causal convolution, comprising the following steps:
[0005] Collect ship acceleration data and ship control quantity data according to preset sampling intervals;
[0006] Obtaining ship motion data according to the ship acceleration data;
[0007] Preprocessing the ship motion data and the ship control quantity data to obtain training sample data;
[0008] Training a preset causal convolutional neural network according to the training sample data to obtain a multi-step prediction model for ship motion;
[0009] The historical motion data and the historical control amount data of the ship to be predicted are obtained, and the historical motion data and the historical control amount data are input into the multi-step prediction model of the ship motion to obtain the multi-step motion amount prediction result.
[0010] In some embodiments, collecting the ship acceleration data and the ship control quantity data according to a preset sampling interval specifically includes:
[0011] Setting the sampling interval, and collecting the ship acceleration data according to the sampling interval by an inertial navigation system;
[0012] The ship control quantity data is collected through a servo motor, and the servo motor is used to control the steering and propeller speed of the ship.
[0013] In some embodiments, obtaining the ship motion data according to the ship acceleration data specifically includes:
[0014] Performing an accumulation operation on the ship acceleration data of a first preset step length to obtain a first accumulation operation result, and performing an accumulation operation on the ship acceleration data of a second preset step length to obtain a second accumulation operation result;
[0015] performing an addition operation on the first accumulation operation result and the second accumulation operation result;
[0016] The sum obtained by the addition operation is divided by 2, and the quotient obtained by the division operation is multiplied by the sampling interval to obtain the ship motion data.
[0017] In some embodiments, the vessel motion data includes at least one of surge velocity, pitch velocity, sway velocity, roll velocity, heave velocity and yaw angular velocity.
[0018] In some embodiments, the preprocessing of the ship motion data and the ship control quantity data to obtain training sample data specifically includes:
[0019] Clustering the ship motion data to obtain a clustering result, and then eliminating abnormal ship motion data according to the clustering result to obtain first sample data;
[0020] Determine missing values in the first sample data, and supplement the missing values according to the first sample data of the previous and next steps to obtain second sample data;
[0021] The second sample data is subjected to denoising and filtering processing, and then the second sample data after denoising and filtering processing is normalized to obtain the training sample data.
[0022] In some embodiments, the training of a preset causal convolutional neural network according to the training sample data to obtain a multi-step prediction model for ship motion specifically includes:
[0023] Dividing the training sample data into a training set and a test set;
[0024] Training the causal convolutional neural network according to a parallel strategy using the training set to obtain a loss value;
[0025] The parameters of the causal convolutional neural network are updated according to the loss value through the test set to obtain the multi-step prediction model of ship motion.
[0026] In some embodiments, the multi-step prediction method for ship motion further includes the step of presetting the causal convolutional neural network, wherein the presetting of the causal convolutional neural network is specifically:
[0027] The input length, output length, number of convolutional layers, void ratio and receptive field of the causal convolutional neural network are set, and the input parameters corresponding to the multi-step motion prediction results are set to zero.
[0028] To achieve the above object, another aspect of the embodiment of the present application proposes a multi-step prediction system for ship motion based on causal convolution, comprising:
[0029] A data acquisition module, used to collect ship acceleration data and ship control quantity data according to a preset sampling interval;
[0030] A motion data acquisition module, used to obtain ship motion data according to the ship acceleration data;
[0031] A data preprocessing module, used for preprocessing the ship motion data and the ship control quantity data to obtain training sample data;
[0032] A prediction model training module, used for training a preset causal convolutional neural network according to the training sample data to obtain a multi-step prediction model for ship motion;
[0033] The multi-step motion quantity prediction module is used to obtain the historical motion data and historical control quantity data of the ship to be predicted, input the historical motion data and the historical control quantity data into the multi-step prediction model of ship motion, and obtain the multi-step motion quantity prediction result.
[0034] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the multi-step prediction method for ship motion based on causal convolution as described above is realized.
[0035] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the multi-step prediction method of ship motion based on causal convolution as described above.
[0036] The beneficial effects of the present invention are as follows: the ship motion multi-step prediction method, system and medium based on causal convolution of the present invention collects ship acceleration data and ship control quantity data according to a preset sampling interval, and then obtains ship motion data according to the ship acceleration data, pre-processes the ship motion data and the ship control quantity data to obtain training sample data, and then trains a preset causal convolutional neural network according to the training sample data to obtain a ship motion multi-step prediction model, and finally obtains the historical motion data and historical control quantity data of the ship to be predicted, inputs the historical acceleration data and the historical control quantity data into the ship motion multi-step prediction model to perform ship motion multi-step prediction, and obtains a multi-step motion quantity prediction result. The present invention adopts a causal convolutional neural network for multi-step prediction of ship motion, can predict multi-step ship motion at one time, reduces the accumulation of prediction time and prediction error, and can capture longer-range time dependencies, and realize ship motion prediction with a longer prediction step. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solution in the embodiments of the present invention, the following introduction is made to the drawings required for use in the embodiments of the present invention. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solution of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A flowchart of a multi-step prediction method for ship motion based on causal convolution provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of the structure of a causal convolutional neural network provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the structure of a multi-step prediction system for ship motion based on causal convolution provided by an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0043] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0044] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0045] Causal convolution is a convolution operation that is widely used in time series data and causal inference tasks. Its design ensures that the output of the convolution depends only on the input of the current time step and its previous time step, thereby maintaining causality, that is, not relying on future information.
[0046] Ship motion prediction is of great significance in the fields of shipping, port scheduling, and maritime safety. Traditional ship motion prediction technologies mostly rely on mechanism models (partial differential equations), support vector machines, recurrent neural networks (LSTM, GPR), etc. However, these technologies perform poorly in the face of complex and changeable marine environments, and the prediction time is long, making it difficult to meet the real-time requirements of the task. With the development of deep learning technology, the technology of using convolutional neural networks (CNN) for time series prediction has gradually attracted attention. However, standard convolution operations are prone to introduce future information when processing time series data, violating the principle of causality, resulting in inaccurate predictions, and the prediction length is limited by the receptive field of the convolution kernel.
[0047] To this end, an embodiment of the present invention proposes a multi-step prediction method for ship motion based on causal convolution, wherein ship acceleration data and ship control quantity data are collected according to a preset sampling interval, and then ship motion data is obtained according to the ship acceleration data, and the ship motion data and ship control quantity data are preprocessed to obtain training sample data, and then a preset causal convolutional neural network is trained according to the training sample data to obtain a multi-step prediction model for ship motion, and finally the historical motion data and historical control quantity data of the ship to be predicted are obtained, and the historical acceleration data and historical control quantity data are input into the multi-step prediction model for ship motion to perform multi-step prediction of ship motion, and obtain a multi-step motion quantity prediction result. The present invention adopts a causal convolutional neural network for multi-step prediction of ship motion, which can predict multi-step ship motion at one time, reduce the accumulation of prediction time and prediction error, and can capture longer-range time dependencies, and realize ship motion prediction with a longer prediction step length. The multi-step prediction method for ship motion can be applied to scenes such as ship intelligent navigation, maritime traffic management, and port operation management, but is not limited thereto.
[0048] Reference Figure 1 , Figure 1 A flowchart of a multi-step prediction method for ship motion based on causal convolution is provided in an embodiment of the present invention. The embodiment of the present invention proposes a multi-step prediction method for ship motion based on causal convolution, and the method includes steps S101 to S105:
[0049] S101, collecting ship acceleration data and ship control quantity data according to a preset sampling interval;
[0050] As an optional implementation, the step of collecting the ship acceleration data and the ship control amount data according to the preset sampling interval can be specifically divided into the following steps S1011 and S1012:
[0051] S1011, setting a sampling interval, and collecting ship acceleration data according to the sampling interval through an inertial navigation system;
[0052] S1012. Collecting ship control quantity data through a servo motor, where the servo motor is used to control the ship's steering and propeller speed.
[0053] Specifically, the ship's acceleration data is directly collected through the inertial navigation system (IMU) equipped on the ship. The inertial navigation system (IMU) integrates a variety of sensors, including accelerometers, gyroscopes, magnetometers, etc. It provides high-precision positioning and navigation support for ships by measuring and reporting information such as the attitude, acceleration and angular velocity of objects in three-dimensional space. The ship controls the steering and propeller speed through servo motors, so the feedback data of the servo motors is obtained as the ship control data.
[0054] Those skilled in the art will appreciate that the sampling interval can be set according to actual needs. For example, the sampling interval can be 2 seconds, 4 seconds, 5 seconds, etc.
[0055] S102, obtaining ship motion data according to the ship acceleration data;
[0056] As an optional implementation, the step of obtaining the ship motion data according to the ship acceleration data can be specifically divided into the following steps S1021 to S1023:
[0057] S1021, performing an accumulation operation on the ship acceleration data of a first preset step length to obtain a first accumulation operation result, and performing an accumulation operation on the ship acceleration data of a second preset step length to obtain a second accumulation operation result;
[0058] S1022, performing an addition operation on the first accumulation operation result and the second accumulation operation result;
[0059] S1023, dividing the sum obtained by the addition operation by 2, and then multiplying the quotient obtained by the division operation by the sampling interval to obtain the ship motion data.
[0060] As a further optional implementation, the ship motion data includes at least one of surge velocity, pitch velocity, sway velocity, roll velocity, heave velocity and yaw angular velocity.
[0061] Specifically, the ship acceleration data is integrated by the rectangular method to obtain the ship motion data, which includes at least one of the surge velocity u, the pitch velocity q, the sway velocity p, the roll velocity v, the heave velocity w and the yaw angular velocity r.
[0062] For example, taking the calculation of the longitudinal velocity u as an example, assuming that there are a total of N longitudinal accelerations The sampling interval is Δt. Then the surge velocity u at step i is determined by the following formula:
[0063]
[0064] Furthermore, the pitch velocity q, the sway velocity p, the roll velocity v, the heave velocity w and the yaw angular velocity r can all be calculated by the same integration method as above.
[0065] S103, pre-processing the ship motion data and the ship control quantity data to obtain training sample data;
[0066] As an optional implementation, the step of preprocessing the ship motion data and the ship control amount data to obtain training sample data can be specifically divided into the following steps S1031 to S1033:
[0067] S1031, clustering the ship motion data to obtain a clustering result, and then eliminating abnormal ship motion data according to the clustering result to obtain first sample data;
[0068] Furthermore, clustering algorithms such as K-means or DBSCAN can be used to cluster the ship motion data. Based on the clustering results, clusters containing a small number of data points or that are far away from other dense clusters are identified as outliers. These outliers are removed to obtain the first sample data to improve the quality of the ship motion data.
[0069] S1032, determining missing values in the first sample data, and supplementing the missing values according to the first sample data of the previous and next steps to obtain second sample data;
[0070] Furthermore, the missing data of each step in the first sample data are determined, and for a small number of consecutive missing data points, linear interpolation of normal data points of the previous and next steps are used to supplement them; for a large number of consecutive missing data points, the most similar historical sequence data are found through the dynamic time warping algorithm, and the data of the sequence are used for interpolation to obtain the second sample data, so as to improve the integrity and continuity of the ship motion data.
[0071] S1033: De-noise and filter the second sample data, and then normalize the second sample data after the de-noise and filter processing to obtain training sample data.
[0072] Furthermore, the Kalman filter algorithm can be used to smooth the ship motion data and remove high-frequency noise in the data. Finally, the data is scaled to the [0, 1] interval to obtain training sample data for training the multi-step prediction model of ship motion.
[0073] As an optional implementation, the multi-step prediction method for ship motion further includes the step of presetting a causal convolutional neural network. The step of presetting a causal convolutional neural network can be specifically divided into the following steps D100:
[0074] D100. Set the input length, output length, number of convolutional layers, void ratio, and receptive field of the causal convolutional neural network, and set the input parameters corresponding to the multi-step motion prediction results to zero.
[0075] For example, the input length of the causal convolutional neural network is set to 9, the output length is 5, the number of convolutional layers is 1, the void rate is 1, and the receptive field is 2. Figure 2 The figure shows a schematic diagram of the structure of a causal convolutional neural network provided by an embodiment of the present invention, with a total of 9 steps (such as Figure 2The 4 black circles and 5 gray circles shown in the figure contain the ship motion data and the ship control data, and the gray circles contain only the ship control data. To ensure the consistency of the input dimension, the unknown ship motion (i.e., the multi-step motion prediction result) dimension in the gray circle is padded with zero. If standard convolution is used and the receptive field is set to 2, the i-th step output captures the i-1 and i-2 convolution layer information through convolution; if the void rate of the causal convolution is set to 1, the i-th step output captures the i-1 and i-3 convolution layer information through convolution.
[0076] S104, training a preset causal convolutional neural network according to the training sample data to obtain a multi-step prediction model for ship motion;
[0077] As an optional implementation, the step of training a preset causal convolutional neural network according to the training sample data to obtain a multi-step prediction model for ship motion can be specifically divided into the following steps S1041 to S1043:
[0078] S1041, dividing the training sample data into a training set and a test set;
[0079] S1042, training the causal convolutional neural network according to the parallel strategy using the training set to obtain a loss value;
[0080] S1043. Update the parameters of the causal convolutional neural network according to the loss value through the test set to obtain a multi-step prediction model for ship motion.
[0081] Specifically, the entire training sample data is first divided into two parts, 80% of which is divided into a training set and 20% is divided into a test set. The training set is used to train the model, that is, to let the model learn the patterns and rules in the data; the test set is used to evaluate the performance of the model, that is, to check the performance of the model on the predicted data. Then, the causal convolutional neural network set up in the previous steps is deployed on the GPU, and the mean square error (MSE) is used as the loss function. The causal convolutional neural network is trained through a parallel strategy to obtain a loss value, which measures the difference between the motion predicted by the network and the actual motion. Finally, the parameters of the network are updated through the back propagation algorithm according to the loss value, and the generalization ability of the model is evaluated through the test set. When the loss value reaches the preset loss threshold or the number of back propagation reaches the preset number of iterations, the training is stopped, and a multi-step prediction model for ship motion is obtained for predicting the future multi-step motion of the ship at one time.
[0082] S105, obtaining historical motion data and historical control amount data of the ship to be predicted, inputting the historical motion data and historical control amount data into a multi-step prediction model of ship motion, and obtaining a multi-step motion amount prediction result.
[0083] Specifically, according to the input length of the causal convolutional neural network set above, historical acceleration data and historical control quantity data of the ship to be predicted for the past several steps are selected to be collected, and then the historical acceleration data are integrated to obtain historical motion data, and the historical motion data and historical control quantity data of the ship to be predicted are input into the multi-step prediction model of ship motion to perform multi-step prediction of ship motion and obtain a multi-step motion quantity prediction result.
[0084] The above is an explanation of the multi-step prediction method of ship motion based on causal convolution in the embodiment of the present invention. It can be recognized that compared with the multi-step prediction models of ship motion such as mechanism models, support vector machines, recurrent neural networks, etc. in the prior art, the embodiment of the present invention adopts a causal convolutional neural network for multi-step prediction of ship motion, which can predict multi-step ship motion at one time based on the principle of causality, reduce the problem of model prediction time and prediction error accumulation as the prediction length increases; and can capture longer-range time dependencies and achieve ship motion prediction with longer prediction steps.
[0085] Reference Figure 3 The embodiment of the present invention further provides a multi-step prediction system for ship motion based on causal convolution, comprising:
[0086] A data acquisition module, used to collect ship acceleration data and ship control quantity data according to a preset sampling interval;
[0087] A motion data acquisition module, used to obtain ship motion data according to ship acceleration data;
[0088] A data preprocessing module is used to preprocess the ship motion data and the ship control quantity data to obtain training sample data;
[0089] A prediction model training module is used to train a preset causal convolutional neural network based on training sample data to obtain a multi-step prediction model for ship motion;
[0090] The multi-step motion quantity prediction module is used to obtain the historical motion data and historical control quantity data of the ship to be predicted, input the historical motion data and historical control quantity data into the multi-step prediction model of ship motion, and obtain the multi-step motion quantity prediction result.
[0091] The contents of the above-mentioned embodiments of the multi-step prediction method for ship motion based on causal convolution are all applicable to the embodiments of the multi-step prediction system for ship motion based on causal convolution. The functions specifically implemented by the embodiments of the multi-step prediction system for ship motion based on causal convolution are the same as those of the above-mentioned embodiments of the multi-step prediction method for ship motion based on causal convolution, and the beneficial effects achieved are also the same as those achieved by the above-mentioned embodiments of the multi-step prediction method for ship motion based on causal convolution.
[0092] The embodiment of the present invention further provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and when the program is executed by the processor, the above-mentioned multi-step prediction method for ship motion based on causal convolution is realized. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.
[0093] like Figure 4 FIG. 1 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention, referring to FIG. Figure 4 , an embodiment of the present invention provides an electronic device, including:
[0094] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0095] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the multi-step prediction method of ship motion based on causal convolution in the embodiment of the present invention;
[0096] Input / output interface 1003, used to implement information input and output;
[0097] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0098] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0099] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0100] An embodiment of the present invention also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned multi-step prediction method of ship motion based on causal convolution.
[0101] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0102] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 1 The method shown.
[0103] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the above-mentioned boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0104] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified to the contrary, one or more of the above-mentioned functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0105] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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. The computer software product is stored in a storage medium, including several 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 above methods of 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 and other media that can store program codes.
[0106] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0107] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0108] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0109] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A multi-step prediction method for ship motion based on causal convolution, characterized in that: The following steps are involved: Collect ship acceleration data and ship control quantity data according to preset sampling intervals; Obtaining ship motion data according to the ship acceleration data; Preprocessing the ship motion data and the ship control quantity data to obtain training sample data; Training a preset causal convolutional neural network according to the training sample data to obtain a multi-step prediction model for ship motion; The historical motion data and the historical control amount data of the ship to be predicted are obtained, and the historical motion data and the historical control amount data are input into the multi-step prediction model of the ship motion to obtain the multi-step motion amount prediction result.
2. A multi-step prediction method for ship motion based on causal convolution according to claim 1, characterized in that: The collecting of ship acceleration data and ship control quantity data according to a preset sampling interval specifically includes: Setting the sampling interval, and collecting the ship acceleration data according to the sampling interval by an inertial navigation system; The ship control quantity data is collected through a servo motor, and the servo motor is used to control the steering and propeller speed of the ship.
3. A multi-step prediction method for ship motion based on causal convolution according to claim 1, characterized in that: The obtaining of the ship motion data according to the ship acceleration data specifically includes: Performing an accumulation operation on the ship acceleration data of a first preset step length to obtain a first accumulation operation result, and performing an accumulation operation on the ship acceleration data of a second preset step length to obtain a second accumulation operation result; performing an addition operation on the first accumulation operation result and the second accumulation operation result; The sum obtained by the addition operation is divided by 2, and the quotient obtained by the division operation is multiplied by the sampling interval to obtain the ship motion data.
4. The multi-step prediction method for ship motion based on causal convolution according to claim 1 is characterized in that: The ship motion data includes at least one of surge velocity, pitch velocity, sway velocity, roll velocity, heave velocity and yaw angular velocity.
5. The multi-step prediction method for ship motion based on causal convolution according to claim 1 is characterized in that: The preprocessing of the ship motion data and the ship control amount data to obtain training sample data specifically includes: Clustering the ship motion data to obtain a clustering result, and then eliminating abnormal ship motion data according to the clustering result to obtain first sample data; Determine missing values in the first sample data, and supplement the missing values according to the first sample data of the previous and next steps to obtain second sample data; The second sample data is subjected to denoising and filtering processing, and then the second sample data after denoising and filtering processing is normalized to obtain the training sample data.
6. A multi-step prediction method for ship motion based on causal convolution according to claim 1, characterized in that: The method of training a preset causal convolutional neural network according to the training sample data to obtain a multi-step prediction model for ship motion specifically includes: Dividing the training sample data into a training set and a test set; Training the causal convolutional neural network according to a parallel strategy using the training set to obtain a loss value; The parameters of the causal convolutional neural network are updated according to the loss value through the test set to obtain the multi-step prediction model of ship motion.
7. The multi-step prediction method for ship motion based on causal convolution according to claim 1 is characterized in that: The multi-step prediction method for ship motion further comprises the step of presetting the causal convolutional neural network, wherein the presetting of the causal convolutional neural network is specifically as follows: The input length, output length, number of convolutional layers, void ratio and receptive field of the causal convolutional neural network are set, and the input parameters corresponding to the multi-step motion prediction results are set to zero.
8. A multi-step prediction system for ship motion based on causal convolution, characterized in that: include: A data acquisition module, used to collect ship acceleration data and ship control quantity data according to a preset sampling interval; A motion data acquisition module, used to obtain ship motion data according to the ship acceleration data; A data preprocessing module, used for preprocessing the ship motion data and the ship control quantity data to obtain training sample data; A prediction model training module, used for training a preset causal convolutional neural network according to the training sample data to obtain a multi-step prediction model for ship motion; The multi-step motion quantity prediction module is used to obtain the historical motion data and historical control quantity data of the ship to be predicted, input the historical motion data and the historical control quantity data into the multi-step prediction model of ship motion, and obtain the multi-step motion quantity prediction result.
9. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the multi-step prediction method of ship motion based on causal convolution as described in any one of claims 1 to 7 are realized.
10. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the multi-step prediction method of ship motion based on causal convolution as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Improved NARX ship rolling motion multi-step prediction method
CN116149347A
Conv-Bi-LSTM model-based ship heaving motion prediction system and prediction method
CN116280094A
DP ship motion control and thrust distribution cooperative control method fusing particle swarm optimization and neural network prediction control
CN117311142A
Ship control motion forecasting method and system based on LSTM (Long Short Term Memory) network
CN117669062A
Lateral Oscillation Motion Prediction System of Ship Using Machine Learning Technique
KR102258257B1
