Wave compensation prediction method based on CNN-LATM combined model

文档序号:1446450 发布日期:2020-02-18 浏览:8次 中文

阅读说明:本技术 一种基于cnn-latm组合模型的波浪补偿预测方法 (Wave compensation prediction method based on CNN-LATM combined model ) 是由 唐刚 盛谨勤 雷金曼 胡雄 于 2019-10-21 设计创作,主要内容包括:一种基于CNN-LATM组合模型的波浪补偿预测方法,首先通过加速度传感器采集数据,再将加速度数据处理成位移数据,对组合的神经网络进行训练,最后利用训练好的模型预测出波浪补偿的位移量。本发明方法利用了卷积神经网络的局部感知能力,且计算量小,结合了长短期记忆网络可以实时更新最优权值和阈值的特点,使得组合预测模型具有预测精度高,稳定性好,鲁棒性强等优势。(A wave compensation prediction method based on a CNN-LATM combined model comprises the steps of firstly collecting data through an acceleration sensor, then processing the acceleration data into displacement data, training a combined neural network, and finally predicting the displacement of wave compensation by using the trained model. The method of the invention utilizes the local perception capability of the convolutional neural network, has small calculated amount, and combines the characteristic that the long-term and short-term memory network can update the optimal weight and the threshold value in real time, so that the combined prediction model has the advantages of high prediction precision, good stability, strong robustness and the like.)

1. A wave compensation control method based on a convolutional neural network and a long-short term memory network is characterized by comprising the following steps:

(1) acquiring training data:

1) the acceleration sensor is used for sensing the acceleration of the ship in the heave direction, the acceleration is collected through the acquisition card, the analog signal is digitized through the A/D converter to obtain sampling data, and the sampling data is converted into actual corresponding acceleration data through calibration conversion;

wherein the formula of the calibration transformation is

Figure FDA0002240411200000011

YoFor the lower limit of the measuring range to be measured,

Ymis the upper limit of the measured range

Y is the measured actual physical quantity obtained after calibration transformation

NOIs YoCorresponding A/D conversionConverted digital quantity

NmIs YmCorresponding A/D converted digital quantity

X is the digital quantity after A/D conversion corresponding to the measured actual value Y

2) Carrying out frequency domain band-pass filtering processing on the obtained real-time acceleration signal once, setting the signal with the frequency greater than 1Hz to zero to obtain smooth filtering, correcting zero deviation by adopting a least square method, and finally carrying out twice integral operation on the processed acceleration signal to convert the processed acceleration signal into a displacement signal;

the integral operation of the acceleration adopts an acceleration frequency domain integral principle, firstly, a time domain signal is subjected to Fourier transform to be in a frequency domain, then the time domain integral operation becomes sine and cosine integral interchange of Fourier component coefficients in the frequency domain, and the result is subjected to Fourier inverse transformation to obtain an integrated time domain signal;

the second-order frequency domain integral of the acceleration time course is the motion displacement, wherein the calculation formula of the second-order frequency domain integral of the acceleration signal is

Wherein

Figure FDA0002240411200000013

Wherein k, N and r are 0, 1, 2, … …, N-1

fdAnd faLower and upper cut-off frequencies for band-pass filtering, respectively

X (k) is the Fourier transform of the time domain signal x (n)

Δ f is the frequency resolution

H (k) is the frequency response function of the band-pass filter

3) Normalizing the sample set x (n)

Figure FDA0002240411200000014

(2) Inputting the characteristic parameters subjected to normalization processing into a Convolutional Neural Network (CNN), training data and preprocessing the data, obtaining an initialized network structure and each characteristic parameter after convolution through a convolutional layer, and inputting the convolved data into a pooling layer to adjust a weight and a threshold value so as to prevent overfitting, thereby training the neural network;

(3) inputting the pooled data into a long short term memory network (LSTM) to obtain an optimal weight and a threshold:

1) the LSTM network has three gates, which are input gate, output gate and forgetting gate, and the calculation formula of each gate is

ft=σ(Wf·[ht-1·xt]+bf)

it=σ(Wi·[ht-1·xt]+bi)

ot=σ(Wo·[ht-1·xt]+bo)

ht=ot*tan h(Ct)

Figure FDA0002240411200000021

Figure FDA0002240411200000022

Wherein the symbols

