A deck standstill time estimation method
By combining DeepAR and AR models, a deck motion prediction method was established, which solved the problem of insufficient accuracy of deck resting time in nonlinear marine environments. It achieved coordinated prediction of short-term high-frequency jitter and long-term trend changes, improved prediction accuracy and robustness, and supported safe navigation and aviation support for ships.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN FLIGHT SELF CONTROL INST OF AVIC
- Filing Date
- 2025-12-27
- Publication Date
- 2026-06-02
Smart Images

Figure CN122133424A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of airborne formation navigation and positioning, specifically relating to a method for estimating the resting time of deck motion. Background Technology
[0002] Deck rest period refers to the time interval during which all deck movements remain within acceptable limits to perform the required activities. When a ship is sailing at sea, its motion is strongly disturbed by complex marine environmental factors such as wind, waves, and currents, exhibiting nonlinear and non-stationary characteristics. Therefore, the coordinated operations of ship platforms with other systems place strict requirements on the duration of the rest period. For example, in helicopter takeoff and landing, missile launch, and delivery missions, a rest period of 10 to 30 seconds is required; while fire control and small manned recovery missions require a rest period of approximately 1 minute.
[0003] Accurate estimation of deck rest periods is crucial for safe navigation, weapon system stability, and aviation support (such as aircraft takeoffs and landings). In practical applications, historical data is cached to predict future deck motion parameters. Based on threshold values for these motion parameters, the "rest" time of future deck motion is calculated, and this information is incorporated into relevant control systems for reference, thereby improving the safety of ship operations and aviation support.
[0004] Currently, the main method used in engineering is the deck motion prediction method based on AR models. This method has the advantages of high computational efficiency, mature technology, and accurate short-term prediction. However, for scenarios with strong nonlinearity and drastic dynamic changes, its model assumptions often fail, leading to a decrease in prediction accuracy, especially a large error in medium- and long-term predictions. DeepAR models can capture nonlinear temporal features through deep learning and provide predicted values and confidence intervals, but their fitting accuracy for short-term high-frequency motion is insufficient. Therefore, this patent combines the advantages of both models and proposes a method for predicting the resting period of deck motion, which balances high accuracy in the short term with long-term nonlinear adaptability, thereby improving the accuracy and robustness of the prediction. Summary of the Invention
[0005] The purpose of this invention is to provide a method for predicting the resting period of deck motion. This method predicts the resting period of future deck motion by combining the prediction of future deck motion with resting period judgment conditions. In terms of motion prediction, this method overcomes the limitations of existing single models by combining a DeepAR model and an AR model, achieving coordinated and accurate prediction of short-term high-frequency jitter and long-term trend changes in ship motion. This improves the accuracy and stability of resting period prediction, providing more accurate information for safe ship navigation and aviation support.
[0006] The technical solution of this invention: To achieve the above-mentioned objective, a method for estimating deck rest periods is proposed. This method uses historical data of cached deck movement as input, employs a DeepAR model and an AR model to predict future deck movement in real time, and combines specific rest period judgment conditions to comprehensively derive a relatively accurate and reliable estimated rest period time.
[0007] Specifically, it includes the following steps: Step 1: First, collect a dataset of deck motion (the dataset contains data on deck motion such as pitch, roll, heave, etc.), and use the dataset to train a DeepAR-based deck motion prediction depth autoregressive model, i.e., Model A. Step 2: Establish a deck motion prediction model based on the AR algorithm, i.e., Model B; Step 3: Based on the actual application scenario, determine the deck motion data required for calculating the resting period as the estimated limiting parameter, set the limiting parameter threshold, and determine the resting period based on the limiting parameter threshold; Step 4: Establish a real-time sea state-deck motion data cache queue for a certain period of time; Step 5: Determine if the buffer queue is full. If it is full, use Model A and Model B to predict the future movement of the deck, and calculate the corresponding rest period time value based on the prediction results. Otherwise, output the estimated rest period time as 0.
[0008] In one possible embodiment, the specific process of establishing the DeepAR-based deck motion prediction depth autoregressive model in step 1 includes: The model goal is to be in a given t Historical data before time 0 Under the premise of establishing t 0 and every component thereafter Conditional probability distribution:
[0009] t 0 is the starting point to be predicted. T For the predicted final time point, Z i,t Representing the i The sequences are in t The observed value at time, X i,t Representing the i The sequences are in t Covariates at time; DeepAR employs an autoregressive network architecture, as described above regarding conditional probabilities. P Write it in the following likelihood form:
[0010] During training, at each time point t Input covariates The observation value at the previous time point and the output value of the previous node , get output ,in H This represents the implementation function of a multilayer recurrent neural network composed of LSTM neurons, where Θ is the connection parameter of the neural network; After obtaining the output Based on the calculation Likelihood function Required input parameters; In the above θ (·) represents the mapping of the output to parameters of a given distribution. A Gaussian distribution is chosen as the likelihood model for deck motion prediction. The likelihood parameters... , As expected, For standard deviation, to ensure For positive numbers, softplus is used as the activation function, and the expression is:
[0011]
[0012]
[0013] In the formula: The parameters are obtained by training and optimizing the LSTM network. Represents the likelihood function. Indicates the output data. This represents the function for calculating the predicted mean under this Gaussian distribution. This represents the function for calculating the predicted standard deviation under a Gaussian distribution.
[0014] In one possible implementation, the deck motion distribution function is solved by maximizing the likelihood function during training; that is, the loss function is:
[0015] in Represents the overall likelihood function value. Represents conditional probability; The parameters of the likelihood function predicted by the neural network are represented, including the mean and standard deviation; the stochastic gradient descent method is selected to optimize the above function.
[0016] In one possible embodiment, in step 2, model B is given t Historical data before the time ,estimatet Historical data after that time , T The predicted final time point; the prediction formula for Model B is:
[0017] in The time series input to the model t - n Time data, These are the coefficients of the autoregressive model. n The order of the autoregressive model. They are normally independent distributions; The coefficients of the autoregressive model are determined using the least squares method, and the calculation formula is as follows:
[0018] Where N is the number of data points in the input time series. The definition is as follows:
[0019] The method for calculating the order of the model is as follows: set up S p ( N ( ) is the model AR ( n The sum of squared residuals, AIC ( n )express n The order model AIC Criterion function, then S p ( N )and AIC ( n The calculation formula is:
[0020] When determining the optimal model order, the maximum order is first set to 0. M ,make n =1,2,…, M Substitute the values into the above equation one by one to solve. S 1( N ), S 2( N ),…, S M ( N ) and AIC (1), AIC (2), …, AIC ( M ),Compare AIC ( n Find the optimal ,Pick The optimal model order; The model's prediction formula is:
[0021] in l To estimate the step size, l ≥1.
[0022] In one possible embodiment, step 3 specifically includes the following process: Select the rest period prediction constraint parameters based on the predicted rest period scenario; Set a corresponding threshold value for each parameter; The future start time is predicted based on the deck motion model. t The change in the corresponding constraint parameter within the time interval up to the end time T; Each time frame, the estimated value of each limiting parameter is checked to see if it is within the corresponding threshold. When one or more limiting parameters exceed the corresponding threshold, the time frame check is stopped, and the number of frames checked is recorded. The rest period time is the time value represented by the corresponding frame number.
[0023] In one possible embodiment, the real-time cache queue establishment process in step 4 is as follows: Depending on the actual application scenario, a reasonable maximum cache data length should be selected for very short-term, short-term, or long-term forecasts. N The dimension of the store queue is determined by the number of limiting parameters that need to be considered when making resting prediction judgments; Once the rest period is estimated to begin, the cache queue will perform initialization operations, clearing all cached data; After receiving deck motion data, the availability of the corresponding data is determined based on the data validity and status word. If the data is determined to be available, the next step is performed. If the data is unavailable, the data is not added to the cache queue, and the cache queue is initialized by clearing all cached data. When data is determined to be available, if the cache queue is not full, it is filled into the next cache area of the cache queue. If the cache queue is full, the oldest data is deleted, the remaining cached data slides forward, and the latest data is filled into the last cache queue.
[0024] In one possible embodiment, the cache queue is updated in real time, and the cache queue is updated before each prediction is made.
[0025] In one possible embodiment, the steps specifically include: First, the real-time cache queue data is input into the trained model A, and the model outputs the future... T - tDeck motion data within time period 0, and its upper and lower limits based on the 95% confidence interval, among which... t 0 is the starting point to be predicted. T This is the predicted final time point; from this, we can obtain... t 0~ T Within the time period, Model A predicts the maximum deck motion data. and minimum deck motion data ; Then, the real-time cache queue data is input into the established model B, and the model outputs the future... T - t Deck motion data within time period 0 ; Based on the resting period determination method in step 3, the deck motion data with the maximum and minimum values predicted by model A are evaluated separately to obtain the minimum resting period prediction time. T 1 and estimated maximum resting period T 2; The resting period prediction time is determined by analyzing the deck motion data predicted by Model B, and the estimated resting period time is: T 0; By combining the prediction results from models A and B, the overall estimated resting period time is obtained as follows:
[0026] Estimated time value of comprehensive rest period for external output .
[0027] Advantages and beneficial effects of the present invention: 1. Based on the traditional AR model for deck rest period prediction, a DeepAR model is introduced. The rest period time value and its confidence interval obtained by the DeepAR model are used to test and correct the rest period time value obtained by the AR model. By combining the advantages of the two models, a coordinated and accurate prediction of short-term high-frequency jitter and long-term trend changes of ship motion can be achieved, improving the prediction accuracy and making it easy to implement in engineering.
[0028] 2. By introducing a confidence interval for the estimated value, the reliability of the estimate can be assessed in real time, providing more information for decision-making in relevant control systems.
[0029] 3. DeepAR models incorporate environmental data and can adapt to complex scenarios with sea states of 2-5. The AR model dynamically adjusts its order to cope with changes in motion stability, thus improving the robustness of predictions. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a diagram showing the external cross-linking relationships of the resting prediction function of the present invention; Figure 2 This is a structural diagram of the deep autoregressive model of the present invention; Figure 3 This is a flowchart of the calculation process in Embodiment 1 of the present invention. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] The features and illustrative embodiments of various aspects of the present invention will now be described in detail. Numerous specific details are set forth in the following detailed description to provide a thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention may be practiced without requiring some of these specific details. The following description of embodiments is merely intended to provide a better understanding of the invention by illustrating examples of the invention. The invention is by no means limited to any specific setups and methods set forth below, but covers any improvements, substitutions, and modifications to structures, methods, and devices without departing from the spirit of the invention. Well-known structures and techniques are not shown in the drawings and the following description to avoid unnecessarily obscuring the invention.
[0034] In the description of this invention, it should be noted that the directions or positional relationships indicated by terms such as "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer" are based on the directions or positional relationships shown in the accompanying drawings and are only for the convenience of describing and simplifying the invention, and should not be construed as limiting the invention. Furthermore, the use of ordinal numbers (e.g., "first and second," etc.) is for distinguishing objects and is not limited to this order, and should not be construed as indicating or implying relative importance.
[0035] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly, encompassing both direct connection and indirect connection via an intermediate medium. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances.
[0036] It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other, and the various embodiments can be referenced and cited in each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0037] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0038] A method for estimating deck rest periods. This method uses historical data of cached deck motion as input, employs a DeepAR model and an AR model to predict future deck motion in real time, and combines specific rest period judgment conditions to obtain a relatively accurate and reliable estimated rest period time.
[0039] Specifically, it includes the following steps: Step 1: First, collect a dataset of deck motion (the dataset contains data on deck motion such as pitch, roll, heave, etc.), and use the dataset to train a DeepAR-based deck motion depth autoregressive model, i.e., Model A.
[0040] This step specifically includes the following operations: 1) Establish a deep autoregressive model based on DeepAR. The input of the model is the time series data of deck motion, and the output is the predicted value and prediction error of future deck motion.
[0041] The model goal is to be in a given t Historical data before time 0 Under the premise of establishing t 0 and every component thereafter Conditional probability distribution: .
[0042] The specific structure of the model is as follows: Figure 2 As shown, the left side represents the training process, and the right side represents the prediction process. t 0 is the starting point to be predicted. T For the predicted final time point, Z i,t Representing the i The sequences are in t The observed value at time, X i,t Representing the i The sequences are int Covariates at time points.
[0043] Because DeepAR uses an autoregressive network architecture, the above conditional probabilities... P It can be written in the following likelihood form: ; 2) During training, at each time point t Input covariates The observation value at the previous time point and the output value of the previous node , get output ,in H This represents the implementation function of a multilayer recurrent neural network composed of LSTM neurons, where Θ is the connection parameter of the neural network; 3) Obtain the output from 2). Based on the calculation It is the likelihood function. Required input parameters. In the above... θ (·) represents the mapping of the output to parameters of a given distribution. In one possible embodiment, based on the statistical characteristics of deck motion, a Gaussian distribution is chosen as the likelihood model for deck motion prediction, and the likelihood parameters... , As expected, For standard deviation, to ensure For positive numbers, softplus is used as the activation function, and the expression is:
[0044]
[0045]
[0046] In the formula: The parameters are obtained by training and optimizing the LSTM network. Represents the likelihood function. Indicates the output data. This represents the function for calculating the predicted mean under this Gaussian distribution. This represents the function for calculating the predicted standard deviation under a Gaussian distribution.
[0047] 4) During training, the deck motion distribution function is solved by maximizing the likelihood function in 3), i.e., the loss function is:
[0048] in Represents the overall likelihood function value. Represents conditional probability; The parameters of the likelihood function predicted by the neural network are represented, including the mean and standard deviation; the stochastic gradient descent method is selected to optimize the above function.
[0049] 5) The scheme uses the root mean square error (RMSE) as the evaluation metric for the model:
[0050] in This represents the observational data representing the actual deck motion. The model's predicted value is represented by the root mean square error (RMSE), which measures the deviation between the predicted and actual values. Finally, the test set data is input into the trained DeepAR model, and the output predicted data is compared with the test set output data to evaluate model performance and adjust and optimize model parameters, ultimately obtaining the deck motion prediction model.
[0051] Step 2: Establish a deck motion prediction model based on AR algorithm; The specific process of establishing this model is as follows: 1) This model is based on a given t Historical data before the time ,estimate t Historical data after that time , T This represents the predicted final time point. The model's prediction formula is:
[0052] in The time series input to the model t - n Time data, These are the coefficients of the autoregressive model. n The order of the autoregressive model. They are normally independent distributions; 2) The coefficients of the autoregressive model are determined using the least squares method, and the calculation formula is as follows:
[0053] in N To input the number of data points in the time series, The definition is as follows:
[0054] 3) The method for calculating the order of this model is as follows: set up S p ( N ( ) is the model AR ( n The sum of squared residuals, AIC (n )express n The order model AIC Criterion function, then S p ( N )and AIC ( n The calculation formula is:
[0055] When determining the optimal model order, the maximum order is first set to 0. M ,make n =1,2,…, M Substitute the values into the above equation one by one to solve. S 1( N ), S 2( N ),…, S M ( N ) and AIC (1), AIC (2), …, AIC ( M ),Compare AIC ( n Find the optimal ,Pick This is the optimal model order.
[0056] 4) When using the model for prediction, first calculate the optimal model order according to 3), then calculate the autoregressive model coefficients according to step 2). Therefore, the prediction formula for the model in 1) is:
[0057] in l To estimate the step size, l ≥1.
[0058] Step 3: Calculate the estimated resting period time. The specific calculation process is as follows: 1) Based on the scenario of rest period prediction, select the rest period prediction limiting parameters. For example, considering the pitch and roll of the deck motion, the limiting parameters for rest period prediction in this scenario are the pitch angle and the roll angle. 2) Set a corresponding threshold value for each parameter; 3) Predict future movement based on deck motion model t The change in the corresponding limiting parameter within time T; 4) Check whether the estimated value of each constraint parameter is within the corresponding threshold for each beat. When one or more constraint parameters exceed the corresponding threshold, stop the beat-by-beat check and record the number of beats checked as 0. N checkThe resting period is the time value represented by the corresponding number of beats.
[0059] Step 4: Establish a real-time buffer queue; When predicting deck motion, historical data over a period of time needs to be input into the model as a time series. The integrity and accuracy of the input data are crucial to the model's output. Since the ocean wave environment is constantly changing during real-time prediction, a real-time data buffer queue needs to be established. The buffer queue data is continuously updated over time and then input into the model to predict future deck motion.
[0060] The process of establishing a real-time cache queue is as follows: 1) Based on the actual application scenario, select a reasonable maximum cache data length for very short-term, short-term, or long-term forecasts. N The dimension of the store queue is determined by the number of limiting parameters that need to be considered when making resting prediction judgments; 2) After the rest period function is enabled, the cache queue will perform initialization operations and clear all cached data; 3) After receiving the deck motion data, determine the availability of the corresponding data based on the data validity and status word. If the data is determined to be available, proceed to 4). If the data is unavailable, the data is not placed in the cache queue, and the cache queue is initialized to clear all cached data. 4) When data is determined to be available, if the cache queue is not full, it is filled into the next cache area of the cache queue. If the cache queue is full, the oldest data is deleted, the remaining cached data slides forward, and the latest data is filled into the last cache queue.
[0061] The cache queue is updated in real time. Before each estimation, the cache queue is updated first, and then the real-time estimation is performed.
[0062] Step 5: Real-time calculation of rest period estimation time. Steps 1-4 above are preparatory work before real-time estimation of the rest period: Steps 1 and 2 establish deck motion estimation models A and B. These models can estimate future deck motion by inputting historical cached data; Step 3 determines the rest period time determination method, and calculates the corresponding rest period time value based on the judgment of the estimated deck motion data; Step 4 establishes a real-time data cache queue for inputting models A and B during real-time estimation. Based on this, the real-time calculation of the deck rest period time is performed. The specific calculation process is as follows: 1) The interconnectedness of the entire resting period prediction system is as follows: Figure 1As shown, the resting period prediction function is deployed in the "prediction processor." The prediction processor receives deck motion data from inertial measurement sensors in real time to make real-time predictions and sends the results to relevant equipment. The activation and deactivation of the resting period prediction function are controlled by the deck control station. The deck control station controls the prediction processor to perform resting period prediction calculations via commands, and simultaneously injects the threshold values of the resting period prediction limit parameters into the prediction processor via commands. 2) After the processor is powered on, it begins to receive deck motion data from the inertial measurement sensor in real time, and updates the data in the real-time data cache queue according to the real-time data cache queue established in step 4. 3) Upon receiving the external start command from the deck control station, begin calculating the rest period estimate and store and record the threshold values of the rest period estimate limit parameters in the command as the basis for calculating the rest period estimate time in step 3. 4) When starting the rest period estimation calculation, first check if the real-time cache queue is full. If it is full, proceed to 5) calculation; if it is not full, output the rest period estimation time as 0 and the rest period estimation status is invalid. 5) Once the rest period prediction function is started and the real-time cache queue is full, the rest period prediction calculation begins. At this time, models A and B are called respectively to predict the future movement of the deck, and the corresponding rest period time value is calculated based on the prediction results. 6) First, input the real-time cache queue data into the trained model A, and the model outputs the future... T - t Deck motion data within time period 0, and its upper and lower limits based on the 95% confidence interval, among which... t 0 is the starting point to be predicted. T This represents the predicted final time point. From this, we can obtain... t 0~ T Within the time period, Model A predicts the maximum deck motion data. and minimum deck motion data .
[0063] 7) Then, the real-time cache queue data is input into the established model B, and the model outputs the future... T - t Deck motion data within time period 0 ; 8) Based on the resting time calculation method in step 3, determine the deck motion data with the maximum and minimum values predicted by model A to obtain the minimum resting period prediction time. T 1 and estimated maximum resting period T 2; The resting period prediction time is determined by analyzing the deck motion data predicted by Model B, and the estimated resting period time is:T 0; 9) By combining the prediction results from models A and B, the overall estimated resting period time is obtained as follows:
[0064] Estimated time value of comprehensive rest period for external output And the estimated validity is valid.
[0065] Example 1: A method for estimating deck rest period time in sea state 2 is disclosed. The estimated rest period is used as a real-time control reference for the flight control system during helicopter landing. Based on the application scenario, the main deck motion parameters considered in this rest period estimation are pitch and roll angles. Therefore, in this embodiment, the estimation limiting parameters are the pitch and roll angles of the ship's motion. Specifically, it includes: Step 1: Establish a DeepAR-based deep autoregressive model A. This step mainly includes the following processes: 1) First, a dataset was collected, including 24-hour historical deck movement data at a frequency of 100ms. The raw data was statistically analyzed and processed, and the temporal correlation of the deck movement data was determined. Based on this correlation, the duration of a single data point was set to 20s, the data update rate to 100ms, and the data length to 200 frames. Invalid data was replaced and filled using data interpolation. Finally, the dataset was divided. All generated data was divided into training and testing sets for model training and validation.
[0066] 2) Train the pitch and roll models of deck motion separately, and input the pitch and roll datasets from 1) into their respective DeepAR models for training.
[0067] 3) The specific structure of the training model is first the input layer, which is composed of the output from the previous time step. and the predictor covariates at this moment and the hidden layer output of the previous time step The hidden layer output at this moment can be calculated using the above inputs. for:
[0068] in H This represents a function implemented by a multi-layer recurrent neural network composed of LSTM neurons, where Θ is a given parameter representing the LSTM cell state used in the autoregressive recurrent network. After constructing the basic autoregressive recurrent network, a likelihood function is added. This makes the output predicted value a probability distribution, whereθ (·) represents the neural network model being trained. In this embodiment, the likelihood function uses a Gaussian distribution, and the Gaussian distribution formula is as follows:
[0069]
[0070]
[0071] in This indicates the expected value of the prediction. Standard deviation This represents the transpose of the weight matrix that represents the predicted mean of the DeepAR neural network output. This represents the transpose of the weight matrix that represents the standard deviation of the predictions in the DeepAR neural network output. The threshold vector representing the predicted mean of the DeepAR neural network output. This represents the threshold vector representing the prediction standard deviation of the DeepAR neural network output.
[0072] 4) The number of hidden layers in a neural network affects its ability to learn complex models. If the number of hidden layers is too low, the network will be unable to fit more complex models and will not be able to learn the pitch and roll prediction models well. If the number of hidden layers is too high, it may lead to problems such as gradient vanishing or gradient exploding and long training time. Based on the training results, the neural networks for pitch and roll models were finally set to have 4 hidden layers, with 50 neurons in each layer.
[0073] 5) The preset training hyperparameters for the DeepAR model are: 1000 training steps, learning rate 0.0005, stochastic gradient descent optimizer, and target accuracy of 0.001. Training is performed by maximizing the loss function:
[0074] Solve for the deck motion distribution function.
[0075] 6) After model training, the model is validated using test set data. The output prediction data is compared with the test set output data. The root mean square error (RMSE) is used to evaluate the model performance, and the model parameters are adjusted and optimized. Finally, the final autoregressive model for deck motion prediction depth is obtained. The RMSE calculation formula is as follows:
[0076] in This represents the observational data representing the actual deck motion. This represents the model's predicted value.
[0077] Step 2: Establish the AR autoregressive model B, as follows: 1) Establish pitch and roll prediction models. The specific results of the models are as follows:
[0078] The parameters in the model are defined as follows:
[0079] Using the cache queue data from step 4, construct the pitch and roll prediction models respectively. ,in, N This indicates the latest swing data. n Indicates the model order.
[0080] 2) The AIC criterion is used to determine the order of the pitch and roll models respectively. The formula is as follows:
[0081] When determining the optimal model order, the maximum order is first set to 0. M =20, let n =1,2,…, M Substitute the values into the above equation one by one to solve. S 1( N ), S 2( N ),…, S M ( N ) and AIC (1), AIC (2), …, AIC ( M ),Compare AIC ( n Find the optimal but This is the optimal model order.
[0082] 3) Based on the model order n The estimated model parameters are calculated using the following formula:
[0083] 4) Based on the predicted model parameters obtained above, the prediction models for pitch and roll are as follows:
[0084] in To estimate the step size, .
[0085] 5) During each estimation, the real-time buffer queues of pitch and roll angles are used as input, and the ship's pitch and roll motion parameters are estimated step by step according to the estimation formula in 4).
[0086] Step 3: Calculation of estimated resting period time. The specific calculation process is as follows: 1) Obtain the threshold values of pitch and roll angles based on the instructions received from the deck control station in step 5; 2) Based on model A and model B, obtain the motion prediction values of the pitch and roll angles at times t~T; 3) Analyze each frame to determine if the estimated values of the pitch and roll angles are within the corresponding thresholds. If either the pitch or roll angle exceeds the threshold, stop the frame-by-frame analysis and record the analyzed frame values as follows: N check The resting period is the time value represented by the corresponding number of beats.
[0087] Step 4: Establishing a real-time buffer queue. In this embodiment, the estimated resting period time is determined based on the pitch and roll motions of the deck. Therefore, the real-time buffer queue data includes the pitch and roll angles as inputs for estimation. 1) Based on the temporal correlation of the deck motion pitch and roll data, the length of the real-time deck pitch and roll buffer queue is determined to be 200 frames, storing the latest deck motion pitch and roll data from 20 seconds ago, with a data update rate of 100ms; 2) After the rest period function is enabled, the cache queue will perform initialization operations and clear all cached data; 3) After receiving the deck motion data, determine the availability of the corresponding data based on the data validity and status word. If the data is determined to be available, proceed to 4). If the data is unavailable, the data is not placed in the cache queue, and the cache queue is initialized to clear all cached data. 4) When data is determined to be available, if the cache queue is not full, it is filled into the next cache area of the cache queue. If the cache queue is full, the oldest data is deleted, the remaining cached data slides forward, and the latest data is filled into the last cache queue.
[0088] Step 5: Calculate the estimated resting period time. Using the real-time pitch and roll buffer queues established in Step 4 as input, the models established in Steps 1 and 2 are used to estimate the pitch and roll data for the next 10 seconds. The estimated resting periods for models A and B are obtained according to the calculation method in Step 3. Based on this, a comprehensive judgment is made on the resting period time to obtain the final comprehensive resting period time, which is then output. The entire calculation process is as follows: Figure 3 As shown. The specific calculation process is as follows: 1) After the processor is powered on, it begins to receive deck motion data from the inertial measurement sensor in real time, and establishes a real-time data cache queue according to step 4, and updates the cache queue data in real time. 2) Upon receiving the external start command from the deck control station, the rest period estimation is initiated, and the pitch and roll threshold values in the command are stored and recorded as the basis for calculating the rest period estimation time in step 3. 3) When starting the rest period estimation calculation, first check if the real-time cache queue is full. If it is full, proceed to step 5) for calculation; if it is not full, output the rest period estimation time as 0 and the rest period estimation status is invalid. 4) Once the rest period prediction function is started and the real-time cache queue is full, the rest period prediction calculation begins. At this time, models A and B are called respectively to predict the deck motion, and the corresponding rest period time value is calculated based on the prediction results. 5) First, input the real-time cache queue data (including the pitch real-time cache queue and the roll real-time cache queue) into the trained model A. The pitch prediction model and roll prediction model in model A will output the data for the next 20 seconds (i.e., ...) t 0~ T Based on the deck pitch and roll motion data within the specified time period, and their upper and lower limits based on the 95% confidence interval, the maximum and minimum values of the deck pitch motion predicted by Model A can be obtained as follows: and Model A predicts the maximum and minimum values of the deck roll motion as follows: and . 6) Input the real-time pitch and roll buffer queue data into the established model B, and the model outputs the future... t 0~ T Pitch data of deck motion over a time period (20s) and roll motion data ; 7) Based on the resting time determination method in step 3, determine the deck motion data with the maximum and minimum values predicted by model A to obtain the minimum resting period prediction time. T 1 and estimated maximum resting period T 2; The resting period prediction time is determined by analyzing the deck motion data predicted by Model B, and the estimated resting period time is: T 0; 8) By combining the prediction results from models A and B, the overall estimated resting period time is obtained as follows:
[0089] Example 2 Short-term heave prediction is crucial for polar research vessels deploying equipment under ice. It requires forecasting an 8-second rest period to ensure accurate equipment docking. In this scenario, heave displacement has the greatest impact on docking; therefore, the primary limiting parameter in this rest period prediction is the vessel's heave displacement. The specific details of this rest period prediction include: Step 1: Establish a DeepAR-based deep autoregressive model A. This step mainly includes the following processes: 1) First, a dataset was collected, including 24-hour historical data on deck heave and sag movements in the Antarctic Ocean. The data collection frequency was 100ms. The raw data was statistically analyzed and processed, and the temporal correlation of the deck movement data was analyzed. Based on the temporal correlation, the duration of a single data point was determined to be 15s, the data update rate was 100ms, and the data length was 150 frames. Invalid data in the collected data were replaced and filled using data interpolation. Finally, the dataset was divided. All the generated data were divided into training and testing sets for model training and validation.
[0090] 2) The heave-displacement model of deck motion first has an input layer, which consists of the output from the previous moment. and the predictor covariates at this moment and the hidden layer output of the previous time step. The hidden layer output at this moment can be calculated using the above inputs. for:
[0091] in H This represents a function implemented by a multilayer recurrent neural network composed of LSTM neurons, where Θ is a given parameter of the LSTM cell state used in the autoregressive recurrent network.
[0092] After constructing the basic autoregressive recurrent network, a likelihood function is added. This makes the output predicted value a probability distribution. θ (·) represents the neural network model being trained. The likelihood function uses a Gaussian distribution, and the Gaussian distribution formula is as follows:
[0093]
[0094]
[0095] in This indicates the expected value of the prediction. Standard deviation This represents the transpose of the weight matrix that represents the predicted mean of the DeepAR neural network output. This represents the transpose of the weight matrix that represents the standard deviation of the predictions in the DeepAR neural network output. The threshold vector representing the predicted mean of the DeepAR neural network output. This represents the threshold vector representing the prediction standard deviation of the DeepAR neural network output.
[0096] 3) The number of hidden layers in a neural network can indicate the network's ability to learn complex models. Based on multiple training sessions, the neural networks used to set up the pitch and roll models all have 3 hidden layers, and each layer has 40 neurons. 4) The preset training hyperparameters for the deck heave motion model are: 1000 training steps, 0.0005 learning rate, stochastic gradient descent optimizer, and target accuracy of 0.001. During training, the hyperparameters are maximized as follows:
[0097] To solve for the deck heave displacement distribution function; 5) The performance of the trained model is evaluated using the root mean square error (RMSE), and the model parameters are adjusted and optimized to finally obtain the deck heave displacement prediction model.
[0098] Step 2: Establish an AR-based autoregressive model B, as follows: 1) The heave displacement prediction model is established as follows:
[0099] The parameters in the model are defined as follows:
[0100] In constructing the deck heave displacement prediction model using the cache queue data from step 4. ,in, N This indicates the latest swing data. n Indicates the model order.
[0101] 2) The AIC criterion is used to determine the order of the pitch and roll models respectively. The formula is as follows:
[0102] When determining the optimal model order, the maximum order is first set to 0. M =20, let n =1,2,…, M Substitute the values into the above equation one by one to solve. S 1( N ), S 2( N ),…, S M ( N ) andAIC (1), AIC (2), …, AIC ( M ),Compare AIC ( n Find the optimal but This is the optimal model order.
[0103] 3) Based on the model order n The estimated model parameters are calculated using the following formula:
[0104] 4) Based on the estimated model parameters obtained above, the heave displacement prediction model is as follows:
[0105] in To estimate the step size, .
[0106] Each time an estimate is made, the real-time cache queue is used as input, and the ship's heave displacement is estimated step by step according to the estimation formula in 4).
[0107] Step 3: Calculation of estimated resting period time. The specific calculation process is as follows: 1) Obtain the threshold value of heave displacement according to the instructions from the deck control station in step 5; 2) Based on Model A and Model B, obtain the estimated values of heave displacement at time t~T; 3) Determine whether the estimated heave displacement for each beat is within the corresponding threshold. If it exceeds the threshold, stop the beat-by-beat determination and record the determined beat values as follows. N check The resting period is the time value represented by the corresponding number of beats.
[0108] Step 4: Establish a real-time buffer queue. In this implementation plan, the estimated resting period time is determined based on the deck's heave and displacement motion. Therefore, a real-time buffer queue for deck heave and displacement is established as the input for the estimation. 1) Based on the time correlation of deck heave displacement data, the length of the real-time cache queue for deck heave displacement is determined to be 200 frames, storing the latest deck motion heave displacement data from 20 seconds ago, with a data update rate of 100ms. 2) After the rest period function is enabled, the cache queue will perform initialization operations and clear all cached data; 3) After receiving the deck motion data, determine the availability of the corresponding data based on the data validity and status word. If the data is determined to be available, proceed to 4). If the data is unavailable, the data is not placed in the cache queue, and the cache queue is initialized to clear all cached data. 4) When data is determined to be available, if the cache queue is not full, it is filled into the next cache area of the cache queue. If the cache queue is full, the oldest data is deleted, the remaining cached data slides forward, and the latest data is filled into the last cache queue.
[0109] Step 5: Calculate the estimated resting period time. Using the real-time heave displacement buffer queue established in Step 4 as input, the heave displacement data for the next 10 seconds is estimated using the models established in Steps 1 and 2. The estimated resting periods for models A and B are obtained according to the calculation method in Step 3. Based on this, a comprehensive judgment is made on the resting period time to obtain the final comprehensive resting period time for output. Specific sub-steps are as follows: 1) After the processor is powered on, it begins to receive deck heave displacement data from the inertial measurement sensor in real time, and establishes a real-time data cache queue according to step 4, and updates the cache queue data in real time. 2) Upon receiving the external start command from the deck control station, the rest period estimation calculation begins, and the threshold values of the rest period estimation limit parameters in the command are stored and recorded as the basis for calculating the rest period estimation time in step 3. 3) When starting the rest period estimation calculation, first check if the real-time cache queue is full. If it is full, proceed to step 5) for calculation; if it is not full, output the rest period estimation time as 0 and the rest period estimation status is invalid. 4) Once the rest period prediction function is started and the real-time cache queue is full, the rest period prediction calculation begins. At this time, models A and B are called respectively to predict the deck motion, and the corresponding rest period time value is calculated based on the prediction results. 5) First, input the real-time cached queue data into the trained model A. The heave displacement prediction model in model A outputs the data for the next 20 seconds (i.e., ...). t 0~ T Based on the deck heave displacement data (within the specified time period) and its upper and lower limits based on the 95% confidence interval, the maximum and minimum values of the deck heave displacement predicted by model A can be obtained as follows: and ; 6) Then, the real-time heave displacement buffer queue data is input into the established model B, and the model outputs the future... T - t Deck heave and displacement data within the 0-second time period (20s) ; 7) Based on the resting time determination method in step 3, determine the minimum deck motion data (the maximum value and the minimum value predicted by model A) to obtain the minimum resting period prediction time. T1 and estimated maximum resting period T 2; The resting period prediction time is determined by analyzing the deck motion data predicted by Model B, and the estimated resting period time is: T 0; 8) By combining the prediction results from models A and B, the overall estimated resting period time is obtained as follows:
[0110] The estimated time of the overall rest period is output externally, and the estimation validity is valid.
[0111] The above detailed embodiments are a description of the present invention. It should not be considered that the specific embodiments of the present invention are limited to these descriptions. For those skilled in the art, several simple deductions and substitutions can be made without departing from the concept of the present invention, and all of these should be considered to fall within the protection scope of the present invention.
Claims
1. A method for estimating deck resting period, characterized in that, Includes the following steps: Step 1: First, collect a dataset of deck motion and use the dataset to train a DeepAR-based deck motion prediction depth autoregressive model, i.e., Model A; Step 2: Establish a deck motion prediction model based on the AR algorithm, i.e., Model B; Step 3: Based on the actual application scenario, determine the deck motion data required for calculating the resting period as the estimated limiting parameter, set the limiting parameter threshold, and determine the resting period based on the limiting parameter threshold; Step 4: Establish a real-time sea state-deck motion data cache queue for a certain period of time; Step 5: Determine if the buffer queue is full. If it is full, use Model A and Model B to predict the future movement of the deck, and calculate the corresponding rest period time value based on the prediction results. Otherwise, output the estimated rest period time as 0.
2. The method for estimating deck resting period according to claim 1, characterized in that, In step 1, the specific process of establishing a DeepAR-based autoregressive model for deck motion prediction depth includes: The model goal is to be in a given t Historical data before time 0 Under the premise of establishing t 0 and every component thereafter Conditional probability distribution: t 0 is the starting point to be predicted. T For the predicted final time point, Z i,t Representing the i The sequences are in t The observed value at time, X i,t Representing the i The sequences are in t Covariates at time; DeepAR employs an autoregressive network architecture, as described above regarding conditional probabilities. P Write it in the following likelihood form: During training, at each time point t Input covariates The observation value at the previous time point and the output value of the previous node , get output ,in H This represents the implementation function of a multilayer recurrent neural network composed of LSTM neurons, where Θ is the connection parameter of the neural network; After obtaining the output Based on the calculation Likelihood function Required input parameters; In the above θ (·) represents the mapping of the output to parameters of a given distribution. A Gaussian distribution is chosen as the likelihood model for deck motion prediction. The likelihood parameters... , For the expectation, For standard deviation, to ensure For positive numbers, softplus is used as the activation function, and the expression is: In the formula: The parameters are obtained by training and optimizing the LSTM network. Represents the likelihood function. Indicates the output data. This represents the function for calculating the predicted mean under this Gaussian distribution. This represents the function for calculating the predicted standard deviation under a Gaussian distribution.
3. The method for estimating deck resting period according to claim 2, characterized in that, During training, the deck motion distribution function is solved by maximizing the likelihood function; that is, the loss function is: in Represents the overall likelihood function value. Represents conditional probability; The parameters of the likelihood function predicted by the neural network are represented, including the mean and standard deviation; the stochastic gradient descent method is selected to optimize the above function.
4. The method for estimating deck resting period according to claim 1, characterized in that, In step 2, model B is given t Historical data before the time ,estimate t Historical data after that time , T The predicted final time point; the prediction formula for Model B is: in The time series input to the model t - n Time data, These are the coefficients of the autoregressive model. n The order of the autoregressive model. They are normally independent distributions; The coefficients of the autoregressive model are determined using the least squares method, and the calculation formula is as follows: Where N is the number of data points in the input time series. The definition is as follows: The method for calculating the order of the model is as follows: set up S p ( N ( ) is the model AR ( n The sum of squared residuals, AIC ( n )express n The order model AIC Criterion function, then S p ( N )and AIC ( n The calculation formula is: When determining the optimal model order, the maximum order is first set to 0. M ,make n =1,2,…, M Substitute the values into the above equation one by one to solve. S 1( N ), S 2( N ),…, S M ( N ) and AIC (1), AIC (2), …, AIC ( M ),Compare AIC ( n Find the optimal ,Pick The optimal model order; The model's prediction formula is: in l To estimate the step size, l ≥1.
5. The method for estimating deck resting period according to claim 1, characterized in that, Step 3 specifically includes the following process: Select the rest period prediction constraint parameters based on the predicted rest period scenario; Set a corresponding threshold value for each parameter; The future start time is predicted based on the deck motion model. t The change in the corresponding constraint parameter within the time interval up to the end time T; Each time step, the estimated value of each limiting parameter is checked to see if it is within the corresponding threshold. When one or more limiting parameters exceed the corresponding threshold, the time step is stopped. The number of time steps checked is recorded, and the rest period time is the time value represented by the corresponding number of time steps.
6. The method for estimating deck resting period according to claim 1, characterized in that, In step 4, the real-time cache queue establishment process is as follows: Depending on the actual application scenario, a reasonable maximum cache data length should be selected for very short-term, short-term, or long-term forecasts. N The dimension of the store queue is determined by the number of limiting parameters that need to be considered when making resting prediction judgments; Once the rest period is estimated to begin, the cache queue will perform initialization operations, clearing all cached data; After receiving deck motion data, the availability of the corresponding data is determined based on the data validity and status word. If the data is determined to be available, the next step is performed. If the data is unavailable, the data is not added to the cache queue, and the cache queue is initialized by clearing all cached data. When data is determined to be available, if the cache queue is not full, it is filled into the next cache area of the cache queue. If the cache queue is full, the oldest data is deleted, the remaining cached data slides forward, and the latest data is filled into the last cache queue.
7. The method for estimating deck resting period according to claim 6, characterized in that, The cache queue is updated in real time. Before each estimation, the cache queue is updated first, and then the real-time estimation is performed.
8. The method for estimating deck resting period according to claim 1, characterized in that, Step 5 specifically includes the following steps: First, the real-time cache queue data is input into the trained model A, and the model outputs the future... T - t Deck motion data within time period 0, and its upper and lower limits based on the 95% confidence interval, among which... t 0 is the starting point to be predicted. T This is the predicted final time point; from this, we can obtain... t 0~ T Within the time period, Model A predicts the maximum deck motion data. and minimum deck motion data ; Then, the real-time cache queue data is input into the established model B, and the model outputs the future... T - t Deck motion data within time period 0 ; Based on the resting period determination method in step 3, the deck motion data with the maximum and minimum values predicted by model A are evaluated separately to obtain the minimum resting period prediction time. T 1 and estimated maximum resting period T 2; The resting period prediction time is determined by analyzing the deck motion data predicted by Model B, and the estimated resting period time is: T 0; By combining the prediction results from models A and B, the overall estimated resting period time is obtained as follows: Estimated time value of comprehensive rest period for external output .