Robust Fault Detection of Wind Energy Conversion Systems Based on Dynamic Neural Networks

Occurrence of faults in wind energy conversion systems (WECSs) is inevitable. In order to detect the occurred faults at the appropriate time, avoid heavy economic losses, ensure safe system operation, prevent damage to adjacent relevant systems, and facilitate timely repair of failed components; a fault detection system (FDS) is required. Recurrent neural networks (RNNs) have gained a noticeable position in FDSs and they have been widely used for modeling of complex dynamical systems. One method for designing an FDS is to prepare a dynamic neural model emulating the normal system behavior. By comparing the outputs of the real system and neural model, incidence of the faults can be identified. In this paper, by utilizing a comprehensive dynamic model which contains both mechanical and electrical components of the WECS, an FDS is suggested using dynamic RNNs. The presented FDS detects faults of the generator's angular velocity sensor, pitch angle sensors, and pitch actuators. Robustness of the FDS is achieved by employing an adaptive threshold. Simulation results show that the proposed scheme is capable to detect the faults shortly and it has very low false and missed alarms rate.


Introduction
Nowadays the economy and daily life rely on power distribution networks, such that occurrence of a fault in any components of them can affect performance of the overall system. In general, a fault is a phenomenon that changes the behavior of a system in such a way that it is not able to perform its tasks [1]. A feature, which is very important for every structure, is reliability and it can be insured by removing the earlier weaknesses and faults. One way to achieve reliability is implementation of condition monitoring systems and FDSs. Recently, the problem of fault detection for industrial applications, namely, applications where lives are not at risk, has gained extreme importance. In such systems, user satisfaction and economic issues are important. Among these systems, electrical machines [2,3], power systems, building ventilation systems, and WECSs [4][5][6][7][8][9][10][11][12][13][14][15] can be mentioned. Repair actions can be performed in a timely manner without the need for an immediate action and this fact is extremely important for off-shore plants where bad conditions (such as storm) can delay any repair operation for several weeks [16,17]. Although initially FDSs implementation requires investment, producing energy continuously without any interruptions will compensate for initial investment costs. Hence, an FDS for a WECS has advantages such as avoidance of premature breakdown, reduction of maintenance costs, supervision at remote sites, remote diagnosis, improvement of the capacity factor, and support for further development of a WECS [16].
In general, fault detection techniques can be categorized into two categories: hardware redundancy (HR) and analytical redundancy (AR). Furthermore the AR techniques can be classified as quantitative model-based methods and qualitative model-based ones. In recent years, extensive researches have been performed on quantitative model-based methods [18,19] and qualitative model-based methods [20][21][22]. Generally these methods can be classified as observerbased, signal processing, expert system, and artificial intelligence approaches. Over the past two decades, artificial neural networks have been studied extremely by researchers and they have been used successfully for modeling and control of dynamical systems [20,23]. Also they were used to design FDSs [20,22]. Among the many structures for neural networks, two notable structures are the feedforward and recurrent ones. Feedforward networks are used typically 2 Computational Intelligence and Neuroscience for pattern recognition purposes, while recurrent ones are used to prepare dynamical model of a process. Among neural networks that have been used frequently in FDSs, multilayer feedforward neural networks (MFNNs), radial basis function neural (RBFN) networks, and globally and locally recurrent networks can be mentioned.
In structure of recurrent neural networks, dynamic neurons replace the standard ones. In one type of dynamic neurons, the dynamics are applied by introducing an IIR filter into the neuron structure. This network structure does not have any global feedbacks. In fact, this network has a structure that is somewhere in between a feedforward and a globally recurrent structure [20]. The recurrent neural network with a neuron model using the IIR filter has been used successfully for modeling, fault detection, and time series prediction. In [20,24] this kind of network was used for fault detection of a sugar evaporation process. Also in [20], applications for fault detection by using the mentioned network were presented. This network was utilized to detect faults in a fluid catalytic cracking and a DC motor. In [2], this network was used for fault detection and isolation of induction motors. In [25], by using this network, an FDS for protecting and monitoring systems of power networks was designed in such a way that reliability of the power grid has risen up. In [26], by combining the RBFN and the neuron model with the IIR filter, a network was proposed and it was used to predict time series. In [27,28], it was utilized to predict both the wind speed and power in wind farms. Finally, in [29], it was used to detect faults of a turbocharger.
In addition, fault detection of the WECSs has attracted the attention of many researchers in recent years. For instance, in [4,7], using a linear model of mechanical parts of a wind turbine (electrical parts were neglected), a fault-tolerant controller was presented by utilizing the linear parameter varying control which was replaced with the reference controller. In these two researches, the occurred faults were diagnosed and then the controller was reconfigured. In [5], fault detection of a wind turbine was performed using the linear model of the mechanical parts and only occurrence of a fault was considered. In [6], faults of the induction generator were considered. Also the linear model of the mechanical parts was used to detect two categories of faults using the Kalman-filter in [8]. Utilizing the supervisory control and data acquisition (SCADA) in [9], the occurred faults in a wind turbine were detected. In [10] by using the data-mining approach, bearing faults were detected. In [11], utilizing the real data obtained from a condition monitoring system, faults of the braking system of a wind turbine were detected. In [12], a fault tolerant controller was proposed using fuzzy observers. In [14], utilizing the Set-Membership approach and a model for the mechanical parts, various faults of a wind turbine were detected. Also in [15] numbers of faults were detected using a model for the mechanical parts and the counter-based residual thresholding method.
As it is obvious, in researches that have been performed so far, either a small number of faults have been studied, or the WECS has not been modeled completely, or the linear models have been used to design the FDS. It is obvious that using the more accurate nonlinear model will lead us to the results which are closer to the real ones. Another important issue is robustness of the proposed scheme. Robustness can be achieved either by active approaches or by passive ones [20]. Active approaches consider the desired robustness from the beginning of the design procedure [30][31][32], while passive approaches utilize adaptive thresholds architecture in decision making block to achieve the desired robustness [20]. In this paper, by utilizing a comprehensive nonlinear model of the WECS, an FDS is suggested which has the capability to detect faults in the generator's angular velocity sensor, pitch sensors, and pitch actuators. The presented FDS is composed of the dynamic neural network with the IIR filter as the dynamic neuron model. Additionally, an adaptive threshold is employed to achieve the anticipated robustness. The proposed FDS can be utilized to detect the faults in other parts of the WECS.
The structure of this paper is organized as follows: dynamic model of the WECS is presented in Section 2. In Section 3, the RNN with the IIR filter as neuron model is introduced. Section 4 presents the design procedure of the FDS. In Section 5, the robustness of the proposed FDS is investigated.

