Optimised yaw model for adaptive wind direction characteristic based on a data-driven approach

The wind direction characteristics of different wind turbines (WTs) in different wind farms are diverse and some may have obvious differences. The WTs are prone to ‘over-yaw’ and ‘under-yaw’ conditions adopting constant yaw threshold and the same control strategy, which reduces the utilisation efﬁciency of wind energy. This study makes statistics on the variation characteristics of the WT historical wind direction record data, and obtains the maximum probability angle of wind direction change that is used as the control error angle of yaw start (CEAYS). Then, the wind direction value is monitored in real-time, and the average wind direction change angle in the sliding window is calculated. When the deviation angle is larger than CEAYS, the characteristics of current wind direction are classiﬁed based on the clustering of historical wind direction, and a back-propagation neural network is used to predict the deviation angle of future short-term wind direction. The adaptive yaw strategy is constructed by CEAYS and deviation angle. The yaw calculation model is analysed and veriﬁed with the increase of power extraction and power consumption as the optimisation indexes. The calculation results show that each WT achieved an average 1% increase in power extraction.


INTRODUCTION
The last decade has witnessed the rapid development of wind power on a large scale in China as a clean energy source with mature technology. The major concern and focus of the wind power industry are: How to improve the rate of wind energy extraction and how to control the operation of the wind turbines (WTs) in the optimal state. As shown in Figure 1, the distribution of the wind speed and the frequency of the wind direction change are obviously different because of distinct regions, varied topography and various time. Therefore, diverse WTs (even if the same type) should adopt the yaw strategy (YS) with the adaptive wind speed and wind direction change characteristics.
As the brain of WTs, the control system affects and determines the generating efficiency and effectiveness of the WTs. Among the control system, the YS directly determines the WTs' utilisation efficiency of wind energy and indirectly affects the failure rate and the service life of the WTs [1].
This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited. © 2020 The Authors. IET Renewable Power Generation published by John Wiley & Sons Ltd on behalf of The Institution of Engineering and Technology WTs in active service generally adopt the unified YS currently. According to the set constant threshold, the yaw error angle Δ (the angle between the wind direction and the axis of the nacelle) and time-delay Δt (duration of wind direction remains constant) are the start-up conditions for start-up yaw [2]. As Δ > (7 ∼ 15) • and Δt > (60 ∼ 90s), yaw starts to reorient to the wind direction as shown in Figure 2. For the WTs located in the complex topography and the high frequency of the wind direction changes, the YS appears 'sluggish, leading to 'under-yaw'. But for the WTs located in flat terrain and small changes in wind direction, it is too 'urgent' and 'over-yaw' is often obtained. Both under-and over-yaw reduce the extraction efficiency of wind energy and affect the service life of the WTs [3,4].
In recent years, for the YS of WTs, YS with algorithms built to pursue the extreme value goal are as follows: Based on the hill-climbing algorithm, the YS adopts recursive call method to gradually improve and approach the maximum extraction power [5,6]. There is a YS based on the joint probability  Yaw strategy (YS) and control process distribution function of wind speed and wind direction, which is suitable to multi-peak extreme values [7]. Other effective YS algorithms have also been developed [8,9].
There is a YS algorithm based on the constant deviation angle of wind direction. When the wind direction changes in a large range, vane-control algorithm is adopted. When the wind direction range is less than 15 degrees, hill climbing algorithm is adopted. With 15 degrees as the critical angle, the small angle (< 15 • ) uses the neural network combined with the hill-climbing algorithm, and the large angle (> 15 • ) uses the neural network combined with the wind metre. [6,10].
Based on the predictability of continuous change of wind direction in a short-time range, a yaw model with a prediction of wind direction is introduced. A Kalman HC (KHC) yaw model uses Kalman-filtering [11][12][13]. A method combining gyroscope and the hill-climbing algorithm is adopted in [14]. Models such as support vector machine (SVM) and back-propagation neural network (BPNN) [15][16][17] are applied to predict the wind direction, decrease the yaw error and increase the extraction rate of wind energy [18]. Feng et al. [19] use machine-learning technology to predict wind direction and propose a two-layer hybrid wind power forecasting/wind speed forecasting method combined with deep-feature selection, which improved the prediction accuracy by nearly 30%. Noorollahi et al. [20] use three artificial neural network models (BPNN, radial basis function neural network and adaptive network-based fuzzy inference system) to study wind speed prediction from two dimensions of time and space. In addition, wind direction prediction can reduce yaw error [21] and minimise yaw error [22,23] as well as other wind speed prediction models [11,24,25]. These methods can reduce yaw error in different degrees.
Advanced prediction technologies make model predictive control (MPC) an effective method for controlling WTs. Spencer et al. [26] use MPC theory to control the yaw system by predicting the future wind direction with a preview time of 60 s. Hure et al. [27] implement the prediction model similar to Spencer et al. in their MPC controller. Song et al. [28,29] propose MPC yaw-control systems with a finite control set and use a multi-objective particle swarm optimisation (PSO)-based method to optimise the control parameters of the proposed MPC method. They also propose a yaw-control method based on the multi-step prediction layer [30].
Various yaw optimisation algorithms have an obvious effect on increasing the extraction power of WTs. However, excessive yaw counts reduce the performance of WT and the service life of the yaw system [31]; yaw start and stop times directly affect the comprehensive economic benefits of the WT. The proportion integration differentiation fuzzy controller is used to deal with the interference and uncertain factors in the yaw system [32][33][34], which can avoid the frequent start and stop of yaw drivers to some extent. According to the characteristics that alignment error of wind direction changes with wind speed, Wang et al. [35] propose an optimisation method for YS with wind speed in different sections. Chen et al. [36] propose a PSO-genetic algorithm for the purpose of comprehensive economic benefits of wind farms.
Wind farms in different terrains and their WTs in different locations require YS suitable to their own wind direction characteristics. However, the variable-speed and variable-pitch WTs with the largest installed capacity generally adopt yawcontrol algorithms with constant yaw error angle and time-delay [37]. Ideally, the WTs' yaw adapts to wind characteristics in real-time to maximise wind power. However, considering a series of problems associated with the yaw process, such as wear, vibration and loss of life, real-time yaw has no practical engineering significance and economic value [38]. So, what is the optimal YS? -yaw error angle and time-delay.
Most of the existing YS is used for online wind direction signal processing, which is a response to short-term and instantaneous wind direction and lacks the application of statistical rules of historical wind direction.
In this study, the increment and depletion of WTs power are taken as the objective function. First, the maximum probability of wind direction change angle Δ MP is found by statistical and the historical wind direction change frequency of the WTs. Next, the sliding window is applied to calculate the average value of real-time wind direction change Δ̄and the duration of window-sliding Δt ′ = (k + 1)T (k, sliding window length; T , wind direction recording period). Then, according to the current wind speed v and wind direction , the neural network model is used to predict the deviation angle Δ BP of the future short-time wind direction. Finally, the angle of yaw error Δ̄′ under the sliding window is calculated. When Δ̄> Δ MP and Δt > Δt ′ , yaw azimuth angle is calculated and yaw operation is carried out according to Equation (1) and as shown in Figure 2. The solid line (blue) shows the YS executed by the current WTs, while the dotted line (pink) describes the adaptive YS proposed in this study.
The yaw algorithm model proposed in this study gives up the same and invariable parameter threshold YS for all WTs, but makes full use of the characteristics of the WTs historical wind direction law and establishes the YS based on the wind direction value predicted by the WTs current wind direction. It is a YS based on big data mining of historical wind direction, a YS that adapts to the wind direction of the WTs, and a YS that becomes more and more accurate with the accumulation of wind direction data of the WTs:

