# Research of Adaptive Extended Kalman Filter-Based SOC Estimator for Frequency Regulation ESS
## 3 Performance Verification of SOC Estimation Using Adaptive Extended Kalman Filter
### SOC Estimation Using Adaptive Extended Kalman Filter  
The noise covariance matrices \(\mathbf{Q}\) and \(\mathbf{R}\) of the conventional EKF are input to the algorithm as fixed values on the assumption that the user knows the noise information of the progress equation and the input data. If the noise of the input data is within the expected range, the battery state estimation performance of the EKF algorithm can exhibit high accuracy. However, when the noise is much larger than the set noise, covariance matrices \(\mathbf{Q}\) and \(\mathbf{R}\) occur, and the algorithm cannot properly reflect severe noise information, which may degrade the estimation performance of the algorithm. The noise covariance matrices \(\mathbf{Q}\) and \(\mathbf{R}\) of the AEKF vary according to the input data, and are recursively input to the algorithm [35; 40; 41]. The structures of the conventional EKF and the AEKF algorithm are generally very similar. However, in the case of the AEKF, the noise characteristics of the input data can be more actively reflected, and the accuracy of the battery state estimation performance can be obtained in the event of severe noise. M is a window size for moving estimation, and is a monitoring range of data set to reflect noise information of input data in the algorithm. The data with M length is moved and observed in the algorithm, and the noise information \(\mathbf{J}\) is calculated by squaring the estimated error of the output and dividing by M, as shown in Equation (19). \[\mathbf{J}=\frac{1}{\mathrm{M}}\sum_{\mathrm{i=k-M+1}}^{\mathrm{k}}\mathrm{e_ {i}}\mathrm{e_{i}^{T}}. \tag{19}\]  
\(\mathbf{J}\) has the noise information, and is used to update the noise covariance matrix, \(\mathbf{Q_{adaptive}}\), of the progression equation and the noise covariance matrix, \(\mathbf{R_{adaptive}}\), of the measured value, as shown in Equations (20) and (21). \[\mathbf{Q_{adaptive}}=\mathrm{K_{j}}\mathrm{K_{i}^{T}}. \tag{20}\]  
\[\mathbf{R_{adaptive}}=\mathrm{J}+\mathrm{H_{i}}\mathrm{P_{i}}\mathrm{H_{i}^{T}}. \tag{21}\]  
The AEKF observes the input data and updates the noise covariance matrix, resulting in faster estimation than conventional EKF. Figure 9 shows the results obtained. The SOC estimation performance was not significantly different from that of the conventional EKF, but it can be seen that the AEKF estimates the reference SOC faster than the conventional EKF. These characteristics make it an appropriate algorithm for applications that require fast estimation performance. Figure 10 shows the voltage estimation performance of AEKF when noise is present in the measured voltage data. Figure 10a adds some extensive noise to the voltage data. Figure 10b compares the voltage estimation performance of the EKF and AEKF when the voltage data containing noise are  
Figure 9: SOC estimation comparison of adaptive EKF and EKF. input, and the conventional EKF has an inaccurate voltage estimation result because it uses fixed noise information, while AEKF shows that the actual voltage is similarly estimated because AEKF updates the fluctuating noise information in the algorithm. Figure 11 shows the noise covariance matrix, \(\mathbf{R_{adaptive}}\), of the measured data during the battery state estimation of the AEKF algorithm, and the noise covariance matrix, \(\mathbf{Q_{adaptive}}\), of the progression equation. The \(\mathbf{R}\) of the conventional EKF algorithm is used for the algorithm calculation in the form of 1 \(\times\) 1, but in AEKF, \(\mathbf{R_{adaptive}}\) is changed to a \(2\times 2\) matrix, and is updated as a measurement value is input. It can be seen that the updated \(\mathbf{R_{adaptive}}\) reflects the noise information, and \(\mathbf{Q_{adaptive}}\) is also updated with time. \(\mathbf{Q_{2}}\) and \(\mathbf{Q_{3}}\) are values that remain as 0 from the beginning of the algorithm, and \(\mathbf{Q_{1}}\) and \(\mathbf{Q_{4}}\) vary to reflect noise information of the measurement equation in the algorithm.