Dynamic Model of the WECS
The block diagram of the considered model in this paper is shown in Figure 1. In this figure, the yaw mechanism is neglected and wind speed is the exogenous input. The aerodynamic torque of the turbine's rotor, ( ), is transferred to the generator through the drive train. The drive train includes a high speed shaft, a low speed shaft, and a gearbox. The induction generator converts the mechanical energy to the electrical one and is connected to the power grid. An interface is used for calculation of the active and reactive generated power. The grid model includes a local load, transformers, transmission lines, and the infinite-bus at the end. Converters, a dc link, rotor, and grid side controllers are modeled in this study.
Equations for modeling of the mechanical parts of the WECS are as follows [4,[33][34][35][36]: where in (1), which is related to the modeling of the wind, By drive train, the aerodynamic torque is transferred to the generator. The gearbox scales up the rotational speed to the required generator's angular velocity by a factor that is called gear ratio. Equations (4) are used to model the drive train which includes a low speed shaft, a gearbox, and a high speed shaft. In these equations, is the inertia of the rotor, is the torque acting on the low speed shaft, is the turbine's rotor speed, is the spring stiffness coefficient of a massless viscously damped rotational spring, is viscous damping parameter, is the gear ratio, is the inertia of the gearbox, high speed shaft, and generator, is the generator torque, and is the rotational speed of the generator's rotor. Consideṙ= The thrust makes the tower to sway back and forth. The tower is modeled by a mass-spring-damper according to (5). In this equation, ℎ ( ) is the force acting on the tower at hub height, is the tower damping coefficient, is the tower spring coefficient, is the top mass of the tower, and ( ) is the displacement of the nacelle from its equilibrium position. The swaying of the tower changes the effective wind speed seen on the turbine's rotor. The rotor effective wind speed is modeled using (6). Consider the following: The pitch system is a hydraulic system and it can be modeled using (7) where ref ( ) is the reference pitch angle, is the natural frequency of the pitch actuator model, and is the damping ratio of the pitch actuator model. Equation (7) explains the operation of the pitch actuators when it operates within limitations, so physical limitations should be considered in modeling: Equations for modeling of the electrical parts of the WECS are as follows [37][38][39]: Equations (8) are stator and rotor voltages of the induction machine in the synchronous reference frame. In this model, the synchronous reference frame was used to transform variables from the frame to the reference frame. All electrical variables are referred to the stator. In these equations, and are stator and rotor resistance, respectively, is the synchronous angular velocity, is the electrical angular velocity, and are the stator and 4 Computational Intelligence and Neuroscience axis fluxes, and and are the rotor and axis fluxes. Consider the following: Also the stator and rotor fluxes are expressed by (9), where = + is the total stator inductance and = + is the total rotor inductance. The electromagnetic torque is expressed by (10) where is the number of pole pairs. Consider Two equations of the mechanical parts of the machine are as (11) where is the combined rotor and load inertia constant, is the combined rotor and load viscous friction coefficient, is the mechanical torque, is the angular velocity of the rotor, and is the rotor angular position: Equations (12) can be used to model the grid side converter (GSC) and DC link capacitor, where and are the resistance and inductance of the circuit between the GSC and the grid, is the DC link capacitance, is the capacitor voltage, is the active power exchanged between the rotor and the rotor side converter (RSC), and is the output active power of the GSC: The WECS contains three categories of controllers: RSC controller, GSC controller, and pitch angle controller. To control the RSC, the following equation can be used [39] where control voltages and can be obtained using the PI controllers. These voltages are calculated by comparing and currents with reference * and * as follows: where 1 is the proportional gain and 1 is the integral gain of the PI controller. The following equations can be used to control the GSC [39]: where the control voltages and are obtained using the PI controller as follows: The pitch angle controller is responsible for increment or decrement of the pitch angle and it can be implemented by a PI controller. This controller acts on the difference between the reference angular velocity and the measured angular velocity of the generator. In modeling of the WECS, it is usual to neglect the dynamics of the sensors, because they are much faster than the dynamics of the wind turbine. The only expectation is the anemometer which is modeled as a firstorder low-pass filter with a half a second time constant [3]. In this study, all measured signals were emulated by adding zeromean Gaussian distributed noise to deterministic values.

Dynamic Neural Network
In recurrent neural networks, the dynamic neurons replace the standard static ones. In the structure which is utilized in this paper, dynamics are created by introducing an IIR filter into the neuron architecture where the neuron reproduces its own past inputs and activations by using the input signal ( ), for = 1, 2, . . . , and the output signal ( ). The structure of the considered neuron model is shown in Figure  2. First the weighted sum of inputs is calculated according to the following equation [20,29]: The weights of this network are such as the weights of static feedforward networks. The weights and activation function are responsible for approximation properties of the model. The IIR filters are linear dynamic systems of different orders which consist of feedback and feedforward paths weighted by the weights , = 1, 2, . . . , and , Computational Intelligence and Neuroscience = 0, 1, . . . , , respectively. The behavior of this linear system can be expressed by the following equation: where ( ) is the filter input and ( ) is the filter output.
Eventually the output of the neuron is obtained by the following equation: where (⋅) is a nonlinear activation function and 1 and 2 are the bias and the slope parameters of the activation function.
There are different methods to train these networks; the three major methods are extended dynamic back propagation (EDBP), adaptive random search (ARS), and simultaneous perturbation stochastic approximation (SPSA). Each of these methods has its own advantages and disadvantages. The ARS method was used in this paper to train the network. The advantage of this method is that it is easy to implement and it has very wide applicability. The information required to implement this method is only the input-output data, where the parameters' vector is the input and the cost function ( ) is the output. All network parameters can be represented by the parameters' vector . The main purpose of training is to adjust the elements of the vector so that the cost function is minimized as follows [20]: where * is the optimal network parameter vector, : R → R 1 is the cost function to be minimized, is the dimension of the vector , and C ⊆ R is the constraint set defining the permissible values for the parameters . The cost function can be defined as follows: where ( ) and ( ; ) are the desired output of the network and the actual response of the network on the given input pattern ( ), is the dimension of the training set, and is the iteration index. The above cost function should be minimized based on a given set of input-output patterns. In the ARS method, it is not required to compute the gradient of . Table  1 represents the ARS training algorithm [20]. Assuming that the sequence of solutionŝ0,̂1, . . . ,̂is obtained already, to achieve the next point̂+ 1 , the following equation is used [20]: wherêis the estimate of * at the th iteration and is the perturbation vector generated randomly according to the normal distribution N(0, V). The new solution̂+ 1 is accepted when the cost function (̂+ 1 ) is smaller than (̂), otherwisê+ 1 =̂. In order to start the optimization process, it is necessary to specify the initial valuê0 and the variance . Assuming * is a global minimum that should be found, when̂is far away from * , should have a large variance to allow large displacements. This causes to escape local minima. However, when̂is close to * , should have a small variance to allow precise exploration of the parameter space. Far from its convenience of training, the algorithm has the global convergence property and adaptive parameters of the algorithm reduce the possibility of trapping in local minima [20].

FDS Scheme
In this research, among the possible faults of the WECS, the pitch sensors, generator's angular velocity sensor, and pitch actuators faults were studied; because according to the information of the fault analysis which is given in [4], these three categories of faults have more severity and occurrence indices than the other faults. Internal faults of the generator and converter were not studied in this research in order to prevent the research from becoming too complex and extensive. It is also assumed that no fault has occurred in the control systems of the WECS and they continue to function properly. Thus it can be said that the normal operation conditions of the WECS are as follows: (i) the control systems are healthy; (ii) any type of faults has not occurred in the WECS; (iii) any fault has not occurred in the power grid connected to the WECS.
Also the faulty operation conditions are as follows: (i) the control systems are healthy and they continue to act normally when a fault has occurred; (ii) one of the faults in the pitch sensors, pitch actuators, or generator's angular velocity sensor has occurred; it 6 Computational Intelligence and Neuroscience Step Operation (1) Initialization phase:̂0, max , 0 and min should be selected and = 1,̂b est =̂0; (2) Variance selection phase: The trial point algorithm is executed; = + 1; end = + 1, = 1,̂=̂0; end (3) Variance exploration phase: The trial point algorithm is executed; Break; elsê0 =̂b est , = + 1 and go to Step 2.; end The trial point algorithm: best =̂; best = ; end is assumed that these faults do not occur at the same time; (iii) any fault has not occurred in the power grid connected to the WECS.
In design of the FDS, studying the two signals of the generator's angular velocity and pitch angles causes to detect the faults in the pitch system and generator's angular velocity sensor. According to the model of the WECS, both mentioned signals can be considered as a nonlinear function of the turbine's rotor speed and the measured wind speed. These two measurements are available from the healthy sensors. Because the closed-loop control system performance varies under different wind speeds, the wind speed is regarded as an input of the nonlinear functions. So the following relations can be considered: where ℎ 1 (⋅) and ℎ 2 (⋅) are nonlinear functions. Thus according to the measured values of the signals in the input of these functions, their outputs can be estimated by the mentioned dynamic neural network. These neural models can be used to emulate the normal system behavior. The neural models are then placed in parallel with the system and fault detection is acquired by comparing the outputs of the neural models with the real system outputs. First, the generator's angular velocity is modeled by neural network. The process to be modeled is described by (23). This process has two inputs and one output. The training process was carried out off-line using the ARS algorithm. The learning set consisted of 1000 samples for different mean wind speeds whilst the testing set consisted of 2000 samples for the mean wind speed of 16 m/s. First these samples were converted to the p.u. according to their base values and then the p.u. values were used to train the network. The best model was selected by using two information criteria. These criteria are the Akaike information criterion (AIC) and the final prediction error (FPE).
The AIC determines the model complexity by minimizing an information theoretical function, AIC , which is defined as follows [20]: where is the sum of squared errors between the desired output, , and the network output , is the number of samples used in the computation of , and is the number of model parameters. Another criterion is the FPE, which selects the model order minimizing the function FPE, FPE , which is defined as follows [20]: The results of the appropriate network structure selection to model are presented in Table 2. In this table is the number of network parameters, is the sum of squared errors, and ,V, ( ) represents the layered dynamic neural network with inputs, V hidden neurons, and outputs in which neurons are of the order of the IIR filters. The best results (marked with the bold text) were obtained for the 2 2,3,1 (2) structure for the training set. However, for the testing set, 2 2,3,1 (1) structure shows better performance. Eventually the 2 2,3,1 (1) architecture, which corresponds to the minimum criteria in testing, was selected as optimal to model behaviors of , because this structure has better generalization capability than the one selected for the training set. Each neuron of the dynamic network model has the hyperbolic tangent activation function and is of the first order of the IIR filter. Figure 3 shows the comparison of the real and the estimated by the designed dynamic neural network in the normal operation conditions. As it is obvious, the designed neural network estimates desirably and estimation error is minimal. All simulations were carried out in Matlab/Simulink version R2008a environment. The parameters of the system are presented in the appendix.
In order to form the FDS of the generator's angular velocity, two types of faults were considered which will be discussed below. In the basic FDS, the constant threshold was used to evaluate the residual signals. This threshold level was considered equal to ±4 rad/s. In the first simulation, the +2% abrupt proportional fault was introduced at time instant 30 s for duration of 20 s and the −5% abrupt proportional fault was introduced at time instant 70 s for duration of 20 s. Figure 4 shows the simulation result in this case.
According to Figure 4, in the case of the generator's angular velocity deviation from its healthy value, a residual is obtained by neural model estimator which is compared with the threshold level; hence the fault occurrence is detectable. In this figure, between the moments of 30 to 50 seconds and 70 to 90 seconds, the obtained residual passes the ±4 rad/s threshold level and this event indicates that a fault has occurred in the generator's angular velocity sensor. As a result, it can be argued that the FDS has the capability of detecting the abrupt proportional faults in the generator's angular velocity sensor. The second simulation was performed when an incipient proportional fault occurred in the generator's angular velocity sensor. In this case, output of the generator's angular velocity sensor was deviated from its real value at time instant 30 s until it reached to 1.1 times greater than its real value at time instant 90 s; that is, during 60 seconds, an incipient fault was introduced in the generator's angular velocity sensor. In this case, the simulation result is presented in Figure 5. According to Figure 5, the FDS has the ability to detect the introduced incipient fault at time instant 40.7 s. It means that it takes about 11 seconds until the FDS detects this type of fault which is so desirable in detection of incipient faults. According to the obtained results for the abrupt proportional fault, incipient proportional fault, and fixed output fault (which is a special case of the incipient fault), it can be concluded that the designed FDS can detect faults well in different wind speeds (which affects the dynamics of the system). This FDS has capability of the early detection of faults. The significant point in this system is a very low number of false alarms which is desired in any FDSs. 8 Computational Intelligence and Neuroscience   The next phase in design of the FDS is related to the pitch system fault detection. In the pitch system, the pitch sensors and actuators are subjected to the faults. Therefore, the pitch system should be modeled by neural network. The process to be modeled is described by (24). The training process was carried out off-line using the ARS algorithm. and then the p.u. values were used to train the network. The best model was selected by using the AIC and FPE criteria.
The results of the appropriate network structure selection are presented in Table 3. The best results were obtained for the 2 2,3,1 (2) structure for the both training and testing sets. Thus, the 2 2,3,1 (2) architecture was selected as optimal to model behaviors of the pitch system in the normal operation conditions. Each neuron of the dynamic network model has the hyperbolic tangent activation function and is of the Computational Intelligence and Neuroscience second order of the IIR filter. Figure 6 shows the comparison of the real 1 and the estimated 1 by the designed dynamic neural network in normal operation conditions. As it can be seen, the estimation error is minimal and the designed neural network has good ability to mimic the pitch angles behaviors. In order to form the FDS of the pitch system, three types of faults were considered. Faults of the pitch system were categorized such that an increase in the output of the blade 1 pitch sensor (positive bias) was considered as the category 1, a decrease in the output of the blade 1 pitch sensor (negative bias) was considered as the category 2, and faults of the pitch actuator which were modeled by changing the and were considered as the category 3. To study the residual signal, the +0.75 ∘ bias fault was introduced at time instant 30 s for duration of 10 s, the −1 ∘ bias fault was introduced at time instant 50 s for duration of 10 s, and the pitch actuator fault which is an abrupt fault was introduced at time instant 70 s for duration of 30 s. Figure 7 shows the residual signal under these conditions. In the basic FDS, the constant threshold can be used to evaluate the residual signal. This threshold level was considered equal to ±0.3 ∘ . As it can be seen, the occurred faults can be detected using the constant threshold. According to Figure 7, it takes 1.3 s, 2.1 s, and 2.5 s to detect the positive bias, the negative bias, and the pitch actuator faults, respectively. Using this residual and the constant threshold, the minimum detectable fault is equal to ±0.5 ∘ . Obviously, the threshold value can be reduced to further speed up the detection process; however, by reducing the detection time, false alarms will increase. In fact, a tradeoff should be considered between the detection time and false alarms rate.
To evaluate the FDS performance in the presence of the pitch sensors and actuators and the generator's angular velocity sensor faults, first it is necessary to point out that occurrence of a fault in the angular velocity sensor of the generator affects the residual signal of the pitch system. To investigate this issue, the +5% proportional fault in the generator's angular velocity sensor was introduced at time instant 30 s for duration of 10 s, the +1 ∘ bias fault in the blade 1 pitch sensor was introduced at time instant 50 s for duration of 10 s, and the pitch actuator fault was introduced at time instant 70 s for duration of 20 s. Figure 8 represents the residual signals which were obtained from the FDS. As it can be seen from the results, by introducing a fault in the generator's angular velocity sensor, the residual signal of the blade 1 pitch sensor was affected and changed. Conversely, by introducing a fault in the pitch system, the residual signal of the generator's angular velocity was not affected.
Consequently, to form an integrated FDS, it should be considered that if both of the residuals have passed the threshold level, it means that a fault has occurred in the generator's angular velocity sensor. But if only the residual of the blade 1 pitch angle has passed the threshold level, it means that a fault has occurred in the pitch system. The general algorithm for detection of the studied faults in the WECS is suggested as follows: (1) if both of the residuals of the generator's angular velocity sensor and pitch system remain within the threshold level, no fault has occurred in the WECS; (2) if both of the residuals of the generator's angular velocity sensor and pitch system pass the threshold level, a fault has occurred in the generator's angular velocity sensor; (3) If the residual of the generator's angular velocity remains within the threshold level but the residual of the pitch system passes the threshold level, a fault has occurred in the pitch system.
In order to evaluate performance of the FDS together with the proposed algorithm, various faults were introduced to the WECS for duration of 300 s according to Table 4. In this case, the residual signals are shown in Figure 9. In this figure, a value of 1 means occurrence of a fault and a value of zero means that the corresponding element functions properly. As it can be seen from the results, performance of the designed FDS is very good together with the minimal false fault detections. In this figure, there are very few false alarms which are significant and desirable. To reduce the number of false detections, the threshold level can be increased, in order to avoid false alarms due to noises, disturbances, and uncertainties. However an increase in the threshold level will be followed by the sensitivity reduction of the FDS. Always a compromise should be considered to reduce the number of false alarms and to achieve the desired sensitivity when a constant threshold is utilized.   Table 4: (a) the residual signal of the generator's angular velocity sensor and (b) the residual signal of the pitch system of the blade 1.

The Robustness Issue
Since there are disturbances, uncertainties, and measurement noises in practical systems, decision making can be sensitive to them. The mentioned factors cause the robustness issue to be so important in FDSs. The robustness problem in FDSs is to minimize the number of false alarms and to maximize its sensitivity simultaneously. As it is described in [20], robustness of FDSs can be acquired by two general methods: (1) active methods in which the robustness issue is considered from the beginning of the design procedure of the FDS so that it is not sensitive to disturbances, uncertainties, and measurement noises. Generally, these approaches utilize unknown input observers, robust parity equations, and linear parameter varying observers [30][31][32]; (2) passive methods in which the robustness issue is achieved in the decision making component of the FDS. In these approaches, robustness is obtained by an adaptive threshold. As it is stated in [20], the passive method has an advantage over the active one, since the desired robustness can be acquired in spite of uncertain parameters of the model.
To avoid false alarms in passive approaches, the value of the constant thresholds should be selected large enough because of unmodeled dynamics, disturbances, uncertainties, and measurement noises. On the other hand, a large value for the constant threshold causes the sensitivity degradation of the FDS. As it is mentioned earlier, when a constant threshold is utilized, a compromise should be considered to reduce the number of false alarms and to attain the desired sensitivity. Therefore, it is suggested to use the adaptive threshold. In the adaptive threshold, the value of the threshold varies in time according to the obtained information from the residual signal. In this paper, to achieve the robustness of the FDS, the proposed adaptive threshold in [20] is utilized. This adaptive threshold is described by the following equations: where ]( ) and ( ) are the variance and mean value of the residual signal for the past samples, respectively, and is the momentum parameter which is considered close to 1. Furthermore, the significance level, , relates to probability of exceeding the residual signal from a random value, , with To investigate performance of the defined adaptive threshold, the residual signal in Figure 7 was considered again and the adaptive threshold was calculated. In this case, the simulation result is shown in Figure 10. As it is obvious from the obtained result, the adaptive threshold indicates the satisfactory behaviors. Additionally, the number of false and missed alarms for both the adaptive and constant thresholds is calculated and results are gathered in Table 5. The statistical analysis confirms that the performance of the adaptive threshold ( Figure 10) is considerably better than the constant threshold (Figure 7). By using the adaptive threshold, the number of both false and missed alarms is reduced significantly.
Furthermore, to study the efficiency of the presented FDS, the integrated test, which is presented in Table 4, is performed again. To compare the performance of the FDS together with the adaptive threshold and the FDS together with the constant threshold, three indices are utilized. These indices are the number of false and missed alarms and detection time, detect . Table 6 shows the obtained results in this case. It is noteworthy that in Table 6, the number of false alarms is calculated for whole residual signal; however, the number of missed alarm is calculated for each type of fault separately. Simulation results verify the validity of the proposed FDS. The presented FDS together with the adaptive threshold has good sensitivity and the number of its missed alarms is appropriate. Likewise its detection time is very low and favorable.

Conclusion
In this paper, an FDS was proposed for the WECS. The dynamic model of the WECS was a comprehensive one which contained both the electrical and mechanical parts. Detection of faults was performed in such a way that two neural models were used to emulate the normal system behaviors. They were then placed in parallel with the system and fault detection was acquired by comparing their outputs. The designed FDS can detect faults in the generator's angular velocity sensor, the pitch sensors, and actuators. The FDS employed the dynamic RNN and the ARS method was used to train the network. This kind of dynamic neural networks presented very high ability to estimate both the generator's angular velocity and pitch angle. In order to attain the robustness, it was suggested to use an adaptive threshold because the constant threshold was so sensitive to measurement noises and disturbances. The simulation results for different operation conditions verify that the proposed FDS operates fast, precisely, and accurately and detects the faults appropriately and its false and missed alarms are very low.