DATA DESCRIPTION AND PRE-PROCESSING
The data in this study are selected from the SCADA dataset of a wind farm in Shaanxi Province of China. The wind farm is located in the hilly area of Qinling mountains, with complicated terrain and variable-wind direction. The WT often has 'underyaw' and 'over-yaw' conditions, so it is urgent to optimise YS. The rated power of WT is 1.5 MW and its SCADA system monitors and records more than 100 different parameters including wind speed, wind direction, nacelle angle, power output, temperature, current voltage and so on. Considering the instability or failure of the monitoring sensor and the data acquisition system, the noise data would be generated, and the data error will affect the accuracy of the calculation. Therefore, after the incomplete data is deleted, the 3σ principle should be applied to pre-process the outliers in order to ensure that the data used is complete, accurate and clean. The bad data being cleaned contain the data in the sensor failure or shutdown state. The bad data is treated as noise from all the data and needs to be culled. After all, data is preprocessed by the 3σ principle, 0.3% of the total data is removed and 99.7% is retained which can be regarded as the normal data.
As shown in Table 1, SCADA wind direction data of a complete cycle year from 01 October 2016 to 30 September 2017 were selected as modelling and test samples. And the data used are divided sequentially.

Wind direction and the yaw error
WTs are most efficient at generating electricity when the rotor is facing the incoming flow wind. But the wind direction is always changing. When the wind direction deviates from the axis of the nacelle, the yaw error will be produced. There are several reasons for yaw error: The wind vane installed at the rear of the nacelle may be biased, the rotor of a large wind turbine may turn slowly and not be able to respond to the rapid change of wind direction in real-time [39][40][41], and the yaw error may be caused by improper yaw management strategies [42]. The incoming flow of wind blows to the impeller at the azimuth angle . If the azimuth angle of the engine room axis is , the wind direction will deviate from the engine room axis ( = − ). In general, is the yaw error angle as shown in Figure 3.
The SCADA of WTs records the wind direction and the angle of the nacelle axis with the azimuth of (0 and 360 • ). The yaw  error angle ( ) is calculated as follows: When > 0, the nacelle turns counterclockwise to align with the wind direction otherwise it rotates clockwise.

