# A PSO-LSTM Model of Offshore Wind Power Forecast considering the Variation of Wind Speed in Second-Level Time Scale

Authors: Chao Yuan; Yiming Tang; Rui Mei; Fei Mo; Hong Wang
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

To enable power generation companies to make full use of effective wind energy resources and grid companies to correctly schedule wind power, this paper proposes a model of offshore wind power forecast considering the variation of wind speed in second-level time scale. First, data preprocessing is utilized to process the abnormal data and complete the normalization of offshore wind speed and wind power. Then, a wind speed prediction model is established in the second time scale through the differential smoothing power sequence. Finally, a rolling PSO-LSTM memory network is authorized to realize the prediction of second-level time scale wind speed and power. An offshore wind power case is utilized to illustrate and characterize the performance of the wind power forecast model.


---

## Body

## 1. Introduction

Offshore wind power over the past decade remains unprecedented [1, 2]. And offshore wind power has a pivotal and mature role in renewable energy. There are high offshore wind speed, large turbine capacity, annual operating hours of up to 4,000 hours or more, and offshore wind power efficiency compared to onshore wind power annual power generation of 20% to 40% more, with higher energy efficiency [3–5].Offshore wind farms are far away from the land, not affected by urban planning, and reducing the impact of noise and electromagnetic waves on residents. Furthermore, offshore wind farms can promote the economic development of coastal areas and facilitate the local consumption of coastal heavy-load cities [6–8]. However, the randomness and uncontrollability of offshore wind power cause wind power generation companies to decline to report power generation correctly which leads to active abandonment of the reported electric power and fines for excessive reported electric power [9, 10]. Therefore, it is necessary to predict wind speed and predict short-term wind power in practical applications [11]. Offshore wind power prediction is based on historical output data, Numeric Weather Prediction (NWP), and measured meteorological data, and a prediction model is established to predict the future offshore wind power output [12–15]. Reference [16] arrested the mining and analysis of the inherent fluctuation law of wind power as the starting point and studied new methods around the utilization of wind power fluctuation law in ultra-short-term forecasting. Reference [17] proposed a new method based on the extreme learning machine and the bootstrap prediction interval formula to predict wind power in different seasons and verify its effectiveness. Reference [18] effectively solved the combined forecasting interval of wind power by improving the bat algorithm based on the fuzzy cost function. Reference [19] employed support vector machine (SVM) regression to predict the wind power model and effectively verified that, for different wind power weather types, the neighboring days were selected to establish the reliability based on its reliability. However, wind power forecasting is urgently needed to enable offshore wind power generators to use wind power forecasting results to plan and schedule offshore wind turbines and maximize the profits of the offshore wind power generators and the power sector, and it is necessary for accurate wind power forecasting [20].The existing multifactor offshore wind power forecasting methods cannot satisfy the lack of information. The wind power forecast method is eagerly demanded in the next few hours when only offshore wind turbine wind speed and wind power are available. So this paper proposes a model of offshore wind power forecast considering the variation of wind speed in second-level time scale. In the case of processing abnormal data and data normalization and differential smoothing power series, the rolling PSO-LSTM (Particle Swarm Optimization-Long Short-Term Memory) model is established for training, and the training results are utilized to predict the data. The training and prediction results using the real data of offshore wind power show that this prediction model proposed in this paper has higher prediction accuracy than traditional prediction models and can more accurately predict the second-level wind power in the next four hours.


## 2. Data Preprocessing of Wind Speed and Wind Power

### 2.1. Processing of Abnormal Data

The measurement data of offshore wind farms is collected by various sensors, and rapid conversion and transmission of field data through data transmission devices are realized.Offshore wind power at this stage mainly uses wind power data sensor group, wind turbine foundation sensor group, power transmitter, and signal transmission module. Among them, the wind power data sensor group includes wind direction meter, anemometer, barometric pressure sensor, temperature and humidity sensor, etc.; the wind turbine basic sensor group includes acceleration sensor, pressure strain gauge and reference motor, etc.; the power transmitter mainly does output power acquisition and voltage conversion; the signal transmission module mainly talks about the collected signal transmission to the control center.Due to the special climatic conditions, instrument failure, network transmission errors, and other problems may lead to wind measurement data and wind power in the collection, conversion, transmission, and other processes occur in the absence of measurement and measurement error, which undermines the integrity and rationality of offshore wind power data and cannot truly reflect the distribution of wind resources in the field. Most of the existing wind power prediction methods directly or indirectly use wind resource data, so the accuracy of wind measurement data is directly related to the good or bad wind power prediction results. Incomplete data reduce the coherence and utilization of the basic data, and they and the wrong data together constitute anomalous data, which affect the analysis of wind power fluctuation characteristics, the construction of prediction models, and the study of prediction errors. Therefore, the original wind measurement data need to be analyzed, examined, and corrected to obtain more accurate historical data.