Figure FDA0002240411200000024

"σ" denotes sigmoid function, which is used as activation function

f stands for forgetting door

i represents an input gate

o represents an output gate

C represents the cell status

Figure FDA0002240411200000023

h is cell output

2) Calculating an LSTM network output value according to a forward propagation algorithm;

3) reversely calculating error items of all parts of each LSTM, and conducting residual errors to an output gate, an internal state, a forgetting gate and an input gate;

4) calculating the gradient of each gate weight in turn according to the corresponding error term;

5) updating the weight value of each gate by using an optimization algorithm, and searching the optimal weight and threshold value through iterative calculation;

(4) and performing inverse normalization processing on the obtained output quantity to finally obtain the displacement of the wave compensation.

Technical Field

The invention relates to the technical field of ship wave compensation in numerous sea conditions, in particular to a wave compensation prediction method based on a CNN-LATM combined model.

Background

The offshore operation is based on a ship, and the ship is different from the land, and due to the action of wind, waves and currents, the offshore operation floating production system inevitably makes irregular swinging and heaving motions along with the wind and the waves, and the deck building generates strong interference on airflow near a deck to form strong turbulent flow such as vortex flow and the like, namely an air wake field with a complex structure, so that much inconvenience and risk are brought to the offshore operation. For this reason, the prior art mostly adopts a method of compensating for the waviness to solve the above problems.

In order to fully optimize the active and passive type wave compensation control method, a control algorithm with wave prediction, displacement compensation, speed compensation and tension compensation is developed.

The Convolutional Neural Network (CNN) is a feed-forward neural network which comprises convolutional calculation and has a deep structure, and a local sensing region is adopted, so that the convolutional neural network can be used for lattice characterization with smaller calculation amount due to parameter sharing of convolutional kernels in an implicit layer and sparsity of connection among layers. The one-dimensional CNN can be well applied to time series analysis of sensor data.

The long-short term memory network (LSTM) is one type of recurrent neural network, which has an input gate, a forgetting gate, and an output gate. When a message enters the LSTM network, it can be determined according to rules whether the message is useful. Only the information which is in accordance with the algorithm authentication is left, and the information which is not in accordance with the algorithm authentication is forgotten through a forgetting door. Thus, the LSTM has the capability of memorizing long-term and short-term information, and can be used for solving the time sequence problem with long-term dependence. The method can effectively realize the nonlinear mapping between input and output, has the capabilities of self-organization and pattern recognition, and has stronger approaching and fault-tolerant capabilities compared with other neural networks.

The combination of the one-dimensional CNN and the LSTM can more quickly find out the optimal weight and threshold value, the optimal weight and threshold value can quickly respond to different sea conditions, and the combined neural network has high forecasting precision, strong robustness and good stability.

For example, in the recursive least square algorithm used for prediction in patent CN 108216489 a, the time required in the recursive calculation is long, which results in the lag of prediction, and the linear model used for prediction is large in limitation on prediction data. For example, scholars such as xian ling adopt a time sequence analysis method, an Elman neural network and an SVR prediction algorithm to predict the heave motion of the crane, but the Elman network has low convergence speed, a target function has local minimum points, the Elman network is not ideal for nonlinear heave motion, and the Elman network cannot be applied to various sea conditions. Ferial E-Hawary utilizes Kalman filtering to predict heave motion of a ship crane, but the prediction method needs to know an accurate ship motion state equation, the accurate state equation is difficult to obtain due to the fact that marine motion is nonlinear, the environment changes constantly, and the prediction precision of the prediction algorithm is influenced by sea wave frequency and sea conditions, so that Kalman prediction is inappropriate to be directly applied in practice.

Disclosure of Invention

The invention aims to provide a wave compensation control method for improving performance of a prospective regulation strategy, which can improve compensation precision, compensation stability and solve the problem of poor compensation effect caused by hysteresis of hardware.

In order to solve the problem of hysteresis, the invention proposes to optimize in a manner of combining a convolutional neural network and an LSTM network algorithm of a heave motion prediction algorithm of a ship in sea waves.

The technical scheme adopted by the invention for overcoming the technical problems is as follows:

a wave compensation control method based on a convolutional neural network and a long-short term memory network (as shown in figure 1) comprises the following steps:

step 1: obtaining training data

