# Modeling and Control Simulation of Power Converters in Automotive Applications
## 4 Software-in-the-Loop Simulation Analysis
### Battery Charging Scenario  
To fully validate the proposed OBC model, in this section, we show the simulation results obtained by applying three different charging protocols of a Li-ion battery. The simulations carried out refer to the use of a model in the Simscape environment (MathWorks), which, starting from high-level specifications, identifies the intrinsic characteristics of the battery, taking into account the chemistry. The Li-ion battery models made available by the simulation environment are created by integrating the following Equation (9):  
\[V_{battery} = \begin{cases}V_{b,0}-RI_{b}-V_{Q,d}+V_{exp}&\text{in discharge mode}\\ V_{b,0}-RI_{b}-V_{Q,c}+Ae^{-Bq}&\text{in discharge mode}\\ \end{cases}  \tag{9}\] \[V_{\mathcal{Q},c} =\frac{KQ}{Q-0.1q}I^{*}t-\frac{KQ}{Q-q}q\] \[\frac{dV_{exp}}{dt} =B|I_{b}|\big{(}{-}V_{exp}+Asign(I_{b})\big{)}\]  
where \(V_{b}\) denotes the measured battery voltage charge/discharge) [V]; \(V_{b,0}\) denotes the battery's constant voltage [V]; \(K\) denotes the polarization constant [V/Ah]; \(Q\) denotes the battery capacity [Ah]; \(q=\int_{0}^{t}I_{b}(\tau)d\tau\) the battery charge [A]; \(A\) denotes the exponential zone amplitude [V]; \(I^{*}\) denotes the filtered current [A]; \(B\) denotes the exp. zone time constant inverse; \(R\) denotes the internal resistance [\(\Omega\)]; and \(I_{b}\) denotes the measured battery current [A]. A realistic characteristic inherent to the discharge behavior of the battery for the different currents supplied is automatically generated, and the nominal characteristic is explained by highlighting the nominal and exponential zones (see Figure 29). Regarding the proposed simulation results, the data relating to the simulated battery are presented in Table 3. Figure 30 shows the different behaviors of the battery in terms of the voltage and charging current supplied by the electronic converters, in three different modes. Figure 29: Discharging characteristics of Li-ion battery generated from Simscape model. In particular, the results relate to the following charging protocols:  
* Constant current protocol (CCP): In this case, the nominal voltage of the battery is taken as reference and the current value is imposed to obtain the desired output power. \[I_{ref,CCP}=\frac{P_{out}^{*}}{V_{b,nominal}}\] (10) \begin{table}
\begin{tabular}{c c} \hline \hline
**Characteristic** & **Value** \\ \hline Maximum capacity & 150 [Ah] \\ Cut-off voltage & 187.5 [V] \\ Fully charged voltage & 291 [V] \\ Nominal discharge current & 65.2 [A] \\ Internal resistance & 16.67 [m\(\Omega\)] \\ Capacity at nominal voltage & 135.65 [Ah] \\ Exp. zone voltage & 270 [V] \\ Exp. zone capacity & 7.37 [Ah] \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Battery parameters of Simscape model. Figure 30: Behavior of the battery during the charging phase, in three different protocols. * Adaptive current protocol (ACP): In this case, the current is calculated based on the instantaneous battery voltage to keep the power flow between the OBC and the battery constant. \[I_{ref,ACP}(t)=\frac{P_{out}^{*}}{V_{b}(t)}.\] (11)
* Pulse current protocol (PCP): In this case, a current greater than that necessary to obtain a constant desired power flow is used, providing the battery with current pulses followed by zero-current phases. \[I_{ref,PCP}=2\frac{P_{out}^{*}}{V_{b,min}}PWM(0.1\ \mathrm{Hz},50\%d.c.)\] (12)  
As expected from engineering practices, the PCP protocol provides the fastest charging, compared to the other two cases, for the same power supplied to the battery for charging (see Figure 31). This is due to the intrinsic behavior of the battery, which is more reactive in the high current phase than it is when it discharges in the zero current phase (in fact, batteries are systems with memory).