### 2.2. Normalization of Wind Speed and Wind Power

Before training the prediction model, because the GRU neural unit in the model uses sigmoid and tanh functions as activation functions, and also to improve the accuracy of wind power prediction and the convergence speed of the data in the training process, this paper uses the Max-Min normalization method to normalize the original wind power data and convert it to the data in the interval [0,1]. The equation of data normalization is as follows:(1)y=xi−xminxmax−xmin,where y is the normalized wind power value; xmax is the maximum value in the original wind power data; xmin is the minimum value in the original wind power data; xi is the actual wind power value.In general, the power output of the wind farm is considered to be the superposition of each wind turbine. The power output of the wind turbine can be expressed by the following equation:(2)Pw=12Cpρπr2v3,where Cp is the wind power utilization coefficient of the wind power; ρ is the air density; r is the radius of the fan blade; v is the wind speed.The wind energy utilization coefficient indicates the ratio of wind power to wind energy, which is the conversion efficiency of wind energy by the wind turbine. According to the Baez limit, the maximum wind energy utilization coefficient of the horizontal wind turbine is 0.593 under the condition of not considering the influence of wake flow.


### 2.3. Fitting Relationship of Wind Speed and Wind Power

Due to the large variety of wind speed, small wind speed and excessive wind speed are not conducive to wind power generation. Small wind speed can not drive the blade rotation and excessive wind speed will cause offshore wind turbine failure; in the design, offshore wind turbines need to install speed limiting devices to ensure that the wind turbine in high winds can operate safely. Wind turbine design has the following provisions: cut-in wind speedvin, cut-out wind speed vout, and rated wind speed vr. Therefore, the offshore wind power formula can also be expressed as follows:(3)Pw=00≤v≤vin,vout≤vfvvin≤v≤vrPrvr≤v≤vout,where fv is used as the equation of offshore wind power versus wind speed at wind speeds between the cut-in wind speed and the rated wind speed, as Figure 1.Figure 1
Ideal relationship between wind speed and wind power.Even though the relationship between wind speed and wind power cannot be solved accurately in reality, and the actual equation of wind speed and wind power cannot be solved, so this paper will adopt the Sigmoidal model using the Boltzmann equation for nonlinear fitting of the actual equation of wind speed and wind power, and the Boltzmann equation is shown as follows:(4)y=A2+A1−A21+e−x−x0/B,where A1,A2,x0,B are the parameters of the Boltzmann equation.


## 2.1. Processing of Abnormal Data

The measurement data of offshore wind farms is collected by various sensors, and rapid conversion and transmission of field data through data transmission devices are realized.Offshore wind power at this stage mainly uses wind power data sensor group, wind turbine foundation sensor group, power transmitter, and signal transmission module. Among them, the wind power data sensor group includes wind direction meter, anemometer, barometric pressure sensor, temperature and humidity sensor, etc.; the wind turbine basic sensor group includes acceleration sensor, pressure strain gauge and reference motor, etc.; the power transmitter mainly does output power acquisition and voltage conversion; the signal transmission module mainly talks about the collected signal transmission to the control center.Due to the special climatic conditions, instrument failure, network transmission errors, and other problems may lead to wind measurement data and wind power in the collection, conversion, transmission, and other processes occur in the absence of measurement and measurement error, which undermines the integrity and rationality of offshore wind power data and cannot truly reflect the distribution of wind resources in the field. Most of the existing wind power prediction methods directly or indirectly use wind resource data, so the accuracy of wind measurement data is directly related to the good or bad wind power prediction results. Incomplete data reduce the coherence and utilization of the basic data, and they and the wrong data together constitute anomalous data, which affect the analysis of wind power fluctuation characteristics, the construction of prediction models, and the study of prediction errors. Therefore, the original wind measurement data need to be analyzed, examined, and corrected to obtain more accurate historical data.


## 2.2. Normalization of Wind Speed and Wind Power

