# Wind Turbine Prognosis Models Based on SCADA Data and Extreme Learning Machines
## 2 Materials and Methods
### Regression Analysis Using ELM  
A Single-hidden Layer Feedforward Neural network is trained as a regressor following the Extreme Learning Machines framework [15; 16]. The parameters of the SLFN network that have to be determined are the so-called output weights, connecting the hidden layer neurons to the outputs, and the number of hidden neurons (H). These parameters can be assigned in a random way, following the ELM's main idea. Therefore, computing the SLFN output weights has been transformed to a (over-determined) linear problem, which can be solved in one step by means of the Moore-Penrose pseudoinverse [15; 16]. Focusing on the regression problem, the \(L\) signals \(x_{l}\) of the WT subsystem are organised as the input vector \(\mathbf{x}_{i}\), where the features are taken in the time-slot \(i\): \(\mathbf{x}_{i}=[x_{0}\cdots x_{L-1}]^{T}\). The goal is to predict the target variable \(t_{c}\) in the same time-slot, with \(C\geq 1\). The matrix \(\mathbf{X}=[\mathbf{x}_{1}\cdots\mathbf{x}_{i}\cdots\mathbf{x}_{N}]\) of size \(L\times N\) contains the set of features that will be employed to train the model given the \(N\) observations with the aim of predicting a generic number \(C\) of the target variable's values. The vector \(\mathbf{t}_{c}=[t_{1}\cdots t_{i}\cdots t_{N}]^{T}\) contains the \(N\) registers of the target variable \(c\) corresponding to the measures in \(\mathbf{X}\). The vectors \(\mathbf{t}_{c}\) are organised in the matrix \(\mathbf{T}=[\mathbf{t}_{1}\cdots\mathbf{t}_{c}\cdots\mathbf{t}_{C}]^{T}\). The input weight matrix \(\mathbf{W}\) will be of size \(L\times H\), where \(H\) is the number of hidden neurons, and \(L\) is the number of features (input variables). The element \(w_{lh}\) of \(\mathbf{W}\) is the weight that connects the feature \(l\) with the hidden node \(h\), and each one of the hidden nodes has a bias \(b_{h}\). Taking into account that the signals in vector \(\mathbf{x}_{i}\) are the inputs of the SLFN for the time-slot \(i\), the output values in the internal hidden nodes of network (prior to applying the activation function) can be written as \(\mathbf{x}_{i}^{T}\mathbf{W}+\mathbf{b}^{T}\). Considering the sigmoid as the activation function, the output values in the hidden nodes wil be \(sig(\mathbf{x}_{i}^{T}\mathbf{W}+\mathbf{b}^{T})\), where \(sig(\mathbf{A})\) applies the sigmoid function to each element \(a_{ij}\) of \(\mathbf{A}\). Then, when the resulting \(1\times H\) row vector is multiplied by the output weight matrix \(\mathbf{B}\) of size \(H\times C\), the resulting \(1\times C\) row vector will contain the prediction of the targets \(\hat{\mathbf{y}}=[\hat{y}_{1}\cdots\hat{y}_{C}]\). Therefore, when grouping the equations for all the \(N\) observations, we obtain:  
\[sig(\mathbf{X}^{T}\mathbf{W}+\mathbf{ub}^{T})\mathbf{B}=\mathbf{T}, \tag{1}\]  
\(\mathbf{u}\) being the \(N\times 1\) all-ones vector. In order to simplify the notation let us define the \(N\times H\) matrix \(\mathbf{H}\) as:  
\[\mathbf{H}=sig(\mathbf{X}^{T}\mathbf{W}+\mathbf{ub}^{T}). \tag{2}\]Then, the equation can be written in a compact form as:  
\[\mathbf{HB}=\mathbf{T}. \tag{3}\]  
Once \(H\) is determined, \(\mathbf{W}\) and \(\mathbf{b}\) are randomly selected from a zero-mean, unit-variance Gaussian distribution function. The only unknown parameter is the matrix \(\mathbf{B}\). Note that Equation (3) is over-determined, because for ELM networks it is common to choose a number \(H\) of hidden nodes which is lower than the number \(N\) of classified cases used for training, that is, \(N>H\). The output weight matrix \(\mathbf{B}\), provided that \(\left(\mathbf{H}^{T}\mathbf{H}\right)^{-1}\) is non singular, can be computed as:  
\[\mathbf{B}=\left(\mathbf{H}^{T}\mathbf{H}\right)^{-1}\mathbf{H}^{T}\mathbf{T} =\mathbf{H}^{T}\mathbf{T}, \tag{4}\]  
where \(\mathbf{H}^{\dagger}\) is the Moore-Penrose inverse.