Seasonal variation characteristics of wind direction
Because of the existence of monsoon, the wind-direction distribution frequency of the same wind farm and WT varies in distinct months and seasons. Table 2 counted the yaw counts per month and the time intervals of one WT of a wind farm in different seasons. Obviously, the yaw counts in autumn and winter are less than that in summer, which implies that wind direction in these seasons is more stable.

The change characteristics in time series of wind direction
The wind direction changes randomly with time. As shown in Figure 4, it is the SCADA data of wind direction in a wind farm during a period of 20 min. There is seldom a stable wind direction at the interval of 1 min, and sometimes the wind direction changes greatly.

Wind-direction variation characteristics of WTs
Even in the same season and month, different WTs have disparate yaw counts and the time interval of yaw. Table 3 lists the yaw data of three WTs in one month of summer, autumn and winter. It can be seen that the yaw counts of the three WTs were similar in July, and the diversity in the time interval of yaw between the three WTs is small. In September, the yaw counts have a huge difference. The time intervals of yaw are similar in December, but the yaw time interval of WT #A6-080 is nearly 2 min more than the other two WTs.

FIGURE 5
The distribution of the wind speed and direction

Working conditions analysis
The wind direction-monitoring data of the WTs during the whole year (from 1 October 2016 to 30 September 2017) are statistically analysed, and the results are shown in Table 4 and Figure 5. As shown in Figure 5, about 60.93% of the WTs running time is under working condition II. because of the larger wind direction change, longer running time and greater power generation; condition II is the main wind speed section of the yaw optimisation.
Working condition I is classified as the low-wind speed section, characterised by lower wind speed, shorter running time, and lower wind energy density. In actual operation, it does not seek the accuracy of the yaw control in order to avoid reducing the service life of the mechanical system with the frequent yaw.
Working condition III is classified as a high-wind speed section, where the wind speed is greater than the rated wind speed, and the wind direction tends to be stable. In addition to considering the yaw alignment of wind direction, it is also necessary to consider reducing the fluctuating load and

Wind direction change angle of maximum probability
Due to different distribution locations, the wind direction change angles of the historical maximum probability density (Δ max ) of different WTs are different. Replacing the traditional uniform constant value, the extreme value of the probability density of wind direction change of WTs is selected as yaw-starting and -stopping conditions. This value is more aligned with the respective wind conditions and the state of WTs, and it is able to improve the wind conversion efficiency of WTs.
The wind direction change angle corresponding to the extreme value of the Δ max is the most extensive wind direction change angle of this WT, namely, the mode.
According to the wind direction azimuth value recorded by SCADA in a period of 1 min, the probability density of wind direction changes of the sample (one month) was calculated and depicted as shown in Figure 6. According to the Δ max , the corresponding angle of wind direction change is obtained.
The Δ max of 1-min time interval is not convincing and representative enough to represent the wind direction change characteristics of the whole WT. So, the study also calculated the Δ max at different time intervals from 1 to 15 min as shown in Table 5 and Figure 7.
In Figure 7, wind direction change angle at different time intervals fluctuates within a small interval (9.37, 9.46) with little change. Except for data with a 1-min time interval, data with other time-frequency is also obtained by calculating the 1-min value. Obviously, the sample value and the number of samples at different time intervals have changed, and the maximum probability angle obtained from the statistics will also be different. According to Table 2, the maximum time interval of yaw of WT 77 is 12.9 min. Therefore, the average angle of the wind