Before training the prediction model, because the GRU neural unit in the model uses sigmoid and tanh functions as activation functions, and also to improve the accuracy of wind power prediction and the convergence speed of the data in the training process, this paper uses the Max-Min normalization method to normalize the original wind power data and convert it to the data in the interval [0,1]. The equation of data normalization is as follows:(1)y=xi−xminxmax−xmin,where y is the normalized wind power value; xmax is the maximum value in the original wind power data; xmin is the minimum value in the original wind power data; xi is the actual wind power value.In general, the power output of the wind farm is considered to be the superposition of each wind turbine. The power output of the wind turbine can be expressed by the following equation:(2)Pw=12Cpρπr2v3,where Cp is the wind power utilization coefficient of the wind power; ρ is the air density; r is the radius of the fan blade; v is the wind speed.The wind energy utilization coefficient indicates the ratio of wind power to wind energy, which is the conversion efficiency of wind energy by the wind turbine. According to the Baez limit, the maximum wind energy utilization coefficient of the horizontal wind turbine is 0.593 under the condition of not considering the influence of wake flow.


## 2.3. Fitting Relationship of Wind Speed and Wind Power

Due to the large variety of wind speed, small wind speed and excessive wind speed are not conducive to wind power generation. Small wind speed can not drive the blade rotation and excessive wind speed will cause offshore wind turbine failure; in the design, offshore wind turbines need to install speed limiting devices to ensure that the wind turbine in high winds can operate safely. Wind turbine design has the following provisions: cut-in wind speedvin, cut-out wind speed vout, and rated wind speed vr. Therefore, the offshore wind power formula can also be expressed as follows:(3)Pw=00≤v≤vin,vout≤vfvvin≤v≤vrPrvr≤v≤vout,where fv is used as the equation of offshore wind power versus wind speed at wind speeds between the cut-in wind speed and the rated wind speed, as Figure 1.Figure 1
Ideal relationship between wind speed and wind power.Even though the relationship between wind speed and wind power cannot be solved accurately in reality, and the actual equation of wind speed and wind power cannot be solved, so this paper will adopt the Sigmoidal model using the Boltzmann equation for nonlinear fitting of the actual equation of wind speed and wind power, and the Boltzmann equation is shown as follows:(4)y=A2+A1−A21+e−x−x0/B,where A1,A2,x0,B are the parameters of the Boltzmann equation.


## 3. Prediction Model of Wind Speed and Wind Power

### 3.1. Wind Power Prediction Model in Second-Level Time Scale

The time series has certain dynamic time characteristics; that is, the series value of the current moment has a correlation with the series value of several previous moments, and the correlation increases with decreasing time interval. And offshore wind power has numerous uncertainties, such as wind direction, air pressure, temperature, etc., but the second-level wind speed fluctuation changes and wind power size will not occur in a large difference. According to its offshore wind fluctuation pattern and time series, the future short-term wind speed variation is judged to predict the wind power size. A single wind speed variation prediction model on a second-scale time scale can be expressed as follows:(5)Pt=f1Pt−θ,Pt−2θ,…+Et,where θ is the time interval of data collection; f1 is the time correlation function of the offshore wind power series; Et is the prediction error at moment i.Due to the complexity of the weather system, the offshore wind power series have an unstable nature. By differentially smoothing the power series, thef1 complexity can be reduced and the prediction error can be reduced as follows:(6)ΔPt=f2ΔPt−θ,ΔPt−2θ,…+et,where Pt is the variation in offshore wind power at moment t and t−θ; f2 is the time-dependent function of the offshore wind power difference series; et is the minimum prediction error at moment t.


### 3.2. Rolling LSTM Neural Network

