# SOC Estimation with an Adaptive Unscented Kalman Filter Based on Model Parameter Optimization
## 4 Reasonable Optimization of Model Parameters  
In the process of identifying the parameters of the battery model, it was found that the amount of experimental data is always limited for a battery that works continuously for a period of time. When these raw data are substituted into the model for SOC estimation, the parameter values before and after each measured model parameter are prone to abrupt changes.  
This paper reasonably optimizes the model parameters when the SOC is 0.1 \(X\) (where \(X\) is an integer from 1 to 9). In Figure 9, the ohmic resistance \(R_{0}\) at the time when the experimentally measured SOC is equal to an integer multiple of 0.1 is shown.  
When these raw data are substituted into the model for SOC estimation, there will be more abrupt changes or \"spikes\" in the variation curve of the parameters when the SOC is equal to an integer multiple of 0.1, as shown by the black circle in Figure 9. However, in actual continuous operation conditions, the change trend of each parameter of the battery is continuous and relatively flat, without an obvious inflection point. To make the data curve as flat as possible on the premise of approaching the real value, reasonable methods are considered to optimize the data measured in the test to eliminate the spike. Conventional polynomial fitting results in a very smooth fitting curve, but often has a large deviation from the true value, and the error trend at both ends of the curve is the most serious.  
Given the data accuracy and the slowly changing curve characteristics, this paper adopts a reasonable optimization method to weaken data mutation. In time, \(SOC=0.1X(X=1,2.\dots\dots\) 9), the model parameters are the identified real values, and the model parameters are optimized before and after 0.1 \(X\). That is, point \((0.1X-0.01)\) and point \((0.1X+0.01)\) are selected around point \(SOC=0.1X\) to optimize the model parameters of the point \(SOC=0.1X\). When \(SOC=(0.1X-0.01)\), the model parameter values at times \(SOC=0.1X\) and \(SOC=(0.1X-0.1)\) are connected by a straight line, and the model parameter value at time \(SOC=(0.1X-0.01)\) is obtained by the functional relationship of the straight line and set as \(m\). When \(SOC=(0.1X+0.01)\), the model parameter values when \(SOC=0.1X\) and \(SOC=(0.1X+0.1)\) are connected by a straight line, and the model parameter value at time \(SOC=(0.1X+0.01)\) is obtained as \(n\) according to the functional relationship of the straight line. \((m+n)/2\) is taken as the optimal value of the model parameter at time \(SOC=0.1X\). After optimization, there is a small error in the model parameters at \(SOC=0.1X\), but, in return, the model parameters are closer to the curve of continuous changes in the actual working conditions.  
The data curve of the battery internal resistance \(R0\) measured at 25 \({}^{\circ}\)C and \(SOC=0.5\) is taken as an example. The \(R0\) values of group \(SOC=0.49\) and group \(SOC=0.51\) are selected as model reference data before and after the mutation point, and the average value of the times \(SOC=0.49\) and \(SOC=0.51\) are calculated as the analysis values of the original \"peak\" point. The obtained optimized data curve is shown in Figure 10.  
Figure 10: Optimized data curve.  
Figure 9: Original data curve.  
From the optimized data curve, it can be seen that each data mutation and spike is weakened or smoothed, making the change trend of each parameter of the model closer to the actual operating conditions of the EVs. Similarly, the rest of the model parameter data are reasonably optimized (where the \(V_{\alpha}\) original data curve is relatively smooth and will not be optimized).