1.1, an acceleration sensor is used for sensing the acceleration of a ship in the heave direction, after the acceleration is collected by a collection card, an analog signal is digitized by an A/D converter to obtain sampling data, and the sampling data is converted into actual corresponding acceleration data through calibration conversion. Wherein the formula of the calibration transformation is

Figure BDA0002240411210000021

YoIs the lower limit of the measured range; y ismThe upper limit of the measured range; y is the measured actual physical quantity obtained after calibration transformation; n is a radical ofOIs YoCorresponding A/D converted digital quantity; n is a radical ofmIs YmCorresponding A/D converted digital quantity; and X is the digital quantity after A/D conversion corresponding to the measured actual value Y.

1.2, carrying out primary frequency domain band-pass filtering processing on the obtained real-time acceleration signal, and setting the signal with the frequency greater than 1Hz to zero to obtain the fairing filtering. And then correcting the zero point deviation by adopting a least square method. And finally, performing twice integral operation on the processed acceleration signal to convert the processed acceleration signal into a displacement signal, wherein the integral operation of the acceleration adopts an acceleration frequency domain integral principle, a time domain signal is subjected to Fourier transform into a frequency domain, the time domain integral operation becomes sine and cosine integral interchange of Fourier component coefficients in the frequency domain, and the result is subjected to Fourier inverse transformation to obtain an integrated time domain signal. The second-order frequency domain integral of the acceleration time course is the motion displacement. Wherein the calculation formula of the frequency domain quadratic integral of the acceleration signal is

Wherein

Figure BDA0002240411210000023

Wherein k, N and r are 0, 1, 2, … … and N-1; f. ofdAnd faRespectively a lower limit cut-off frequency and an upper limit cut-off frequency of the band-pass filtering; x (k) is the fourier transform of the time domain signal x (n); Δ f is the frequency resolution; h (k) is a frequency response function of the band pass filter.

The advantage of the frequency domain integration principle is that the trend term which is difficult to process in the time domain second integration can be solved only by setting the amplitude of the harmonic component which is lower than the useful frequency to zero in the frequency domain.

1.3 normalizing the sample set x (n)

Figure BDA0002240411210000024

Step 2: as shown in fig. 2, the normalized feature parameters are input into a Convolutional Neural Network (CNN), training data and preprocessing the data, and after convolution, an initialized network structure and various feature parameters are obtained.

And step 3: as shown in fig. 3, the pooled data is input to a long short term memory network (LSTM).

3.1 the LSTM network has three gates, shown in FIG. 4, which are input gate, output gate and forgetting gate, respectively, each gate having a calculation formula of ft=σ(Wf·[ht-1·xt]+bf)

it=σ(Wi·[ht-1·xt]+bi)

ot=σ(Wo·[ht-1·xt]+bo)

ht=ot*tanh(Ct)

Figure BDA0002240411210000025

Figure BDA0002240411210000026

Wherein the symbol ". "represents the multiplication of elements at corresponding positions of two vectors; "σ" denotes sigmoid function, which is used as activation function; f represents a forgetting gate; i represents an input gate; o represents an output gate; c represents a cell state;

Figure BDA0002240411210000033

the current input unit state; h is cell output.

3.2 calculating the LSTM network output value according to the forward propagation algorithm.

3.3 reversely calculating error items of each part of each LSTM, and conducting residual errors to an output gate, an internal state, a forgetting gate and an input gate;

3.4 calculating the gradient of each gate weight in turn according to the corresponding error terms;

and 3.5, updating the weight value of each gate by using an optimization algorithm, and searching the optimal weight and threshold value through iterative calculation.

Step 4, carrying out reverse normalization processing on the obtained output quantity to finally obtain the displacement of the wave compensation

In conclusion, after the scheme is adopted, the invention provides a new scheme for the wave compensation prediction algorithm under deep learning. The method has the advantages that the quick processing capability of the one-dimensional convolutional neural network on the sensor data and the 'updating gates' (the input gate and the forgetting gate) of the long-term and short-term memory network are combined, so that the weight and the threshold are continuously updated, the optimal weight and threshold are finally obtained, the displacement required by compensation is obtained, and the quick response and the super-strong robustness of the wave compensation prediction system are realized.

Drawings

FIG. 1: the structural framework diagram of the CNN-LSTM model of the invention;

FIG. 2: a CNN model flow diagram;

