## 2 Improved Deep Learning Model for Day-Ahead Solar Irradiance Forecasting
### Convolutional Neural Networks Based Local Feature Extractor  
Generally speaking, the historical solar irradiance sequence data is the most important input that contains abundant information for forecasting the day-ahead solar irradiance. In our proposed DWT-CNN-LSTM model, the original solar irradiance sequence under certain weather type is  
Figure 3: The detailed process of k-level wavelet decomposition. A1 to Ak are the approximate subsequences, and D1 to Dk are the detailed subsequences. All of these subsequences can be forecasted individually using some kind of time sequence forecasting models. decomposed through DWT into several subsequences. These subsequences also include relevant and significant information that is useful for the later forecasting of subsequences. Therefore, the effective extraction of local features that are robust and informative from the sequential input is very important for enhancing the forecasting precision. Traditionally, many previous works primarily focused on multi-domain feature extractions [49], including statistical (variance, skewness, and kurtosis) features, frequency (spectral skewness) features, time frequency (wavelet coefficients) features, etc. However, these hand-engineered features require intensive expert knowledge of the sequence characteristics and cannot necessarily capture the intrinsic sequential characteristic behind the input data. Moreover, knowing how to select these manually extracted features is another big challenge. Unlike manual feature extraction, CNN is an emerging branch of DL that is used for automatically generating useful and discriminative features from raw data, which has already been broadly applied in image recognition, speech recognition, and natural language processing [50]. As for application, the subsequences decomposed from solar irradiance sequence can be regarded as 1-dimensional sequences. Thus 1-dimensional CNN is adopted here to work as a local feature extractor. The key idea of CNN lies in the fact that abstract features can be extracted by convolutional kernels and the pooling operation. In practice, to address the sequences, the convolutional layers (convolutional kernels) firstly convolve multiple local filters with the sequential input. Each feature map corresponding to each local filter can be generated by sliding the filter over the whole sequential input. Subsequently, the pooling layer is utilized to extract the most significant and fixed-length features from each feature map. In addition, the convolution and pooling layers can be combined in a stacked way. First of all, the most simply constructed CNN with only one convolutional layer and one pooling layer is introduced to briefly show how the CNN directly process the raw sequential input. It is assumed that \(K\) filters with a window size of \({}_{m}\) are used in the convolutional layer. The details of the relevant mathematical operation in these two layers are presented in the following two subsections. (1) Convolutional Layer  
Convolution operation is regarded as a specific linear process that aims to extract local patterns in the time dimension and to find local dependencies in the raw sequences. The raw sequential input \(\mathbf{S}\) and filter sequence \(\mathbf{FS}\) is defined as follows. Here vectors are expressed in bold according to the convention. \[S=[s_{1},s_{2},s_{3},\cdots,s_{L}] \tag{4}\]  
\[\mathbf{FS}=[\mathbf{w}_{1},\mathbf{w}_{2},\mathbf{w}_{3},\cdots,\mathbf{w}_{K}] \tag{5}\]  
in which \(s_{i}\in R\) is the single sequential data point that is arrayed according to time, and \(\mathbf{w}_{j}\in R^{m\times 1}\) is one of the filter vectors. \(L\) is the length of the raw sequential input \(\mathbf{S}\), and \(K\) is the number of total filters in the convolutional layer. Then the convolution operation is defined as a multiplication operation between a filter vector \(\mathbf{w}_{j}\) and a concatenation vector representation \(s_{ii+m-1}\).