# State Estimation for DC Microgrids using Modified Long Short-Term Memory Networks
## 5 Experimental Setup of the Proposed Modified LSTM-Based State Estimator  
### Measurement Data Preparation for DC Microgrid SE  
The Power System Computer-Aided Design (PSCAD) software is used to simulate the DC microgrid. PSCAD is a time domain simulation software for analyzing power system transience. From the PSCAD simulation, we obtained 21-day long measurement data composed of the estimation input and the target output. The time resolution for the measurement data is 5 min.  
For the conventional WLS state estimator, the last day of the 21-day long measurement data is used to estimate the state of the DC microgrid. For the deep-learning-based state estimator, the 21-day long measurement data are divided into 20-day long training data and 1-day long testing data, similar to the conventional WLS state estimator.  
The estimation input is used for both the conventional WLS state estimator and the deep-learning-based state estimator to estimate the system state. For the DC microgrid SE, the estimation input is composed of three measurement types: the bus voltage, the current flow, and the power injection. White Gaussian noise is also added into these measurements.  
The power sources in the DC microgrid are located on bus 5, bus 6, and bus 8. Assuming that the buses with the power sources are the controlled buses, the real measurements for voltage were  
Figure 4: Configuration of a DC microgrid system.  
performed on bus 5 (\(V_{\text{bus}}\)), bus 6 (\(V_{\text{bus}}\)), and bus 8 (\(V_{\text{bus}}\)). Measurement error of 1% was considered for the voltage measurement.  
The measurements of the current flow were done on all of the lines connected to the buses with the power sources. The real measurements were done on line 5-4 (\(\text{I}_{\text{flow}54}\)), line 6-4 (\(\text{I}_{\text{flow}64}\)), line 5-7 (\(\text{I}_{\text{flow}57}\)), line 6-9 (\(\text{I}_{\text{flow}69}\)), line 8-7 (\(\text{I}_{\text{flow}87}\)), and line 8-9 (\(\text{I}_{\text{flow}89}\)). Measurement error of 3% was considered for the current flow measurement.  
Assuming that there were no real measurements on the load buses, pseudo-measurements were used to get the power injection measurements. The pseudo-measurements used in the simulated state estimators were obtained and modified based on the actual load demand of mainland South Korea in June 2014. The measurements were conducted on bus 1 (\(\text{P}_{\text{inj1}}\)), bus 2 (\(\text{P}_{\text{inj2}}\)), and bus 3 (\(\text{P}_{\text{inj3}}\)). For pseudo-measurement, the measurement error of 15% was considered.  
For the deep-learning-based state estimator, the information of the target output is needed to train the network model. In this research, the target output is composed of all of the buses' voltage magnitude in the DC microgrid. The measurements were carried out on bus 1 (\(\text{V}_{1}\)), bus 2 (\(\text{V}_{2}\)), bus 3 (\(\text{V}_{3}\)), bus 4 (\(\text{V}_{4}\)), bus (\(\text{V}_{5}\)), bus 6 (\(\text{V}_{6}\)), bus 7 (\(\text{V}_{7}\)), bus 8 (\(\text{V}_{8}\)), and bus 9 (\(\text{V}_{9}\)).  
In order to get the error variance of the measurement, for a given percentage of measurement error, the equation is written as  
\[\sigma_{i}=\frac{\mu_{i}\times error\%}{300}, \tag{19}\]  
assuming that \(\mu_{i}=z_{i}\) is the mean value of \(i\)th measurement and a \(\pm 3\sigma_{i}\) deviation around the mean covers about 99.7% of the Gaussian curve [9].