# State Estimation for DC Microgrids using Modified Long Short-Term Memory Networks
## 7 Discussion of Performance Evaluation  
In order to demonstrate the effectiveness of the proposed method in estimating the DC microgrid's state, the resulting error of the proposed modified LSTM-based state estimator is compared to the conventional WLS state estimator, the MLP-based state estimator, and the normal LSTM-based state estimator. Different types of evaluation metrics were calculated based on the equations (Equations (24-27)) shown in Section 5.4, specifically the MAE, MAPE, MSE, and RMSE. The values for each type of error are shown in Table 2.  
Based on the results, the conventional WLS state estimator can be concluded to have the highest error rate for all error types compared to the deep-learning-based state estimators. This is due to the nature of the conventional WLS state estimator, which is dependent on the number of available measurements and the measurements' error variance. The addition of pseudo-measurement in the conventional WLS state estimator did not help much in reducing the overall estimation error. The difference between the conventional WLS state estimator and the deep-learning-based state estimators is the utilization of historical data and weight selection. Unlike the WLS state estimator, deep-learning-based state estimators also consider the past data information during their training process. Furthermore, in contrast to the WLS state estimator, for which weight is set based on the measurement error variance, the deep-learning-based state estimators can optimize their weight values to produce better predictions. By executing the learning approach and the data pattern recognition on the historical data, the deep-learning-based state estimators were shown to have smaller error values compared to the conventional WLS state estimator. More specifically for the MLP approach, historical data were used in the training process of the network, resulting in an optimal weight to estimate the system state. The MLP network is trained using the backpropagation algorithm to learn the correlation between an output and current input, while optimizing its own weight with the gradient descent algorithm. As a result, the MLP-based state estimator produced better estimation than the conventional WLS state estimator. Even though MLP can be used to make a time-series prediction, LSTM is much more suited for processing time-series data. Due to the structure of the network, LSTM allows all past information to persist over time. In the training process, the LSTM method calculated an output based on the current input and the previous output using the backpropagation through time algorithm, while the weight is optimized with the gradient descent algorithm. This process further improved the LSTM-based state estimator's estimation more than the MLP-based and the conventional WLS state estimators. \begin{table}
\begin{tabular}{c|c c c c} \hline \hline
**State Estimator** & **MAE** & **MAPE** & **MSE** & **RMSE** \\ \hline Conventional WLS & 0.1862939 & 0.0312271 & 0.0757673 & 0.2752587 \\ Modified LSTM-based & 0.0673793 & 0.0112801 & 0.0088547 & 0.0940993 \\ MLP-based & 0.1156711 & 0.0193747 & 0.0217652 & 0.1475303 \\ LSTM-based & 0.0911940 & 0.0152753 & 0.0149962 & 0.1224592 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of state estimator error values. Figure 6: Modified LSTM-based voltage estimation results for: (**a**) bus 1; (**b**) bus 2; (**c**) bus 3; (**d**) bus 4; (**e**) bus 5; (**f**) bus 6; (**g**) bus 7; (**h**) bus 8; (**i**) bus 9. The proposed modified LSTM-based state estimator has the smallest error value for all error types. Other than the advantages of the LSTM method itself, this is caused by the addition of the WLS loss function in the training of the LSTM network. Differing from the MSE loss function used in the normal LSTM-based state estimator, in the WLS loss function, the different weight values that were assigned to each parameter output error helped put an emphasis on the different types of measurements.