## 2 Materials and Methods
### CEEMDAN-CNN-ATT-LSTM Model
\[\text{Normalized\_Out}_{l}=\frac{\text{Pooled\_Out}_{l}-\mu_{l}}{\sqrt{\tau_{ l}^{2}+\psi}} \tag{28}\]  
where \(\mu_{l}\) and \(\tau_{l}^{2}\) are the mean and variance of the output from the \(l\)-th layer, and \(\psi\) is a small constant for numerical stability. The features extracted by the CNN are then passed through two LSTM layers. The input to each LSTM layer consists of the normalized outputs from the previous stage, which are data sequences representing features over time. The LSTM operation is given in Equation (29). \[h_{t}=\text{LayerNorm}(\text{Dropout}(\text{LSTM}(\text{Normalized\_Out}_{l}))) \tag{29}\]  
where LayerNorm represents layer normalization, and Dropout is used to prevent overfitting. The hidden units in this LSTM layer are set to 256. The LSTM layer captures the temporal dependencies in the data, with \(h_{t}\) being the output at time step \(t\). ATT is then applied to the outputs of the two LSTM layers and the positional encoding (see Equation (30)). The attention layer calculates the importance of each time step in the sequence, helping the model focus on the most relevant features for predicting solar irradiance. This is expressed in Equation (31). \[h_{tpos}=\text{Positional\_Encoding}(h_{t}) \tag{30}\]  
\[\text{Attention\_Out\_enc}_{t}=\text{MultiHead}(h_{tpos},h_{tpos},h_{tpos}) \tag{31}\]  
Residual connections are then employed (see Equation (32)) to add the original input back to the output of the attention mechanism:  
\[ht_{enc}=\text{Attention\_Out\_enc}_{t}+h_{tpos} \tag{32}\]  
This technique helps to maintain the original input information, enhancing the stability and performance of the model. Before applying the ATT in the decoder, the target history (i.e., historical irradiance data) is embedded to map the input features into a higher-dimensional space that can capture more complex patterns. The embedding operation is described in Equation (33). \[\text{Embedding\_Out}=\text{Embedding}(\text{Target\_History}) \tag{33}\]where Target_History \(\in\mathbb{R}^{q}\) represents the sequence of past irradiance values, and Embedding is the operation that transforms these values into a higher-dimensional space Embedding_Out \(\in\mathbb{R}^{q\times d}\), where \(d\) is the embedding dimension. To incorporate temporal information into the sequence, positional encoding is added to the embedded target history. This process is shown in Equation (34). \[his_{pos}=\text{Positional\_Encoding}(\text{Embedding\_Out}) \tag{34}\]  
The positional encoding allows the model to differentiate between the positions of time steps in the sequence, which is crucial for tasks involving sequential data. A multi-head attention mechanism is then applied to the outputs of the encoder and the positional encoded target history. This is expressed in Equation (35). Figure 8:0  
Then, residual connections are employed to add the original input back to the output of the ATT (See Equation (36)). Figure 8:1  
The features extracted are then passed through two LSTM layers. The LSTM operation is given in Equation (37). Figure 8:2  
The output from the LSTM is flattened into a one-dimensional vector, as shown in Equation (38). Figure 8:3  
This vector is then passed through a fully connected layer to produce the final prediction (See Equation (39)). Figure 8:4  
where \(W_{fc}\) and \(b_{fc}\) are the weights and biases of the fully connected layer, and \(y_{pred}\) is the predicted solar irradiance value. The output is then passed through a sigmoid function to constrain the predictions (See Equation (40))  
Figure 8:5  
where \(\sigma(y_{pred})\) represents the sigmoid activation applied to the predicted value to ensure non-negative output. Algorithms 1 and 2 describe the training and forecasting process of the hybrid model developed for this task. In the first phase, the model is iteratively trained on a dataset, adjusting its parameters to minimize a loss function represented as \(\mathcal{L}\).