Recurrent neural networks are a type of artificial neural network. Recurrent neural networks are good at processing time scale data and can describe the data before and after relationship on the time axis. LSTM was proposed by Hochreiter and Schmidhuber as a derivation of recurrent neural networks [21]. LSTM adds multiple special computational nodes in the hidden layer of recurrent neural networks to improve the gradient transfer mode during backpropagation and effectively slow down the gradient disappearance or gradient explosion, solving the problem of not being able to build a prediction model for a longer time span due to the long-term dependence problem of RNN [22], whose model structure is shown in Figure 2.Figure 2
Structure of recurrent neural network.In Figure2, U,V, and W are the weight coefficient matrix between the input layer and the hidden layer, the weight coefficient matrix between the hidden layer and the output layer, and the self-feedback weight coefficient matrix of the hidden layer, respectively; x, y, and h denote the input, output, and hidden layer sequences of the RNN model, respectively.The LSTM network structure consists of input gates, output gates, and forgetting gates and is different from the RNN in that there are multiple hidden layers, and the neurons in the hidden layers are replaced by memory units with gating mechanisms. The basic structure of the network is shown in Figure3.Figure 3
LSTM memory network structure.The memory cell is the core component of the LSTM network. The input of the model contains the sequence inputxt at time t, the hidden layer cell state ht−1, and the memory cell ct−1 at time t1; the output contains the memory cell state ct and the hidden layer state ht, where ct and ht contain the long-term and short-term memory information of the model, and the information flow between the networks is carried out by controlling the input gate, the forget gates, and output gates to achieve the reading and modification of the memory cell unit for information flow between networks. tanh denotes the activation function of tanh, and the input gate uses the sigmoid activation function to enter the parameters and control the variables between [0, 1] to achieve the control of xt on ct; the forgetting gate is to selectively forget the neuron state of the previous moment, and the specific expression is to use memory unit ct−1 for the control of ct; the output gate is used to output and control the parameter variables; i.e., the degree of influence of ct on ht is utilized. The calculation equations are, respectively, as follows:(7)it=σWixxt+Wihht−1+bi,(8)ft=σWfxxt+Wfhht−1+bf,(9)ot=σWoxxt+Wohht−1+bo.whereit,ft, and ot denote the state calculation results of input gate, forget gate, and output gate, respectively; Wih,Wfh,Wox and bi,bf, and bo denote the weight matrix and bias term of the corresponding gates, respectively; σ represent the sigmoid activation function.The output result of the memory module in the LSTM model at momentt is determined by the output gate together with the cell state as follows:(10)ct′=tanhWc⋅ht−1+Wf⋅xt+bc,(11)ct=ft⊙ct−1+it⊙ct′,(12)ht=ot⊙tanhct,where ct′ denotes the cell state-input at moment t; tanh is the hyperbolic tangent activation function; Wc,bc represent the state weight matrix and bias term of the input layer, respectively; ⊙ denotes the elements are multiplied by position.


### 3.3. Rolling PSO-LSTM Neural Network

Particle swarm optimization (PSO) was first proposed by Eberhart and Kennedy in 1995 as a population-based stochastic optimization technique based on the foraging behavior of a flock of birds [23, 24]. PSO algorithm first initializes the particle states to obtain a set of stochastic solutions, and the particles continuously update their states by tracking the individual local optimal solution (Pbest) and the global optimal solution (Gbest) during the spatial motion. Pbest and Gbest denote the optimal position of the particle fitness value of the individual in the process of spatial position iteration and the whole population, respectively, and the fitness value is calculated once in each iteration, and then Pbest and Gbest are updated once (Xn), the position of the i-th particle in the D-dimensional space is Xi = [Xi1, Xi2, ... XiD]T, and the corresponding fitness value of each particle is solved according to the objective function. The velocity, Pbest, and Gbest of the i-th particle are Vi=Vi1,Vi2,…ViDT, Pi = [Pi1, Pi2, ... PiD]T, and Pg=Pg1,Pg2,…PgDT. The particle updates its velocity and position during the iterative process as follows:(13)vidk+1=ωVidk+c1r1Pidk−Xidk+c2r2Pgdk−Xidk,(14)Xidk+1=Xidk+Vidk+1,where k denotes the number of current iterations; Vkid, Xkid, Pkid, and Pkgd denote the velocity, position, individual local optimal solution, and global optimal solution of the particle, respectively; C1 and C2 are acceleration factors, which are usually taken as positive numbers; r1 and r2 are random numbers between [0, 1]; and ω is the inertia factor.In this paper, the PSO model search process is improved in 2 ways using linear differential decrement for the inertia factor and linear adjustment for the acceleration factor [25, 26] to adjust the local and global search capability of the particles as follows:(15)ω=ωmax−ωmax−ωminkTmax2,(16)c1=c1,ini−c1,ini−c1,finkTmax,(17)c2=c2,ini+c2,fin−c2,inikTmax,where ωmax and ωmin denote the maximum and minimum values of iterative inertia weights; k denotes the number of previous iterations; Tmax denotes the maximum number of iterations; c1,ini,c1,fin and c2,ini,c2,fin denote the initial and final values of acceleration factors c1 and c2, respectively.The prediction of time series data is achieved by rolling PSO-LSTM memory network, and the specific process is shown in Figure4.Figure 4
Rolling PSO-LSTM memory network.


### 3.4. Evaluation Criteria of Model

