# Optimal Modeling for Dynamic Response of Energy Storage Systems
## 4 Optimization Parameter Search and Analysis
### Universal Model Test Waveform of an Energy Storage System with the Optimization Algorithm  
When the IGA and IPSO were used to solve the optimization problem established by the universal model of energy storage systems, based on a fair comparison, the common parameters of the two algorithms were the same. The common parameters included the search area of key parameters in Section 4.2, the total population in an algorithm (number of particles), the maximum number of iterations, and the initial global optimal solution position. The parameter setting values are shown in Table 7.  
\begin{table}
\begin{tabular}{c c c} \hline
**No.** & **Model** & **Symbol** & **Description** \\ \hline
1 & \(T_{fltr}\) & Voltage or reactive power measurement filter time constant (s) \\
2 & \(K_{p}\) & Reactive power PI control proportional gain (pu) \\
3 & \(k_{i}\) & Reactive power PI control integral gain (pu) \\
4 & REPC & \(K_{pg}\) & Proportional gain for power control (pu) \\
5 & \(K_{ig}\) & Integral gain for power control (pu) \\
6 & \(T_{p}\) & Real power measurement filter time constant (s) \\
7 & \(T_{g}\) & Power controller lag time constant (s) \\ \hline
8 & REGC & \(T_{g}\) & Converter time constant (s) \\ \hline \end{tabular}
\end{table}
Table 6: The key parameter list.  
\begin{table}
\begin{tabular}{c c} \hline
**Common Parameters of IGA/IPSO** & **Value** \\ \hline \(T_{fltr}\) & \(0\sim 1\), step \(=10^{-4}\) \\ \(K_{p}\) & \(0\sim 1\), step \(=10^{-4}\) \\ \(K_{i}\) & \(0\sim 20\), step \(=2\times 10^{-3}\) \\ \(K_{pg}\) & \(0\sim 1\), step \(=10^{-4}\) \\ \(K_{ig}\) & \(0\sim 20\), step \(=2\times 10^{-3}\) \\ \(T_{p}\) & \(0\sim 1\), step \(=10^{-4}\) \\ \(T_{g(REGC)}\) & \(0\sim 1\), step \(=10^{-4}\) \\ Population & \(200\) \\ Maximum iteration & \(100\) \\ Initial solution & \(\left[T_{fltr}\), \(K_{p}\), \(K_{i}\), \(K_{pg}\), \(K_{ig}\), \(T_{g(REPC)}\), \(T_{g(REGC)}\right]=\) \\  & \(\left[0,0.75,2.5,0.75,10,0,0,0.02\right]\) \\ \hline Parameters of IGA & Value \\ \hline Crossover rate & \(0.8\) \\ Mutation rate & \(0.2\) \\ \(\omega\) & Random of \(0\)\(-1\) \\ \hline Parameters of IPSO & Value \\ \hline \(\omega_{\max}\) & \(0.9\) \\ \(\omega_{\min}\) & \(0.4\) \\ cmax & \(2.5\) \\ cmin & \(0.5\) \\ \hline \end{tabular}
\end{table}
Table 7: The settings of the common parameters of the algorithms.  
The energy storage system parameters selected by the key parameter analysis in the previous section were used as the variables searched when the optimization algorithm solves problems. The IGA and IPSO had the same range of variables searched and the interval. The searched population quantity and number of iterations were set as the same numbers to guarantee the rationality of fitness comparison between the two algorithms. The initial global optimal solution used the same values, and the two algorithms had the same fitness baseline. There were two kinds of measured waveforms of the actual energy storage system output response: one was used to optimize the algorithm variable search, and the other was used to evaluate the global optimal solution parameter applicability. The input waveform used when the algorithm searched for the optimum parameters included three classes of step response: constant active power output and reactive power step output; active power step output and constant reactive power output; active power step output and constant reactive power input, as shown in Figure 18.  
The measurement waveform of the applicability evaluation also included constant active power input and reactive power step output, and active power step output and reactive power fixed input, as shown in Figure 19.