## 2 Improved Deep Learning Model for Day-Ahead Solar Irradiance Forecasting
### Discrete Wavelet Transformation Based Solar Irradiance Sequence Decomposition  
In general, solar irradiance sequence data always presents high volatility, variability and randomness due to its correlation to non-stationary weather conditions. Therefore, the raw solar irradiance sequence probably includes nonlinear and dynamic components in the form of spikes and fluctuations. The existence of these components will undoubtedly deteriorate the precision of the solar irradiance forecasting models. In practice, high-frequency signals and low-frequency signals are contained in solar irradiance sequence data. The former primarily results from the chaotic nature of the weather system. The latter is caused by the daily rotation of the earth. As for each signal with certain frequency, it is easier for a specific sequence forecasting model to predict the corresponding outliners and behaviors of that signal. Given the above considerations, DWT is employed here to decompose the raw solar irradiance sequence data into several stable parts (i.e., low-frequency signals) and fluctuant parts (i.e., high-frequency signals). These decomposed subsequences have better behaviors (e.g., more stable variances and fewer outliers) in terms of regularity than the raw solar irradiance sequence data, which is helpful for the precision improvement of the solar irradiance forecasting model [46]. In numerical analysis, DWT is a kind of wavelet transform for which the wavelets are discretely sampled. The key advantage of DWT over Fourier transforms is that DWT is able to capture both frequency and location information (location in time). In addition, DWT is good at the processing of multi-scale information processing [47]. These superiorities make DWT an efficient tool for complex data sequence analysis. In wavelet theory, the original sequence data are generally decomposed into two parts called approximate subsequence and detailed subsequence via DWT. The approximate subsequence captures the low-frequency features of the original sequence, while the  
Figure 2: The detailed framework of DWT-CNN-LSTM day-ahead forecasting model for solar irradiance under certain weather type. The DWT-CNN-LSTM forecasting model is based on discrete wavelet transformation (DWT), convolutional neural network (CNN) and long short term memory (LSTM) network. detailed subsequence contains the high-frequency features. This process is regarded as wavelet decomposition (WD), and the approximate subsequences obtained from the original sequence can also be further decomposed by WD process. Then the high-frequency noise in the forms of the fluctuation and randomness in original sequence can be extracted and filtered through WD process. Given a certain mother wavelet function \(\psi(t)\) and its corresponding scaling function \(\varphi(t)\), a sequence of wavelet \(\psi_{j,k}(t)\) and binary scale-functions \(\varphi_{j,k}(t)\) can be calculated as follows:  
\[\psi_{j,k}(t)=2^{\frac{j}{2}}\psi\left(2^{j}t-k\right) \tag{1}\]  
\[\varphi_{j,k}(t)=2^{\frac{j}{2}}\varphi\left(2^{j}t-k\right) \tag{2}\]  
in which \(t\), \(j\) and \(k\) respectively denote the time index, scaling variable and translation variable. Then the original sequence \(os(t)\) can be expressed as follows:  
\[os(t)=\sum_{k=1}^{n}c_{j,k}\varphi_{j,k}(t)+\sum_{j=1}^{J}\sum_{k=1}^{n}d_{j,k} \psi_{j,k}(t) \tag{3}\]  
in which \(c_{j,k}\) is the approximation coefficient at scale \(j\) and location \(k\), \(d_{j,k}\) denotes the detailed coefficient at scale \(j\) and location \(k\), \(n\) is the size of the original sequence, and \(J\) is the decomposition level. Based on the fast DWT proposed by [PERSON] [48], the approximate sequence and detailed sequence under a certain WD level can be obtained via multiple low-pass filters (LPF) and high-pass filters (HPF). Figure 3 exhibits the specific WD process in our practical work. During a certain k-level WD process, the raw solar irradiance sequence of certain weather types is first decomposed into two parts: approximate subsequence A1 and detailed subsequence D1.