In order to accurately verify the prediction performance of the LSTM network model proposed in this paper, the mean absolute percentage error (yMAPE), root mean square error (yRMSE), and prediction accuracy (yFA) are selected as evaluation indicators to analyze the prediction effect of the model, where the smaller values of yMAPE and yRMSE indicate a better fit and more accurate model prediction results, as defined by the formula as follows:(18)yMAPE=1n∑i=1nXacti−XprediXacti,(19)yRMSE=∑i=1nXacti−Xpredi2n,(20)yFA=1−Xacti−XprediXacti×100%,where n denotes the sample size of the test set; Xact (i) and Xpred (i) (i = 1, 2, …, n) are the true and predicted values of wind power at the time i, respectively.


## 3.1. Wind Power Prediction Model in Second-Level Time Scale

The time series has certain dynamic time characteristics; that is, the series value of the current moment has a correlation with the series value of several previous moments, and the correlation increases with decreasing time interval. And offshore wind power has numerous uncertainties, such as wind direction, air pressure, temperature, etc., but the second-level wind speed fluctuation changes and wind power size will not occur in a large difference. According to its offshore wind fluctuation pattern and time series, the future short-term wind speed variation is judged to predict the wind power size. A single wind speed variation prediction model on a second-scale time scale can be expressed as follows:(5)Pt=f1Pt−θ,Pt−2θ,…+Et,where θ is the time interval of data collection; f1 is the time correlation function of the offshore wind power series; Et is the prediction error at moment i.Due to the complexity of the weather system, the offshore wind power series have an unstable nature. By differentially smoothing the power series, thef1 complexity can be reduced and the prediction error can be reduced as follows:(6)ΔPt=f2ΔPt−θ,ΔPt−2θ,…+et,where Pt is the variation in offshore wind power at moment t and t−θ; f2 is the time-dependent function of the offshore wind power difference series; et is the minimum prediction error at moment t.


## 3.2. Rolling LSTM Neural Network

Recurrent neural networks are a type of artificial neural network. Recurrent neural networks are good at processing time scale data and can describe the data before and after relationship on the time axis. LSTM was proposed by Hochreiter and Schmidhuber as a derivation of recurrent neural networks [21]. LSTM adds multiple special computational nodes in the hidden layer of recurrent neural networks to improve the gradient transfer mode during backpropagation and effectively slow down the gradient disappearance or gradient explosion, solving the problem of not being able to build a prediction model for a longer time span due to the long-term dependence problem of RNN [22], whose model structure is shown in Figure 2.Figure 2
Structure of recurrent neural network.In Figure2, U,V, and W are the weight coefficient matrix between the input layer and the hidden layer, the weight coefficient matrix between the hidden layer and the output layer, and the self-feedback weight coefficient matrix of the hidden layer, respectively; x, y, and h denote the input, output, and hidden layer sequences of the RNN model, respectively.The LSTM network structure consists of input gates, output gates, and forgetting gates and is different from the RNN in that there are multiple hidden layers, and the neurons in the hidden layers are replaced by memory units with gating mechanisms. The basic structure of the network is shown in Figure3.Figure 3
LSTM memory network structure.The memory cell is the core component of the LSTM network. The input of the model contains the sequence inputxt at time t, the hidden layer cell state ht−1, and the memory cell ct−1 at time t1; the output contains the memory cell state ct and the hidden layer state ht, where ct and ht contain the long-term and short-term memory information of the model, and the information flow between the networks is carried out by controlling the input gate, the forget gates, and output gates to achieve the reading and modification of the memory cell unit for information flow between networks. tanh denotes the activation function of tanh, and the input gate uses the sigmoid activation function to enter the parameters and control the variables between [0, 1] to achieve the control of xt on ct; the forgetting gate is to selectively forget the neuron state of the previous moment, and the specific expression is to use memory unit ct−1 for the control of ct; the output gate is used to output and control the parameter variables; i.e., the degree of influence of ct on ht is utilized. The calculation equations are, respectively, as follows:(7)it=σWixxt+Wihht−1+bi,(8)ft=σWfxxt+Wfhht−1+bf,(9)ot=σWoxxt+Wohht−1+bo.whereit,ft, and ot denote the state calculation results of input gate, forget gate, and output gate, respectively; Wih,Wfh,Wox and bi,bf, and bo denote the weight matrix and bias term of the corresponding gates, respectively; σ represent the sigmoid activation function.The output result of the memory module in the LSTM model at momentt is determined by the output gate together with the cell state as follows:(10)ct′=tanhWc⋅ht−1+Wf⋅xt+bc,(11)ct=ft⊙ct−1+it⊙ct′,(12)ht=ot⊙tanhct,where ct′ denotes the cell state-input at moment t; tanh is the hyperbolic tangent activation function; Wc,bc represent the state weight matrix and bias term of the input layer, respectively; ⊙ denotes the elements are multiplied by position.