FIG. 3: LSTM model flow diagram;

FIG. 4: model of LSTM network.

Detailed Description

The present invention will be further described with reference to the following specific examples.

The wave compensation prediction algorithm based on the convolutional neural network and the long and short term memory network provided by the embodiment mainly obtains the feature expression through two neural network structures of the convolutional neural network and the LSTM neural network, obtains the optimal weight and the threshold through a feature fusion mode, and finally obtains the compensation displacement.

Which comprises the following steps:

step 1: obtaining training data

1.1, an acceleration sensor is used for sensing the acceleration of a ship in the heave direction, after the acceleration is collected by a collection card, an analog signal is digitized by an A/D converter to obtain sampling data, and the sampling data is converted into actual corresponding acceleration data through calibration conversion. Wherein the formula of the calibration transformation is

YoIs the lower limit of the measured range; y ismThe upper limit of the measured range; y is the measured actual physical quantity obtained after calibration transformation; n is a radical ofOIs YoCorresponding A/D converted digital quantity; n is a radical ofmIs YmCorresponding A/D converted digital quantity; and X is the digital quantity after A/D conversion corresponding to the measured actual value Y.

1.2, carrying out primary frequency domain band-pass filtering processing on the obtained real-time acceleration signal, and setting the signal with the frequency greater than 1Hz to zero to obtain the fairing filtering. And then correcting the zero point deviation by adopting a least square method. The acceleration signal after being processed is subjected to twice integral operation and converted into a displacement signal, the integral operation of the acceleration adopts an acceleration frequency domain integral principle, a time domain signal is subjected to Fourier transform into a frequency domain, the time domain integral operation becomes sine and cosine integral interchange of Fourier component coefficients in the frequency domain, and the result is subjected to Fourier inverse transformation to obtain an integrated time domain signal. The second-order frequency domain integral of the acceleration time course is the motion displacement. Wherein the calculation formula of the frequency domain quadratic integral of the acceleration signal is

Wherein

Figure BDA0002240411210000041

Wherein k, N and r are 0, 1, 2, … … and N-1; f. ofdAnd faRespectively a lower limit cut-off frequency and an upper limit cut-off frequency of the band-pass filtering; x (k) is the fourier transform of the time domain signal x (n); Δ f is the frequency resolution; h (k) is a frequency response function of the band pass filter.

The advantage of the frequency domain integration principle is that the trend term which is difficult to process in the time domain second integration can be solved only by setting the amplitude of the harmonic component which is lower than the useful frequency to zero in the frequency domain.

1.3 normalizing the sample set x (n)

Figure BDA0002240411210000042

Step 2: inputting the characteristic parameters subjected to normalization processing into a Convolutional Neural Network (CNN), training data and preprocessing the data, obtaining an initialized network structure and each characteristic parameter after convolution through a convolutional layer, and inputting the convolved data into a pooling layer to adjust a weight and a threshold value so as to prevent overfitting, thereby training the neural network.

And step 3: and inputting the pooled data into a long-short term memory network (LSTM) to obtain an optimal weight and a threshold.

3.1 this LSTM network has three gates, which are input gate, output gate and forgetting gate, and the calculation formula of each gate is

ft=σ(Wf·[ht-1·xt]+bf)

it=σ(Wi·[ht-1·xt]+bi)

ot=σ(Wo·[ht-1·xt]+bo)

ht=ot*tanh(Ct)

Figure BDA0002240411210000044

Wherein the symbol ". "represents the multiplication of elements at corresponding positions of two vectors; "σ" denotes sigmoid function, which is used as activation function; f represents a forgetting gate; i represents an input gate; o represents an output gate; c represents a cell state;

Figure BDA0002240411210000045

the current input unit state; h is cell output.

3.2 calculating the LSTM network output value according to the forward propagation algorithm.

3.3 reversely calculating error items of each part of each LSTM, and conducting residual errors to an output gate, an internal state, a forgetting gate and an input gate;

3.4 calculating the gradient of each gate weight in turn according to the corresponding error terms;

and 3.5, updating the weight value of each gate by using an optimization algorithm, and searching the optimal weight and threshold value through iterative calculation.

Step 4, carrying out reverse normalization processing on the obtained output quantity to finally obtain the displacement of the wave compensation

It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种针对板式换热器时滞的灰狼预测控制方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!