PREDICTION OF THE FUTURE DEVIATION OF WIND DIRECTION
When the yaw error angle satisfies Δ̄> Δ MP = 9.42 • , the yaw system will be started. The next key point is the yaw angles of deflection requirements. It should not be a constant angle of 9.42 degrees, rather, it should be a changing angle related to the tendency of the current wind direction, that is, a prediction angle related to the changing characteristics of historical wind direction.

Wind direction deviation angle prediction model
The wind direction variation angle [Δ i ,Δ i+1 ,…,Δ i+9 ] of the 10 continuous wind direction-sampling data is taken as the input as shown in Figure 8(a). The BPNN model is constructed as shown in Figure 8(b). The network prediction will give Δ BP , which is the forecast deviation angle of the wind direction at the next moment.
Compared with the wind direction at the previous sampling time, the wind direction has three rotational variation directions, including anticlockwise, invariant, and clockwise directions as shown in Figure 9(b). There are also three kinds of wind direction (Δ ): Homodromous, invariant, and reverse as shown in Figure 9(b). The intensity of wind direction change (Δ ) can be divided into three, five, or seven levels as shown in Figure 9(c).
For the variation types of 3*3 = 9, 5*5 = 25, and 7*7 = 49 consecutive samples, the K-means clustering method is used to classify the angle of wind direction change of 10 consecutive sampling values. Figure 10 shows the clustering results of wind direction change of nine types.
The classification results of wind direction into nine types can be distinguished in variation trend and value, but similar classification results can still be obtained. After obtaining the classification results of nine types, the proportion of the sample size of each category in the total number of samples was further calculated as shown in Figure 10.
As shown in Figure 11, the proportion of 1 to 4 types of samples is significantly larger, indicating that such wind direction variation is relatively common. Further, K-means clustering is carried out for samples of categories 1 to 4 to obtain the proportions of categories A, B, C and D. Their respective samples are shown in the upper right corner of Figure 11, and various wind direction variation characteristics are shown in Figure 12.
The classification results of different categories in Figure 12 are significantly distinct in variation trend and value, which indicates a fine classification effect. The proportion of all kinds of other samples is different, and there is no obvious difference. This ensures that each category is classified based on sufficient sample size.
Following the above method, the clustering results of 25 and 49 can be calculated. The clustering results of 9, 25 and 49 species are compared, and the clustering results of 9 species are selected as the predicted samples in this study to ensure the number of clustering results of each species.
The centre of mass of the cluster points represents the average value of wind direction change, and the positive and  Table 6.
Then, according to the 10 successive sample values [Δ i , Δ i+1 , … , Δ i+9 ], the minimum difference between the average values of each type of centre of mass in Table 6 is calculated as min( . The current wind direction change is classified into one of the categories of A, B, C or D. Then, the wind direction (Δ BP ) is predicted.

5.2
Wind direction change angle prediction

Wind direction prediction based on BPNN
BPNN is applied to predict the angle of wind direction change. The main input parameters are shown in Table 7. Ten thousand sets of wind direction records are selected as training samples, and 500 sets of data are used as test samples. As for the predicted results obtained by BPNN, the distribution of the actual value and the predicted value The proportion of various sample sizes  of the test sample and its error distribution are shown in Figure 13. The difference between the actual wind direction change angle (Δ ) and the predicted wind direction value (Δ BP ) at the next moment is recorded as the prediction error of wind direc-

FIGURE 13
The actual value and the predicted value of the test sample and its error distribution

FIGURE 14
The actual value and the predicted value of the test sample and its error distribution tion change Δ =|Δ − Δ BP |. As can be seen from Figure 13, the proportion of the sample number Δ > 10 • is lower than 10% of all samples, indicating that BPNN has high-prediction accuracy.

Wind direction prediction based on SVM
Similar to BPNN prediction in Section 5.2.1, 2500 groups of record points of a certain type are selected as training samples, and 500 groups of record points are selected as test samples. The predicted angle value of wind direction, obtained by using SVM, is distributed with the actual measured value of wind direction. The error distribution between the actual measured value and the predicted value of wind direction is shown in Figure 14.
A comparison between Figures 13 and 14 will yield that both BPNN and SVM have certain accuracy when the prediction sample size is small. Due to the complexity of SVM's calculation principle, when the prediction sample size increases, the computation period will become very long. Therefore, BPNN is more suitable for wind direction prediction.

Sampling frequency and prediction accuracy
The time interval of wind direction data affects and determines the accuracy of wind direction prediction. The BPNN algorithm is used to predict the wind direction of the data with a sampling interval of 1, 5 and 10 min, respectively. The predicted results are shown in Figure 15. Table 8 lists the predicted average error values that are obtained from wind direction data of different sampling frequencies. Obviously, the prediction results with a sampling frequency of 1 min were significantly better than those with a sampling frequency of 5 and 10 min. Values of the parameters 10 30 1 10,000 10 -8 10 -5 Sigmoid

FIGURE 15
Error value of the wind direction change with three sampling frequency Therefore, the 1 min SCADA data is used to predict the wind direction change in this study.

YAW ANGLE OPTIMIsATION MODELLING
In general, for megawatt WT, when the yaw error is larger than the set threshold, the yaw mechanism is activated. Yaw speed is generally designed as 0.2-0.8 deg/s.

YS with constant window length (CWL)
The yaw-control algorithm is shown in Figure 16. The control logic is as follows: the 60 s is used as the time-period to monitor the yaw error in the sliding window. When the cumulative yaw error of 10 min reaches a certain deviation angle (e.g. 10 • ), yaw is performed to the yaw error angle position.

YS of YS-VWL:
The window length of YS-CWL does not change with the change of fluctuation amplitude in the wind direction, so yaw cannot be started in time. Therefore, this study proposes YS-VWL. YS-VWL compares the average value (Δ̄( j )) of wind direction change in the sliding window with the wind direction change value (Δ MP ) of maximum probability. The yaw will be started when Δ̄( j ) > Δ MP . The starting point of the sliding window is the end-point of the last yaw, and the length of the window increases with the increase of the monitoring value until the average value in the window reaches the maximum value (Δ MP ).
As shown in Figure 17, the sliding window is a window in the timing sequence of wind direction monitoring, which starts 1.
(2) Yaw angle of relative minimum error: Due to the volatility and randomness of the wind direction, it is not an ideal choice to predict the wind direction directly for yaw. In this study, the predicted value and the historical wind direction value are taken into account. The value of historical wind direction is discussed below.
As shown in Table 9, the predicted value of BPNN is calculated, and the average value of the predicted value of BPNN and the sum of the historical wind direction change can be obtained by Equation (4) (assuming the measured value of seven-time series) to get the average yaw (month) error (the difference between the calculated value and the measured value). Because of the change of wind direction and wind speed in each month, the corresponding yaw counts are obviously different, so the yaw error is normalised as shown in Figure 18. Table 9 shows that the deviation of the yaw angle is smaller than that of the direct prediction angle when the average value of forecast and historical wind direction change is used as the yaw angle. As in Figure 18, when i ≥ 5, the error curve of the current three months (June, July and August) begins to converge, and the error changes tend to be 0. Therefore,i=5 is taken in this study to calculate the number of historical wind direction measured at the yaw angle.  According to the flowchart in Figure 19, the optimisation parameters Δ Δ̄ Δ BP of yaw models are calculated to get the yaw angle = x + Δ̄′.

6.2
Analysis of yaw optimisation results

Comparative analysis of results of WTs between YS-CWL and YS-VWL
By using the wind direction data of 500 points from WT#A6-077 in June, the two proposed yaw models are simultaneously simulated in parallel with each other. As shown in Figure 20, the cumulative yaw error has been calculated during the simulation.
In Figure 20, all curves of nacelle position under two yaw models show similar trends. It indicates that all two yaw models are in normal working conditions. However, it is distinct in yaw error, yaw counts, yaw time and power generation between the two yaw strategies. It can be found out that between the two yaw strategies, YS-VWL has the lower cumulative yaw error and higher power generation. YS-CWL has fewer yaw counts and less yaw time.
To further evaluate the performance of two yaw models, the resulting percentage of the two methods are compared. For the YS-VWL, the yaw count and yaw time are higher than in YS-CWL by 23.7% and 9.1%, respectively. Meanwhile, compared to YS-CWL, the YS-VWL reduces the cumulative yaw error by 21.6% and increases the power generation by 0.52% (shown in Table 10). These numerical data well justify YS-VWL in terms of maximising wind power extraction.
The above observations show that YS-VWL is noticeably superior in terms of performance of wind power extraction with a moderate yaw actuator usage. In the next section, the results

FIGURE 21
Comparison diagram before and after YS optimisation of the yaw method using the YS-VWL are compared with the original WT results. Figure 21 shows, respectively, the variation of wind direction, WTs direction and yaw before (under original YS) and after optimisation (under YS-VWL) for the WT#A6-077, WT#A6-080 and WT#A6-082 typhoon-generating WTs from 2:00 AM to 4:00 PM on 01 June 2016. Figure 22 shows the yaw error distribution before and after optimisation.

Comparison between the original YS of WTs and the optimised results
When the wind direction changes and fluctuations are relatively stable as shown in Figure 21(a), the yaw counts after optimisation are slightly less than that before optimisation. When the wind direction changes and fluctuates greatly as shown

FIGURE 22
Optimise before and after yaw error distribution in Figure 21(b), the yaw counts after optimisation are slightly higher than that before. According to the comparison of yaw errors, the yaw direction optimised by YS-VWL is closer to the actual wind direction, which improves the accuracy of wind alignment as shown in Figure 22. It can be seen that since YS-VWL is introduced in the prediction method, the short-time wind direction can be predicted in advance to improve the yaw accuracy.

Comparison of optimisation effects of different wind farms
Three WTs of each wind farm in two different regions (wind farm A, located in western China, mountainous terrain; wind farm B, located in northern China, flat terrain) are randomly selected, calculating the power generation of YS-VWL before and after optimisation, respectively. The result is shown in Table 11. Apparently, all the WTs' power generation at both wind farms has been improved.
At the same time, it is found that wind farm A with complex terrain has a more obvious effect after YS-VWL optimisation. The growth rate of over 1% may be related to the large wind direction change frequency. For wind farm B, due to the stable wind direction, the original yaw error is small, with a growth rate of less than 1%. It shows that this algorithm is more suitable for yaw optimisation of wind farms with complex terrain.

CONCLUSION AND FUTURE CHALLENGES
In order to effectively operate the yaw system of WT, a YS based on historical wind direction data and real-time wind direction prediction is proposed. After studying the wind direction variation characteristics and rules of WTs, the historical samples are analysed and combined with BPNN, and a wind direction prediction model is formed. A yaw angle adapting to the current wind conditions (wind direction, wind speed) is formed by comprehensively considering the real-time monitoring and prediction of wind direction. A new wind YS (YS-VWL) is proposed by using the VWL to track the wind direction change. This YS also takes the historical maximum probability change of wind direction as the threshold value. YS-VWL is a YS of real-time tracking wind direction.
A simulation experiment is carried out with the supervisory control and data acquisition (SCADA) data of a wind farm in Shaanxi Province of China to verify the superiority and applicability of the YS. The comparison results show that YS-VWL is obviously better than YW-CWL, and 1% more power generation is extracted than YS of the original WTs, which is more valuable.
Although encouraging results have been obtained by the proposed YS-VWL, there are some uncovered issues to be addressed in future studies such as adopting a machine-learning prediction method that is more suitable for time series and introducing an adaptive algorithm to adjust the parameters according to different wind conditions. Due to the experiment under the current laboratory conditions, it cannot reflect the actual operation state of the WTs. It is better to take the experiment with the WTs in an actual environment. But conducting an actual experiment will affect the normal production of a wind farm, so we did not carry out experimental verification this time. We will work on that in our next research.

Nomenclature
ANFIS adaptive network-based fuzzy inference system ANN artificial neural network BPNN back-propagation neural network CEAYS control error angle of yaw start