## 3.3. Rolling PSO-LSTM Neural Network

Particle swarm optimization (PSO) was first proposed by Eberhart and Kennedy in 1995 as a population-based stochastic optimization technique based on the foraging behavior of a flock of birds [23, 24]. PSO algorithm first initializes the particle states to obtain a set of stochastic solutions, and the particles continuously update their states by tracking the individual local optimal solution (Pbest) and the global optimal solution (Gbest) during the spatial motion. Pbest and Gbest denote the optimal position of the particle fitness value of the individual in the process of spatial position iteration and the whole population, respectively, and the fitness value is calculated once in each iteration, and then Pbest and Gbest are updated once (Xn), the position of the i-th particle in the D-dimensional space is Xi = [Xi1, Xi2, ... XiD]T, and the corresponding fitness value of each particle is solved according to the objective function. The velocity, Pbest, and Gbest of the i-th particle are Vi=Vi1,Vi2,…ViDT, Pi = [Pi1, Pi2, ... PiD]T, and Pg=Pg1,Pg2,…PgDT. The particle updates its velocity and position during the iterative process as follows:(13)vidk+1=ωVidk+c1r1Pidk−Xidk+c2r2Pgdk−Xidk,(14)Xidk+1=Xidk+Vidk+1,where k denotes the number of current iterations; Vkid, Xkid, Pkid, and Pkgd denote the velocity, position, individual local optimal solution, and global optimal solution of the particle, respectively; C1 and C2 are acceleration factors, which are usually taken as positive numbers; r1 and r2 are random numbers between [0, 1]; and ω is the inertia factor.In this paper, the PSO model search process is improved in 2 ways using linear differential decrement for the inertia factor and linear adjustment for the acceleration factor [25, 26] to adjust the local and global search capability of the particles as follows:(15)ω=ωmax−ωmax−ωminkTmax2,(16)c1=c1,ini−c1,ini−c1,finkTmax,(17)c2=c2,ini+c2,fin−c2,inikTmax,where ωmax and ωmin denote the maximum and minimum values of iterative inertia weights; k denotes the number of previous iterations; Tmax denotes the maximum number of iterations; c1,ini,c1,fin and c2,ini,c2,fin denote the initial and final values of acceleration factors c1 and c2, respectively.The prediction of time series data is achieved by rolling PSO-LSTM memory network, and the specific process is shown in Figure4.Figure 4
Rolling PSO-LSTM memory network.


## 3.4. Evaluation Criteria of Model

In order to accurately verify the prediction performance of the LSTM network model proposed in this paper, the mean absolute percentage error (yMAPE), root mean square error (yRMSE), and prediction accuracy (yFA) are selected as evaluation indicators to analyze the prediction effect of the model, where the smaller values of yMAPE and yRMSE indicate a better fit and more accurate model prediction results, as defined by the formula as follows:(18)yMAPE=1n∑i=1nXacti−XprediXacti,(19)yRMSE=∑i=1nXacti−Xpredi2n,(20)yFA=1−Xacti−XprediXacti×100%,where n denotes the sample size of the test set; Xact (i) and Xpred (i) (i = 1, 2, …, n) are the true and predicted values of wind power at the time i, respectively.


## 4. Case Analysis

### 4.1. Experimental Data Set and Experimental Environment

This paper uses an experimental environment with Windows 10 operating system, 8 GB of RAM, Intel (R) Core (TM) i3-9100F CPU @ 3.60 GHz, NVIDIA GeForce GTX 1650 GPU, and Python 3.8 language. Anacaoda 3 and Tensorflow 1.14.0 were used to write PSO-LSTM memory networks, LSTM and ARIMA, which are commonly used for time series prediction.To verify the scientificity and reliability of the offshore wind power prediction model proposed in this paper, the online monitoring data of second-level wind speed and second-level offshore wind power of offshore wind power in Jiangsu province in one day are used in the analysis of this paper. 105 offshore wind turbines with a rated power of 1500 kW are included in this wind turbine group, and the wind speed and offshore wind power of a unit are shown in Figure5:Figure 5
Second-level wind speed and offshore wind power.As can be seen from Figure5, part of the data shows that the power is less than 0, abnormal data need to be processed, and the offshore wind power of this unit has not reached half of the rated power, so it is judged that this wind speed and power relationship should be in the rising part, and the nonlinear fitting of the second wind speed and offshore wind power by Boltzmann equation is shown in Figure 6.Figure 6
Abnormal processing and fitting between second-level wind speed and offshore wind power.


