Ship motion envelope prediction data processing method and system based on Fourier filtering
The ship motion envelope data is processed through Fourier filtering, and the influence of high-frequency signals is removed, which improves the accuracy of the LSTM model in long-term forecasting, and solves the problem of low forecast accuracy of a single LSTM model under the influence of non-stationary nonlinearity.
Patent Information
- Application Number
- CN202410302135.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-18
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-03-18
Smart Images

Figure CN117909665B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of ship and ocean engineering, and in particular relates to a ship motion envelope prediction data processing method and system based on Fourier filtering. Background Art
[0002] When a ship is sailing in a real ocean environment, it will inevitably produce motion states such as roll, pitch, and heave due to the influence of the complex ocean environment. These motion states have a serious impact on the ship's navigation and operation at sea, such as helicopter take-off and landing, and supply during navigation. Since the motion envelopes of the ship's roll, pitch, heave, etc. can be used to describe the motion state of the ship at sea. Therefore, improving the accuracy of the ship's motion envelope prediction is of great significance to improving the safety and stability of the ship's marine operations and navigation.
[0003] At present, the solutions that are relatively close to the present invention in terms of ship motion prediction based on the long short-term memory neural network model include: Invention patent "Ship motion envelope prediction method and system based on long short-term memory neural network" (publication number CN116861202B, publication date 2023.12.19), which builds a ship motion envelope prediction model based on the LSTM model and the ship's motion envelope time history data, selects the long short-term memory network (LSTM) to learn the ship motion envelope time history data, and directly inputs the envelope time history data into the LSTM model for training to predict the future motion envelope of the ship. Use the trained LSTM model to predict the upper and lower envelope time history data of the ship's motion for a period of time in the future.
[0004] At present, when predicting the ship motion envelope, the ship motion envelope has obvious nonlinear and non-stationary characteristics. When the amplitude of the ship motion changes drastically, the nonlinear and non-stationary characteristics of the envelope are stronger. However, the non-stationary signal in the motion envelope signal is only meaningful for short-term forecasts. In the long-term forecast process, the non-stationary signal will interfere with the model to extract the main trend of the relatively stable sequence, which makes it difficult for the model to capture the data characteristics, thereby reducing the accuracy of the model's long-term forecast. Therefore, how to improve the prediction accuracy of the ship motion envelope prediction model when the forecast time is long has become a problem that needs to be solved urgently.
[0005] In summary, among the existing implementation schemes, a single artificial neural network has the problem of low prediction accuracy for a long time when predicting the ship motion envelope. This is because when the amplitude of the ship motion changes drastically, the envelope has a high-frequency jitter signal. When a single long short-term memory (LSTM) neural network predicts the ship motion envelope for a long time, it will be affected by the non-stationary nonlinearity of the ship motion envelope, which will have a negative impact on the accuracy of the prediction model and lead to low prediction accuracy. Summary of the invention
[0006] In order to overcome the problems existing in the related art, the disclosed embodiment of the present invention provides a ship motion envelope prediction data processing method and system based on Fourier filtering, and in particular, it relates to data analysis and processing of the motion envelope of a ship in waves, so as to extract the motion envelope characteristics of the ship in waves.
[0007] The technical solution is as follows: A ship motion envelope prediction data processing method based on Fourier filtering comprises the following steps:
[0008] S1, collecting ship motion time history data of the ship's heave, roll and pitch degrees of freedom through measuring equipment, recording the ship motion time history data in the form of a time series, extracting the extreme points of the ship motion time history data for cubic spline fitting interpolation, and obtaining the ship motion envelope time history data;
[0009] S2, converting the ship motion envelope time history data into a frequency domain by Fourier transform, and filtering the ship motion envelope time history data by using a Fourier filter in the frequency domain;
[0010] S3, after completing the filtering process, converting the filtered frequency domain data back to the time domain through inverse Fourier transform;
[0011] S4, inputting the ship motion envelope time-history data after Fourier filtering into the long short-term memory (LSTM) neural network model for training, training the ship motion envelope prediction model, and predicting the ship motion envelope time-history data based on the ship motion envelope prediction model.
[0012] In step S1, the ship motion history data is: , where Represents the set of ship motion history at different times, represents the displacement of the ship at the first moment, Represents the displacement of the ship at the Tth moment.
[0013] In step S1, the step of extracting the extreme points of the ship motion time history data and performing cubic spline fitting interpolation to obtain the ship motion envelope time history data includes:
[0014] Ship motion history data in the time domain , extract The extreme point , where For the time-based data The extreme points extracted from The subscript j in is the total number of extreme points, and the specific value of j changes with the number of extreme points of the selected data;
[0015] Then, the envelope extraction of the extracted extreme point sequence is carried out through the cubic spline fitting algorithm, and the upper and lower envelopes of the ship motion are finally obtained by using the cubic spline interpolation method for each extreme point.
[0016] In step S2, converting the ship motion envelope time history data into the frequency domain by Fourier transform includes:
[0017] First, according to the extreme point Envelope extraction is performed through cubic spline fitting interpolation algorithm, and then based on the original data The time step is , and the specific points on the envelope are obtained by resampling. , where represents the set of ship motion envelope time history at different times, It represents the value represented by the ship motion envelope at the first moment, It represents the value represented by the ship motion envelope at the Tth moment;
[0018] Then use the fast Fourier transform to convert the specific points on the envelope Convert from time domain to frequency domain ,in, is the ship motion envelope in the frequency domain The corresponding frequency set, where Represents the frequency distribution at time T; the modulus length corresponding to each frequency is obtained by calculating the spectrum The maximum mode length in the spectrum , where is the modulus length corresponding to different frequency values, is the modulus length of the corresponding frequency at time T;
[0019] Set the threshold and percentage according to the actual situation As the filtering ratio, the threshold is set to , where is the threshold, and its expression is the maximum modulus length And the set filter ratio The product of Threshold By setting the threshold, the high-frequency signal corresponding to the modulus length lower than the threshold is The modulus of is set to 0, where is a set of high-frequency signals in the frequency domain. There are m high-frequency signals in total, and the number of m varies with the selected data. The high-frequency part of the spectrum that is lower than the maximum modulus length filtering ratio is truncated to reduce the spectrum width and obtain the original signal Feature dataset in frequency domain .
[0020] Furthermore, a threshold of the filtering ratio is set according to specific circumstances, and the filtering ratio is selected to be a value between 10% and 20%.
[0021] In step S3, converting the filtered frequency domain data back to the time domain through inverse Fourier transform includes:
[0022] The frequency domain data of the ship motion envelope after fast Fourier filtering Perform inverse Fourier transform to obtain motion envelope data from frequency domain to time domain , and split into training sets With the test set ; Among them, the amount of data in the training set and test set is set according to actual needs.
[0023] In step S4, the input step size and output step size of the ship motion envelope prediction model are set as required, and the training set obtained by Fourier filtering is With the test set The data is passed into the long short-term memory (LSTM) neural network model to start training and prediction.
[0024] After step S4, it is also necessary to: verify the prediction effect of the ship motion envelope prediction model after training.
[0025] Another object of the present invention is to provide a ship motion envelope prediction data processing system based on Fourier filtering, the system implements the ship motion envelope prediction data processing method based on Fourier filtering, and the system specifically includes:
[0026] The ship motion envelope time history data acquisition module is used to collect the ship motion time history data of the ship's heave, roll and pitch degrees of freedom through measuring equipment, the ship motion time history data is recorded in the form of a time series, and the extreme points of the ship motion time history data are extracted for cubic spline fitting interpolation to obtain the ship motion envelope time history data;
[0027] A conversion frequency domain module, used to convert the ship motion envelope time history data into the frequency domain through Fourier transform, and in the frequency domain, filter the ship motion envelope time history data using a Fourier filter;
[0028] The conversion time domain module is used to convert the filtered frequency domain data back to the time domain through inverse Fourier transform after completing the filtering process;
[0029] The ship motion envelope time-history data prediction module is used to input the ship motion envelope time-history data after Fourier filtering into the long short-term memory (LSTM) neural network model for training, train the ship motion envelope prediction model, and predict the ship motion envelope time-history data based on the ship motion envelope prediction model.
[0030] Furthermore, the system is mounted on a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and the processor implements the above method when executing the computer program.
[0031] Combining all the above technical solutions, the beneficial effects of the present invention are as follows: the present invention proposes for the first time a ship motion envelope prediction data processing method based on Fourier filtering, and the ship motion envelope time history data reflects the change information of the amplitude of the ship's rolling, pitching, heaving and other motion time history data over time during navigation, such as Figure 2 The roll motion history and envelope curve show the upper and lower envelopes of the ship's roll motion history; the present invention decomposes the frequency components of the ship motion envelope signal through fast Fourier transform, and designs a low-pass filter. It is achieved by truncating the high-frequency part of the spectrum that is lower than a certain proportion of the maximum modulus, thereby reducing the spectrum width, achieving the filtering effect, and obtaining a simpler signal. Finally, the ship motion envelope data processed by Fourier filtering is used as the input of the model, thereby effectively improving the prediction accuracy of the LSTM model in long-term prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;
[0033] Figure 1 It is a flow chart of a method for processing ship motion envelope prediction data based on Fourier filtering provided by an embodiment of the present invention;
[0034] Figure 2 is a schematic diagram of a rolling motion time history and an envelope curve provided by an embodiment of the present invention;
[0035] Figure 3 It is a schematic diagram of a ship motion envelope prediction data processing method based on Fourier filtering provided by an embodiment of the present invention;
[0036] Figure 4 Schematic diagram of a ship motion envelope prediction data processing system based on Fourier filtering provided by an embodiment of the present invention;
[0037] Figure 5 It is a schematic diagram of a partial time calendar of the entire time calendar data provided by an embodiment of the present invention;
[0038] Figure 6 is a graph of the roll upper envelope filtering result in the roll envelope 10% filtering result provided by an embodiment of the present invention;
[0039] Figure 7is a graph of the roll lower envelope filtering result in the roll envelope 10% filtering result provided by an embodiment of the present invention;
[0040] Figure 8 is a graph of the roll upper envelope filtering result in the roll envelope 20% filtering result provided by an embodiment of the present invention;
[0041] Fig. 9 is a graph of the roll lower envelope filtering result in the roll envelope 20% filtering result provided by an embodiment of the present invention;
[0042] Fig.10 This is a forecast result diagram of the upper roll envelope 15 seconds in advance in the forecast effect before and after filtering provided by an embodiment of the present invention;
[0043] Fig.11 This is a forecast result diagram of the upper roll envelope 15 seconds in advance after filtering in the forecast effect before and after filtering provided by an embodiment of the present invention;
[0044] Fig.12 This is a forecast result diagram of the roll lower envelope 15 seconds in advance in the forecast effect before and after filtering provided by an embodiment of the present invention;
[0045] Fig.13 This is a forecast result diagram of the roll lower envelope 15 seconds in advance after filtering in the forecast effect before and after filtering provided by an embodiment of the present invention;
[0046] Fig.14 is a roll upper envelope error analysis diagram in the error analysis before and after filtering provided by an embodiment of the present invention;
[0047] Fig.15 is a diagram of the roll lower envelope error analysis in the error analysis before and after filtering provided by an embodiment of the present invention;
[0048] In the figure: 1. Ship motion envelope time history data acquisition module; 2. Frequency domain conversion module; 3. Time domain conversion module; 4. Ship motion envelope time history data prediction module. DETAILED DESCRIPTION
[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.
[0050] The innovation of the present invention is that it innovatively proposes to convert the ship motion envelope time history data into the frequency domain using the Fourier transform method for filtering, thereby reducing the data spectrum width and data complexity, thereby improving the learning effect and prediction effect of the neural model. The present invention uses Fourier filtering based on the ship motion envelope data, sets a certain filtering ratio for filtering, and then divides the filtered data into training sets and test sets, and inputs them into the model for training and prediction. This technology improves the predictable duration of the ship motion envelope prediction model while ensuring the model prediction accuracy.
[0051] Embodiment 1, as Figure 1 As shown, the embodiment of the present invention proposes a ship motion envelope prediction data processing method based on Fourier filtering. The method is based on the LSTM network model and uses the fast Fourier transform (FFT) filtering technology to filter the ship motion envelope signal to improve the prediction accuracy. Specifically, it includes:
[0052] S1, collecting ship motion time history data of the ship's heave, roll and pitch degrees of freedom through measuring equipment, recording the ship motion time history data in the form of a time series, extracting the extreme points of the ship motion time history data for cubic spline fitting interpolation, and obtaining the ship motion envelope time history data;
[0053] The ship motion envelope time history data reflects the change of the amplitude of the ship's rolling, pitching, heaving and other motion time history data over time during navigation, such as Figure 2 The rolling motion history and envelope curve show the upper and lower envelope lines of the ship's rolling motion history.
[0054] S2, converting the ship motion envelope time history data into a frequency domain by Fourier transform, and filtering the ship motion envelope time history data by using a Fourier filter in the frequency domain;
[0055] This method effectively reduces the negative impact of the non-stationary nonlinearity of the ship motion envelope signal on the prediction model.
[0056] S3, after completing the filtering process, converting the filtered frequency domain data back to the time domain through inverse Fourier transform;
[0057] This step is to present the expression of the filtered ship motion envelope time history data in the time domain; through the inverse Fourier transform, the expression of the filtered ship motion envelope time history data in the time domain can be obtained.
[0058] S4, inputting the ship motion envelope time-history data after Fourier filtering into the long short-term memory (LSTM) neural network model for training, training the ship motion envelope prediction model, and predicting the ship motion envelope time-history data based on the ship motion envelope prediction model.
[0059] In summary, the ship motion envelope prediction data processing method proposed by the present invention based on Fourier filtering can effectively remove the influence of high-frequency jitter items in the original signal by filtering the ship motion envelope data using Fourier filters and setting appropriate filter parameters. This ship motion envelope prediction data processing method based on Fourier filtering aims to optimize data and improve the accuracy of the prediction model through spectrum analysis and filtering. After the filtering process is completed, the expression of the filtered ship motion envelope data in the time domain can be obtained through inverse Fourier transform. The filtered ship motion envelope data is used as the input of the motion envelope prediction model of the LSTM network, thereby improving the prediction accuracy of the ship motion envelope prediction model when predicting for a longer time.
[0060] In an embodiment of the present invention, Figure 3 This is the principle of the ship motion envelope prediction data processing method based on Fourier filtering provided by an embodiment of the present invention.
[0061] Exemplarily, the present invention proposes a ship motion envelope forecast data processing method based on Fourier filtering. During the research process, the present invention found that in the short-term forecast, the direct use of the LSTM model for forecasting is better than adding the Fourier filter data processing method. This is because the Fourier filter data processing technology will cause the data to lose some features that are useful for short-term forecasts, thereby affecting the prediction effect of the LSTM model and making it difficult for the model to capture data features. On the other hand, the LSTM model itself has a strong ability to capture and predict data features of shorter durations, and can directly learn enough information from the original data in short-term forecasts without introducing additional data processing technology. Therefore, the present invention aims to improve the forecast accuracy of the LSTM model for longer-term forecasts.
[0062] The present invention mainly uses Fourier transform to analyze the frequency components and energy distribution of the extracted ship motion envelope signal, so as to better extract and process the frequency characteristics of the ship motion envelope signal. Based on the results of time-frequency analysis, it is proposed to set a certain percentage ( It can be selected according to the actual situation) as the filtering ratio. By designing a low-pass filter, the threshold is set to ( is the maximum modulus length of the envelope signal in the spectrum after Fourier transform), and then the modulus length of the high-frequency signal corresponding to the threshold is set to 0. The high-frequency part of the spectrum that is lower than the maximum modulus length filtering ratio is cut off, thereby reducing the spectrum width, achieving the filtering effect, and retaining the main components of the signal. By combining the above-mentioned fast Fourier filtering data processing method with the artificial neural network prediction model, the signal components with non-stationary nonlinearity are effectively processed. Specifically, the method uses fast Fourier transform to convert the ship motion envelope signal to the frequency domain to observe the changing trend of the signal at different frequencies. By appropriately filtering the non-stationary nonlinear terms in the original signal, the main components of the signal are retained, thereby effectively reducing the negative impact of the non-stationary nonlinearity of the ship motion envelope signal on the model's long-term prediction. Therefore, when the ship motion envelope signal processed by fast Fourier filtering is used as the input of the LSTM model, the model can better understand and predict the changing trend of the non-stationary signal, thereby improving the accuracy of the motion envelope prediction model in the long-term prediction, and making up for the defects of the existing ship motion envelope prediction model.
[0063] Embodiment 2, as another implementation mode of the present invention, a method for processing ship motion envelope prediction data based on Fourier filtering includes:
[0064] Step 1: Read the known ship motion time data Where Represents the set of ship motion history at different times, represents the displacement of the ship at the first moment, Represents the displacement of the ship at the Tth moment.
[0065] Step 2: The ship motion history data in the time domain in step 1 , extract the time series The extreme point , where For the time-based data The extreme points extracted from The subscript j in is the total number of extreme points, and the specific value of j changes with the number of extreme points of the selected data; then the envelope extraction of the extracted extreme point sequence is carried out through the cubic spline fitting algorithm, and the upper and lower envelopes of the ship motion are finally obtained by using the cubic spline interpolation method for each extreme point. Figure 2 shown.
[0066] Step 3: Perform fast Fourier transform on the upper and lower envelopes extracted by the cubic spline fitting algorithm in step 2. The specific method of fast Fourier transform is to use the extreme points in step 2 to obtain the upper and lower envelopes. Envelope extraction is carried out through cubic spline fitting interpolation algorithm, and then based on the original data The time step is , and the specific points on the envelope are obtained by resampling. Where represents the set of ship motion envelope time history at different times, It represents the value represented by the ship motion envelope at the first moment, represents the value represented by the ship motion envelope at the Tth moment; then the specific point on the envelope is transformed into Convert from time domain to frequency domain ,in, is the ship motion envelope in the frequency domain The corresponding frequency set, where Represents the frequency distribution at time T; the modulus length corresponding to each frequency is obtained by calculating the spectrum The maximum mode length in the spectrum Where is the modulus length corresponding to different frequency values, is the modulus length of the frequency corresponding to time T; then set the threshold and set a certain percentage according to the actual situation As the filtering ratio, the threshold is set to In the formula, is the threshold, and its expression is the maximum modulus length And the set filter ratio The product of Threshold By setting the threshold, the high-frequency signal corresponding to the modulus length lower than the threshold is The modulus of is set to 0, where is a set of high-frequency signals in the frequency domain. There are m high-frequency signals in total. The number of m changes with the selected data. In this way, the high-frequency part of the spectrum that is lower than a certain proportion of the maximum modulus is cut off, thereby reducing the spectrum width and achieving the filtering effect. The original signal is obtained. Feature dataset in frequency domain .
[0067] The innovative formula proposed by the present invention is to use the data set that converts the time domain to the frequency domain after Fourier transformation, obtain the maximum modulus in the spectrum through spectrum analysis, and remove the non-stationary items in the data by setting a threshold. The combined use of these expressions can remove high-frequency jitter items in the spectrum to achieve a filtering effect. By making the data more stable through data processing, this data processing method helps to reduce noise in time series, improve the model's ability to capture long-term trends in the series and the temporal correlation of the time series. The prediction accuracy of the LSTM model is improved when the prediction time is long, which solves the problem of low prediction accuracy of the existing prediction model when the prediction time is long.
[0068] Step 4: The frequency domain data of the ship motion envelope after fast Fourier filtering in step 3 Perform inverse Fourier transform (IFFT) to obtain motion envelope data from frequency domain to time domain , split it into training sets With the test set The amount of data in the training set and the test set can be set according to actual needs. Generally, the ratio of 4:1 or 5:1 is used to divide the training set and the test set.
[0069] The present invention removes the nonlinear and non-stationary items in the original ship motion envelope data, converts the data from the frequency domain to the time domain through the inverse Fourier transform, and innovatively proposes the above formula for the first time, and innovatively converts the data from the frequency domain to the time domain through the inverse Fourier transform, and then divides it into a training set and a test set, and inputs it into the LSTM model for training and forecasting. This technology solves the problem of low forecast accuracy of the existing forecast model when the forecast time is long.
[0070] Step 5: Set the input step size and output step size of the ship motion envelope prediction model based on fast Fourier transform as required, and then filter the training set obtained by Fourier filtering. With the test set Pass it into the motion envelope prediction model to start training and prediction.
[0071] Step 6: By processing the data in the manner of steps 1 to 5, the prediction effect of the ship motion envelope prediction model after training is verified.
[0072] As another possible implementation method, in step 3, the threshold of the filter ratio can be set according to the specific situation, and a value between 10% and 20% is usually selected as a reference. The specific threshold setting should take into account the actual situation such as data characteristics and the needs of the prediction model. Therefore, in this step, it is recommended to set a reasonable threshold based on actual needs and data analysis results.
[0073] It can be seen from the above embodiments that in the prior art, when the neural network LSTM model predicts the envelope of ship motion, it predicts the envelope of ship motion by a direct prediction method. However, the data of the ship motion envelope often has nonlinear and non-stationary terms, which will have a negative impact on the prediction accuracy of the LSTM model. Therefore, at this stage, the LSTM model has a problem of low prediction accuracy when predicting the envelope of ship motion for a long time. The present invention introduces a data processing method based on Fourier filtering, which searches for the maximum modulus in the spectrum image through spectrum analysis, and then performs spectrum truncation to remove the high-frequency jitter terms of low amplitude, thereby reducing the spectrum width in a targeted manner. Thereby making the processed data more stable, improving the model's ability to capture the long-term trend of the sequence and the temporal correlation of the time series. Therefore, the present invention aims to solve the problem of low prediction accuracy of the neural network LSTM model when predicting the envelope of ship motion for a long time.
[0074] Exemplarily, the present invention combines spectrum analysis with filtering processing. By extracting the motion envelope data of the ship, performing FFT transformation on the three-degree-of-freedom motion envelope of the ship, and finding the maximum modulus in the spectrum image, the spectrum is truncated to remove the low-amplitude high-frequency components. This method combining spectrum analysis and filtering processing can better understand the frequency domain characteristics of the signal and reduce the spectrum width in a targeted manner. Secondly, through spectrum truncation, the present invention effectively removes high-frequency components with lower modulus, making the signal more accurate. Finally, the present invention combines a deep learning model with a method combining spectrum analysis and filtering processing to improve the prediction accuracy of the ship motion envelope prediction model.
[0075] Through the above embodiments, it can be seen that the previous ship motion forecast data processing method did not consider the impact of data complexity on the neural network model learning data features when processing the ship motion envelope data. The data spectrum width after processing by this method is greatly reduced, and the forecast effect of the neural network forecast model obtained by training is significantly improved.
[0076] In order to solve the technical problem of short prediction time of the model in ship motion envelope prediction, the present invention increases the effective prediction time of ship motion envelope prediction while ensuring the accuracy of ship motion prediction. At present, the predictable time of ship motion envelope based on this method is more than 20s.
[0077] Embodiment 3, as Figure 4 As shown, the embodiment of the present invention proposes a ship motion envelope prediction data processing system based on Fourier filtering, which specifically includes:
[0078] The ship motion envelope time history data acquisition module 1 is used to collect the ship motion time history data of the ship's heave, roll and pitch degrees of freedom through measuring equipment, the ship motion time history data is recorded in the form of a time series, and the extreme points of the ship motion time history data are extracted for cubic spline fitting interpolation to obtain the ship motion envelope time history data;
[0079] A conversion frequency domain module 2 is used to convert the ship motion envelope time history data into the frequency domain through Fourier transform, and in the frequency domain, the ship motion envelope time history data is filtered using a Fourier filter;
[0080] The conversion time domain module 3 is used to convert the filtered frequency domain data back to the time domain through inverse Fourier transform after completing the filtering process;
[0081] The ship motion envelope time-history data prediction module 4 is used to input the ship motion envelope time-history data after Fourier filtering into the long short-term memory LSTM neural network model for training, train the ship motion envelope prediction model, and predict the ship motion envelope time-history data based on the ship motion envelope prediction model.
[0082] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0083] Since the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present invention, their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0084] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment.
[0085] An embodiment of the present invention further provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.
[0086] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0087] An embodiment of the present invention further provides an information data processing terminal, which, when executed on an electronic device, provides a user input interface to implement the steps in the above method embodiments. The information data processing terminal is not limited to mobile phones, computers, and switches.
[0088] An embodiment of the present invention further provides a server, which is used to provide a user input interface to implement the steps in the above method embodiments when executed on an electronic device.
[0089] An embodiment of the present invention provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0090] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera device / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0091] In order to further illustrate the relevant effects of the embodiments of the present invention, the following experiment was conducted: In the present invention, a set of ship motion time history obtained by numerical simulation method was used as the data source for the simulation test. On this basis, the data was processed accordingly according to the above steps based on the characteristics of the set of data, and the corresponding data processing results were displayed. This process is the simulation test process of the present invention.
[0092] A ship type was selected to simulate the ship's rolling motion time history of the past 15 seconds under the fifth-level sea condition and 15 knots speed condition as the total data set. The total duration of the data was 9000 seconds, the time step was 0.5 seconds, and the part of the envelope signal whose modulus in the frequency domain was lower than 20% of the maximum modulus was set to 0. The present invention predicts the up and down motion envelope of the ship in the next 12 seconds, 15 seconds, and 21 seconds respectively, and constructs a model for ship motion envelope prediction data processing based on Fourier filtering. The schematic diagram of a part of the time history of the entire time history data is shown in FIG. Figure 5 Specifically including:
[0093] Step 1: Read the known ship motion time history data. In the present invention, the ship motion time history data selects the motion data of the ship rolling. The known ship motion time history data when rolling is: .
[0094] Step 2: The ship motion history data in the time domain in step 1 , extract the time series The extreme point , where For the time-based data The extreme points extracted from The subscript j in the equation is the total number of extreme points. The specific value of j varies with the number of extreme points in the selected data. Then, the envelope extraction is carried out on the extracted extreme point sequence through the cubic spline fitting algorithm. The upper and lower envelopes of the ship motion are finally obtained by using the cubic spline interpolation method for each extreme point.
[0095] Step 3: Perform fast Fourier transform on the upper and lower envelopes extracted by the cubic spline fitting algorithm in step 2. The specific method of fast Fourier transform is to use the extreme points in step 2 to obtain the upper and lower envelopes. Envelope extraction is carried out through cubic spline fitting interpolation algorithm, and then based on the original data The time step is , and the specific points on the envelope are obtained by resampling. Then use the fast Fourier transform to transform the specific points on the envelope Convert from time domain to frequency domain , the modulus length corresponding to each frequency is obtained by calculating the spectrum The maximum mode length in the spectrum .
[0096] Step 4: The frequency domain data of the ship motion envelope after fast Fourier filtering in step 3 Perform an inverse Fourier transform (IFFT) to obtain motion envelope data from the frequency domain to the time domain , split it into training sets With the test set The amount of data in the training set and the test set can be set according to actual needs. Generally, the ratio of 4:1 or 5:1 is used to divide the training set and the test set.
[0097] Step 5: Set the input step size and output step size of the ship motion envelope prediction model based on fast Fourier transform as required, and then filter the training set obtained by Fourier filtering. With the test set The training is started by passing it into the motion envelope prediction model. The comparison chart of the filtering results after selecting 10% and 20% as the filtering ratio for analysis includes: Figure 6 The roll envelope 10% filtering result shows the roll upper envelope filtering result. Figure 7 The roll envelope filtering result of the 10% roll envelope is shown in the figure below. Figure 8 The roll envelope 20% filtering result shows the roll upper envelope filtering result. Fig. 9 The roll envelope 20% filtering result shows the roll lower envelope filtering result.
[0098] Step 6: By processing the data in the manner of steps 1 to 5, the prediction effect of the ship motion envelope prediction model after training is verified.
[0099] From the results shown in the error analysis chart before and after filtering, it can be seen that when the forecast time is short, the direct forecast of the LSTM model is better than the forecast after Fourier filtering. This is because the LSTM model itself has a strong ability to capture and predict data features of a shorter time, and can directly learn enough information from the original data in a shorter time forecast without introducing additional data processing technology. When the forecast time is longer, the effect of forecasting based on Fourier filtering is better than that of direct forecasting by the LSTM model. This is because when making a longer forecast, the introduction of Fourier filtering technology for data processing can filter out high-frequency jitter items in the data, making the processed data more stable. This data processing method helps to reduce noise in the time series, thereby improving the model's ability to capture the long-term trend of the series and the temporal correlation of the time series. Therefore, a ship motion envelope forecast data processing method based on Fourier filtering improves the forecast accuracy of the LSTM model when the forecast time is longer.
[0100] The following are the forecast effect diagrams before and after filtering and the error analysis diagrams before and after filtering under the 15s advance forecast, including: Fig.10 The forecast results of the upper roll envelope 15s in advance before and after filtering are shown in the figure. Fig.11 The forecast results before and after filtering show the forecast result of the upper envelope of the rolling after filtering 15 seconds in advance. Fig.12 The forecast results before and after filtering show the roll lower envelope 15s ahead forecast result. Fig.13 The forecast results before and after filtering show the forecast result of the lower envelope of the roll after filtering 15s in advance; Fig.14 The error analysis diagram of the roll envelope in the error analysis before and after filtering. Fig.15 The error analysis diagram of the roll envelope in the error analysis before and after filtering.
[0101] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.
Claims
1. A ship motion envelope prediction data processing method based on Fourier filtering, characterized in that: The method includes: S1, collecting ship motion time history data of the ship's heave, roll and pitch degrees of freedom through measuring equipment, recording the ship motion time history data in the form of a time series, extracting the extreme points of the ship motion time history data for cubic spline fitting interpolation, and obtaining the ship motion envelope time history data; S2, converting the ship motion envelope time history data into a frequency domain by Fourier transform, and filtering the ship motion envelope time history data by using a Fourier filter in the frequency domain; S3, after completing the filtering process, converting the filtered frequency domain data back to the time domain through inverse Fourier transform; S4, inputting the ship motion envelope time history data after Fourier filtering into a long short-term memory (LSTM) neural network model for training, training a ship motion envelope prediction model, and predicting the ship motion envelope time history data based on the ship motion envelope prediction model; In step S2, converting the ship motion envelope time history data into the frequency domain by Fourier transform includes: First, the envelope is extracted by using the cubic spline fitting interpolation algorithm according to the extreme point R′1. According to the time step of the original data R1, the specific points on the envelope are obtained by resampling: R″1=[r″1,r″2…r″ T ] In the formula, R″1 represents the set of ship motion envelope time history at different times, r″1 represents the value represented by the ship motion envelope at the first moment, and r″ T It represents the value represented by the ship motion envelope at the Tth moment; Then, the specific point R″1 on the envelope is converted from the time domain to the frequency domain using the fast Fourier transform: F i =[f1,f2…f T ] Among them, F i is the frequency set corresponding to the ship motion envelope R″1 in the frequency domain, f T Represents the frequency distribution at time T; the modulus length A corresponding to each frequency is obtained by calculating the spectrum i =[a1, a2…a T ] and the maximum modulus length a in the spectrum max , where A i is the modulus length corresponding to different frequency values, a T is the modulus length of the corresponding frequency at time T; Set the threshold and percentage according to the actual situation As a filtering ratio, the threshold is set to: In the formula, I thre is the threshold, and its expression is the maximum modulus length a max And the set filter ratio The product of is the threshold I thre By setting the threshold, the high-frequency signal H corresponding to the modulus length lower than the threshold is i =[h1,h2…h m ] is set to 0, where H i is a set of high-frequency signals in the frequency domain. There are m high-frequency signals in total, and the number of m varies with the selected data. The high-frequency part of the spectrum that is lower than the maximum modulus length filtering ratio is truncated to reduce the spectrum width, and the original signal F is obtained. i Feature dataset X in the frequency domain i =[x1,x2…x T ]; In step S3, converting the filtered frequency domain data back to the time domain through inverse Fourier transform includes: The frequency domain data X of the ship motion envelope after fast Fourier filtering i Perform inverse Fourier transform to obtain the motion envelope data Z from the frequency domain to the time domain i =[z1,z2…z T ] and split into training sets With the test set Among them, the data quantity of the training set and the test set is set according to actual needs; In step S4, the input step size and output step size of the ship motion envelope prediction model are set as required, and the training set obtained by Fourier filtering is With the test set The data is passed into the long short-term memory (LSTM) neural network model to start training and prediction.
2. The ship motion envelope prediction data processing method based on Fourier filtering according to claim 1 is characterized in that: In step S1, the ship motion history data is: R1=[r1,r2…r T ] In the formula, R1 represents the set of ship motion history at different times, r1 represents the ship motion displacement at the first time, r T Represents the displacement of the ship at the Tth moment.
3. The ship motion envelope prediction data processing method based on Fourier filtering according to claim 1 is characterized in that: In step S1, the step of extracting the extreme points of the ship motion time history data and performing cubic spline fitting interpolation to obtain the ship motion envelope time history data includes: For the ship motion history data R1 in the time domain, the extreme point of R1 is extracted as: R′1=[r′1,r′2…r′ j ] In the formula, R′1 is the extreme point extracted from the time history data R1, r′ j The subscript j in is the total number of extreme points, and the specific value of j changes with the number of extreme points of the selected data; The envelope extraction of the extracted extreme point sequence is carried out through the cubic spline fitting algorithm, and the upper and lower envelopes of the ship motion are finally obtained by using the cubic spline interpolation method for each extreme point.
4. The ship motion envelope prediction data processing method based on Fourier filtering according to claim 1 is characterized in that: After step S4, it is also necessary to: verify the prediction effect of the ship motion envelope prediction model after training.
5. A ship motion envelope prediction data processing system based on Fourier filtering, characterized in that: The system implements the ship motion envelope prediction data processing method based on Fourier filtering as described in any one of claims 1 to 4, and the system specifically includes: A ship motion envelope time history data acquisition module (1) is used to collect ship motion time history data of the ship's heave, roll and pitch degrees of freedom through a measuring device, the ship motion time history data is recorded in the form of a time series, and the extreme points of the ship motion time history data are extracted to perform cubic spline fitting interpolation to obtain the ship motion envelope time history data; A conversion frequency domain module (2) is used to convert the ship motion envelope time history data into the frequency domain by Fourier transform, and in the frequency domain, filter the ship motion envelope time history data by using a Fourier filter; A conversion time domain module (3) is used to convert the filtered frequency domain data back to the time domain through an inverse Fourier transform after completing the filtering process; The ship motion envelope time history data prediction module (4) is used to input the ship motion envelope time history data after Fourier filtering into the long short-term memory (LSTM) neural network model for training, train the ship motion envelope prediction model, and predict the ship motion envelope time history data based on the ship motion envelope prediction model.
6. The ship motion envelope prediction data processing system based on Fourier filtering according to claim 5 is characterized in that: The system is mounted on a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and the method is implemented when the processor executes the computer program.