### 4.2. Offshore Wind Forecast

The collected offshore wind power is normalized and fed into the LSTM network model as feature parameters, and two key parameters are optimized: the number of neuronsm and the learning rate rlr, and the particle fitness is taken as the average absolute percentage error of the prediction results, and the settings of the model parameters in the optimization process are shown as Table 1.Table 1
Parameter setting of PSO.
ParameterSettingTmax100npop30m value scope[1, 20]m search scope[−4, 4]rlr value scope[0.000 1, 0.01]rlr search scope[−0.001, 0.001]ωmax0.9ωmin0.4c1,ini2c1,fin0.5c2,ini0.5c2,fin2The optimization results of the number of hidden layer neuronsm and the learning rate rlr are shown in Figure 7: the laws of particle fitness, the number of hidden layer neurons, and the learning rate with the number of iterations, respectively, and Figure 7(a) shows the number of hidden layer neurons with the change of the number of iterations, which finally stabilizes at 4, and Figure 7(b) shows the variation of the learning rate with the number of iterations, which is finally stabilized at 0.0014.Figure 7
The process of PSO-LSTM model optimization iteration. (a) Hidden layer neurons, (b) learning rate.
(a)(b)The LSTM network model consists of an input layer, a hidden layer, and an output layer. The Adam algorithm is used to train the internal parameters of the LSTM, the tanh function is used for the activation function in the hidden layer, the rounding rate of the network nodes is taken as 0.2, the number of iterations is taken as 300 to prevent overfitting, the learning rate in the LSTM model is set to 0.0014, the number of neurons in the hidden layer is 4, and the first 18 hours of the day are also used as the training set. The first 18 hours of the day were used as the training set and the last 4 hours were used as the test set.The difference method is used for wind power data, only the rate of change in the series is considered to exclude the trend problem that the series has, and a rolling LSTM model is used for time series prediction of offshore wind power.In this paper, rolling PSO-LSTM model is selected to realize the prediction of offshore wind power in seconds, and the actual power curve and other models predict the power curve within 4 hours per second values as shown in Figure8, and the evaluation index of the prediction results is shown in Table 2:Figure 8
Comparison of 4-hour offshore wind power forecasts under different models.Table 2
Offshore wind power forecast errors under different models.
ModelyMAPEyRMSEyFAPSO-LSTM0.043%0.255%99.81%LSTM0.062%0.515%98.71%ARIMA0.090%0.655%98.06%By intercepting the data from 22:59:30 to 23:00:30, it can be seen that the LSTM second-level prediction model is closer to the real data, and the second-level power error is lower. The actual power curve under the intercepted partial time and the predicted power curve of other models are shown in Figure9, and the second-level power error of the prediction point samples under the intercepted partial time is shown in Figure 10:Figure 9
Offshore wind power forecast results of different models spotlighting on 23:00.Figure 10
Offshore wind power prediction errors of different models spotlighting on 23:00.The analysis shows that the PSO-LSTM prediction model has the lowestyMAPE but the lowest yRMSE index and the highest yFA, respectively, compared to the LSTM and ARIMA prediction models, indicating that the PSO-LSTM prediction model has better prediction results for the offshore wind power prediction problem with second-level time series wind speed variation.


## 4.1. Experimental Data Set and Experimental Environment

This paper uses an experimental environment with Windows 10 operating system, 8 GB of RAM, Intel (R) Core (TM) i3-9100F CPU @ 3.60 GHz, NVIDIA GeForce GTX 1650 GPU, and Python 3.8 language. Anacaoda 3 and Tensorflow 1.14.0 were used to write PSO-LSTM memory networks, LSTM and ARIMA, which are commonly used for time series prediction.To verify the scientificity and reliability of the offshore wind power prediction model proposed in this paper, the online monitoring data of second-level wind speed and second-level offshore wind power of offshore wind power in Jiangsu province in one day are used in the analysis of this paper. 105 offshore wind turbines with a rated power of 1500 kW are included in this wind turbine group, and the wind speed and offshore wind power of a unit are shown in Figure5:Figure 5
Second-level wind speed and offshore wind power.As can be seen from Figure5, part of the data shows that the power is less than 0, abnormal data need to be processed, and the offshore wind power of this unit has not reached half of the rated power, so it is judged that this wind speed and power relationship should be in the rising part, and the nonlinear fitting of the second wind speed and offshore wind power by Boltzmann equation is shown in Figure 6.Figure 6
Abnormal processing and fitting between second-level wind speed and offshore wind power.


## 4.2. Offshore Wind Forecast

The collected offshore wind power is normalized and fed into the LSTM network model as feature parameters, and two key parameters are optimized: the number of neuronsm and the learning rate rlr, and the particle fitness is taken as the average absolute percentage error of the prediction results, and the settings of the model parameters in the optimization process are shown as Table 1.Table 1
Parameter setting of PSO.
ParameterSettingTmax100npop30m value scope[1, 20]m search scope[−4, 4]rlr value scope[0.000 1, 0.01]rlr search scope[−0.001, 0.001]ωmax0.9ωmin0.4c1,ini2c1,fin0.5c2,ini0.5c2,fin2The optimization results of the number of hidden layer neuronsm and the learning rate rlr are shown in Figure 7: the laws of particle fitness, the number of hidden layer neurons, and the learning rate with the number of iterations, respectively, and Figure 7(a) shows the number of hidden layer neurons with the change of the number of iterations, which finally stabilizes at 4, and Figure 7(b) shows the variation of the learning rate with the number of iterations, which is finally stabilized at 0.0014.Figure 7
The process of PSO-LSTM model optimization iteration. (a) Hidden layer neurons, (b) learning rate.
(a)(b)The LSTM network model consists of an input layer, a hidden layer, and an output layer. The Adam algorithm is used to train the internal parameters of the LSTM, the tanh function is used for the activation function in the hidden layer, the rounding rate of the network nodes is taken as 0.2, the number of iterations is taken as 300 to prevent overfitting, the learning rate in the LSTM model is set to 0.0014, the number of neurons in the hidden layer is 4, and the first 18 hours of the day are also used as the training set. The first 18 hours of the day were used as the training set and the last 4 hours were used as the test set.The difference method is used for wind power data, only the rate of change in the series is considered to exclude the trend problem that the series has, and a rolling LSTM model is used for time series prediction of offshore wind power.In this paper, rolling PSO-LSTM model is selected to realize the prediction of offshore wind power in seconds, and the actual power curve and other models predict the power curve within 4 hours per second values as shown in Figure8, and the evaluation index of the prediction results is shown in Table 2:Figure 8
Comparison of 4-hour offshore wind power forecasts under different models.Table 2
Offshore wind power forecast errors under different models.
ModelyMAPEyRMSEyFAPSO-LSTM0.043%0.255%99.81%LSTM0.062%0.515%98.71%ARIMA0.090%0.655%98.06%By intercepting the data from 22:59:30 to 23:00:30, it can be seen that the LSTM second-level prediction model is closer to the real data, and the second-level power error is lower. The actual power curve under the intercepted partial time and the predicted power curve of other models are shown in Figure9, and the second-level power error of the prediction point samples under the intercepted partial time is shown in Figure 10:Figure 9
Offshore wind power forecast results of different models spotlighting on 23:00.Figure 10
Offshore wind power prediction errors of different models spotlighting on 23:00.The analysis shows that the PSO-LSTM prediction model has the lowestyMAPE but the lowest yRMSE index and the highest yFA, respectively, compared to the LSTM and ARIMA prediction models, indicating that the PSO-LSTM prediction model has better prediction results for the offshore wind power prediction problem with second-level time series wind speed variation.


## 5. Conclusions

In this paper, we propose an offshore wind power prediction method to improve the accuracy of offshore wind power prediction by considering the variation of wind speed in the second time series in conjunction with the current requirements of the rapid development of artificial intelligence technology and the gradual improvement of the accuracy of offshore wind power prediction. This paper obtains conclusions as follows:(1)
The PSO-LSTM rolling prediction model is used to analyze the wind speed and wind power at the second level, and the prediction of offshore wind power per second in the next 4 hours is completed.(2)
Using the characteristics of PSO-LSTM network applicable to time series, the PSO-LSTM rolling prediction model constructed in this paper has a large improvement in prediction accuracy compared with LSTM and ARIMA prediction models.(3)
With the rapid development of computer technology combined with the comprehensive use of big data platform, the model is applied to other prediction fields, which may uncover more effective information and thus improve the prediction accuracy and may provide theoretical guidance for the subsequent long-term offshore wind power accurate prediction.



---

*Source: 2009062-2021-11-25.xml*